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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSliceLoop(int nAtoms, int nSymm, SliceRegion sliceRegion) Constructor for SliceLoop. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckList(int[][] zAtListBuild, int buff) checkList.abstract voidgridDensity(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).voidrun(int lb, int ub) Execute one chunk of iterations of this parallel for loop.voidsaveZValues(int[][] zAtListBuild) saveZValues.voidsetNsymm(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- aSliceRegionobject.
-
-
Method Details
-
checkList
public boolean checkList(int[][] zAtListBuild, int buff) checkList.- Parameters:
zAtListBuild- the list of zAtListBuild.buff- the buffer size.- 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 indexesfirstthroughlastinclusive, increasing the loop index by +1 after each iteration.The
run()method must be overridden in a subclass.- Specified by:
runin 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- the zAtListBuild array.
-
setNsymm
public void setNsymm(int nSymm) setNsymm- Parameters:
nSymm- a int.
-