ZBLStiwePotential¶
- class ZBLStiwePotential(particleType1, particleType2, f, A, B, p, gamma, C, d, r_f=None, r_cut=None)¶
Constructor of the potential.
- Parameters:
particleType1 (ParticleType or ParticleIdentifier) – Identifier of the first particle type.
particleType2 (ParticleType or ParticleIdentifier) – Identifier of the second particle type.
f (PhysicalQuantity of type length**-1) – Potential parameter.
A (PhysicalQuantity of type energy) – Potential parameter.
B (PhysicalQuantity of type length**p) – Potential parameter.
p (int) – Potential parameter.
gamma (PhysicalQuantity of type length) – Potential parameter.
C (PhysicalQuantity of type energy * length) – Potential parameter.
d (PhysicalQuantity of type length) – Potential parameter.
r_f (PhysicalQuantity of type length) – Radius in the Fermi function.
r_cut (PhysicalQuantity of type length) – Cutoff radius
- 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 Stillinger-Weber potential with additional ZBL repulsive term for silicon by adding particle types and interaction functions to the TremoloXPotentialSet.
# -*- coding: utf-8 -*-
# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------
# Set up lattice
lattice = FaceCenteredCubic(5.4306*Angstrom)
# Define elements
elements = [Silicon, Silicon]
# Define coordinates
fractional_coordinates = [[ 0. , 0. , 0. ],
[ 0.25, 0.25, 0.25]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
potentialSet = TremoloXPotentialSet(name='StillingerWeber_Si_1985')
potentialSet.addParticleType(ParticleType(
symbol='Si',
mass=28.0855*atomic_mass_unit,
atomicNumber=14
))
# Calculate the ZBL-prefactor A=e**2/(4*pi*eps_0)*Zi*Zj
ZBL_prefactor = elementary_charge**2/(4.0*numpy.pi*vacuum_permitivity)*14**2
# Calculate the ZBL-length 0.8854*a_0/(Zi*'0.23 + Zj*0.23)
ZBL_length = 0.8854*Bohr/(14**0.23 + 14**0.23)
potential = ZBLStiwePotential(
particleType1='Si',
particleType2='Si',
p=4.0,
A=15.2855528754*eV,
B=11.6031922834*Angstrom**4,
gamma=2.0951*Angstrom,
C=ZBL_prefactor,
d=ZBL_length,
f=14.0*Angstrom**-1,
r_f=0.95*Angstrom,
r_cut=3.77118*Angstrom
)
potentialSet.addPotential(potential)
potential = Stiwe3Potential(
particleType1='Si',
particleType2='Si',
particleType3='Si',
gamma0=2.51412*Angstrom,
gamma1=2.51412*Angstrom,
l=45.5343*eV,
cosTheta0=-0.333333333333,
type=1,
r_0=3.77118*Angstrom,
r_1=3.77118*Angstrom,
r_13=-1.0*Angstrom
)
potentialSet.addPotential(potential)
calculator = TremoloXCalculator(parameters=potentialSet)
calculator.setInternalOrdering("default")
calculator.setVerletListsDelta(0.25*Angstrom)
bulk_configuration.setCalculator(calculator)
bulk_configuration.update()
Notes¶
This potential can be used to combine a Stillinger-Weber potential with the universal Ziegler-Biersack-Littmark (ZBL) repulsive potential \(V^{\rm ZBL}\) [1].
To do so, the ZBLStiwePotential must be used instead of the normal Stiwe2Potential.
The ZBL-potential and the two-body Stillinger-Weber potential \(v_2\) are then mixed as follows
where \(F(r)\) is the Fermi function:
Note, that in this class the constructor arguments C and d correspond to \(A_{ij}\) and \(b_{ij}\).