mstk.ommhelper.reporter.ViscosityReporter¶
- class mstk.ommhelper.reporter.ViscosityReporter(file, reportInterval, append=False)¶
ViscosityReporter report the velocity amplitude and reciprocal of viscosity using cosine periodic perturbation method. An integrator supporting this method is required. E.g. the VVIntegrator from https://github.com/z-gong/openmm-velocityVerlet.
- 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
append (bool) – Whether or not append to the existing file.
Methods
__init__(file, reportInterval[, append])describeNextReport(simulation)Get information about the next report this object will generate.
report(simulation, state)Generate a report.
- describeNextReport(simulation)¶
Get information about the next report this object will generate.
- Parameters:
simulation (Simulation) – The Simulation to generate a report for
- Returns:
A six element tuple. The first element is the number of steps until the next report. The next four elements specify whether that report will require positions, velocities, forces, and energies respectively. The final element specifies whether positions should be wrapped to lie in a single periodic box.
- Return type:
tuple