-
Notifications
You must be signed in to change notification settings - Fork 0
/
master_fixes.txt
48 lines (42 loc) · 1.63 KB
/
master_fixes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Fixes done on upstream QE to make it run
# compute_mmn
* Bug introduced in commit 6bde39407
mmn should be symmetric in the gamma_only case (see Sec. 3.3 of Mostofi et al 2008),
but symmetrization is not done for the uspp part.
# write_parity
diff --git a/PP/src/pw2wannier90.f90 b/PP/src/pw2wannier90.f90
index 46d35a34f..9e170f770 100644
--- a/PP/src/pw2wannier90.f90
+++ b/PP/src/pw2wannier90.f90
@@ -4823,6 +4823,7 @@ SUBROUTINE write_parity
USE gvect, ONLY : g, ngm
USE cell_base, ONLY : at
USE constants, ONLY : eps6
+ USE lsda_mod, ONLY : isk
IMPLICIT NONE
!
@@ -4844,19 +4845,15 @@ SUBROUTINE write_parity
!
IF (.not. gamma_only) THEN
DO ik=ikstart,ikstop
- IF ( (xk(1,ik)/= 0.d0) .or. (xk(2,ik)/= 0.d0) .or. (xk(3,ik)/= 0.d0) ) THEN
- IF (ik == ikstop) CALL errore('write_parity',&
- ' parity calculation may only be performed at the gamma point.',1)
+ IF ( (xk(1,ik)/= 0.d0) .or. (xk(2,ik)/= 0.d0) .or. (xk(3,ik)/= 0.d0) &
+ .or. (ispinw /= 0 .and. isk(ik) /= ispinw) ) THEN
CYCLE
ELSE
- ! NP: spin unpolarized or "up" component of spin
- IF (ispinw == 0 .or. ispinw == 1) THEN
- kgamma=ik
- ELSE ! NP: "down" component
- kgamma=ik+1
- ENDIF
+ kgamma=ik
exit
ENDIF
+ IF (ik == ikstop) CALL errore('write_parity',&
+ ' parity calculation may only be performed at the gamma point.',1)
ENDDO
ELSE
! NP: spin unpolarized or "up" component of spin