Package ffx.potential.nonbonded
Class ReciprocalSpace
java.lang.Object
ffx.potential.nonbonded.ReciprocalSpace
The Reciprocal Space class computes the reciprocal space contribution to
ParticleMeshEwald
for the AMOEBA force field.
- Assignment of polarizable multipole charge density to the 3D grid, via b-Splines, is parallelized using a spatial decomposition.
- The convolution depends on methods of the
Real3DParallel
andComplex3DParallel
classes. - Finally, the electric potential and its gradients are collected, in parallel, off the grid using b-Splines.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
The class computes b-Splines that are used to spline multipoles and induced dipoles onto the PME grid.static enum
-
Constructor Summary
ConstructorDescriptionReciprocalSpace
(ParticleMeshEwald particleMeshEwald, Crystal crystal, ForceField forceField, Atom[] atoms, double aewald, ParallelTeam fftTeam, ParallelTeam parallelTeam) Reciprocal Space PME contribution. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cartToFracInducedDipole
(double[] inducedDipole, double[] inducedDipoleCR, double[] fracInducedDipole, double[] fracInducedDipoleCR) cartToFracInducedDipolesvoid
computeBSplinesvoid
computeInducedPhi
(double[][] cartInducedDipolePhi, double[][] cartInducedDipoleCRPhi, double[][] fracInducedDipolePhi, double[][] fracInducedDipoleCRPhi) computeInducedPhivoid
computePermanentPhi
(double[][] cartPermanentPhi, double[][] fracPermanentPhi) Compute the potential Phi and its derivatives for all atoms.int
getXDim()
getXDimint
getYDim()
getYDimint
getZDim()
getZDimvoid
initTimings.void
Compute the reciprocal space field using a convolution.void
printTimings.void
Setter for the fieldatoms
.void
setCrystal
(Crystal crystal) Setter for the fieldcrystal
.void
splineInducedDipoles
(double[][][] inducedDipole, double[][][] inducedDipoleCR, boolean[] use) Place the induced dipoles onto the FFT grid for the atoms in use.void
splinePermanentMultipoles
(double[][][] globalMultipoles, double[][][] fracMultipoles, boolean[] use) Use b-Splines to place the permanent multipoles onto the FFT grid for the atoms in use.void
toFractionalDipole
(double[] gd, double[] fd) Convert a dipole in the global frame into a factional dipole.
-
Constructor Details
-
ReciprocalSpace
public ReciprocalSpace(ParticleMeshEwald particleMeshEwald, Crystal crystal, ForceField forceField, Atom[] atoms, double aewald, ParallelTeam fftTeam, ParallelTeam parallelTeam) Reciprocal Space PME contribution.- Parameters:
particleMeshEwald
- aParticleMeshEwald
object.crystal
- aCrystal
object.forceField
- aForceField
object.atoms
- an array ofAtom
objects.aewald
- the Ewald parameter.fftTeam
- aParallelTeam
object.parallelTeam
- aParallelTeam
object.
-
-
Method Details
-
cartToFracInducedDipole
public void cartToFracInducedDipole(double[] inducedDipole, double[] inducedDipoleCR, double[] fracInducedDipole, double[] fracInducedDipoleCR) cartToFracInducedDipoles- Parameters:
inducedDipole
- Input Cartesian induced dipole.inducedDipoleCR
- Input Cartesian induced dipole CR.fracInducedDipole
- Output fractional induced dipole.fracInducedDipoleCR
- Output fractional induced dipole CR.
-
computeBSplines
public void computeBSplines()computeBSplines -
computeInducedPhi
public void computeInducedPhi(double[][] cartInducedDipolePhi, double[][] cartInducedDipoleCRPhi, double[][] fracInducedDipolePhi, double[][] fracInducedDipoleCRPhi) computeInducedPhi- Parameters:
cartInducedDipolePhi
- an array of double.cartInducedDipoleCRPhi
- an array of double.fracInducedDipolePhi
- an array of double.fracInducedDipoleCRPhi
- an array of double.
-
computePermanentPhi
public void computePermanentPhi(double[][] cartPermanentPhi, double[][] fracPermanentPhi) Compute the potential Phi and its derivatives for all atoms.- Parameters:
cartPermanentPhi
- an array of double.fracPermanentPhi
- an array of double.
-
getXDim
public int getXDim()getXDim- Returns:
- the X dimension of the FFT grid.
-
getYDim
public int getYDim()getYDim- Returns:
- the Y dimension of the FFT grid.
-
getZDim
public int getZDim()getZDim- Returns:
- the Z dimension of the FFT grid.
-
performConvolution
public void performConvolution()Compute the reciprocal space field using a convolution. -
initTimings
public void initTimings()initTimings. -
printTimings
public void printTimings()printTimings. -
setAtoms
Setter for the fieldatoms
.- Parameters:
atoms
- an array ofAtom
objects.
-
setCrystal
Setter for the fieldcrystal
.- Parameters:
crystal
- aCrystal
object.
-
splineInducedDipoles
public void splineInducedDipoles(double[][][] inducedDipole, double[][][] inducedDipoleCR, boolean[] use) Place the induced dipoles onto the FFT grid for the atoms in use.- Parameters:
inducedDipole
- Induced dipoles.inducedDipoleCR
- Chain rule term for induced dipole gradient.use
- The atoms in use.
-
splinePermanentMultipoles
public void splinePermanentMultipoles(double[][][] globalMultipoles, double[][][] fracMultipoles, boolean[] use) Use b-Splines to place the permanent multipoles onto the FFT grid for the atoms in use.- Parameters:
globalMultipoles
- an array of double.fracMultipoles
- an array of double.use
- an array of boolean.
-
toFractionalDipole
public void toFractionalDipole(double[] gd, double[] fd) Convert a dipole in the global frame into a factional dipole.- Parameters:
gd
- an array ofinvalid reference
double
fd
- an array ofinvalid reference
double
-