qmmm_pme.wrappers package¶
Submodules¶
qmmm_pme.wrappers.logger module¶
A module defining the Logger class.
- class qmmm_pme.wrappers.logger.Logger(output_directory, system, write_to_log=True, decimal_places=6, log_write_interval=1, write_to_csv=True, csv_write_interval=1, write_to_dcd=True, dcd_write_interval=50, write_to_pdb=True)[source]¶
Bases:
objectA logger for writing
SimulationandSystemdata.- Parameters:
output_dir – The directory where outputs are written.
system (System) – The
Systemobject which will be reported.write_to_log (bool) – Whether or not to write energies to a tree-like log file.
decimal_places (int) – Number of decimal places to write energies in the log file before truncation.
log_write_interval (int) – The interval between successive log writes, in simulation steps.
write_to_csv (bool) – Whether or not to write energies to a CSV file.
csv_write_interval (int) – The interval between successive CSV writes, in simulation steps.
write_to_dcd (bool) – Whether or not to write atom positions to a DCD file.
dcd_write_interval (int) – The interval between successive DCD writes, in simulation steps.
write_to_pdb (bool) – Whether or not to write atom positions to a PDB file at the end of a simulation.
output_directory (str) –
- csv_write_interval: int = 1¶
- dcd_write_interval: int = 50¶
- decimal_places: int = 6¶
- log_write_interval: int = 1¶
- output_directory: str¶
- record(simulation)[source]¶
Log the current state of the
Simulationto any relevant output files.- Parameters:
simulation (Simulation) – The
Simulationobject to log/record.- Return type:
None
- write_to_csv: bool = True¶
- write_to_dcd: bool = True¶
- write_to_log: bool = True¶
- write_to_pdb: bool = True¶
- class qmmm_pme.wrappers.logger.NullLogger[source]¶
Bases:
objectA default logger class which does not perform any logging.
- record(simulation)[source]¶
Default record call, which does nothing.
- Parameters:
simulation (Simulation) – The
Simulationobject to record/log.- Return type:
None
qmmm_pme.wrappers.simulation module¶
A module for defining the Simulation class.
- class qmmm_pme.wrappers.simulation.Simulation(system, hamiltonian, dynamics, logger=<class 'qmmm_pme.wrappers.logger.NullLogger'>, num_threads=1, memory='1 GB', plugins=<factory>, frame=0, energy=<factory>)[source]¶
Bases:
objectAn object which manages and performs simulations.
- Parameters:
system (System) – The
Systemobject to perform calculations on.hamiltonian (Hamiltonian) – The
Hamiltonianobject to perform calculations with.integrator – The
Integratorobject to perform calculations with.logger (Any) – The
Loggerobject to record data generated during the simulationnum_threads (int) – The number of threads to run calculations on.
memory (str) – The amount of memory to allocate to calculations.
plugins (list[Plugin]) – Any
Pluginobjects to apply to the simulation.dynamics (Dynamics) –
frame (int) –
energy (EnergyDict) –
- calculate_energy_forces()[source]¶
Update the
Systemforces andSimulationenergy using calculations from theCalculator.- Return type:
None
- calculate_forces()[source]¶
Update the
Stateforces using calculations from theCalculator.- Return type:
None
- energy: EnergyDict¶
- frame: int = 0¶
- hamiltonian: Hamiltonian¶
- logger¶
alias of
NullLogger
- memory: str = '1 GB'¶
- num_threads: int = 1¶
- run_dynamics(steps)[source]¶
Run simulation using the
System,Calculator, andIntegrator.- Parameters:
steps (int) – The number of steps to take.
- Return type:
None
- wrap_positions()[source]¶
Atoms are wrapped to stay inside of the periodic box. This function ensures molecules are not broken up by a periodic boundary, since OpenMM electrostatics will be incorrect if atoms in a molecule are not on the same side of the periodic box. This method currently assumes an isotropic box.
- Return type:
None
qmmm_pme.wrappers.system module¶
A module defining the System class.
- class qmmm_pme.wrappers.system.System(pdb_list, topology_list, forcefield_list)[source]¶
Bases:
objectAn wrapper class designed to generate and hold
StateandTopologyrecord objects.- Parameters:
pdb_list (list[str]) – The directories containing the PDB files which define the
Systemgeometry.topology_list (list[str]) – The directories containing the XML files which define the
Systemtopology.forcefield_list (list[str]) – The directories containing the XML files which define the
Systeminteractions.
Module contents¶
A sub-package containing wrapper classes for the end user.