BasisAtoms

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

Bases: sknano.core.atoms.mixins.AtomsTransformationsMixin, sknano.core.atoms.mixins.BoundingRegionsMixin, sknano.core.atoms.lattice_atoms.LatticeAtoms, sknano.core.atoms.xyz_atoms.XYZAtoms

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.
bounding_box Axis-aligned bounding box of Atoms.
bounding_region Bounding Geometric3DRegion.
bounding_sphere Bounding Sphere of Atoms.
bounds Alias for bounding_region.
cell Alias for LatticeAtoms.cell_matrix.
cell_matrix Return the Crystal3DLattice.cell_matrix.
center_of_mass Center-of-Mass coordinates of Atoms.
centroid Centroid of Atoms.
com Alias for center_of_mass.
coordinates_bounding_box Bounding box of atom coordinates.
coords Alias for Atoms.r.
dr Vectors of Atom.dr displacement Vectors
elements ndarray of Atom.elements.
fmtstr Format string.
inertia_tensor Return inertia tensor about the origin.
lattice Return the LatticeAtom.lattice of the first atom in self.
lattice_region lattice region.
masses ndarray of Atom.masss.
moment_of_inertia Alias for inertia_tensor.
pbc Return boolean array of periodic boundaries set along x,y,z axes.
positions Alias for Atoms.r.
principal_axes Return principal axes of rotation computed from the inertia tensor.
principal_moments_of_inertia Return principal moments of inertia.
r Vectors of Atom.r position Vectors
radius_of_gyration Return radius of gyration.
rs Vectors of LatticeAtom.rs Vectors
symbols ndarray of Atom.symbols.
volume Volume of region containing atoms.
x ndarray of XYZAtom.x coordinates.
xperiodic Return True if periodic along the x axis.
xs ndarray of LatticeAtom.xs values
y ndarray of XYZAtom.y coordinates.
yperiodic Return True if periodic along the y axis.
ys ndarray of LatticeAtom.ys values
z ndarray of XYZAtom.z coordinates.
zperiodic Return True if periodic along the z axis.
zs ndarray of LatticeAtom.zs values

Methods

align_principal_axis(index, vector) Align principal_axes`[`index] along vector.
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, aslist]) Return Atoms either as list (default) or numpy array or self.
get_coords([asdict]) Return atom coords.
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.
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.
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.
translate(t[, fix_anchor_points, cartesian]) Translate Atom vectors by Vector t.
unset_pbc() Turn of PBCs along all dimensions.
update_attrs(**kwargs) Call update_attrs method on each atom.
within_region(region) Returns new Atoms object containing atoms within region.
wrap_coords([pbc]) Wrap coordinates into lattice.