deepmodeling / abacus-develop

An electronic structure package based on either plane wave basis or numerical atomic orbitals.
http://abacus.ustc.edu.cn
GNU Lesser General Public License v3.0
174 stars 136 forks source link

Refactor: more safe file naming strategy to avoid data racing when parallel on processes #3941

Closed kirk0830 closed 7 months ago

kirk0830 commented 7 months ago

Details

will use uuid

Task list for Issue attackers (only for developers)

kirk0830 commented 7 months ago

in main stdout

Starting new version of Systematically Improvable Atomic-orbital Basis (SIAB) method
for generating numerical atomic orbitals (NAOs) for Linar Combinations of Atomic 
Orbitals (LCAO) based electronic structure calculations.

This version is refactored from PTG_dpsi, by ABACUS-AISI developers.

Parsing SIAB input file SIAB_INPUT.json with version 0.1.0

DUPLICATE CHECK-1 pass: folder Si-dimer-1.62 exists
DUPLICATE CHECK-2 pass: INPUT and INPUTw exist
DUPLICATE CHECK-3 pass: INPUT settings are consistent
DUPLICATE CHECK-4 pass: crucial output files exist
ABACUS calculation on reference structure dimer with bond length 1.62 is skipped.
DUPLICATE CHECK-1 pass: folder Si-dimer-1.82 exists
DUPLICATE CHECK-2 pass: INPUT and INPUTw exist
DUPLICATE CHECK-3 pass: INPUT settings are consistent
DUPLICATE CHECK-4 pass: crucial output files exist
ABACUS calculation on reference structure dimer with bond length 1.82 is skipped.
DUPLICATE CHECK-1 pass: folder Si-dimer-2.22 exists
DUPLICATE CHECK-2 pass: INPUT and INPUTw exist
DUPLICATE CHECK-3 pass: INPUT settings are consistent
DUPLICATE CHECK-4 pass: crucial output files exist
ABACUS calculation on reference structure dimer with bond length 2.22 is skipped.
DUPLICATE CHECK-1 pass: folder Si-dimer-2.72 exists
DUPLICATE CHECK-2 pass: INPUT and INPUTw exist
DUPLICATE CHECK-3 pass: INPUT settings are consistent
DUPLICATE CHECK-4 pass: crucial output files exist
ABACUS calculation on reference structure dimer with bond length 2.72 is skipped.
DUPLICATE CHECK-1 pass: folder Si-dimer-3.22 exists
DUPLICATE CHECK-2 pass: INPUT and INPUTw exist
DUPLICATE CHECK-3 pass: INPUT settings are consistent
DUPLICATE CHECK-4 pass: crucial output files exist
ABACUS calculation on reference structure dimer with bond length 3.22 is skipped.
DUPLICATE CHECK-1 pass: folder Si-trimer-1.9 exists
DUPLICATE CHECK-2 pass: INPUT and INPUTw exist
DUPLICATE CHECK-3 pass: INPUT settings are consistent
DUPLICATE CHECK-4 pass: crucial output files exist
ABACUS calculation on reference structure trimer with bond length 1.9 is skipped.
DUPLICATE CHECK-1 pass: folder Si-trimer-2.1 exists
DUPLICATE CHECK-2 pass: INPUT and INPUTw exist
DUPLICATE CHECK-3 pass: INPUT settings are consistent
DUPLICATE CHECK-4 pass: crucial output files exist
ABACUS calculation on reference structure trimer with bond length 2.1 is skipped.
DUPLICATE CHECK-1 pass: folder Si-trimer-2.6 exists
DUPLICATE CHECK-2 pass: INPUT and INPUTw exist
DUPLICATE CHECK-3 pass: INPUT settings are consistent
DUPLICATE CHECK-4 pass: crucial output files exist
ABACUS calculation on reference structure trimer with bond length 2.6 is skipped.
Parallelization - RUNTIME
Number of threads for each rcut: 4
Number of rcuts that can be parallelized: 3
Total number of threads available: 12
----------------------------------
NOTE: for parallelized run, the stdout and stderr will be redirected to log.[iproc].txt and err.[iproc].txt respectively.

