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
Real3DParallelandComplex3DParallelclasses. - 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
Nested ClassesModifier and TypeClassDescriptionclassThe class computes b-Splines that are used to spline multipoles and induced dipoles onto the PME grid.static enum -
Constructor Summary
ConstructorsConstructorDescriptionReciprocalSpace(ParticleMeshEwald particleMeshEwald, Crystal crystal, ForceField forceField, Atom[] atoms, double aewald, ParallelTeam fftTeam, ParallelTeam parallelTeam) Reciprocal Space PME contribution. -
Method Summary
Modifier and TypeMethodDescriptionvoidcartToFracInducedDipole(double[] inducedDipole, double[] inducedDipoleCR, double[] fracInducedDipole, double[] fracInducedDipoleCR) cartToFracInducedDipolesvoidcomputeBSplinesvoidcomputeInducedPhi(double[][] cartInducedDipolePhi, double[][] cartInducedDipoleCRPhi, double[][] fracInducedDipolePhi, double[][] fracInducedDipoleCRPhi) computeInducedPhivoidcomputePermanentPhi(double[][] cartPermanentPhi, double[][] fracPermanentPhi) Compute the potential Phi and its derivatives for all atoms.intgetXDim()getXDimintgetYDim()getYDimintgetZDim()getZDimvoidinitTimings.voidCompute the reciprocal space field using a convolution.voidprintTimings.voidSetter for the fieldatoms.voidsetCrystal(Crystal crystal) Setter for the fieldcrystal.voidsplineInducedDipoles(double[][][] inducedDipole, double[][][] inducedDipoleCR, boolean[] use) Place the induced dipoles onto the FFT grid for the atoms in use.voidsplinePermanentMultipoles(double[][][] globalMultipoles, double[][][] fracMultipoles, boolean[] use) Use b-Splines to place the permanent multipoles onto the FFT grid for the atoms in use.voidtoFractionalDipole(double[] globalDipole, double[] fractionalDipole) 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- aParticleMeshEwaldobject.crystal- aCrystalobject.forceField- aForceFieldobject.atoms- an array ofAtomobjects.aewald- the Ewald parameter.fftTeam- aParallelTeamobject.parallelTeam- aParallelTeamobject.
-
-
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 ofAtomobjects.
-
setCrystal
Setter for the fieldcrystal.- Parameters:
crystal- aCrystalobject.
-
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[] globalDipole, double[] fractionalDipole) Convert a dipole in the global frame into a factional dipole.- Parameters:
globalDipole- dipole in the global frame.fractionalDipole- fractional dipole.
-