diff --git a/gmso/core/atom_type.py b/gmso/core/atom_type.py index a664bd45a..6405f69ac 100644 --- a/gmso/core/atom_type.py +++ b/gmso/core/atom_type.py @@ -129,10 +129,7 @@ def __hash__(self): self.name, unyt_to_hashable(self.mass), unyt_to_hashable(self.charge), - self.expression, - tuple(self.independent_variables), - tuple(self.parameters.keys()), - tuple(unyt_to_hashable(val) for val in self.parameters.values()) + self.potential_expression ) ) ) diff --git a/gmso/tests/test_atom_type.py b/gmso/tests/test_atom_type.py index 4586876f9..021018689 100644 --- a/gmso/tests/test_atom_type.py +++ b/gmso/tests/test_atom_type.py @@ -1,3 +1,4 @@ +from copy import deepcopy import unyt as u import sympy import pytest @@ -216,3 +217,7 @@ def test_with_1000_atom_types(self): assert len(top.atom_types) == 1 assert top.n_sites == 1000 + def test_atom_type_copy(self, typed_ethane): + for atom_type in typed_ethane.atom_types: + assert atom_type.copy(deep=True) == atom_type + assert deepcopy(atom_type) == atom_type