Finish level 0 orbital generation (in total 3).
Finish level 1 orbital generation (in total 3).
Finish level 2 orbital generation (in total 3).
All processes finish, see stdout and stderr in log.[iproc].txt and err.[iproc].txt respectively.

====================================================================================
If SIAB package is used in your project, please cite the following paper:

Chen M, Guo G C, He L. 
Systematically improvable optimized atomic basis sets for ab initio calculations[J]. 
Journal of Physics: Condensed Matter, 2010, 22(44): 445501.

Li P, Liu X, Chen M, et al. 
Large-scale ab initio simulations based on systematically improvable atomic basis[J]. 
Computational Materials Science, 2016, 112: 503-517.

Lin P, Ren X, He L. 
Strategy for constructing compact numerical atomic orbital basis sets by 
incorporating the gradients of reference wavefunctions[J]. 
Physical Review B, 2021, 103(23): 235131.

If wannierization is used in your project, please cite the following paper:

Chen M, Guo G C, He L. 
Electronic structure interpolation via atomic orbitals[J]. 
Journal of Physics: Condensed Matter, 2011, 23(32): 325501.
====================================================================================

TIME STATISTICS
---------------
initialize                 0.00 s
run                      187.12 s
finalize                   0.00 s
total                    187.12 s

in stdout redirected to file, that of processor 1:


--------------------------------------------------
Module Spillage - find the most similar space to the target spanned planewave wavefunction:
SIAB.pytorch_swat starts, numerical atomic orbitals are optimized.
--------------------------------------------------

SEED INITIALIZATION: due to optimization method is local, random seed is somehow preferred. Present seed: 3323473473
WORKFLOW: use on-the-fly information pass from front-end to back-end.
Read file: Si-dimer-1.62/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-dimer-1.82/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-dimer-2.22/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-dimer-2.72/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-dimer-3.22/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
--------------------------------------------------------------------------------
INFORMATION CHECK - Please check every detail of the information below:
--------------------------------------------------------------------------------
PRINT INFO_KST INFORMATION
--------------------------
General Information: 
All atom types: Si
Orbital configuration for each atom type: 
Symbol, l: 0, 1, 2, 3, ... 
Si: 1, 1, 0
Realspace cutoff radius (rcut), grid (dr), kinetic cutoff (ecutwfc) and maximal angularmomentum (lmax) for each atom type: 
Atom  Rcut  dr    ecutwfc lmax 
Si    6.00  0.01  60.00 3    
Optimizer Learning Rate: 0.03
Including additional kinetic term in Spillage: False
Gaussian smoothing for orbitals at rcut: True
Max steps for optimization: 1000
lmax for each atom type: 
Si: 3

Structure specific information:
Number of reference structure: 5
Atom type for each reference structure: 
Structure 0: Si
Structure 1: Si
Structure 2: Si
Structure 3: Si
Structure 4: Si
Number of atoms for each atom type for each reference structure: 
Structure 0: Si: 2 
Structure 1: Si: 2 
Structure 2: Si: 2 
Structure 3: Si: 2 
Structure 4: Si: 2 
Number of bands selected to learn for each reference structure: 
Struectures: 0: 8 1: 8 2: 8 3: 8 4: 8 
Spherical Bessel function:
Number of Spherical Bessel functions (Sphbes) for each atom type: 
Si: 14 
PRINT INFO_KST INFORMATION END.

PRINT INFO_STRU INFORMATION
--------------------------
Structure 0:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

Structure 1:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

Structure 2:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

Structure 3:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

Structure 4:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

PRINT INFO_STRU INFORMATION END.

PRINT INFO_ELEMENT INFORMATION
--------------------------
Element-wise information: 
Element Si:
nsphbes: 14
Number of subshells: 3
Orbital configuration: 1s, 1p, 0d
rcut: 6
dr: 0.01
atomic index: 0

PRINT INFO_ELEMENT INFORMATION END.

PRINT INFO_OPT INFORMATION
--------------------------
Optimizer information: 
Calculate kinetic term: False
Calculate smooth term: True
Optimizer learning rate: 0.03
Max steps: 1000
PRINT INFO_OPT INFORMATION END.

PRINT INFO_MAX INFORMATION
--------------------------
The data dimension information for each reference structure: 
Structure 0:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 1:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 2:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 3:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 4:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

