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:
- nparticlesint, optional, default=1000
Number of Lennard-Jones particles.
- reduced_densityfloat, optional, default=0.05
Reduced density (density * sigma**3); default is appropriate for gas
- massopenmm.unit.Quantity, optional, default=39.9 * unit.amu
mass of each particle.
- sigmaopenmm.unit.Quantity, optional, default=3.4 * unit.angstrom
Lennard-Jones sigma parameter
- epsilonopenmm.unit.Quantity, optional, default=0.238 * unit.kilocalories_per_mole
Lennard-Jones well depth
- cutoffopenmm.unit.Quantity, optional, default=None
Cutoff for nonbonded interactions. If None, defaults to 3 * sigma
- switch_widthopenmm.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_correctionbool, 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_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__(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.
- Parameters:
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_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.