Skip to content

Commit e89d7fc

Browse files
authored
add input files of enhanced sampling method (#446)
* Add fp_pp_files to forward_files in cp2k * Add hills key to param.json so I can take HILLS file back from remote server when I use plumed. * Add a key--'hills' so I can get the HILLS file from remote server when I use plumed during the exploration. * enhance-sampling * restore * restore * add the template of input files Co-authored-by: fqgong <fqgong@users.noreply.github.com>
1 parent 5b54014 commit e89d7fc

File tree

3 files changed

+188
-0
lines changed

3 files changed

+188
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
variable NSTEPS equal V_NSTEPS
2+
variable TEMP equal V_TEMP
3+
variable PRES equal V_PRES
4+
variable THERMO_FREQ equal 10
5+
variable DUMP equal 10
6+
variable TAU_T equal 0.100000
7+
variable TAU_P equal 0.500000
8+
9+
10+
#Initialization
11+
units metal
12+
dimension 3
13+
atom_style atomic
14+
15+
16+
read_data conf.lmp
17+
mass 1 12.011
18+
mass 2 1.008
19+
20+
21+
#Interatomic potentials - DeepMD
22+
pair_style deepmd
23+
pair_coeff
24+
25+
26+
#MD parameters
27+
timestep 0.0005 #ps
28+
velocity all create ${TEMP} 1815191 mom yes rot yes dist gaussian
29+
30+
#Run MD - equil at 300K
31+
run_style verlet #Velocity verlet
32+
fix dpgen_plm
33+
fix 1 all nvt temp ${TEMP} ${TEMP} 0.1 #NH thermostat - 300K with 100 fs frequency
34+
fix 2 all momentum 1 linear 0 0 0 #Remove total linear momentum of the system at each step
35+
fix 3 all recenter INIT INIT INIT
36+
thermo_style custom step temp pe etotal press #Setting printing
37+
thermo ${THERMO_FREQ} #Ouputing thermodynamic properties
38+
dump dpgen_dump
39+
#dump 2 all custom 100 vel.xyz id type vx vy vz
40+
run ${NSTEPS} #25 ps
41+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
UNITS LENGTH=A TIME=0.0005 #Amstroeng, hartree, fs
2+
#RESTART
3+
4+
ene: ENERGY
5+
phi: TORSION ATOMS=5,1,2,8
6+
7+
METAD ...
8+
LABEL=metad
9+
ARG=phi
10+
PACE=50
11+
HEIGHT=1.0
12+
SIGMA=0.1
13+
FILE=HILLS
14+
BIASFACTOR=20
15+
TEMP=V_TEMP
16+
... METAD
17+
18+
19+
PRINT STRIDE=V_STRIDE FILE=COLVAR ARG=phi,metad.*,ene
20+
FLUSH STRIDE=V_STRIDE
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"type_map": ["C", "H"],
3+
"mass_map": [12.0, 1.0],
4+
5+
"_comment": "initial data set for Training and the number of frames in each training batch",
6+
"init_data_prefix": "someplace/tutorial-dpgen-enhance",
7+
"init_data_sys": [
8+
"raw_file"
9+
],
10+
"init_batch_size": [
11+
4
12+
],
13+
14+
"_comment": "configurations for starting MD in Exploration and batch sizes when traning snapshots derived from these configs (if they were selected)",
15+
"sys_configs_prefix": "someplace/tutorial-dpgen-enhance",
16+
"sys_configs": [
17+
[
18+
"configs/POSCAR_[0-9]"
19+
],
20+
[
21+
"configs/POSCAR_0"
22+
]
23+
],
24+
25+
"_comment": " 00.train ",
26+
"numb_models": 4,
27+
"training_init_model": true,
28+
"training_reuse_iter": 1,
29+
"training_reuse_old_ratio": 0.2,
30+
"training_reuse_stop_batch": 100000,
31+
"training_reuse_start_lr": 0.0001,
32+
"training_reuse_start_pref_e": 0.1,
33+
"training_reuse_start_pref_f": 200,
34+
"default_training_param": {
35+
"model": {
36+
"type_map": ["C","H"],
37+
"descriptor": {
38+
"type": "se_a",
39+
"sel": [2,6],
40+
"rcut_smth": 0.5,
41+
"rcut": 5.0,
42+
"neuron": [20,40,80],
43+
"resnet_dt": false,
44+
"axis_neuron": 6,
45+
"seed": 0
46+
},
47+
"fitting_net": {
48+
"neuron": [120,120,120],
49+
"resnet_dt": true,
50+
"coord_norm": true,
51+
"type_fitting_net": false,
52+
"seed": 0
53+
}
54+
},
55+
"loss": {
56+
"start_pref_e": 0.02,
57+
"limit_pref_e": 1,
58+
"start_pref_f": 1000,
59+
"limit_pref_f": 1,
60+
"start_pref_v": 0,
61+
"limit_pref_v": 0
62+
},
63+
"learning_rate": {
64+
"type": "exp",
65+
"start_lr": 0.001,
66+
"decay_steps": 500,
67+
"decay_rate": 0.95
68+
},
69+
"training": {
70+
"systems": [],
71+
"set_prefix": "set",
72+
"stop_batch": 200000,
73+
"batch_size": 1,
74+
"seed": 1,
75+
"_comment": "frequencies counted in batch",
76+
"disp_file": "lcurve.out",
77+
"disp_freq": 100,
78+
"numb_test": 10,
79+
"save_freq": 1000,
80+
"save_ckpt": "model.ckpt",
81+
"load_ckpt": "model.ckpt",
82+
"disp_training": true,
83+
"time_training": true,
84+
"profiling": false,
85+
"profiling_file": "timeline.json"
86+
}
87+
},
88+
89+
"_comment": " 01.model_devi ",
90+
"model_devi_dt": 0.0005,
91+
"model_devi_skip": 0,
92+
"model_devi_f_trust_lo": 0.08,
93+
"model_devi_f_trust_hi": 0.25,
94+
"model_devi_clean_traj": false,
95+
"model_devi_plumed" : true,
96+
"model_devi_jobs": [
97+
{ "sys_idx": [0],"traj_freq": 10,"_idx": "00",
98+
"template":{ "lmp": "lmp/input.lammps", "plm": "lmp/input.plumed" },
99+
"rev_mat":{ "lmp": {"V_NSTEPS": [20000], "V_TEMP": [300], "V_PRES": [1]},
100+
"plm": {"V_TEMP": [300], "V_STRIDE": [10]}
101+
}
102+
},
103+
{ "sys_idx": [0],"traj_freq": 10,"_idx": "01",
104+
"template":{ "lmp": "lmp/input.lammps", "plm": "lmp/input.plumed" },
105+
"rev_mat":{ "lmp": {"V_NSTEPS": [50000], "V_TEMP": [300], "V_PRES": [1]},
106+
"plm": {"V_TEMP": [300], "V_STRIDE": [10]}
107+
}
108+
},
109+
{ "sys_idx": [1],"traj_freq": 10,"_idx": "01",
110+
"template":{ "lmp": "lmp/input.lammps", "plm": "lmp/input.plumed" },
111+
"rev_mat":{ "lmp": {"V_NSTEPS": [300000], "V_TEMP": [300], "V_PRES": [1]},
112+
"plm": {"V_TEMP": [300], "V_STRIDE": [10]}
113+
}
114+
}
115+
],
116+
117+
"_comment": " 02.fp ",
118+
"fp_style": "vasp",
119+
"shuffle_poscar": false,
120+
"fp_task_max": 150,
121+
"_comment": "the maximum number of stcs to calc.",
122+
"fp_task_min": 5,
123+
"fp_pp_path": "./",
124+
"fp_pp_files": ["POTCAR_C", "POTCAR_H"],
125+
"fp_incar" : "INCAR",
126+
"_comment": " that's all "
127+
}

0 commit comments

Comments
 (0)