BasisAtoms¶
-
class
sknano.core.atoms.BasisAtoms(*args, xperiodic=False, yperiodic=False, zperiodic=False, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.mixins.AtomsTransformationsMixin,sknano.core.atoms.mixins.BoundingRegionsMixin,sknano.core.atoms.lattice_atoms.LatticeAtoms,sknano.core.atoms.xyz_atoms.XYZAtomsAn
Atomssub-class for crystal structure basis atoms.Sub-class of
Atomsclass, and a container class for lists ofBasisAtominstances.Parameters: atoms ({None, sequence, BasisAtoms}, optional) – if notNone, then a list ofBasisAtominstance objects or an existingBasisAtomsinstance object.Attributes
CMAlias for center_of_mass.MTotal mass of Atoms.NatomsNumber of atoms in Atoms.bounding_boxAxis-aligned bounding box of Atoms.bounding_regionBounding Geometric3DRegion.bounding_sphereBounding SphereofAtoms.boundsAlias for bounding_region.cellAlias for LatticeAtoms.cell_matrix.cell_matrixReturn the Crystal3DLattice.cell_matrix.center_of_massCenter-of-Mass coordinates of Atoms.centroidCentroid of Atoms.comAlias for center_of_mass.coordinates_bounding_boxBounding box of atom coordinates. coordsAlias for Atoms.r.drVectorsofAtom.drdisplacementVectorselementsndarrayofAtom.elements.fmtstrFormat string. inertia_tensorReturn inertia tensor about the origin. latticeReturn the LatticeAtom.latticeof the first atom in self.lattice_regionlatticeregion.massesndarrayofAtom.masss.moment_of_inertiaAlias for inertia_tensor.pbcReturn boolean array of periodic boundaries set along x,y,zaxes.positionsAlias for Atoms.r.principal_axesReturn principal axes of rotation computed from the inertia tensor. principal_moments_of_inertiaReturn principal moments of inertia. rVectorsofAtom.rpositionVectorsradius_of_gyrationReturn radius of gyration. rsVectorsofLatticeAtom.rsVectorssymbolsndarrayofAtom.symbols.volumeVolume of region containing atoms. xndarrayofXYZAtom.xcoordinates.xperiodicReturn Trueif periodic along thexaxis.xsndarrayofLatticeAtom.xsvaluesyndarrayofXYZAtom.ycoordinates.yperiodicReturn Trueif periodic along theyaxis.ysndarrayofLatticeAtom.ysvalueszndarrayofXYZAtom.zcoordinates.zperiodicReturn Trueif periodic along thezaxis.zsndarrayofLatticeAtom.zsvaluesMethods
align_principal_axis(index, vector)Align principal_axes`[`index] alongvector.append(atom)center_CM([axis])Alias for center_center_of_mass.center_center_of_mass([axis])Center atoms on center-of-mass coordinates. center_centroid()Center centroidon origin.center_com([axis])Alias for center_center_of_mass.clear()clip_bounds(region[, center_before_clipping])Remove atoms outside the given region. 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.get_coords([asdict])Return atom coords. 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.rezero_coords([epsilon])Alias for Atoms.rezero_xyz.rezero_xyz([epsilon])Rezero position vector components with absolute value less than epsilon.rotate(**kwargs)Rotate Atomvectors.select([selstr, selstrlist, verbose])Return AtomorAtomsfrom selection command.set_pbc(dims)Set periodic boundaries along dims.sort([key, reverse])todict()Return dictof constructor parameters.translate(t[, fix_anchor_points, cartesian])Translate Atomvectors byVectort.unset_pbc()Turn of PBCs along all dimensions. update_attrs(**kwargs)Call update_attrsmethod on each atom.within_region(region)Returns new Atomsobject containing atoms withinregion.wrap_coords([pbc])Wrap coordinates into lattice.