sknano.core.atoms.KDTAtoms¶
-
class
sknano.core.atoms.KDTAtoms(atoms=None, copylist=True, deepcopy=False)[source][source]¶ An
Atomssub-class for KDTree analysis.Sub-class of
XAtomsclass, and a container class for lists ofKDTAtominstances.Parameters: atoms : {None, sequence,
KDTAtoms}, optionalcopylist : bool, optional
perform shallow copy of atoms list
deepcopy : bool, optional
perform deepcopy of atoms list
Attributes
CMCenter-of-Mass coordinates of Atoms.MTotal mass of Atoms.NNrcOnly return neighbors within this distance when querying the kd-tree. NatomsNumber of atoms in Atoms.NtypesNumber of atomtypes.atom_idsReturn array of XAtomIDs.atom_treescipy.spatial.KDTreeofatomtypesatomtypesdict.bondsReturn list of bonds.boundsBounds of Atoms.centroidCentroid of Atoms.chargesReturn array of XAtomcharges.coordination_numbersReturn array of KDTAtomcoordination numbers.coordsnumpy.ndarrayofAtoms \(x, y, z\) coordinates.inertia_tensorReturn the inertia tensor. kNNNumber of nearest neighbors to return when querying the kd-tree. massesReturn list of Atommasses.nearest_neighborsReturn array of nearest-neighbor atoms for each KDTAtom.qReturn the total net charge of XAtoms.symbolsReturn list of Atomsymbols.velocitiesReturn array of XAtomvelocities.xnumpy.ndarrayofAtoms \(x\) coordinates.ynumpy.ndarrayofAtoms \(y\) coordinates.znumpy.ndarrayofAtoms \(z\) coordinates.Methods
add_atomtype(atom)Add atom type to atomtypes.add_atomtypes([atoms])Add atomtype for each atom in atoms to atomtypes dictionary. append(item)assign_unique_ids([starting_id])Assign unique ID to each XAtominXAtoms.center_CM([axes])Center atoms on CM coordinates. clear()clip_bounds(region[, center_before_clipping])Remove atoms outside the given limits along given dimension. copy()count(item)extend(other)filter(condition[, invert])Filter Atomsby condition.filter_ids(atom_ids[, invert])Return AtomsbyXAtoms.atom_idsinatom_ids.get_atom(atomID)Get XAtomwithXatom.atomID== atomID.get_atoms([asarray])Return list of Atoms.get_coords([asdict])Return atom coords. getatomattr(attr)Get numpy.ndarrayof atom attributes attr.index(item, *args)insert(i, item)mapatomattr(attr, from_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 distance r of point(s) pts.remove(item)reverse()rezero([epsilon])Set really really small coordinates to zero. rezero_coords([epsilon])Alias for Atoms.rezero.rezero_xyz([epsilon])Alias for Atoms.rezero.rotate([angle, rot_axis, anchor_point, ...])Rotate Atomposition vectors.select(cmd)select_within(volume)sort([key, reverse])translate(t[, fix_anchor_points])Translate Atomposition vectors byVectort.update_attrs()Update each KDTAtoms attributes.update_bonds()Update KDTAtom.bondslist.update_coordination_numbers()Update KDTAtom.CN.update_nearest_neighbors()Update KDTAtom.NN.