NeighborAtoms¶
-
class
sknano.core.atoms.neighbor_atoms.NeighborAtoms(*args, kNN=16, NNrc=2.0, neighbor_cutoffs=None, neighbors_analyzed=False, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.mixins.KDTreeAtomsMixin,sknano.core.atoms.atoms.AtomsAn
Atomssub-class for neighbor analysis.Parameters: - atoms ({None, sequence,
NeighborAtoms}, optional) – if notNone, then a list ofStructureAtominstance objects or an existingNeighborAtomsinstance object. - kNN (
int) – Number of nearest neighbors to return when querying the kd-tree. - NNrc (
float) – Nearest neighbor radius cutoff. - neighbor_cutoffs (
list, optional) –
Attributes
CN_countsAlias for coordination_number_counts.MTotal mass of Atoms.NNNNumber of first nearest-neighbors. NNrcNearest neighbor radius cutoff. NatomsNumber of atoms in Atoms.atom_treeConcrete implementation of atom_tree.coordination_countsAlias for coordination_number_counts.coordination_number_countsCoordination number counts. coordination_numbersndarrayofNeighborAtom.CNs.distancesNeighbor atoms distances. elementsndarrayofAtom.elements.first_neighborsFirst neighbors. fmtstrFormat string. kNNMax number of nearest-neighbors to return from kd-tree search. massesndarrayofAtom.masss.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. second_neighborsSecond neighbors. symbolsndarrayofAtom.symbols.third_neighborsThird neighbors. Methods
append(atom)clear()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.filtered(condition[, invert])Return new list of Atomsfiltered bycondition.get_atoms([asarray, aslist])Return Atomseither as list (default) or numpy array or self.get_nth_nearest_neighbors(n[, exclusive])Return `n`th nearest neighbors. 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(**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.sort([key, reverse])todict()Return dictof constructor parameters.update_attrs(**kwargs)Update NeighborAtomsattributes.update_neighbor_lists()Update neighbor lists update_neighbors(**kwargs)Update NeighborAtom.neighbors.- atoms ({None, sequence,