etomica.integrator
Class Integrator

java.lang.Object
  extended by etomica.integrator.Integrator
All Implemented Interfaces:
IIntegrator, Serializable
Direct Known Subclasses:
IntegratorBox, IntegratorManagerMC

public abstract class Integrator
extends Object
implements Serializable, IIntegrator

Integrator implements the algorithm used to move the atoms around and generate new configurations in one or more boxs. All integrator techniques, such as molecular dynamics or Monte Carlo, are implemented via subclasses of this Integrator class. The Integrator's activities are managed via the actions of the governing Controller.

See Also:
Serialized Form

Nested Class Summary
static interface Integrator.Forcible
          Integrator agent that holds a force vector.
static interface Integrator.Torquable
          Integrator agent that holds a torque vector.
 
Field Summary
protected  IntegratorEventManager eventManager
           
protected  boolean initialized
           
protected  int interval
           
protected  long stepCount
           
 
Constructor Summary
Integrator()
           
 
Method Summary
 void doStep()
          Performs the elementary integration step, such as a molecular dynamics time step, or a Monte Carlo trial.
protected abstract  void doStepInternal()
          Performs the elementary integration step, such as a molecular dynamics time step, or a Monte Carlo trial.
 int getEventInterval()
           
 IIntegratorEventManager getEventManager()
           
 long getStepCount()
          Returns the number of steps performed by the integrator since it was initialized.
 void reset()
          Defines the actions taken by the integrator to reset itself, such as required if a perturbation is applied to the simulated box (e.g., addition or deletion of a molecule).
 void resetStepCount()
          This method resets the step counter.
 void setEventInterval(int interval)
          Sets value of interval between successive firing of integrator interval events.
protected  void setup()
          Perform initialization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initialized

protected boolean initialized

interval

protected int interval

stepCount

protected long stepCount

eventManager

protected IntegratorEventManager eventManager
Constructor Detail

Integrator

public Integrator()
Method Detail

getEventInterval

public int getEventInterval()
Returns:
value of interval (number of doStep calls) between firing of interval events by integrator.

setEventInterval

public void setEventInterval(int interval)
Sets value of interval between successive firing of integrator interval events.

Parameters:
interval -

doStep

public final void doStep()
Description copied from interface: IIntegrator
Performs the elementary integration step, such as a molecular dynamics time step, or a Monte Carlo trial.

Specified by:
doStep in interface IIntegrator

doStepInternal

protected abstract void doStepInternal()
Performs the elementary integration step, such as a molecular dynamics time step, or a Monte Carlo trial.


getStepCount

public long getStepCount()
Returns the number of steps performed by the integrator since it was initialized.

Specified by:
getStepCount in interface IIntegrator

reset

public void reset()
Defines the actions taken by the integrator to reset itself, such as required if a perturbation is applied to the simulated box (e.g., addition or deletion of a molecule). Also invoked when the integrator is started or initialized.

Specified by:
reset in interface IIntegrator

resetStepCount

public void resetStepCount()
Description copied from interface: IIntegrator
This method resets the step counter.

Specified by:
resetStepCount in interface IIntegrator

getEventManager

public IIntegratorEventManager getEventManager()
Specified by:
getEventManager in interface IIntegrator

setup

protected void setup()
Perform initialization. Subclasses can override this method to set up before integration begins.