diff --git a/psiflow/geometry.py b/psiflow/geometry.py index bd9e271..9e5f8f3 100644 --- a/psiflow/geometry.py +++ b/psiflow/geometry.py @@ -233,7 +233,7 @@ def save(self, path_xyz: Union[Path, str]): Args: path_xyz (Union[Path, str]): Path to save the XYZ file. """ - path_xyz = psiflow.resolve_and_check(path_xyz) + path_xyz = psiflow.resolve_and_check(Path(path_xyz)) with open(path_xyz, "w") as f: f.write(self.to_string()) diff --git a/tests/test_data.py b/tests/test_data.py index 3657625..294ed33 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -135,6 +135,7 @@ def test_geometry(tmp_path): assert state.identifier == state.identifier state.save(tmp_path / "geo.xyz") + state.save(str(tmp_path / "geo.xyz")) assert state == Geometry.load(tmp_path / "geo.xyz")