Skip to content

Commit 3a0a048

Browse files
authored
Merge pull request #100 from amcadmus/devel
implement atom parameter
2 parents 2d2d44b + 6bbeaac commit 3a0a048

File tree

15 files changed

+464
-24
lines changed

15 files changed

+464
-24
lines changed

examples/fparam/data/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
*raw
2-
1+
*.raw
2+
convert_aparam.py
21.2 KB
Binary file not shown.
21.2 KB
Binary file not shown.
21.2 KB
Binary file not shown.
21.2 KB
Binary file not shown.
21.2 KB
Binary file not shown.
21.2 KB
Binary file not shown.

examples/fparam/train/input.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"_comment": " model parameters",
33
"model" : {
4+
"data_stat_nbatch": 1,
45
"descriptor": {
56
"type": "se_a",
67
"sel": [60],
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"_comment": " model parameters",
3+
"model" : {
4+
"data_stat_nbatch": 1,
5+
"descriptor": {
6+
"type": "se_a",
7+
"sel": [60],
8+
"rcut_smth": 1.80,
9+
"rcut": 6.00,
10+
"neuron": [25, 50, 100],
11+
"resnet_dt": false,
12+
"axis_neuron": 8,
13+
"seed": 1
14+
},
15+
"fitting_net" : {
16+
"neuron": [120, 120, 120],
17+
"resnet_dt": true,
18+
"numb_aparam": 1,
19+
"seed": 1
20+
}
21+
},
22+
23+
"loss" : {
24+
"start_pref_e": 0.02,
25+
"limit_pref_e": 1,
26+
"start_pref_f": 1000,
27+
"limit_pref_f": 1,
28+
"start_pref_v": 0,
29+
"limit_pref_v": 0
30+
},
31+
32+
"learning_rate" : {
33+
"start_lr": 0.001,
34+
"decay_steps": 5000,
35+
"decay_rate": 0.95
36+
},
37+
38+
"_comment": " traing controls",
39+
"training" : {
40+
"systems": ["../data/e3000_i2000/", "../data/e8000_i2000/"],
41+
"set_prefix": "set",
42+
"stop_batch": 1000000,
43+
"batch_size": 1,
44+
45+
"seed": 1,
46+
47+
"_comment": " display and restart",
48+
"_comment": " frequencies counted in batch",
49+
"disp_file": "lcurve.out",
50+
"disp_freq": 100,
51+
"numb_test": 10,
52+
"save_freq": 1000,
53+
"save_ckpt": "model.ckpt",
54+
"load_ckpt": "model.ckpt",
55+
"disp_training":true,
56+
"time_training":true,
57+
"profiling": false,
58+
"profiling_file": "timeline.json"
59+
},
60+
61+
"_comment": "that's all"
62+
}
63+

source/tests/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def gen_data() :
3030
sys.data['forces'] = np.zeros([nframes,natoms,3])
3131
sys.to_deepmd_npy('system', prec=np.float64)
3232
np.save('system/set.000/fparam.npy', tmpdata.fparam)
33+
np.save('system/set.000/aparam.npy', tmpdata.aparam.reshape([nframes, natoms, 2]))
3334

3435
class Data():
3536
def __init__ (self,
@@ -41,6 +42,7 @@ def __init__ (self,
4142
np.random.seed(seed)
4243
self.coord += rand_pert * np.random.random(self.coord.shape)
4344
self.fparam = np.array([[0.1, 0.2]])
45+
self.aparam = np.tile(self.fparam, [1, 6])
4446
self.atype = np.array([0, 1, 1, 0, 1, 1], dtype = int)
4547
self.cell = 20 * np.eye(3)
4648
self.nframes = 1

0 commit comments

Comments
 (0)