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.Atoms

An Atoms sub-class for neighbor analysis.

Parameters:
  • atoms ({None, sequence, NeighborAtoms}, optional) – if not None, then a list of StructureAtom instance objects or an existing NeighborAtoms instance 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_counts Alias for coordination_number_counts.
M Total mass of Atoms.
NNN Number of first nearest-neighbors.
NNrc Nearest neighbor radius cutoff.
Natoms Number of atoms in Atoms.
atom_tree Concrete implementation of atom_tree.
coordination_counts Alias for coordination_number_counts.
coordination_number_counts Coordination number counts.
coordination_numbers ndarray of NeighborAtom.CNs.
distances Neighbor atoms distances.
elements ndarray of Atom.elements.
first_neighbors First neighbors.
fmtstr Format string.
kNN Max number of nearest-neighbors to return from kd-tree search.
masses ndarray of Atom.masss.
nearest_neighbors Return array of nearest-neighbor atoms for each KDTAtom.
neighbor_cutoffs Nearest neighbor radius cutoff.
neighbor_distances Neighbor distances
neighbors Return array of neighbor atoms.
neighbors_analyzed Return True if neighbors have been analyzed.
nn_adjacency_list Return nearest-neighbor adjacency list
nn_adjacency_map Return nearest-neighbor adjacency map
nn_adjacency_matrix Return nearest-neighbor adjacency matrix.
nn_seed Return nearest-neighbor seed list
nn_vectors Return nearest-neighbor vectors.
second_neighbors Second neighbors.
symbols ndarray of Atom.symbols.
third_neighbors Third 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 Atoms by condition.
filtered(condition[, invert]) Return new list of Atoms filtered by condition.
get_atoms([asarray, aslist]) Return Atoms either as list (default) or numpy array or self.
get_nth_nearest_neighbors(n[, exclusive]) Return `n`th nearest neighbors.
getattr(attr[, default, recursive]) Get ndarray of atom attributes attr.
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 Atoms within distance r of point(s) pts.
query_ball_tree(other, r[, p, eps]) Find all pairs of Atoms whose distance is at more r.
query_pairs(r[, p, eps]) Find all pairs of points within a distance r.
remove(item)
reset_attrs(**kwargs) Call corresponding reset_attrs method on each atom
reverse()
rezero([epsilon]) Set values with absolute value less than epsilon to zero.
select([selstr, selstrlist, verbose]) Return Atom or Atoms from selection command.
sort([key, reverse])
todict() Return dict of constructor parameters.
update_attrs(**kwargs) Update NeighborAtoms attributes.
update_neighbor_lists() Update neighbor lists
update_neighbors(**kwargs) Update NeighborAtom.neighbors.