HDF5Reporter stores a molecular dynamics trajectory in the HDF5 format.
This object supports saving all kinds of information from the simulation – more than any other trajectory format. In addition to all of the options, the topology of the system will also (of course) be stored in the file. All of the information is compressed, so the size of the file is not much different than DCD, despite the added flexibility.
Parameters: | file : str, or HDF5TrajectoryFile
reportInterval : int
coordinates : bool
time : bool
cell : bool
potentialEnergy : bool
kineticEnergy : bool
temperature : bool
velocities : bool
atomSubset : array_like, default=None
|
---|
Notes
If you use the atomSubset option to write only a subset of the atoms to disk, the kineticEnergy, potentialEnergy, and temperature fields will not change. They will still refer to the energy and temperature of the whole system, and are not “subsetted” to only include the energy of your subsystem.
Examples
>>> simulation = Simulation(topology, system, integrator)
>>> h5_reporter = HDF5Reporter('traj.h5', 100)
>>> simulation.reporters.append(h5_reporter)
>>> simulation.step(10000)
>>> traj = mdtraj.trajectory.load('traj.lh5')
Create a HDF5Reporter.
Methods
__init__(file, reportInterval[, ...]) | Create a HDF5Reporter. |
close() | Close the underlying trajectory file |
describeNextReport(simulation) | Get information about the next report this object will generate. |
report(simulation, state) | Generate a report. |
Attributes
backend |
Close the underlying trajectory file
Get information about the next report this object will generate.
Parameters: | simulation : simtk.openmm.app.Simulation
|
---|---|
Returns: | report_description : tuple
|
Generate a report.
Parameters: | simulation : simtk.openmm.app.Simulation
state : simtk.openmm.State
|
---|