Skip to content

Commit

Permalink
update: python module & PSO
Browse files Browse the repository at this point in the history
  • Loading branch information
Infant83 committed Feb 21, 2021
1 parent 7fcef8d commit 00de3fa
Show file tree
Hide file tree
Showing 347 changed files with 2,001 additions and 0 deletions.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
0 14092.572886972
1 14092.119505740
2 14091.247384188
3 14089.555675726
4 14086.785848756
5 14081.247690427
6 14070.067011504
7 14047.842911308
8 14003.819400537
9 13916.654930640
10 13742.958099226
11 13407.921797347
12 12784.232187107
13 11582.409473882
14 9266.874653231
15 5272.430515236
16 2960.603010632
17 2492.758745938
18 2459.210079805
19 2458.621898541
20 2458.534783266
21 2458.514003859
22 2458.508923332
23 2458.507661256
24 2458.507349060
25 2458.507271629
26 2458.507252441
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
0 4440.566979223
1 4435.736170953
2 4362.809273933
3 4351.919044891
4 4349.742975876
5 4349.314505492
6 4322.211233311
7 4245.322950108
8 4232.327292506
9 4210.866800467
10 4190.843666906
11 4182.787901043
12 4181.232851420
13 4180.924091146
14 4180.862429120
15 4180.850100317
16 4180.847634700
17 4180.847141582
18 4180.847042959
19 4180.847023234
20 4180.177452625
21 4180.010679273
22 4179.977343700
23 4174.959384361
24 4172.942454184
25 4172.359009330
26 4170.877275107
27 4170.128760341
28 4169.578376646
29 4169.418804936
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
0 5112.347030505
1 5060.392478546
2 3760.773297184
3 3462.961478763
4 3414.525471346
5 3405.310178345
6 3403.486351664
7 3403.122358416
8 3403.049590672
9 3315.593021345
10 3295.548976972
11 3285.425868007
12 3259.056951370
13 3252.038855559
14 3245.150888877
15 3243.444482346
16 3243.117103482
17 3236.169709188
18 3226.270710428
19 3222.010009202
20 3221.159204106
21 3220.989096588
22 3220.955077225
23 3220.948273439
24 3220.946912685
25 3220.946640534
26 3220.946586104
27 3220.869557858
28 3220.578054849
29 3220.519778967
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Non-linear least squares minimiation method and its input variables
# TITLE G
TBFIT T #
LSTYPE PSO # Particle swarm optimization
MITER 100 # maximum number of iteration for the fitting procedures
PSO_NP 50 # number of particles (parameters) used in PSO
PSO_OPT 0.3 0.4 0.2 # c1, c2, w defines cognitive, social, and inertia factor in PSO velocity update
PTOL 1E-7 # convergence criteria for SK parameters to be fitted
FTOL 1E-7 # convergence criteria for band structure for each fitting iterations

EFILE DFT_BAND.dat # target band structure to be fitted to (EDFT). Must be provided if TBFIT=.TRUE.
GFILE POSCAR-TB # name of GEOMETRY & TB-parameter files. default: POSCAR-TB
KFILE KPOINTS_BAND # default: KPOINTS_BAND
PFILE PARAM_FIT.dat # initial sk-parameter will be read from this file
POFILE PARAM_FIT.new.dat # fitted sk-parameter will be written here
PRTDIFF .TRUE.

LOCCHG .TRUE. # set local charge neutrality. if collinear or NM: m_tot
TYPMAG noncoll # set type of magnetic moment: nonmagnetic, collinear, noncollinear
LSORB .TRUE. # set spin orbit interaction with 1st-order perturbation theory
#LORBIT .TRUE. rh dat #orbital decomposed output (write absolute value of wavefunction coefficient to band_structure file)
# LTOTEN .TRUE.
#NELECT 4
# set weight and constraint for fitting : valid only if TBFIT .TRUE.
SET WEIGHT # possible index: ALL, NKP=nkpoint, NEIG, IBAND, FBAND
KRANGE : TBABND 1:16 DFTBND 1:16 WEIGHT 10
KRANGE : TBABND 1:10 DFTBND 1:10 WEIGHT 50
KRANGE : TBABND 7:10 DFTBND 7:10 WEIGHT 90
# KRANGE K-10:K+10 TBABND 1:10 DFTBND 1:10 WEIGHT 100
# KRANGE K-10:K+10 TBABND 7:10 DFTBND 7:10 WEIGHT 200
# KRANGE : TBABND 1:2 DFTBND 1:2 WEIGHT 500
END WEIGHT # PRINT_ONLY # following PRINT_ONLY tag make program to write target data and stops

SET CONSTRAINT TBPARAM
e_px_C = e_pz_C # e_px_C is same as e_pz_C # currently it applies only to the onsite parameters
e_py_C = e_pz_C # e_py_C is same as e_pz_C
END CONSTRAINT TBPARAM

