fix: enable strict dpgen run argument validation (#1977)
Summary
- restore the default strict
dargsvalidation fordpgen run;- reject undefined top-level run parameters instead of silently accepting them;
- add a regression test that exercises
run_iter()with an unknown parameter.Context
PR #952 explicitly set
strict_check=Falsebecause several runtime-supported parameters were still missing from the generated argument schema (#771, #773, #774, #781, #782).Those original schema gaps are now resolved: GROMACS was covered by #1959, CALYPSO native/external-input modes by #1960 (including the historical
buffetpath from #781), PWmat by #1961, and #782 had already been completed. The repository’snormalize()helper already defaults to strict checking, and the official run examples are exercised with strict validation intests/test_check_examples.py.This therefore removes the historical loose-check override rather than introducing a separate validation path.
Validation
- added
tests/test_run_argcheck.pyto verify that an unknown run parameter raisesArgumentKeyErrorbefore workflow execution;- final branch is one commit directly on the current upstream
master;- final diff contains only
dpgen/generator/run.pyand the regression test.Agent: ChatGPT Model: GPT-5.6 Sol
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
DP-GEN: A concurrent learning platform for the generation of reliable deep learning based potential energy models
DP-GEN (Deep Potential GENerator) is a software written in Python, delicately designed to generate a deep learning based model of interatomic potential energy and force field. DP-GEN is dependent on DeePMD-kit. With highly scalable interface with common softwares for molecular simulation, DP-GEN is capable to automatically prepare scripts and maintain job queues on HPC machines (High Performance Cluster) and analyze results.
If you use this software in any publication, please cite:
Yuzhi Zhang, Haidi Wang, Weijie Chen, Jinzhe Zeng, Linfeng Zhang, Han Wang, and Weinan E, DP-GEN: A concurrent learning platform for the generation of reliable deep learning based potential energy models, Computer Physics Communications, 2020, 253, 107206.
Highlighted features
Download and Install
DP-GEN only supports Python 3.10 and above. You can setup a conda/pip environment, and then use one of the following methods to install DP-GEN:
pip install dpgenconda install -c conda-forge dpgengit clone https://github.com/deepmodeling/dpgen && pip install ./dpgenTo test if the installation is successful, you may execute
Workflows and usage
DP-GEN contains the following workflows:
dpgen run: Main process of Deep Potential Generator.dpgen init_bulk: Generating initial data for bulk systems.dpgen init_surf: Generating initial data for surface systems.dpgen init_reaction: Generating initial data for reactive systems.dpgen simplify: Reducing the amount of existing dataset.dpgen autotest: Autotest for Deep Potential.For detailed usage and parameters, read DP-GEN documentation.
Tutorials and examples
License
The project dpgen is licensed under GNU LGPLv3.0.
Contributing
DP-GEN is maintained by DeepModeling’s developers. Contributors are always welcome.