StateDataReporter Class Reference

StateDataReporter outputs information about a simulation, such as energy and temperature, to a file. More...

List of all members.

Public Member Functions

def __init__
 Create a StateDataReporter.
def describeNextReport
 Get information about the next report this object will generate.
def report
 Generate a report.
def __del__

Detailed Description

StateDataReporter outputs information about a simulation, such as energy and temperature, to a file.

To use it, create a StateDataReporter, then add it to the Simulation's list of reporters. The set of data to write is configurable using boolean flags passed to the constructor. By default the data is written in comma-separated-value (CSV) format, but you can specify a different separator to use.


Member Function Documentation

def __del__ (   self  ) 
def __init__ (   self,
  file,
  reportInterval,
  step = False,
  time = False,
  potentialEnergy = False,
  kineticEnergy = False,
  totalEnergy = False,
  temperature = False,
  volume = False,
  density = False,
  separator = ' 
)

Create a StateDataReporter.

Parameters:
file (string or file) The file to write to, specified as a file name or file object
reportInterval (int) The interval (in time steps) at which to write frames
step (boolean=False) Whether to write the current step index to the file
time (boolean=False) Whether to write the current time to the file
potentialEnergy (boolean=False) Whether to write the potential energy to the file
kineticEnergy (boolean=False) Whether to write the kinetic energy to the file
totalEnergy (boolean=False) Whether to write the total energy to the file
temperature (boolean=False) Whether to write the instantaneous temperature to the file
volume (boolean=False) Whether to write the periodic box volume to the file
density (boolean=False) Whether to write the system density to the file
separator (string=',') The separator to use between columns in the file
def describeNextReport (   self,
  simulation 
)

Get information about the next report this object will generate.

Parameters:
simulation (Simulation) The Simulation to generate a report for
Returns:
A five element tuple. The first element is the number of steps until the next report. The remaining elements specify whether that report will require positions, velocities, forces, and energies respectively.
def report (   self,
  simulation,
  state 
)

Generate a report.

Parameters:
simulation (Simulation) The Simulation to generate a report for
state (State) The current state of the simulation

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2