DipoleAtoms

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

Bases: sknano.core.atoms.atoms.Atoms

An Atoms sub-class for DipoleAtoms.

A container class for DipoleAtom objects.

Parameters:atoms ({None, sequence, DipoleAtoms}, optional) – if not None, then a list of DipoleAtom instance objects or an existing DipoleAtoms instance object.

Attributes

M Total mass of Atoms.
Natoms Number of atoms in Atoms.
P Return the total net dipole moment vector of DipoleAtoms.
dipole_moments An alias for :attr:`DipoleAtoms.p
elements ndarray of Atom.elements.
fmtstr Format string.
masses ndarray of Atom.masss.
p Vectors of DipoleAtom.p Vectors.
px ndarray of DipoleAtom.px components.
py ndarray of DipoleAtom.py components.
pz ndarray of DipoleAtom.pz components.
symbols ndarray of Atom.symbols.

Methods

append(atom)
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, aslist]) Return Atoms either as list (default) or numpy array or self.
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.