Package ffx.potential.nonbonded.pme
Class RealSpaceEnergyRegion
java.lang.Object
edu.rit.pj.ParallelConstruct
edu.rit.pj.ParallelRegion
ffx.potential.nonbonded.pme.RealSpaceEnergyRegion
- All Implemented Interfaces:
MaskingInterface
Parallel evaluation of the PME real space energy and gradient.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Modifier and TypeFieldDescriptiondouble[][][]
Dimensions of [nsymm][nAtoms][3]double[][][]
protected int[][]
Polarization groups. -
Constructor Summary
ConstructorDescriptionRealSpaceEnergyRegion
(ForceField.ELEC_FORM elecForm, int nt, ForceField forceField, boolean lambdaTerm, double electric) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyMask
(int i, boolean[] is14, double[]... masks) Interactions with atom i that should not be included in the NeighborList should be set to 0.void
executeWith
(ParallelTeam parallelTeam) Execute the RealSpaceEnergyRegion with the passed ParallelTeam.void
finish()
Perform finalization actions after parallel execution ends.int
getCount
(int i) int
double
double
void
init
(Atom[] atoms, Crystal crystal, ExtendedSystem extendedSystem, boolean esvTerm, double[][][] coordinates, MultipoleType.MultipoleFrameDefinition[] frame, int[][] axisAtom, double[][][] globalMultipole, double[][][] titrationMultipole, double[][][] tautomerMultipole, double[][][] inducedDipole, double[][][] inducedDipoleCR, boolean[] use, int[] molecule, int[][] ip11, int[][] mask12, int[][] mask13, int[][] mask14, int[][] mask15, boolean[] isSoft, double[] ipdamp, double[] thole, RealSpaceNeighborParameters realSpaceNeighborParameters, boolean gradient, boolean lambdaTerm, boolean nnTerm, LambdaMode lambdaMode, Polarization polarization, EwaldParameters ewaldParameters, ScaleParameters scaleParameters, AlchemicalParameters alchemicalParameters, long[] realSpaceEnergyTime, AtomicDoubleArray3D grad, AtomicDoubleArray3D torque, AtomicDoubleArray3D lambdaGrad, AtomicDoubleArray3D lambdaTorque, SharedDouble shareddEdLambda, SharedDouble sharedd2EdLambda2) void
removeMask
(int i, boolean[] is14, double[]... masks) After calling removeMask, all entries in the mask array should be 1 and is14 array false.void
run()
Execute parallel code.void
start()
Perform initialization actions before parallel execution begins.Methods inherited from class edu.rit.pj.ParallelRegion
barrier, barrier, critical, critical, criticalNonexclusive, criticalNonexclusive, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute
Methods inherited from class edu.rit.pj.ParallelConstruct
getThreadCount, getThreadIndex, isExecutingInParallel, region, team
-
Field Details
-
inducedDipole
public double[][][] inducedDipoleDimensions of [nsymm][nAtoms][3] -
inducedDipoleCR
public double[][][] inducedDipoleCR -
ip11
protected int[][] ip11Polarization groups.
-
-
Constructor Details
-
RealSpaceEnergyRegion
public RealSpaceEnergyRegion(ForceField.ELEC_FORM elecForm, int nt, ForceField forceField, boolean lambdaTerm, double electric)
-
-
Method Details
-
applyMask
public void applyMask(int i, boolean[] is14, double[]... masks) Description copied from interface:MaskingInterface
Interactions with atom i that should not be included in the NeighborList should be set to 0.- Specified by:
applyMask
in interfaceMaskingInterface
- Parameters:
i
- The atom whose masking rules should be applied.is14
- True if atom i and the current atom are 1-4 to each other.masks
- One or more masking arrays.
-
executeWith
Execute the RealSpaceEnergyRegion with the passed ParallelTeam.- Parameters:
parallelTeam
- The ParallelTeam instance to execute with.
-
finish
public void finish()Description copied from class:ParallelRegion
Perform finalization actions after parallel execution ends. Only one thread calls thefinish()
method.The
finish()
method may be overridden in a subclass. If not overridden, thefinish()
method does nothing.- Overrides:
finish
in classParallelRegion
-
getCount
public int getCount(int i) -
getInteractions
public int getInteractions() -
getPermanentEnergy
public double getPermanentEnergy() -
getPolarizationEnergy
public double getPolarizationEnergy() -
removeMask
public void removeMask(int i, boolean[] is14, double[]... masks) Description copied from interface:MaskingInterface
After calling removeMask, all entries in the mask array should be 1 and is14 array false.- Specified by:
removeMask
in interfaceMaskingInterface
- Parameters:
i
- The atom whose masking rules should be removed.is14
- True if atom i and the current atom are 1-4 to each other.masks
- One or more masking arrays.
-
run
public void run()Description copied from class:ParallelRegion
Execute parallel code. All threads of the parallel team call therun()
method concurrently.The
run()
method must be implemented in a subclass.- Specified by:
run
in classParallelRegion
-
start
public void start()Description copied from class:ParallelRegion
Perform initialization actions before parallel execution begins. Only one thread calls thestart()
method.The
start()
method may be overridden in a subclass. If not overridden, thestart()
method does nothing.- Overrides:
start
in classParallelRegion
-