PRINT INFO_MAX INFORMATION END.

--------------------------------------------------------------------------------

DATA IMPORT - read_QSV
Reading OVERLAP_Q, OVERLAP_Sq and OVERLAP_V from ABACUS.
For PTG_dpsi formulation that kinetic term is included, 
will read both orb_matrix*.dat of both order 0 and 1.

DATA IMPORT - read_QSV
Reading OVERLAP_Q, OVERLAP_Sq and OVERLAP_V from ABACUS.
For PTG_dpsi formulation that kinetic term is included, 
will read both orb_matrix*.dat of both order 0 and 1.

Optimization of the orbital starts.
torch_optimizer.SWATS (Improving Generalization Performance by Switching from Adam to SGD) optimizer is used.
Parameters are listed below
Learning rate: 0.03
Epsilon: 1e-20
Max steps: 1000

Optimization on Spillage function starts, check "Spillage.dat" for detailed trajectory.
------------------------------------------------------------
      Step            Spillage          deltaSpill      Time
------------------------------------------------------------
         0    4.0386426269e+00    4.0386426269e+00    0.0067
       100    5.2164589824e-02   -6.8974629363e-06    0.0050
       200    5.2135961600e-02   -7.6803230442e-11    0.0133
       300    5.2135960518e-02   -1.1726730698e-15    0.0051
       400    5.2135960518e-02   -1.1102230246e-16    0.0048
       500    5.2135960518e-02   -1.3183898417e-16    0.0069
       600    5.2135960518e-02   -4.8572257327e-17    0.0067
       700    5.2135960518e-02   -2.7755575616e-17    0.0048
       800    5.2135960518e-02    0.0000000000e+00    0.0047
       900    5.2135960518e-02    0.0000000000e+00    0.0068
...
---------------------------------
Optimization of the orbital ends.

Several files generated:
Spillage.dat: detailed trajectory of the optimization
ORBITAL_RESULTS.txt: optimized orbital coefficients
ORBITAL_*U.dat: numerical atomic orbital before renaming
ORBITAL_PLOTU.dat: for plot, the first column is the r, latter colomns are the orbitals

TOTAL TIME (PyTorch):     22.82067084312439
CHECKPOINT: handling on temporary files:
            Spillage.dat        : 3ac5b2f4362735288931f0c98cbd9f3c.dat
            ORBITAL_RESULTS.txt : 2f667ebb13e1312c9b7debdf34b2056c.txt
            ORBITAL_PLOTU.dat   : 8052849bf55e3a7ab3c10aebb243f403.dat
            ORBITAL.dat         : 63426af9ab4636aaa0908e977b6913d4.dat
CHECKPOINT: folder Si_1s1p/6au_60Ry created.
CHECKPOINT: folder 4575164b-2c67-3091-b382-0ae4ecdefeb2 created.
Orbital file Si_1s1p/6au_60Ry/Si_gga_60Ry_6au_1s1p.orb generated.

--------------------------------------------------
Module Spillage - find the most similar space to the target spanned planewave wavefunction:
SIAB.pytorch_swat starts, numerical atomic orbitals are optimized.
--------------------------------------------------

SEED INITIALIZATION: due to optimization method is local, random seed is somehow preferred. Present seed: 3323528134
WORKFLOW: use on-the-fly information pass from front-end to back-end.
Read file: Si-dimer-1.62/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-dimer-1.82/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-dimer-2.22/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-dimer-2.72/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-dimer-3.22/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
--------------------------------------------------------------------------------
INFORMATION CHECK - Please check every detail of the information below:
--------------------------------------------------------------------------------
PRINT INFO_KST INFORMATION
--------------------------
General Information: 
All atom types: Si
Orbital configuration for each atom type: 
Symbol, l: 0, 1, 2, 3, ... 
Si: 2, 2, 1
Realspace cutoff radius (rcut), grid (dr), kinetic cutoff (ecutwfc) and maximal angularmomentum (lmax) for each atom type: 
Atom  Rcut  dr    ecutwfc lmax 
Si    6.00  0.01  60.00 3    
Optimizer Learning Rate: 0.03
Including additional kinetic term in Spillage: False
Gaussian smoothing for orbitals at rcut: True
Max steps for optimization: 1000
lmax for each atom type: 
Si: 3

