XYZAtom¶
-
class
sknano.core.atoms.xyz_atoms.XYZAtom(*args, x=None, y=None, z=None, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.atoms.AtomAn
Atomsub-class with x, y, z attributes.Parameters: - element ({str, int}, optional) – A string representation of the element symbol or an integer specifying an element atomic number.
- y, z (x,) – \(x, y, z\) components of
XYZAtomposition vector relative to origin.
Attributes
ZAtomic number \(Z\). dr\(x, y, z\) components of Atomdisplacement vector.elementElement symbol. fmtstrFormat string. mAn alias for mass.massAtomic mass \(m_a\) in atomic mass units. r\(x, y, z\) components of Atomposition vector.r0\(x, y, z\) components of Atomposition vector at t=0.symbolElement symbol. x\(x\)-coordinate in units of Angstroms. y\(y\)-coordinate in units of Angstroms. z\(z\)-coordinate in units of Angstroms. Methods
get_coords([asdict])Return atom coords. getattr(attr[, default, recursive])Get atom attribute named attr.reset_attrs(**kwargs)Reset atom attributes. rezero([epsilon])Alias for Atom.rezero_xyz, but callssuperclassrezeromethod as well.rezero_coords([epsilon])Alias for Atom.rezero_xyz.rezero_xyz([epsilon])Re-zero position vector components. todict()Return dictof constructor parameters.update_attrs(**kwargs)Update atom attributes. Attributes Summary
dr\(x, y, z\) components of Atomdisplacement vector.r\(x, y, z\) components of Atomposition vector.r0\(x, y, z\) components of Atomposition vector at t=0.x\(x\)-coordinate in units of Angstroms. y\(y\)-coordinate in units of Angstroms. z\(z\)-coordinate in units of Angstroms. Methods Summary
get_coords([asdict])Return atom coords. rezero([epsilon])Alias for Atom.rezero_xyz, but callssuperclassrezeromethod as well.rezero_coords([epsilon])Alias for Atom.rezero_xyz.rezero_xyz([epsilon])Re-zero position vector components. todict()Return dictof constructor parameters.Attributes Documentation
-
dr¶ \(x, y, z\) components of
Atomdisplacement vector.Returns: 3-element ndarray of [\(x, y, z\)] coordinates of Atom.Return type: ndarray
-
r¶ \(x, y, z\) components of
Atomposition vector.Returns: 3D Vectorof [\(x, y, z\)] coordinates ofAtom.Return type: Vector
-
r0¶ \(x, y, z\) components of
Atomposition vector at t=0.Returns: 3-element ndarray of [\(x, y, z\)] coordinates of Atom.Return type: ndarray
-
x¶ \(x\)-coordinate in units of Angstroms.
Returns: \(x\)-coordinate in units of Angstroms. Return type: float
-
y¶ \(y\)-coordinate in units of Angstroms.
Returns: \(y\)-coordinate in units of Angstroms. Return type: float
-
z¶ \(z\)-coordinate in units of Angstroms.
Returns: \(z\)-coordinate in units of Angstroms. Return type: float
Methods Documentation
-
get_coords(asdict=False)[source] [edit on github][source]¶ Return atom coords.
Parameters: asdict (bool, optional) – Returns: coords Return type: OrderedDictor ndarray
-
rezero(epsilon=1e-10)[source] [edit on github][source]¶ Alias for
Atom.rezero_xyz, but callssuperclassrezeromethod as well.
-
rezero_coords(epsilon=1e-10)[source] [edit on github][source]¶ Alias for
Atom.rezero_xyz.
-
rezero_xyz(epsilon=1e-10)[source] [edit on github][source]¶ Re-zero position vector components.
Set position vector components with absolute value less than
epsilonto zero.Unlike the
Atom.rezeromethod, this method does not call the super classrezeromethod.Parameters: epsilon (float) – smallest allowed absolute value of any \(x,y,z\) component.
-
todict()[source] [edit on github][source]¶ Return
dictof constructor parameters.