IPotential, IPotentialAtomic, PotentialSoftpublic 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) |
nBodyprotected 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()
Potential1getRange in interface IPotentialgetRange in class Potential1public void setBox(Box box)
PotentialsetBox in interface IPotentialsetBox in class Potential1public double energy(IAtomList atoms)
Potentialenergy in interface IPotentialAtomicenergy in class Potentialpublic double virial(IAtomList atoms)
virial in interface PotentialSoftpublic void setZeroForce(boolean doZeroForce)
public Vector[] gradient(IAtomList atoms)
PotentialSoftgradient in interface PotentialSoftpublic Vector[] gradient(IAtomList atoms, Tensor pressureTensor)
PotentialSoftgradient in interface PotentialSoft