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:
nx : int, optional, default=3

number of particles in the x direction

ny : int, optional, default=3

number of particles in the y direction

nz : int, optional, default=3

number of particles in the z direction

K : simtk.unit.Quantity, optional, default=1.0 * unit.kilojoules_per_mole/unit.nanometer**2

harmonic restraining potential

cutoff : simtk.unit.Quantity, optional, default=None

If None, will use NoCutoff for the NonbondedForce. Otherwise, use CutoffNonPeriodic with the specified cutoff.

switch_width : simtk.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 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__(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.

Methods

__init__([nx, ny, nz, K, unit, cutoff, …]) 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 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.