ParticleType

class ParticleType(symbol, mass, charge=None, sigma=None, sigma14=None, epsilon=None, epsilon14=None, atomicNumber=None, tags=None)

Constructor of the ParticleType class.

Parameters:
  • symbol (str) – The element symbol of the particle.
  • mass (PhysicalQuantity of type mass) – The mass of particles of this type.
  • charge (PhysicalQuantity of type charge) – The nominal charge of the particle. This value is used when evaluating the Coulomb interactions.
  • sigma (PhysicalQuantity of type length) – Sigma parameter for Lennard-Jones like potentials.
  • sigma14 (PhysicalQuantity of type length) – Sigma parameter for Lennard-Jones like potentials if the bond order is 3.
  • epsilon (PhysicalQuantity of type energy) – Epsilon parameter for Lennard-Jones like potentials.
  • epsilon14 (PhysicalQuantity of type energy) – Epsilon parameter for Lennard-Jones like potentials if the bond order is 3.
  • atomicNumber (int) – The atomic number of this particle type.
  • tags (str, sequence of str or None) – Make this particle type correspond only to particles that have the given tags assigned to them.
addTag(tag)

Add a tag to this ParticleType.

Parameters:tag (str) – The tag name to be added.
distinguishableFrom(otherParticleType)

Determine if this ParticleType is distinguishable from another ParticleType. Distinguishable means here, that both ParticleTypes have different ParticleIdentifiers.

Parameters:otherParticleType (ParticleType) – The other ParticleType which the current type should be compared with.
Returns:True if the particle types are the same, False if they are different.
Return type:bool
static fromElement(element, charge=None, sigma=None, sigma14=None, epsilon=None, epsilon14=None, tags=None)

Create a ParticleType by using the information that is already stored in a given ATK Element.

Parameters:
  • element (PeriodicTableElement) – The element of the new ParticleType.
  • charge (PhysicalQuantity of type charge) – The nominal charge of the particle. This value is. used when evaluating the Coulomb interactions.
  • sigma (PhysicalQuantity of type length) – Sigma parameter for Lennard-Jones like potentials.
  • sigma14 (PhysicalQuantity of type length) – Sigma parameter for Lennard-Jones like potentials. if the bond order is 3.
  • epsilon (PhysicalQuantity of type energy) – Epsilon parameter for Lennard-Jones like potentials.
  • epsilon14 (PhysicalQuantity of type energy) – Epsilon parameter for Lennard-Jones like potentials if the bond order is 3.
  • tags (str, sequence of str or None) – Make this particle type correspond only to particles that have the given tags assigned to them.
Returns:

The new ParticleType object

Return type:

ParticleType

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 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.

getParticleIdentifier()

Return the ParticleIdentifier object that uniquely defines the particles that belong to this particle type.

getTremoloSymbol()

Get the symbol that will be passed to the Tremolo-X compute core.

setAtomicNumber(atomicNumber)

Set the atomic number.

Parameters:atomicNumber (int) – The new atomic number.
setCharge(charge)

Set the charge of the particle.

Parameters:charge (PhysicalQuantity of type charge) – The nominal charge of the particle. This value is used when evaluating the Coulomb interactions.
setEpsilon(epsilon)

Set the epsilon parameter of the particle.

Parameters:epsilon (PhysicalQuantity of type energy) – Epsilon parameter for Lennard-Jones like potentials.
setEpsilon14(epsilon14)

Set the epsilon14 parameter of the particle.

Parameters:epsilon14 (PhysicalQuantity of type energy) – Epsilon parameter for Lennard-Jones like potentials if the bond order is 3.
setMass(mass)

Set the mass of the particle.

Parameters:mass (PhysicalQuantity of type mass) – The mass of particles of this type.
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.
setSigma(sigma)

Set the sigma parameter of the particle.

Parameters:sigma (PhysicalQuantity of type length) – Sigma parameter for Lennard-Jones like potentials.
setSigma14(sigma14)

Sets the sigma14 parameter of the particle.

