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 openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.
system
The openmm.System object corresponding to the test system.
topology
The 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_watersint
Number of water molecules in the cluster
- Kopenmm.unit.Quantity (energy / distance^2)
spring constant for restraining potential
- modelstring
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, model, constrained, ...])- 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 openmm.unit.Quantity object containing the particle positions, with units compatible with openmm.unit.nanometers.
system
The openmm.System object corresponding to the test system.
topology
The openmm.app.Topology object corresponding to the test system.