LatticeAtoms

class sknano.core.atoms.lattice_atoms.LatticeAtoms(*args, xperiodic=False, yperiodic=False, zperiodic=False, **kwargs)[source] [edit on github][source]

Bases: sknano.core.atoms.mixins.PBCAtomsMixin, sknano.core.atoms.atoms.Atoms

An Atoms sub-class for crystal structure lattice atoms.

Sub-class of Atoms class, and a container class for lists of LatticeAtom instances.

Parameters:atoms ({None, sequence, LatticeAtoms}, optional) – if not None, then a list of LatticeAtom instance objects or an existing LatticeAtoms instance object.

Attributes

M Total mass of Atoms.
Natoms Number of atoms in Atoms.
cell Alias for LatticeAtoms.cell_matrix.
cell_matrix Return the Crystal3DLattice.cell_matrix.
elements ndarray of Atom.elements.
fmtstr Format string.
lattice Return the LatticeAtom.lattice of the first atom in self.
masses ndarray of Atom.masss.
pbc Return boolean array of periodic boundaries set along x,y,z axes.
rs Vectors of LatticeAtom.rs Vectors
symbols ndarray of Atom.symbols.
xperiodic Return True if periodic along the x axis.
xs ndarray of LatticeAtom.xs values
yperiodic Return True if periodic along the y axis.
ys ndarray of LatticeAtom.ys values
zperiodic Return True if periodic along the z axis.
zs ndarray of LatticeAtom.zs values

Methods

append(atom)
clear()
copy()
count(item)
extend(other)
filter(condition[, invert]) Filter Atoms by condition.
filtered(condition[, invert]) Return new list of Atoms filtered by condition.
get_atoms([asarray, aslist]) Return Atoms either as list (default) or numpy array or self.
getattr(attr[, default, recursive]) Get ndarray of atom attributes attr.
index(item, *args)
insert(i, atom)
mapatomattr([from_attr, to_attr, attrmap]) Set/update atom attribute from another atom attribute with dict.
pop([i])
remove(item)
reset_attrs(**kwargs) Call corresponding reset_attrs method on each atom
reverse()
rezero([epsilon]) Set values with absolute value less than epsilon to zero.
select([selstr, selstrlist, verbose]) Return Atom or Atoms from selection command.
set_pbc(dims) Set periodic boundaries along dims.
sort([key, reverse])
todict() Return dict of constructor parameters.
unset_pbc() Turn of PBCs along all dimensions.
update_attrs(**kwargs) Call update_attrs method on each atom.
wrap_coords([pbc]) Wrap coordinates into lattice.