OPP

class hoomd.hpmc.pair.OPP(default_r_cut=None, default_r_on=0.0, mode='none')

Bases: Pair

Oscillating pair potential (HPMC).

Parameters:
  • default_r_cut (float) – Default cutoff radius \([\mathrm{length}]\).

  • default_r_on (float) – Default XPLOR on radius \([\mathrm{length}]\).

  • mode (str) – Energy shifting/smoothing mode.

OPP computes the oscillating pair potential between every pair of particles in the simulation state. The functional form of the potential, including its behavior under shifting modes, is identical to that in the MD pair potential hoomd.md.pair.OPP.

Example

opp = hoomd.hpmc.pair.OPP()
opp.params[("A", "A")] = dict(
    C1=1.0,
    C2=1.0,
    eta1=15,
    eta2=3,
    k=1.0,
    phi=3.14,
    r_cut=3.0,
)
simulation.operations.integrator.pair_potentials = [opp]

Members inherited from Pair:

property energy

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


Members defined in OPP:

params

The potential parameters. The dictionary has the following keys:

  • C1 (float, required) - Energy scale of the first term \(C_1\) \([\mathrm{energy}]\).

  • C2 (float, required) - Energy scale of the second term \(C_2\) \([\mathrm{energy}]\)

  • eta1 (float, required) - The inverse power to take \(r\) to in the first term, \(\eta_1\) \([\mathrm{dimensionless}]\).

  • eta2 (float, required) - The inverse power to take \(r\) to in the second term \(\eta_2\) \([\mathrm{dimensionless}]\).

  • k (float, required) - oscillation frequency \(k\) \([\mathrm{length}^{-1}]\)

  • phi (float, required) - potential phase shift \(\phi\) \([\mathrm{dimensionless}]\)

  • r_cut (float): Cutoff radius \([\mathrm{length}]\). Defaults to the value given in default_r_cut on construction.

  • r_on (float): XPLOR on radius \([\mathrm{length}]\). Defaults to the value given in default_r_on on construction.

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

mode

The energy shifting/smoothing mode: Possible values are: "none", "shift", and "xplor".

Example

opp.mode = "shift"

Type: str