Package ffx.potential.nonbonded
Class RowLoop
java.lang.Object
edu.rit.pj.ParallelConstruct
edu.rit.pj.ParallelForLoop
edu.rit.pj.IntegerForLoop
ffx.potential.nonbonded.RowLoop
The RowLoop class is used to parallelize placing onto a 3D grid
1) Multipoles using B-splines or
2) Diffraction form factors.
Each "row" of the grid (i.e. fixed values of the z and y-coordinates) is operated on by only a single thread to logically enforce atomic updates of grid magnitudes.
- Author:
- Armin Avdic
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkList
(int[][][] zAtListBuild, int buff) Check if the list is valid for the given zAtListBuild and buff.abstract void
gridDensity
(int iSymm, int iAtom, int lb, int ub) Apply electron density "as normal" for an atom, but check that the y and z indeces are within the supplied bounds (inclusive).void
run
(int lb, int ub) Execute one chunk of iterations of this parallel for loop.void
saveZYValues
(int[][][] zAtListBuild) saveZYValues.void
setNsymm
(int nSymm) setNsymmMethods inherited from class edu.rit.pj.ParallelConstruct
getThreadCount, getThreadIndex, isExecutingInParallel, region, team
-
Field Details
-
buildListA
-
buildListS
-
rowRegion
-
rebuildList
protected boolean rebuildList
-
-
Constructor Details
-
RowLoop
Constructor for RowLoop.- Parameters:
nAtoms
- a int.nSymm
- a int.rowRegion
- aRowRegion
object.
-
-
Method Details
-
checkList
public boolean checkList(int[][][] zAtListBuild, int buff) Check if the list is valid for the given zAtListBuild and buff.- Parameters:
zAtListBuild
- the list of zAtListBuild.buff
- the buffer size.- Returns:
- true if the list is valid, false otherwise.
-
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 y and z indeces are 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 for the y and z-axes.ub
- the upper bound for the y and z-axes.
-
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.
-
saveZYValues
public void saveZYValues(int[][][] zAtListBuild) saveZYValues.- Parameters:
zAtListBuild
- the list of zAtListBuild.
-
setNsymm
public void setNsymm(int nSymm) setNsymm- Parameters:
nSymm
- a int.
-