MeamGlobalOption¶
- class MeamGlobalOption(delr=None, erose=None, wf_mixing=None, augment_1st=None, r_cut=None, embedding_negative=None, density_scaling=None, use_spline=None)¶
Constructor of this option.
- Parameters:
delr (PhysicalQuantity of type length) – Smoothing delta for screening function.
erose (int) – Choses the form of the rose energy function.
wf_mixing (int) – Mixing rule for the weighting factors.
augment_1st (bool) – Flag whether the first weighting factor will be augmented.
r_cut (PhysicalQuantity of type length) – Global cutoff radius.
embedding_negative (bool) – Flag to enable linear embedding for negative densities.
density_scaling (bool) – Flag to toggle dynamo style background density.
use_spline (bool) – If set to False, MEAM will not precompute pair interactions. In most cases, this will make the calculation slower, except for some potential fitting applications.
- 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 MEAM potential for a SiO2 quartz crystal by adding particle types and interaction functions to the TremoloXPotentialSet.
# Set up lattice
vector_a = [5.4306, 0.0, 0.0]*Angstrom
vector_b = [0.0, 5.4306, 0.0]*Angstrom
vector_c = [0.0, 0.0, 5.4306]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
elements = [Silicon, Silicon, Silicon, Silicon, Silicon, Silicon, Silicon,
Silicon]
# Define coordinates
fractional_coordinates = [[ 0. , 0. , 0. ],
[ 0.25, 0.25, 0.25],
[ 0.5 , 0.5 , 0. ],
[ 0.75, 0.75, 0.25],
[ 0.5 , 0. , 0.5 ],
[ 0.75, 0.25, 0.75],
[ 0. , 0.5 , 0.5 ],
[ 0.25, 0.75, 0.75]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
potentialSet = TremoloXPotentialSet(name='MEAM_Si_2007')
potentialSet.addParticleType(ParticleType(
symbol='Si',
mass=28.0855*atomic_mass_unit,
charge=None,
sigma=None,
sigma14=None,
epsilon=None,
epsilon14=None,
atomicNumber=14,
tags=[],
))
_option = MeamGlobalOption(
delr=0.1*Angstrom,
erose=2,
wf_mixing=2,
r_cut=4.5*Angstrom,
augment_1st=0.0,
embedding_negative=False,
density_scaling=False,
)
potentialSet.addOption(_option)
_potential = MeamElementPotential(
particleType=ParticleIdentifier('Si', []),
latticeType='dia',
nearestNeighbors=4,
alpha=4.89890486934,
beta=[3.55, 2.5, 0.0, 7.5, ],
referenceDistance=2.35*Angstrom,
referenceEnergy=4.63*eV,
scalingFactor=0.58,
weightingFactors=[1.8, 5.25, -2.61, ],
rho=1.0,
gamma=3,
attrac=0.0,
repuls=0.0,
nn2=True,
zbl=False,
)
potentialSet.addPotential(_potential)
_potential = MeamScreeningPotential(
particleType1=ParticleIdentifier('Si', []),
particleType2=ParticleIdentifier('Si', []),
particleType3=ParticleIdentifier('Si', []),
Cmin=1.41,
Cmax=2.8,
)
potentialSet.addPotential(_potential)
calculator = TremoloXCalculator(parameters=potentialSet)
calculator.setVerletListsDelta(0.25*Angstrom)
bulk_configuration.setCalculator(calculator)
bulk_configuration.update()
See also Notes on MEAM Potential.