forked from deepmodeling/DeePTB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bug fix in loading `kpoints.npy` files with `ndim==3` * added tests for nnsk training * main program for test_train
- Loading branch information
1 parent
e4ff19f
commit c4b586e
Showing
19 changed files
with
369 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
19 changes: 19 additions & 0 deletions
19
dptb/tests/data/test_data_nequip/dataset/kpath_spk.0/info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"nframes": 1, | ||
"natoms": 2, | ||
"pos_type": "ase", | ||
"AtomicData_options": { | ||
"r_max": 5.0, | ||
"er_max": 5.0, | ||
"oer_max": 2.5, | ||
"pbc": true | ||
}, | ||
"bandinfo": { | ||
"nkpoints": 61, | ||
"nbands": 14, | ||
"band_min": 0, | ||
"band_max": 6, | ||
"emin": null, | ||
"emax": null | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+166 KB
dptb/tests/data/test_data_nequip/dataset/kpathmd25.0/eigenvalues_ref.npy
Binary file not shown.
17 changes: 17 additions & 0 deletions
17
dptb/tests/data/test_data_nequip/dataset/kpathmd25.0/info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"nframes": 10, | ||
"natoms": 8, | ||
"pos_type": "ase", | ||
"AtomicData_options": { | ||
"r_max": 5.0, | ||
"er_max": 5.0, | ||
"oer_max": 2.5, | ||
"pbc": true | ||
}, | ||
"bandinfo": { | ||
"band_min": 0, | ||
"band_max": 8, | ||
"emin": null, | ||
"emax": null | ||
} | ||
} |
Binary file not shown.
16 changes: 16 additions & 0 deletions
16
dptb/tests/data/test_data_nequip/dataset/kpathmd25.0/struct.vasp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Si | ||
1.0000000000000000 | ||
5.4300150871000001 0.0000000000000000 0.0000000000000000 | ||
0.0000000000000000 5.4300150871000001 0.0000000000000000 | ||
0.0000000000000000 0.0000000000000000 5.4300150871000001 | ||
Si | ||
8 | ||
Cartesian | ||
0.0264071000000000 5.4365699999999997 5.4306599999999996 | ||
2.7157399999999998 2.7145600000000001 5.4341600000000003 | ||
2.6988300000000001 0.0021865800000000 2.7229999999999999 | ||
-0.0085004700000000 2.6946599999999998 2.7118500000000001 | ||
1.3702900000000000 1.3672899999999999 1.3587400000000001 | ||
4.0686400000000003 4.0873600000000003 1.3605700000000001 | ||
4.0663099999999996 1.3515699999999999 4.0690799999999996 | ||
1.3523300000000000 4.0658700000000003 4.0620099999999999 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"common_options": { | ||
"basis": { | ||
"Si": ["3s", "3p", "d*"] | ||
}, | ||
"device": "cpu", | ||
"dtype": "float32", | ||
"overlap": false | ||
}, | ||
"train_options": { | ||
"num_epoch": 1500, | ||
"batch_size": 1, | ||
"optimizer": { | ||
"lr": 0.001, | ||
"type": "Adam" | ||
}, | ||
"lr_scheduler": { | ||
"type": "exp", | ||
"gamma": 0.999 | ||
}, | ||
"loss_options":{ | ||
"train": {"method": "eigvals"} | ||
}, | ||
"save_freq": 500, | ||
"validation_freq": 10, | ||
"display_freq": 100 | ||
}, | ||
"model_options": { | ||
"embedding":{ | ||
"method": "se2", | ||
"rs": 2.5, | ||
"rc": 5.0, | ||
"radial_net": { | ||
"neurons": [10,20,30] | ||
} | ||
}, | ||
"prediction":{ | ||
"method": "sktb", | ||
"neurons": [16,16,16] | ||
}, | ||
"nnsk": { | ||
"onsite": {"method": "strain", "rs":2.5 ,"w":0.3}, | ||
"hopping": {"method": "powerlaw", "rs":5.0, "w": 0.1}, | ||
"freeze": true | ||
} | ||
}, | ||
"data_options": { | ||
"train": { | ||
"root": "./data/", | ||
"prefix": "kpath_spk", | ||
"get_eigenvalues": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"common_options": { | ||
"basis": { | ||
"Si": ["3s", "3p", "d*"] | ||
}, | ||
"device": "cpu", | ||
"dtype": "float32", | ||
"overlap": false | ||
}, | ||
"train_options": { | ||
"num_epoch": 2, | ||
"batch_size": 1, | ||
"optimizer": { | ||
"lr": 0.01, | ||
"type": "Adam" | ||
}, | ||
"lr_scheduler": { | ||
"type": "exp", | ||
"gamma": 0.999 | ||
}, | ||
"loss_options":{ | ||
"train": {"method": "eigvals"} | ||
}, | ||
"save_freq": 500, | ||
"validation_freq": 10, | ||
"display_freq": 100 | ||
}, | ||
"model_options": { | ||
"nnsk": { | ||
"onsite": {"method": "strain", "rs":2.5 ,"w":0.3}, | ||
"hopping": {"method": "powerlaw", "rs":2.6, "w": 0.35}, | ||
"freeze": false | ||
} | ||
}, | ||
"data_options": { | ||
"train": { | ||
"root": "./dptb/tests/data/test_data_nequip/dataset/", | ||
"prefix": "kpathmd25", | ||
"get_eigenvalues": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"common_options": { | ||
"basis": { | ||
"Si": ["3s", "3p", "d*"] | ||
}, | ||
"device": "cpu", | ||
"dtype": "float32", | ||
"overlap": false | ||
}, | ||
"train_options": { | ||
"num_epoch": 10, | ||
"batch_size": 1, | ||
"optimizer": { | ||
"lr": 0.01, | ||
"type": "Adam" | ||
}, | ||
"lr_scheduler": { | ||
"type": "exp", | ||
"gamma": 0.999 | ||
}, | ||
"loss_options":{ | ||
"train": {"method": "eigvals"} | ||
}, | ||
"save_freq": 1, | ||
"display_freq": 100 | ||
}, | ||
"model_options": { | ||
"nnsk": { | ||
"onsite": {"method": "strain", "rs":2.5 ,"w":0.3}, | ||
"hopping": {"method": "powerlaw", "rs":2.6, "w": 0.3}, | ||
"freeze": false, | ||
"push": {"rs_thr": 0.01, "period": 1} | ||
} | ||
}, | ||
"data_options": { | ||
"train": { | ||
"root": "./dptb/tests/data/test_data_nequip/dataset/", | ||
"prefix": "kpath_spk", | ||
"get_eigenvalues": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"common_options": { | ||
"basis": { | ||
"Si": ["3s", "3p", "d*"] | ||
}, | ||
"device": "cpu", | ||
"dtype": "float32", | ||
"overlap": false | ||
}, | ||
"train_options": { | ||
"num_epoch": 10, | ||
"batch_size": 1, | ||
"optimizer": { | ||
"lr": 0.05, | ||
"type": "Adam" | ||
}, | ||
"lr_scheduler": { | ||
"type": "exp", | ||
"gamma": 0.999 | ||
}, | ||
"loss_options":{ | ||
"train": {"method": "eigvals"} | ||
}, | ||
"save_freq": 1, | ||
"display_freq": 100 | ||
}, | ||
"model_options": { | ||
"nnsk": { | ||
"onsite": {"method": "strain", "rs":2.5 ,"w":0.3}, | ||
"hopping": {"method": "powerlaw", "rs":5.0, "w": 0.3}, | ||
"freeze": false, | ||
"push": {"w_thr": 0.01, "period": 1} | ||
} | ||
}, | ||
"data_options": { | ||
"train": { | ||
"root": "./dptb/tests/data/test_data_nequip/dataset/", | ||
"prefix": "kpath_spk", | ||
"get_eigenvalues": true | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
dptb/tests/data/test_data_nequip/input/input_strain_polar.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"common_options": { | ||
"basis": { | ||
"Si": ["3s", "3p", "d*"] | ||
}, | ||
"device": "cpu", | ||
"dtype": "float32", | ||
"overlap": false | ||
}, | ||
"train_options": { | ||
"num_epoch": 5, | ||
"batch_size": 1, | ||
"optimizer": { | ||
"lr": 0.05, | ||
"type": "Adam" | ||
}, | ||
"lr_scheduler": { | ||
"type": "exp", | ||
"gamma": 0.999 | ||
}, | ||
"loss_options":{ | ||
"train": {"method": "eigvals"} | ||
}, | ||
"save_freq": 1, | ||
"display_freq": 100 | ||
}, | ||
"model_options": { | ||
"nnsk": { | ||
"onsite": {"method": "strain", "rs":2.5 ,"w":0.3}, | ||
"hopping": {"method": "powerlaw", "rs":2.6, "w": 0.3}, | ||
"freeze": false | ||
} | ||
}, | ||
"data_options": { | ||
"train": { | ||
"root": "./dptb/tests/data/test_data_nequip/dataset/", | ||
"prefix": "kpath_spk", | ||
"get_eigenvalues": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"common_options": { | ||
"basis": { | ||
"Si": ["3s", "3p"] | ||
}, | ||
"device": "cpu", | ||
"dtype": "float32", | ||
"overlap": false, | ||
"seed": 120468 | ||
}, | ||
"train_options": { | ||
"num_epoch": 5, | ||
"batch_size": 1, | ||
"optimizer": { | ||
"lr": 0.05, | ||
"type": "Adam" | ||
}, | ||
"lr_scheduler": { | ||
"type": "exp", | ||
"gamma": 0.999 | ||
}, | ||
"loss_options":{ | ||
"train": {"method": "eigvals"} | ||
}, | ||
"save_freq": 1, | ||
"display_freq": 10 | ||
}, | ||
"model_options": { | ||
"nnsk": { | ||
"onsite": {"method": "none"}, | ||
"hopping": {"method": "powerlaw", "rs":2.6, "w": 0.3}, | ||
"freeze": false | ||
} | ||
}, | ||
"data_options": { | ||
"train": { | ||
"root": "./dptb/tests/data/test_data_nequip/dataset/", | ||
"prefix": "kpath_spk", | ||
"get_eigenvalues": true | ||
} | ||
} | ||
} |
Oops, something went wrong.