SET NN_CLASS # if R0 is not provided (sigle value is provided), R0=NN-dist and Max R0 will be R0*1.1
C-C : 1.5 R0 1.4145 # cutoff dist for 1st nearest neighbor between C-C bond (Rcut=1.5, R0= 1.4145)
END NN_CLASS
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# PARAM_FIT.new.dat
# E_TARGET FILE NAME : DFT_BAND.dat
# KRANGE : TBABND 1:16 DFTBND 1:16 WEIGHT 10
# KRANGE : TBABND 1:10 DFTBND 1:10 WEIGHT 50
# KRANGE : TBABND 7:10 DFTBND 7:10 WEIGHT 90
PRINT_INDEX .FALSE.
USE_OVERLAP .FALSE.
IS_SK .TRUE.
SK_SCALE_MODE 1

e_s_C -0.99551807
e_px_C -0.43507366
e_py_C -0.43507366
e_pz_C -0.43507366
sss_1_CC -4.22211347
sps_1_CC 4.91182192
pps_1_CC 3.72727549
ppp_1_CC -2.22174363
sss_2_CC 0.22000000 Fixed
sps_2_CC 1.22000000 Fixed
pps_2_CC 0.00000000 Fixed
ppp_2_CC 0.00000000 Fixed
o_sss_1_CC 0.10000000 Fixed
o_sps_1_CC 0.10000000 Fixed
o_pps_1_CC 0.10000000 Fixed
o_ppp_1_CC 0.10000000 Fixed
o_sss_2_CC 0.10000000 Fixed
o_sps_2_CC 0.10000000 Fixed
o_pps_2_CC 0.10000000 Fixed
o_ppp_2_CC 0.10000000 Fixed
stoner_I_p_C 2.13131125
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

# PARAM_FIT.new.dat_temp
# E_TARGET FILE NAME : DFT_BAND.dat
PRINT_INDEX .FALSE.
USE_OVERLAP .FALSE.
IS_SK .TRUE.
SK_SCALE_MODE 1

e_s_C -3.65397318
e_px_C 0.26838760
e_py_C 0.26838760
e_pz_C 0.26838760
sss_1_CC 5.22624889
sps_1_CC 4.96808543
pps_1_CC -1.78857161
ppp_1_CC 3.44085865
sss_2_CC 0.22000000 Fixed
sps_2_CC 1.22000000 Fixed
pps_2_CC 0.00000000 Fixed
ppp_2_CC 0.00000000 Fixed
o_sss_1_CC 0.10000000 Fixed
o_sps_1_CC 0.10000000 Fixed
o_pps_1_CC 0.10000000 Fixed
o_ppp_1_CC 0.10000000 Fixed
o_sss_2_CC 0.10000000 Fixed
o_sps_2_CC 0.10000000 Fixed
o_pps_2_CC 0.10000000 Fixed
o_ppp_2_CC 0.10000000 Fixed
stoner_I_p_C 0.00000000
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# PARAM_FIT.new.lmdif.dat
# FITTED PARAMETERS FROM TBFITPY_MOD
PRINT_INDEX .FALSE.
USE_OVERLAP .FALSE.
IS_SK .TRUE.
SK_SCALE_MODE 1

e_s_C -3.65397318
e_px_C 0.26838760
e_py_C 0.26838760
e_pz_C 0.26838760
sss_1_CC 5.22624889
sps_1_CC 4.96808543
pps_1_CC -1.78857161
ppp_1_CC 3.44085865
sss_2_CC 0.22000000 Fixed
sps_2_CC 1.22000000 Fixed
pps_2_CC 0.00000000 Fixed
ppp_2_CC 0.00000000 Fixed
o_sss_1_CC 0.10000000 Fixed
o_sps_1_CC 0.10000000 Fixed
o_pps_1_CC 0.10000000 Fixed
o_ppp_1_CC 0.10000000 Fixed
o_sss_2_CC 0.10000000 Fixed
o_sps_2_CC 0.10000000 Fixed
o_pps_2_CC 0.10000000 Fixed
o_ppp_2_CC 0.10000000 Fixed
stoner_I_p_C 0.00000000
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# PARAM_FIT.new.mypso.P100.dat
# FITTED PARAMETERS FROM TBFITPY_MOD
PRINT_INDEX .FALSE.
USE_OVERLAP .FALSE.
IS_SK .TRUE.
SK_SCALE_MODE 1

e_s_C 0.04251197
e_px_C 0.01695832
e_py_C 0.01695832
e_pz_C 0.01695832
sss_1_CC 2.93674026
sps_1_CC 5.10140264
pps_1_CC -1.84781121
ppp_1_CC 4.30655213
sss_2_CC 0.22000000 Fixed
sps_2_CC 1.22000000 Fixed
pps_2_CC 0.00000000 Fixed
ppp_2_CC 0.00000000 Fixed
o_sss_1_CC 0.10000000 Fixed
o_sps_1_CC 0.10000000 Fixed
o_pps_1_CC 0.10000000 Fixed
o_ppp_1_CC 0.10000000 Fixed
o_sss_2_CC 0.10000000 Fixed
o_sps_2_CC 0.10000000 Fixed
o_pps_2_CC 0.10000000 Fixed
o_ppp_2_CC 0.10000000 Fixed
stoner_I_p_C 2.15735541
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# PARAM_FIT.new.mypso.P50.dat
# FITTED PARAMETERS FROM TBFITPY_MOD
PRINT_INDEX .FALSE.
USE_OVERLAP .FALSE.
IS_SK .TRUE.
SK_SCALE_MODE 1

