ForceAtoms¶
-
class
sknano.core.atoms.
ForceAtoms
(atoms=None, update_item_class=True, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.atoms.Atoms
An
Atoms
sub-class forForceAtom
s.Sub-class of
Atoms
class, and a container class for lists ofForceAtom
instances.Parameters: atoms ({None, sequence, ForceAtoms
}, optional) – if notNone
, then a list ofForceAtom
instance objects or an existingForceAtoms
instance object.Attributes
M
Total mass of Atoms
.Natoms
Number of atoms in Atoms
.elements
ndarray
ofAtom.element
s.f
Vectors
ofForceAtom
forces.fmtstr
Format string. forces
Alias for f
.fx
ndarray
ofAtom
s \(f_x\) components.fy
ndarray
ofAtom
s \(f_y\) components.fz
ndarray
ofAtom
s \(f_z\) components.masses
ndarray
ofAtom.mass
s.symbols
ndarray
ofAtom.symbol
s.Methods
append
(atom)clear
()copy
()count
(item)extend
(other)filter
(condition[, invert])Filter Atoms
bycondition
.filtered
(condition[, invert])Return new list of Atoms
filtered bycondition
.get_atoms
([asarray, aslist])Return Atoms
either as list (default) or numpy array or self.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.