deepmd.nvnmd.entrypoints package
- class deepmd.nvnmd.entrypoints.MapTable(config_file: str, weight_file: str, map_file: str)[source]
Bases:
object
Generate the mapping table describing the relastionship of atomic distance, cutoff function, and embedding matrix.
three mapping table will be built:
\(r^2_{ji} \rightarrow s_{ji}\)\(r^2_{ji} \rightarrow sr_{ji}\)\(r^2_{ji} \rightarrow \mathcal{G}_{ji}\)where \(s_{ji}\) is cut-off function, \(sr_{ji} = \frac{s(r_{ji})}{r_{ji}}\), and \(\mathcal{G}_{ji}\) is embedding matrix.
The mapping funciton can be define as:
\(y = f(x) = y_{k} + (x - x_{k}) * dy_{k}\)\(y_{k} = f(x_{k})\)\(dy_{k} = \frac{f(x_{k+1}) - f(x_{k})}{dx}\)\(x_{k} \leq x < x_{k+1}\)\(x_{k} = k * dx\)where \(dx\) is interpolation interval.
- Parameters
- config_file
input file name an .npy file containing the configuration information of NVNMD model
- weight_file
input file name an .npy file containing the weights of NVNMD model
- map_file
output file name an .npy file containing the mapping tables of NVNMD model
References
DOI: 10.1038/s41524-022-00773-z
Methods
build_dG_ds
build_ds_dr
build_map
build_r2s
build_r2s_r2ds
build_s2G
build_s2G_s2dG
qqq
run_s2G
run_u2s
- class deepmd.nvnmd.entrypoints.Wrap(config_file: str, weight_file: str, map_file: str, model_file: str)[source]
Bases:
object
Generate the binary model file (model.pb) the model file can be use to run the NVNMD with lammps the pair style need set as:
pair_style nvnmd model.pb
pair_coeff * *
- Parameters
- config_file
input file name an .npy file containing the configuration information of NVNMD model
- weight_file
input file name an .npy file containing the weights of NVNMD model
- map_file
input file name an .npy file containing the mapping tables of NVNMD model
- model_file
output file name an .pb file containing the model using in the NVNMD
References
DOI: 10.1038/s41524-022-00773-z
Methods
Wrap the configuration of descriptor
Wrap the weights of fitting net
wrap_map
()Wrap the mapping table of embedding network
wrap
wrap_bias
wrap_head
wrap_weight
- deepmd.nvnmd.entrypoints.save_weight(sess, file_name: str = 'nvnmd/weight.npy')[source]
Save the dictionary of weight to a npy file
Submodules
deepmd.nvnmd.entrypoints.freeze module
- deepmd.nvnmd.entrypoints.freeze.filter_tensorVariableList(tensorVariableList) dict [source]
Get the name of variable for NVNMD
descrpt_attr/t_avg:0
descrpt_attr/t_std:0
filter_type_{atom i}/matrix_{layer l}_{atomj}:0
filter_type_{atom i}/bias_{layer l}_{atomj}:0
layer_{layer l}_type_{atom i}/matrix:0
layer_{layer l}_type_{atom i}/bias:0
final_layer_type_{atom i}/matrix:0
final_layer_type_{atom i}/bias:0
deepmd.nvnmd.entrypoints.mapt module
- class deepmd.nvnmd.entrypoints.mapt.MapTable(config_file: str, weight_file: str, map_file: str)[source]
Bases:
object
Generate the mapping table describing the relastionship of atomic distance, cutoff function, and embedding matrix.
three mapping table will be built:
\(r^2_{ji} \rightarrow s_{ji}\)\(r^2_{ji} \rightarrow sr_{ji}\)\(r^2_{ji} \rightarrow \mathcal{G}_{ji}\)where \(s_{ji}\) is cut-off function, \(sr_{ji} = \frac{s(r_{ji})}{r_{ji}}\), and \(\mathcal{G}_{ji}\) is embedding matrix.
The mapping funciton can be define as:
\(y = f(x) = y_{k} + (x - x_{k}) * dy_{k}\)\(y_{k} = f(x_{k})\)\(dy_{k} = \frac{f(x_{k+1}) - f(x_{k})}{dx}\)\(x_{k} \leq x < x_{k+1}\)\(x_{k} = k * dx\)where \(dx\) is interpolation interval.
- Parameters
- config_file
input file name an .npy file containing the configuration information of NVNMD model
- weight_file
input file name an .npy file containing the weights of NVNMD model
- map_file
output file name an .npy file containing the mapping tables of NVNMD model
References
DOI: 10.1038/s41524-022-00773-z
Methods
build_dG_ds
build_ds_dr
build_map
build_r2s
build_r2s_r2ds
build_s2G
build_s2G_s2dG
qqq
run_s2G
run_u2s
deepmd.nvnmd.entrypoints.train module
- deepmd.nvnmd.entrypoints.train.normalized_input(fn, PATH_CNN)[source]
Normalize a input script file for continuous neural network
deepmd.nvnmd.entrypoints.wrap module
- class deepmd.nvnmd.entrypoints.wrap.Wrap(config_file: str, weight_file: str, map_file: str, model_file: str)[source]
Bases:
object
Generate the binary model file (model.pb) the model file can be use to run the NVNMD with lammps the pair style need set as:
pair_style nvnmd model.pb
pair_coeff * *
- Parameters
- config_file
input file name an .npy file containing the configuration information of NVNMD model
- weight_file
input file name an .npy file containing the weights of NVNMD model
- map_file
input file name an .npy file containing the mapping tables of NVNMD model
- model_file
output file name an .pb file containing the model using in the NVNMD
References
DOI: 10.1038/s41524-022-00773-z
Methods
Wrap the configuration of descriptor
Wrap the weights of fitting net
wrap_map
()Wrap the mapping table of embedding network
wrap
wrap_bias
wrap_head
wrap_weight