Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix U matrices not being written #177

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/plot.F90
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@ subroutine plot_main( )

if (timing_level>0) call io_stopwatch('plot: main',1)

write(stdout,'(1x,a)') '*---------------------------------------------------------------------------*'
write(stdout,'(1x,a)') '| PLOTTING |'
write(stdout,'(1x,a)') '*---------------------------------------------------------------------------*'
write(stdout,*)
! Print the header only if there is something to plot
if(bands_plot .or. dos_plot .or. fermi_surface_plot .or. write_hr .or. &
wannier_plot .or. write_u_matrices) then
write(stdout,'(1x,a)') '*---------------------------------------------------------------------------*'
write(stdout,'(1x,a)') '| PLOTTING |'
write(stdout,'(1x,a)') '*---------------------------------------------------------------------------*'
write(stdout,*)
end if

if(bands_plot .or. dos_plot .or. fermi_surface_plot .or. write_hr) then
! Check if the kmesh includes the gamma point
Expand Down
12 changes: 7 additions & 5 deletions src/wannier_prog.F90
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,14 @@ program wannier

2002 continue
if (on_root) then
! I call the routine always; the if statements to decide if/what
! to plot are inside the function
time2=io_time()
if (wannier_plot .or. bands_plot .or. fermi_surface_plot .or. write_hr) then
call plot_main()
time1=io_time()
write(stdout,'(1x,a25,f11.3,a)') 'Time for plotting ',time1-time2,' (sec)'
end if
call plot_main()
time1=io_time()
! Now time is always printed, even if no plotting is done/required, but
! it shouldn't be a problem.
write(stdout,'(1x,a25,f11.3,a)') 'Time for plotting ',time1-time2,' (sec)'
endif

3003 continue
Expand Down
5 changes: 5 additions & 0 deletions test-suite/tests/jobconfig
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ program = WANNIER90_WOUT_OK
inputs_args = ('gaas2.win', '')
output = gaas2.wout

[testw90_write_u_matrices]
program = WANNIER90_UMAT
inputs_args = ('gaas.win', '')
output = gaas_u.mat

# Benzene, valence and conduction
[testw90_benzene_gamma_valcond/]
program = WANNIER90_WOUT_OK
Expand Down
1 change: 1 addition & 0 deletions test-suite/tests/testw90_write_u_matrices/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gaas.wout
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
written on 24May2018 at 11:39:22
8 4 4

0.0000000000 +0.0000000000 +0.0000000000
-0.4061849906 -0.2915711806
+0.3529114575 -0.3857843212
+0.1346072780 -0.4491959940
-0.1518991556 +0.4833781613
-0.4061849906 -0.2915711806
-0.7651166579 +0.1348383284
+0.2962575867 +0.0457811999
-0.2351893789 +0.0351653953
-0.4061849906 -0.2915711806
+0.1821455114 +0.0732825179
-0.0019866248 -0.2592303017
+0.3515831812 -0.7215522544
-0.4061849906 -0.2915711806
+0.2300596890 +0.1776634749
-0.4288782399 +0.6626450958
+0.0355053533 +0.2030086978

0.0000000000 +0.0000000000 +0.5000000000
-0.1057132567 +0.5246202143
-0.0427931934 +0.2123685807
-0.2677342524 -0.1689351101
-0.1897175166 -0.7283222015
-0.1057132567 +0.5246202143
-0.0427931934 +0.2123685807
+0.7091062705 +0.3909547503
+0.0064929377 +0.1046288142
-0.0741199852 +0.3678331716
+0.1831007316 -0.9086688658
-0.0000000000 +0.0000000000
+0.0000000000 -0.0000000000
-0.1057132567 +0.5246202143
-0.0427931934 +0.2123685807
-0.4413720181 -0.2220196402
+0.1832245788 +0.6236933873

0.0000000000 +0.5000000000 +0.0000000000
-0.0165918202 -0.3748596082
+0.0409872506 +0.9260264742
-0.0000000000 +0.0000000000
+0.0000000000 -0.0000000000
-0.0236640002 -0.5346416342
-0.0095792918 -0.2164252957
-0.3107782122 +0.7226193256
-0.0048615116 -0.2188178363
-0.0236640002 -0.5346416342
-0.0095792918 -0.2164252957
+0.1990785780 -0.1768648475
+0.4206171353 +0.6471741942
-0.0236640002 -0.5346416342
-0.0095792918 -0.2164252957
+0.1116996343 -0.5457544781
-0.4157556237 -0.4283563579

0.0000000000 +0.5000000000 +0.5000000000
0.4795086321 +0.1416738216
+0.4227012575 +0.2670648740
-0.4467842443 +0.1850911269
+0.1572281390 +0.4913292441
+0.4795086321 +0.1416738216
-0.4227012575 -0.2670648740
-0.4456619355 -0.2598279297
+0.2773909718 -0.3961428214
+0.4795086321 +0.1416738216
+0.4227012575 +0.2670648740
+0.4467842443 -0.1850911269
-0.1572281390 -0.4913292441
+0.4795086321 +0.1416738216
-0.4227012575 -0.2670648740
+0.4456619355 +0.2598279297
-0.2773909718 +0.3961428214

