# Simulation Class Reference

Simulation provides a simplified API for running simulations with OpenMM and reporting results. More...

List of all members.

## Public Member Functions
def | __init__
| Create a Simulation.
def | minimizeEnergy
| Perform a local energy minimization on the system.
def | step
| Advance the simulation by integrating a specified number of time steps.
## Public Attributes
| topology
| The Topology describing the system being simulated.
| system
| The System being simulated.
| integrator
| The Integrator used to advance the simulation.
| currentStep
| The index of the current time step.
| reporters
| A list of reporters to invoke during the simulation.
| context
| The Context containing the current state of the simulation.

## Detailed Description

Simulation provides a simplified API for running simulations with OpenMM and reporting results.

A Simulation ties together various objects used for running a simulation: a Topology, System, Integrator, and Context. To use it, you provide the Topology, System, and Integrator, and it creates the Context automatically.

Simulation also maintains a list of "reporter" objects that record or analyze data as the simulation runs, such as writing coordinates to files or displaying structures on the screen. For example, the following line will cause a file called "output.pdb" to be created, and a structure written to it every 1000 time steps:

simulation.reporters.append(PDBReporter('output.pdb', 1000))

## Member Function Documentation

def __init__ | ( |  | self,
|  |  | topology,
|  |  | system,
|  |  | integrator,
|  |  | platform = `None`,
|  |  | platformProperties = `None` |
| ) |  |  |

Create a Simulation.

Parameters:

  | topology | (Topology) A Topology describing the the system to simulate
  | system | (System) The OpenMM System object to simulate
  | integrator | (Integrator) The OpenMM Integrator to use for simulating the System
  | platform | (Platform=None) If not None, the OpenMM Platform to use
  | platformProperties | (map=None) If not None, a set of platform-specific properties to pass to the Context's constructor

def minimizeEnergy | ( |  | self,
|  |  | tolerance = `1*unit.kilojoule/unit.mole`,
|  |  | maxIterations = `0` |
| ) |  |  |

Perform a local energy minimization on the system.

Parameters:

  | tolerance | (energy=1*kilojoule/mole) The energy tolerance to which the system should be minimized
  | maxIterations | (int=0) The maximum number of iterations to perform. If this is 0, minimization is continued until the results converge without regard to how many iterations it takes.

def step | ( |  | self,
|  |  | steps |
| ) |  |  |

Advance the simulation by integrating a specified number of time steps.

## Member Data Documentation

context

The Context containing the current state of the simulation.

currentStep

The index of the current time step.

integrator

The Integrator used to advance the simulation.

reporters

A list of reporters to invoke during the simulation.

system

The System being simulated.

topology

The Topology describing the system being simulated.

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

- simulation.py