Closed Cloudac7 closed 2 months ago
Attention: Patch coverage is 91.36691%
with 12 lines
in your changes are missing coverage. Please review.
Project coverage is 87.69%. Comparing base (
76c9657
) to head (3ccfe50
).:exclamation: Current head 3ccfe50 differs from pull request most recent head 61fbc00
Please upload reports for the commit 61fbc00 to get more accurate results.
Files | Patch % | Lines |
---|---|---|
dpgen2/fp/cp2k_input.py | 92.85% | 7 Missing :warning: |
dpgen2/fp/cp2k.py | 87.50% | 5 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It seems that only the three elements C, N, and H and the corresponding pseudopotentials are considered in the code, and once there are other elements in the system, the code may be incorrect.
It seems that only the three elements C, N, and H and the corresponding pseudopotentials are considered in the code, and once there are other elements in the system, the code may be incorrect.
No, it is just a default dict as placeholder. This PR would be soon refactored.
dpgen2/fp/cp2k.py (14)
6-6: `typing.Dict` imported but unused --- 8-8: `typing.Optional` imported but unused --- 9-9: `typing.Set` imported but unused --- 11-11: `typing.Union` imported but unused --- 15-15: `numpy` imported but unused --- 18-18: `dargs.ArgumentEncoder` imported but unused --- 19-19: `dargs.Variant` imported but unused --- 20-20: `dargs.dargs` imported but unused --- 23-23: `dflow.python.OP` imported but unused --- 24-24: `dflow.python.OPIO` imported but unused --- 25-25: `dflow.python.Artifact` imported but unused --- 26-26: `dflow.python.BigParameter` imported but unused --- 27-27: `dflow.python.FatalError` imported but unused --- 28-28: `dflow.python.OPIOSign` imported but unuseddpgen2/fp/cp2k_input.py (8)
2-2: `pathlib.Path` imported but unused --- 6-6: `typing.List` imported but unused --- 8-8: `typing.Set` imported but unused --- 9-9: `typing.Tuple` imported but unused --- 10-10: `typing.Union` imported but unused --- 17-17: `dargs.ArgumentEncoder` imported but unused --- 18-18: `dargs.Variant` imported but unused --- 19-19: `dargs.dargs` imported but unusedtests/fp/test_cp2k.py (9)
1-1: `glob` imported but unused --- 2-2: `json` imported but unused --- 3-3: `os` imported but unused --- 4-4: `shutil` imported but unused --- 5-5: `sys` imported but unused --- 6-6: `textwrap` imported but unused --- 17-17: `numpy` imported but unused --- 21-21: `.context.dpgen2` imported but unused --- 33-33: Redefinition of unused `json` from line 2
tests/fp/data.cp2k/input.inp (1)
`1-52`: The CP2K configuration file is well-structured and aligns with the standard practices for setting up simulations. Good job on maintaining clarity and organization in the file.dpgen2/fp/__init__.py (1)
`6-10`: The addition of CP2K classes to the imports and the `fp_styles` dictionary is correctly implemented. This setup enables the framework to handle CP2K tasks effectively. Also applies to: 48-52tests/fp/test_cp2k.py (1)
`31-93`: The test cases for CP2K input generation and task execution are comprehensive and well-implemented. These tests should effectively validate the CP2K integration.dpgen2/fp/cp2k.py (1)
`55-164`: The implementations of `PrepCp2k` and `RunCp2k` classes are robust and well-documented. These classes are crucial for integrating CP2K support into the framework.dpgen2/fp/cp2k_input.py (1)
`51-211`: The functions `update_dict` and `iterdict`, along with the class `Cp2kInputs`, are well-implemented and crucial for generating CP2K input files. These implementations are essential for the CP2K support in the framework.
Hi @Cloudac7 :
Could you please provide the following example files:
An example of the CP2K inp file. A corresponding input.json file for dpgen2.
These example files would be incredibly helpful for us to quickly get started and verify the new functionality.
Thank you very much!
https://github.com/deepmodeling/dpgen2/pull/238 CP2K support is implemented with FPOP. Please feed back if there is any question. I will close this PR.
As described in #180 , dpgen2 did not support CP2K. This PR add
RunCp2k
and is tested to be OK to generate fp tasks.Thus solved #180.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor
Style
Tests
Cp2kInputs
andRunCp2k
classes.Chores
Revert