IDAtoms

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

Bases: sknano.core.atoms.atoms.Atoms

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 ids.
elements ndarray of Atom.elements.
fmtstr Format string.
ids Return array of IDAtom.ids.
indices Return array of IDAtom.indexs.
masses ndarray of Atom.masss.
mol_ids Alias for mols.
molecule_ids Alias for mols.
mols Return array of IDAtom.mols.
serials Alias for ids.
symbols ndarray of Atom.symbols.

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 object filtered by atom_ids.
get_atom(id) Get IDAtom with Xatom.id == id.
get_atoms([ids]) Overrides parent class Atoms.get_atoms.
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.
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.