Atom¶
-
class
sknano.core.atoms.
Atom
(*args, element=None, mass=None, Z=None, parent=None, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.meta.BaseClass
Base class for abstract representation of structure atom.
Parameters: element ({str, int}, optional) – A string representation of the element symbol or an integer specifying an element atomic number \(\boldsymbol{Z}\). Attributes
Z
Atomic number \(Z\). element
Element symbol. fmtstr
Format string. m
An alias for mass
.mass
Atomic mass \(m_a\) in atomic mass units. symbol
Element symbol. Methods
getattr
(attr[, default, recursive])Get atom attribute named attr
.reset_attrs
(**kwargs)Reset atom attributes. rezero
(*args, **kwargs)todict
()Return dict
ofAtom
constructor parameters.update_attrs
(**kwargs)Update atom attributes. Attributes Summary
Z
Atomic number \(Z\). element
Element symbol. m
An alias for mass
.mass
Atomic mass \(m_a\) in atomic mass units. symbol
Element symbol. Methods Summary
getattr
(attr[, default, recursive])Get atom attribute named attr
.reset_attrs
(**kwargs)Reset atom attributes. rezero
(*args, **kwargs)todict
()Return dict
ofAtom
constructor parameters.update_attrs
(**kwargs)Update atom attributes. Attributes Documentation
-
mass
¶ Atomic mass \(m_a\) in atomic mass units.
Returns: Atomic mass \(m_a\) in atomic mass units. Return type: float
Methods Documentation
-
getattr
(attr, default=None, recursive=False)[source] [edit on github][source]¶ Get atom attribute named
attr
.Parameters: Returns: val
Return type:
-
reset_attrs
(**kwargs)[source] [edit on github][source]¶ Reset atom attributes.
-
rezero
(*args, **kwargs)[source] [edit on github][source]¶
-
update_attrs
(**kwargs)[source] [edit on github][source]¶ Update atom attributes.
-