A deep learning package for many-body potential energy representation and molecular dynamics
max_ckpt_keep
for trainer by @iProzd in https://github.com/deepmodeling/deepmd-kit/pull/3441
se_a
and se_r
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/3364
se_atten_v2
masking smooth when davg is not zero by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/3632
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.9...v2.2.10
We are excited to announce the first alpha version of DeePMD-kit v3. DeePMD-kit v3 allows you to train and run deep potential models on top of TensorFlow or PyTorch. DeePMD-kit v3 also supports the DPA-2 model, a novel architecture for large atomic models.
DeePMD-kit v3 adds a pluggable multiple-backend framework to provide consistent training and inference experiences between different backends. You can:
# Training a model using the TensorFlow backend
dp --tf train input.json
dp --tf freeze
# Training a mode using the PyTorch backend
dp --pt train input.json
dp --pt freeze
dp test
, Python/C++/C interface, and third-party packages (dpdata, ASE, LAMMPS, AMBER, Gromacs, i-PI, CP2K, OpenMM, ABACUS, etc). Take an example on LAMMPS:# run LAMMPS with a TensorFlow backend model
pair_style deepmd frozen_model.pb
# run LAMMPS with a PyTorch backend model
pair_style deepmd frozen_model.pth
# Calculate model deviation using both models
pair_style deepmd frozen_model.pb frozen_model.pth out_file md.out out_freq 100
dp convert-backend
, if both backends support a model:dp convert-backend frozen_model.pb frozen_model.pth
dp convert-backend frozen_model.pth frozen_model.pb
We added the PyTorch backend in DeePMD-kit v3 to support the development of new models, especially for large atomic models.
DPA-2 model is a novel architecture for Large Atomic Model (LAM) and can accurately represent a diverse range of chemical systems and materials, enabling high-quality simulations and predictions with significantly reduced efforts compared to traditional methods. The DPA-2 model is only implemented in the PyTorch backend. An example configuration is in the examples/water/dpa2
directory.
The DPA-2 descriptor includes two primary components: repinit
and repformer
. The detailed architecture is shown in the following figure.
The PyTorch backend has supported multiple training strategies to develop large atomic models.
Parallel training: Large atomic models have a number of hyper-parameters and complex architecture, so training a model on multiple GPUs is necessary. Benefiting from the PyTorch community ecosystem, the parallel training for the PyTorch backend can be driven by torchrun
, a launcher for distributed data parallel.
torchrun --nproc_per_node=4 --no-python dp --pt train input.json
Multi-task training: Large atomic models are trained against data in a wide scope and at different DFT levels, which requires multi-task training. The PyTorch backend supports multi-task training, sharing the descriptor between different An example is given in examples/water_multi_task/pytorch_example/input_torch.json
.
Finetune: Fine-tune is useful to train a pre-train large model on a smaller, task-specific dataset. The PyTorch backend has supported --finetune
argument in the dp --pt train
command line.
Researchers may feel pain about the static graph and the custom C++ OPs from the TensorFlow backend, which sacrifices research convenience for computational performance. The PyTorch backend has a well-designed code structure written using the dynamic graph, which is currently 100% written with the Python language, making extending and debugging new deep potential models easier than the static graph.
People may still want to use the traditional models already supported by the TensorFlow backend in the PyTorch backend and compare the same model among different backends. We almost rewrote all of the traditional models in the PyTorch backend, which are listed below:
se_e2_a
, se_e2_r
, se_atten
, hybrid
;standard
, DPRcse_e3
, se_atten_v2
, se_e2_a_mask
dos
linear_ener
, DPLR, pairtab
, linear_ener
, frozen
, pairwise_dprc
, ZBL, Spinloc_frame
, se_e2_a
+ type embedding, se_a_ebd_v2
[!WARNING] As part of an alpha release, the PyTorch backend's API or user input arguments may change before the first stable version.
DP is a reference backend for development that uses pure NumPy to implement models without using any heavy deep-learning frameworks. It cannot be used for training but only for Python inference. As a reference backend, it is not aimed at the best performance but only the correct results. The DP backend uses HDF5 to store model serialization data, which is backend-independent. The DP backend and the serialization data are used in the unit test to ensure different backends have consistent results and can be converted between each other. In the current version, the DP backend has a similar supporting status to the PyTorch backend, while DPA-1 and DPA-2 are not supported yet.
The above highlights were mainly contributed by
.pb
extension.DeepTensor
(including DeepDiople
and DeepPolar
) now returns atomic tensor in the dimension of natoms
instead of nsel_atoms
. by @njzjz in #3390deepmd
module was moved to deepmd.tf
without other API changes, and deepmd_utils
was moved to deepmd
without other API changes. by @njzjz in #3177, #3178Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.8...v3.0.0a0
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.8...v2.2.9
CMAKE_HIP_FLAGS
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/3155
char*
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/3063
deepmd_cli
to deepmd_utils
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2983
deepmd_utils
(without modifaction) by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/3140
DeepPotBase
and DeepTensor
member functions by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/3145
OutOfMemoryError
from deepmd
to deepmd_utils
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/3153
deepmd_utils
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/3161
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.7...v2.2.8
aparam_from_compute
to pair deepmd
by @ChiahsinChu in https://github.com/deepmodeling/deepmd-kit/pull/2929
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.6...v2.2.7
We list critical bugs in previous versions in https://github.com/deepmodeling/deepmd-kit/issues/2866.
dpgui
entry point and dp gui
CLI by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2904
se_atten
and se_atten_v2
mpirun --version
to get MPI version by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2915
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.5...v2.2.6
unit real
by @njzjz and @Yi-FanLi in https://github.com/deepmodeling/deepmd-kit/pull/2775 https://github.com/deepmodeling/deepmd-kit/pull/2790 https://github.com/deepmodeling/deepmd-kit/pull/2800
fix_dplr
use the same type_map
from pair_deepmd
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2776
ndarray.tostring
-> ndarray.tobytes
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2814
tf.accumulate_n
-> tf.add_n
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2815
tf.test.TestCase.test_session
-> tf.test.TestCase.cached_session
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2816
aparam
by @mingzhong15 in https://github.com/deepmodeling/deepmd-kit/pull/2825
HIP
language by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2857
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.4...v2.2.5
module.__path__[0]
instead of module.__file__
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2769
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.3...v2.2.4
rcond
from 1e-3
to None
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2688
model.ckpt.*
to relative paths by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2720
set-rpath
to add-rpath
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2587
FindCUDA
to CUDA language by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2634
exclude_types
is given by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2679
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.2...v2.2.3
error->one
for get_file_content
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2473
dp model_devi
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2501
source
a relative path by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2420
make lammps
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2414
using namespace std;
in header files by @e-kwsm in https://github.com/deepmodeling/deepmd-kit/pull/2437
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.1...v2.2.2