sisl.atom module

Atomic information in different object containers.

Atomic information can be created and handled using the PeriodicTable object or the Atom object, or lastly the combined object Atoms.

  • The PeriodicTable enables a lookup table for generic information about the atomic species in the periodic table of elements.
  • The Atom enables creating atoms with associated information, such as
    • Mass
    • Species
    • Number of associated orbitals
    • Radii of each associated orbital
    • Custom tag (useful for denoting pseudo potentials)
  • The Atoms object is a sorted, unique list of Atom such that one can contain a list of atoms. Instead of storing all Atom objects which may have many dublicates, the Atoms object has a unique list of Atom objects and an index list (Atoms.specie). This object enables a fast lookup of atoms without having to duplicate too much memory.
class sisl.atom.PeriodicTable[source]

Bases: object

Periodic table for creating an Atom, or retrieval of atomic information via atomic numbers

Enables lookup of atomic numbers/names/labels to get the atomic number.

>>> 79 == PeriodicTable().Z('Au')
>>> 79 == PeriodicTable().Z_int('Au')
>>> 'Au' == PeriodicTable().Z_short(79)
>>> 'Au' == PeriodicTable().Z_label(79)
>>> 'Au' == PeriodicTable().Z_label('Gold')

Several quantities available to the atomic species are available from

The following values are accesible:

  • atomic mass (in atomic units)
  • empirical atomic radii (in Ang)
  • calculated atomic radii (in Ang)
  • van der Waals atomic radii (in Ang)

For certain species the above quantities are not available and a negative number is returned.

Examples

>>> 12.0107 == PeriodicTable().atomic_mass('C')
True
>>> 12.0107 == PeriodicTable().atomic_mass(6)
True
>>> 12.0107 == PeriodicTable().atomic_mass('Carbon')
True
>>> .67 == PeriodicTable().radii('Carbon')
True
>>> .67 == PeriodicTable().radii(6,'calc')
True
>>> .7  == PeriodicTable().radii(6,'empirical')
True
>>> 1.7 == PeriodicTable().radii(6,'vdw')
True

Methods

Z(key) Atomic number based on general input
Z_int(key) Atomic number based on general input
Z_label(key) Atomic label of the corresponding atom
Z_short(key) Atomic label of the corresponding atom
atomic_mass(key) Atomic mass of the corresponding atom
radii(key[, method]) Atomic radii using different methods
radius(key[, method]) Atomic radii using different methods
Z(key)[source]

Atomic number based on general input

Return the atomic number corresponding to the key lookup.

Parameters:

key : array_like or str or int

Uses value to lookup the atomic number in the PeriodicTable object.

Returns:

Z : ndarray or int

The atomic number corresponding to key, if key is array_like, so will the returned value be.

Examples

>>> 79 == PeriodicTable().Z_int('Au')
True
>>> 79 == PeriodicTable().Z('Au')
True
>>> 6 == PeriodicTable().Z('Carbon')
True
Z_int(key)

Atomic number based on general input

Return the atomic number corresponding to the key lookup.

Parameters:

key : array_like or str or int

Uses value to lookup the atomic number in the PeriodicTable object.

Returns:

Z : ndarray or int

The atomic number corresponding to key, if key is array_like, so will the returned value be.

Examples

>>> 79 == PeriodicTable().Z_int('Au')
True
>>> 79 == PeriodicTable().Z('Au')
True
>>> 6 == PeriodicTable().Z('Carbon')
True
Z_label(key)[source]

Atomic label of the corresponding atom

Return the atomic short name corresponding to the key lookup.

Parameters:

key : array_like or str or int

Uses value to lookup the atomic short name in the PeriodicTable object.

Returns:

name : ndarray or str

The atomic short name corresponding to key, if key is array_like, so will the returned value be.

Z_short(key)

Atomic label of the corresponding atom

Return the atomic short name corresponding to the key lookup.

Parameters:

key : array_like or str or int

Uses value to lookup the atomic short name in the PeriodicTable object.

Returns:

name : ndarray or str

The atomic short name corresponding to key, if key is array_like, so will the returned value be.

atomic_mass(key)[source]

Atomic mass of the corresponding atom

Return the atomic mass corresponding to the key lookup.

Parameters:

key : array_like or str or int

Uses value to lookup the atomic mass in the PeriodicTable object.

Returns:

name : ndarray or float

The atomic mass in atomic units corresponding to key, if key is array_like, so will the returned value be.

radii(key, method='calc')

Atomic radii using different methods

Return the atomic radii.

Parameters:

key : array_like or str or int

Uses value to lookup the atomic mass in the PeriodicTable object.

method : {‘calc’, ‘empirical’, ‘vdw’}

There are 3 different radii stored:

  1. calc, the calculated atomic radii
  2. empirical, the empirically found values
  3. vdw, the van-der-Waals found values
Returns:

radius : ndarray or float

The atomic radius in Ang

radius(key, method='calc')[source]

Atomic radii using different methods

Return the atomic radii.

Parameters:

key : array_like or str or int

Uses value to lookup the atomic mass in the PeriodicTable object.

method : {‘calc’, ‘empirical’, ‘vdw’}

