MDAtoms¶
-
class
sknano.core.atoms.md_atoms.
MDAtoms
(*args, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.energy_atoms.EnergyAtoms
,sknano.core.atoms.force_atoms.ForceAtoms
,sknano.core.atoms.velocity_atoms.VelocityAtoms
,sknano.core.atoms.structure_atoms.StructureAtoms
An
Atoms
sub-class for molecular dynamics trajectory analysis.Sub-class of
StructureAtoms
class, and a container class for lists ofMDAtom
instances.Parameters: atoms ({None, sequence, MDAtoms
}, optional) – if notNone
, then a list ofMDAtom
instance objects or an existingMDAtoms
instance object.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
ofAtoms
.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
ofNeighborAtom.CN
s.coords
Alias for Atoms.r
.dihedrals
Dihedrals
.distances
Neighbor atoms distances. dr
Vectors
ofAtom.dr
displacementVector
selements
ndarray
ofAtom.element
s.etotal
ndarray
ofEnergyAtom.etotal
.f
Vectors
ofForceAtom
forces.first_neighbors
First neighbors. fmtstr
Format string. forces
Alias for f
.fx
ndarray
ofAtom
s \(f_x\) components.fy
ndarray
ofAtom
s \(f_y\) components.fz
ndarray
ofAtom
s \(f_z\) components.i
Alias for images
.ids
Return array of IDAtom.id
s.images
ndarray
ofImageAtom
images.impropers
Impropers
.indices
Return array of IDAtom.index
s.inertia_tensor
Return inertia tensor about the origin. ix
ndarray
ofAtom
s \(i_x\) values.iy
ndarray
ofAtom
s \(i_y\) values.iz
ndarray
ofAtom
s \(i_z\) values.kNN
Max number of nearest-neighbors to return from kd-tree search. ke
ndarray
ofEnergyAtom.ke
.kinetic_energies
An alias for EnergyAtoms.ke
.lattice
Return the LatticeAtom.lattice
of the first atom in self.lattice_region
lattice
region.masses
ndarray
ofAtom.mass
s.mol_ids
Alias for mols
.molecule_ids
Alias for mols
.mols
Return array of IDAtom.mol
s.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.pe
ndarray
ofEnergyAtom.pe
.positions
Alias for Atoms.r
.potential_energies
An alias for EnergyAtoms.pe
.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
ofAtom.r
positionVector
sradius_of_gyration
Return radius of gyration. ring_stats
dict
of ring statistics.rings_per_atom
Rings per atom list. rs
Vectors
ofLatticeAtom.rs
Vector
ssecond_neighbors
Second neighbors. serials
Alias for ids
.symbols
ndarray
ofAtom.symbol
s.third_neighbors
Third neighbors. topology_stats
dict
of topology statistics.total_energies
An alias for EnergyAtoms.etotal
.typemap
dict
ofTypeAtom.type
s.types
ndarray
ofTypeAtom.type
s.v
Returns a Vectors
object ofVelocityAtom.v
Vector
svelocities
Alias for v
.vmd_indices
Array of VMD atom index attribute. 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
ofXYZAtom.x
coordinates.xperiodic
Return True
if periodic along thex
axis.xs
ndarray
ofLatticeAtom.xs
valuesy
ndarray
ofXYZAtom.y
coordinates.yperiodic
Return True
if periodic along they
axis.ys
ndarray
ofLatticeAtom.ys
valuesz
ndarray
ofXYZAtom.z
coordinates.zperiodic
Return True
if periodic along thez
axis.zs
ndarray
ofLatticeAtom.zs
valuesMethods
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
] alongvector
.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 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
(**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
bycondition
.filter_ids
(atom_ids[, invert])Filter Atoms
byIDAtoms.ids
inatom_ids
.filter_vmd_indices
(vmd_indices[, invert])Filter Atoms
byVMDAtomsAdapterMixin.vmd_indices
.filtered
(condition[, invert])Return new list of Atoms
filtered bycondition
.filtered_ids
(atom_ids[, invert])Return new Atoms
object filtered byatom_ids
.filtered_vmd_indices
(vmd_indices[, invert])Return new Atoms
filtered byvmd_indices
.get_POAV_attr
(POAV_class, attr)Return list of POAVAtom
POAV1
POAV2
orPOAVR
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
withXatom.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 Dihedral
sget_improper
(*ids[, check_operands, degrees])Compute improper angles. get_impropers
([neighbors_only, unique, ids_only])Return list of Impropers
sget_nth_nearest_neighbors
(n[, exclusive])Return `n`th nearest neighbors. get_types
([asdict])Return list of TypeAtom
TypeAtom.type
s.get_vmd_selection_string
(keyword)Get a VMD selection string for the VMD keyword. getattr
(attr[, default, recursive])Get ndarray
of 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 Atoms
within distancer
of point(s)pts
.query_ball_tree
(other, r[, p, eps])Find all pairs of Atoms
whose distance is at morer
.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 classreset_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
orAtoms
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 byVector
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 withinregion
.wrap_coords
([pbc])Wrap coordinates into lattice.