openmmtools.testsystems.WaterCluster

class openmmtools.testsystems.WaterCluster(n_waters=20, K=Quantity(value=1.0, unit=kilojoule/(nanometer**2*mole)), model='tip3p', constrained=True, restrain_only_oxygen=False, **kwargs)[source]

Create a few water molecules in a harmonic restraining potential

Attributes:
analytical_properties

A list of available analytical properties, accessible via ‘get_propertyname(thermodynamic_state)’ calls.

mdtraj_topology

The mdtraj.Topology object corresponding to the test system (read-only).

name

The name of the test system.

positions

The simtk.unit.Quantity object containing the particle positions, with units compatible with simtk.unit.nanometers.

system

The simtk.openmm.System object corresponding to the test system.

topology

The simtk.openmm.app.Topology object corresponding to the test system.

Methods

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.
__init__(n_waters=20, K=Quantity(value=1.0, unit=kilojoule/(nanometer**2*mole)), model='tip3p', constrained=True, restrain_only_oxygen=False, **kwargs)[source]
Parameters:
n_waters : int

Number of water molecules in the cluster

K : simtk.unit.Quantity (energy / distance^2)

spring constant for restraining potential

model : string

Must be one of [‘tip3p’, ‘tip4pew’, ‘tip5p’, ‘spce’]

constrained: bool

Whether to use rigid water or not

restrain_only_oxygen: bool

Whether to apply the restraining potential to oxygens only (True) or to all atoms (False)

Examples

Create water cluster with default settings

>>> cluster = WaterCluster()
>>> system, positions = cluster.system, cluster.positions

Methods

__init__([n_waters, K, unit, model, …])
Parameters:
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_properties A list of available analytical properties, accessible via ‘get_propertyname(thermodynamic_state)’ calls.
mdtraj_topology The mdtraj.Topology object corresponding to the test system (read-only).
name The name of the test system.
positions The simtk.unit.Quantity object containing the particle positions, with units compatible with simtk.unit.nanometers.
system The simtk.openmm.System object corresponding to the test system.
topology The simtk.openmm.app.Topology object corresponding to the test system.
analytical_properties

A list of available analytical properties, accessible via ‘get_propertyname(thermodynamic_state)’ calls.

mdtraj_topology

The mdtraj.Topology object corresponding to the test system (read-only).

name

The name of the test system.

positions

The simtk.unit.Quantity object containing the particle positions, with units compatible with simtk.unit.nanometers.

reduced_potential_expectation(state_sampled_from, state_evaluated_in)

Calculate the expected potential energy in state_sampled_from, divided by kB * T in state_evaluated_in.

Notes

This is not called get_reduced_potential_expectation because this function requires two, not one, inputs.

serialize()

Return the System and positions in serialized XML form.

Returns:
system_xml : str

Serialized XML form of System object.

state_xml : str

Serialized XML form of State object containing particle positions.

system

The simtk.openmm.System object corresponding to the test system.

topology

The simtk.openmm.app.Topology object corresponding to the test system.