IDAtoms¶
-
class
sknano.core.atoms.id_atoms.
IDAtoms
(atoms=None, update_item_class=True, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.atoms.Atoms
An
Atoms
sub-class forIDAtom
s.Sub-class of
Atoms
class, and a container class for lists ofIDAtom
instances.Parameters: atoms ({None, sequence, IDAtoms
}, optional) – if notNone
, then a list ofIDAtom
instance objects or an existingIDAtoms
instance object.Attributes
M
Total mass of Atoms
.Natoms
Number of atoms in Atoms
.atom_ids
Alias for ids
.elements
ndarray
ofAtom.element
s.fmtstr
Format string. ids
Return array of IDAtom.id
s.indices
Return array of IDAtom.index
s.masses
ndarray
ofAtom.mass
s.mol_ids
Alias for mols
.molecule_ids
Alias for mols
.mols
Return array of IDAtom.mol
s.serials
Alias for ids
.symbols
ndarray
ofAtom.symbol
s.Methods
append
(atom)assign_unique_ids
([starting_id])Assign unique IDAtom.id
to eachIDAtom
inIDAtoms
.clear
()copy
()count
(item)extend
(other)filter
(condition[, invert])Filter Atoms
bycondition
.filter_ids
(atom_ids[, invert])Filter Atoms
byIDAtoms.ids
inatom_ids
.filtered
(condition[, invert])Return new list of Atoms
filtered bycondition
.filtered_ids
(atom_ids[, invert])Return new Atoms
object filtered byatom_ids
.get_atom
(id)Get IDAtom
withXatom.id
==id
.get_atoms
([ids])Overrides parent class Atoms.get_atoms
.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.select
([selstr, selstrlist, verbose])Return Atom
orAtoms
from selection command.sort
([key, reverse])todict
()Return dict
of constructor parameters.update_attrs
(**kwargs)Call update_attrs
method on each atom.