Atoms

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

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
firsto The first orbital of the corresponding atom in the consecutive list of orbitals
lasto The lasto orbital of the corresponding atom in the consecutive list of orbitals

Attributes

atom Return the unique atoms list
firsto The first orbital of the corresponding atom in the consecutive list of orbitals
lasto The lasto orbital of the corresponding atom in the consecutive list of orbitals
mass Return an array of masses of the contained objects
no Return the total number of orbitals in this list of atoms
orbitals Return an array of orbitals of the contained objects
specie Return the specie list

Methods

__init__([atom, na])
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 (also checks indices)
hassame(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 (also checks indices)

Parameters:

other : Atoms

the list of atoms to check against

R : bool, optional

if True also checks that the orbital radius are the same

See also

hassame
only check whether the two atoms are contained in both
firsto

The first orbital of the corresponding atom in the consecutive list of orbitals

hassame(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

See also

equal
explicit check of the indices and the contained atoms

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

lasto

The lasto orbital of the corresponding atom in the consecutive list of orbitals

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