Molecular Dynamics (MD) is playing an increasingly important role in the research of biology, pharmacy, chemistry, and materials science. The architecture is based on DeePMD, which using an NN scheme for MD simulations, which overcomes the limitations associated to auxiliary quantities like the symmetry functions or the Coulomb matrix. Each environment contains a number of atoms, whose local coordinates are arranged in a symmetry preserving way following the prescription of the Deep Potential method. According to the atomic position, atomic types and box tensor to construct energy.
Thanks a lot for DeePMD team's help.
[1] Paper: L Zhang, J Han, H Wang, R Car, W E. Deep potential molecular dynamics: a scalable model with the accuracy of quantum mechanics. Physical review letters 120 (14), 143001 (2018).
[2] Paper: H Wang, L Zhang, J Han, W E. DeePMD-kit: A deep learning package for many-body potential energy representation and molecular dynamics. Computer Physics Communications 228, 178-184 (2018).
The overall network architecture of MD simulation is show below.
Dataset used: deepmodeling/deepmd-kit/examples/water/data
The data is generated by Quantum Espresso and the input of Quantum Espresso is set manually.
The directory structure of the dataset is as follows:
└─data
├─type.raw
├─set.000
│ ├──box.npy
│ ├──coord.npy
│ ├──energy.npy
│ └──force.npy
├─set.001
├─set.002
└─set.003
In deepmodeling/deepmd-kit/source
:
train/DataSystem.py
to get d_coord and atype.train/DataSystem.py
to get avg and std.op/descrpt_se_a.cc
to get d_nlist and nlist.Npz
file for inference.├── md
├── README.md # descriptions about MD
├── script
│ ├── eval.sh # evaluation script
├── src
│ ├── src
│ ├── config.py # Parameter config
│ ├── moxing_adapter.py # modelarts device configuration
│ ├── device_adapter.py # Device Config
│ ├── local_adapter.py # local device config
│ ├── descriptor.py # descriptor function
│ └── network.py # MD simulation architecture
└── eval.py # evaluation interface
└── default_config.yaml # config file
To Be Done
After installing MindSpore via the official website, you can start evaluation as follows:
python eval.py --dataset_path [DATASET_PATH] --checkpoint_path [CHECKPOINT_PATH] --baseline_path [BASELINE_PATH]
checkpoint can be trained by using DeePMD-kit, and convert into the ckpt of MindSpore.
Before inference, please refer to MindSpore Inference with C++ Deployment Guide to set environment variables.
The infer result:
energy: -29944.03
atom_energy: -94.38766 -94.294426 -94.39194 -94.70758 -94.51311 -94.457954 ...
# Example of using distributed training dpn on modelarts :
# Data set storage method
# ├── molecular_dynamics_dataset # dataset dir
# ├──baseline.npz # baseline dataset
# ├──input_tensor.npz # infer input dataset
# ├──water_md.ckpt # checkpoint
# Choose either a (modify yaml file parameters) or b (modelArts create training job to modify parameters) 。
# Example of using model inference on modelarts
# (1) Place the trained model to the corresponding position of the bucket。
# (2) chocie a or b。
# a.set "enable_modelarts=True"
# set "checkpoint_path=/cache/data/water_md.ckpt"
# set "dataset_path=/cache/data/input_tensor.npz"
# set "baseline_path=/cache/data/baseline.npz"
# b. Add "enable_modelarts=True" parameter on the interface of modearts。
# Set the parameters required by method a on the modelarts interface
# Note: The path parameter does not need to be quoted
# (3) Set the path of the network configuration file "_config_path=/The path of config in default_config.yaml/"
# (4) Set the code path on the modelarts interface "/path/molecular_dynamics"。
# (5) Set the model's startup file on the modelarts interface "eval.py" 。
# (6) Set the data path of the model on the modelarts interface ".../molecular_dynamics"(choices molecular_dynamics Folder path) ,
# The output path of the model "Output file path" and the log path of the model "Job log path" 。
# (7) Start model inference。
Please check the official homepage.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。