-
Notifications
You must be signed in to change notification settings - Fork 875
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AseAtomsAdaptor: Support arbitrary selective dynamics constraints (#4229
) * AseAtomsAdaptor: Support arbitrary selective dynamics constraints * src/pymatgen/io/ase.py (AseAtomsAdaptor.get_atoms): Use FixCartesian constraint instead of FixAtoms. FixCartesian can constrain individual coordinates and directly map selective dynamics settings. (AseAtomsAdaptor.get_structure): Add mapping from FixCartesian constraint to selective dynamics. * AseAtomsAdaptor.get_atoms: Fix failing tests * src/pymatgen/io/ase.py (AseAtomsAdaptor.get_atoms): Make sure that old tests are not failing. Never create empty constraints. Prefer using FixAtoms when possible (as in the past). * Add new tests for converting selective dynamics in Ase/Structure * tests/io/test_ase.py (test_get_atoms_from_structure_dyn) (test_get_structure_dyn): Test mixed coordinate constraint.
- Loading branch information
Showing
2 changed files
with
65 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters