Harmonic¶
- class hoomd.hpmc.external.Harmonic(reference_positions, reference_orientations, k_translational, k_rotational, symmetries)¶
Bases:
External
Restrain particle positions and orientations with harmonic springs.
- Parameters:
reference_positions ((N_particles, 3)
numpy.ndarray
offloat
) – the reference positions to which particles are restrained .reference_orientations ((N_particles, 4)
numpy.ndarray
offloat
) – the reference orientations to which particles are restrained .k_translational (hoomd.variant.variant_like) – translational spring constant .
k_rotational (hoomd.variant.variant_like) – rotational spring constant .
symmetries ((N_symmetries, 4)
numpy.ndarray
offloat
) – the orientations that are equivalent through symmetry, i.e., the rotation quaternions that leave the particles unchanged. At a minimum, the identity quaternion ([1, 0, 0, 0]
) must be included here .
Harmonic
computes harmonic spring energies between the particle positions/orientations and given reference positions/orientations:where and correspond to the parameters
k_translational
andk_rotational
, respectively, and are the position and orientation of particle , the subscripts denote the given reference quantities, and is the given set of symmetric orientations from thesymmetries
parameter.Note
Harmonic
does not support execution on GPUs.
Members inherited from
External
:- property energy¶
Potential energy contributed by this potential .
Read more...
Members defined in
Harmonic
:- k_translational¶
The translational spring constant .
- Type:
- k_rotational¶
The rotational spring constant .
- Type:
- reference_positions¶
The reference positions to which particles are restrained .
- Type:
(N_particles, 3)
numpy.ndarray
offloat
- reference_orientations¶
The reference orientations to which particles are restrained .
- Type:
(N_particles, 4)
numpy.ndarray
offloat
- symmetries¶
The orientations that are equivalent through symmetry, i.e., the rotation quaternions that leave the particles unchanged .
- Type:
(N_symmetries, 4)
numpy.ndarray
offloat