hoomd.hpmc.pair#
Overview
Lennard-Jones pair potential (HPMC). |
|
Pair potential base class (HPMC). |
Details
Pair Potentials for Monte Carlo.
Define \(U_{\mathrm{pair},ij}\) for use with HPMCIntegrator
, which will sum all the energy from all
Pair
potential instances in the
pair_potentials
list.
Example:
simulation.operations.integrator.pair_potentials = [pair]
- class hoomd.hpmc.pair.LennardJones(default_r_cut=None, default_r_on=0.0, mode='none')#
Bases:
Pair
Lennard-Jones pair potential (HPMC).
- Parameters:
LennardJones
computes the Lennard-Jones pair potential between every pair of particles in the simulation state. The functional form of the potential, including its behavior under shifting modes, is identical to that in the MD pair potentialhoomd.md.pair.LJ
.Example
lennard_jones = hoomd.hpmc.pair.LennardJones() lennard_jones.params[('A', 'A')] = dict(epsilon=1, sigma=1, r_cut=2.5) simulation.operations.integrator.pair_potentials = [lennard_jones]
- params#
The potential parameters. The dictionary has the following keys:
epsilon
(float
, required) - Energy well depth \(\varepsilon\) \([\mathrm{energy}]\).sigma
(float
, required) - Characteristic length scale \(\sigma\) \([\mathrm{length}]\).r_cut
(float
): Cutoff radius \([\mathrm{length}]\). Defaults to the value given indefault_r_cut
on construction.r_on
(float
): XPLOR on radius \([\mathrm{length}]\). Defaults to the value given indefault_r_on
on construction.
Type:
TypeParameter
[tuple
[particle_type
,particle_type
],dict
]
- class hoomd.hpmc.pair.Pair#
Bases:
Pair potential base class (HPMC).
Pair potentials define energetic interactions between pairs of particles in
hoomd.hpmc.integrate.HPMCIntegrator
. Particles within a cutoff distance interact with an energy that is a function the type and orientation of the particles and the vector pointing from the i particle to the j particle center.Note
The base class
Pair
implements common attributes (energy
, for example) and may be used in forisinstance
orissubclass
checks.Pair
should not be instantiated directly by users.- property energy#
Potential energy contributed by this potential \([\mathrm{energy}]\).
Typically:
\[U = \sum_{i=0}^\mathrm{N_particles-1} \sum_{j=i+1}^\mathrm{N_particles-1} U_{\mathrm{pair},ij}\]See
hoomd.hpmc.integrate
for the full expression which includes the evaluation over multiple images when the simulation box is small.Example
logger.add(obj=pair, quantities=['energy'])
(
Loggable
: category=”scalar”)- Type:
Modules