def test_vasp_writer_idempotence(name): """Test that conversion to VASP of a structure loaded from VASP is idempotent.""" # Testing on all built-in structure assures us that corner cases # are taken care of. cryst = Crystal.from_database(name) with tempfile.TemporaryDirectory() as temp_dir: f = Path(temp_dir) / "temp.POSCAR" cryst.to_poscar(f) cryst2 = Crystal.from_poscar(f) assert cryst == cryst2
def test_pwscf_lattice_vectors_alat(poscar): """Test POSCAR parser against CIF parser""" c0 = Crystal.from_cif(Path(__file__).parent / "data" / "issue5_MgSiO3.cif") c1 = Crystal.from_poscar(Path(__file__).parent / "data" / poscar) assert c0 == c1