openmmtools.testsystems.IdealGas¶
- class openmmtools.testsystems.IdealGas(nparticles=216, mass=Quantity(value=39.9, unit=dalton), temperature=Quantity(value=298.0, unit=kelvin), pressure=Quantity(value=1.0, unit=atmosphere), volume=None, **kwargs)[source]¶
Create an ‘ideal gas’ of noninteracting particles in a periodic box.
- Parameters:
- nparticlesint, optional, default=216
number of particles
- massint, optional, default=39.9 * unit.amu
- temperatureint, optional, default=298.0 * unit.kelvin
- pressureint, optional, default=1.0 * unit.atmosphere
- volumeNone
if None, defaults to (nparticles * temperature * unit.BOLTZMANN_CONSTANT_kB / pressure).in_units_of(unit.nanometers**3)
- Attributes:
analytical_propertiesA list of available analytical properties, accessible via ‘get_propertyname(thermodynamic_state)’ calls.
mdtraj_topologyThe mdtraj.Topology object corresponding to the test system (read-only).
nameThe name of the test system.
positionsThe openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.
systemThe openmm.System object corresponding to the test system.
topologyThe openmm.app.Topology object corresponding to the test system.
Methods
get_kinetic_expectation(state)Return the expectation of the kinetic energy, computed analytically or numerically.
get_kinetic_standard_deviation(state)Return the standard deviation of the kinetic energy, computed analytically or numerically.
get_potential_expectation(state)Return the expectation of the potential energy, computed analytically or numerically.
get_potential_standard_deviation(state)Return the standard deviation of the potential energy, computed analytically or numerically.
get_volume_expectation(state)Return the expectation of the volume, computed analytically.
get_volume_standard_deviation(state)Return the standard deviation of the volume, computed analytically.
reduced_potential_expectation(...)Calculate the expected potential energy in state_sampled_from, divided by kB * T in state_evaluated_in.
serialize()Return the System and positions in serialized XML form.
Examples
Create an ideal gas system.
>>> gas = IdealGas() >>> system, positions = gas.system, gas.positions
Create a smaller ideal gas system containing 64 particles.
>>> gas = IdealGas(nparticles=64) >>> system, positions = gas.system, gas.positions
- __init__(nparticles=216, mass=Quantity(value=39.9, unit=dalton), temperature=Quantity(value=298.0, unit=kelvin), pressure=Quantity(value=1.0, unit=atmosphere), volume=None, **kwargs)[source]¶
Abstract base class for test system.
- Parameters:
Methods
__init__([nparticles, mass, temperature, ...])Abstract base class for test system.
get_kinetic_expectation(state)Return the expectation of the kinetic energy, computed analytically or numerically.
get_kinetic_standard_deviation(state)Return the standard deviation of the kinetic energy, computed analytically or numerically.
get_potential_expectation(state)Return the expectation of the potential energy, computed analytically or numerically.
get_potential_standard_deviation(state)Return the standard deviation of the potential energy, computed analytically or numerically.
get_volume_expectation(state)Return the expectation of the volume, computed analytically.
get_volume_standard_deviation(state)Return the standard deviation of the volume, computed analytically.
reduced_potential_expectation(...)Calculate the expected potential energy in state_sampled_from, divided by kB * T in state_evaluated_in.
serialize()Return the System and positions in serialized XML form.
Attributes
analytical_propertiesA list of available analytical properties, accessible via 'get_propertyname(thermodynamic_state)' calls.
mdtraj_topologyThe mdtraj.Topology object corresponding to the test system (read-only).
nameThe name of the test system.
positionsThe openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.
systemThe openmm.System object corresponding to the test system.
topologyThe openmm.app.Topology object corresponding to the test system.