protex.reporter.ChargeReporter

class protex.reporter.ChargeReporter(file: str, reportInterval: int, ionic_liquid: ProtexSystem, append: bool = False, header_data: dict | None = None)[source]

Bases: object

Charge Reporter reports the charges after an update intervals Used to reoprt the charge for each molecule in the system. Ideally call in conjunction with an update and report just when charge changed. i.e. ChargeReporter(file, 10) simulation.step(9) state_update.update(2) simulation.step(8) state_update.update(2) simulation.step(8) simulation.step(1) then the reporter is invoked directly in the update, after the one step with the previous charge, but before any charge changes take effect.

Methods

describeNextReport

Get information about the next report this object will generate.

report

Generate a report.

describeNextReport(simulation)[source]

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.

Return type:

tuple

report(simulation, state)[source]

Generate a report.

Parameters:
  • simulation (Simulation) – The Simulation to generate a report for

  • state (State) – The current state of the simulation