openmmtools.testsystems.CustomLennardJonesFluidMixture¶
-
class
openmmtools.testsystems.CustomLennardJonesFluidMixture(nparticles=1000, reduced_density=0.05, mass=Quantity(value=39.9, unit=dalton), sigma=Quantity(value=3.4, unit=angstrom), epsilon=Quantity(value=0.238, unit=kilocalorie/mole), cutoff=None, switch_width=None, dispersion_correction=True, **kwargs)[source]¶ Create a periodic rectilinear grid of Lennard-Jones particles, but implemented via CustomBondForce and NonbondedForce. Parameters for argon are used by default. Cutoff is set to 3 sigma by default.
Parameters: - nparticles : int, optional, default=1000
Number of Lennard-Jones particles.
- reduced_density : float, optional, default=0.05
Reduced density (density * sigma**3); default is appropriate for gas
- mass : simtk.unit.Quantity, optional, default=39.9 * unit.amu
mass of each particle.
- sigma : simtk.unit.Quantity, optional, default=3.4 * unit.angstrom
Lennard-Jones sigma parameter
- epsilon : simtk.unit.Quantity, optional, default=0.238 * unit.kilocalories_per_mole
Lennard-Jones well depth
- cutoff : simtk.unit.Quantity, optional, default=None
Cutoff for nonbonded interactions. If None, defaults to 3 * sigma
- switch_width : simtk.unit.Quantity with units compatible with angstroms, optional, default=None
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)
Notes
No analytical dispersion correction is included here.
Examples
Create default-size Lennard-Jones fluid.
>>> fluid = CustomLennardJonesFluidMixture() >>> system, positions = fluid.system, fluid.positions
Create a larger box of Lennard-Jones particles.
>>> fluid = CustomLennardJonesFluidMixture(nparticles=400) >>> system, positions = fluid.system, fluid.positions
Create Lennard-Jones fluid using switched particle interactions (switched off betwee 7 and 9 A) and more particles.
>>> fluid = CustomLennardJonesFluidMixture(nparticles=1000, switch=True, switch_width=7.0*unit.angstroms, cutoff=9.0*unit.angstroms) >>> 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. -
__init__(nparticles=1000, reduced_density=0.05, mass=Quantity(value=39.9, unit=dalton), sigma=Quantity(value=3.4, unit=angstrom), epsilon=Quantity(value=0.238, unit=kilocalorie/mole), cutoff=None, switch_width=None, dispersion_correction=True, **kwargs)[source]¶ Abstract base class for test system.
Methods
__init__([nparticles, reduced_density, …])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.