CoreShellHarmonicPotential¶
- class CoreShellHarmonicPotential(particleType1, particleType2, K, r0)¶
Constructor of the potential.
- Parameters:
particleType1 (ParticleType or ParticleIdentifier) – Identifier of the core particle type.
particleType2 (ParticleType or ParticleIdentifier) – Identifier of the shell particle type.
K (PhysicalQuantity of type energy * length**-2) – Potential parameter.
r0 (PhysicalQuantity of type length) – Potential parameter.
- 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 core-shell potential for TiO2-rutile by adding particle types and interaction functions to the TremoloXPotentialSet.
# Set up lattice
lattice = SimpleTetragonal(4.593*Angstrom, 2.959*Angstrom)
# Define elements
elements = [Titanium, Titanium, Oxygen, Oxygen, Oxygen, Oxygen]
# Define coordinates
fractional_coordinates = [[-0.002453289082, -0.007907909466, 0.008991998629],
[ 0.486821568998, 0.505349605489, 0.498303421225],
[ 0.313234905089, 0.31385912058 , -0.002386305869],
[ 0.708385881142, 0.705329563593, 0.004823488804],
[ 0.801244040623, 0.185105024712, 0.48201997633 ],
[ 0.183768385074, 0.808268364353, 0.489566273637]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Adding the core-shell potential.
# -------------------------------------------------------------
potentialSet = TremoloXPotentialSet(name = 'TiO2_CoreShell')
# Add a particle for the oxygen-shell.
# The shell must have zero mass.
potentialSet.addParticleType(ParticleType(symbol='O_shell',
mass=0.0*atomic_mass_unit,
charge=-1.598,
atomicNumber=None))
# Add a particle for the oxygen-core.
potentialSet.addParticleType(ParticleType(symbol='O',
mass=15.9994*atomic_mass_unit,
charge=0.5,
atomicNumber=8))
# Add a particle for titanium.
# For Ti we do not the core-shell approach to model polarization.
potentialSet.addParticleType(ParticleType(symbol='Ti',
mass=47.867*atomic_mass_unit,
charge=2.196,
atomicNumber=22))
# Add the harmonic core-shell coupling for oxygen.
potential = CoreShellHarmonicPotential(particleType1 = 'O',
particleType2 = 'O_shell',
K = 44.3*eV/Angstrom**2,
r0 = 0.0*Angstrom)
potentialSet.addPotential(potential)
# Add the normal short-ranged potentials between titanium atoms.
potential = TosiFumiPotential(particleType1 = 'Ti',
particleType2 = 'Ti',
A = 31120.528*eV,
B = 6.49350649351*1/Angstrom,
C = 5.25*eV*Angstrom**6,
D = 0.0*eV*Angstrom**8,
sigma = 0.0*Angstrom,
r_i = 5.0*Angstrom,
r_cut = 6.0*Angstrom)
potentialSet.addPotential(potential)
# Add short-ranged potentials between Ti and O-shells.
potential = TosiFumiPotential(particleType1 = 'Ti',
particleType2 = 'O_shell',
A = 16957.71*eV,
B = 5.15463917526*1/Angstrom,
C = 12.59*eV*Angstrom**6,
D = 0.0*eV*Angstrom**8,
sigma = 0.0*Angstrom,
r_i = 5.0*Angstrom,
r_cut = 6.0*Angstrom)
potentialSet.addPotential(potential)
# Add short-ranged potentials between O-shells.
potential = TosiFumiPotential(particleType1 = 'O_shell',
particleType2 = 'O_shell',
A = 11782.884*eV,
B = 4.2735042735*1/Angstrom,
C = 30.22*eV*Angstrom**6,
D = 0.0*eV*Angstrom**8,
sigma = 0.0*Angstrom,
r_i = 5.0*Angstrom,
r_cut = 6.0*Angstrom)
potentialSet.addPotential(potential)
# Set a Coulomb-solver for the electrostatic interactions.
potentialSet.setCoulombSolver(CoulombDSF(r_cut=9.0*Angstrom, alpha = 0.2))
calculator = TremoloXCalculator(parameters=potentialSet)
bulk_configuration.setCalculator(calculator)
See also Notes on Core-Shell Potential.