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 of Atom 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 of Atom constructor parameters.
update_attrs(**kwargs) Update atom attributes.

Attributes Documentation

Z

Atomic number \(Z\).

Returns:Atomic number \(Z\).
Return type:int
element

Element symbol.

Returns:Symbol of chemical element.
Return type:str
m

An alias for mass.

mass

Atomic mass \(m_a\) in atomic mass units.

Returns:Atomic mass \(m_a\) in atomic mass units.
Return type:float
symbol

Element symbol.

Returns:Element symbol.
Return type:str

Methods Documentation

getattr(attr, default=None, recursive=False)[source] [edit on github][source]

Get atom attribute named attr.

Parameters:
  • attr (str) – Name of attribute
  • default (object, optional) –
  • recursive (bool, optional) –
Returns:

val

Return type:

object

reset_attrs(**kwargs)[source] [edit on github][source]

Reset atom attributes.

rezero(*args, **kwargs)[source] [edit on github][source]
todict()[source] [edit on github][source]

Return dict of Atom constructor parameters.

update_attrs(**kwargs)[source] [edit on github][source]

Update atom attributes.