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, nz : int, optional, default=8
Number of particles in x, y, and z dimensions.
- reduced_density : float, optional, default=0.86
Reduced density (density * sigma**3); default is appropriate for liquid argon.
- mass : simtk.unit.Quantity, optional, default=39.9 * unit.amu
mass of each particle; default is appropriate for argon
- sigma : simtk.unit.Quantity, optional, default=3.4 * unit.angstrom
Lennard-Jones sigma parameter; default is appropriate for argon
- epsilon : simtk.unit.Quantity, optional, default=0.238 * unit.kilocalories_per_mole
Lennard-Jones well depth; default is appropriate for argon
- cutoff : simtk.unit.Quantity, optional, default=None
Cutoff for nonbonded interactions. If None, defaults to 2.5 * sigma
- switch_width : simtk.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_correction : bool, 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_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 simtk.unit.Quantity object containing the particle positions, with units compatible with simtk.unit.nanometers.
systemThe simtk.openmm.System object corresponding to the test system.
topologyThe 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. 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_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 simtk.unit.Quantity object containing the particle positions, with units compatible with simtk.unit.nanometers. systemThe simtk.openmm.System object corresponding to the test system. topologyThe 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.