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

An Atoms sub-class for structure analysis.

Attributes

CM Alias for center_of_mass.
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.
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.
Rn_counter Return rings per atom counter.
all_angles Angles.
all_bonds Bonds.
all_dihedrals Dihedrals.
all_impropers Impropers.
angles Angles.
angles_in_degrees bool setting for returning angles in degrees.
atom_ids Alias for ids.
atom_tree Concrete implementation of atom_tree.
atomtypes Alias for types.
bonds Bonds.
bounding_box Axis-aligned bounding box of Atoms.
bounding_region Bounding Geometric3DRegion.
bounding_sphere Bounding Sphere of Atoms.
bounds Alias for bounding_region.
cell Alias for LatticeAtoms.cell_matrix.
cell_matrix Return the Crystal3DLattice.cell_matrix.
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.
coordinates_bounding_box Bounding box of atom coordinates.
coordination_counts Alias for coordination_number_counts.
coordination_number_counts Coordination number counts.
coordination_numbers ndarray of NeighborAtom.CNs.
coords Alias for Atoms.r.
dihedrals Dihedrals.
distances Neighbor atoms distances.
dr Vectors of Atom.dr displacement Vectors
elements ndarray of Atom.elements.
first_neighbors First neighbors.
fmtstr Format string.
i Alias for images.
ids Return array of IDAtom.ids.
images ndarray of ImageAtom images.
impropers Impropers.
indices Return array of IDAtom.indexs.
inertia_tensor Return inertia tensor about the origin.
ix ndarray of Atoms \(i_x\) values.
iy ndarray of Atoms \(i_y\) values.
iz ndarray of Atoms \(i_z\) values.
kNN Max number of nearest-neighbors to return from kd-tree search.
lattice Return the LatticeAtom.lattice of the first atom in self.
lattice_region lattice region.
masses ndarray of Atom.masss.
mol_ids Alias for mols.
molecule_ids Alias for mols.
mols Return array of IDAtom.mols.
moment_of_inertia Alias for inertia_tensor.
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.
pbc Return boolean array of periodic boundaries set along x,y,z axes.
positions Alias for Atoms.r.
principal_axes Return principal axes of rotation computed from the inertia tensor.
principal_moments_of_inertia Return principal moments of inertia.
q Return the total net charge of ChargedAtoms.
r Vectors of Atom.r position Vectors
radius_of_gyration Return radius of gyration.
ring_stats dict of ring statistics.
rings_per_atom Rings per atom list.
rs Vectors of LatticeAtom.rs Vectors
second_neighbors Second neighbors.
serials Alias for ids.
symbols ndarray of Atom.symbols.
third_neighbors Third neighbors.
topology_stats dict of topology statistics.
typemap dict of TypeAtom.types.
types ndarray of TypeAtom.types.
vmd_indices Array of VMD atom index attribute.
volume Volume of region containing atoms.
x ndarray of XYZAtom.x coordinates.
xperiodic Return True if periodic along the x axis.
xs ndarray of LatticeAtom.xs values
y ndarray of XYZAtom.y coordinates.
yperiodic Return True if periodic along the y axis.
ys ndarray of LatticeAtom.ys values
z ndarray of XYZAtom.z coordinates.
zperiodic Return True if periodic along the z axis.
zs ndarray of LatticeAtom.zs values

Methods

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.typemap dictionary.
align_principal_axis(index, vector) Align principal_axes`[`index] along vector.
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.id to each IDAtom in IDAtoms.
assign_unique_types([from_attr]) Assign unique TypeAtom.types to each TypeAtom in TypeAtoms 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(**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 Atoms by condition.
filter_ids(atom_ids[, invert]) Filter Atoms by IDAtoms.ids in atom_ids.
filter_vmd_indices(vmd_indices[, invert]) Filter Atoms by VMDAtomsAdapterMixin.vmd_indices.
filtered(condition[, invert]) Return new list of Atoms filtered by condition.
filtered_ids(atom_ids[, invert]) Return new Atoms object filtered by atom_ids.
filtered_vmd_indices(vmd_indices[, invert]) Return new Atoms filtered by vmd_indices.
get_POAV_attr(POAV_class, attr) Return list of POAVAtom POAV1 POAV2 or POAVR attribute.
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 IDAtom with Xatom.id == id.
get_atom_from_vmd_index(vmd_index) Get Atom by 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 Dihedrals
get_improper(*ids[, check_operands, degrees]) Compute improper angles.
get_impropers([neighbors_only, unique, ids_only]) Return list of Improperss
get_nth_nearest_neighbors(n[, exclusive]) Return `n`th nearest neighbors.
get_types([asdict]) Return list of TypeAtom TypeAtom.types.
get_vmd_selection_string(keyword) Get a VMD selection string for the VMD keyword.
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([poavs]) Reset the POAVAtomsMixin class attributes, then call parent class reset_attrs method.
reset_poav_atoms_attrs() Reset the POAVAtomsMixin class attributes.
reset_ring_atoms_attrs() Reset the RingAtomsMixin class attributes.
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.
select([selstr, selstrlist, verbose]) Return Atom or Atoms from selection command.
set_pbc(dims) Set periodic boundaries along dims.
sort([key, reverse])
todict() Return dict of constructor parameters.
translate(t[, fix_anchor_points, cartesian]) Translate Atom vectors by Vector t.
unset_pbc() Turn of PBCs along all dimensions.
update_attrs([topology]) Update AtomsTopologyMixin class attributes.
update_neighbor_lists() Update neighbor lists
update_neighbors(**kwargs) Update NeighborAtom.neighbors.
update_ring_stats([angle_reference, ...])
within_region(region) Returns new Atoms object containing atoms within region.
wrap_coords([pbc]) Wrap coordinates into lattice.