pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

Add a save parameter for chargemol calculation to select whether save the output files, use "link" rather than "copy" for the input file of chargemol calc, add mpi function to run chargemol.

Open RedStar-Iron opened this issue 1 year ago • 3 comments

Revised Content

  1. Add save parameter to control whether save the output files from chargemol calculation
  2. Use link rather than copy for CHGCAR, POTCAR, ARCCAR0 and ARCCAR2 during the calculation
  3. Support mpirun for chargemol calculation

RedStar-Iron avatar Nov 04 '23 23:11 RedStar-Iron

from pymatgen.command_line.chargemol_caller import *

chargemol = ChargemolAnalysis(mpi=True,ncores=32, save=True)

Job script to run chargemol program.

RedStar-Iron avatar Nov 04 '23 23:11 RedStar-Iron

Hi Dr. @Andrew-S-Rosen,

Are you available to have look the remaining problem in this commit?

I have tried several methods to handle this problem but it still remains. Do you have some experiences to solve this kind of problem?

Thanks a lot! Gsliu

pymatgen/command_line/chargemol_caller.py:67: error: Incompatible types in assignment (expression has type "Optional[str]", variable has type "Union[str, list[str]]")  [assignment]
pymatgen/command_line/chargemol_caller.py:78: error: Incompatible types in assignment (expression has type "Optional[str]", variable has type "Union[str, list[str]]")  [assignment]
pymatgen/command_line/chargemol_caller.py:[20](https://github.com/materialsproject/pymatgen/actions/runs/6779786547/job/18427398503?pr=3456#step:6:21)6: error: Incompatible types in assignment (expression has type "Union[str, list[str]]", variable has type "list[Union[str, list[str]]]")  [assignment]
pymatgen/command_line/chargemol_caller.py:239: error: Argument 1 to "Popen" has incompatible type "list[Union[str, list[str]]]"; expected "Union[Union[str, bytes, PathLike[str], PathLike[bytes]], Sequence[Union[str, bytes, PathLike[str], PathLike[bytes]]]]"  [arg-type]
pymatgen/command_line/chargemol_caller.py:273: error: Argument 1 to "Popen" has incompatible type "list[Union[str, list[str]]]"; expected "Union[Union[str, bytes, PathLike[str], PathLike[bytes]], Sequence[Union[str, bytes, PathLike[str], PathLike[bytes]]]]"  [arg-type]
Found 5 errors in 1 file (checked 267 source files)
Error: Process completed with exit code 1.

RedStar-Iron avatar Nov 07 '23 04:11 RedStar-Iron

@RedStar-Iron: Apologies, but I unfortunately don't have time to look at this PR. @chiang-yuan and/or @janosh might be interested, however.

Andrew-S-Rosen avatar Nov 07 '23 04:11 Andrew-S-Rosen