sisl.Atom
- class sisl.Atom
Bases:
_DispatchsAtomic information for a single atomic species
An atomic object retaining information about a single atomic species. It describes the atomic number (integer), the mass of the atom, and holds a list of atomic centered orbitals. It also allows one to tag the atom to distinguish it from other atoms of the same species.
- Parameters:
Z – determine species for the atomic species.
orbitals (
listofOrbitalorfloat, optional) – orbitals associated with this atom. SeeOrbitalfor details on how to define orbitals. Defaults to one orbital.mass – the atomic mass, defaults to the mass found in
PeriodicTable.tag – arbitrary designation for user handling similar atoms with different settings (defaults to the label of the atom)
Examples
>>> Carbon = Atom(6) >>> Carbon = Atom("C") >>> Carbon = Atom("Carbon")
Add a tag to be able to distinguish it from other atoms
>>> tagged_Carbon = Atom("Carbon", tag="siteA")
Create deuterium
>>> D = Atom("H", mass=2.014)
Define an atom with 3 orbitals, each with a range of 2 Angstroem
>>> C3 = Atom("C", orbitals=[2, 2, 2])
Define an atom outside of the periodic table (negative will yield an AtomGhost object)
>>> ghost_C = Atom(-6)
Define an unknown atom (basically anything can do)
>>> unknown_atom = Atom(1000)
Notes
One can define atoms outside of the periodic table. They will generally be handled in this order:
negative numbers will be converted into positive ones, and the returned object will be an
AtomGhostany other number (or name) not found in the periodic table will be returned in an AtomUnknown object
The mass for atoms outside the periodic table will default to 1e40 amu.
Conversion
A dispatcher for classes, using __get__ it converts into ObjectDispatcher upon invocation from an object, or a TypeDispatcher when invoked from a class
to.Sphere(*args[, center])Methods
copy([Z, orbitals, mass, tag])Return copy of this object
equal(other[, R, psi])True if other is the same as this atomic species
index(orbital)Return the index of the orbital in the atom object
iter([group])Loop on all orbitals in this atom
maxR()Return the maximum range of orbitals.
radius([method])Return the atomic radius of the atom (in Ang)
remove(orbitals)Return the same atom without a specific set of orbitals
scale(scale)Scale the atomic radii and return an equivalent atom.
sub(orbitals)Return the same atom with only a subset of the orbitals present
toSphere([center])Return a sphere with the maximum orbital radius equal
Attributes
Atomic number
The column of the atom in the periodic table.
Atomic mass
Number of orbitals on this atom
List of orbitals
The row of the atom in the periodic table.
Return short atomic name (Au==79).
Tag for atom
- copy(Z=None, orbitals=None, mass=None, tag=None)
Return copy of this object
- equal(other, R=True, psi=False)[source]
True if other is the same as this atomic species
- Parameters:
other (
Atom) – the other object to check againtsR (
bool, optional) – if True the equality check also checks the orbital radius, else they are not comparedpsi (
bool, optional) – if True, also check the wave-function component of the orbitals, seeOrbital.psi
- radius(method='calc')[source]
Return the atomic radius of the atom (in Ang)
See
PeriodicTable.radiusfor details on the argument.- Parameters:
method (Literal['calc', 'empirical', 'vdw'])
- remove(orbitals)
Return the same atom without a specific set of orbitals
- Parameters:
- Returns:
without the specified orbitals
- Return type:
See also
Atom.subretain a selected set of orbitals
- scale(scale)
Scale the atomic radii and return an equivalent atom.
- sub(orbitals)
Return the same atom with only a subset of the orbitals present
- to.Sphere(*args, center=None, **kwargs)
- toSphere(center=None)[source]
Return a sphere with the maximum orbital radius equal
- Returns:
a sphere with radius equal to the maximum radius of the orbitals
- Return type:
- property column: int
The column of the atom in the periodic table.
May return NotImplemented if the element isn’t found in the periodic table.
Only covers up to Z=118.
See also
rowfor getting the periodic table row
PeriodicTable.Z_rowused to extract the periodic table row of an atomic number
PeriodicTable.Z_columnused to extract the periodic table column of an atomic number
- property orbitals
List of orbitals
- property row: int
The row of the atom in the periodic table.
May return NotImplemented if the element isn’t found in the periodic table.
Only covers up to Z=118.
See also
columnfor getting the periodic table column
PeriodicTable.Z_rowused to extract the periodic table row of an atomic number
PeriodicTable.Z_columnused to extract the periodic table column of an atomic number
- property symbol
Return short atomic name (Au==79).
- to
A dispatcher for classes, using __get__ it converts into ObjectDispatcher upon invocation from an object, or a TypeDispatcher when invoked from a class
This is a class-placeholder allowing a dispatcher to be a class attribute and converted into an ObjectDispatcher when invoked from an object.
If it is called on the class, it will return a TypeDispatcher.
This class should be an attribute of a class. It heavily relies on the __get__ special method.
- Parameters:
name (
str) – name of the attribute in the classdispatchs (
dict, optional) – dictionary of dispatch methodsobj_getattr (
callable, optional) – method with 2 arguments, anobjand theattrwhich may be used to control how the attribute is called.instance_dispatcher (
AbstractDispatcher, optional) – control how instance dispatchers are handled through __get__ method. This controls the dispatcher used if called from an instance.type_dispatcher (
AbstractDispatcher, optional) – control how class dispatchers are handled through __get__ method. This controls the dispatcher used if called from a class.
Examples
>>> class A: ... new = ClassDispatcher("new", obj_getattr=lambda obj, attr: getattr(obj.sub, attr))
The above defers any attributes to the contained A.sub attribute.