sknano.core.atoms.StructureAtoms¶
-
class
sknano.core.atoms.
StructureAtoms
(atoms=None, kNN=16, NNrc=2.0, **kwargs)[source][source]¶ An
Atoms
sub-class for structure analysis.Sub-class of
Atoms
class, and a container class for lists ofStructureAtom
instances.Parameters: atoms : {None, sequence,
StructureAtoms
}, optionalif not None, then a list of
StructureAtom
instance objects or an existingStructureAtoms
instance object.kNN :
int
Number of nearest neighbors to return when querying the kd-tree.
NNrc :
float
Nearest neighbor radius cutoff.
Attributes
CM
Alias for center_of_mass
.CN_counts
Alias for coordination_number_counts
.M
Total mass of Atoms
.NNrc
Nearest neighbor radius cutoff. Natoms
Number of atoms in Atoms
.Ntypes
Number of unique types
.POAV1
List of POAVAtom
POAV1
POAV1
attribute.POAV2
List of POAVAtom
POAV2
POAV2
attribute.POAVR
List of POAVAtom
POAVR
POAVR
attribute.atom_ids
Alias for IDAtoms.ids
.atom_tree
KDTree
ofatomtypes
Alias for types
.bounds
Bounds of Atoms
.center_of_mass
Center-of-Mass coordinates of Atoms
.centroid
Centroid of Atoms
.charges
Return array of ChargedAtom
charges.com
Alias for center_of_mass
.coordination_counts
Alias for coordination_number_counts
.coordination_number_counts
Coordination number counts. coordination_numbers
ndarray
ofCNAtom.CN
s.coords
Alias for Atoms.r
.distances
Neighbor atoms distances. dr
ndarray
ofAtom.dr
displacement Vectorselements
ndarray
ofAtom.element
s inAtoms
.first_neighbors
fmtstr
i
Alias for images
.ids
Return array of IDAtom.id
s.images
ndarray
ofImageAtom
images.inertia_tensor
Inertia tensor. ix
ndarray
ofAtom
s \(i_x\) values.iy
ndarray
ofAtom
s \(i_y\) values.iz
ndarray
ofAtom
s \(i_z\) values.kNN
Number of nearest neighbors to return when querying the kd-tree. lattice
masses
ndarray
ofAtom.mass
s inAtoms
.mol_ids
Alias for IDAtoms.mols
.molecule_ids
Alias for IDAtoms.mols
.mols
Return array of IDAtom.mol
s.nearest_neighbors
Return array of nearest-neighbor atoms for each KDTAtom. neighbor_distances
neighbors
Return array of neighbor atoms. pbc
q
Return the total net charge of ChargedAtoms
.r
ndarray
ofAtom.r
position Vectorsrs
ndarray
ofAtom.r
position Vectorssecond_neighbors
symbols
ndarray
ofAtom.symbol
s inAtoms
.third_neighbors
typemap
dict
ofTypeAtom.type
s.types
ndarray
ofTypeAtom.type
s.v
Alias for velocities
.velocities
ndarray
ofVelocityAtom
velocities.volume
Volume of region containing atoms. vx
ndarray
ofAtom
s \(v_x\) components.vy
ndarray
ofAtom
s \(v_y\) components.vz
ndarray
ofAtom
s \(v_z\) components.x
ndarray
ofAtom
s \(x\) coordinates.xs
ndarray
ofAtom
s \(x\) coordinates.y
ndarray
ofAtom
s \(y\) coordinates.ys
ndarray
ofAtom
s \(y\) coordinates.z
ndarray
ofAtom
s \(z\) coordinates.zs
ndarray
ofAtom
s \(z\) coordinates.Methods
add_atomtype
(atom)Alias for add_type
.add_atomtypes
([atoms])Alias for add_types
.add_type
(atom)Add atom type to typemap
.add_types
([atoms])Add atom type for each atom in atoms to TypeAtom.typemap
dictionary.append
(atom)assign_unique_ids
([starting_id])Assign unique IDAtom.id
to eachIDAtom
inIDAtoms
.assign_unique_types
([from_attr])Assign unique TypeAtom.type
s to eachTypeAtom
inTypeAtoms
from 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 centroid
on 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
()Compute POAV1
,POAV2
,POAVR
.compute_rdf
()copy
()count
(item)extend
(other)filter
(condition[, invert])Filter Atoms
by condition.filter_ids
(atom_ids[, invert])Filter Atoms
byIDAtoms.ids
inatom_ids
.filtered
(condition[, invert])Return new list of Atoms
filtered by condition.filtered_ids
(atom_ids[, invert])Return new Atoms
filtered byIDAtoms.ids
inatom_ids
.get_POAV_attr
(POAV_class, attr)Return list of POAVAtom
POAV1
POAV2
orPOAVR
attribute.get_atom
(id)Get IDAtom
withXatom.id
== id.get_atoms
([asarray])Return list of Atoms
.get_atomtypes
([asdict])Alias for get_types
.get_coords
([asdict])Return atom coords. get_neighbors
(n)get_types
([asdict])Return list of TypeAtom
TypeAtom.type
s.getatomattr
(attr)Get ndarray
of atom attributes attr.index
(item, *args)insert
(i, item)mapatomattr
([from_attr, to_attr, attrmap])Set/update atom attribute from another atom attribute with dict. neighbor_counts
(r)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 distancer
of point(s) pts.remove
(item)reverse
()rezero
([epsilon])Set values with absolute value less than epsilon to 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 Atom
vectors.set_pbc
([xperiodic, yperiodic, zperiodic])sort
([key, reverse])todict
()translate
(t[, fix_anchor_points])Translate Atom
vectors byVector
t.unset_pbc
()update_attrs
()Update KDTAtom
s attributes.update_bonds
()Update KDTAtom.bonds
.update_neighbors
([cutoffs])wrap_coords
([pbc])