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].
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.

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.

setCutoff(r_cut)

Set the cutoff radius for this potential.

Parameters:r_cut (PhysicalQuantity of type length) – The cutoff radius of this potential.
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

The correction potential that is used in the second generation REBO [BSH+02] and the AIREBO [STH00] 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).

[BSH+02]D. W. Brenner, O. Shenderova, J. Harrison, S. J. Stuart, B. Ni, and S. B Sinnott. A second-generation reactive empirical bond order (REBO) potential energy expression for hydrocarbons. J. Phys.: Condensed Matter, 14(4):783–802, 2002. arXiv:S0953-8984(02)31186-X, doi:10.1088/0953-8984/14/4/312.
[STH00]Steven J. Stuart, Alan B. Tutein, and Judith A. Harrison. A reactive potential for hydrocarbons with intermolecular interactions. J. Chem. Phys., 112(14):6472–6486, 2000. URL: https://doi.org/10.1063/1.481208.