LennardJonesSpline2Potential

class LennardJonesSpline2Potential(particleType1=None, particleType2=None, r_b=None, r_e=None, r_m=None, r_s=None, sigma=None, epsilon=None, sigmaSpecial=None, epsilonSpecial=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_b (PhysicalQuantity of type length) – The outer cutoff radius. Must be larger than r_e.

  • r_e (PhysicalQuantity of type length) – The third cutoff radius. Must be larger than r_m.

  • r_m (PhysicalQuantity of type length) – The second cutoff radius. Must be larger than r_s.

  • r_s (PhysicalQuantity of type length) – The first cutoff radius.

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

  • epsilon (PhysicalQuantity of type energy) – 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.

  • bonded_mode

    Either LennardJonesSpline2Potential.evaluateAll or LennardJonesSpline2Potential.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

In contrast to the LennardJonesSplinePotential, the LennardJonesSpline2Potential is zero outside an interval \([r_s, r_b]\), and yields the original Lennard-Jones energy

\[V_{ij}(r) = 4\epsilon_{ij} \left [ \left(\frac{\sigma_{ij}}{r} \right )^{12} - \left(\frac{\sigma_{ij}}{r} \right )^6 \right] \, .\]

only within an interval \([r_m, r_e]\). Cubic splines are use to ensure a smooth transition to zero over the intervals \([r_s, r_m]\), as well as \([r_e, r_b]\).

If not specified explicitly in the potential, the Lennard-Jones parameters \(\sigma\) and \(\epsilon\) are taken from the ParticleType the potential acts on. The parameters between different types are calculated based on the Lorentz-Berthelot mixing rules

\[\epsilon_{ij} = \sqrt{\epsilon_i \cdot \epsilon_j}\]

and

\[\sigma_{ij} = \frac{\sigma_i + \sigma_j}{2} \, .\]

When using bonded force fields the bonded_mode parameter can be used to modify how this potential acts between atoms that are connected via less than 4 bonds. If LennardJonesPotential.evaluateAll (or “mode_bondless”) is chosen, the potential acts between all selected atoms independent of the bonds between them. If LennardJonesPotential.evaluate34 (or “mode_14”) is chosen, the potential is switched off for all atoms that are connected via one or two consecutive bonds. For atoms separated by exactly three bonds (i.e. atoms 1 and 4 in a bonded sequence), the special Lennard-Jones parameters (respectively the combined epsilon14 and sigma14 of the ParticleType) are used instead.