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 ofBasisAtom
instances.Parameters: atoms ({None, sequence, BasisAtoms
}, optional) – if notNone
, then a list ofBasisAtom
instance objects or an existingBasisAtoms
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
ofAtoms
.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
ofAtom.dr
displacementVector
selements
ndarray
ofAtom.element
s.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
ofAtom.mass
s.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
ofAtom.r
positionVector
sradius_of_gyration
Return radius of gyration. rs
Vectors
ofLatticeAtom.rs
Vector
ssymbols
ndarray
ofAtom.symbol
s.volume
Volume of region containing atoms. x
ndarray
ofXYZAtom.x
coordinates.xperiodic
Return True
if periodic along thex
axis.xs
ndarray
ofLatticeAtom.xs
valuesy
ndarray
ofXYZAtom.y
coordinates.yperiodic
Return True
if periodic along they
axis.ys
ndarray
ofLatticeAtom.ys
valuesz
ndarray
ofXYZAtom.z
coordinates.zperiodic
Return True
if periodic along thez
axis.zs
ndarray
ofLatticeAtom.zs
valuesMethods
align_principal_axis
(index, vector)Align principal_axes`[`index
] alongvector
.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
bycondition
.filtered
(condition[, invert])Return new list of Atoms
filtered bycondition
.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 attributesattr
.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 atomreverse
()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
orAtoms
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 byVector
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 withinregion
.wrap_coords
([pbc])Wrap coordinates into lattice.