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:

\[\begin{split}U(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}\end{split}\]

Where \(\varepsilon_k\) is the element \(k\) of the epsilon list and \(r_k\) is the element \(k\) 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 \([\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\) \([\mathrm{energy}]\).

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

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