There are 3 different radii stored:

  1. calc, the calculated atomic radii
  2. empirical, the empirically found values
  3. vdw, the van-der-Waals found values
Returns:

radius : ndarray or float

The atomic radius in Ang

class sisl.atom.Atom(Z, R=None, orbs=None, mass=None, tag=None)[source]

Bases: object

Atomic information, mass, name number of orbitals and ranges

Object to handle atomic mass, name, number of orbitals and orbital range.

The Atom object handles the atomic species with information such as

  • atomic number
  • mass
  • number of orbitals
  • radius of each orbital

The Atom object is pickle-able.

Parameters:

Z : int or str

key lookup for the atomic specie, Atom[key]

R : array_like or float

the range of the atomic orbitals

orbs : int

number of orbitals attached to this atom NOTE: Length of R precedes this quantity.

mass : float, optional

the atomic mass, if not specified uses the mass from PeriodicTable

tag : str

arbitrary designation for user handling similar atoms with different settings (defaults to the label of the atom)

Attributes

Z (int) atomic number
R (ndarray) radius of orbitals belonging to the Atom
orbs (int) number of orbitals belonging to the Atom
mass (float) mass of Atom

Methods

copy([Z, R, orbs, mass, tag]) Return copy of this object
equal(other[, R]) True if other is the same as this atomic specie
maxR() Return the maximum range of orbitals.
radii([method]) Return the atomic radii of the atom (in Ang)
radius([method]) Return the atomic radii of the atom (in Ang)
scale(scale) Scale the atomic radii and return an equivalent atom.
copy(Z=None, R=None, orbs=None, mass=None, tag=None)[source]

Return copy of this object

equal(other, R=True)[source]

True if other is the same as this atomic specie

Parameters:

other : Atom

the other object to check againts

R : bool, optional

if True the equality check also checks the orbital radii, else they are not compared

maxR()[source]

Return the maximum range of orbitals.

radii(method='calc')

Return the atomic radii of the atom (in Ang)

See PeriodicTable.radius for details on the argument.

radius(method='calc')[source]

Return the atomic radii of the atom (in Ang)

See PeriodicTable.radius for details on the argument.

scale(scale)[source]

Scale the atomic radii and return an equivalent atom.

Parameters:

scale : float

the scale factor for the atomic radii

symbol

Return short atomic name (Au==79).

class sisl.atom.Atoms(atom=None, na=None)[source]

Bases: object

A list-like object to contain a list of different atoms with minimum data duplication.

This holds multiple Atom objects which are indexed via a species index. This is convenient when having geometries with millions of atoms because it will not duplicate the Atom object, only a list index.

Attributes

atom Return the unique atoms list
specie Return the specie list

Methods

add(other) Append other to this list of atoms and return the appended version
append(other) Append other to this list of atoms and return the appended version
copy() Return a copy of this atom
equal(other[, R]) True if the contained atoms are the same in the two lists
index(atom) Return the species index of the atom object
insert(index, other) Insert other atoms into the list of atoms at index
maxR([all]) The maximum radius of the atoms
prepend(other)
reduce() Returns a new Atoms object by removing non-used atoms
remove(atom) Remove a set of atoms
reorder() Reorders the atoms and species index so that they are ascending
repeat(reps) Repeat this atom object
reverse([atom]) Returns a reversed geometry
scale(scale) Scale the atomic radii and return an equivalent atom.
sub(atom) Return a subset of the list
swap(a, b) Swaps atoms
tile(reps) Tile this atom object
add(other)

Append other to this list of atoms and return the appended version

append(other)[source]

Append other to this list of atoms and return the appended version

atom

Return the unique atoms list

copy()[source]

Return a copy of this atom

equal(other, R=True)[source]

True if the contained atoms are the same in the two lists

Parameters:

other : Atoms

the list of atoms to check against

R : bool, optional

if True also checks that the orbital radius are the same

Notes

This does not necessarily mean that the order, nor the number of atoms are the same.

index(atom)[source]

Return the species index of the atom object

insert(index, other)[source]

Insert other atoms into the list of atoms at index

mass

Return an array of masses of the contained objects

maxR(all=False)[source]

The maximum radius of the atoms

Parameters:

all : bool

determine the returned maximum radii. If True is passed an array of all atoms maximum radii is returned (array). Else, if False the maximum of all atoms maximum radii is returned (scalar).

no

Return the total number of orbitals in this list of atoms

orbitals

Return an array of orbitals of the contained objects

prepend(other)[source]
reduce()[source]

Returns a new Atoms object by removing non-used atoms

remove(atom)[source]

Remove a set of atoms

reorder()[source]

Reorders the atoms and species index so that they are ascending

repeat(reps)[source]

Repeat this atom object

reverse(atom=None)[source]

Returns a reversed geometry

Also enables reversing a subset of the atoms.

scale(scale)[source]

Scale the atomic radii and return an equivalent atom.

Parameters:

scale : float

the scale factor for the atomic radii

specie

Return the specie list

sub(atom)[source]

Return a subset of the list

swap(a, b)[source]

Swaps atoms

tile(reps)[source]

Tile this atom object