VelocityAtom¶
-
class
sknano.core.atoms.
VelocityAtom
(*args, vx=None, vy=None, vz=None, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.atoms.atoms.Atom
An
Atom
sub-class with velocity component attributes.Parameters: - element ({str, int}, optional) – A string representation of the element symbol or an integer specifying an element atomic number.
- vy, vz (vx,) – vx,vy,vz components of
VelocityAtom
velocity.
Attributes
Z
Atomic number Z. element
Element symbol. fmtstr
Format string. m
An alias for mass
.mass
Atomic mass ma in atomic mass units. symbol
Element symbol. v
vx,vy,vz array of velocity components. vx
x component of VelocityAtom
velocity vectorvy
x component of VelocityAtom
velocity vectorvz
z component of VelocityAtom
velocity vectorMethods
getattr
(attr[, default, recursive])Get atom attribute named attr
.reset_attrs
(**kwargs)Reset atom attributes. rezero
([epsilon])Re-zero velocity vector components. rotate
(**kwargs)Rotate Atom
velocity vector.todict
()Return dict
of constructor parameters.update_attrs
(**kwargs)Update atom attributes. Attributes Summary
v
vx,vy,vz array of velocity components. vx
x component of VelocityAtom
velocity vectorvy
x component of VelocityAtom
velocity vectorvz
z component of VelocityAtom
velocity vectorMethods Summary
rezero
([epsilon])Re-zero velocity vector components. rotate
(**kwargs)Rotate Atom
velocity vector.todict
()Return dict
of constructor parameters.Attributes Documentation
-
v
¶ vx,vy,vz array of velocity components.
Returns: 3-element ndarray of [vx, vy, vz] velocity components of VelocityAtom
.Return type: ndarray
-
vx
¶ x component of
VelocityAtom
velocity vector
-
vy
¶ x component of
VelocityAtom
velocity vector
-
vz
¶ z component of
VelocityAtom
velocity vector
Methods Documentation
-
rezero
(epsilon=1e-10)[source] [edit on github][source]¶ Re-zero velocity vector components.
Set velocity vector components with absolute value less than
epsilon
to zero.Parameters: epsilon (float) – smallest allowed absolute value of any x,y,z component.
-
rotate
(**kwargs)[source] [edit on github][source]¶ Rotate
Atom
velocity vector.Parameters:
-
todict
()[source] [edit on github][source]¶ Return
dict
of constructor parameters.