e_s_C -0.99471103
e_px_C -0.46013074
e_py_C -0.46013074
e_pz_C -0.46013074
sss_1_CC -4.22402253
sps_1_CC 4.91356695
pps_1_CC 3.72842339
ppp_1_CC -2.24404349
sss_2_CC 0.22000000 Fixed
sps_2_CC 1.22000000 Fixed
pps_2_CC 0.00000000 Fixed
ppp_2_CC 0.00000000 Fixed
o_sss_1_CC 0.10000000 Fixed
o_sps_1_CC 0.10000000 Fixed
o_pps_1_CC 0.10000000 Fixed
o_ppp_1_CC 0.10000000 Fixed
o_sss_2_CC 0.10000000 Fixed
o_sps_2_CC 0.10000000 Fixed
o_pps_2_CC 0.10000000 Fixed
o_ppp_2_CC 0.10000000 Fixed
stoner_I_p_C 2.12744832
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

ITER= 1, rt(sum((dE*WT)^2)) = 14092.572887, rt(sum(dE^2)) = 324.675387

ITER= 2, rt(sum((dE*WT)^2)) = 14092.119506, rt(sum(dE^2)) = 324.666241

ITER= 3, rt(sum((dE*WT)^2)) = 14091.247384, rt(sum(dE^2)) = 324.649325

ITER= 4, rt(sum((dE*WT)^2)) = 14089.555676, rt(sum(dE^2)) = 324.616266

ITER= 5, rt(sum((dE*WT)^2)) = 14086.785849, rt(sum(dE^2)) = 324.557723

ITER= 6, rt(sum((dE*WT)^2)) = 14081.247690, rt(sum(dE^2)) = 324.437398

ITER= 7, rt(sum((dE*WT)^2)) = 14070.067012, rt(sum(dE^2)) = 324.198417

ITER= 8, rt(sum((dE*WT)^2)) = 14047.842911, rt(sum(dE^2)) = 323.722558

ITER= 9, rt(sum((dE*WT)^2)) = 14003.819401, rt(sum(dE^2)) = 322.777316

ITER= 10, rt(sum((dE*WT)^2)) = 13916.654931, rt(sum(dE^2)) = 320.869346

ITER= 11, rt(sum((dE*WT)^2)) = 13742.958099, rt(sum(dE^2)) = 317.134397

ITER= 12, rt(sum((dE*WT)^2)) = 13407.921797, rt(sum(dE^2)) = 309.939031

ITER= 13, rt(sum((dE*WT)^2)) = 12784.232187, rt(sum(dE^2)) = 296.467230

ITER= 14, rt(sum((dE*WT)^2)) = 11582.409474, rt(sum(dE^2)) = 269.731834

ITER= 15, rt(sum((dE*WT)^2)) = 9266.874653, rt(sum(dE^2)) = 218.882726

ITER= 16, rt(sum((dE*WT)^2)) = 5272.430515, rt(sum(dE^2)) = 128.632708

ITER= 17, rt(sum((dE*WT)^2)) = 2960.603011, rt(sum(dE^2)) = 89.089234

ITER= 18, rt(sum((dE*WT)^2)) = 2492.758746, rt(sum(dE^2)) = 85.490622

ITER= 19, rt(sum((dE*WT)^2)) = 2459.210080, rt(sum(dE^2)) = 90.493828

ITER= 20, rt(sum((dE*WT)^2)) = 2458.621899, rt(sum(dE^2)) = 89.141528

ITER= 21, rt(sum((dE*WT)^2)) = 2458.534783, rt(sum(dE^2)) = 89.902713

ITER= 22, rt(sum((dE*WT)^2)) = 2458.514004, rt(sum(dE^2)) = 89.535322

ITER= 23, rt(sum((dE*WT)^2)) = 2458.508923, rt(sum(dE^2)) = 89.719576

ITER= 24, rt(sum((dE*WT)^2)) = 2458.507661, rt(sum(dE^2)) = 89.628003

ITER= 25, rt(sum((dE*WT)^2)) = 2458.507349, rt(sum(dE^2)) = 89.673594

ITER= 26, rt(sum((dE*WT)^2)) = 2458.507272, rt(sum(dE^2)) = 89.650891

ITER= 27, rt(sum((dE*WT)^2)) = 2458.507252, rt(sum(dE^2)) = 89.662195

Termination INFO= 1 , condition: |actred|,prered <= ftol, ratio <= 2 : actred= 0.1560944E-07 prered= 0.3110420E-07 ratio= 0.5018434E+00

Check constraint: upper and lower bounds
#=========================================================

Check fitness function updates
#============================================
FDIFF( 0.00100000)<= 100.00000000
Empty file.
Loading

0 comments on commit 00de3fa

Please sign in to comment.