External¶
- class hoomd.hpmc.external.External¶
External potential base class (HPMC).
External potentials define energetic interaction between particles and external fields in
hoomd.hpmc.integrate.HPMCIntegrator
.Note
The base class
External
implements common attributes (energy
, for example) and may be used in forisinstance
orissubclass
checks.External
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} U_{\mathrm{external},i}\]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=external, quantities=['energy'])
(
Loggable
: category=”scalar”)- Type: