ReaxFFPotential

class ReaxFFPotential(file=None, qeq=None, qeqEps=None, qeqMaxIter=None, qeqSolver=None, lgvdw=None, bond_rcut=None, hbond_rcut=None, thb_bond_rcut=None, thb_bond_rcutsq=None, multiwell=None, multiwell_torsion=None, smoothed_torsion=None, smoothed_lone_pair=None, smoothed_sbo2=None, bo_cutoff=None, strict_bondpairs=None, parameter_container=None)

Constructor of the ReaxFF potential.

Parameters:
  • file (str) – The name of the file that contains the ReaxFF parameters. If parameter_container is not None, file will be ignored.

  • qeq (bool) – Flag for switching the charge equilibration (QeQ) on or off.

  • qeqEps (float) – The accuracy of the QeQ method.

  • qeqMaxIter (int) – Maximal number of iterations for the QeQ method.

  • qeqSolver

    The type of solver that will be used. Must be one of the following variables:

    ReaxFFPotential.sparse ReaxFFPotential.dense (only in case of 1 MPI process)

  • lgvdw (bool) – Flag for switching the LG correction on or off.

  • bond_rcut (PhysicalQuantity of type length) – Potential parameter.

  • hbond_rcut (PhysicalQuantity of type length) – Potential parameter.

  • thb_bond_rcut (float) – Potential parameter.

  • thb_bond_rcutsq (float) – Potential parameter.

  • multiwell (bool) – Potential parameter.

  • multiwell_torsion (bool) – Potential parameter.

  • smoothed_torsion (bool) – Potential parameter.

  • smoothed_lone_pair (bool) – Potential parameter.

  • smoothed_sbo2 (bool) – Potential parameter.

  • bo_cutoff (float) – Potential parameter.

  • strict_bondpairs (bool) – Potential parameter.

  • parameter_container (ReaxFFParameterContainer) – A ReaxFFParameterContainer which contains the ReaxFF parameters. If parameter_container is not None, the file will be ignored.

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(name, particleTypes=None, multiangle_index=None)

Get the value of a single parameter.

Parameters:
  • name (str) – The name of the parameter.

  • particleTypes – see setParameter

  • multiangle_index – see setParameter

getParameterByIndex(block, index, particleTypes=None, multiangle_index=None)

Get the value of a single parameter.

Parameters:
  • block (ReaxFFBlock) – The block that contains the parameter.

  • index (int) – The index of the parameter. Example: The 2nd parameter in the “angles” block, p_val1, has index 2. The index is 1-based.

  • particleTypes – see setParameter

  • multiangle_index – see setParameter

setParameter(name, value, particleTypes=None, multiangle_index=None)

Assign a value to a single parameter.

Parameters:
  • name (str) – The name of the parameter.

  • value (PhysicalQuantity or float or int) – The value the parameter will be set to.

  • particleTypes (None or ParticleType or list(ParticleType) or tuple(ParticleType)) – The particle types that identify the parameter. For torsion paremeters, the 1st and 4th particleType may be set to ParticleTypes(‘0’) if all particle types are meant.

  • multiangle_index (int) – If the parameter is an angle/torsion parameter, and multiwell/multiwell_torsion is set to True, then multiangle_index is used to specify which of the parameter blocks is meant. The index is 0-based, which means that multiangle_index = 0 specifies the first parameter block.

setParameterByIndex(block, index, value, particleTypes=None, multiangle_index=None)

Assign a value to a single parameter.

Parameters:
  • block (ReaxFFBlock) – The block that contains the parameter.

  • index (int) – The index of the parameter. Example: The 2nd parameter in the “angles” block, p_val1, has index 2. The index is 1-based.

  • value (PhysicalQuantity or float or int) – The value the parameter will be set to.

  • particleTypes – See setParameter

  • multiangle_index – See setParameter

Usage Examples

Define a potential for rutile titanium dioxide by adding particle types and interaction functions to the TremoloXPotentialSet.

# -------------------------------------------------------------
# Set up a TiO2 rutile crystal
# -------------------------------------------------------------

# Set up lattice
lattice = SimpleTetragonal(4.593*Angstrom, 2.959*Angstrom)

# Define elements
elements = [Titanium, Titanium, Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.0000,  0.0000,  0.0000],
                          [ 0.5000,  0.5000,  0.5000],
                          [ 0.3051,  0.3051,  0.0000],
                          [ 0.6949,  0.6949,  0.0000],
                          [ 0.8051,  0.1949,  0.5000],
                          [ 0.1949,  0.8051,  0.5000]]

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------

# Create a new potential set
potentialSet = TremoloXPotentialSet(name='ReaxFF_CHONTi_2012')

# Add the particle type to the potential set
potentialSet.addParticleType(ParticleType(symbol='H',
                                          mass=1.00794*atomic_mass_unit))
potentialSet.addParticleType(ParticleType(symbol='O',
                                          mass=15.9994*atomic_mass_unit))
potentialSet.addParticleType(ParticleType(symbol='Ti',
                                          mass=47.867*atomic_mass_unit))

# Add the ReaxFF potential to the potential set
potentialSet.addPotential(ReaxFFPotential(file='ffield.reax.Ti_C_H_O',
                                          qeq=True,
                                          qeqEps=1.000000e-06,
                                          qeqMaxIter=200,
                                          lgvdw=False,
                                          bond_rcut=5.0*Angstrom,
                                          hbond_rcut=7.5*Angstrom,
                                          thb_bond_rcut=0.001000,
                                          thb_bond_rcutsq=0.000010,
                                          multiwell=False,
                                          strict_bondpairs=True))

# Create a new TremoloX calculator from the potential set
calculator = TremoloXCalculator(parameters=potentialSet)

bulk_configuration.setCalculator(calculator)

Notes

The ReaxFFPotential implements the reactive force field (ReaxFF) to describe reactive processes [1].

You can only change the numerical parameters such as cutoff radii, convergence parameters and others. The actual potential parameters are read from a file, specified by the file argument. It is generally suggested to use only the predefined parameter sets.

You should carefully investigate and test whether the chosen ReaxFF potential is suitable for your desired application, as the potential may have been parametrized in a completely different context, even if it supports the same elements.