PotentialCalculation, PotentialCalculationMolecularpublic class PotentialCalculationEnergySumBigDecimal extends PotentialCalculationEnergySum
| Modifier and Type | Field | Description |
|---|---|---|
protected java.math.MathContext |
mc |
|
protected int |
precision |
|
protected java.math.BigDecimal |
sum |
debug| Constructor | Description |
|---|---|
PotentialCalculationEnergySumBigDecimal(int precision) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
doCalculation(IAtomList atoms,
IPotentialAtomic potential) |
Adds to the energy sum the energy values obtained from application of the given potential to the
atoms produced by the given iterator.
|
void |
doCalculation(IMoleculeList atoms,
IPotentialMolecular potential) |
Adds to the energy sum the energy values obtained from application of the given potential to the
atoms produced by the given iterator.
|
int |
getPrecision() |
|
double |
getSum() |
Returns the current value of the energy sum.
|
void |
setPrecision(int newPrecision) |
|
void |
zeroSum() |
Sets the energy sum to zero, typically to begin a new energy-sum calculation.
|
protected java.math.BigDecimal sum
protected int precision
protected java.math.MathContext mc
public PotentialCalculationEnergySumBigDecimal(int precision)
public void doCalculation(IAtomList atoms, IPotentialAtomic potential)
doCalculation in interface PotentialCalculationdoCalculation in class PotentialCalculationEnergySumatoms - IAtomSet the atom sets for which the calculation is performed.potential - The potential used to apply the action defined by this class.public void doCalculation(IMoleculeList atoms, IPotentialMolecular potential)
doCalculation in interface PotentialCalculationMoleculardoCalculation in class PotentialCalculationEnergySumatoms - IAtomSet the atom sets for which the calculation is performed.potential - The potential used to apply the action defined by this class.public void zeroSum()
zeroSum in class PotentialCalculationEnergySumpublic double getSum()
getSum in class PotentialCalculationEnergySumpublic int getPrecision()
public void setPrecision(int newPrecision)