Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+6
- 3_epc/displacements/group_11/errs.txtAdded
- 3_epc/displacements/group_11/nerrs.txtAdded
- 3_epc/displacements/group_11/nscf.inAdded+261
- 3_epc/displacements/group_11/nscf.outAdded
- 3_epc/displacements/group_11/pw2bgw.inAdded+19
- 3_epc/displacements/group_11/pw2bgw.outAdded+57
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/element.datAdded+2
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/graph.pklAdded+3
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/hamiltonians.h5Added+3
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/hamiltonians_pred.h5Added+3
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/hamiltonians_pred_e3.h5Added+3
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/info.jsonAdded+1
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/lat.datAdded+3
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/orbital_types.datAdded+2
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/overlaps.h5Added+3
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/config.iniAdded+82
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/result.txtAdded+87
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__init__.pyAdded+10
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/__init__.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/data.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/graph.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/kernel.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/model.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/rotate.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/utils.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/data.pyAdded+217
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/default.iniAdded+88
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/__init__.pyAdded+1
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/__pycache__/__init__.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/__pycache__/rmnet.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/license.txtAdded+1
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/rmnet.pyAdded+105
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/__init__.pyAdded+2
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/__pycache__/__init__.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/__pycache__/diff_group_norm.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/__pycache__/graph_norm.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/diff_group_norm.pyAdded+109
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/graph_norm.pyAdded+60
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/license.txtAdded+22
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/__init__.pyAdded+1
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/__pycache__/__init__.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/__pycache__/lattice.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/lattice.pyAdded+71
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/license.txtAdded+22
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/__init__.pyAdded+1
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/__pycache__/__init__.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/__pycache__/acsf.cpython-312.pycAdded
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/acsf.pyAdded+50
- 3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/license.txtAdded+35
234 unmodified lines235236237234 unmodified lines3_epc/displacements/group_8/tmp/scf.save/charge-density.dat filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_6/tmp/VSC filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_6/tmp/scf.save/charge-density.dat filter=lfs diff=lfs merge=lfs -text234 unmodified lines235236237238239240241242243234 unmodified lines3_epc/displacements/group_8/tmp/scf.save/charge-density.dat filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_6/tmp/VSC filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_6/tmp/scf.save/charge-density.dat filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_11/tmp/VSC filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_11/tmp/scf.save/charge-density.dat filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_3/tmp/VSC filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_3/tmp/scf.save/charge-density.dat filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_12/tmp/VSC filter=lfs diff=lfs merge=lfs -text3_epc/displacements/group_12/tmp/scf.save/charge-density.dat filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261&CONTROL calculation = 'nscf' verbosity = 'high' tstress = .false. tprnfor = .true. outdir = './tmp/' prefix = 'scf' pseudo_dir = '/home/apolyukhin/scripts/ml/diamond-qe/pseudos/'/&SYSTEM ibrav = 0 nbnd = 8 ecutwfc = 60 nosym = .true. noinv = .true. ntyp = 1 nat = 2/&ELECTRONS electron_maxstep = 1000 conv_thr = 1e-13 mixing_mode = 'plain' mixing_beta = 0.7 diagonalization = 'david'/&IONS/&CELL/
ATOMIC_SPECIESC 12.011 C.upf
K_POINTS crystal216 0.000000000000 0.000000000000 0.000000000000 4.62962963e-03 0.000000000000 0.000000000000 0.166666666667 4.62962963e-03 0.000000000000 0.000000000000 0.333333333333 4.62962963e-03 0.000000000000 0.000000000000 0.500000000000 4.62962963e-03 0.000000000000 0.000000000000 0.666666666667 4.62962963e-03 0.000000000000 0.000000000000 0.833333333333 4.62962963e-03 0.000000000000 0.166666666667 0.000000000000 4.62962963e-03 0.000000000000 0.166666666667 0.166666666667 4.62962963e-03 0.000000000000 0.166666666667 0.333333333333 4.62962963e-03 0.000000000000 0.166666666667 0.500000000000 4.62962963e-03 0.000000000000 0.166666666667 0.666666666667 4.62962963e-03 0.000000000000 0.166666666667 0.833333333333 4.62962963e-03 0.000000000000 0.333333333333 0.000000000000 4.62962963e-03 0.000000000000 0.333333333333 0.166666666667 4.62962963e-03 0.000000000000 0.333333333333 0.333333333333 4.62962963e-03 0.000000000000 0.333333333333 0.500000000000 4.62962963e-03 0.000000000000 0.333333333333 0.666666666667 4.62962963e-03 0.000000000000 0.333333333333 0.833333333333 4.62962963e-03 0.000000000000 0.500000000000 0.000000000000 4.62962963e-03 0.000000000000 0.500000000000 0.166666666667 4.62962963e-03 0.000000000000 0.500000000000 0.333333333333 4.62962963e-03 0.000000000000 0.500000000000 0.500000000000 4.62962963e-03 0.000000000000 0.500000000000 0.666666666667 4.62962963e-03 0.000000000000 0.500000000000 0.833333333333 4.62962963e-03 0.000000000000 0.666666666667 0.000000000000 4.62962963e-03 0.000000000000 0.666666666667 0.166666666667 4.62962963e-03 0.000000000000 0.666666666667 0.333333333333 4.62962963e-03 0.000000000000 0.666666666667 0.500000000000 4.62962963e-03 0.000000000000 0.666666666667 0.666666666667 4.62962963e-03 0.000000000000 0.666666666667 0.833333333333 4.62962963e-03 0.000000000000 0.833333333333 0.000000000000 4.62962963e-03 0.000000000000 0.833333333333 0.166666666667 4.62962963e-03 0.000000000000 0.833333333333 0.333333333333 4.62962963e-03 0.000000000000 0.833333333333 0.500000000000 4.62962963e-03 0.000000000000 0.833333333333 0.666666666667 4.62962963e-03 0.000000000000 0.833333333333 0.833333333333 4.62962963e-03 0.166666666667 0.000000000000 0.000000000000 4.62962963e-03 0.166666666667 0.000000000000 0.166666666667 4.62962963e-03 0.166666666667 0.000000000000 0.333333333333 4.62962963e-03 0.166666666667 0.000000000000 0.500000000000 4.62962963e-03 0.166666666667 0.000000000000 0.666666666667 4.62962963e-03 0.166666666667 0.000000000000 0.833333333333 4.62962963e-03 0.166666666667 0.166666666667 0.000000000000 4.62962963e-03 0.166666666667 0.166666666667 0.166666666667 4.62962963e-03 0.166666666667 0.166666666667 0.333333333333 4.62962963e-03 0.166666666667 0.166666666667 0.500000000000 4.62962963e-03 0.166666666667 0.166666666667 0.666666666667 4.62962963e-03 0.166666666667 0.166666666667 0.833333333333 4.62962963e-03 0.166666666667 0.333333333333 0.000000000000 4.62962963e-03 0.166666666667 0.333333333333 0.166666666667 4.62962963e-03 0.166666666667 0.333333333333 0.333333333333 4.62962963e-03 0.166666666667 0.333333333333 0.500000000000 4.62962963e-03 0.166666666667 0.333333333333 0.666666666667 4.62962963e-03 0.166666666667 0.333333333333 0.833333333333 4.62962963e-03 0.166666666667 0.500000000000 0.000000000000 4.62962963e-03 0.166666666667 0.500000000000 0.166666666667 4.62962963e-03 0.166666666667 0.500000000000 0.333333333333 4.62962963e-03 0.166666666667 0.500000000000 0.500000000000 4.62962963e-03 0.166666666667 0.500000000000 0.666666666667 4.62962963e-03 0.166666666667 0.500000000000 0.833333333333 4.62962963e-03 0.166666666667 0.666666666667 0.000000000000 4.62962963e-03 0.166666666667 0.666666666667 0.166666666667 4.62962963e-03 0.166666666667 0.666666666667 0.333333333333 4.62962963e-03 0.166666666667 0.666666666667 0.500000000000 4.62962963e-03 0.166666666667 0.666666666667 0.666666666667 4.62962963e-03 0.166666666667 0.666666666667 0.833333333333 4.62962963e-03 0.166666666667 0.833333333333 0.000000000000 4.62962963e-03 0.166666666667 0.833333333333 0.166666666667 4.62962963e-03 0.166666666667 0.833333333333 0.333333333333 4.62962963e-03 0.166666666667 0.833333333333 0.500000000000 4.62962963e-03 0.166666666667 0.833333333333 0.666666666667 4.62962963e-03 0.166666666667 0.833333333333 0.833333333333 4.62962963e-03 0.333333333333 0.000000000000 0.000000000000 4.62962963e-03 0.333333333333 0.000000000000 0.166666666667 4.62962963e-03 0.333333333333 0.000000000000 0.333333333333 4.62962963e-03 0.333333333333 0.000000000000 0.500000000000 4.62962963e-03 0.333333333333 0.000000000000 0.666666666667 4.62962963e-03 0.333333333333 0.000000000000 0.833333333333 4.62962963e-03 0.333333333333 0.166666666667 0.000000000000 4.62962963e-03 0.333333333333 0.166666666667 0.166666666667 4.62962963e-03 0.333333333333 0.166666666667 0.333333333333 4.62962963e-03 0.333333333333 0.166666666667 0.500000000000 4.62962963e-03 0.333333333333 0.166666666667 0.666666666667 4.62962963e-03 0.333333333333 0.166666666667 0.833333333333 4.62962963e-03 0.333333333333 0.333333333333 0.000000000000 4.62962963e-03 0.333333333333 0.333333333333 0.166666666667 4.62962963e-03 0.333333333333 0.333333333333 0.333333333333 4.62962963e-03 0.333333333333 0.333333333333 0.500000000000 4.62962963e-03 0.333333333333 0.333333333333 0.666666666667 4.62962963e-03 0.333333333333 0.333333333333 0.833333333333 4.62962963e-03 0.333333333333 0.500000000000 0.000000000000 4.62962963e-03 0.333333333333 0.500000000000 0.166666666667 4.62962963e-03 0.333333333333 0.500000000000 0.333333333333 4.62962963e-03 0.333333333333 0.500000000000 0.500000000000 4.62962963e-03 0.333333333333 0.500000000000 0.666666666667 4.62962963e-03 0.333333333333 0.500000000000 0.833333333333 4.62962963e-03 0.333333333333 0.666666666667 0.000000000000 4.62962963e-03 0.333333333333 0.666666666667 0.166666666667 4.62962963e-03 0.333333333333 0.666666666667 0.333333333333 4.62962963e-03 0.333333333333 0.666666666667 0.500000000000 4.62962963e-03 0.333333333333 0.666666666667 0.666666666667 4.62962963e-03 0.333333333333 0.666666666667 0.833333333333 4.62962963e-03 0.333333333333 0.833333333333 0.000000000000 4.62962963e-03 0.333333333333 0.833333333333 0.166666666667 4.62962963e-03 0.333333333333 0.833333333333 0.333333333333 4.62962963e-03 0.333333333333 0.833333333333 0.500000000000 4.62962963e-03 0.333333333333 0.833333333333 0.666666666667 4.62962963e-03 0.333333333333 0.833333333333 0.833333333333 4.62962963e-03 0.500000000000 0.000000000000 0.000000000000 4.62962963e-03 0.500000000000 0.000000000000 0.166666666667 4.62962963e-03 0.500000000000 0.000000000000 0.333333333333 4.62962963e-03 0.500000000000 0.000000000000 0.500000000000 4.62962963e-03 0.500000000000 0.000000000000 0.666666666667 4.62962963e-03 0.500000000000 0.000000000000 0.833333333333 4.62962963e-03 0.500000000000 0.166666666667 0.000000000000 4.62962963e-03 0.500000000000 0.166666666667 0.166666666667 4.62962963e-03 0.500000000000 0.166666666667 0.333333333333 4.62962963e-03 0.500000000000 0.166666666667 0.500000000000 4.62962963e-03 0.500000000000 0.166666666667 0.666666666667 4.62962963e-03 0.500000000000 0.166666666667 0.833333333333 4.62962963e-03 0.500000000000 0.333333333333 0.000000000000 4.62962963e-03 0.500000000000 0.333333333333 0.166666666667 4.62962963e-03 0.500000000000 0.333333333333 0.333333333333 4.62962963e-03 0.500000000000 0.333333333333 0.500000000000 4.62962963e-03 0.500000000000 0.333333333333 0.666666666667 4.62962963e-03 0.500000000000 0.333333333333 0.833333333333 4.62962963e-03 0.500000000000 0.500000000000 0.000000000000 4.62962963e-03 0.500000000000 0.500000000000 0.166666666667 4.62962963e-03 0.500000000000 0.500000000000 0.333333333333 4.62962963e-03 0.500000000000 0.500000000000 0.500000000000 4.62962963e-03 0.500000000000 0.500000000000 0.666666666667 4.62962963e-03 0.500000000000 0.500000000000 0.833333333333 4.62962963e-03 0.500000000000 0.666666666667 0.000000000000 4.62962963e-03 0.500000000000 0.666666666667 0.166666666667 4.62962963e-03 0.500000000000 0.666666666667 0.333333333333 4.62962963e-03 0.500000000000 0.666666666667 0.500000000000 4.62962963e-03 0.500000000000 0.666666666667 0.666666666667 4.62962963e-03 0.500000000000 0.666666666667 0.833333333333 4.62962963e-03 0.500000000000 0.833333333333 0.000000000000 4.62962963e-03 0.500000000000 0.833333333333 0.166666666667 4.62962963e-03 0.500000000000 0.833333333333 0.333333333333 4.62962963e-03 0.500000000000 0.833333333333 0.500000000000 4.62962963e-03 0.500000000000 0.833333333333 0.666666666667 4.62962963e-03 0.500000000000 0.833333333333 0.833333333333 4.62962963e-03 0.666666666667 0.000000000000 0.000000000000 4.62962963e-03 0.666666666667 0.000000000000 0.166666666667 4.62962963e-03 0.666666666667 0.000000000000 0.333333333333 4.62962963e-03 0.666666666667 0.000000000000 0.500000000000 4.62962963e-03 0.666666666667 0.000000000000 0.666666666667 4.62962963e-03 0.666666666667 0.000000000000 0.833333333333 4.62962963e-03 0.666666666667 0.166666666667 0.000000000000 4.62962963e-03 0.666666666667 0.166666666667 0.166666666667 4.62962963e-03 0.666666666667 0.166666666667 0.333333333333 4.62962963e-03 0.666666666667 0.166666666667 0.500000000000 4.62962963e-03 0.666666666667 0.166666666667 0.666666666667 4.62962963e-03 0.666666666667 0.166666666667 0.833333333333 4.62962963e-03 0.666666666667 0.333333333333 0.000000000000 4.62962963e-03 0.666666666667 0.333333333333 0.166666666667 4.62962963e-03 0.666666666667 0.333333333333 0.333333333333 4.62962963e-03 0.666666666667 0.333333333333 0.500000000000 4.62962963e-03 0.666666666667 0.333333333333 0.666666666667 4.62962963e-03 0.666666666667 0.333333333333 0.833333333333 4.62962963e-03 0.666666666667 0.500000000000 0.000000000000 4.62962963e-03 0.666666666667 0.500000000000 0.166666666667 4.62962963e-03 0.666666666667 0.500000000000 0.333333333333 4.62962963e-03 0.666666666667 0.500000000000 0.500000000000 4.62962963e-03 0.666666666667 0.500000000000 0.666666666667 4.62962963e-03 0.666666666667 0.500000000000 0.833333333333 4.62962963e-03 0.666666666667 0.666666666667 0.000000000000 4.62962963e-03 0.666666666667 0.666666666667 0.166666666667 4.62962963e-03 0.666666666667 0.666666666667 0.333333333333 4.62962963e-03 0.666666666667 0.666666666667 0.500000000000 4.62962963e-03 0.666666666667 0.666666666667 0.666666666667 4.62962963e-03 0.666666666667 0.666666666667 0.833333333333 4.62962963e-03 0.666666666667 0.833333333333 0.000000000000 4.62962963e-03 0.666666666667 0.833333333333 0.166666666667 4.62962963e-03 0.666666666667 0.833333333333 0.333333333333 4.62962963e-03 0.666666666667 0.833333333333 0.500000000000 4.62962963e-03 0.666666666667 0.833333333333 0.666666666667 4.62962963e-03 0.666666666667 0.833333333333 0.833333333333 4.62962963e-03 0.833333333333 0.000000000000 0.000000000000 4.62962963e-03 0.833333333333 0.000000000000 0.166666666667 4.62962963e-03 0.833333333333 0.000000000000 0.333333333333 4.62962963e-03 0.833333333333 0.000000000000 0.500000000000 4.62962963e-03 0.833333333333 0.000000000000 0.666666666667 4.62962963e-03 0.833333333333 0.000000000000 0.833333333333 4.62962963e-03 0.833333333333 0.166666666667 0.000000000000 4.62962963e-03 0.833333333333 0.166666666667 0.166666666667 4.62962963e-03 0.833333333333 0.166666666667 0.333333333333 4.62962963e-03 0.833333333333 0.166666666667 0.500000000000 4.62962963e-03 0.833333333333 0.166666666667 0.666666666667 4.62962963e-03 0.833333333333 0.166666666667 0.833333333333 4.62962963e-03 0.833333333333 0.333333333333 0.000000000000 4.62962963e-03 0.833333333333 0.333333333333 0.166666666667 4.62962963e-03 0.833333333333 0.333333333333 0.333333333333 4.62962963e-03 0.833333333333 0.333333333333 0.500000000000 4.62962963e-03 0.833333333333 0.333333333333 0.666666666667 4.62962963e-03 0.833333333333 0.333333333333 0.833333333333 4.62962963e-03 0.833333333333 0.500000000000 0.000000000000 4.62962963e-03 0.833333333333 0.500000000000 0.166666666667 4.62962963e-03 0.833333333333 0.500000000000 0.333333333333 4.62962963e-03 0.833333333333 0.500000000000 0.500000000000 4.62962963e-03 0.833333333333 0.500000000000 0.666666666667 4.62962963e-03 0.833333333333 0.500000000000 0.833333333333 4.62962963e-03 0.833333333333 0.666666666667 0.000000000000 4.62962963e-03 0.833333333333 0.666666666667 0.166666666667 4.62962963e-03 0.833333333333 0.666666666667 0.333333333333 4.62962963e-03 0.833333333333 0.666666666667 0.500000000000 4.62962963e-03 0.833333333333 0.666666666667 0.666666666667 4.62962963e-03 0.833333333333 0.666666666667 0.833333333333 4.62962963e-03 0.833333333333 0.833333333333 0.000000000000 4.62962963e-03 0.833333333333 0.833333333333 0.166666666667 4.62962963e-03 0.833333333333 0.833333333333 0.333333333333 4.62962963e-03 0.833333333333 0.833333333333 0.500000000000 4.62962963e-03 0.833333333333 0.833333333333 0.666666666667 4.62962963e-03 0.833333333333 0.833333333333 0.833333333333 4.62962963e-03
CELL_PARAMETERS angstrom0.00000000000000 1.78350000000000 1.783500000000001.78350000000000 0.00000000000000 1.783500000000001.78350000000000 1.78350000000000 0.00000000000000
ATOMIC_POSITIONS crystalC 0.0000000000 0.0000000000 -0.0000000000 C 0.2500000000 0.2500000000 0.2502098036
12345678910111213141516171819&input_pw2bgw prefix = 'scf' outdir = './tmp/' real_or_complex = 2 wfng_flag = .false. wfng_file = 'WFN' wfng_kgrid = .true. wfng_nk1 = 6 wfng_nk2 = 6 wfng_nk3 = 6 wfng_dk1 = 0.0 wfng_dk2 = 0.0 wfng_dk3 = 0.0 rhog_flag = .false. vxcg_flag = .false. vscg_flag = .true. vscg_file = 'VSC' vkbg_flag = .false./123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
Program PW2BGW v.7.2 starts on 19Feb2026 at 21: 0:32
This program is part of the open-source Quantum ESPRESSO suite for quantum simulation of materials; please cite "P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009); "P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017); "P. Giannozzi et al., J. Chem. Phys. 152 154105 (2020); URL http://www.quantum-espresso.org", in publications or presentations arising from this work. More details at http://www.quantum-espresso.org/quote
Parallel version (MPI), running on 8 processors
MPI processes distributed on 1 nodes R & G space division: proc/nbgrp/npool/nimage = 8 1094 MiB available memory on the printing compute node when the environment starts
Reading xml data from directory:
./tmp/scf.save/
IMPORTANT: XC functional enforced from input : Exchange-correlation= PBE ( 1 4 3 4 0 0 0) Any further DFT definition will be discarded Please, verify this is what you really want
Parallelization info -------------------- sticks: dense smooth PW G-vecs: dense smooth PW Min 47 47 16 613 613 129 Max 48 48 18 615 615 130 Sum 379 379 139 4909 4909 1037 Using Slab Decomposition Reading collected, re-writing distributed wavefunctions
NLCC is present
call write_vscg done write_vscg
write_vscg : 0.00s CPU 0.00s WALL ( 1 calls) PW2BGW : 0.08s CPU 0.11s WALL
This run was terminated on: 21: 0:32 19Feb2026
=------------------------------------------------------------------------------= JOB DONE.=------------------------------------------------------------------------------=126 6 123version https://git-lfs.github.com/spec/v1oid sha256:3556b724481d1cfb5a16316bf325b231df00498fb6f47129579070345b0977fbsize 8317809123version https://git-lfs.github.com/spec/v1oid sha256:1b3250fafef031f1946eeedceec889a4203b32fb75b98083dc3878f9899634e2size 558800123version https://git-lfs.github.com/spec/v1oid sha256:5445ba26f9b7c4fedba95d7b91fd14cb91166e6b09815bdc4e0e290b0a9b1d6bsize 519600123version https://git-lfs.github.com/spec/v1oid sha256:a8bd44780c4da50404c1e11989b1fa1b284ba226179960a688d71baa408376a7size 3493881{"isspinful": false}1230.000000000000000000e+00 1.783499998856923785e+00 1.783499998856923785e+001.783499998856923785e+00 0.000000000000000000e+00 1.783499998856923785e+001.783499998856923785e+00 1.783499998856923785e+00 0.000000000000000000e+00120 0 1 1 20 0 1 1 2123version https://git-lfs.github.com/spec/v1oid sha256:88e74ebd518faeea5a0e01c758cce04c2044b9d8a0350d34838f2a5c1bf3840esize 49988812345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182[basic]graph_dir = /home/apolyukhin/scripts/ml/diamond-qe/deeph-data/graphsave_dir = /home/apolyukhin/scripts/ml/diamond-qe/diamond_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_stdraw_dir = /home/apolyukhin/scripts/ml/diamond-qe/deeph-data/preprocessdataset_name = diamond_qeonly_get_graph = Falseinterface = h5target = hamiltoniandisable_cuda = Truedevice = cpunum_threads = -1save_to_time_folder = Falsesave_csv = Truetb_writer = Falseseed = 42multiprocessing = 0orbital = [{"6 6": [0, 0]}, {"6 6": [0, 1]}, {"6 6": [0, 2]}, {"6 6": [0, 3]}, {"6 6": [0, 4]}, {"6 6": [0, 5]}, {"6 6": [0, 6]}, {"6 6": [0, 7]}, {"6 6": [0, 8]}, {"6 6": [0, 9]}, {"6 6": [0, 10]}, {"6 6": [0, 11]}, {"6 6": [0, 12]}, {"6 6": [1, 0]}, {"6 6": [1, 1]}, {"6 6": [1, 2]}, {"6 6": [1, 3]}, {"6 6": [1, 4]}, {"6 6": [1, 5]}, {"6 6": [1, 6]}, {"6 6": [1, 7]}, {"6 6": [1, 8]}, {"6 6": [1, 9]}, {"6 6": [1, 10]}, {"6 6": [1, 11]}, {"6 6": [1, 12]}, {"6 6": [2, 0]}, {"6 6": [2, 1]}, {"6 6": [2, 2]}, {"6 6": [2, 3]}, {"6 6": [2, 4]}, {"6 6": [2, 5]}, {"6 6": [2, 6]}, {"6 6": [2, 7]}, {"6 6": [2, 8]}, {"6 6": [2, 9]}, {"6 6": [2, 10]}, {"6 6": [2, 11]}, {"6 6": [2, 12]}, {"6 6": [3, 0]}, {"6 6": [3, 1]}, {"6 6": [3, 2]}, {"6 6": [3, 3]}, {"6 6": [3, 4]}, {"6 6": [3, 5]}, {"6 6": [3, 6]}, {"6 6": [3, 7]}, {"6 6": [3, 8]}, {"6 6": [3, 9]}, {"6 6": [3, 10]}, {"6 6": [3, 11]}, {"6 6": [3, 12]}, {"6 6": [4, 0]}, {"6 6": [4, 1]}, {"6 6": [4, 2]}, {"6 6": [4, 3]}, {"6 6": [4, 4]}, {"6 6": [4, 5]}, {"6 6": [4, 6]}, {"6 6": [4, 7]}, {"6 6": [4, 8]}, {"6 6": [4, 9]}, {"6 6": [4, 10]}, {"6 6": [4, 11]}, {"6 6": [4, 12]}, {"6 6": [5, 0]}, {"6 6": [5, 1]}, {"6 6": [5, 2]}, {"6 6": [5, 3]}, {"6 6": [5, 4]}, {"6 6": [5, 5]}, {"6 6": [5, 6]}, {"6 6": [5, 7]}, {"6 6": [5, 8]}, {"6 6": [5, 9]}, {"6 6": [5, 10]}, {"6 6": [5, 11]}, {"6 6": [5, 12]}, {"6 6": [6, 0]}, {"6 6": [6, 1]}, {"6 6": [6, 2]}, {"6 6": [6, 3]}, {"6 6": [6, 4]}, {"6 6": [6, 5]}, {"6 6": [6, 6]}, {"6 6": [6, 7]}, {"6 6": [6, 8]}, {"6 6": [6, 9]}, {"6 6": [6, 10]}, {"6 6": [6, 11]}, {"6 6": [6, 12]}, {"6 6": [7, 0]}, {"6 6": [7, 1]}, {"6 6": [7, 2]}, {"6 6": [7, 3]}, {"6 6": [7, 4]}, {"6 6": [7, 5]}, {"6 6": [7, 6]}, {"6 6": [7, 7]}, {"6 6": [7, 8]}, {"6 6": [7, 9]}, {"6 6": [7, 10]}, {"6 6": [7, 11]}, {"6 6": [7, 12]}, {"6 6": [8, 0]}, {"6 6": [8, 1]}, {"6 6": [8, 2]}, {"6 6": [8, 3]}, {"6 6": [8, 4]}, {"6 6": [8, 5]}, {"6 6": [8, 6]}, {"6 6": [8, 7]}, {"6 6": [8, 8]}, {"6 6": [8, 9]}, {"6 6": [8, 10]}, {"6 6": [8, 11]}, {"6 6": [8, 12]}, {"6 6": [9, 0]}, {"6 6": [9, 1]}, {"6 6": [9, 2]}, {"6 6": [9, 3]}, {"6 6": [9, 4]}, {"6 6": [9, 5]}, {"6 6": [9, 6]}, {"6 6": [9, 7]}, {"6 6": [9, 8]}, {"6 6": [9, 9]}, {"6 6": [9, 10]}, {"6 6": [9, 11]}, {"6 6": [9, 12]}, {"6 6": [10, 0]}, {"6 6": [10, 1]}, {"6 6": [10, 2]}, {"6 6": [10, 3]}, {"6 6": [10, 4]}, {"6 6": [10, 5]}, {"6 6": [10, 6]}, {"6 6": [10, 7]}, {"6 6": [10, 8]}, {"6 6": [10, 9]}, {"6 6": [10, 10]}, {"6 6": [10, 11]}, {"6 6": [10, 12]}, {"6 6": [11, 0]}, {"6 6": [11, 1]}, {"6 6": [11, 2]}, {"6 6": [11, 3]}, {"6 6": [11, 4]}, {"6 6": [11, 5]}, {"6 6": [11, 6]}, {"6 6": [11, 7]}, {"6 6": [11, 8]}, {"6 6": [11, 9]}, {"6 6": [11, 10]}, {"6 6": [11, 11]}, {"6 6": [11, 12]}, {"6 6": [12, 0]}, {"6 6": [12, 1]}, {"6 6": [12, 2]}, {"6 6": [12, 3]}, {"6 6": [12, 4]}, {"6 6": [12, 5]}, {"6 6": [12, 6]}, {"6 6": [12, 7]}, {"6 6": [12, 8]}, {"6 6": [12, 9]}, {"6 6": [12, 10]}, {"6 6": [12, 11]}, {"6 6": [12, 12]}]o_component = Henergy_component = summationmax_element = -1statistics = Falsenormalizer = Falseboxcox = False
[graph]radius = -1.0max_num_nbr = 0create_from_dft = Trueif_lcmp_graph = Trueseparate_onsite = Falsenew_sp = False
[train]epochs = 5000pretrained = resume = train_ratio = 0.6val_ratio = 0.2test_ratio = 0.2early_stopping_loss = 0.0early_stopping_loss_epoch = [0.000000, 500]revert_then_decay = Truerevert_threshold = 30revert_decay_epoch = [800, 2000, 3000, 4000]revert_decay_gamma = [0.4, 0.5, 0.5, 0.4]clip_grad = Trueclip_grad_value = 4.2switch_sgd = Falseswitch_sgd_lr = 1e-4switch_sgd_epoch = -1
[hyperparameter]batch_size = 1dtype = float32optimizer = adamlearning_rate = 0.001lr_scheduler = lr_milestones = []momentum = 0.9weight_decay = 0criterion = MaskMSELossretain_edge_fea = Truelambda_eij = 0.0lambda_ei = 0.1lambda_etot = 0.0
[network]atom_fea_len = 64edge_fea_len = 128gauss_stop = 6.0num_l = 4aggr = adddistance_expansion = GaussianBasisif_exp = Trueif_multiplelinear = Falseif_edge_update = Trueif_lcmp = Truenormalization = LayerNormatom_update_net = PAINNtrainable_gaussians = Falsetype_affine = False
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687====== CONFIG ======[basic]graph_dir=/home/apolyukhin/scripts/ml/diamond-qe/deeph-data/graphsave_dir=/home/apolyukhin/scripts/ml/diamond-qe/diamond_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_stdraw_dir=/home/apolyukhin/scripts/ml/diamond-qe/deeph-data/preprocessdataset_name=diamond_qeonly_get_graph=Falseinterface=h5target=hamiltoniandisable_cuda=Truedevice=cpunum_threads=-1save_to_time_folder=Falsesave_csv=Truetb_writer=Falseseed=42multiprocessing=0orbital=[{"6 6": [0, 0]}, {"6 6": [0, 1]}, {"6 6": [0, 2]}, {"6 6": [0, 3]}, {"6 6": [0, 4]}, {"6 6": [0, 5]}, {"6 6": [0, 6]}, {"6 6": [0, 7]}, {"6 6": [0, 8]}, {"6 6": [0, 9]}, {"6 6": [0, 10]}, {"6 6": [0, 11]}, {"6 6": [0, 12]}, {"6 6": [1, 0]}, {"6 6": [1, 1]}, {"6 6": [1, 2]}, {"6 6": [1, 3]}, {"6 6": [1, 4]}, {"6 6": [1, 5]}, {"6 6": [1, 6]}, {"6 6": [1, 7]}, {"6 6": [1, 8]}, {"6 6": [1, 9]}, {"6 6": [1, 10]}, {"6 6": [1, 11]}, {"6 6": [1, 12]}, {"6 6": [2, 0]}, {"6 6": [2, 1]}, {"6 6": [2, 2]}, {"6 6": [2, 3]}, {"6 6": [2, 4]}, {"6 6": [2, 5]}, {"6 6": [2, 6]}, {"6 6": [2, 7]}, {"6 6": [2, 8]}, {"6 6": [2, 9]}, {"6 6": [2, 10]}, {"6 6": [2, 11]}, {"6 6": [2, 12]}, {"6 6": [3, 0]}, {"6 6": [3, 1]}, {"6 6": [3, 2]}, {"6 6": [3, 3]}, {"6 6": [3, 4]}, {"6 6": [3, 5]}, {"6 6": [3, 6]}, {"6 6": [3, 7]}, {"6 6": [3, 8]}, {"6 6": [3, 9]}, {"6 6": [3, 10]}, {"6 6": [3, 11]}, {"6 6": [3, 12]}, {"6 6": [4, 0]}, {"6 6": [4, 1]}, {"6 6": [4, 2]}, {"6 6": [4, 3]}, {"6 6": [4, 4]}, {"6 6": [4, 5]}, {"6 6": [4, 6]}, {"6 6": [4, 7]}, {"6 6": [4, 8]}, {"6 6": [4, 9]}, {"6 6": [4, 10]}, {"6 6": [4, 11]}, {"6 6": [4, 12]}, {"6 6": [5, 0]}, {"6 6": [5, 1]}, {"6 6": [5, 2]}, {"6 6": [5, 3]}, {"6 6": [5, 4]}, {"6 6": [5, 5]}, {"6 6": [5, 6]}, {"6 6": [5, 7]}, {"6 6": [5, 8]}, {"6 6": [5, 9]}, {"6 6": [5, 10]}, {"6 6": [5, 11]}, {"6 6": [5, 12]}, {"6 6": [6, 0]}, {"6 6": [6, 1]}, {"6 6": [6, 2]}, {"6 6": [6, 3]}, {"6 6": [6, 4]}, {"6 6": [6, 5]}, {"6 6": [6, 6]}, {"6 6": [6, 7]}, {"6 6": [6, 8]}, {"6 6": [6, 9]}, {"6 6": [6, 10]}, {"6 6": [6, 11]}, {"6 6": [6, 12]}, {"6 6": [7, 0]}, {"6 6": [7, 1]}, {"6 6": [7, 2]}, {"6 6": [7, 3]}, {"6 6": [7, 4]}, {"6 6": [7, 5]}, {"6 6": [7, 6]}, {"6 6": [7, 7]}, {"6 6": [7, 8]}, {"6 6": [7, 9]}, {"6 6": [7, 10]}, {"6 6": [7, 11]}, {"6 6": [7, 12]}, {"6 6": [8, 0]}, {"6 6": [8, 1]}, {"6 6": [8, 2]}, {"6 6": [8, 3]}, {"6 6": [8, 4]}, {"6 6": [8, 5]}, {"6 6": [8, 6]}, {"6 6": [8, 7]}, {"6 6": [8, 8]}, {"6 6": [8, 9]}, {"6 6": [8, 10]}, {"6 6": [8, 11]}, {"6 6": [8, 12]}, {"6 6": [9, 0]}, {"6 6": [9, 1]}, {"6 6": [9, 2]}, {"6 6": [9, 3]}, {"6 6": [9, 4]}, {"6 6": [9, 5]}, {"6 6": [9, 6]}, {"6 6": [9, 7]}, {"6 6": [9, 8]}, {"6 6": [9, 9]}, {"6 6": [9, 10]}, {"6 6": [9, 11]}, {"6 6": [9, 12]}, {"6 6": [10, 0]}, {"6 6": [10, 1]}, {"6 6": [10, 2]}, {"6 6": [10, 3]}, {"6 6": [10, 4]}, {"6 6": [10, 5]}, {"6 6": [10, 6]}, {"6 6": [10, 7]}, {"6 6": [10, 8]}, {"6 6": [10, 9]}, {"6 6": [10, 10]}, {"6 6": [10, 11]}, {"6 6": [10, 12]}, {"6 6": [11, 0]}, {"6 6": [11, 1]}, {"6 6": [11, 2]}, {"6 6": [11, 3]}, {"6 6": [11, 4]}, {"6 6": [11, 5]}, {"6 6": [11, 6]}, {"6 6": [11, 7]}, {"6 6": [11, 8]}, {"6 6": [11, 9]}, {"6 6": [11, 10]}, {"6 6": [11, 11]}, {"6 6": [11, 12]}, {"6 6": [12, 0]}, {"6 6": [12, 1]}, {"6 6": [12, 2]}, {"6 6": [12, 3]}, {"6 6": [12, 4]}, {"6 6": [12, 5]}, {"6 6": [12, 6]}, {"6 6": [12, 7]}, {"6 6": [12, 8]}, {"6 6": [12, 9]}, {"6 6": [12, 10]}, {"6 6": [12, 11]}, {"6 6": [12, 12]}]o_component=Henergy_component=summationmax_element=-1statistics=Falsenormalizer=Falseboxcox=False
[graph]radius=-1.0max_num_nbr=0create_from_dft=Trueif_lcmp_graph=Trueseparate_onsite=Falsenew_sp=False
[train]epochs=5000pretrained=resume=train_ratio=0.6val_ratio=0.2test_ratio=0.2early_stopping_loss=0.0early_stopping_loss_epoch=[0.000000, 500]revert_then_decay=Truerevert_threshold=30revert_decay_epoch=[800, 2000, 3000, 4000]revert_decay_gamma=[0.4, 0.5, 0.5, 0.4]clip_grad=Trueclip_grad_value=4.2switch_sgd=Falseswitch_sgd_lr=1e-4switch_sgd_epoch=-1
[hyperparameter]batch_size=1dtype=float32optimizer=adamlearning_rate=0.001lr_scheduler=lr_milestones=[]momentum=0.9weight_decay=0criterion=MaskMSELossretain_edge_fea=Truelambda_eij=0.0lambda_ei=0.1lambda_etot=0.0
[network]atom_fea_len=64edge_fea_len=128gauss_stop=6.0num_l=4aggr=adddistance_expansion=GaussianBasisif_exp=Trueif_multiplelinear=Falseif_edge_update=Trueif_lcmp=Truenormalization=LayerNormatom_update_net=PAINNtrainable_gaussians=Falsetype_affine=False
=> load best checkpoint (epoch 3217)=> Atomic types: [6], spinful: False, the number of atomic types: 1.Save processed graph to /home/apolyukhin/scripts/ml/diamond-qe/diamond_epc/displacements/group_11/reconstruction/aohamiltonian/graph.pkl, cost 0.1114511489868164 seconds
0%| | 0/1 [00:00<?, ?it/s]
100%|##########| 1/1 [00:01<00:00, 1.09s/it]
100%|##########| 1/1 [00:01<00:00, 1.09s/it]12345678910from .data import HDatafrom .model import HGNN, ExpBernsteinBasisfrom .utils import print_args, Logger, MaskMSELoss, MaskMAELoss, write_ham_npz, write_ham, write_ham_h5, get_config, \ get_inference_config, get_preprocess_configfrom .graph import Collater, collate_fn, get_graph, load_orbital_typesfrom .kernel import DeepHKernelfrom .preprocess import get_rc, OijLoad, GetEEiEij, abacus_parse, siesta_parsefrom .rotate import get_rh, rotate_back, Rotate, dtype_dict
__version__ = "0.2.2"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217import warningsimport osimport timeimport tqdm
from pymatgen.core.structure import Structureimport numpy as npimport torchfrom torch_geometric.data import InMemoryDatasetfrom pathos.multiprocessing import ProcessingPool as Pool
from .graph import get_graph
class HData(InMemoryDataset): def __init__(self, raw_data_dir: str, graph_dir: str, interface: str, target: str, dataset_name: str, multiprocessing: int, radius, max_num_nbr, num_l, max_element, create_from_DFT, if_lcmp_graph, separate_onsite, new_sp, default_dtype_torch, nums: int = None, transform=None, pre_transform=None, pre_filter=None): """when interface == 'h5',raw_data_dir├── 00│ ├──rh.h5 / rdm.h5│ ├──rc.h5│ ├──element.dat│ ├──orbital_types.dat│ ├──site_positions.dat│ ├──lat.dat│ └──info.json├── 01│ ├──rh.h5 / rdm.h5│ ├──rc.h5│ ├──element.dat│ ├──orbital_types.dat│ ├──site_positions.dat│ ├──lat.dat│ └──info.json├── 02│ ├──rh.h5 / rdm.h5│ ├──rc.h5│ ├──element.dat│ ├──orbital_types.dat│ ├──site_positions.dat│ ├──lat.dat│ └──info.json├── ... """ self.raw_data_dir = raw_data_dir assert dataset_name.find('-') == -1, '"-" can not be included in the dataset name' if create_from_DFT: way_create_graph = 'FromDFT' else: way_create_graph = f'{radius}r{max_num_nbr}mn' if if_lcmp_graph: lcmp_str = f'{num_l}l' else: lcmp_str = 'WithoutLCMP' if separate_onsite is True: onsite_str = '-SeparateOnsite' else: onsite_str = '' if new_sp: new_sp_str = '-NewSP' else: new_sp_str = '' if target == 'hamiltonian': title = 'HGraph' else: raise ValueError('Unknown prediction target: {}'.format(target)) graph_file_name = f'{title}-{interface}-{dataset_name}-{lcmp_str}-{way_create_graph}{onsite_str}{new_sp_str}.pkl' self.data_file = os.path.join(graph_dir, graph_file_name) os.makedirs(graph_dir, exist_ok=True) self.data, self.slices = None, None self.interface = interface self.target = target self.dataset_name = dataset_name self.multiprocessing = multiprocessing self.radius = radius self.max_num_nbr = max_num_nbr self.num_l = num_l self.create_from_DFT = create_from_DFT self.if_lcmp_graph = if_lcmp_graph self.separate_onsite = separate_onsite self.new_sp = new_sp self.default_dtype_torch = default_dtype_torch
self.nums = nums self.transform = transform self.pre_transform = pre_transform self.pre_filter = pre_filter self.__indices__ = None self.__data_list__ = None self._indices = None self._data_list = None
print(f'Graph data file: {graph_file_name}') if os.path.exists(self.data_file): print('Use existing graph data file') else: print('Process new data file......') self.process() begin = time.time() try: loaded_data = torch.load(self.data_file) except AttributeError: raise RuntimeError('Error in loading graph data file, try to delete it and generate the graph file with the current version of PyG') if len(loaded_data) == 2: warnings.warn('You are using the graph data file with an old version') self.data, self.slices = loaded_data self.info = { "spinful": False, "index_to_Z": torch.arange(max_element + 1), "Z_to_index": torch.arange(max_element + 1), } elif len(loaded_data) == 3: self.data, self.slices, tmp = loaded_data if isinstance(tmp, dict): self.info = tmp print(f"Atomic types: {self.info['index_to_Z'].tolist()}") else: warnings.warn('You are using an old version of the graph data file') self.info = { "spinful": tmp, "index_to_Z": torch.arange(max_element + 1), "Z_to_index": torch.arange(max_element + 1), } print(f'Finish loading the processed {len(self)} structures (spinful: {self.info["spinful"]}, ' f'the number of atomic types: {len(self.info["index_to_Z"])}), cost {time.time() - begin:.0f} seconds')
def process_worker(self, folder, **kwargs): stru_id = os.path.split(folder)[-1]
structure = Structure(np.loadtxt(os.path.join(folder, 'lat.dat')).T, np.loadtxt(os.path.join(folder, 'element.dat')), np.loadtxt(os.path.join(folder, 'site_positions.dat')).T, coords_are_cartesian=True, to_unit_cell=False)
cart_coords = torch.tensor(structure.cart_coords, dtype=self.default_dtype_torch) frac_coords = torch.tensor(structure.frac_coords, dtype=self.default_dtype_torch) numbers = torch.tensor(structure.atomic_numbers) structure.lattice.matrix.setflags(write=True) lattice = torch.tensor(structure.lattice.matrix, dtype=self.default_dtype_torch) if self.target == 'E_ij': huge_structure = True else: huge_structure = False return get_graph(cart_coords, frac_coords, numbers, stru_id, r=self.radius, max_num_nbr=self.max_num_nbr, numerical_tol=1e-8, lattice=lattice, default_dtype_torch=self.default_dtype_torch, tb_folder=folder, interface=self.interface, num_l=self.num_l, create_from_DFT=self.create_from_DFT, if_lcmp_graph=self.if_lcmp_graph, separate_onsite=self.separate_onsite, target=self.target, huge_structure=huge_structure, if_new_sp=self.new_sp, **kwargs)
def process(self): begin = time.time() folder_list = [] for root, dirs, files in os.walk(self.raw_data_dir): if (self.interface == 'h5' and 'rc.h5' in files) or ( self.interface == 'npz' and 'rc.npz' in files): folder_list.append(root) folder_list = sorted(folder_list) folder_list = folder_list[: self.nums] if self.dataset_name == 'graphene_450': folder_list = folder_list[500:5000:10] if self.dataset_name == 'graphene_1500': folder_list = folder_list[500:5000:3] if self.dataset_name == 'bp_bilayer': folder_list = folder_list[:600] assert len(folder_list) != 0, "Can not find any structure" print('Found %d structures, have cost %d seconds' % (len(folder_list), time.time() - begin))
if self.multiprocessing == 0: print(f'Use multiprocessing (nodes = num_processors x num_threads = 1 x {torch.get_num_threads()})') data_list = [self.process_worker(folder) for folder in tqdm.tqdm(folder_list)] else: pool_dict = {} if self.multiprocessing < 0 else {'nodes': self.multiprocessing} # BS (2023.06.06): # The keyword "num_threads" in kernel.py can be used to set the torch threads. # The multiprocessing in the "process_worker" is in contradiction with the num_threads utilized in torch. # To avoid this conflict, I limit the number of torch threads to one, # and recover it when finishing the process_worker. torch_num_threads = torch.get_num_threads() torch.set_num_threads(1)
with Pool(**pool_dict) as pool: nodes = pool.nodes print(f'Use multiprocessing (nodes = num_processors x num_threads = {nodes} x {torch.get_num_threads()})') data_list = list(tqdm.tqdm(pool.imap(self.process_worker, folder_list), total=len(folder_list))) torch.set_num_threads(torch_num_threads) print('Finish processing %d structures, have cost %d seconds' % (len(data_list), time.time() - begin))
if self.pre_filter is not None: data_list = [d for d in data_list if self.pre_filter(d)] if self.pre_transform is not None: data_list = [self.pre_transform(d) for d in data_list]
index_to_Z, Z_to_index = self.element_statistics(data_list) spinful = data_list[0].spinful for d in data_list: assert spinful == d.spinful
data, slices = self.collate(data_list) torch.save((data, slices, dict(spinful=spinful, index_to_Z=index_to_Z, Z_to_index=Z_to_index)), self.data_file) print('Finish saving %d structures to %s, have cost %d seconds' % ( len(data_list), self.data_file, time.time() - begin))
def element_statistics(self, data_list): index_to_Z, inverse_indices = torch.unique(data_list[0].x, sorted=True, return_inverse=True) Z_to_index = torch.full((100,), -1, dtype=torch.int64) Z_to_index[index_to_Z] = torch.arange(len(index_to_Z))
for data in data_list: data.x = Z_to_index[data.x]
return index_to_Z, Z_to_index12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788[basic]graph_dir = /your/own/pathsave_dir = /your/own/pathraw_dir = /your/own/pathdataset_name = your_own_nameonly_get_graph = False;choices = ['h5', 'npz']interface = h5target = hamiltoniandisable_cuda = Falsedevice = cuda:0;-1 for cpu_count(logical=False) // torch.cuda.device_count()num_threads = -1save_to_time_folder = Truesave_csv = Falsetb_writer = Trueseed = 42multiprocessing = 0orbital = [{"6 6": [0, 0]}, {"6 6": [0, 1]}, {"6 6": [0, 2]}, {"6 6": [0, 3]}, {"6 6": [0, 4]}, {"6 6": [0, 5]}, {"6 6": [0, 6]}, {"6 6": [0, 7]}, {"6 6": [0, 8]}, {"6 6": [0, 9]}, {"6 6": [0, 10]}, {"6 6": [0, 11]}, {"6 6": [0, 12]}, {"6 6": [1, 0]}, {"6 6": [1, 1]}, {"6 6": [1, 2]}, {"6 6": [1, 3]}, {"6 6": [1, 4]}, {"6 6": [1, 5]}, {"6 6": [1, 6]}, {"6 6": [1, 7]}, {"6 6": [1, 8]}, {"6 6": [1, 9]}, {"6 6": [1, 10]}, {"6 6": [1, 11]}, {"6 6": [1, 12]}, {"6 6": [2, 0]}, {"6 6": [2, 1]}, {"6 6": [2, 2]}, {"6 6": [2, 3]}, {"6 6": [2, 4]}, {"6 6": [2, 5]}, {"6 6": [2, 6]}, {"6 6": [2, 7]}, {"6 6": [2, 8]}, {"6 6": [2, 9]}, {"6 6": [2, 10]}, {"6 6": [2, 11]}, {"6 6": [2, 12]}, {"6 6": [3, 0]}, {"6 6": [3, 1]}, {"6 6": [3, 2]}, {"6 6": [3, 3]}, {"6 6": [3, 4]}, {"6 6": [3, 5]}, {"6 6": [3, 6]}, {"6 6": [3, 7]}, {"6 6": [3, 8]}, {"6 6": [3, 9]}, {"6 6": [3, 10]}, {"6 6": [3, 11]}, {"6 6": [3, 12]}, {"6 6": [4, 0]}, {"6 6": [4, 1]}, {"6 6": [4, 2]}, {"6 6": [4, 3]}, {"6 6": [4, 4]}, {"6 6": [4, 5]}, {"6 6": [4, 6]}, {"6 6": [4, 7]}, {"6 6": [4, 8]}, {"6 6": [4, 9]}, {"6 6": [4, 10]}, {"6 6": [4, 11]}, {"6 6": [4, 12]}, {"6 6": [5, 0]}, {"6 6": [5, 1]}, {"6 6": [5, 2]}, {"6 6": [5, 3]}, {"6 6": [5, 4]}, {"6 6": [5, 5]}, {"6 6": [5, 6]}, {"6 6": [5, 7]}, {"6 6": [5, 8]}, {"6 6": [5, 9]}, {"6 6": [5, 10]}, {"6 6": [5, 11]}, {"6 6": [5, 12]}, {"6 6": [6, 0]}, {"6 6": [6, 1]}, {"6 6": [6, 2]}, {"6 6": [6, 3]}, {"6 6": [6, 4]}, {"6 6": [6, 5]}, {"6 6": [6, 6]}, {"6 6": [6, 7]}, {"6 6": [6, 8]}, {"6 6": [6, 9]}, {"6 6": [6, 10]}, {"6 6": [6, 11]}, {"6 6": [6, 12]}, {"6 6": [7, 0]}, {"6 6": [7, 1]}, {"6 6": [7, 2]}, {"6 6": [7, 3]}, {"6 6": [7, 4]}, {"6 6": [7, 5]}, {"6 6": [7, 6]}, {"6 6": [7, 7]}, {"6 6": [7, 8]}, {"6 6": [7, 9]}, {"6 6": [7, 10]}, {"6 6": [7, 11]}, {"6 6": [7, 12]}, {"6 6": [8, 0]}, {"6 6": [8, 1]}, {"6 6": [8, 2]}, {"6 6": [8, 3]}, {"6 6": [8, 4]}, {"6 6": [8, 5]}, {"6 6": [8, 6]}, {"6 6": [8, 7]}, {"6 6": [8, 8]}, {"6 6": [8, 9]}, {"6 6": [8, 10]}, {"6 6": [8, 11]}, {"6 6": [8, 12]}, {"6 6": [9, 0]}, {"6 6": [9, 1]}, {"6 6": [9, 2]}, {"6 6": [9, 3]}, {"6 6": [9, 4]}, {"6 6": [9, 5]}, {"6 6": [9, 6]}, {"6 6": [9, 7]}, {"6 6": [9, 8]}, {"6 6": [9, 9]}, {"6 6": [9, 10]}, {"6 6": [9, 11]}, {"6 6": [9, 12]}, {"6 6": [10, 0]}, {"6 6": [10, 1]}, {"6 6": [10, 2]}, {"6 6": [10, 3]}, {"6 6": [10, 4]}, {"6 6": [10, 5]}, {"6 6": [10, 6]}, {"6 6": [10, 7]}, {"6 6": [10, 8]}, {"6 6": [10, 9]}, {"6 6": [10, 10]}, {"6 6": [10, 11]}, {"6 6": [10, 12]}, {"6 6": [11, 0]}, {"6 6": [11, 1]}, {"6 6": [11, 2]}, {"6 6": [11, 3]}, {"6 6": [11, 4]}, {"6 6": [11, 5]}, {"6 6": [11, 6]}, {"6 6": [11, 7]}, {"6 6": [11, 8]}, {"6 6": [11, 9]}, {"6 6": [11, 10]}, {"6 6": [11, 11]}, {"6 6": [11, 12]}, {"6 6": [12, 0]}, {"6 6": [12, 1]}, {"6 6": [12, 2]}, {"6 6": [12, 3]}, {"6 6": [12, 4]}, {"6 6": [12, 5]}, {"6 6": [12, 6]}, {"6 6": [12, 7]}, {"6 6": [12, 8]}, {"6 6": [12, 9]}, {"6 6": [12, 10]}, {"6 6": [12, 11]}, {"6 6": [12, 12]}]O_component = Henergy_component = summationmax_element = -1statistics = Falsenormalizer = Falseboxcox = False
[graph]radius = -1.0max_num_nbr = 0create_from_DFT = Trueif_lcmp_graph = Trueseparate_onsite = Falsenew_sp = False
[train]epochs = 4000pretrained =resume =train_ratio = 0.6val_ratio = 0.2test_ratio = 0.2early_stopping_loss = 0.0early_stopping_loss_epoch = [0.000000, 500]revert_then_decay = Truerevert_threshold = 30revert_decay_epoch = [500, 2000, 3000]revert_decay_gamma = [0.4, 0.5, 0.5]clip_grad = Trueclip_grad_value = 4.2switch_sgd = Falseswitch_sgd_lr = 1e-4switch_sgd_epoch = -1
[hyperparameter]batch_size = 3dtype = float32;choices = ['sgd', 'sgdm', 'adam', 'lbfgs']optimizer = adam;initial learning ratelearning_rate = 0.001;choices = ['', 'MultiStepLR', 'ReduceLROnPlateau', 'CyclicLR']lr_scheduler =lr_milestones = []momentum = 0.9weight_decay = 0criterion = MaskMSELossretain_edge_fea = Truelambda_Eij = 0.0lambda_Ei = 0.1lambda_Etot = 0.0
[network]atom_fea_len = 64edge_fea_len = 128gauss_stop = 6;The number of angular quantum numbers that spherical harmonic functions havenum_l = 5aggr = adddistance_expansion = GaussianBasisif_exp = Trueif_MultipleLinear = Falseif_edge_update = Trueif_lcmp = Truenormalization = LayerNorm;choices = ['CGConv', 'GAT', 'PAINN']atom_update_net = CGConvtrainable_gaussians = Falsetype_affine = False1from .rmnet import RBF, cosine_cutoff, ShiftedSoftplus, _eps1The code in this folder was obtained from "https://github.com/sakuraiiiii/HermNet"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105import math
import torchfrom torch import nn, Tensorimport numpy as np
_eps = 1e-3
r"""Tricks: Introducing the parameter `_eps` is to avoid NaN.In HVNet and HTNet, a subgraph will be extracted to calculate angles. And with all the nodes still be included in the subgraph, each hidden state in such a subgraph will contain 0 value.In `painn`, the calculation w.r.t $r / \parallel r \parallel$ will be taken.If just alternate $r / \parallel r \parallel$ with $r / (\parallel r \parallel + _eps)$, NaN will still occur in during the training.Considering the following example,$$(\frac{x}{r+_eps})^\prime = \frac{r+b-\frac{x^2}{r}}{(r+b)^2}$$where $r = \sqrt{x^2+y^2+z^2}$. It is obvious that NaN will occur.Thus the solution is change the norm $r$ as $r^\prime = \sqrt(x^2+y^2+z^2+_eps)$.Since $r$ is rotational invariant, $r^2$ is rotational invariant.Obviously, $\sqrt(r^2 + _eps)$ is rotational invariant."""class RBF(nn.Module): r"""Radial basis function. A modified version of feature engineering in `DimeNet`, which is used in `PAINN`.
Parameters ---------- rc : float Cutoff radius l : int Parameter in feature engineering in DimeNet """ def __init__(self, rc: float, l: int): super(RBF, self).__init__() self.rc = rc self.l = l
def forward(self, x: Tensor): ls = torch.arange(1, self.l + 1).float().to(x.device) norm = torch.sqrt((x ** 2).sum(dim=-1) + _eps).unsqueeze(-1) return torch.sin(math.pi / self.rc * norm@ls.unsqueeze(0)) / norm
class cosine_cutoff(nn.Module): r"""Cutoff function in https://aip.scitation.org/doi/pdf/10.1063/1.3553717.
Parameters ---------- rc : float Cutoff radius """ def __init__(self, rc: float): super(cosine_cutoff, self).__init__() self.rc = rc
def forward(self, x: Tensor): norm = torch.norm(x, dim=-1, keepdim=True) + _eps return 0.5 * (torch.cos(math.pi * norm / self.rc) + 1)
class ShiftedSoftplus(nn.Module): r"""
Description ----------- Applies the element-wise function:
.. math:: \text{SSP}(x) = \frac{1}{\beta} * \log(1 + \exp(\beta * x)) - \log(\text{shift})
Attributes ---------- beta : int :math:`\beta` value for the mathematical formulation. Default to 1. shift : int :math:`\text{shift}` value for the mathematical formulation. Default to 2. """ def __init__(self, beta=1, shift=2, threshold=20): super(ShiftedSoftplus, self).__init__()
self.shift = shift self.softplus = nn.Softplus(beta=beta, threshold=threshold)
def forward(self, inputs): """
Description ----------- Applies the activation function.
Parameters ---------- inputs : float32 tensor of shape (N, *) * denotes any number of additional dimensions.
Returns ------- float32 tensor of shape (N, *) Result of applying the activation function to the input. """ return self.softplus(inputs) - np.log(float(self.shift))12from .graph_norm import GraphNormfrom .diff_group_norm import DiffGroupNorm123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109import torchfrom torch import Tensorfrom torch.nn import Linear, BatchNorm1d
class DiffGroupNorm(torch.nn.Module): r"""The differentiable group normalization layer from the `"Towards Deeper Graph Neural Networks with Differentiable Group Normalization" <https://arxiv.org/abs/2006.06972>`_ paper, which normalizes node features group-wise via a learnable soft cluster assignment
.. math::
\mathbf{S} = \text{softmax} (\mathbf{X} \mathbf{W})
where :math:`\mathbf{W} \in \mathbb{R}^{F \times G}` denotes a trainable weight matrix mapping each node into one of :math:`G` clusters. Normalization is then performed group-wise via:
.. math::
\mathbf{X}^{\prime} = \mathbf{X} + \lambda \sum_{i = 1}^G \text{BatchNorm}(\mathbf{S}[:, i] \odot \mathbf{X})
Args: in_channels (int): Size of each input sample :math:`F`. groups (int): The number of groups :math:`G`. lamda (float, optional): The balancing factor :math:`\lambda` between input embeddings and normalized embeddings. (default: :obj:`0.01`) eps (float, optional): A value added to the denominator for numerical stability. (default: :obj:`1e-5`) momentum (float, optional): The value used for the running mean and running variance computation. (default: :obj:`0.1`) affine (bool, optional): If set to :obj:`True`, this module has learnable affine parameters :math:`\gamma` and :math:`\beta`. (default: :obj:`True`) track_running_stats (bool, optional): If set to :obj:`True`, this module tracks the running mean and variance, and when set to :obj:`False`, this module does not track such statistics and always uses batch statistics in both training and eval modes. (default: :obj:`True`) """ def __init__(self, in_channels, groups, lamda=0.01, eps=1e-5, momentum=0.1, affine=True, track_running_stats=True): super(DiffGroupNorm, self).__init__()
self.in_channels = in_channels self.groups = groups self.lamda = lamda
self.lin = Linear(in_channels, groups, bias=False) self.norm = BatchNorm1d(groups * in_channels, eps, momentum, affine, track_running_stats)
self.reset_parameters()
def reset_parameters(self): self.lin.reset_parameters() self.norm.reset_parameters()
def forward(self, x: Tensor) -> Tensor: """""" F, G = self.in_channels, self.groups
s = self.lin(x).softmax(dim=-1) # [N, G] out = s.unsqueeze(-1) * x.unsqueeze(-2) # [N, G, F] out = self.norm(out.view(-1, G * F)).view(-1, G, F).sum(-2) # [N, F]
return x + self.lamda * out
@staticmethod def group_distance_ratio(x: Tensor, y: Tensor, eps: float = 1e-5) -> float: r"""Measures the ratio of inter-group distance over intra-group distance
.. math:: R_{\text{Group}} = \frac{\frac{1}{(C-1)^2} \sum_{i!=j} \frac{1}{|\mathbf{X}_i||\mathbf{X}_j|} \sum_{\mathbf{x}_{iv} \in \mathbf{X}_i } \sum_{\mathbf{x}_{jv^{\prime}} \in \mathbf{X}_j} {\| \mathbf{x}_{iv} - \mathbf{x}_{jv^{\prime}} \|}_2 }{ \frac{1}{C} \sum_{i} \frac{1}{{|\mathbf{X}_i|}^2} \sum_{\mathbf{x}_{iv}, \mathbf{x}_{iv^{\prime}} \in \mathbf{X}_i } {\| \mathbf{x}_{iv} - \mathbf{x}_{iv^{\prime}} \|}_2 }
where :math:`\mathbf{X}_i` denotes the set of all nodes that belong to class :math:`i`, and :math:`C` denotes the total number of classes in :obj:`y`. """ num_classes = int(y.max()) + 1
numerator = 0. for i in range(num_classes): mask = y == i dist = torch.cdist(x[mask].unsqueeze(0), x[~mask].unsqueeze(0)) numerator += (1 / dist.numel()) * float(dist.sum()) numerator *= 1 / (num_classes - 1)**2
denominator = 0. for i in range(num_classes): mask = y == i dist = torch.cdist(x[mask].unsqueeze(0), x[mask].unsqueeze(0)) denominator += (1 / dist.numel()) * float(dist.sum()) denominator *= 1 / num_classes
return numerator / (denominator + eps)
def __repr__(self): return '{}({}, groups={})'.format(self.__class__.__name__, self.in_channels, self.groups)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960from typing import Optional
import torchfrom torch import Tensorfrom torch_scatter import scatter_mean
from torch_geometric.nn.inits import zeros, ones
class GraphNorm(torch.nn.Module): r"""Applies graph normalization over individual graphs as described in the `"GraphNorm: A Principled Approach to Accelerating Graph Neural Network Training" <https://arxiv.org/abs/2009.03294>`_ paper
.. math:: \mathbf{x}^{\prime}_i = \frac{\mathbf{x} - \alpha \odot \textrm{E}[\mathbf{x}]} {\sqrt{\textrm{Var}[\mathbf{x} - \alpha \odot \textrm{E}[\mathbf{x}]] + \epsilon}} \odot \gamma + \beta
where :math:`\alpha` denotes parameters that learn how much information to keep in the mean.
Args: in_channels (int): Size of each input sample. eps (float, optional): A value added to the denominator for numerical stability. (default: :obj:`1e-5`) """ def __init__(self, in_channels: int, eps: float = 1e-5): super(GraphNorm, self).__init__()
self.in_channels = in_channels self.eps = eps
self.weight = torch.nn.Parameter(torch.Tensor(in_channels)) self.bias = torch.nn.Parameter(torch.Tensor(in_channels)) self.mean_scale = torch.nn.Parameter(torch.Tensor(in_channels))
self.reset_parameters()
def reset_parameters(self): ones(self.weight) zeros(self.bias) ones(self.mean_scale)
def forward(self, x: Tensor, batch: Optional[Tensor] = None) -> Tensor: """""" if batch is None: batch = x.new_zeros(x.size(0), dtype=torch.long)
batch_size = int(batch.max()) + 1
mean = scatter_mean(x, batch, dim=0, dim_size=batch_size)[batch] out = x - mean * self.mean_scale var = scatter_mean(out.pow(2), batch, dim=0, dim_size=batch_size) std = (var + self.eps).sqrt()[batch] return self.weight * out / std + self.bias
def __repr__(self): return f'{self.__class__.__name__}({self.in_channels})'12345678910111213141516171819202122The code in this folder was obtained from "https://github.com/rusty1s/pytorch_geometric", which has the following license:
Copyright (c) 2020 Matthias Fey <matthias.fey@tu-dortmund.de>
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE.1from .lattice import find_neighbors, _one_to_three, _compute_cube_index, _three_to_one1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071import itertoolsimport numpy as np
# The following internal methods are used in the get_points_in_sphere method.def _compute_cube_index(coords: np.ndarray, global_min: float, radius: float ) -> np.ndarray: """ Compute the cube index from coordinates Args: coords: (nx3 array) atom coordinates global_min: (float) lower boundary of coordinates radius: (float) cutoff radius
Returns: (nx3 array) int indices
""" return np.array(np.floor((coords - global_min) / radius), dtype=int)
def _three_to_one(label3d: np.ndarray, ny: int, nz: int) -> np.ndarray: """ The reverse of _one_to_three """ return np.array(label3d[:, 0] * ny * nz + label3d[:, 1] * nz + label3d[:, 2]).reshape((-1, 1))
def _one_to_three(label1d: np.ndarray, ny: int, nz: int) -> np.ndarray: """ Convert a 1D index array to 3D index array
Args: label1d: (array) 1D index array ny: (int) number of cells in y direction nz: (int) number of cells in z direction
Returns: (nx3) int array of index
""" last = np.mod(label1d, nz) second = np.mod((label1d - last) / nz, ny) first = (label1d - last - second * nz) / (ny * nz) return np.concatenate([first, second, last], axis=1)
def find_neighbors(label: np.ndarray, nx: int, ny: int, nz: int): """ Given a cube index, find the neighbor cube indices
Args: label: (array) (n,) or (n x 3) indice array nx: (int) number of cells in y direction ny: (int) number of cells in y direction nz: (int) number of cells in z direction
Returns: neighbor cell indices
"""
array = [[-1, 0, 1]] * 3 neighbor_vectors = np.array(list(itertools.product(*array)), dtype=int) if np.shape(label)[1] == 1: label3d = _one_to_three(label, ny, nz) else: label3d = label all_labels = label3d[:, None, :] - neighbor_vectors[None, :, :] filtered_labels = [] # filter out out-of-bound labels i.e., label < 0 for labels in all_labels: ind = (labels[:, 0] < nx) * (labels[:, 1] < ny) * (labels[:, 2] < nz) * np.all(labels > -1e-5, axis=1) filtered_labels.append(labels[ind]) return filtered_labels12345678910111213141516171819202122The code in this folder was obtained from "https://github.com/materialsproject/pymatgen", which has the following license:
The MIT License (MIT)Copyright (c) 2011-2012 MIT & The Regents of the University of California, through Lawrence Berkeley National Laboratory
Permission is hereby granted, free of charge, to any person obtaining a copy ofthis software and associated documentation files (the "Software"), to deal inthe Software without restriction, including without limitation the rights touse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies ofthe Software, and to permit persons to whom the Software is furnished to do so,subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESSFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS ORCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHERIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR INCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.1from .acsf import GaussianBasis1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950import torchfrom torch import nn
def gaussian_smearing(distances, offset, widths, centered=False): if not centered: # compute width of Gaussian functions (using an overlap of 1 STDDEV) coeff = -0.5 / torch.pow(widths, 2) # Use advanced indexing to compute the individual components diff = distances[..., None] - offset else: # if Gaussian functions are centered, use offsets to compute widths coeff = -0.5 / torch.pow(offset, 2) # if Gaussian functions are centered, no offset is subtracted diff = distances[..., None] # compute smear distance values gauss = torch.exp(coeff * torch.pow(diff, 2)) return gauss
class GaussianBasis(nn.Module): def __init__( self, start=0.0, stop=5.0, n_gaussians=50, centered=False, trainable=False ): super(GaussianBasis, self).__init__() # compute offset and width of Gaussian functions offset = torch.linspace(start, stop, n_gaussians) widths = torch.FloatTensor((offset[1] - offset[0]) * torch.ones_like(offset)) if trainable: self.width = nn.Parameter(widths) self.offsets = nn.Parameter(offset) else: self.register_buffer("width", widths) self.register_buffer("offsets", offset) self.centered = centered
def forward(self, distances): """Compute smeared-gaussian distance values.
Args: distances (torch.Tensor): interatomic distance values of (N_b x N_at x N_nbh) shape.
Returns: torch.Tensor: layer output of (N_b x N_at x N_nbh x N_g) shape.
""" return gaussian_smearing( distances, self.offsets, self.width, centered=self.centered )1234567891011121314151617181920212223242526272829303132333435The code in this folder was obtained from "https://github.com/atomistic-machine-learning/schnetpack", which has the following license:
COPYRIGHT
Copyright (c) 2018 Kristof Schütt, Michael Gastegger, Pan Kessel, Kim Nicoli
All other contributions:Copyright (c) 2018, the respective contributors.All rights reserved.
Each contributor holds copyright over their respective contributions.The project versioning (Git) records all such contribution source information.
LICENSE
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE..gitattributes+6
3_epc/displacements/group_11/errs.txtAdded
3_epc/displacements/group_11/nerrs.txtAdded
3_epc/displacements/group_11/nscf.inAdded+261
3_epc/displacements/group_11/nscf.outAdded
3_epc/displacements/group_11/pw2bgw.inAdded+19
3_epc/displacements/group_11/pw2bgw.outAdded+57
3_epc/displacements/group_11/reconstruction/aohamiltonian/element.datAdded+2
3_epc/displacements/group_11/reconstruction/aohamiltonian/graph.pklAdded+3
3_epc/displacements/group_11/reconstruction/aohamiltonian/hamiltonians.h5Added+3
3_epc/displacements/group_11/reconstruction/aohamiltonian/hamiltonians_pred.h5Added+3
3_epc/displacements/group_11/reconstruction/aohamiltonian/hamiltonians_pred_e3.h5Added+3
3_epc/displacements/group_11/reconstruction/aohamiltonian/info.jsonAdded+1
3_epc/displacements/group_11/reconstruction/aohamiltonian/lat.datAdded+3
3_epc/displacements/group_11/reconstruction/aohamiltonian/orbital_types.datAdded+2
3_epc/displacements/group_11/reconstruction/aohamiltonian/overlaps.h5Added+3
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/config.iniAdded+82
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/result.txtAdded+87
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__init__.pyAdded+10
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/__init__.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/data.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/graph.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/kernel.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/model.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/rotate.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/__pycache__/utils.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/data.pyAdded+217
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/default.iniAdded+88
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/__init__.pyAdded+1
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/__pycache__/__init__.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/__pycache__/rmnet.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/license.txtAdded+1
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_HermNet/rmnet.pyAdded+105
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/__init__.pyAdded+2
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/__pycache__/__init__.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/__pycache__/diff_group_norm.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/__pycache__/graph_norm.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/diff_group_norm.pyAdded+109
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/graph_norm.pyAdded+60
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_PyG_future/license.txtAdded+22
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/__init__.pyAdded+1
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/__pycache__/__init__.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/__pycache__/lattice.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/lattice.pyAdded+71
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_pymatgen/license.txtAdded+22
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/__init__.pyAdded+1
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/__pycache__/__init__.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/__pycache__/acsf.cpython-312.pycAdded
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/acsf.pyAdded+50
3_epc/displacements/group_11/reconstruction/aohamiltonian/pred_ham_std/src/deeph/from_schnetpack/license.txtAdded+35