deepmodeling / deepmd-kit

A deep learning package for many-body potential energy representation and molecular dynamics
https://docs.deepmodeling.com/projects/deepmd/
GNU Lesser General Public License v3.0
1.49k stars 510 forks source link

Undefined key "modifier" is not allowed in strict model for running DPLR model #4128

Closed tingguangli closed 1 month ago

tingguangli commented 1 month ago

Summary

Undefined key "modifier" is not allowed in strict model for running DPLR model

DeePMD-kit Version

DeePMD-kit v2.2.9

Backend and its version

did not print

Python Version, CUDA Version, GCC Version, LAMMPS Version, etc

No response

Details

Hi All,

I have an issue (Undefined key "modifier" is not allowed in the strict model ) when I used the DPLR model to capture the long-range order behavior: Here is a part of my input.json file: "descriptor" :{ "type": "se_e2_a", "sel": "auto", "rcut_smth": 1.5, "rcut": 9.0, "neuron": [20, 40, 60], "resnet_dt": false, "axis_neuron": 16, "seed": 1, "_comment": " that's all" }, "fitting_net" : { "type": "dipole", "dipole_type": [0], "neuron": [120, 120, 120], "resnet_dt": true, "seed": 1, "_comment": " that's all" }, "_comment": " that's all" }, "loss" :{ "type": "tensor", "pref": 0.0, "pref_atomic": 1.0 }, "modifier": { "type": "dipole_charge", "model_name": "dw.pb", "model_charge_map": [-8], "sys_charge_map": [6, 1], "ewald_h": 1.00, "ewald_beta": 0.40 },

Also, I saw in the introduction of the DPLR manual that besides the input files for the traditional training model, there are also other input files like atomic_dipole.npy that are required for training, does DeePMD have a tutorial for how to get those files for specific systems? (So far I only have the input.json and post-processed files by dpdata after VASP calculation.)

Thanks a lot!

njzjz commented 1 month ago

Your modifier is out of the model scope. It should be within the model scope.

tingguangli commented 1 month ago

Hi Jingzhe,

Thanks for your reply! Can you be more specific for what do you mean by my modifier is out of the model scope?

Thanks a lot!

Best Regards, Tingguang

njzjz commented 1 month ago

It looks to me your file is something like this:

{
  "model": {
    "descriptor": {},
    "fitting_net": {}
  },
  "loss": {},
  "modifier": {}
}
tingguangli commented 1 month ago

Hi Jingzhe,

Thanks for your suggestion! After I changed "modifier" into the model scale, it has the following error: tensorflow.python.framework.errors_impl.NotFoundError: dw.pb; No such file or directory

I think it is due to the lack of the dw.pb file.

Do you have any idea that how to get the required input files introduced in DPLR manual page:https://docs.deepmodeling.com/projects/deepmd/en/r2/model/dplr.html

Thanks a lot! Tingguang

tingguangli commented 1 month ago

An additional comment to this that when I commented out the modifier the training model running normally, but I believe the modifier is required for DPLR model training as it stated in the DPLR mannual

njzjz commented 1 month ago

Could you watch this tutorial: https://www.youtube.com/watch?v=j6SuMXjaXuo

tingguangli commented 1 month ago

That's very helpful! Thanks a lot!

njzjz commented 1 month ago

I close this issue as there is no active task for developers.