sumo
sumo copied to clipboard
Fix import from Castep lattice_abc format
Closes #107
Cell files with lattice_abc vectors were broken, and this was not causing test failures because it wasn't tested. Here we:
- Create test files with and without explicit dimension units
- fix the treatment of lattice_abc data in "two-rows" format (no unit)
- support recent versions of Pymatgen by migrating to
- Lattice.from_parameters from the deprecated Lattice.from_lengths_and_angles
- Note that Lattice.from_parameters does not produce the same cell matrices as CASTEP, and raise a warning if the user has
abs_positions. The positions will very likely be wrong in this case; but not many features of Sumo are impacted, so perhaps it would be overkill to error out entirely.
After a brief discussion with @jryates : let's error out if the user specifies abs coordinates with lattice_abc. The error message can instruct the user to fix it using c2x, which ships with CASTEP.
@utf I think all is good here, I'll push a release tag in a few days so you have a chance to object!
Looks goot to me!