openmmtools.testsystems.LennardJonesCluster¶
- class openmmtools.testsystems.LennardJonesCluster(nx=3, ny=3, nz=3, K=1.0 kJ/(nm**2 mol), cutoff=None, switch_width=None, **kwargs)[source]¶
Create a non-periodic rectilinear grid of Lennard-Jones particles in a harmonic restraining potential.
- Parameters:
- nxint, optional, default=3
number of particles in the x direction
- nyint, optional, default=3
number of particles in the y direction
- nzint, optional, default=3
number of particles in the z direction
- Kopenmm.unit.Quantity, optional, default=1.0 * unit.kilojoules_per_mole/unit.nanometer**2
harmonic restraining potential
- cutoffopenmm.unit.Quantity, optional, default=None
If None, will use NoCutoff for the NonbondedForce. Otherwise, use CutoffNonPeriodic with the specified cutoff.
- switch_widthopenmm.unit.Quantity, optional, default=None
If None, the cutoff is a hard cutoff. If switch_width is specified, use a switching function with this width.
- 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
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 Lennard-Jones cluster.
>>> cluster = LennardJonesCluster() >>> system, positions = cluster.system, cluster.positions
Create default 3x3x3 Lennard-Jones cluster in a harmonic restraining potential.
>>> cluster = LennardJonesCluster(nx=10, ny=10, nz=10) >>> system, positions = cluster.system, cluster.positions
- __init__(nx=3, ny=3, nz=3, K=1.0 kJ/(nm**2 mol), cutoff=None, switch_width=None, **kwargs)[source]¶
Abstract base class for test system.
- Parameters:
Methods
__init__([nx, ny, nz, K, cutoff, switch_width])Abstract base class for test system.
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.