openmmtools.testsystems.LennardJonesCluster¶
- class openmmtools.testsystems.LennardJonesCluster(nx=3, ny=3, nz=3, K=Quantity(value=1.0, unit=kilojoule / nanometer**2 * mole), 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.
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
- 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__(nx=3, ny=3, nz=3, K=Quantity(value=1.0, unit=kilojoule / nanometer**2 * mole), 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_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.