Parameters:sigma14 (PhysicalQuantity of type length) – Sigma parameter for Lennard-Jones like potentials if the bond order is 3.

Usage Examples

Define a potential for Quartz by adding particle types and interaction functions to the TremoloXPotentialSet.

# -------------------------------------------------------------
# Set up a SiO2 Quartz crystal
# -------------------------------------------------------------

# Set up lattice
lattice = Hexagonal(4.916*Angstrom, 5.4054*Angstrom)

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

# Define coordinates
fractional_coordinates = [[ 0.4697,  0.0000,  0.0000    ],
                          [ 0.0000,  0.4697,  0.66666667],
                          [ 0.5303,  0.5303,  0.33333333],
                          [ 0.4135,  0.2669,  0.1191    ],
                          [ 0.2669,  0.4135,  0.547567  ],
                          [ 0.7331,  0.1466,  0.785767  ],
                          [ 0.5865,  0.8534,  0.214233  ],
                          [ 0.8534,  0.5865,  0.452433  ],
                          [ 0.1466,  0.7331,  0.8809    ]]

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

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

# Create the Pedone_2006Fe2 potential by hand, by adding the individual components

potentialSet = TremoloXPotentialSet(name='Pedone_2006Fe2')

# Add the particle types to the potential set
potentialSet.addParticleType(ParticleType(symbol='Si',
                                          mass=28.0855*atomic_mass_unit,
                                          charge=2.4))
potentialSet.addParticleType(ParticleType(symbol='O',
                                          mass=15.9994*atomic_mass_unit,
                                          charge=-1.2))

# Add the pair potentials to the potential set
potentialSet.addPotential(MorsePotential('Si', 'O',
                                         r_0=2.1*Angstrom,
                                         k=2.0067*1/Ang,
                                         E_0=0.340554*eV,
                                         r_i=6.0*Angstrom,
                                         r_cut=7.5*Angstrom))
potentialSet.addPotential(Repulsive12Potential('Si', 'O',
                                               r_cut=7.5*Angstrom,
                                               c=1.0*Ang**12*eV))
potentialSet.addPotential(MorsePotential('O', 'O',
                                         r_0=3.618701*Angstrom,
                                         k=1.379316*1/Ang,
                                         E_0=0.042395*eV,
                                         r_i=6.0*Angstrom,
                                         r_cut=7.5*Angstrom))
potentialSet.addPotential(Repulsive12Potential('O', 'O',
                                               r_cut=7.5*Angstrom,
                                               c=22.0*Ang**12*eV))

# Add the coulomb solver to the potential set
potentialSet.setCoulombSolver(CoulombDSF(r_cut=9.0*Angstrom, alpha=0.2))

# Create the calculator from the potential set
calculator = TremoloXCalculator(parameters=potentialSet)

bulk_configuration.setCalculator(calculator)
bulk_configuration.update()

Create a new ParticleType only for hydrogen atoms with tag “HO”.

Notes

The class is used for defining properties of a particle type. You can specify the mass, the partial charge, and the Lennard-Jones parameters.

The partial charges specified here only become active, if a Coulomb solver (e.g. CoulombDSF) is added to the TremoloXPotentialSet. The same holds for the Lennard-Jones parameters sigma and epsilon, which require a Lennard-Jones pair potential (e.g. LennardJonesPotential) between all particle type pairs.

The Lennard-Jones parameters for 1-4 interactions are relevant for bonded force fields. Here, the arguments sigma14 and epsilon14 specify the Lennard-Jones parameters that are used between atoms which are separated by exactly 3 bonds when a LennardJonesPotential is defined with bonded_mode='mode_14'.

The static method ParticleType.fromElement() can be used to automatically take the particle properties from the given element.

A tagged particle type can to be created by giving the tag name in ParticleType. Then this particle type refers only to those atoms of the given element which have this tag. All remaining atoms of this element then correspond to another ParticleType which has been created without tag. Tag names that are not used with any ParticleType are ignored in this TremoloXPotentialSet.