Files
DicePlayer/diceplayer/environment/atom.py
Vitor Hideyoshi d400970e8f refactor: unify and modernize periodic table utilities and typing
- Replace atomsymb and atommass tuples with AtomInfo dataclass and PTable enum for atomic data
- Refactor all usages to access atomic symbol and mass via PTable methods
- Remove nptyping dependency, switch to numpy.typing for type annotations
- Update molecule and atom classes to use new typing and atomic data access
- Bump numpy version to 2.x and remove nptyping from dependencies
2026-02-27 17:56:11 -03:00

24 lines
424 B
Python

from diceplayer.utils.ptable import PTable
from dataclasses import dataclass
@dataclass
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)