0.5000000000 +0.0000000000 +0.0000000000
-0.5016658951 -0.1863678931
+0.2030765708 +0.0754425466
+0.0667343881 +0.4896170170
-0.0536231650 -0.6477753630
-0.5016658951 -0.1863678931
+0.2030765708 +0.0754425466
-0.0824525790 -0.8055730746
+0.0120769711 -0.1037998419
-0.5016658951 -0.1863678931
+0.2030765708 +0.0754425466
+0.0157181909 +0.3159560576
+0.0415461939 +0.7515752049
-0.3517389385 -0.1306703237
-0.8689108187 -0.3227986598
-0.0000000000 -0.0000000000
+0.0000000000 +0.0000000000

0.5000000000 +0.0000000000 +0.5000000000
-0.1354779321 +0.4812958860
-0.4999902325 +0.0031252907
-0.1317886266 -0.6902445689
+0.0418866180 +0.0666311058
-0.1354779321 +0.4812958860
-0.4999902325 +0.0031252907
+0.1317886266 +0.6902445689
-0.0418866180 -0.0666311058
-0.1354779321 +0.4812958860
+0.4999902325 -0.0031252907
-0.0757650264 -0.0213038449
-0.6993108833 +0.0690658780
-0.1354779321 +0.4812958860
+0.4999902325 -0.0031252907
+0.0757650264 +0.0213038449
+0.6993108833 -0.0690658780

0.5000000000 +0.5000000000 +0.0000000000
0.4595043957 +0.1971185186
-0.2983112338 -0.4012610220
-0.6384297422 +0.3007600988
+0.0100645131 -0.0430061951
+0.4595043957 +0.1971185186
+0.2983112338 +0.4012610220
+0.0441660736 -0.0004303241
+0.4329158459 -0.5573446359
+0.4595043957 +0.1971185186
+0.2983112338 +0.4012610220
-0.0441660736 +0.0004303241
-0.4329158459 +0.5573446359
+0.4595043957 +0.1971185186
-0.2983112338 -0.4012610220
+0.6384297422 -0.3007600988
-0.0100645131 +0.0430061951

