ModifiedStiwe3Potential¶
- class ModifiedStiwe3Potential(particleType1, particleType2, particleType3, a, b, c, d, e, f, g, h, alpha, beta, gamma, omega, r_i, 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.
particleType3 (ParticleType or ParticleIdentifier) – Identifier of the second particle type.
a (PhysicalQuantity of type energy) – Potential parameter.
b (PhysicalQuantity of type energy) – Potential parameter.
c (PhysicalQuantity of type energy) – Potential parameter.
d (PhysicalQuantity of type energy / length**5) – Potential parameter.
e (PhysicalQuantity of type energy / length**4) – Potential parameter.
f (PhysicalQuantity of type energy / length**3) – Potential parameter.
g (PhysicalQuantity of type energy**-1) – Potential parameter.
h (PhysicalQuantity of type energy**-1) – Potential parameter.
alpha (PhysicalQuantity of type length**-1) – Potential parameter.
beta (PhysicalQuantity of type length**-1) – Potential parameter.
gamma (PhysicalQuantity of type length**-1) – Potential parameter.
omega (Physical Quantity of type angle) – Potential parameter.
r_i (PhysicalQuantity of type length) – Inner cutoff radius
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 potential for selenium by adding particle types and interaction functions to the TremoloXPotentialSet.
# Set up lattice
lattice = Hexagonal(4.35517*Angstrom, 4.94945*Angstrom)
# Define elements
elements = [Selenium, Selenium, Selenium]
# Define coordinates
fractional_coordinates = [[0.217, -0. , 0.166666666667],
[0.0 , 0.217, 0.833333333333],
[0.783, 0.783, 0.5 ]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
potentialSet = TremoloXPotentialSet(name='Oligschleger_Se_1996')
potentialSet.addParticleType(ParticleType(
symbol='Se',
mass=78.96*atomic_mass_unit,
atomicNumber=34
))
potential = ModifiedStiwe2Potential(
particleType1='Se',
particleType2='Se',
a=29827.6728838*eV,
b=0.861355523673*eV,
c=-53.3454232425*eV,
d=0.36561835*eV/Angstrom**5,
e=1.5708619*eV/Angstrom**4,
f=2.1702274*eV/Angstrom**3,
alpha=-4.5617982906*1/Angstrom,
beta=-4.44415371795e-05*1/Angstrom,
gamma=-1.06468623932*1/Angstrom,
r_i=2.80029917726*Angstrom,
r_cut=4.14794315632*Angstrom
)
potentialSet.addPotential(potential)
potential = ModifiedStiwe3Potential(
particleType1='Se',
particleType2='Se',
particleType3='Se',
a=28.3766542324*eV,
b=-8.33395695839*eV,
c=-22.2984447633*eV,
d=0.044142311935*eV/Angstrom**5,
e=0.0429066410484*eV/Angstrom**4,
f=-0.126000984941*eV/Angstrom**3,
g=10.7308750893*1/eV,
h=3.72061089286*1/eV,
alpha=-0.271976653846*1/Angstrom,
beta=-0.893447393162*1/Angstrom,
gamma=-0.211685952991*1/Angstrom,
omega=95.3688,
r_i=2.80029917726*Angstrom,
r_cut=4.1129394166*Angstrom
)
potentialSet.addPotential(potential)
calculator = TremoloXCalculator(parameters=potentialSet)
calculator.setInternalOrdering("default")
calculator.setVerletListsDelta(0.25*Angstrom)
bulk_configuration.setCalculator(calculator)
bulk_configuration.update()
Notes¶
The ModifiedStiwe2Potential and ModifiedStiwe3Potential classes implement a modified version of the original Stillinger-Weber potentials Stiwe2Potential and Stiwe3Potential [1], as described in [2].