We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c066f09 commit 04b3035Copy full SHA for 04b3035
tests/core/test_structure.py
@@ -964,7 +964,11 @@ def test_to_from_ase_atoms(self):
964
assert isinstance(atoms, Atoms)
965
assert len(atoms) == len(self.struct)
966
967
- assert AseAtomsAdaptor.get_structure(atoms) == self.struct
+ structure = AseAtomsAdaptor.get_structure(atoms)
968
+ assert structure == self.struct
969
+
970
+ # Ensure PBC is `bool` type (not `np.bool_`) and JSON serializable
971
+ assert "pymatgen.core.structure" in structure.to(fmt="json")
972
973
assert IStructure.from_ase_atoms(atoms) == self.struct
974
assert type(IStructure.from_ase_atoms(atoms)) is IStructure
0 commit comments