Structure specific information:
Number of reference structure: 5
Atom type for each reference structure: 
Structure 0: Si
Structure 1: Si
Structure 2: Si
Structure 3: Si
Structure 4: Si
Number of atoms for each atom type for each reference structure: 
Structure 0: Si: 2 
Structure 1: Si: 2 
Structure 2: Si: 2 
Structure 3: Si: 2 
Structure 4: Si: 2 
Number of bands selected to learn for each reference structure: 
Struectures: 0: 8 1: 8 2: 8 3: 8 4: 8 
Spherical Bessel function:
Number of Spherical Bessel functions (Sphbes) for each atom type: 
Si: 14 
PRINT INFO_KST INFORMATION END.

PRINT INFO_STRU INFORMATION
--------------------------
Structure 0:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

Structure 1:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

Structure 2:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

Structure 3:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

Structure 4:
Number of atoms for each type: 
Si: 2
Number of bands calculated for present structure: 8
Number of bands taken INFO consideration for learning: 4
Detailed weight information for each band: 
  Band   0: 5.0000e-02
  Band   1: 5.0000e-02
  Band   2: 5.0000e-02
  Band   3: 5.0000e-02
  Band   4: 0.0000e+00
  Band   5: 0.0000e+00
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00

PRINT INFO_STRU INFORMATION END.

PRINT INFO_ELEMENT INFORMATION
--------------------------
Element-wise information: 
Element Si:
nsphbes: 14
Number of subshells: 3
Orbital configuration: 2s, 2p, 1d
rcut: 6
dr: 0.01
atomic index: 0

PRINT INFO_ELEMENT INFORMATION END.

PRINT INFO_OPT INFORMATION
--------------------------
Optimizer information: 
Calculate kinetic term: False
Calculate smooth term: True
Optimizer learning rate: 0.03
Max steps: 1000
PRINT INFO_OPT INFORMATION END.

PRINT INFO_MAX INFORMATION
--------------------------
The data dimension information for each reference structure: 
Structure 0:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 1:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 2:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 3:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 4:
Number of atom types: 1
Number of atoms: 2
Number of bands: 8
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

PRINT INFO_MAX INFORMATION END.

--------------------------------------------------------------------------------

DATA IMPORT - read_QSV
Reading OVERLAP_Q, OVERLAP_Sq and OVERLAP_V from ABACUS.
For PTG_dpsi formulation that kinetic term is included, 
will read both orb_matrix*.dat of both order 0 and 1.

DATA IMPORT - read_QSV
Reading OVERLAP_Q, OVERLAP_Sq and OVERLAP_V from ABACUS.
For PTG_dpsi formulation that kinetic term is included, 
will read both orb_matrix*.dat of both order 0 and 1.

Optimization of the orbital starts.
torch_optimizer.SWATS (Improving Generalization Performance by Switching from Adam to SGD) optimizer is used.
Parameters are listed below
Learning rate: 0.03
Epsilon: 1e-20
Max steps: 1000

Optimization on Spillage function starts, check "Spillage.dat" for detailed trajectory.
------------------------------------------------------------
      Step            Spillage          deltaSpill      Time
------------------------------------------------------------
         0    6.7723461135e-02    6.7723461135e-02    0.0082
       100    2.3560392923e-02   -1.3347666324e-06    0.0063
       200    2.3551540481e-02   -2.9319317807e-11    0.0079
       300    2.3551540353e-02   -1.0304257447e-15    0.0079
       400    2.3551540353e-02    1.0061396161e-16    0.0060
       500    2.3551540353e-02    1.9081958236e-16    0.0103
       600    2.3551540353e-02   -1.7347234760e-17    0.0077
       700    2.3551540353e-02    6.5919492087e-17    0.0079
       800    2.3551540353e-02   -1.2836953722e-16    0.0059
       900    2.3551540353e-02    4.1633363423e-17    0.0062
...
---------------------------------
Optimization of the orbital ends.

Several files generated:
Spillage.dat: detailed trajectory of the optimization
ORBITAL_RESULTS.txt: optimized orbital coefficients
ORBITAL_*U.dat: numerical atomic orbital before renaming
ORBITAL_PLOTU.dat: for plot, the first column is the r, latter colomns are the orbitals

