openmmtools.testsystems.LennardJonesGrid

class openmmtools.testsystems.LennardJonesGrid(nx=8, ny=8, nz=8, *args, **kwargs)[source]

Create a periodic fluid of Lennard-Jones particles on a grid. Initial positions are assigned using a subrandom grid to minimize steric interactions.

Parameters:
nx, ny, nzint, optional, default=8

Number of particles in x, y, and z dimensions.

reduced_densityfloat, optional, default=0.86

Reduced density (density * sigma**3); default is appropriate for liquid argon.

massopenmm.unit.Quantity, optional, default=39.9 * unit.amu

mass of each particle; default is appropriate for argon

sigmaopenmm.unit.Quantity, optional, default=3.4 * unit.angstrom

Lennard-Jones sigma parameter; default is appropriate for argon

epsilonopenmm.unit.Quantity, optional, default=0.238 * unit.kilocalories_per_mole

Lennard-Jones well depth; default is appropriate for argon

cutoffopenmm.unit.Quantity, optional, default=None

Cutoff for nonbonded interactions. If None, defaults to 2.5 * sigma

switch_widthopenmm.unit.Quantity with units compatible with angstroms, optional, default=0.2*unit.angstroms

switching function is turned on at cutoff - switch_width If None, no switch will be applied (e.g. hard cutoff).

dispersion_correctionbool, optional, default=True

if True, will use analytical dispersion correction (if not using switching function)

Examples

Create default-size Lennard-Jones fluid with initial positions on a grid.

>>> fluid = LennardJonesGrid()
>>> system, positions = fluid.system, fluid.positions

Create a box of Lennard-Jones particles with unequal grid spacing.

>>> fluid = LennardJonesGrid(nx=8, ny=9, nz=10)
>>> system, positions = fluid.system, fluid.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=8, ny=8, nz=8, *args, **kwargs)[source]

Abstract base class for test system.

Parameters:

Methods

__init__([nx, ny, nz])

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.