StructureAtoms¶
-
class
sknano.core.atoms.structure_atoms.StructureAtoms(*args, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.mixins.AtomsAdapterMixin,sknano.core.atoms.mixins.AtomsTopologyMixin,sknano.core.atoms.mixins.AtomsTransformationsMixin,sknano.core.atoms.mixins.BoundingRegionsMixin,sknano.core.atoms.mixins.POAVAtomsMixin,sknano.core.atoms.mixins.RingAtomsMixin,sknano.core.atoms.neighbor_atoms.NeighborAtoms,sknano.core.atoms.image_atoms.ImageAtoms,sknano.core.atoms.lattice_atoms.LatticeAtoms,sknano.core.atoms.xyz_atoms.XYZAtoms,sknano.core.atoms.charged_atoms.ChargedAtoms,sknano.core.atoms.type_atoms.TypeAtoms,sknano.core.atoms.id_atoms.IDAtomsAn
Atomssub-class for structure analysis.Attributes
CMAlias for center_of_mass.CN_countsAlias for coordination_number_counts.MTotal mass of Atoms.NNNNumber of first nearest-neighbors. NNrcNearest neighbor radius cutoff. NatomsNumber of atoms in Atoms.NtypesNumber of unique types.POAV1List of POAVAtomPOAV1POAV1attribute.POAV2List of POAVAtomPOAV2POAV2attribute.POAVRList of POAVAtomPOAVRPOAVRattribute.Rn_counterReturn rings per atom counter. all_anglesAngles.all_bondsBonds.all_dihedralsDihedrals.all_impropersImpropers.anglesAngles.angles_in_degreesboolsetting for returning angles in degrees.atom_idsAlias for ids.atom_treeConcrete implementation of atom_tree.atomtypesAlias for types.bondsBonds.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.chargesReturn array of ChargedAtomcharges.comAlias for center_of_mass.coordinates_bounding_boxBounding box of atom coordinates. coordination_countsAlias for coordination_number_counts.coordination_number_countsCoordination number counts. coordination_numbersndarrayofNeighborAtom.CNs.coordsAlias for Atoms.r.dihedralsDihedrals.distancesNeighbor atoms distances. drVectorsofAtom.drdisplacementVectorselementsndarrayofAtom.elements.first_neighborsFirst neighbors. fmtstrFormat string. iAlias for images.idsReturn array of IDAtom.ids.imagesndarrayofImageAtomimages.impropersImpropers.indicesReturn array of IDAtom.indexs.inertia_tensorReturn inertia tensor about the origin. ixndarrayofAtoms \(i_x\) values.iyndarrayofAtoms \(i_y\) values.izndarrayofAtoms \(i_z\) values.kNNMax number of nearest-neighbors to return from kd-tree search. latticeReturn the LatticeAtom.latticeof the first atom in self.lattice_regionlatticeregion.massesndarrayofAtom.masss.mol_idsAlias for mols.molecule_idsAlias for mols.molsReturn array of IDAtom.mols.moment_of_inertiaAlias for inertia_tensor.nearest_neighborsReturn array of nearest-neighbor atoms for each KDTAtom.neighbor_cutoffsNearest neighbor radius cutoff. neighbor_distancesNeighbor distances neighborsReturn array of neighbor atoms. neighbors_analyzedReturn Trueif neighbors have been analyzed.nn_adjacency_listReturn nearest-neighbor adjacency list nn_adjacency_mapReturn nearest-neighbor adjacency map nn_adjacency_matrixReturn nearest-neighbor adjacency matrix. nn_seedReturn nearest-neighbor seed list nn_vectorsReturn nearest-neighbor vectors. 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. qReturn the total net charge of ChargedAtoms.rVectorsofAtom.rpositionVectorsradius_of_gyrationReturn radius of gyration. ring_statsdictof ring statistics.rings_per_atomRings per atom list. rsVectorsofLatticeAtom.rsVectorssecond_neighborsSecond neighbors. serialsAlias for ids.symbolsndarrayofAtom.symbols.third_neighborsThird neighbors. topology_statsdictof topology statistics.typemapdictofTypeAtom.types.typesndarrayofTypeAtom.types.vmd_indicesArray of VMD atom index attribute. 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
add_atomtype(atom)Alias for add_type.add_atomtypes([atoms])Alias for add_types.add_ring(nodes)Append ring atoms to rings.add_type(atom)Add atom type to typemap.add_types([atoms])Add atom type for each atom in atoms to TypeAtom.typemapdictionary.align_principal_axis(index, vector)Align principal_axes`[`index] alongvector.analyze_POAVs(**kwargs)Compute POAV1,POAV2,POAVR.analyze_network([cutoff, max_ring_size, ...])Analyze the network connectivity. append(atom)assign_unique_ids([starting_id])Assign unique IDAtom.idto eachIDAtominIDAtoms.assign_unique_types([from_attr])Assign unique TypeAtom.types to eachTypeAtominTypeAtomsfrom an existing unique atom attribute.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. compute_POAVs(**kwargs)Alias for analyze_POAVs.copy()count(item)count_neighbors(other, r[, p])Count how many nearby neighbor pairs can be formed. count_neighbors_in_self(r[, p])Count number of neighbor pairs for each atom in self. extend(other)filter(condition[, invert])Filter Atomsbycondition.filter_ids(atom_ids[, invert])Filter AtomsbyIDAtoms.idsinatom_ids.filter_vmd_indices(vmd_indices[, invert])Filter AtomsbyVMDAtomsAdapterMixin.vmd_indices.filtered(condition[, invert])Return new list of Atomsfiltered bycondition.filtered_ids(atom_ids[, invert])Return new Atomsobject filtered byatom_ids.filtered_vmd_indices(vmd_indices[, invert])Return new Atomsfiltered byvmd_indices.get_POAV_attr(POAV_class, attr)Return list of POAVAtomPOAV1POAV2orPOAVRattribute.get_angle(*triplet[, check_operands, degrees])Compute bond angles. get_angles([neighbors_only, unique, ids_only])Return list of bond angles. get_atom(id)Get IDAtomwithXatom.id==id.get_atom_from_vmd_index(vmd_index)Get Atomby VMD atom index.get_atoms([ids])Overrides parent class Atoms.get_atoms.get_atomtypes([asdict])Alias for get_types.get_bond(*pair[, check_operands, degrees])Compute bond lengths. get_bonds([neighbors_only, unique, ids_only])Return list of bonds. get_coords([asdict])Return atom coords. get_dihedral(*ids[, check_operands, degrees])Compute dihedral angles. get_dihedrals([neighbors_only, unique, ids_only])Return list of Dihedralsget_improper(*ids[, check_operands, degrees])Compute improper angles. get_impropers([neighbors_only, unique, ids_only])Return list of Improperssget_nth_nearest_neighbors(n[, exclusive])Return `n`th nearest neighbors. get_types([asdict])Return list of TypeAtomTypeAtom.types.get_vmd_selection_string(keyword)Get a VMD selection string for the VMD keyword. 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])query_atom_tree([k, eps, p, rc])Query atom tree for nearest neighbors distances and indices. query_ball_point(pts, r[, p, eps])Find all Atomswithin distancerof point(s)pts.query_ball_tree(other, r[, p, eps])Find all pairs of Atomswhose distance is at morer.query_pairs(r[, p, eps])Find all pairs of points within a distance r.remove(item)reset_attrs([poavs])Reset the POAVAtomsMixinclass attributes, then call parent classreset_attrsmethod.reset_poav_atoms_attrs()Reset the POAVAtomsMixinclass attributes.reset_ring_atoms_attrs()Reset the RingAtomsMixinclass attributes.reverse()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([topology])Update AtomsTopologyMixinclass attributes.update_neighbor_lists()Update neighbor lists update_neighbors(**kwargs)Update NeighborAtom.neighbors.update_ring_stats([angle_reference, ...])within_region(region)Returns new Atomsobject containing atoms withinregion.wrap_coords([pbc])Wrap coordinates into lattice.