MeamPairPotential¶
- class MeamPairPotential(particleType1, particleType2, latticeType, nearestNeighbors, alpha, referenceDistance, referenceEnergy, attrac=0.0, repuls=0.0, nn2=False, zbl=True)¶
Constructor of the potential.
- Parameters:
particleType1 (ParticleType or ParticleIdentifier) – Identifier of the particle type.
particleType2 (ParticleType or ParticleIdentifier) – Identifier of the particle type.
latticeType (str) – Type of the reference structure.
nearestNeighbors (int) – Number of nearest neighbors in the reference structure.
alpha (float) – Exponential decay factor for pair potential.
referenceDistance (PhysicalQuantity of type length) – The equilibrium nearest neighbor distance..
referenceEnergy (PhysicalQuantity of type energy) – The cohesive energy.
attrac (float) – The attractive factor in the pair potential.
repuls (float) – The repulsive factor in the pair potential.
nn2 (bool) – Triggers second nearest neighbor formulation for symmetric pair.
zbl (bool) – Toggles zbl blending for small distances.
- 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()¶
This potential does not really have useful defaults, so I’ll just make some up for testing only
- 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.