Package ffx.potential.nonbonded
Class SliceLoop
java.lang.Object
edu.rit.pj.ParallelConstruct
edu.rit.pj.ParallelForLoop
edu.rit.pj.IntegerForLoop
ffx.potential.nonbonded.SliceLoop
The SliceLoop class is used to parallelize placing onto a 3D grid
1) Multipoles using B-splines or
2) Diffraction form factors.
Each "slice" of the grid (i.e. a fixed value of the z-coordinate) is operated on by only a single thread to logically enforce atomic updates of grid magnitudes.
- Author:
- Armin Avdic
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSliceLoop
(int nAtoms, int nSymm, SliceRegion sliceRegion) Constructor for SliceLoop. -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkList
(int[][] zAtListBuild, int buff) checkList.abstract void
gridDensity
(int iSymm, int iAtom, int lb, int ub) Apply electron density "as normal" for an atom, but check that the z index is within the supplied bounds (inclusive).void
run
(int lb, int ub) Execute one chunk of iterations of this parallel for loop.void
saveZValues
(int[][] zAtListBuild) saveZValues.void
setNsymm
(int nSymm) setNsymmMethods inherited from class edu.rit.pj.ParallelConstruct
getThreadCount, getThreadIndex, isExecutingInParallel, region, team
-
Field Details
-
rebuildList
protected boolean rebuildList -
buildListA
-
buildListS
-
sliceRegion
-
-
Constructor Details
-
SliceLoop
Constructor for SliceLoop.- Parameters:
nAtoms
- a int.nSymm
- a int.sliceRegion
- aSliceRegion
object.
-
-
Method Details
-
checkList
public boolean checkList(int[][] zAtListBuild, int buff) checkList.- Parameters:
zAtListBuild
- an array ofinvalid reference
int
buff
- a int.- Returns:
- a boolean.
-
gridDensity
public abstract void gridDensity(int iSymm, int iAtom, int lb, int ub) Apply electron density "as normal" for an atom, but check that the z index is within the supplied bounds (inclusive).- Parameters:
iSymm
- the SymOp to apply.iAtom
- the index of the Atom to put onto the grid.lb
- the lower bound along the z-axis.ub
- the upper bound along the z-axis.
-
run
Execute one chunk of iterations of this parallel for loop. Therun()
method must perform the loop body for indexesfirst
throughlast
inclusive, increasing the loop index by +1 after each iteration.The
run()
method must be overridden in a subclass.- Specified by:
run
in classIntegerForLoop
- Parameters:
lb
- First loop index.ub
- Last loop index.- Throws:
Exception
- Therun()
method may throw any exception.Exception
- if any.
-
saveZValues
public void saveZValues(int[][] zAtListBuild) saveZValues.- Parameters:
zAtListBuild
- an array ofinvalid reference
int
-
setNsymm
public void setNsymm(int nSymm) setNsymm- Parameters:
nSymm
- a int.
-