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

Allow user defined forward_common_files and backward_files #482

Merged
merged 35 commits into from
Aug 7, 2021

Conversation

AnguseZhang
Copy link
Collaborator

Allow user defined forward_common_files and backward_files
Detailed Description

In vasp, users need to add a file vdw_kernel.bindat as input files.
In plumed, users need to collect HILLS. See Devel #312

Other updates:

  1. I also clean decide_machine and unify the converting interface. For now, we would allow only one machine.
  2. "lmp_command" is deprecated, we will adopt "model_devi_command".
  3. Update some docs.

@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2021

Codecov Report

Attention: Patch coverage is 42.69663% with 51 lines in your changes missing coverage. Please review.

Project coverage is 32.97%. Comparing base (86afc5b) to head (05e1daf).
Report is 457 commits behind head on devel.

Files with missing lines Patch % Lines
dpgen/data/gen.py 23.33% 23 Missing ⚠️
dpgen/generator/run.py 28.00% 18 Missing ⚠️
dpgen/auto_test/common_equi.py 33.33% 2 Missing ⚠️
dpgen/auto_test/common_prop.py 33.33% 2 Missing ⚠️
dpgen/auto_test/lib/util.py 0.00% 2 Missing ⚠️
dpgen/generator/lib/utils.py 85.71% 2 Missing ⚠️
dpgen/data/surf.py 50.00% 1 Missing ⚠️
dpgen/simplify/simplify.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            devel     #482    +/-   ##
========================================
  Coverage   32.97%   32.97%            
========================================
  Files          86       86            
  Lines       14736    14560   -176     
========================================
- Hits         4859     4801    -58     
+ Misses       9877     9759   -118     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -2158,10 +2169,10 @@ def run_fp (iter_index,
mdata) :
fp_style = jdata['fp_style']
fp_pp_files = jdata['fp_pp_files']

backward_files = ['fp.log']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that only VASP uses the default log_file. Others set it to output.

run_fp_inner(iter_index, jdata, mdata, forward_files, backward_files, _qe_check_fin, log_file = 'output')

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Member

@amcadmus amcadmus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should distinguish user_forward_files and user_forward_common_files. The former the task specific and the latter is common and symbol linked to all tasks. This convention is consistent to forward_files and forward_common_files.

I also think we do not need to implement a new symlink_user_forward_files for user defined forward files. Just put all files need to be linked to user_forward_common_files.

dpgen/generator/run.py Show resolved Hide resolved
dpgen/remote/decide_machine.py Outdated Show resolved Hide resolved
examples/init/INCAR_methane.rlx Outdated Show resolved Hide resolved
@amcadmus amcadmus requested review from njzjz and amcadmus August 5, 2021 01:38
@AnguseZhang
Copy link
Collaborator Author

I also add support this function in init_bulk.
Same support for init_surf and auto_test will be added in the future.

I also fixed bug in #487

examples/init/INCAR_methane.md Outdated Show resolved Hide resolved
tests/tools/context.py Outdated Show resolved Hide resolved
Comment on lines 11 to 12
def setUpModule():
os.chdir(os.path.abspath(os.path.dirname(__file__)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the function is not corresponding to what it is doing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied from

def setUpModule():

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should modify them together.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with you. I will fix other setUpModule in another PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name is reserved for UTs and helps to change dir to the file dir. So we should not change it. Please see
https://docs.python.org/3/library/unittest.html#setupmodule-and-teardownmodule

@amcadmus amcadmus merged commit ddf39f1 into deepmodeling:devel Aug 7, 2021
Cloudac7 pushed a commit to Cloudac7/dpgen that referenced this pull request Dec 1, 2021
…ing#482)

* Add Cu's init_surf examples.

* Delete personal information

* Update examples/init/cu.surf.hcp.111.json

Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>

* Add fp.log in backward_files

* Add original methane INCAR

* Refactor decide_machine; Allow user_defined input and output;

* Debug user_defined_forward_common_files

* Fix bug in user_forward_common_files

* Allow define input and output files

* Fix bugs

* Fix bugs

* Fix bug

* Fix bug

* Fix bug

* Add documentation

* Fix bug

* Add file for unittest

* Fix backward_files and examples.

* Fix user_forward_files

* Change comments; add support for init; fix cvasp problems

* Fix bugs in cvasp of init_bulk

* Fix bug in user_forward_files in init_bulk

* Fix bug in init's user_forward_files

* Fix cvasp bugs in init_bulk

* Fix bugs in cvasp of init_bulk

* Fix bug in INCAR_md, fixed unit test

* Update context.py

* Update context.py

* Update test_convert_mdata.py

* Update context.py

* Update test_convert_mdata.py

Co-authored-by: Han Wang <amcadmus@gmail.com>
Co-authored-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
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.

4 participants