Harmonic¶
- class hoomd.hpmc.external.Harmonic(reference_positions, reference_orientations, k_translational, k_rotational, symmetries)¶
Bases:
ExternalRestrain particle positions and orientations with harmonic springs.
- Parameters:
reference_positions ((N_particles, 3)
numpy.ndarrayoffloat) – the reference positions to which particles are restrained .reference_orientations ((N_particles, 4)
numpy.ndarrayoffloat) – 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.ndarrayoffloat) – 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 .
Harmoniccomputes harmonic spring energies between the particle positions/orientations and given reference positions/orientations:where and correspond to the parameters
k_translationalandk_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 thesymmetriesparameter.Note
Harmonicdoes 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.ndarrayoffloat
- reference_orientations¶
The reference orientations to which particles are restrained .
- Type:
(N_particles, 4)
numpy.ndarrayoffloat
- symmetries¶
The orientations that are equivalent through symmetry, i.e., the rotation quaternions that leave the particles unchanged .
- Type:
(N_symmetries, 4)
numpy.ndarrayoffloat