Package src :: Package toplevel :: Module Propagator :: Class Propagator
[hide private]
[frames] | no frames]

Class Propagator

source code

Provides functionality to propagate a system with time.

Instance Methods [hide private]
 
__init__(self, phys, forces, io) source code
 
reset(self)
Reset the state of the Propagator object.
source code
boolean
isMDL(self, integ)
Determine whether or not a propagator has been coded in MDL.
source code
 
addPreInitModifier(self, integ, modifier)
Add a modifier to execute before propagator initialization.
source code
 
addPostInitModifier(self, integ, modifier)
Add a modifier to execute after propagator initialization.
source code
 
addPreRunModifier(self, integ, modifier)
Add a modifier to execute before propagator execution.
source code
 
addPostRunModifier(self, integ, modifier)
Add a modifier to execute after propagator execution.
source code
 
addPreForceModifier(self, integ, modifier)
Add a modifier to execute before force calculation.
source code
 
addPostForceModifier(self, integ, modifier)
Add a modifier to execute after force calculation.
source code
 
runModifiers(self, modifiers, phys, forces, prop, integ)
Run modifiers of a propagator
source code
float
timestep(self, integ)
Return the timestep of a propagator, scaled accordingly
source code
 
calculateForces(self, forces)
Calculate forces and update the atomic force vector.
source code
 
initNext(self, phys, forces)
For multiple timestepping, initialize the next propagator in the chain.
source code
 
runNext(self, phys, forces, cL)
For multiple timestepping, execute the next propagator in the chain.
source code
 
finishNext(self, phys, forces, prop)
For multiple timestepping, finish the next propagator in the chain.
source code
 
deepCopyForce(self, ff) source code
 
propagate(self, scheme="Leapfrog", steps=0, cyclelength=-1, dt=0.1, forcefield=[], params={})
Propagate the system.
source code
Instance Variables [hide private]
  myPropagator
Propagator object
  myStep
Current simulation step
  myTimestep
Propagator timestep
  myLevel
Number of levels
  phys
Physical object
  forces
Forces object
  io
IO object
Method Details [hide private]

isMDL(self, integ)

source code 

Determine whether or not a propagator has been coded in MDL.

Parameters:
  • integ (STS/MTS) - MDL propagator object (STS or MTS)
Returns: boolean
True if the passed propagator is prototyped in pure Python.

addPreInitModifier(self, integ, modifier)

source code 

Add a modifier to execute before propagator initialization.

Parameters:
  • integ (STS/MTS) - MDL propagator object (STS or MTS)
  • modifier (function) - Routine which alters propagator behavior.

addPostInitModifier(self, integ, modifier)

source code 

Add a modifier to execute after propagator initialization.

Parameters:
  • integ (STS/MTS) - MDL propagator object (STS or MTS)
  • modifier (function) - Routine which alters propagator behavior.

addPreRunModifier(self, integ, modifier)

source code 

Add a modifier to execute before propagator execution.

Parameters:
  • integ (STS/MTS) - MDL propagator object (STS or MTS)
  • modifier (function) - Routine which alters propagator behavior.

addPostRunModifier(self, integ, modifier)

source code 

Add a modifier to execute after propagator execution.

Parameters:
  • integ (STS/MTS) - MDL propagator object (STS or MTS)
  • modifier (function) - Routine which alters propagator behavior.

addPreForceModifier(self, integ, modifier)

source code 

Add a modifier to execute before force calculation.

Parameters:
  • integ (STS/MTS) - MDL propagator object (STS or MTS)
  • modifier (function) - Routine which alters propagator behavior.

addPostForceModifier(self, integ, modifier)

source code 

Add a modifier to execute after force calculation.

Parameters:
  • integ (STS/MTS) - MDL propagator object (STS or MTS)
  • modifier (function) - Routine which alters propagator behavior.

runModifiers(self, modifiers, phys, forces, prop, integ)

source code 

Run modifiers of a propagator

Parameters:
  • modifiers (list of functions) - A set of routines which alternates propagator behavior
  • phys (Physical) - MDL Physical object
  • forces (Forces) - MDL Forces object
  • prop (Propagator) - MDL Propagator object
  • integ (object) - MDL propagator object (STS or MTS)

timestep(self, integ)

source code 

Return the timestep of a propagator, scaled accordingly

Parameters:
  • integ (object) - MDL propagator object (STS or MTS)
Returns: float
The timestep (dt) of a propagator

calculateForces(self, forces)

source code 

Calculate forces and update the atomic force vector.

Parameters:
  • forces (Forces) - MDL Forces object

initNext(self, phys, forces)

source code 

For multiple timestepping, initialize the next propagator in the chain.

Parameters:
  • phys (Physical) - MDL Physical object
  • forces (Forces) - MDL Forces object

runNext(self, phys, forces, cL)

source code 

For multiple timestepping, execute the next propagator in the chain.

Parameters:
  • phys (Physical) - MDL Physical object
  • forces (Forces) - MDL Forces object
  • cL (int) - Cycle length (number of times to execute the inner propagator)

finishNext(self, phys, forces, prop)

source code 

For multiple timestepping, finish the next propagator in the chain.

Parameters:
  • phys (Physical) - MDL Physical object
  • forces (Forces) - MDL Forces object
  • prop (Propagator) - MDL Propagator object

propagate(self, scheme="Leapfrog", steps=0, cyclelength=-1, dt=0.1, forcefield=[], params={})

source code 

Propagate the system.

Parameters:
  • scheme (string) - Name of the propagator to use.
  • steps (int) - Number of steps for execution.
  • cyclelength (int) - Cyclelength for MTS propagation (-1 is STS).
  • dt (float) - Timestep.
  • forcefield (ForceField) - MDL ForceField object.
  • params (dictionary) - Extra parameters unique for this propagation scheme. (This could be empty).