LennardJonesShiftPotential

class LennardJonesShiftPotential(particleType1, particleType2, r_cut=None, r_i=None, sigma=None, epsilon=None, delta=None, sigmaSpecial=None, epsilonSpecial=None, deltaSpecial=None, bonded_mode=None)

Constructor of the potential.

Parameters:
  • particleType1 (ParticleType or ParticleIdentifier) – Identifier of the first particle type.

  • particleType2 (ParticleType or ParticleIdentifier) – Identifier of the second particle type.

  • r_cut (PhysicalQuantity of type length) – The cutoff radius of this potential.

  • r_i (PhysicalQuantity of type length) – The inner cutoff radius of this potential. Below this distance the potential is capped at a constant force.

  • sigma (PhysicalQuantity of type length) – Potential parameter.

  • epsilon (PhysicalQuantity of type energy) – Potential parameter.

  • delta (float) – Potential parameter.

  • sigmaSpecial (PhysicalQuantity of type length) – Potential parameter. This parameter is only used when bonded_mode is set to evaluate34.

  • epsilonSpecial (PhysicalQuantity of type energy) – Potential parameter. This parameter is only used when bonded_mode is set to evaluate34.

  • deltaSpecial (float) – Potential parameter. This parameter is only used when bonded_mode is set to evaluate34.

  • bonded_mode

    Either LennardJonesPotential.evaluateAll or LennardJonesPotential.evaluate34.

    If evaluateAll is chosen, interactions between all particles - even those that are connected by fixed bonds - are evaluated, using the sigma and epsilon parameters.

    If evaluate34 is chosen, interactions between particles that are connected by bonds with a path length of at most two (i.e. are connected by a bond or are bonded to a common atom) are omitted. Interactions between particles that are connected by a bonded path of length three use the sigmaSpecial and epsilonSpecial parameters, while all other interactions use the normal sigma and epsilon parameters.

classmethod getAllParameterNames()

Return the names of all used parameters as a list.

getAllParameters()

Return all parameters of this potential and their current values as a <parameterName / parameterValue> dictionary.

static getDefaults()

Get the default parameters of this potential and return them in form of a dictionary of <parameter name, default value> key-value pairs.

getParameter(parameterName)

Get the current value of the parameter parameterName.

setParameter(parameterName, value)

Set the parameter parameterName to the given value.

Parameters:
  • parameterName (str) – The name of the parameter that will be modified.

  • value – The new value that will be assigned to the parameter parameterName.

Notes

The shifted Lennard-Jones potential differs from the original LJ-potential by a constant shift \(\delta\) that is added to the pairwise energies. Moreover, the potential can be modified at short distances \(r < r_{inner}\), so that the force is capped at a constant value instead of diverging towards large repulsive forces. This can be used to slowly remove initial overlaps between atoms in MD simulations (see also ForceCappedEquilibration). Its functional form was taken from [1] and is

\[\begin{split}\begin{align*} U_{ij}(r_{ij}) &= \begin{cases} U_{ij}^{shift}(r_{ij}), & r_{ij} > r^{inner}_{ij} \\ (r_{ij} - r^{inner}_{ij}) \frac{\partial U_{ij}^{shift}(r^{inner}_{ij})}{\partial r} + U_{ij}^{shift}(r^{inner}_{ij}), & r_{ij}\leq r^{inner}_{ij} \end{cases} \end{align*}\end{split}\]

and

\[\begin{align*} U_{ij}^{shift}(r_{ij}) &= 4 \cdot \epsilon \left[ \left( \frac{\sigma_{ij}}{r_{ij}}\right)^{12}-\left(\frac{\sigma_{ij}}{r_{ij}} \right)^6 + \delta_{ij}\right] \end{align*}\]