In this section, we will take $deepmd_source_dir/examples/water/se_e2_a/input.json
as an example of the input file.
In the DP model, we let the fitting network
where the output of the fitting network is treated as the atomic potential energy contribution, i.e.
In some cases, atomic-specific or frame-specific parameters, such as electron temperature, may be treated as extra input to the fitting network.
We denote the atomic and frame-specific parameters by
The atomic force
where
The properties
where
If part of atoms is more important than others, for example, certain atoms play an essential role when calculating free energy profiles or kinetic isotope effects, the MSE of atomic forces with prefactors
The atomic forces with larger prefactors will be fitted more accurately than those in other atoms.
If some forces are quite large, for example, forces can be greater than 60 eV/Å in high-temperature reactive simulations, one may also prefer the force loss is relative to the magnitude:
where
The construction of the fitting net is given by section {ref}fitting_net <model/fitting_net>
"fitting_net" : {
"neuron": [240, 240, 240],
"resnet_dt": true,
"seed": 1
},
- {ref}
neuron <model/fitting_net[ener]/neuron>
specifies the size of the fitting net. If two neighboring layers are of the same size, then a ResNet architecture is built between them. - If the option {ref}
resnet_dt <model/fitting_net[ener]/resnet_dt>
is set totrue
, then a timestep is used in the ResNet. - {ref}
seed <model/fitting_net[ener]/seed>
gives the random seed that is used to generate random numbers when initializing the model parameters.
The loss function
where
where start_pref_f <loss[ener]/start_pref_f>
and {ref}limit_pref_f <loss[ener]/limit_pref_f>
, respectively), i.e.
The {ref}loss <loss>
section in the input.json
is
"loss" : {
"start_pref_e": 0.02,
"limit_pref_e": 1,
"start_pref_f": 1000,
"limit_pref_f": 1,
"start_pref_v": 0,
"limit_pref_v": 0
}
The options {ref}start_pref_e <loss[ener]/start_pref_e>
, {ref}limit_pref_e <loss[ener]/limit_pref_e>
, {ref}start_pref_f <loss[ener]/start_pref_f>
, {ref}limit_pref_f <loss[ener]/limit_pref_f>
, {ref}start_pref_v <loss[ener]/start_pref_v>
and {ref}limit_pref_v <loss[ener]/limit_pref_v>
determine the start and limit prefactors of energy, force and virial, respectively.
If one does not want to train with virial, then he/she may set the virial prefactors {ref}start_pref_v <loss[ener]/start_pref_v>
and {ref}limit_pref_v <loss[ener]/limit_pref_v>
to 0.
Footnotes
-
This section is built upon Jinzhe Zeng, Duo Zhang, Denghui Lu, Pinghui Mo, Zeyu Li, Yixiao Chen, Marián Rynik, Li'ang Huang, Ziyao Li, Shaochen Shi, Yingze Wang, Haotian Ye, Ping Tuo, Jiabin Yang, Ye Ding, Yifan Li, Davide Tisi, Qiyu Zeng, Han Bao, Yu Xia, Jiameng Huang, Koki Muraoka, Yibo Wang, Junhan Chang, Fengbo Yuan, Sigbjørn Løland Bore, Chun Cai, Yinnian Lin, Bo Wang, Jiayan Xu, Jia-Xin Zhu, Chenxing Luo, Yuzhi Zhang, Rhys E. A. Goodall, Wenshuo Liang, Anurag Kumar Singh, Sikai Yao, Jingchao Zhang, Renata Wentzcovitch, Jiequn Han, Jie Liu, Weile Jia, Darrin M. York, Weinan E, Roberto Car, Linfeng Zhang, Han Wang, J. Chem. Phys. 159, 054801 (2023) licensed under a Creative Commons Attribution (CC BY) license. ↩