sknano.core.atoms.IDAtoms

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

An Atoms sub-class for IDAtoms.

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

Parameters:

atoms : {None, sequence, IDAtoms}, optional

if not None, then a list of IDAtom instance objects or an existing IDAtoms instance object.

Attributes

M Total mass of Atoms.
Natoms Number of atoms in Atoms.
atom_ids Alias for IDAtoms.ids.
elements ndarray of Atom.elements in Atoms.
fmtstr
ids Return array of IDAtom.ids.
masses ndarray of Atom.masss in Atoms.
mol_ids Alias for IDAtoms.mols.
molecule_ids Alias for IDAtoms.mols.
mols Return array of IDAtom.mols.
symbols ndarray of Atom.symbols in Atoms.

Methods

append(atom)
assign_unique_ids([starting_id]) Assign unique IDAtom.id to each IDAtom in IDAtoms.
clear()
copy()
count(item)
extend(other)
filter(condition[, invert]) Filter Atoms by condition.
filter_ids(atom_ids[, invert]) Filter Atoms by IDAtoms.ids in atom_ids.
filtered(condition[, invert]) Return new list of Atoms filtered by condition.
filtered_ids(atom_ids[, invert]) Return new Atoms filtered by IDAtoms.ids in atom_ids.
get_atom(id) Get IDAtom with Xatom.id == id.
get_atoms([asarray]) Return list of Atoms.
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.
rotate(**kwargs) Rotate Atom vectors.
sort([key, reverse])
todict()
translate(t[, fix_anchor_points]) Translate Atom vectors by Vector t.