TersoffBrennerCorrectionPotential2

class TersoffBrennerCorrectionPotential2(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 pair potentials for carbon.

potentialSet = TremoloXPotentialSet(name = 'Brenner_CH_2002')
potentialSet.addParticleType(ParticleType(
	symbol = 'C',
	mass = 12.0107*atomic_mass_unit,
	charge = None,
	sigma = None,
	sigma14 = None,
	epsilon = None,
	epsilon14 = None,
	atomicNumber = 6,
	tags = [],
))
_potential = TersoffBrennerCorrectionPotential2(
	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, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
    ),
	f = numpy.array([
        [[0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0],
         [0.0, 0.0216935, 0.00495861, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0],
         [0.0, 0.02469883, -0.00597133, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0],
         [0.0, -0.05989947, -0.05989947, -0.05989947, -0.05989947,
         -0.05989947, -0.05989947, -0.05989947, -0.05989947, -0.05989947,
         -0.05989947, -0.05989947, -0.05989947, -0.05989947, -0.05989947,
         -0.05989947, -0.05989947, -0.05989947, -0.05989947, -0.05989947]],

        [[0.0, 0.0216935, 0.00495861, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0],
         [0.0, 0.0525, -0.00208875, -0.0080428, -0.0080428,
         -0.0080428, -0.0080428, -0.0080428, -0.0080428, -0.0080428,
         -0.0080428, -0.0080428, -0.0080428, -0.0080428, -0.0080428,
         -0.0080428, -0.0080428, -0.0080428, -0.0080428, -0.0080428 ],
         [0.0, 0.00482478, 0.015, -0.01, -0.01168894,
         -0.01337788, -0.01506682, -0.01506682, -0.01506682, -0.01506682,
         -0.01506682, -0.01506682, -0.01506682, -0.01506682, -0.01506682,
         -0.01506682, -0.01506682, -0.01506682, -0.01506682, -0.01506682],
         [0.0, 0.0, -0.06241838, -0.06241838, -0.06241838,
         -0.06241838, -0.06241838, -0.06241838, -0.06241838, -0.06241838,
         -0.06241838, -0.06241838, -0.06241838, -0.06241838, -0.06241838,
         -0.06241838, -0.06241838, -0.06241838, -0.06241838, -0.06241838]],

        [[0.0, 0.02469883, -0.00597133, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0],
         [0.0, 0.00482478, 0.015, -0.01, -0.01168894,
         -0.01337788, -0.01506682, -0.01506682, -0.01506682, -0.01506682,
         -0.01506682, -0.01506682, -0.01506682, -0.01506682, -0.01506682,
         -0.01506682, -0.01506682, -0.01506682, -0.01506682, -0.01506682],
         [0.0, 0.04722478, 0.011, 0.01985293, 0.01654411,
          0.01323529, 0.00992647, 0.00661765, 0.00330882, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0],
         [0.0, -0.02235469, -0.02235469, -0.02235469, -0.02235469,
         -0.02235469, -0.02235469, -0.02235469, -0.02235469, -0.02235469,
         -0.02235469, -0.02235469, -0.02235469, -0.02235469, -0.02235469,
         -0.02235469, -0.02235469, -0.02235469, -0.02235469, -0.02235469]],

        [[0.0, -0.05989947, -0.05989947, -0.05989947, -0.05989947,
         -0.05989947, -0.05989947, -0.05989947, -0.05989947, -0.05989947,
         -0.05989947, -0.05989947, -0.05989947, -0.05989947, -0.05989947,
         -0.05989947, -0.05989947, -0.05989947, -0.05989947, -0.05989947],
         [0.0, 0.0, -0.06241838, -0.06241838, -0.06241838,
         -0.06241838, -0.06241838, -0.06241838, -0.06241838, -0.06241838,
         -0.06241838, -0.06241838, -0.06241838, -0.06241838, -0.06241838,
         -0.06241838, -0.06241838, -0.06241838, -0.06241838, -0.06241838],
         [0.0, -0.02235469, -0.02235469, -0.02235469, -0.02235469,
         -0.02235469, -0.02235469, -0.02235469, -0.02235469, -0.02235469,
         -0.02235469, -0.02235469, -0.02235469, -0.02235469, -0.02235469,
         -0.02235469, -0.02235469, -0.02235469, -0.02235469, -0.02235469],
         [0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0,
          0.0, 0.0, 0.0, 0.0, 0.0]]]),
)
potentialSet.addPotential(_potential)

tersoffbrenner_carbon.py

Notes

Todo

We should add the actual formula once the TremoloX Manual is updated.

The correction potential that is used in the second generation REBO [1] and the AIREBO [2] potential. (In most papers it is denoted by pi_rc). It corrects the potential energy by using a tricubic spline that depends on the coordination numbers of the involved particles.

Parameters are added in a symmetric fashion, meaning that the correction will be applied to particleType1-particleType2 bonds as well as to particleType2-particleType1 bonds (if the two types are different).