sknano.core.atoms.BasisAtoms

class sknano.core.atoms.BasisAtoms(atoms=None, casttype=True, **kwargs)[source][source]

An Atoms sub-class for crystal structure basis atoms.

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

Parameters:

atoms : {None, sequence, BasisAtoms}, optional

if not None, then a list of BasisAtom instance objects or an existing BasisAtoms instance object.

Attributes

CM Alias for center_of_mass.
M Total mass of Atoms.
Natoms Number of atoms in Atoms.
bounds Bounds of Atoms.
center_of_mass Center-of-Mass coordinates of Atoms.
centroid Centroid of Atoms.
com Alias for center_of_mass.
coords Alias for Atoms.r.
dr ndarray of Atom.dr displacement Vectors
elements ndarray of Atom.elements in Atoms.
fmtstr
inertia_tensor Inertia tensor.
lattice
masses ndarray of Atom.masss in Atoms.
pbc
r ndarray of Atom.r position Vectors
rs ndarray of Atom.r position Vectors
symbols ndarray of Atom.symbols in Atoms.
x ndarray of Atoms \(x\) coordinates.
xs ndarray of Atoms \(x\) coordinates.
y ndarray of Atoms \(y\) coordinates.
ys ndarray of Atoms \(y\) coordinates.
z ndarray of Atoms \(z\) coordinates.
zs ndarray of Atoms \(z\) coordinates.

Methods

append(atom)
center_CM([axis]) Alias for center_center_of_mass.
center_center_of_mass([axis]) Center atoms on center-of-mass coordinates.
center_centroid() Center centroid on origin.
center_com([axis]) Alias for center_center_of_mass.
clear()
clip_bounds(region[, center_before_clipping]) Remove atoms outside the given region.
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]) Return list of Atoms.
get_coords([asdict]) Return atom coords.
getatomattr(attr) Get ndarray of atom attributes attr.
index(item, *args)
insert(i, item)
mapatomattr([from_attr, to_attr, attrmap]) Set/update atom attribute from another atom attribute with dict.
pop([i])
remove(item)
reverse()
rezero([epsilon]) Set values with absolute value less than epsilon to zero.
rezero_coords([epsilon]) Alias for Atoms.rezero_xyz.
rezero_xyz([epsilon]) Rezero position vector components with absolute value less than epsilon.
rotate(**kwargs) Rotate Atom vectors.
set_pbc([xperiodic, yperiodic, zperiodic])
sort([key, reverse])
todict()
translate(t[, fix_anchor_points]) Translate Atom vectors by Vector t.
unset_pbc()
wrap_coords([pbc])