A deep learning package for many-body potential energy representation and molecular dynamics
LGPL-3.0 License
Bot releases are visible (Hide)
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
Published by njzjz 8 months ago
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
Published by njzjz 9 months ago
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.8...v2.2.9
Published by njzjz 9 months ago
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
Published by wanghan-iapcm 12 months ago
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
Published by njzjz about 1 year ago
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
Published by wanghan-iapcm about 1 year ago
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
Published by wanghan-iapcm about 1 year ago
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
Published by wanghan-iapcm about 1 year ago
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
Published by amcadmus over 1 year ago
error->one
for get_file_content
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
Published by wanghan-iapcm over 1 year ago
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.2.0...v2.2.1
Published by amcadmus over 1 year ago
ComputeNlist
-> ComputeNList
in the C API by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2119
DeepEval.eval_typeebd
to get type embedding by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2244
pair_style deepmd
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2267
get_gpus
subprocess when TF is cpu only by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2135
dp test
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2310
sel
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2347
USE_TF_PYTHON_LIBS
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2177
USE_TF_PYTHON_LIBS
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2291
py37-none-<platform>
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2180
--prefer-binary
to cibuildwheel by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2274
LD_LIBRARY_PATH
when executing configure
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2185
relative_v
, aparam
, and ttm
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2060
set_davg_zero
to be true in se_atten
descriptor by @iProzd in https://github.com/deepmodeling/deepmd-kit/pull/2350
loc_frame
by @amcadmus in https://github.com/deepmodeling/deepmd-kit/pull/1963
:
by ;
from LD_LIBRARY_PATH
in cmake by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/1982
convert_13_to_21
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/1986
_GLIBCXX_USE_CXX11_ABI
on windows or osx by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2075
dp freeze
for multi-task when atom_ener
is set by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2239
np.append
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2259
batch_size
is auto
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2258
logging.warn
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2295
dp_ipi
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2296
TestReadFileToString.readfiletostring
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2355
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.1.5...v2.2.0
Published by amcadmus almost 2 years ago
ComputeNlist
-> ComputeNList
in the C API by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2119
get_gpus
subprocess when TF is cpu only by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2135
USE_TF_PYTHON_LIBS
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2177
py37-none-<platform>
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2180
LD_LIBRARY_PATH
when executing configure
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2185
relative_v
, aparam
, and ttm
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2060
loc_frame
by @amcadmus in https://github.com/deepmodeling/deepmd-kit/pull/1963
:
by ;
from LD_LIBRARY_PATH
in cmake by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/1982
convert_13_to_21
by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/1986
_GLIBCXX_USE_CXX11_ABI
on windows or osx by @njzjz in https://github.com/deepmodeling/deepmd-kit/pull/2075
Full Changelog: https://github.com/deepmodeling/deepmd-kit/compare/v2.1.5...v2.2.0.b0
Published by wanghan-iapcm about 2 years ago
New features:
Enhancements:
get_platform
in setup.py (#1897)Bug fixings:
Published by wanghan-iapcm about 2 years ago
Enhancements:
add_subdirectory
(#1814)Bug fixings:
prod_force
and prod_virial
triggered when the cell is smaller than 2rc. (revert prod_force OMP in #1360) (#1862)pair_coeff
(#1838)Published by amcadmus over 2 years ago
New features:
Enhancements
Bug fixings:
Published by amcadmus over 2 years ago
New features:
enable_atom_ener_coeff
option for energy loss (#1743)Enhancements:
float64
to default
(#1644)Bug fixings:
Published by amcadmus over 2 years ago
New features:
type_one_side
along with exclude_types
(#1423)dp convert-from 1.1
(#1587)dp convert-from 1.0
(#1597)Enhancement:
stable_29Sep2021_update3
(#1596)Bug fixings:
Published by amcadmus over 2 years ago
New feature:
DPTabulate._build_lower
method (#1323)Enhancement:
numb_test
in the training script (#1249)print_summary
to LAMMPS log (#1324)prod_force
and prod_virial
(#1360)stable_29Sep2021_update2
(#1279)api_cc/include/custom_op.h
(#1405)inputs
from inputs_zero
(#1417)data_stat
in init_from_model
and restart
mode (#1463)Bug fixings:
update_deepmd_input
when compress (#1297 #1301 )cast_precision
breaking docstring (#1437)Published by amcadmus about 3 years ago
Enhancements
stable_29Sep2021
(#1176)Bug fixings
start_pref_pf
and limit_pref_pf
to loss
Argument (#1200)