deepmodeling / dpgen

The deep potential generator to generate a deep-learning based model of interatomic potential energy and force field
https://docs.deepmodeling.com/projects/dpgen/
GNU Lesser General Public License v3.0
296 stars 173 forks source link

A mistake when running a model #407

Closed ZhonghengFu closed 3 years ago

ZhonghengFu commented 3 years ago

Hello,

Does anyone know how to fix it?

INFO:dpgen:-------------------------iter.000000 task 01-------------------------- INFO:dpgen:new submission of 97ec709c-3ded-4696-87bd-91bf95574bea for chunk 8aefb06c426e07a0a671a1e2488b4858d694a730 INFO:dpgen:new submission of 8fb1cb88-7244-4da3-b9ae-83dd88426f1c for chunk e193a01ecf8d30ad0affefd332ce934e32ffce72 INFO:dpgen:new submission of 9de06c6f-ae00-4742-98cb-9dcd5a8cefcd for chunk 6fc978af728d43c59faa400d5f6e0471ac850d4c INFO:dpgen:new submission of b058a8d3-2f18-405c-a179-8327e55905cb for chunk 221407c03ae5c73109cce71d27e24637824f3333 INFO:dpgen:job 97ec709c-3ded-4696-87bd-91bf95574bea finished INFO:dpgen:job 8fb1cb88-7244-4da3-b9ae-83dd88426f1c finished INFO:dpgen:job b058a8d3-2f18-405c-a179-8327e55905cb finished INFO:dpgen:job 9de06c6f-ae00-4742-98cb-9dcd5a8cefcd finished INFO:dpgen:-------------------------iter.000000 task 02-------------------------- INFO:dpgen:-------------------------iter.000000 task 03-------------------------- Traceback (most recent call last): File "/home/zhq/.local/bin/dpgen", line 10, in sys.exit(main()) File "/home/zhq/.local/lib/python3.7/site-packages/dpgen/main.py", line 182, in main args.func(args) File "/home/zhq/.local/lib/python3.7/site-packages/dpgen/generator/run.py", line 2346, in gen_run run_iter (args.PARAM, args.MACHINE) File "/home/zhq/.local/lib/python3.7/site-packages/dpgen/generator/run.py", line 2315, in run_iter cont = make_model_devi (ii, jdata, mdata) File "/home/zhq/.local/lib/python3.7/site-packages/dpgen/generator/run.py", line 737, in make_model_devi _make_model_devi_native(iter_index, jdata, mdata, conf_systems) File "/home/zhq/.local/lib/python3.7/site-packages/dpgen/generator/run.py", line 931, in _make_model_devi_native deepmd_version = deepmd_version) File "/home/zhq/.local/lib/python3.7/site-packages/dpgen/generator/lib/lammps.py", line 59, in make_lammps_input ret+= "neighbor %f bin\n"%(jdata["neighbor"]) KeyError: 'neighbor'

best regards, Zhongheng

AnguseZhang commented 3 years ago

It seems not the current stable version of DP-GEN. You should provide the software version and relevant part inparam.json.

ZhonghengFu commented 3 years ago

Many thanks for your reply!

The version of DP-GEN is 0.8.2.dev0+gf8d70a4.d20210204.

The param.json: { "type_map": ["H", "C"], "mass_map": [1.0, 12.0],

"_comment": "initial data set for Training and the number of frames in each training batch",
"init_data_prefix": "/home/zhq/WORK/fzh/work/ml/test/CH4/init",
"init_data_sys": ["CH4.POSCAR.01x01x01/02.md/sys-0004-0001/deepmd"],
"init_batch_size": [8],

"_comment": "configurations for starting MD in Exploration and batch sizes when traning snapshots derived from these configs

", "sys_configs_prefix": "/home/zhq/WORK/fzh/work/ml/test/CH4/init", "sys_configs": [ ["CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale/00000/POSCAR"], ["CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale/00001/POSCAR"] ], "sys_batch_size": [8, 8], "_comment": " that's all ",

"_comment": " 00.train ",
"numb_models": 4,

"default_training_param": {
    "model": {
        "type_map": ["H", "C"],
        "descriptor": {
            "type": "se_a",
            "sel": [16, 4],
            "rcut_smth": 0.5,
            "rcut": 5.0,
            "neuron": [10, 20, 40],
            "resnet_dt": false,
            "axis_neuron": 12,
            "seed": 0
        },
        "fitting_net": {
            "neuron": [120, 120, 120],
            "resnet_dt": true,
            "coord_norm": true,
            "type_fitting_net": false,
            "seed": 0
        }
    },
    "learning_rate": {
        "type": "exp",
        "start_lr": 0.001,
        "decay_steps": 180,
        "decay_rate": 0.95
    },
    "loss": {
        "start_pref_e": 0.02,
        "limit_pref_e": 2,
        "start_pref_f": 1000,
        "limit_pref_f": 1,
        "start_pref_v": 0.0,
        "limit_pref_v": 0.0
    },
    "training": {
        "system"    : [],
        "set_prefix": "set",
        "stop_batch": 40000,
        "batch_size": 1,
        "seed":       1,

        "_comment":   "frequencies counted in batch",     
        "disp_file": "lcurve.out",
        "disp_freq": 1000,
        "numb_test": 4,
        "save_freq": 1000,
        "save_ckpt": "model.ckpt",
        "load_ckpt": "model.ckpt",
        "disp_training": true,
        "time_training": true,
        "profiling": false,
        "profiling_file": "timeline.json",
        "_comment": "that's all"
    }
},

"_comment":      " 01.model_devi ",
"model_devi_dt": 0.002,
"model_devi_skip": 0,
"model_devi_f_trust_lo": 0.05,
"model_devi_f_trust_hi": 0.15,
"model_devi_clean_traj": false,
"model_devi_jobs": [
    {
        "sys_idx": [0],
        "temps": [50],
        "press": [1.0],
        "trj_freq": 10,
        "nsteps": 1000,
        "ensemble": "nvt",
        "_idx": "00"
    },
    {
        "sys_idx": [1],
        "temps": [50],
        "press": [1.0],
        "trj_freq": 10,
        "nsteps": 3000,
        "ensemble": "nvt",
        "_idx": "01"
    }
],
"_comment": "02.fp",
"fp_style": "vasp",
"shuffle_poscar": false,
"fp_task_max": 30,
"fp_task_min": 8,
"fp_pp_path": "/home/zhq/WORK/fzh/work/ml/test/CH4/init",
"fp_pp_files": ["POTCAR"],
"fp_incar": "INCAR_methane"

}

Best regards, Zhongheng

AnguseZhang commented 3 years ago

Did you modify DP-GEN codes? I can't find 0.8.2 version and the original codes of "ret+= "neighbor %f bin\n"%(jdata["neighbor"])" is ret+= "neighbor 1.0 bin\n". We've never changed this line See https://github.com/deepmodeling/dpgen/blob/0aa1b4f457aa3513998a31dfe903c2a3a1c71959/dpgen/generator/lib/lammps.py#L59

ZhonghengFu commented 3 years ago

Thanks for your reply. No, I don't modify DP-GEN codes. I use the DP-GEN code provided by the cluster administrator. I will ask her for more information.