IPotential
, IPotentialAtomic
, PotentialSoft
public class P1ImageHarmonic extends Potential1 implements PotentialSoft
Potential1.Intramolecular
Modifier and Type | Field | Description |
---|---|---|
protected IAtomList |
allAtoms |
|
protected Boundary |
boundary |
|
protected boolean |
do21 |
|
protected Vector |
dr |
|
protected Vector[] |
gradient |
|
protected Vector |
offset |
|
protected int[] |
partners |
|
protected double |
w |
|
protected boolean |
zeroF |
Constructor | Description |
---|---|
P1ImageHarmonic(Space space,
Vector offset,
double w,
boolean do21) |
Modifier and Type | Method | Description |
---|---|---|
double |
energy(IAtomList atoms) |
Returns the interaction energy between the given atoms.
|
void |
findNOffset(Box box) |
|
double |
getDUDW(IAtomList atoms) |
|
Vector |
getOffset() |
|
int |
getPartner(int idx0) |
|
double |
getRange() |
Returns zero.
|
double |
getW() |
|
Vector[] |
gradient(IAtomList atoms) |
Returns the gradient of the potential as it applies to each atom in the
given AtomSet, indicating how the energy would change as the position of
the first atom is varied.
|
Vector[] |
gradient(IAtomList atoms,
Tensor pressureTensor) |
Returns the same gradient as gradient(AtomSet) and also adds in the
contribution of the AtomSet to the pressureTensor.
|
void |
setBox(Box box) |
Informs the potential of the box on which it acts.
|
void |
setPartner(int idx0,
int idx1) |
|
void |
setW(double newW) |
|
void |
setZeroForce(boolean doZeroForce) |
|
double |
virial(IAtomList atoms) |
nBody
protected final Vector offset
protected final Vector dr
protected final Vector[] gradient
protected double w
protected Boundary boundary
protected IAtomList allAtoms
protected boolean zeroF
protected boolean do21
protected int[] partners
public void findNOffset(Box box)
public int getPartner(int idx0)
public void setPartner(int idx0, int idx1)
public Vector getOffset()
public double getW()
public void setW(double newW)
public double getDUDW(IAtomList atoms)
public double getRange()
Potential1
getRange
in interface IPotential
getRange
in class Potential1
public void setBox(Box box)
Potential
setBox
in interface IPotential
setBox
in class Potential1
public double energy(IAtomList atoms)
Potential
energy
in interface IPotentialAtomic
energy
in class Potential
public double virial(IAtomList atoms)
virial
in interface PotentialSoft
public void setZeroForce(boolean doZeroForce)
public Vector[] gradient(IAtomList atoms)
PotentialSoft
gradient
in interface PotentialSoft
public Vector[] gradient(IAtomList atoms, Tensor pressureTensor)
PotentialSoft
gradient
in interface PotentialSoft