0.5000000000 +0.5000000000 +0.5000000000
-0.2804138398 +0.4558176613
-0.1135127613 +0.1845170032
+0.2696754754 +0.6633844965
+0.3920008996 -0.0140751259
-0.1966098699 +0.3195928244
+0.4856910177 -0.7894993483
-0.0000000000 -0.0000000000
-0.0000000000 -0.0000000000
-0.2804138398 +0.4558176613
-0.1135127613 +0.1845170032
+0.1502710963 -0.1470031483
-0.6912892398 +0.3802558686
-0.2804138398 +0.4558176613
-0.1135127613 +0.1845170032
-0.4199465717 -0.5163813481
+0.2992883402 -0.3661807427
130 changes: 130 additions & 0 deletions test-suite/tests/testw90_write_u_matrices/gaas.amn
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
File Created on 18th April 2006
4 8 4
1 1 1 -0.209928418260 -0.150692610940
2 1 1 0.160646512091 -0.175610352974
3 1 1 0.061273697004 -0.204475565040
4 1 1 -0.069145019308 0.220035405420
1 2 1 -0.209928418260 -0.150692610940
2 2 1 -0.348283740362 0.061378871928
3 2 1 0.134857474790 0.020839760039
4 2 1 -0.107059016071 0.016007409171
1 3 1 -0.209928418260 -0.150692610940
2 3 1 0.082913264736 0.033358454797
3 3 1 -0.000904318480 -0.118002527025
4 3 1 0.160041876148 -0.328453073700
1 4 1 -0.209928418260 -0.150692610940
2 4 1 0.104723963534 0.080873026250
3 4 1 -0.195226853315 0.301638332027
4 4 1 0.016162159232 0.092410259109
1 1 2 -0.054941593517 0.272657105324
2 1 2 -0.007353885715 0.036494922400
3 1 2 -0.113932544031 -0.071889221101
4 1 2 -0.080733037019 -0.309932705847
1 2 2 -0.054941593517 0.272657105324
2 2 2 -0.007353885715 0.036494922400
3 2 2 0.301755493239 0.166368213620
4 2 2 0.002763026801 0.044524101334
1 3 2 -0.048592587475 0.241149071095
2 3 2 0.065721947819 -0.326156467280
3 3 2 0.000000000000 0.000000000000
4 3 2 0.000000000000 0.000000000000
1 4 2 -0.054941593517 0.272657105324
2 4 2 -0.007353885715 0.036494922400
3 4 2 -0.187822949209 -0.094478992519
4 4 2 0.077970010218 0.265408604513
1 1 3 -0.010877491031 -0.245755557896
2 1 3 0.014711912529 0.332386785543
3 1 3 0.000000000000 0.000000000000
4 1 3 0.000000000000 0.000000000000
1 2 3 -0.012298721302 -0.277865466073
2 2 3 -0.001646173417 -0.037192057071
3 2 3 -0.132249617046 0.307505884615
4 2 3 -0.002068784172 -0.093116486028
1 3 3 -0.012298721302 -0.277865466073
2 3 3 -0.001646173417 -0.037192057071
3 3 3 0.084716574906 -0.075263668510
4 3 3 0.178990845817 0.275400706920
1 4 3 -0.012298721302 -0.277865466073
2 4 3 -0.001646173417 -0.037192057071
3 4 3 0.047533042140 -0.232242216105
4 4 3 -0.176922061645 -0.182284220893
1 1 4 0.270641227466 0.079962641751
2 1 4 0.129207612438 0.081634048001
3 1 4 -0.178415523603 0.073912924977
4 1 4 0.062786324954 0.196203795171
1 2 4 0.270641227466 0.079962641751
2 2 4 -0.129207612438 -0.081634048001
3 2 4 -0.177967349101 -0.103757768358
4 2 4 0.110771264007 -0.158192751450
1 3 4 0.270641227466 0.079962641751
2 3 4 0.129207612438 0.081634048001
3 3 4 0.178415523603 -0.073912924977
4 3 4 -0.062786324954 -0.196203795171
1 4 4 0.270641227466 0.079962641751
2 4 4 -0.129207612438 -0.081634048001
3 4 4 0.177967349101 0.103757768358
4 4 4 -0.110771264007 0.158192751450
1 1 5 -0.260727221467 -0.096859649843
2 1 5 0.034898117559 0.012964582018
3 1 5 0.028398378399 0.208353290054
4 1 5 -0.022818983958 -0.275656530340
1 2 5 -0.260727221467 -0.096859649843
2 2 5 0.034898117559 0.012964582018
3 2 5 -0.035087150812 -0.342806305004
4 2 5 0.005139275353 -0.044171337611
1 3 5 -0.260727221467 -0.096859649843
2 3 5 0.034898117559 0.012964582018
3 3 5 0.006688772413 0.134453014950
4 3 5 0.017679708605 0.319827867951
1 4 5 -0.230597794954 -0.085666627167
2 4 5 -0.311885763534 -0.115864947584
3 4 5 0.000000000000 0.000000000000
4 4 5 0.000000000000 0.000000000000
1 1 6 -0.076465597008 0.271649978013
2 1 6 -0.152832628339 0.000955311434
3 1 6 -0.052627497762 -0.275637173317
4 1 6 0.016726692963 0.026607974166
1 2 6 -0.076465597008 0.271649978013
2 2 6 -0.152832628339 0.000955311434
3 2 6 0.052627497762 0.275637173317
4 2 6 -0.016726692963 -0.026607974166
1 3 6 -0.076465597008 0.271649978013
2 3 6 0.152832628339 -0.000955311434
3 3 6 -0.030255446607 -0.008507320222
4 3 6 -0.279257648412 0.027580258121
1 4 6 -0.076465597008 0.271649978013
2 4 6 0.152832628339 -0.000955311434
3 4 6 0.030255446607 0.008507320222
4 4 6 0.279257648412 -0.027580258121
1 1 7 0.259350562921 0.111256386750
2 1 7 -0.091185161150 -0.122653949349
3 1 7 -0.254945822731 0.120103318765
4 1 7 0.004019088390 -0.017173776631
1 2 7 0.259350562921 0.111256386750
2 2 7 0.091185161150 0.122653949349
3 2 7 0.017636953972 -0.000171842460
4 2 7 0.172877419714 -0.222565894645
1 3 7 0.259350562921 0.111256386750
2 3 7 0.091185161150 0.122653949349
3 3 7 -0.017636953972 0.000171842460
4 3 7 -0.172877419714 0.222565894645
1 4 7 0.259350562921 0.111256386750
2 4 7 -0.091185161150 -0.122653949349
3 4 7 0.254945822731 -0.120103318765
4 4 7 -0.004019088390 0.017173776631
1 1 8 -0.145737475942 0.236898847375
2 1 8 -0.019506837605 0.031708709888
3 1 8 0.114758618676 0.282298894048
4 1 8 0.166813395585 -0.005989576941
1 2 8 -0.128896171275 0.209523008470
2 2 8 0.174333327012 -0.283381909561
3 2 8 0.000000000000 0.000000000000
4 2 8 0.000000000000 0.000000000000
1 3 8 -0.145737475942 0.236898847375
2 3 8 -0.019506837605 0.031708709888
3 3 8 0.063946873231 -0.062556219535
4 3 8 -0.294173573400 0.161815375149
1 4 8 -0.145737475942 0.236898847375
2 4 8 -0.019506837605 0.031708709888
3 4 8 -0.178705491908 -0.219742674513
4 4 8 0.127360177815 -0.155825798208
Loading