TOTAL TIME (PyTorch):     27.095051765441895
CHECKPOINT: handling on temporary files:
            Spillage.dat        : 5320047ec5323ca99b1737e5eb39944d.dat
            ORBITAL_RESULTS.txt : ea8d291332b43b67bf40770bb3d541fe.txt
            ORBITAL_PLOTU.dat   : a036207e722d340081397e6bf3806f25.dat
            ORBITAL.dat         : 431efeadee4431a2bd74a54906ff82d5.dat
CHECKPOINT: folder Si_2s2p1d/6au_60Ry created.
Orbital file Si_2s2p1d/6au_60Ry/Si_gga_60Ry_6au_2s2p1d.orb generated.

--------------------------------------------------
Module Spillage - find the most similar space to the target spanned planewave wavefunction:
SIAB.pytorch_swat starts, numerical atomic orbitals are optimized.
--------------------------------------------------

SEED INITIALIZATION: due to optimization method is local, random seed is somehow preferred. Present seed: 3323592848
WORKFLOW: use on-the-fly information pass from front-end to back-end.
Read file: Si-trimer-1.9/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-trimer-2.1/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
Read file: Si-trimer-2.6/orb_matrix_rcut6deriv0.dat
atom symbol: Si
number of l for present structure: 3
number of l for present coefficients: 3
--------------------------------------------------------------------------------
INFORMATION CHECK - Please check every detail of the information below:
--------------------------------------------------------------------------------
PRINT INFO_KST INFORMATION
--------------------------
General Information: 
All atom types: Si
Orbital configuration for each atom type: 
Symbol, l: 0, 1, 2, 3, ... 
Si: 3, 3, 2
Realspace cutoff radius (rcut), grid (dr), kinetic cutoff (ecutwfc) and maximal angularmomentum (lmax) for each atom type: 
Atom  Rcut  dr    ecutwfc lmax 
Si    6.00  0.01  60.00 3    
Optimizer Learning Rate: 0.03
Including additional kinetic term in Spillage: False
Gaussian smoothing for orbitals at rcut: True
Max steps for optimization: 1000
lmax for each atom type: 
Si: 3

Structure specific information:
Number of reference structure: 3
Atom type for each reference structure: 
Structure 0: Si
Structure 1: Si
Structure 2: Si
Number of atoms for each atom type for each reference structure: 
Structure 0: Si: 3 
Structure 1: Si: 3 
Structure 2: Si: 3 
Number of bands selected to learn for each reference structure: 
Struectures: 0: 10 1: 10 2: 10 
Spherical Bessel function:
Number of Spherical Bessel functions (Sphbes) for each atom type: 
Si: 14 
PRINT INFO_KST INFORMATION END.

PRINT INFO_STRU INFORMATION
--------------------------
Structure 0:
Number of atoms for each type: 
Si: 3
Number of bands calculated for present structure: 10
Number of bands taken INFO consideration for learning: 6
Detailed weight information for each band: 
  Band   0: 5.5556e-02
  Band   1: 5.5556e-02
  Band   2: 5.5556e-02
  Band   3: 5.5556e-02
  Band   4: 5.5556e-02
  Band   5: 5.5556e-02
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00
  Band   8: 0.0000e+00
  Band   9: 0.0000e+00

Structure 1:
Number of atoms for each type: 
Si: 3
Number of bands calculated for present structure: 10
Number of bands taken INFO consideration for learning: 6
Detailed weight information for each band: 
  Band   0: 5.5556e-02
  Band   1: 5.5556e-02
  Band   2: 5.5556e-02
  Band   3: 5.5556e-02
  Band   4: 5.5556e-02
  Band   5: 5.5556e-02
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00
  Band   8: 0.0000e+00
  Band   9: 0.0000e+00

Structure 2:
Number of atoms for each type: 
Si: 3
Number of bands calculated for present structure: 10
Number of bands taken INFO consideration for learning: 6
Detailed weight information for each band: 
  Band   0: 5.5556e-02
  Band   1: 5.5556e-02
  Band   2: 5.5556e-02
  Band   3: 5.5556e-02
  Band   4: 5.5556e-02
  Band   5: 5.5556e-02
  Band   6: 0.0000e+00
  Band   7: 0.0000e+00
  Band   8: 0.0000e+00
  Band   9: 0.0000e+00

