sknano.core.atoms.XYZAtoms¶
-
class
sknano.core.atoms.
XYZAtoms
(atoms=None, casttype=True, **kwargs)[source][source]¶ An
Atoms
sub-class forXYZAtom
s.A container class for
XYZAtom
objects.Parameters: atoms : {None, sequence,
XYZAtoms
}, optionalAttributes
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
ofAtom.dr
displacement Vectorselements
ndarray
ofAtom.element
s inAtoms
.fmtstr
inertia_tensor
Inertia tensor. masses
ndarray
ofAtom.mass
s inAtoms
.r
ndarray
ofAtom.r
position Vectorssymbols
ndarray
ofAtom.symbol
s inAtoms
.x
ndarray
ofAtom
s \(x\) coordinates.y
ndarray
ofAtom
s \(y\) coordinates.z
ndarray
ofAtom
s \(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.sort
([key, reverse])todict
()translate
(t[, fix_anchor_points])Translate Atom
vectors byVector
t.