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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user