PRINT INFO_STRU INFORMATION END.

PRINT INFO_ELEMENT INFORMATION
--------------------------
Element-wise information: 
Element Si:
nsphbes: 14
Number of subshells: 3
Orbital configuration: 3s, 3p, 2d
rcut: 6
dr: 0.01
atomic index: 0

PRINT INFO_ELEMENT INFORMATION END.

PRINT INFO_OPT INFORMATION
--------------------------
Optimizer information: 
Calculate kinetic term: False
Calculate smooth term: True
Optimizer learning rate: 0.03
Max steps: 1000
PRINT INFO_OPT INFORMATION END.

PRINT INFO_MAX INFORMATION
--------------------------
The data dimension information for each reference structure: 
Structure 0:
Number of atom types: 1
Number of atoms: 3
Number of bands: 10
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 1:
Number of atom types: 1
Number of atoms: 3
Number of bands: 10
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

Structure 2:
Number of atom types: 1
Number of atoms: 3
Number of bands: 10
Number of Sphbes: 14
Number of subshells: 3
Maximal number of magnetic channels: 5

PRINT INFO_MAX INFORMATION END.

--------------------------------------------------------------------------------

DATA IMPORT - read_QSV
Reading OVERLAP_Q, OVERLAP_Sq and OVERLAP_V from ABACUS.
For PTG_dpsi formulation that kinetic term is included, 
will read both orb_matrix*.dat of both order 0 and 1.

DATA IMPORT - read_QSV
Reading OVERLAP_Q, OVERLAP_Sq and OVERLAP_V from ABACUS.
For PTG_dpsi formulation that kinetic term is included, 
will read both orb_matrix*.dat of both order 0 and 1.

Optimization of the orbital starts.
torch_optimizer.SWATS (Improving Generalization Performance by Switching from Adam to SGD) optimizer is used.
Parameters are listed below
Learning rate: 0.03
Epsilon: 1e-20
Max steps: 1000

Optimization on Spillage function starts, check "Spillage.dat" for detailed trajectory.
------------------------------------------------------------
      Step            Spillage          deltaSpill      Time
------------------------------------------------------------
         0    2.5596194728e-02    2.5596194728e-02    0.0086
       100    1.7473930440e-02   -2.4186781843e-06    0.0048
       200    1.7420725547e-02   -2.7851295523e-08    0.0060
       300    1.7417854966e-02   -3.0711143410e-08    0.0057
       400    1.7414263417e-02   -4.3070403615e-08    0.0056
       500    1.7408703804e-02   -7.0797234859e-08    0.0086
       600    1.7399147019e-02   -1.2994866980e-07    0.0061
       700    1.7381527244e-02   -2.0388299344e-07    0.0057
       800    1.7362693429e-02   -1.4373900395e-07    0.0061
       900    1.7355281719e-02   -2.2018685680e-08    0.0080
...
---------------------------------
Optimization of the orbital ends.

Several files generated:
Spillage.dat: detailed trajectory of the optimization
ORBITAL_RESULTS.txt: optimized orbital coefficients
ORBITAL_*U.dat: numerical atomic orbital before renaming
ORBITAL_PLOTU.dat: for plot, the first column is the r, latter colomns are the orbitals

TOTAL TIME (PyTorch):     26.484872102737427
CHECKPOINT: handling on temporary files:
            Spillage.dat        : 62c692725a58328dbef1bec91dcb8363.dat
            ORBITAL_RESULTS.txt : 19651c45ebb33b64879a4f1ae5f86449.txt
            ORBITAL_PLOTU.dat   : caf7ac8e02963252b65851bda9adc417.dat
            ORBITAL.dat         : 7ee281688aae343d896dd47ce36aa6b4.dat
CHECKPOINT: folder Si_3s3p2d/6au_60Ry created.
Orbital file Si_3s3p2d/6au_60Ry/Si_gga_60Ry_6au_3s3p2d.orb generated.

close with PR: https://github.com/kirk0830/abacus_orbital_generation/pull/26