LatticeAtoms¶
-
class
sknano.core.atoms.lattice_atoms.LatticeAtoms(*args, xperiodic=False, yperiodic=False, zperiodic=False, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.mixins.PBCAtomsMixin,sknano.core.atoms.atoms.AtomsAn
Atomssub-class for crystal structure lattice atoms.Sub-class of
Atomsclass, and a container class for lists ofLatticeAtominstances.Parameters: atoms ({None, sequence, LatticeAtoms}, optional) – if notNone, then a list ofLatticeAtominstance objects or an existingLatticeAtomsinstance object.Attributes
MTotal mass of Atoms.NatomsNumber of atoms in Atoms.cellAlias for LatticeAtoms.cell_matrix.cell_matrixReturn the Crystal3DLattice.cell_matrix.elementsndarrayofAtom.elements.fmtstrFormat string. latticeReturn the LatticeAtom.latticeof the first atom in self.massesndarrayofAtom.masss.pbcReturn boolean array of periodic boundaries set along x,y,zaxes.rsVectorsofLatticeAtom.rsVectorssymbolsndarrayofAtom.symbols.xperiodicReturn Trueif periodic along thexaxis.xsndarrayofLatticeAtom.xsvaluesyperiodicReturn Trueif periodic along theyaxis.ysndarrayofLatticeAtom.ysvalueszperiodicReturn Trueif periodic along thezaxis.zsndarrayofLatticeAtom.zsvaluesMethods
append(atom)clear()copy()count(item)extend(other)filter(condition[, invert])Filter Atomsbycondition.filtered(condition[, invert])Return new list of Atomsfiltered bycondition.get_atoms([asarray, aslist])Return Atomseither as list (default) or numpy array or self.getattr(attr[, default, recursive])Get ndarrayof 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_attrsmethod on each atomreverse()rezero([epsilon])Set values with absolute value less than epsilonto zero.select([selstr, selstrlist, verbose])Return AtomorAtomsfrom selection command.set_pbc(dims)Set periodic boundaries along dims.sort([key, reverse])todict()Return dictof constructor parameters.unset_pbc()Turn of PBCs along all dimensions. update_attrs(**kwargs)Call update_attrsmethod on each atom.wrap_coords([pbc])Wrap coordinates into lattice.