Package ffx.potential.nonbonded
Class SpatialDensityRegion
java.lang.Object
edu.rit.pj.ParallelConstruct
edu.rit.pj.ParallelRegion
ffx.potential.nonbonded.SpatialDensityRegion
- Direct Known Subclasses:
BulkSolventDensityRegion
This class implements a spatial decomposition based on partitioning a grid into octants.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
-
Field Summary
Modifier and TypeFieldDescriptionint[]
protected int
Number of octant work cells with at least one atom (actualWork is less than or equal to nWork).protected double[][][]
protected Crystal
protected static final Logger
Constantlogger
protected int
The number of divisions along the A-axis.int
protected int
The number of divisions along the B-axis.protected int
The number of divisions along the C-Axis.protected final int
final int
protected boolean[][]
protected SpatialDensityLoop[]
-
Constructor Summary
ConstructorDescriptionSpatialDensityRegion
(int gX, int gY, int gZ, double[] grid, int basisSize, int nSymm, int minWork, int threadCount, Crystal crystal, Atom[] atoms, double[][][] coordinates) Constructor for SpatialDensityRegion. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Assign asymmetric and symmetry mate atoms to cells.double[]
getGrid()
Getter for the fieldgrid
.int
getNsymm()
getNsymmint
index
(int ia, int ib, int ic) indexvoid
run()
Execute parallel code.void
Select atoms that should be assigned to cells.void
setAtoms.final void
setCrystal
(Crystal crystal, int gX, int gY, int gZ) Setter for the fieldcrystal
.void
setDensityLoop
(SpatialDensityLoop[] loops) setDensityLoopvoid
setInitValue
(double initValue) Setter for the fieldinitValue
.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, finish, start
Methods inherited from class edu.rit.pj.ParallelConstruct
getThreadCount, getThreadIndex, isExecutingInParallel, region, team
-
Field Details
-
logger
Constantlogger
-
nThreads
public final int nThreads -
nSymm
protected final int nSymm -
actualCount
public int[] actualCount -
nAtoms
public int nAtoms -
nA
protected int nAThe number of divisions along the A-axis. -
nB
protected int nBThe number of divisions along the B-axis. -
nC
protected int nCThe number of divisions along the C-Axis. -
actualWork
protected int actualWorkNumber of octant work cells with at least one atom (actualWork is less than or equal to nWork). -
coordinates
protected double[][][] coordinates -
select
protected boolean[][] select -
crystal
-
spatialDensityLoop
-
-
Constructor Details
-
Method Details
-
assignAtomsToCells
public void assignAtomsToCells()Assign asymmetric and symmetry mate atoms to cells. This is very fast; there is little to be gained from parallelization at this point. -
getGrid
public double[] getGrid()Getter for the fieldgrid
.- Returns:
- an array of double.
-
getNsymm
public int getNsymm()getNsymm- Returns:
- a int.
-
index
public int index(int ia, int ib, int ic) index- Parameters:
ia
- a int.ib
- a int.ic
- a int.- Returns:
- a int.
-
run
public void run()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
-
selectAtoms
public void selectAtoms()Select atoms that should be assigned to cells. The default is to include all atoms, which is set up in the constructor. This function should be over-ridden by subclasses that want finer control. -
setAtoms
setAtoms.- Parameters:
atoms
- an array ofAtom
objects.
-
setCrystal
Setter for the fieldcrystal
.- Parameters:
crystal
- aCrystal
object.gX
- a int.gY
- a int.gZ
- a int.
-
setDensityLoop
setDensityLoop- Parameters:
loops
- an array ofSpatialDensityLoop
objects.
-
setInitValue
public void setInitValue(double initValue) Setter for the fieldinitValue
.- Parameters:
initValue
- a double.
-