|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.potential.PotentialMaster
public class PotentialMaster
Manager of all potentials in simulation. Most calls to compute the energy or other potential calculations begin with the calculate method of this class. It then passes the calculation on to the contained potentials.
| Nested Class Summary | |
|---|---|
static class |
PotentialMaster.AtomIterator0
|
static class |
PotentialMaster.PotentialLinker
|
| Field Summary | |
|---|---|
protected boolean |
enabled
|
protected PotentialMaster.PotentialLinker |
first
|
protected IteratorFactory |
iteratorFactory
|
protected PotentialMaster.PotentialLinker |
last
|
protected PotentialMasterLrc |
lrcMaster
|
| Constructor Summary | |
|---|---|
PotentialMaster()
|
|
PotentialMaster(IteratorFactory iteratorFactory)
|
|
| Method Summary | |
|---|---|
void |
addModel(Model newModel)
Add the given Model's intramolecular potentials to this PotentialMaster |
void |
addPotential(IPotentialAtomic potential,
IAtomType[] atomTypes)
Indicates to the PotentialMaster that the given potential should apply to the specified atom types. |
void |
addPotential(IPotentialMolecular potential,
ISpecies[] species)
Indicates to the PotentialMaster that the given potential should apply to the specified species. |
void |
addPotential(IPotentialMolecular potential,
MoleculesetIteratorPDT iterator,
ISpecies[] types)
|
void |
calculate(IBox box,
IteratorDirective id,
PotentialCalculation pc)
Performs the given PotentialCalculation on the atoms of the given Box. |
PotentialGroup |
getPotential(ISpecies[] types)
Returns the potential that applies to the specified types, or null of no existing potential applies. |
IPotentialMolecular[] |
getPotentials()
Returns an array containing all molecular Potentials. |
ISpecies[] |
getSpecies(IPotentialMolecular potential)
|
boolean |
isEnabled()
|
boolean |
isEnabled(IPotentialAtomic potential)
Returns true if the potential is in this group and has not been disabled via a previous call to setEnabled; returns false otherwise. |
boolean |
isEnabled(IPotentialMolecular potential)
Returns true if the potential is in this group and has not been disabled via a previous call to setEnabled; returns false otherwise. |
PotentialMasterLrc |
lrcMaster()
Returns the object that oversees the long-range correction zero-body potentials. |
PotentialGroup |
makePotentialGroup(int nBody)
Returns an nBody PotentialGroup appropriate for this type of PotentialMaster. |
void |
potentialAddedNotify(IPotentialAtomic subPotential,
PotentialGroup pGroup)
Notifies the PotentialMaster that the sub-potential has been added to the given PotentialGroup, which is associated (but not necessarily held by) this PotentialMaster. |
void |
removePotential(IPotentialAtomic potential)
Removes given potential from the group. |
void |
removePotential(IPotentialMolecular potential)
Removes given potential from the group. |
void |
setEnabled(boolean enabled)
Permits enabling/disabling of all potentials. |
void |
setEnabled(IPotentialAtomic potential,
boolean enabled)
Indicates that the specified potential should not contribute to potential calculations. |
void |
setEnabled(IPotentialMolecular potential,
boolean enabled)
Indicates that the specified potential should not contribute to potential calculations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PotentialMasterLrc lrcMaster
protected IteratorFactory iteratorFactory
protected PotentialMaster.PotentialLinker first
protected PotentialMaster.PotentialLinker last
protected boolean enabled
| Constructor Detail |
|---|
public PotentialMaster()
public PotentialMaster(IteratorFactory iteratorFactory)
| Method Detail |
|---|
public PotentialMasterLrc lrcMaster()
IPotentialMaster
lrcMaster in interface IPotentialMasterpublic PotentialGroup makePotentialGroup(int nBody)
IPotentialMaster
makePotentialGroup in interface IPotentialMaster
public void calculate(IBox box,
IteratorDirective id,
PotentialCalculation pc)
IPotentialMaster
calculate in interface IPotentialMasterpublic void addModel(Model newModel)
IPotentialMaster
addModel in interface IPotentialMaster
public void addPotential(IPotentialMolecular potential,
ISpecies[] species)
IPotentialMaster
addPotential in interface IPotentialMaster
public void addPotential(IPotentialAtomic potential,
IAtomType[] atomTypes)
IPotentialMasterThe order of the elements in the atomTypes array is not relevant, and is subject to rearrangement by the method -- the array is sorted (using the compareTo method of AtomType) before doing anything else.
addPotential in interface IPotentialMaster
public void potentialAddedNotify(IPotentialAtomic subPotential,
PotentialGroup pGroup)
IPotentialMaster
potentialAddedNotify in interface IPotentialMasterpublic PotentialGroup getPotential(ISpecies[] types)
IPotentialMaster
getPotential in interface IPotentialMasterpublic ISpecies[] getSpecies(IPotentialMolecular potential)
public void addPotential(IPotentialMolecular potential,
MoleculesetIteratorPDT iterator,
ISpecies[] types)
public void removePotential(IPotentialMolecular potential)
IPotentialMaster
removePotential in interface IPotentialMasterpublic void removePotential(IPotentialAtomic potential)
IPotentialMaster
removePotential in interface IPotentialMasterpublic boolean isEnabled()
isEnabled in interface IPotentialMasterpublic void setEnabled(boolean enabled)
IPotentialMaster
setEnabled in interface IPotentialMasterenabled - flags if potentials are enabled.
public void setEnabled(IPotentialMolecular potential,
boolean enabled)
IPotentialMaster
setEnabled in interface IPotentialMaster
public void setEnabled(IPotentialAtomic potential,
boolean enabled)
IPotentialMaster
setEnabled in interface IPotentialMasterpublic boolean isEnabled(IPotentialAtomic potential)
IPotentialMaster
isEnabled in interface IPotentialMasterpublic boolean isEnabled(IPotentialMolecular potential)
IPotentialMaster
isEnabled in interface IPotentialMasterpublic IPotentialMolecular[] getPotentials()
IPotentialMaster
getPotentials in interface IPotentialMaster
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||