From 17c96149eb94b3d3e800496397b6e62e7cd622fa Mon Sep 17 00:00:00 2001 From: HuangJiameng <105633685+HuangJiameng@users.noreply.github.com> Date: Fri, 5 Aug 2022 13:02:07 +0800 Subject: [PATCH 1/4] Create DP-GEN Structure.md --- doc/overview/DP-GEN Structure.md | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 doc/overview/DP-GEN Structure.md diff --git a/doc/overview/DP-GEN Structure.md b/doc/overview/DP-GEN Structure.md new file mode 100644 index 000000000..7dad08e65 --- /dev/null +++ b/doc/overview/DP-GEN Structure.md @@ -0,0 +1,66 @@ +# Overview of the structure of the DP-GEN repository +Let's look at the home page of DP-GEN. https://github.com/deepmodeling/dpgen +```` +├── build +├── CITATION.cff +├── conda +├── dist +├── doc +├── dpgen +├── dpgen.egg-info +├── examples +├── LICENSE +├── README.md +├── requirements.txt +├── setup.py +└── tests +```` +In `examples`, we prepared templates for PARAM and MACHINE files for different software, versions and tasks. +Most of the code related to DP-GEN functions is in the `dpgen` directory. Open the `dpgen` directory, and we can see +```` +├── arginfo.py +├── auto_test +├── collect +├── data +├── database +├── _date.py +├── dispatcher +├── generator +├── __init__.py +├── main.py +├── __pycache__ +├── remote +├── simplify +├── tools +├── util.py +└── _version.py +```` +`auto_test` corresponds to `dpgen autotest` +`collect` corresponds to `dpgen collect` +`data` corresponds to `dpgen init_bulk` and `dpgen init_surf` +`simplify` corresponds to `dpgen simplify` +A large part of `dispatcher` has been moved to `dpdispatcher`, see https://github.com/deepmodeling/dpdispatcher +`generator` is the core part of DP-GEN, let's open this folder. + +```` +├── arginfo.py +├── ch4 +├── __init__.py +├── lib +└── run.py +```` +run.py is the core of DP-GEN, corresponding to `dpgen run`, we can find `make_train`, `run_train`, ... `post_fp`, and other steps related functions here. + +# Find how a parameter is used in the code +It is strongly recommended that you use the `find in files` function of Virtual Studio software, or similar functions of other software. Type in the name of the parameter you're looking for, and you'll see where it's read in, and the procedure used. +Of course, you can also search for the relevant code according to the above guide. + +# Want to modify a function? +If you have special requirements, you can make personalized modifications in the code corresponding to the function. If you think your modification can benefit the public, and it does not conflict with the current DP-GEN function; or if you fix a bug, please make a pull requist to contribute the optimization to the DP-GEN repository. + +# DP-GEN dependencies +dpdispatcher and dpdata are dependencies of DP-GEN. dpdispatcher is related to task submission, monitoring and recovery, and dpdata is related to data processing. If you encounter an error and want to find the reason, please judge whether the problem comes from DP-GEN, dpdispatcher or dpdata according to the last line of `Traceback`. + +# About the update of the parameter file +You may have noticed that there are arginfo.py files in many folders. This is a file used to generate parameter documentation. +If you add or modify a parameter in DP-GEN and intend to export it to the main repository, please sync your changes in arginfo. \ No newline at end of file From cc3ee52d33f7e79da22f584e9a96997892d0c98c Mon Sep 17 00:00:00 2001 From: HuangJiameng <105633685+HuangJiameng@users.noreply.github.com> Date: Tue, 9 Aug 2022 07:17:40 +0800 Subject: [PATCH 2/4] update DP-GEN-structure --- doc/index.rst | 1 + doc/overview/{DP-GEN Structure.md => DP-GEN-structure.md} | 0 2 files changed, 1 insertion(+) rename doc/overview/{DP-GEN Structure.md => DP-GEN-structure.md} (100%) diff --git a/doc/index.rst b/doc/index.rst index 65161739d..180c82868 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -9,6 +9,7 @@ DPGEN's documentation :caption: Overview overview/cli + overview/DP-GEN-structure .. _installation:: diff --git a/doc/overview/DP-GEN Structure.md b/doc/overview/DP-GEN-structure.md similarity index 100% rename from doc/overview/DP-GEN Structure.md rename to doc/overview/DP-GEN-structure.md From 2c89ec1381c0b795fbd226b3be4c5b0aa193bdcc Mon Sep 17 00:00:00 2001 From: HuangJiameng <105633685+HuangJiameng@users.noreply.github.com> Date: Tue, 9 Aug 2022 10:45:42 +0800 Subject: [PATCH 3/4] Update DP-GEN-structure.md --- doc/overview/DP-GEN-structure.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/overview/DP-GEN-structure.md b/doc/overview/DP-GEN-structure.md index 7dad08e65..44db99169 100644 --- a/doc/overview/DP-GEN-structure.md +++ b/doc/overview/DP-GEN-structure.md @@ -51,16 +51,16 @@ A large part of `dispatcher` has been moved to `dpdispatcher`, see https://githu ```` run.py is the core of DP-GEN, corresponding to `dpgen run`, we can find `make_train`, `run_train`, ... `post_fp`, and other steps related functions here. -# Find how a parameter is used in the code +## Find how a parameter is used in the code It is strongly recommended that you use the `find in files` function of Virtual Studio software, or similar functions of other software. Type in the name of the parameter you're looking for, and you'll see where it's read in, and the procedure used. Of course, you can also search for the relevant code according to the above guide. -# Want to modify a function? +## Want to modify a function? If you have special requirements, you can make personalized modifications in the code corresponding to the function. If you think your modification can benefit the public, and it does not conflict with the current DP-GEN function; or if you fix a bug, please make a pull requist to contribute the optimization to the DP-GEN repository. -# DP-GEN dependencies +## DP-GEN dependencies dpdispatcher and dpdata are dependencies of DP-GEN. dpdispatcher is related to task submission, monitoring and recovery, and dpdata is related to data processing. If you encounter an error and want to find the reason, please judge whether the problem comes from DP-GEN, dpdispatcher or dpdata according to the last line of `Traceback`. -# About the update of the parameter file +## About the update of the parameter file You may have noticed that there are arginfo.py files in many folders. This is a file used to generate parameter documentation. If you add or modify a parameter in DP-GEN and intend to export it to the main repository, please sync your changes in arginfo. \ No newline at end of file From a2ae0f1e87cbce0240b6690201bd864b846d3128 Mon Sep 17 00:00:00 2001 From: HuangJiameng <105633685+HuangJiameng@users.noreply.github.com> Date: Tue, 9 Aug 2022 15:56:04 +0800 Subject: [PATCH 4/4] Update DP-GEN-structure.md fix typo --- doc/overview/DP-GEN-structure.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/overview/DP-GEN-structure.md b/doc/overview/DP-GEN-structure.md index 44db99169..cf570508f 100644 --- a/doc/overview/DP-GEN-structure.md +++ b/doc/overview/DP-GEN-structure.md @@ -52,15 +52,15 @@ A large part of `dispatcher` has been moved to `dpdispatcher`, see https://githu run.py is the core of DP-GEN, corresponding to `dpgen run`, we can find `make_train`, `run_train`, ... `post_fp`, and other steps related functions here. ## Find how a parameter is used in the code -It is strongly recommended that you use the `find in files` function of Virtual Studio software, or similar functions of other software. Type in the name of the parameter you're looking for, and you'll see where it's read in, and the procedure used. +It is strongly recommended that you use the `find in files` function of Visual Studio software, or similar functions of other software. Type in the name of the parameter you're looking for, and you'll see where it's read in, and the procedure used. Of course, you can also search for the relevant code according to the above guide. ## Want to modify a function? -If you have special requirements, you can make personalized modifications in the code corresponding to the function. If you think your modification can benefit the public, and it does not conflict with the current DP-GEN function; or if you fix a bug, please make a pull requist to contribute the optimization to the DP-GEN repository. +If you have special requirements, you can make personalized modifications in the code corresponding to the function. If you think your modification can benefit the public, and it does not conflict with the current DP-GEN function; or if you fix a bug, please make a pull request to contribute the optimization to the DP-GEN repository. ## DP-GEN dependencies dpdispatcher and dpdata are dependencies of DP-GEN. dpdispatcher is related to task submission, monitoring and recovery, and dpdata is related to data processing. If you encounter an error and want to find the reason, please judge whether the problem comes from DP-GEN, dpdispatcher or dpdata according to the last line of `Traceback`. ## About the update of the parameter file You may have noticed that there are arginfo.py files in many folders. This is a file used to generate parameter documentation. -If you add or modify a parameter in DP-GEN and intend to export it to the main repository, please sync your changes in arginfo. \ No newline at end of file +If you add or modify a parameter in DP-GEN and intend to export it to the main repository, please sync your changes in arginfo.