IPotential
, IPotentialMolecular
, IPotentialMolecularSecondDerivative
, IPotentialMolecularTorque
, PotentialMolecularSoft
public class P2ReactionFieldDipole extends PotentialMolecular implements PotentialMolecularSoft, IPotentialMolecularSecondDerivative
In conjunction with this two-body potential, a zero-body potential must also be added to the PotentialMaster. The zero-body potential is provided by the method makeP0.
Modifier and Type | Field | Description |
---|---|---|
protected Vector3D[] |
a |
|
protected Boundary |
boundary |
|
protected Vector |
cavityDipole |
|
protected double |
cutoff |
|
protected double |
cutoff2 |
|
protected DipoleSource |
dipoleSource |
|
protected Vector |
dr |
|
protected double |
epsilon |
|
protected double |
fac |
|
protected Vector[][] |
gradientAndTorque |
|
protected Vector |
iDipole |
|
protected IMoleculePositionDefinition |
positionDefinition |
|
protected Tensor[] |
secondDerivative |
nBody, space
Constructor | Description |
---|---|
P2ReactionFieldDipole(Space space,
IMoleculePositionDefinition positionDefinition) |
Modifier and Type | Method | Description |
---|---|---|
double |
energy(IMoleculeList molecules) |
Returns the interaction energy between the given molecules.
|
double |
getDielectric() |
|
DipoleSource |
getDipoleSource() |
The DipoleSource returns the dipole vector of a given molecule.
|
double |
getRange() |
The radius of the sphere within which molecules contribute to the reaction
field of a given molecule.
|
Vector[] |
gradient(IMoleculeList molecules) |
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(IMoleculeList molecules,
Tensor pressureTensor) |
Returns the same gradient as gradient(IMoleculeList) and also adds in
the contribution of the molecules to the pressureTensor.
|
Vector[][] |
gradientAndTorque(IMoleculeList molecules) |
|
IPotentialMolecular |
makeP0() |
|
Tensor[] |
secondDerivative(IMoleculeList molecules) |
|
void |
setBox(Box box) |
Informs the potential of the box on which it acts.
|
void |
setDielectric(double newDielectric) |
|
void |
setDipoleSource(DipoleSource newDipoleSource) |
|
void |
setRange(double newRange) |
|
double |
virial(IMoleculeList molecules) |
nBody
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
nBody
protected final IMoleculePositionDefinition positionDefinition
protected final Vector iDipole
protected final Vector cavityDipole
protected final Vector dr
protected final Vector[][] gradientAndTorque
protected final Tensor[] secondDerivative
protected final Vector3D[] a
protected DipoleSource dipoleSource
protected Boundary boundary
protected double cutoff2
protected double cutoff
protected double epsilon
protected double fac
public P2ReactionFieldDipole(Space space, IMoleculePositionDefinition positionDefinition)
space
- defines the dimensionality of the simulationpositionDefinition
- defines the location of a moleculepublic DipoleSource getDipoleSource()
public void setDipoleSource(DipoleSource newDipoleSource)
newDipoleSource
- the DipoleSource to setpublic double getRange()
getRange
in interface IPotential
getRange
in class PotentialMolecular
public void setRange(double newRange)
newRange
- the new cutoff radius of the reactionField.public double getDielectric()
public void setDielectric(double newDielectric)
newDielectric
- the new value of the dielectric constant of
the medium surrounding the cavity.public void setBox(Box box)
PotentialMolecular
setBox
in interface IPotential
setBox
in class PotentialMolecular
public double energy(IMoleculeList molecules)
PotentialMolecular
energy
in interface IPotentialMolecular
energy
in class PotentialMolecular
public Vector[][] gradientAndTorque(IMoleculeList molecules)
gradientAndTorque
in interface IPotentialMolecularTorque
public Tensor[] secondDerivative(IMoleculeList molecules)
secondDerivative
in interface IPotentialMolecularSecondDerivative
public Vector[] gradient(IMoleculeList molecules)
PotentialMolecularSoft
gradient
in interface PotentialMolecularSoft
public Vector[] gradient(IMoleculeList molecules, Tensor pressureTensor)
PotentialMolecularSoft
gradient
in interface PotentialMolecularSoft
public double virial(IMoleculeList molecules)
virial
in interface PotentialMolecularSoft
public IPotentialMolecular makeP0()