Skip to content

Commit

Permalink
Merge pull request wannier-developers#132 from wannier-developers/fix…
Browse files Browse the repository at this point in the history
…_130_gamma_problem

Fix 130 gamma problem
  • Loading branch information
jryates authored Apr 3, 2017
2 parents 5557707 + 6dbd86b commit bc2bbdb
Show file tree
Hide file tree
Showing 12 changed files with 2,080 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ make.inc
w90chk2chk.x
libwannier.a
*~
*.x.dSYM
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@ clean:
$(MAKE) -C $(ROOTDIR)/doc/tutorial clean
$(MAKE) -C $(ROOTDIR)/utility/w90pov clean
$(MAKE) -C $(ROOTDIR)/utility/w90vdw clean
$(MAKE) -C $(ROOTDIR)/test-suite clean
cd $(ROOTDIR)/test-suite && ./clean_tests

veryclean: clean
cd $(ROOTDIR) && rm -f wannier90.x postw90.x libwannier.a
cd $(ROOTDIR)/doc && rm -f user_guide.pdf tutorial.pdf
cd $(ROOTDIR)/doc/user_guide && rm -f user_guide.ps
cd $(ROOTDIR)/doc/tutorial && rm -f tutorial.ps
cd $(ROOTDIR)/test-suite && ./clean_tests -i

thedoc:
$(MAKE) -C $(ROOTDIR)/doc/user_guide
Expand Down
4 changes: 4 additions & 0 deletions src/wannierise.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2515,6 +2515,10 @@ subroutine wann_main_gamma

cz=cmplx_0

! Set up the MPI arrays for a serial run.
allocate( counts(0:0), displs(0:0), stat=ierr )
if (ierr/=0) call io_error('Error in allocating counts and displs in wann_main_gamma')
counts(0)=0; displs(0)=0
! store original U before rotating
!~ ! phase factor ph_g is applied to u_matrix
!~ ! NB: ph_g is applied to u_matrix_opt if (have_disentangled)
Expand Down
12 changes: 6 additions & 6 deletions test-suite/clean_tests
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ def get_valid_categories():

config = configparser.ConfigParser()
config.read(jobconfig)
all_sections = config.values()
all_sections = config.sections()
retlist = []
for section in all_sections:
if section.name == 'categories':
for section_name in all_sections:
if section_name == 'categories':
# Append categories as well
for category in section.keys():
for category in config.options(section_name):
retlist.append(category)
elif section.name == "DEFAULT":
elif section_name == "DEFAULT":
pass
else:
retlist.append(strip_slash(section.name))
retlist.append(strip_slash(section_name))

return sorted(set(retlist)) # Remove duplicates, sort

Expand Down
12 changes: 6 additions & 6 deletions test-suite/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ def get_valid_categories():

config = configparser.ConfigParser()
config.read(jobconfig)
all_sections = config.values()
all_sections = config.sections()
retlist = []
for section in all_sections:
if section.name == 'categories':
for section_name in all_sections:
if section_name == 'categories':
# Append categories as well
for category in section.keys():
for category in config.options(section_name):
retlist.append((category,False))
elif section.name == "DEFAULT":
elif section_name == "DEFAULT":
pass
else:
retlist.append((strip_slash(section.name),True))
retlist.append((strip_slash(section_name),True))

return sorted(set(retlist)) # Remove duplicates, sort

Expand Down
8 changes: 8 additions & 0 deletions test-suite/tests/jobconfig
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ output = benzene.wout
# This is a gamma-only test, can only run in serial
max_nprocs = 0

# Benzene, valence bands - in hexagonal cell
[testw90_benzene_gamma_val_hexcell/]
program = WANNIER90_WOUT_OK
inputs_args = ('benzene.win', '')
output = benzene.wout
# This is a gamma-only test, can only run in serial
max_nprocs = 0

# Test of disentanglement in spheres in k-space
[testw90_lavo3_dissphere/]
program = WANNIER90_WOUT_OK
Expand Down
4 changes: 2 additions & 2 deletions test-suite/tests/testw90_benzene_gamma_val/benzene.win
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ num_iter = 100
conv_tol = 1e-10
conv_window = 5

translate_home_cell=true
#translate_home_cell=true

