sknano.core.atoms.TypeAtoms¶
-
class
sknano.core.atoms.
TypeAtoms
(atoms=None, **kwargs)[source][source]¶ An
Atoms
sub-class forTypeAtom
s.A container class for
TypeAtom
objects.Parameters: atoms : {None, sequence,
TypeAtoms
}, optionalAttributes
M
Total mass of Atoms
.Natoms
Number of atoms in Atoms
.Ntypes
Number of unique types
.atomtypes
Alias for types
.elements
ndarray
ofAtom.element
s inAtoms
.fmtstr
masses
ndarray
ofAtom.mass
s inAtoms
.symbols
ndarray
ofAtom.symbol
s inAtoms
.typemap
dict
ofTypeAtom.type
s.types
ndarray
ofTypeAtom.type
s.Methods
add_atomtype
(atom)Alias for add_type
.add_atomtypes
([atoms])Alias for add_types
.add_type
(atom)Add atom type to typemap
.add_types
([atoms])Add atom type for each atom in atoms to TypeAtom.typemap
dictionary.append
(atom)assign_unique_types
([from_attr])Assign unique TypeAtom.type
s to eachTypeAtom
inTypeAtoms
from an existing unique atom attribute.clear
()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_atomtypes
([asdict])Alias for get_types
.get_types
([asdict])Return list of TypeAtom
TypeAtom.type
s.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 byVector
t.