Files
DicePlayer/diceplayer/environment/atom.py
Vitor Hideyoshi 636c65c07c refactor: modernize System and Molecule classes with dataclasses and cleanup
- Convert System and Molecule classes to use @dataclass and field for defaults
- Remove unused imports and legacy code from system.py
- Move print_charges_and_dipole method from System to Player for better separation of concerns
- Minor formatting and import order improvements for consistency
2026-02-28 15:54:46 -03:00

28 lines
540 B
Python

from diceplayer.utils.ptable import AtomInfo, 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)
@property
def atom_info(self) -> AtomInfo:
return PTable.get_from_atomic_number(self.na)