Linear¶
- class hoomd.hpmc.external.Linear(default_alpha=None, plane_origin=(0, 0, 0), plane_normal=(0, 1, 0))¶
Bases:
External
Linear external potential (HPMC).
- Parameters:
Linear
computes a linear external potential on all particles in the simulation state:\[U_{\mathrm{external},i} = \alpha_i \cdot \vec{n} \cdot ( \vec{r}_i - \vec{p} )\]where \(\alpha_i\) (
alpha
) is the linear energy coefficient , \(\vec{n}\) is the normal vector to the plane (plane_normal
), and \(\vec{p}\) is the plane origin (plane_origin
):Example
linear = hoomd.hpmc.external.Linear() linear.alpha["A"] = 0.2 simulation.operations.integrator.external_potentials = [linear]
Members inherited from
External
:- property energy¶
Potential energy contributed by this potential \([\mathrm{energy}]\).
Read more...
Members defined in
Linear
:- alpha¶
The linear energy coefficient \(\alpha\) by particle type.
Type:
TypeParameter
[tuple
[particle_type
,particle_type
],float
]