sumo icon indicating copy to clipboard operation
sumo copied to clipboard

Fix import from Castep lattice_abc format

Open ajjackson opened this issue 1 year ago • 1 comments

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.

ajjackson avatar Aug 29 '24 10:08 ajjackson

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.

ajjackson avatar Sep 10 '24 09:09 ajjackson

@utf I think all is good here, I'll push a release tag in a few days so you have a chance to object!

ajjackson avatar Nov 07 '24 09:11 ajjackson

Looks goot to me!

utf avatar Nov 12 '24 15:11 utf