Step

class hoomd.hpmc.pair.Step

Bases: Pair

Step function pair potential (HPMC).

Step computes a user-defined step function pair potential between every pair of particles in the simulation state. The functional form of the potential is:

U(r)={ε0r<r0εkrk1r<rk,k[1,n1]0rrn1U(r) = \begin{cases} \varepsilon_0 & r < r_0 \\ \varepsilon_k & r_{k-1} \le r < r_{k}, k \in [1,n-1] \\ 0 & r \ge r_{n-1} \\ \end{cases}

Where εk\varepsilon_k is the element kk of the epsilon list and rkr_k is the element kk of the r list.

Example

step =  hoomd.hpmc.pair.Step()
step.params[('A', 'A')] = dict(epsilon=[1, -1], r=[0.5, 1.5])
simulation.operations.integrator.pair_potentials = [step]

Members inherited from Pair:

property energy

Potential energy contributed by this potential [energy][\mathrm{energy}]. Read more...


Members defined in Step:

params

The potential parameters. The dictionary has the following keys:

  • epsilon (list [float], required) - Function values ε\varepsilon [energy][\mathrm{energy}].

  • r (list [float], required) - Points at which function values are defined [length][\mathrm{length}]. The values of r must be listed in monotonically increasing order.

Type: TypeParameter [tuple [particle_type, particle_type], dict]