XYZAtoms

class sknano.core.atoms.XYZAtoms(atoms=None, update_item_class=True, **kwargs)[source] [edit on github][source]

Bases: sknano.core.atoms.atoms.Atoms

An Atoms sub-class for XYZAtoms.

A container class for XYZAtom objects.

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

Attributes

CM Alias for center_of_mass.
M Total mass of Atoms.
Natoms Number of atoms in 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 Vectors of Atom.dr displacement Vectors
elements ndarray of Atom.elements.
fmtstr Format string.
inertia_tensor Return inertia tensor about the origin.
masses ndarray of Atom.masss.
moment_of_inertia Alias for inertia_tensor.
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.
symbols ndarray of Atom.symbols.
x ndarray of XYZAtom.x coordinates.
y ndarray of XYZAtom.y coordinates.
z ndarray of XYZAtom.z coordinates.

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.
select([selstr, selstrlist, verbose]) Return Atom or Atoms from selection command.
sort([key, reverse])
todict() Return dict of constructor parameters.
update_attrs(**kwargs) Call update_attrs method on each atom.