def test_to_and_from_dict(self): mm = MoleculeMatcher(tolerance=0.5, mapper=InchiMolAtomMapper(angle_tolerance=50.0)) d = mm.to_dict mm2 = MoleculeMatcher.from_dict(d) self.assertEqual(d, mm2.to_dict) mm = MoleculeMatcher(tolerance=0.5, mapper=IsomorphismMolAtomMapper()) d = mm.to_dict mm2 = MoleculeMatcher.from_dict(d) self.assertEqual(d, mm2.to_dict)
def test_to_and_from_dict(self): mm = MoleculeMatcher(tolerance=0.5, mapper=InchiMolAtomMapper(angle_tolerance=50.0)) d = mm.as_dict() mm2 = MoleculeMatcher.from_dict(d) self.assertEqual(d, mm2.as_dict()) mm = MoleculeMatcher(tolerance=0.5, mapper=IsomorphismMolAtomMapper()) d = mm.as_dict() mm2 = MoleculeMatcher.from_dict(d) self.assertEqual(d, mm2.as_dict())