pymatgen
pymatgen copied to clipboard
Add cell_filter_kwargs to relax method that is passed to ExpCellFilter
Summary
Add cell_filter_kwargs to relax method that is passed to ExpCellFilter This extension allows us to e.g. relax lattice constant along particular directions, e.g.,
structure.relax(cell_filter_kwargs={"mask": (1,1,0,0,0,1)}))
Then, the lattice is optimized only in xy-plane.
Because the change is tiny, I didn't add a unittest for it.
Checklist
Before a pull request can be merged, the following items must be checked:
- [x] Doc strings have been added in the Google docstring format. Run pydocstyle on your code.
- [x] Type annotations are highly encouraged. Run
mypy path/to/file.pyto type check your code. - [ ] Tests have been added for any new functionality or bug fixes.
- [x] All linting and tests pass.
@yuuukuma You deleted the file test_files/vasprun.xml.dfpt.ionic which is causing a test to fail. Please restore it. Also, could you add/modify a test that for the new cell_filter_kwargs?