guiding_centres = true

iprint = 2
#iprint = 4

## Plotting #################
#restart = plot
Expand Down

Large diffs are not rendered by default.

227 changes: 227 additions & 0 deletions test-suite/tests/testw90_benzene_gamma_val_hexcell/benzene.amn
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
Created on 2Apr2017 at 20:37:27
15 1 15
1 1 1 0.275811314789 0.000000000000
2 1 1 -0.209388960107 0.000000000000
3 1 1 -0.130787527533 0.000000000000
4 1 1 0.105559017138 0.000000000000
5 1 1 0.054194566915 0.000000000000
6 1 1 0.027634915941 0.000000000000
7 1 1 -0.006533782945 0.000000000000
8 1 1 -0.049816100368 0.000000000000
9 1 1 0.002596834996 0.000000000000
10 1 1 0.000834778624 0.000000000000
11 1 1 0.293543013177 0.000000000000
12 1 1 -0.013752802639 0.000000000000
13 1 1 0.020599928382 0.000000000000
14 1 1 0.177103527475 0.000000000000
15 1 1 0.222312312494 0.000000000000
1 2 1 0.001341864195 0.000000000000
2 2 1 0.000409121074 0.000000000000
3 2 1 -0.002171001638 0.000000000000
4 2 1 -0.000950902195 0.000000000000
5 2 1 -0.001993814775 0.000000000000
6 2 1 0.003127697084 0.000000000000
7 2 1 0.001196284814 0.000000000000
8 2 1 0.000928099588 0.000000000000
9 2 1 0.000768575164 0.000000000000
10 2 1 -0.003939176677 0.000000000000
11 2 1 0.004356315274 0.000000000000
12 2 1 -0.002145652249 0.000000000000
13 2 1 0.002131170778 0.000000000000
14 2 1 0.007300089718 0.000000000000
15 2 1 -0.002147984028 0.000000000000
1 3 1 0.001024768707 0.000000000000
2 3 1 0.000208643791 0.000000000000
3 3 1 -0.000146963619 0.000000000000
4 3 1 0.000407361892 0.000000000000
5 3 1 -0.000244512906 0.000000000000
6 3 1 0.004263395047 0.000000000000
7 3 1 -0.000000864887 0.000000000000
8 3 1 0.001745446029 0.000000000000
9 3 1 0.000497380649 0.000000000000
10 3 1 -0.000358516168 0.000000000000
11 3 1 -0.002303135819 0.000000000000
12 3 1 -0.000430834428 0.000000000000
13 3 1 -0.000635833151 0.000000000000
14 3 1 -0.000252288695 0.000000000000
15 3 1 0.000463186710 0.000000000000
1 4 1 0.002291344036 0.000000000000
2 4 1 0.002572689339 0.000000000000
3 4 1 0.001373640193 0.000000000000
4 4 1 0.003389067214 0.000000000000
5 4 1 0.001354653199 0.000000000000
6 4 1 0.008044287248 0.000000000000
7 4 1 0.000321176394 0.000000000000
8 4 1 0.003186013828 0.000000000000
9 4 1 0.005742352030 0.000000000000
10 4 1 0.003000359494 0.000000000000
11 4 1 -0.003326125533 0.000000000000
12 4 1 0.000931585549 0.000000000000
13 4 1 -0.004618314009 0.000000000000
14 4 1 0.002265056183 0.000000000000
15 4 1 0.003349961215 0.000000000000
1 5 1 0.006881501639 0.000000000000
2 5 1 0.005720250796 0.000000000000
3 5 1 -0.008185226254 0.000000000000
4 5 1 -0.015199149012 0.000000000000
5 5 1 -0.007905268173 0.000000000000
6 5 1 0.020865657056 0.000000000000
7 5 1 0.013450365078 0.000000000000
8 5 1 -0.001996919424 0.000000000000
9 5 1 0.011874686776 0.000000000000
10 5 1 -0.018215036307 0.000000000000
11 5 1 -0.008048497970 0.000000000000
12 5 1 -0.015789017770 0.000000000000
13 5 1 0.028816001302 0.000000000000
14 5 1 -0.008249143742 0.000000000000
15 5 1 0.007520114512 0.000000000000
1 6 1 0.005634204956 0.000000000000
2 6 1 -0.003220481928 0.000000000000
3 6 1 0.008857206239 0.000000000000
4 6 1 -0.007251550872 0.000000000000
5 6 1 -0.007718073460 0.000000000000
6 6 1 0.013082155477 0.000000000000
7 6 1 -0.009100434155 0.000000000000
8 6 1 -0.002399860671 0.000000000000
9 6 1 -0.006242042200 0.000000000000
10 6 1 0.015940893566 0.000000000000
11 6 1 -0.011333297947 0.000000000000
12 6 1 -0.008685699118 0.000000000000
13 6 1 0.013861171319 0.000000000000
14 6 1 0.017406075962 0.000000000000
15 6 1 -0.008425749048 0.000000000000
1 7 1 0.000694200106 0.000000000000
2 7 1 0.000209922945 0.000000000000
3 7 1 -0.000441123575 0.000000000000
4 7 1 -0.000252932741 0.000000000000
5 7 1 0.001180679024 0.000000000000
6 7 1 0.002766877686 0.000000000000
7 7 1 -0.000087520181 0.000000000000
8 7 1 -0.001050259947 0.000000000000
9 7 1 0.000465480969 0.000000000000
10 7 1 -0.001064420003 0.000000000000
11 7 1 0.002162670310 0.000000000000
12 7 1 0.002357852840 0.000000000000
13 7 1 0.000166808763 0.000000000000
14 7 1 0.001287326836 0.000000000000
15 7 1 -0.000733521106 0.000000000000
1 8 1 0.007897312585 0.000000000000
2 8 1 0.009142995183 0.000000000000
3 8 1 -0.000262478257 0.000000000000
4 8 1 -0.001090414434 0.000000000000
5 8 1 0.021217497314 0.000000000000
6 8 1 0.025558216581 0.000000000000
7 8 1 -0.013598839154 0.000000000000
8 8 1 -0.000372334333 0.000000000000
9 8 1 0.020892025537 0.000000000000
10 8 1 -0.000701515930 0.000000000000
11 8 1 -0.005745266778 0.000000000000
12 8 1 0.042704528450 0.000000000000
13 8 1 -0.000590564903 0.000000000000
14 8 1 0.000503110283 0.000000000000
15 8 1 0.006205841950 0.000000000000
1 9 1 0.016574729830 0.000000000000
2 9 1 0.017219213087 0.000000000000
3 9 1 -0.019328715766 0.000000000000
4 9 1 -0.023332711726 0.000000000000
5 9 1 -0.004460909256 0.000000000000
6 9 1 0.027210239526 0.000000000000
7 9 1 0.017650969067 0.000000000000
8 9 1 -0.007003478580 0.000000000000
9 9 1 0.021721632334 0.000000000000
10 9 1 -0.027167845968 0.000000000000
11 9 1 0.030282304502 0.000000000000
12 9 1 -0.010623572224 0.000000000000
13 9 1 0.022487354394 0.000000000000
14 9 1 0.032182170203 0.000000000000
15 9 1 -0.036289498256 0.000000000000
1 10 1 0.061413164768 0.000000000000
2 10 1 -0.083910123009 0.000000000000
3 10 1 0.039013553191 0.000000000000
4 10 1 -0.058346065013 0.000000000000
5 10 1 0.050097515371 0.000000000000
6 10 1 0.081251102171 0.000000000000
7 10 1 0.021002543067 0.000000000000
8 10 1 0.038940996491 0.000000000000
9 10 1 -0.083831967768 0.000000000000
10 10 1 0.036030787790 0.000000000000
11 10 1 -0.074721812746 0.000000000000
12 10 1 0.031071894680 0.000000000000
13 10 1 0.009932684109 0.000000000000
14 10 1 0.035132436504 0.000000000000
15 10 1 -0.105267681703 0.000000000000
1 11 1 0.000142511638 0.000000000000
2 11 1 0.000179941049 0.000000000000
3 11 1 -0.000169410681 0.000000000000
4 11 1 -0.000297636997 0.000000000000
5 11 1 -0.000032691683 0.000000000000
6 11 1 0.000490136043 0.000000000000
7 11 1 0.000173901199 0.000000000000
8 11 1 -0.000131221984 0.000000000000
9 11 1 0.000448119676 0.000000000000
10 11 1 -0.000424781199 0.000000000000
11 11 1 0.000462979096 0.000000000000
12 11 1 -0.000168762285 0.000000000000
13 11 1 0.000606500691 0.000000000000
14 11 1 0.000468721284 0.000000000000
15 11 1 -0.000651994657 0.000000000000
1 12 1 0.000291282497 0.000000000000
2 12 1 -0.000468558982 0.000000000000
3 12 1 -0.000144469904 0.000000000000
4 12 1 0.000235191552 0.000000000000
5 12 1 0.000469462360 0.000000000000
6 12 1 0.000802138898 0.000000000000
7 12 1 0.000309789154 0.000000000000
8 12 1 -0.000219947694 0.000000000000
9 12 1 -0.001014180448 0.000000000000
10 12 1 -0.000285983065 0.000000000000
11 12 1 0.001264584250 0.000000000000
12 12 1 0.000872578702 0.000000000000
13 12 1 -0.000256530358 0.000000000000
14 12 1 0.000913080514 0.000000000000
15 12 1 0.002020767535 0.000000000000
1 13 1 0.004104993348 0.000000000000
2 13 1 0.002019928407 0.000000000000
3 13 1 0.001153793984 0.000000000000
4 13 1 0.000559278645 0.000000000000
5 13 1 0.000346248265 0.000000000000
6 13 1 0.001451130964 0.000000000000
7 13 1 0.000002738499 0.000000000000
8 13 1 0.000118978188 0.000000000000
9 13 1 0.001103581269 0.000000000000
10 13 1 0.000616449683 0.000000000000
11 13 1 0.013395092403 0.000000000000
12 13 1 0.000148565036 0.000000000000
13 13 1 -0.000277162536 0.000000000000
14 13 1 -0.005232874098 0.000000000000
15 13 1 -0.007148516150 0.000000000000
1 14 1 0.008321671998 0.000000000000
2 14 1 0.011038911293 0.000000000000
3 14 1 -0.003276570134 0.000000000000
4 14 1 -0.005331078338 0.000000000000
5 14 1 0.019668578850 0.000000000000
6 14 1 0.026578181957 0.000000000000
7 14 1 -0.013475358133 0.000000000000
8 14 1 -0.006348136047 0.000000000000
9 14 1 0.024675342581 0.000000000000
10 14 1 -0.006134481437 0.000000000000
11 14 1 -0.000898542638 0.000000000000
12 14 1 0.037529091883 0.000000000000
13 14 1 0.000820697517 0.000000000000
14 14 1 -0.000253097149 0.000000000000
15 14 1 0.001168698044 0.000000000000
1 15 1 0.000106261632 0.000000000000
2 15 1 -0.000020564591 0.000000000000
3 15 1 -0.000083953938 0.000000000000
4 15 1 0.000267187218 0.000000000000
5 15 1 -0.000163523409 0.000000000000
6 15 1 0.000468553429 0.000000000000
7 15 1 -0.000094460804 0.000000000000
8 15 1 0.000073638909 0.000000000000
9 15 1 -0.000048039358 0.000000000000
10 15 1 -0.000226017405 0.000000000000
11 15 1 0.000523319534 0.000000000000
12 15 1 -0.000468956875 0.000000000000
13 15 1 -0.000759849139 0.000000000000
14 15 1 0.000399895392 0.000000000000
15 15 1 0.000020398240 0.000000000000
15 changes: 15 additions & 0 deletions test-suite/tests/testw90_benzene_gamma_val_hexcell/benzene.eig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
1 1 -20.577131703476
2 1 -17.805232753380
3 1 -17.804474624996
4 1 -14.212144948284
5 1 -14.211915007306
6 1 -12.300230556694
7 1 -10.604849769019
8 1 -10.287482956257
9 1 -9.626357674793
10 1 -9.625811509993
11 1 -8.450052536389
12 1 -7.637890186861
13 1 -7.635791160864
14 1 -5.723161929118
15 1 -5.723112559787
Loading

0 comments on commit bc2bbdb

Please sign in to comment.