IPotential
, IPotentialAtomic
, PotentialSoft
public class EwaldSummation extends java.lang.Object implements PotentialSoft
Modifier and Type | Class | Description |
---|---|---|
static class |
EwaldSummation.MyCharge |
|
class |
EwaldSummation.P2EwaldReal |
Modifier and Type | Field | Description |
---|---|---|
protected double |
alpha |
|
protected double |
alpha2 |
|
protected double |
alpha3 |
|
protected AtomLeafAgentManager<EwaldSummation.MyCharge> |
atomAgentManager |
|
protected double[] |
basis |
|
protected Box |
box |
|
protected double[] |
boxSize |
|
protected double[] |
coskrj |
|
protected boolean |
doRealSum |
|
protected Vector |
drTmp |
|
protected Vector[] |
gradient |
|
protected Tensor |
identity |
|
protected double |
kCut |
|
protected Vector |
kVector |
|
protected Vector |
Lxyz |
|
protected IMoleculeList |
moleculeList |
|
protected int[] |
nKs |
|
protected int[] |
nRealShells |
|
protected Vector |
rAB |
|
protected double |
rCutRealES |
|
protected double |
rCutSquared |
|
protected Tensor |
secondDerivative |
|
protected double[] |
sinkrj |
|
protected Space |
space |
|
protected double |
sqrtPI |
|
protected Tensor |
tempTensorkk |
|
protected double |
volume |
Constructor | Description |
---|---|
EwaldSummation(Box box,
AtomLeafAgentManager<EwaldSummation.MyCharge> atomAgentManager,
Space _space,
double kCut,
double rCutRealES) |
Modifier and Type | Method | Description |
---|---|---|
static void |
computeScaledSysParams(double sigma_Er_sim,
double alpha0,
double volume,
double Q2) |
|
double |
energy(IAtomList atoms) |
Returns the interaction energy between the given atoms.
|
double |
getRange() |
Returns the range over which the potential applies.
|
double |
getRCut() |
Returns real-space cutoff
|
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.
|
EwaldSummation.P2EwaldReal |
makeP2EwaldReal() |
|
int |
nBody() |
The number of atoms on which the potential depends.
|
Tensor |
secondDerivative(IAtom atom0,
IAtom atom1) |
|
void |
setAlpha(double alpha) |
|
void |
setBox(Box box) |
Informs the potential of the box on which it acts so that it can
properly consider the boundaries.
|
void |
setRCut(double newRCutRealES) |
Sets a new value of rCutRealES
This will not alter values of alpha or nRealShells!
|
double |
uBondCorr() |
|
double |
uFourier() |
|
double |
uReal() |
|
double |
uSelf() |
|
double |
virial(IAtomList atoms) |
protected final Space space
protected final AtomLeafAgentManager<EwaldSummation.MyCharge> atomAgentManager
protected final Box box
protected double alpha
protected double alpha2
protected double alpha3
protected final double[] boxSize
protected final double[] basis
protected final double volume
protected final int[] nKs
protected final int[] nRealShells
protected final IMoleculeList moleculeList
protected Vector[] gradient
protected double[] sinkrj
protected double[] coskrj
protected final Tensor secondDerivative
protected final Tensor tempTensorkk
protected final Vector rAB
protected final Vector Lxyz
protected final Vector drTmp
protected final Tensor identity
protected final Vector kVector
protected double rCutRealES
protected double rCutSquared
protected double kCut
protected final double sqrtPI
protected boolean doRealSum
public EwaldSummation(Box box, AtomLeafAgentManager<EwaldSummation.MyCharge> atomAgentManager, Space _space, double kCut, double rCutRealES)
public void setRCut(double newRCutRealES)
public double getRCut()
public double uReal()
public double uFourier()
public double uSelf()
public double uBondCorr()
public void setAlpha(double alpha)
public double getRange()
IPotential
getRange
in interface IPotential
public int nBody()
IPotential
nBody
in interface IPotential
public void setBox(Box box)
IPotential
setBox
in interface IPotential
public double energy(IAtomList atoms)
IPotentialAtomic
energy
in interface IPotentialAtomic
public double virial(IAtomList atoms)
virial
in interface PotentialSoft
public Vector[] gradient(IAtomList atoms)
PotentialSoft
gradient
in interface PotentialSoft
public Vector[] gradient(IAtomList atoms, Tensor pressureTensor)
PotentialSoft
gradient
in interface PotentialSoft
public EwaldSummation.P2EwaldReal makeP2EwaldReal()
public static void computeScaledSysParams(double sigma_Er_sim, double alpha0, double volume, double Q2)