TersoffZBLPotential¶
- class TersoffZBLPotential(particleType1, particleType2, type, Z1, Z2, a0, rf, bf)¶
Constructor of the potential.
Note: TersoffSingleTypePotentials must be added for BOTH particle types!
- Parameters:
particleType1 (ParticleType or ParticleIdentifier) – Identifier of the first particle type.
particleType2 (ParticleType or ParticleIdentifier) – Identifier of the second particle type.
type (int) – either 1 or 2, sets the type of the actual potential
Z1 (float) – Potential parameter.
Z2 (float) – Potential parameter.
a0 (PhysicalQuantity of type length) – Potential parameter.
rf (PhysicalQuantity of type length) – Potential parameter.
bf (PhysicalQuantity of type length**-1) – Potential parameter.
- 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 a Tersoff potential for gold by adding particle types and interaction functions to the TremoloXPotentialSet.
# -------------------------------------------------------------
# Bulk configuration for FCC gold
# -------------------------------------------------------------
# Set up lattice
vector_a = [4.07825, 0.0, 0.0]*Angstrom
vector_b = [0.0, 4.07825, 0.0]*Angstrom
vector_c = [0.0, 0.0, 4.07825]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
elements = [Gold, Gold, Gold, Gold]
# Define coordinates
fractional_coordinates = [[ 0.0, 0.0, 0.0],
[ 0.5, 0.5, 0.0],
[ 0.5, 0.0, 0.5],
[ 0.0, 0.5, 0.5]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
# Create a new potential set
potentialSet = TremoloXPotentialSet(name='Tersoff_Au_2012')
# Add the particle type to the potential set
potentialSet.addParticleType(ParticleType(symbol='Au',
mass=196.967*atomic_mass_unit))
# Add the single type potential to the potential set
potentialSet.addPotential(TersoffSingleTypePotential('Au',
A=5445.22104118*eV,
B=247.287913089*eV,
R=3.0*Angstrom,
S=3.4*Angstrom,
l=3.13294032317/Angstrom,
mu=1.60663606317/Angstrom,
alpha=2.05/Angstrom,
beta=1.0,
omega=0.0006374494,
chi=1.0,
chiR=1.0,
m=1,
n=1.0,
c=3.351525,
d=0.1649262,
h=-0.9941884))
# Add the ZBL modification to the potential set
potentialSet.addPotential(TersoffZBLPotential('Au', 'Au',
type=1,
Z1=79.0,
Z2=79.0,
a0=0.529*Angstrom,
rf=1.7*Angstrom,
bf=12.0/Angstrom))
# Create the TremoloX calculator from the potential set
calculator = TremoloXCalculator(parameters=potentialSet)
bulk_configuration.setCalculator(calculator)
See also Notes on Tersoff Potentials.