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
This commit is contained in:
2026-02-28 15:54:46 -03:00
parent a5504b0435
commit 636c65c07c
5 changed files with 46 additions and 153 deletions

View File

@@ -68,15 +68,10 @@ class TestMolecule(unittest.TestCase):
Atom(lbl=1, na=1, rx=1.0, ry=1.0, rz=1.0, chg=1.0, eps=1.0, sig=1.0)
)
expected = [
[0.0, 1.73205081],
[1.73205081, 0.0]
]
expected = [[0.0, 1.73205081], [1.73205081, 0.0]]
actual = mol.distances_between_atoms()
npt.assert_almost_equal(
expected, actual
)
npt.assert_almost_equal(expected, actual)
def test_inertia_tensor(self):
mol = Molecule("test")