General1Potential

class General1Potential(particleType1, particleType2, A, rho, r_i=None, r_cut=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.
  • A (PhysicalQuantity of type length * energy) – Potential parameter.
  • rho (PhysicalQuantity of type length) – Potential parameter.
  • r_i (PhysicalQuantity of type length) – The inner cutoff radius where the smoothing of the potential starts. r_i must be smaller than r_cut.
  • r_cut (PhysicalQuantity of type length) – The cutoff radius of this potential.
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.

setA(A)

Set the parameter A.

Parameters:A (PhysicalQuantity of type length * energy) – Potential parameter.
setCutoff(r_cut)

Set the cutoff radius for this potential.

Parameters:r_cut (PhysicalQuantity of type length) – The cutoff radius of this potential.
setInnerCutoff(r_i)

Set the inner cutoff radius for this potential.

Parameters:r_i (PhysicalQuantity of type length) – The inner cutoff radius (distance where the spline-smoothing starts).
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.
setRho(rho)

Set the parameter rho.

Parameters:rho (PhysicalQuantity of type length) – Potential parameter.

Notes

The General1Potential defines a pair potential of the form

\[V_{ij}(r) = \frac{A}{r} e^{-r/\rho} \, .\]

At long distances this potential is brought smoothly to zero between the inner cutoff r_i and the outer cutoff r_cut, using a 5th order spline function. This ensures that there are no discontinuites in the forces as atoms are brought closer together, and that the energy is properly conserved. The applied potential \(U(r)\) is given as:

\[U(r) = V_{ij}(r) \times S(r)\]

where \(V_{ij}(r)\) is the pair potential and \(S(r)\) is the spline function. The values of the spline function are:

  • 1 when \(r \le r_i\)
  • In the range \([0,1]\) when \(r_i < r < r_{cut}\)
  • 0 when \(r \ge r_{cut}\)