28 lines
561 B
Python
28 lines
561 B
Python
from diceplayer.utils.ptable import AtomInfo, PTable
|
|
|
|
from pydantic.dataclasses import dataclass
|
|
|
|
|
|
@dataclass(slots=True)
|
|
class Atom:
|
|
"""
|
|
Atom class declaration. This class is used throughout the DicePlayer program to represent atoms.
|
|
"""
|
|
|
|
lbl: int
|
|
na: int
|
|
rx: float
|
|
ry: float
|
|
rz: float
|
|
chg: float
|
|
eps: float
|
|
sig: float
|
|
|
|
@property
|
|
def mass(self) -> float:
|
|
return PTable.get_atomic_mass(self.na)
|
|
|
|
@property
|
|
def atom_info(self) -> AtomInfo:
|
|
return PTable.get_from_atomic_number(self.na)
|