IPotential
, IPotentialAtomic
public class P1ConstraintNbr extends java.lang.Object implements IPotentialAtomic
Modifier and Type | Field | Description |
---|---|---|
protected Boundary |
boundary |
|
protected int |
boxIndex |
|
protected double |
constraint |
|
protected Vector |
drj |
|
protected Vector |
drk |
|
protected IAtomList |
leafList |
|
protected int[][] |
neighborAtoms |
|
protected double |
neighborRadiusSq |
Constructor | Description |
---|---|
P1ConstraintNbr(Space space,
double neighborDistance) |
|
P1ConstraintNbr(Space space,
double neighborDistance,
double constraint) |
Modifier and Type | Method | Description |
---|---|---|
double |
energy(IAtomList atoms) |
Returns sum of energy for all triplets containing the given atom
|
double |
energyi(IAtom atom) |
Returns the energy for atom i due to requirements for i and its
neighbors (but not for i as a neighbor)
|
protected double |
energyij(IAtom atomi,
IAtom atomj) |
Return the energy for i due to requirement that it be between j and the
atom opposite from j.
|
protected int |
findOppositeAtomIndex(IAtom atomi,
IAtomList list) |
find atom in list that is opposite atomi from atomj (as defined by drj)
|
int[][] |
getNbrAtoms(Box box) |
|
double |
getRange() |
Returns the range over which the potential applies.
|
void |
initBox(Box box) |
Assigns & keeps track of a set of neighbors for each box
|
int |
nBody() |
The number of atoms on which the potential depends.
|
void |
setBox(Box box) |
Informs the potential of the box on which it acts so that it can
properly consider the boundaries.
|
protected final Vector drj
protected final Vector drk
protected int[][] neighborAtoms
protected double neighborRadiusSq
protected Boundary boundary
protected IAtomList leafList
protected int boxIndex
protected double constraint
public P1ConstraintNbr(Space space, double neighborDistance)
public P1ConstraintNbr(Space space, double neighborDistance, double constraint)
public void initBox(Box box)
box
- public int[][] getNbrAtoms(Box box)
public int nBody()
IPotential
nBody
in interface IPotential
public double getRange()
IPotential
getRange
in interface IPotential
public void setBox(Box box)
IPotential
setBox
in interface IPotential
protected int findOppositeAtomIndex(IAtom atomi, IAtomList list)
public double energy(IAtomList atoms)
energy
in interface IPotentialAtomic
public double energyi(IAtom atom)