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

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. #3456

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

Conversation

RedStar-Iron
Copy link
Contributor

@RedStar-Iron RedStar-Iron commented Nov 4, 2023

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

Add "IWAVPR" to the tuple of int_keys.
Add the mpi function when running the chargemol program.
import multiprocessing
Comment the warning while check the path.

Revise the command of mpirun.
Change the command to run chargemol
@RedStar-Iron
Copy link
Contributor Author

RedStar-Iron commented Nov 4, 2023

from pymatgen.command_line.chargemol_caller import *

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

Job script to run chargemol program.

Change the previous copy to link for CHGCAR, POTCAR, AECCAR0, AECCAR2.

Add the save parameter, to control whether save the output files of chargemol.
@RedStar-Iron RedStar-Iron changed the title The the files in the temp directory will be deleted after finishing the calculation. 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. Nov 5, 2023
@RedStar-Iron
Copy link
Contributor Author

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.

@Andrew-S-Rosen
Copy link
Member

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

@RedStar-Iron RedStar-Iron changed the title 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 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. Nov 7, 2023
@janosh janosh force-pushed the master branch 2 times, most recently from 3c23114 to 36e289c Compare December 19, 2023 02:10
@janosh janosh force-pushed the master branch 4 times, most recently from d725325 to dca98be Compare February 2, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants