D4Potential¶
- class D4Potential(file=None, fileD3=None, S6=None, a1=None, S8=None, a2=None, r_cut=None, bond_rcut=None, triple_rcut=None, taper_factor=None, ATM=None, EEQ_rcut=None, DSF_alpha=None, EEQ_only=None)¶
Constructor of the potential.
- Parameters:
file (str) – The name of the file that contains the D4 parameters.
fileD3 (str) – The name of the file that contains the involved D3 parameters.
S6 (float) – The dimensionless BJ/Z parameter S6
a1 (float) – The dimensionless BJ parameter a1 By setting S6r = 0 and a1!=0 or a2!=0 one chooses BJ damping
S8 (float) – The dimensionless BJ/Z parameter S8
a2 (PhysicalQuantity of type length) – The BJ parameter a2 By setting S6r = 0 and a1!=0 or a2!=0 one chooses BJ damping
r_cut (PhysicalQuantity of type length) – The cutoff radius for the interactions
bond_rcut (PhysicalQuantity of type length) – The cutoff radius for the coordination numbers
triple_rcut (PhysicalQuantity of type length) – The cutoff radius for the ATM interaction
taper_factor (float) – The dimensionless taper_factor for bond_rcut and r_cut
ATM (bool) – The parameter to switch on the Axilrod-Teller-Muto three-body terms
EEQ_rcut (PhysicalQuantity of type length) – The cutoff radius for the EEQ interactions
DSF_alpha (PhysicalQuantity of type length**-1) – Damping parameter in the DSF method. It determines how fast the Coulomb interactions decay with the particle distance. For alpha >0 the DSF approach is used to approximate erf(g r)/r If alpha <= 0, it’s just erf(g r)/r
EEQ_only (bool) – The parameter to switch if just the EEQ term is applied (and not the C6 Dispersion term)
- 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 D4 potential ([1], [2], [3]) for a Si/SiO2 interface to be used with an MTPPotential by adding particle types and interaction functions to the TremoloXPotentialSet.
# -*- coding: utf-8 -*-
# Set up lattice
vector_a = [5.4306, 0.0, 0.0]*Angstrom
vector_b = [4.440892098500626e-16, 5.4306, 0.0]*Angstrom
vector_c = [0.0, 0.0, 21.495928431319584]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
elements = [Silicon, Silicon, Silicon, Silicon, Silicon, Silicon, Silicon,
Silicon, Silicon, Silicon, Silicon, Silicon, Oxygen, Oxygen,
Oxygen, Silicon, Oxygen, Oxygen, Oxygen, Silicon]
# Define coordinates
fractional_coordinates = [[ 0.17467925 , 0.135152125 , 0.235604166294],
[ 0.67467925 , 0.635152125 , 0.235604166294],
[ 0.92467925 , 0.385152125 , 0.298762638576],
[ 0.42467925 , 0.885152125 , 0.298762638576],
[ 0.67467925 , 0.135152125 , 0.361921110858],
[ 0.17467925 , 0.635152125 , 0.361921110858],
[ 0.42467925 , 0.385152125 , 0.42507958314 ],
[ 0.92467925 , 0.885152125 , 0.42507958314 ],
[ 0.17467925 , 0.135152125 , 0.488238055421],
[ 0.67467925 , 0.635152125 , 0.488238055421],
[ 0.05955 , 0.614847875 , 0.566340611359],
[ 0.392883333333, 0.114847875 , 0.578342757834],
[ 0.273783 , 0.819847875 , 0.589473461329],
[ 0.845317 , 0.599947875 , 0.618508356925],
[ 0.511983 , 0.220197875 , 0.642334400174],
[ 0.726216666667, 0.410297875 , 0.67136929577 ],
[ 0.94045 , 0.220197875 , 0.700404191366],
[ 0.607117 , 0.599947875 , 0.724230234614],
[ 0.17865 , 0.819847875 , 0.75326513021 ],
[ 0.05955 , 0.114847875 , 0.764395833706]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
# Create a new MTP potential set
mtp_potential_set = TremoloXPotentialSet('MTP')
mtp_potential_set.addParticleType(ParticleType('Si'))
mtp_potential_set.addParticleType(ParticleType('O'))
mtp_potential_set.addPotential(MTPPotential(
file = 'MTP_Si_SiO2_interface_small.mtp',
suppress_intercept = False,
))
# Create a new D4 potential set
d4_potential_set = TremoloXPotentialSet('D4')
d4_potential_set.addParticleType(ParticleType('Si'))
d4_potential_set.addParticleType(ParticleType('O'))
# D4BJ parameters for PBE.
d4_potential_set.addPotential(D4Potential(
file=None,
S6=+1.00000000,
S8=+0.95948085,
a1=+0.38574991,
a2=+4.80688534*Bohr,
EEQ_only=True
))
calculator = TremoloXCalculator(
parameters=[mtp_potential_set, d4_potential_set]
)
bulk_configuration.setCalculator(calculator)
Notes¶
Currently only the electronegativity equilibrium model (EEQ) part of the D4 potential is available as a standalone model,
which means it can only be used with EEQ_only=True
.