polymerist.mdtools.openmmtools.thermo ===================================== .. py:module:: polymerist.mdtools.openmmtools.thermo .. autoapi-nested-parse:: API for selecting thermostat and barostat actions which realize particular thermodynamic ensembles Attributes ---------- .. autoapisummary:: polymerist.mdtools.openmmtools.thermo.LOGGER polymerist.mdtools.openmmtools.thermo.ThermostatSerializer polymerist.mdtools.openmmtools.thermo.BarostatSerializer Exceptions ---------- .. autoapisummary:: polymerist.mdtools.openmmtools.thermo.NPHEnsembleUnsupported Classes ------- .. autoapisummary:: polymerist.mdtools.openmmtools.thermo.Thermostat polymerist.mdtools.openmmtools.thermo.ThermostatParameters polymerist.mdtools.openmmtools.thermo.Barostat polymerist.mdtools.openmmtools.thermo.BarostatParameters polymerist.mdtools.openmmtools.thermo.Ensemble polymerist.mdtools.openmmtools.thermo.ThermoParameters Module Contents --------------- .. py:data:: LOGGER .. py:class:: Thermostat(*args, **kwds) Bases: :py:obj:`enum.Enum` Common thermostats which OpenMM implements and which adhere to the interface defined here .. py:attribute:: ANDERSEN .. py:attribute:: BROWNIAN .. py:attribute:: LANGEVIN .. py:attribute:: LANGEVIN_MIDDLE .. py:attribute:: NOSE_HOOVER .. py:attribute:: LANGEVINMIDDLE .. py:attribute:: NOSEHOOVER .. py:data:: ThermostatSerializer .. py:class:: ThermostatParameters Interface for initializing a constant-temperature simulation .. py:attribute:: temperature :type: openmm.unit.Quantity .. py:attribute:: timescale :type: openmm.unit.Quantity .. py:attribute:: thermostat :type: Union[str, Thermostat] .. py:method:: forces() -> Iterable[openmm.Force] The forces required to realized the desired thermostat .. py:method:: integrator(time_step: openmm.unit.Quantity) -> openmm.Integrator The integrator required to realized the desired thermostat .. py:class:: Barostat(*args, **kwds) Bases: :py:obj:`enum.Enum` Common barostats which OpenMM implements and which adhere to the interface defined here .. py:attribute:: MONTE_CARLO .. py:attribute:: MONTE_CARLO_FLEXIBLE .. py:attribute:: MC .. py:attribute:: MONTECARLO .. py:attribute:: FLEXIBLE .. py:data:: BarostatSerializer .. py:class:: BarostatParameters Interface for initializing a constant-pressure simulation .. py:attribute:: pressure :type: openmm.unit.Quantity .. py:attribute:: temperature :type: Optional[openmm.unit.Quantity] :value: None .. py:attribute:: update_frequency :type: int :value: 25 .. py:attribute:: barostat :type: Union[str, Barostat] .. py:method:: forces() -> Iterable[openmm.Force] The forces required to realized the desired barostat .. py:method:: integrator(time_step: openmm.unit.Quantity) -> openmm.Integrator The integrator required to realized the desired barostat .. py:exception:: NPHEnsembleUnsupported(msg: str = f'NPH ensemble not supported; either add a thermostat or remove a barostat from thermodynamic parameters', *args, **kwargs) Bases: :py:obj:`ValueError` Raised when a user attempts to initialize ThermoParameters with a barostat but not thermostat Would cause OpenMM to produce incorrect results (https://docs.openmm.org/latest/userguide/application/02_running_sims.html#pressure-coupling) .. py:class:: Ensemble Bases: :py:obj:`enum.StrEnum` Common thermodynamic ensembles which are realizable with the interfaces provided here .. py:attribute:: NVE :value: 'microcanonical' .. py:attribute:: NVT :value: 'canonical' .. py:attribute:: NPT :value: 'isothermal-isobaric' .. py:class:: ThermoParameters Encapsulation for initializing the OpenMM forces and integrator which realize a particular thermodynamic ensemble .. py:attribute:: thermostat_params :type: Optional[ThermostatParameters] :value: None .. py:attribute:: barostat_params :type: Optional[BarostatParameters] :value: None .. py:property:: ensemble :type: Ensemble The standard name of the thermodynamic ensemble being implemented here .. py:method:: describe_ensemble() -> str Verbal description of ensemble .. py:method:: integrator(time_step: openmm.unit.Quantity) -> openmm.Integrator Specify how to integrate forces in each timestep .. py:method:: forces() -> Optional[Iterable[openmm.Force]] Specify any additional force contributions to position/velocity updates