Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import from Castep lattice_abc format #247

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ajjackson
Copy link
Member

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.

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.
@ajjackson ajjackson changed the title Castep abc Fix import from Castep lattice_abc format Aug 29, 2024
@ajjackson ajjackson added the bug Something isn't working label Aug 29, 2024
@ajjackson ajjackson requested a review from utf August 29, 2024 10:49
@ajjackson
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue reading castep's lattice_abc
1 participant