TersoffBrennerSplinePotential

class TersoffBrennerSplinePotential(particleType1, particleType2, activeTypes1, activeTypes2, x, y, f)

Constructor of the potential.

To construct this potential it is necessary to specify a twodimensional function. This is done by passing the function values of this function at some grid points, for all other points, bicubic 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.

  • activeTypes1 (sequence of ParticleType or ParticleIdentifier) – List of particle types that are involved in the calculation of the N1 coefficient in the potential.

  • activeTypes2 (sequence of ParticleType or ParticleIdentifier) – List of particle types that are involved in the calculation of the N2 coefficient in the potential.

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

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

  • f (2D numpy.array) – The function values at the given grid points. f should be a twodimensional array of size (len(x), len(y)). f[i, j] should be the function value at (x[i], y[j]).

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 spline potentials between carbon and fluorine pairs. Note that for fluorine atoms the coordination with both carbon and silicon atoms is considered.

potentialSet = TremoloXPotentialSet(name = 'TersoffBrenner_CSiF_1999')
_potential = TersoffBrennerSplinePotential(
    particleType1 = ParticleIdentifier('C', []),
    particleType2 = ParticleIdentifier('F', []),
    activeTypes1 = [ParticleIdentifier('F', []), ],
    activeTypes2 = [ParticleIdentifier('C', []), ParticleIdentifier('Si', []), ],
    x = numpy.array([ 0.,  1.,  2.,  3.]),
    y = numpy.array([ 0.,  1.,  2.]),
    f = numpy.array([
       [ 0.     ,  0.10643,  0.1892 ],
       [ 0.06353,  0.1892 , -0.0021 ],
       [ 0.21895,  0.0104 ,  0.     ],
       [ 0.01806,  0.     ,  0.     ]]),
)
potentialSet.addPotential(_potential)

See also Notes on Tersoff-Brenner Potential.