TersoffBrennerCorrectionPotential

class TersoffBrennerCorrectionPotential(particleType1, particleType2, activeTypes, L, U, x, z, f)

Constructor of the potential.

To construct this potential it is necessary to specify a threedimensional function. This is done by passing the function values of this function at some grid points. For all other points, tricubic interpolation is used. At the border of the grid, all derivatives are assumed to be zero.

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

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

  • activeTypes (sequence of ParticleType or ParticleIdentifier) – List of particle types that are involved in the calculation of the so-called conjugated part of the potential.

  • x (sequence of float) – The x-coordinates of the grid. It must have uniform spacing. The same coordinates are also used for the y-coordinates.

  • z (sequence of float) – The z-coordinates of the grid. It must have uniform spacing.

  • f (3D numpy.array) – The function values at the given grid points. f should be a threedimensional array of size (len(x), len(y), len(z)). f[i, j, k] should be the function value at (x[i], y[j], z[k]) and f must be symmetric with respect to its to first components, i.e. f[i, j, k] = f[j, i, k].

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.

Usage Examples

Define Tersoff-Brenner correction potentials for carbon.

potentialSet = TremoloXPotentialSet(name = 'TersoffBrenner_CSiF_1999')
_potential = TersoffBrennerCorrectionPotential(
    particleType1 = ParticleIdentifier('C', []),
    particleType2 = ParticleIdentifier('C', []),
    activeTypes = [ParticleIdentifier('C', []), ],
    L = 2.0,
    U = 3.0,
    x = numpy.array([0., 1., 2., 3.]),
    z = numpy.array([0., 1., 2., 3.]),
    f = numpy.array([[
        [ 0.     ,  0.     ,  0.     ,  0.     ],
        [ 0.     , -0.02882,  0.     ,  0.     ],
        [ 0.     ,  0.     ,  0.     ,  0.     ],
        [ 0.     ,  0.     ,  0.     ,  0.     ]],

       [[ 0.     , -0.02882,  0.     ,  0.     ],
        [ 0.     , -0.0288 ,  0.     ,  0.     ],
        [ 0.     , -0.09   , -0.0243 , -0.0243 ],
        [ 0.     ,  0.     ,  0.     ,  0.     ]],

       [[ 0.     ,  0.     ,  0.     ,  0.     ],
        [ 0.     , -0.09   , -0.0243 , -0.0243 ],
        [ 0.     ,  0.0415 ,  0.     ,  0.     ],
        [ 0.     , -0.0363 , -0.0363 , -0.0363 ]],

       [[ 0.     ,  0.     ,  0.     ,  0.     ],
        [ 0.     ,  0.     ,  0.     ,  0.     ],
        [ 0.     , -0.0363 , -0.0363 , -0.0363 ],
        [ 0.     ,  0.     ,  0.     ,  0.     ]]]),
)
potentialSet.addPotential(_potential)

See also Notes on Tersoff-Brenner Potential.