MaddenEwaldOption

class MaddenEwaldOption(kappa, r_cut)

Constructor of the option.

Parameters:
  • kappa (PhysicalQuantity of type length**-1) – Splitting parameter of the Ewald summation.

  • r_cut (PhysicalQuantity of type length) – Real-space cutoff of the Ewald summation.

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 Madden-Potential potential for an MgSiO3 perovskite structure by adding particle types and interaction functions to the TremoloXPotentialSet.

# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------

# Set up lattice
lattice = SimpleOrthorhombic(4.7786*Angstrom, 4.9293*Angstrom, 6.9003*Angstrom)

# Define elements
elements = [Magnesium, Magnesium, Magnesium, Magnesium, Silicon, Silicon,
            Silicon, Silicon, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.9856,  0.0564,  0.25  ],
                          [ 0.0144,  0.9436,  0.75  ],
                          [ 0.4856,  0.4436,  0.75  ],
                          [ 0.5144,  0.5564,  0.25  ],
                          [ 0.    ,  0.5   ,  0.    ],
                          [ 0.    ,  0.5   ,  0.5   ],
                          [ 0.5   ,  0.    ,  0.5   ],
                          [ 0.5   ,  0.    ,  0.    ],
                          [ 0.1015,  0.4673,  0.25  ],
                          [ 0.8985,  0.5327,  0.75  ],
                          [ 0.6015,  0.0327,  0.75  ],
                          [ 0.3985,  0.9673,  0.25  ],
                          [ 0.6962,  0.2983,  0.0524],
                          [ 0.6962,  0.2983,  0.4476],
                          [ 0.3038,  0.7017,  0.5524],
                          [ 0.1962,  0.2017,  0.5524],
                          [ 0.8038,  0.7983,  0.4476],
                          [ 0.8038,  0.7983,  0.0524],
                          [ 0.1962,  0.2017,  0.9476],
                          [ 0.3038,  0.7017,  0.9476]]

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------

potential_set = TremoloXPotentialSet(name = 'Jahn_AlCaMgOSi_2007')

# Define and add the general particle types.
potential_set.addParticleType(
    ParticleType(
        symbol='Si',
        mass=28.0855*atomic_mass_unit,
        charge=4.0,
        sigma=None,
        sigma14=None,
        epsilon=None,
        epsilon14=None
    )
)
potential_set.addParticleType(
    ParticleType(
        symbol='Mg',
        mass=24.305*atomic_mass_unit,
        charge=2.0,
        sigma=None,
        sigma14=None,
        epsilon=None,
        epsilon14=None
    )
)
potential_set.addParticleType(
    ParticleType(
        symbol='O',
        mass=15.9994 * atomic_mass_unit,
        charge=-2.0,
        sigma=None,
        sigma14=None,
        epsilon=None,
        epsilon14=None
    )
)

# Define and add the Madden-Ewald-option.
option = MaddenEwaldOption(kappa=0.5, r_cut=7.5*Angstrom)
potential_set.addOption(option)

# Define and add the dispersive potential.
potential = MaddenDispersivePotential(
    particleType1='Mg',
    particleType2='O',
    b=4.1681689*1/Ang,
    C6=1.3021902*eV*Ang**6,
    C8=4.2341478*eV*Ang**8,
    kmax6=6,
    kmax8=8,
    r_cut=12.5*Angstrom
)
potential_set.addPotential(potential)
potential = MaddenDispersivePotential(
    particleType1='Si',
    particleType2='O',
    b=4.1681689*1/Ang,
    C6=1.3021902*eV*Ang**6,
    C8=4.2341478*eV*Ang**8,
    kmax6=6,
    kmax8=8,
    r_cut=12.5*Angstrom
)
potential_set.addPotential(potential)
potential = MaddenDispersivePotential(
    particleType1='O',
    particleType2='O',
    b=2.718371*1/Ang,
    C6=26.51346*eV*Ang**6,
    C8=142.77637*eV*Ang**8,
    kmax6=6,
    kmax8=8,
    r_cut=12.5*Angstrom
)
potential_set.addPotential(potential)

# Define and add the Madden particle type for oxygen.
potential = MaddenParticle(
    particleType='O',
    dipolePolarization=True,
    quadrupolePolarization=True,
    alpha=8.7671*elementary_charge**2*Bohr**2 / Hartree,
    B=0*elementary_charge**3*Bohr**4 / Hartree**2,
    C=11.5124*elementary_charge**2*Bohr**4 / Hartree ,
    dipoleDistortion=True,
    quadrupoleDistortion=True,
    D=0.49566*Hartree,
    beta=1.2325*Bohr**-1,
    zeta=0.89219*Bohr**-1,
    eta=4.3646*Bohr**-1,
    gamma=1*Hartree
)
potential_set.addPotential(potential)

# Define and add the repulsive potential.
potential = MaddenRepulsivePotential(
    particleType1='O',
    particleType2='Mg',
    A=1127.6125*eV,
    a=3.1346777*1/Ang,
    B=1615675.9*eV,
    b=7.3914748*1/Ang,
    C=170982.73*eV,
    c=8.0190528*1/Ang,
    r_cut=6.0*Angstrom
)
potential_set.addPotential(potential)
potential = MaddenRepulsivePotential(
    particleType1='O',
    particleType2='Si',
    A=1177.627*eV,
    a=2.9135798*1/Ang,
    B=1196266.8*eV,
    b=7.5233777*1/Ang,
    C=170982.73*eV,
    c=8.0190528*1/Ang,
    r_cut=6.0*Angstrom
)
potential_set.addPotential(potential)
potential = MaddenRepulsivePotential(
    particleType1='O',
    particleType2='O',
    A=0.0*eV,
    a=0.0*1/Ang,
    B=0.0*eV,
    b=0.0*1/Ang,
    C=14530.879*eV,
    c=5.03763186568*1/Ang,
    r_cut=6.0*Angstrom
)
potential_set.addPotential(potential)

# Define and add the polarization damping potential.
potential = MaddenPolarizationDampingPotential(
    particleType1='O',
    particleType2='Mg',
    bD=4.1853654*1/Ang,
    cD=2.828,
    kmaxD=4,
    bQ=3.6471714*1/Ang,
    cQ=1.3317,
    kmaxQ=6,
    r_cut=6.0*Angstrom
)
potential_set.addPotential(potential)
potential = MaddenPolarizationDampingPotential(
    particleType1='O',
    particleType2='Si',
    bD=4.015668*1/Ang,
    cD=1.5933,
    kmaxD=4,
    bQ=3.6974382*1/Ang,
    cQ=1.0592,
    kmaxQ=6,
    r_cut=6.0*Angstrom
)
potential_set.addPotential(potential)

# Set the Coulomb solver.
potential_set.setCoulombSolver(
  CoulombDSF(r_cut=9.0*Angstrom, alpha=0.2)
)

# Set up the TremoloX-calculator with the constructed Madden-potential.
calculator = TremoloXCalculator(parameters=potential_set)

bulk_configuration.setCalculator(calculator)
bulk_configuration.update()

# Optimize the structure and the cell.
bulk_configuration = OptimizeGeometry(
        bulk_configuration,
        max_forces=0.01*eV/Ang,
        max_stress=0.001*eV/Ang**3,
        max_steps=200,
        max_step_length=0.2*Ang,
        trajectory_filename=None,
        optimizer_method=LBFGS(),
        )
nlprint(bulk_configuration)

See also Notes on Madden Potential.