oqp.library.qmmm_md
Attributes
Classes
Functions
|
Module Contents
- parse_ini_to_config(filepath)
Parse an INI-style configuration file into a flat dictionary with ``section.key`` keys. Numeric values are auto-converted to int or float. Entries with empty values are skipped.
- class QMMM_MD(oqp_cfg=None, mol=None)
QM/MM Molecular Dynamics with NVE / NVT / NPT support. All parameters are read from the configuration. Provide **exactly one** of: * ``oqp_cfg`` - a ``dict`` with flat ``"section.key"`` entries **or** a path to an INI file. QM/MM settings live under the ``[qmmm]`` section / ``"qmmm.*"`` keys. * ``mol`` - a pre-built OpenQP mol object whose ``mol.config["qmmm"]`` contains the same keys. Recognised ``[qmmm]`` keys -------------------------- pdb_file : str (required) forcefield_files : str comma-separated list qm_atoms : str or list ``"0,1,2"`` or ``"0-2"`` cutoff : str PME | NoCutoff | Ewald | ... embedding : str mechanical | electrostatic n_steps : int default 1000 timestep : float (fs) default 1.0 temperature : float (K) default 300.0 ensemble : str nve | nvt | npt (default nve) friction : float (ps^-1) default 1.0 (NVT/NPT only) pressure : float (bar) default 1.0 (NPT only) barostat_interval : int default 25 (NPT only) trajectory_format : str pdb | dcd (default pdb) trajectory_file : str default qmmm_trajectory.<format> log_file : str default qmmm_trajectory.dat report_interval : int default 1 energy_file : str default total_energy.npz qm_atoms_xyz : str optional XYZ file qm_list : str or list optional index mapping Saved observables (in ``energy_file`` as ``.npz``) -------------------------------------------------- step : MD step index time_ps : simulation time (ps) E_pot : potential energy (kJ/mol) E_kin : kinetic energy (kJ/mol) E_tot : total energy (kJ/mol) temperature : instantaneous T from kinetic energy (K) volume_nm3 : box volume (nm^3), only populated for NPT- pdb
- forcefield
- qm_atoms
- cutoff
- embedding = ''
- frontier_scheme = ''
- n_steps
- timestep
- temperature
- ensemble = ''
- friction
- pressure
- barostat_interval
- trajectory_format = ''
- trajectory_file = ''
- log_file = ''
- report_interval
- energy_file = ''
- oqp_cfg = None
- mol = None
- oqp_driver = None
- mm_systems = None
- simulation_md = None
- system_md = None
- qmmm_ext = None
- setup()
Full setup: build driver, MD system, and simulation context.
- step()
Perform one QM/MM MD step. :returns: **E_tot** :rtype: float Total energy (kJ/mol).
- run()
Run the full simulation in the configured ensemble. :returns: Keys: step, time_ps, E_pot, E_kin, E_tot, temperature, volume_nm3. :rtype: dict of np.ndarray
- md