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
Externalimplements common attributes (energy, for example) and may be used in forisinstanceorissubclasschecks.Externalshould 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.integratefor 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: