pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

Add cell_filter_kwargs to relax method that is passed to ExpCellFilter

Open yuuukuma opened this issue 2 years ago • 1 comments

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.py to type check your code.
  • [ ] Tests have been added for any new functionality or bug fixes.
  • [x] All linting and tests pass.

yuuukuma avatar Apr 29 '23 01:04 yuuukuma

@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?

janosh avatar Apr 30 '23 00:04 janosh