Code Structure

Let’s look at the home page of DP-GEN.

├── build
├── CITATION.cff
├── conda
├── dist
├── doc
├── dpgen
├── dpgen.egg-info
├── examples
├── requirements.txt
└── tests
  • tests : unittest tools for developers.

  • examples: templates for PARAM and MACHINE files for different software, versions and tasks. For details of the parameters in PARAM, you can refer to TASK parameters chapters in this document. If you are confused about how to set up a JSON file, you can also use dpgui

Most of the code related to DP-GEN functions is in the dpgen directory. Open the dpgen directory, and we can see

├── auto_test
├── collect
├── data
├── database
├── dispatcher
├── generator
├── __pycache__
├── remote
├── simplify
├── tools
  • auto_test corresponds to dpgen autotest, for undertaking materials property analysis.

  • collect corresponds to dpgen collect.

  • data corresponds to dpgen init_bulk, dpgen init_surf and dpgen init_reaction, for preparing initial data of bulk and surf systems.

  • database is the source code for collecting data generated by DP-GEN and interface with database.

  • simplify corresponds to dpgen simplify.

  • remote and dispatcher : source code for automatically submiting scripts,maintaining job queues and collecting results. Notice this part hase been integrated into dpdispatcher generator is the core part of DP-GEN. It’s for main process of deep generator. Let’s open this folder.

├── ch4
├── lib
└── 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.