Merge lp:~nickpapior/siesta/4.1-superc-gamma into lp:~albertog/siesta/4.1-superc-gamma
- 4.1-superc-gamma
- Merge into 4.1-superc-gamma
Proposed by
Nick Papior
Status: | Merged |
---|---|
Merged at revision: | 932 |
Proposed branch: | lp:~nickpapior/siesta/4.1-superc-gamma |
Merge into: | lp:~albertog/siesta/4.1-superc-gamma |
Diff against target: |
698 lines (+53/-89) 27 files modified
Src/Makefile (+1/-1) Src/bands.F (+1/-5) Src/compute_dm.F (+5/-10) Src/diag2g.F (+4/-4) Src/diag3g.F (+4/-4) Src/diagg.F (+4/-4) Src/diagon.F (+3/-4) Src/intrinsic_missing.F90 (+1/-22) Src/local_DOS.F (+1/-1) Src/m_transiesta.F90 (+3/-3) Src/pdos.F (+3/-4) Src/post_scf_work.F (+2/-5) Src/projected_DOS.F (+3/-2) Src/siesta_analysis.F (+3/-4) Src/writewave.F (+3/-4) Util/COOP/Makefile (+1/-1) Util/Denchar/Src/Makefile (+1/-1) Util/Gen-basis/Makefile (+1/-1) Util/Grimme/Makefile (+1/-1) Util/Helpers/Makefile (+1/-1) Util/STM/ol-stm/Src/Makefile (+1/-1) Util/SpPivot/Makefile (+1/-1) Util/TS/TBtrans/Makefile (+1/-1) Util/TS/ts2ts/Makefile (+1/-1) Util/TS/tshs2tshs/Makefile (+1/-1) Util/VCA/Makefile (+1/-1) version.info (+1/-1) |
To merge this branch: | bzr merge lp:~nickpapior/siesta/4.1-superc-gamma |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Garcia | Pending | ||
Review via email: mp+348462@code.launchpad.net |
Commit message
Reinsert the Gamma variable in sub-routines for clarity.
Description of the change
I have reworked the patch to also include the Gamma variables for the corresponding k-point lists.
This should make it easier to follow the combinations.
I have also changed the keywords in transiesta, for clarity.
To post a comment you must log in.
Revision history for this message
Alberto Garcia (albertog) wrote : | # |
Revision history for this message
Nick Papior (nickpapior) wrote : | # |
Sorry for changing the m_dminim call. I can now see that you are correct, if a supercell is used, then OMM should use zminim.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Src/Makefile' | |||
2 | --- Src/Makefile 2018-06-20 10:34:33 +0000 | |||
3 | +++ Src/Makefile 2018-06-25 11:35:23 +0000 | |||
4 | @@ -967,7 +967,7 @@ | |||
5 | 967 | m_ts_electrode.o: precision.o sys.o units.o | 967 | m_ts_electrode.o: precision.o sys.o units.o |
6 | 968 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 968 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
7 | 969 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 969 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
9 | 970 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 970 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
10 | 971 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 971 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
11 | 972 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 972 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
12 | 973 | m_ts_electype.o: units.o | 973 | m_ts_electype.o: units.o |
13 | 974 | 974 | ||
14 | === modified file 'Src/bands.F' | |||
15 | --- Src/bands.F 2018-06-12 22:59:08 +0000 | |||
16 | +++ Src/bands.F 2018-06-25 11:35:23 +0000 | |||
17 | @@ -395,7 +395,6 @@ | |||
18 | 395 | integer :: ik, il, io, ispin, iu, iu_wfs, iuo, naux, nhs, j | 395 | integer :: ik, il, io, ispin, iu, iu_wfs, iuo, naux, nhs, j |
19 | 396 | 396 | ||
20 | 397 | logical :: SaveParallelOverK | 397 | logical :: SaveParallelOverK |
21 | 398 | logical :: gamma | ||
22 | 399 | 398 | ||
23 | 400 | real(dp) | 399 | real(dp) |
24 | 401 | . Dnew, qs(2), e1, e2, efs(2), emax, emin, Enew, eV, qk, qtot, | 400 | . Dnew, qs(2), e1, e2, efs(2), emax, emin, Enew, eV, qk, qtot, |
25 | @@ -419,9 +418,6 @@ | |||
26 | 419 | C Start time counter | 418 | C Start time counter |
27 | 420 | call timer( 'bands', 1 ) | 419 | call timer( 'bands', 1 ) |
28 | 421 | 420 | ||
29 | 422 | ! This routine always uses diag*k routines | ||
30 | 423 | gamma = .false. | ||
31 | 424 | |||
32 | 425 | C Check parameter maxk | 421 | C Check parameter maxk |
33 | 426 | if (nk .gt. maxk) then | 422 | if (nk .gt. maxk) then |
34 | 427 | if (Node.eq.0) then | 423 | if (Node.eq.0) then |
35 | @@ -451,7 +447,7 @@ | |||
36 | 451 | 447 | ||
37 | 452 | rewind (iu_wfs) | 448 | rewind (iu_wfs) |
38 | 453 | 449 | ||
40 | 454 | write(iu_wfs) nk, gamma | 450 | write(iu_wfs) nk, .false. ! nk, Gamma, same file-format in WFS as for Gamma-point |
41 | 455 | write(iu_wfs) nspin | 451 | write(iu_wfs) nspin |
42 | 456 | write(iu_wfs) no_u | 452 | write(iu_wfs) no_u |
43 | 457 | write(iu_wfs) (iaorb(j),labelfis(isa(iaorb(j))), | 453 | write(iu_wfs) (iaorb(j),labelfis(isa(iaorb(j))), |
44 | 458 | 454 | ||
45 | === modified file 'Src/compute_dm.F' | |||
46 | --- Src/compute_dm.F 2018-06-20 10:40:25 +0000 | |||
47 | +++ Src/compute_dm.F 2018-06-25 11:35:23 +0000 | |||
48 | @@ -66,8 +66,6 @@ | |||
49 | 66 | real(dp) :: buffer1 | 66 | real(dp) :: buffer1 |
50 | 67 | integer :: mpierr | 67 | integer :: mpierr |
51 | 68 | 68 | ||
52 | 69 | logical :: not_using_auxcell | ||
53 | 70 | |||
54 | 71 | !-------------------------------------------------------------------- BEGIN | 69 | !-------------------------------------------------------------------- BEGIN |
55 | 72 | 70 | ||
56 | 73 | if (SIESTA_worker) call timer( 'compute_dm', 1 ) | 71 | if (SIESTA_worker) call timer( 'compute_dm', 1 ) |
57 | @@ -92,8 +90,6 @@ | |||
58 | 92 | !$OMP end parallel | 90 | !$OMP end parallel |
59 | 93 | end if | 91 | end if |
60 | 94 | 92 | ||
61 | 95 | not_using_auxcell = (no_u == no_s) | ||
62 | 96 | |||
63 | 97 | ! Compute shift in Tr(H*DM) for fermi-level bracketting | 93 | ! Compute shift in Tr(H*DM) for fermi-level bracketting |
64 | 98 | ! Use the current H, the previous iteration H, and the | 94 | ! Use the current H, the previous iteration H, and the |
65 | 99 | ! previous iteration DM | 95 | ! previous iteration DM |
66 | @@ -178,14 +174,13 @@ | |||
67 | 178 | & no_l, maxnh, maxnh, no_u, | 174 | & no_l, maxnh, maxnh, no_u, |
68 | 179 | & numh, listhptr, listh, numh, listhptr, listh, | 175 | & numh, listhptr, listh, numh, listhptr, listh, |
69 | 180 | & H, S, qtot, fixspin, qtots, temp, e1, e2, | 176 | & H, S, qtot, fixspin, qtots, temp, e1, e2, |
71 | 181 | $ xijo, indxuo, nkpnt, kpoint, kweight, | 177 | $ xijo, indxuo, gamma_SCF, nkpnt, kpoint, kweight, |
72 | 182 | & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u, | 178 | & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u, |
73 | 183 | & occtol, iscf, neigwanted) | 179 | & occtol, iscf, neigwanted) |
74 | 184 | Ecorrec = 0.0_dp | 180 | Ecorrec = 0.0_dp |
75 | 185 | PreviousCallDiagon=.true. | 181 | PreviousCallDiagon=.true. |
76 | 186 | elseif (isolve .eq. SOLVE_ORDERN) then | 182 | elseif (isolve .eq. SOLVE_ORDERN) then |
79 | 187 | if ((nkpnt > 1) .or. (sum(abs(kpoint(:,1))) /= 0.0)) | 183 | if ( .not. gamma_SCF ) call die("Cannot do O(N) with k-points.") |
78 | 188 | $ call die("Cannot do O(N) with k-points.") | ||
80 | 189 | if ( spin%NCol .or. spin%SO ) | 184 | if ( spin%NCol .or. spin%SO ) |
81 | 190 | . call die("Cannot do O(N) with non-coll spins or Spin-orbit") | 185 | . call die("Cannot do O(N) with non-coll spins or Spin-orbit") |
82 | 191 | call ordern(usesavelwf, ioptlwf, na_u, no_u, no_l, lasto, | 186 | call ordern(usesavelwf, ioptlwf, na_u, no_u, no_l, lasto, |
83 | @@ -204,7 +199,7 @@ | |||
84 | 204 | ! Test based on use of auxiliary supercell | 199 | ! Test based on use of auxiliary supercell |
85 | 205 | ! It might still be possible to avoid the complex version | 200 | ! It might still be possible to avoid the complex version |
86 | 206 | 201 | ||
88 | 207 | if (not_using_auxcell) then | 202 | if ( gamma_SCF ) then |
89 | 208 | call dminim(.false., PreviousCallDiagon, iscf, istp, no_l, | 203 | call dminim(.false., PreviousCallDiagon, iscf, istp, no_l, |
90 | 209 | & spin%H, no_u, maxnh, numh, listhptr, listh, Dscf, | 204 | & spin%H, no_u, maxnh, numh, listhptr, listh, Dscf, |
91 | 210 | & eta, qtots, H, S, H_kin) | 205 | & eta, qtots, H, S, H_kin) |
92 | @@ -222,7 +217,7 @@ | |||
93 | 222 | & no_l, maxnh, maxnh, no_u, | 217 | & no_l, maxnh, maxnh, no_u, |
94 | 223 | & numh, listhptr, listh, numh, listhptr, listh, | 218 | & numh, listhptr, listh, numh, listhptr, listh, |
95 | 224 | & H, S, qtot, fixspin, qtots, temp, e1, e2, | 219 | & H, S, qtot, fixspin, qtots, temp, e1, e2, |
97 | 225 | $ xijo, indxuo, nkpnt, kpoint, kweight, | 220 | $ xijo, indxuo, gamma_SCF, nkpnt, kpoint, kweight, |
98 | 226 | & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u, | 221 | & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u, |
99 | 227 | & occtol, iscf, neigwanted) | 222 | & occtol, iscf, neigwanted) |
100 | 228 | 223 | ||
101 | @@ -231,7 +226,7 @@ | |||
102 | 231 | else if (TSrun) then | 226 | else if (TSrun) then |
103 | 232 | 227 | ||
104 | 233 | call transiesta(iscf,spin%H, block_dist, sparse_pattern, | 228 | call transiesta(iscf,spin%H, block_dist, sparse_pattern, |
106 | 234 | & Not_Using_Auxcell, ucell, nsc, isc_off, no_u, na_u, | 229 | & no_u == no_s, ucell, nsc, isc_off, no_u, na_u, |
107 | 235 | & lasto, xa, maxnh, | 230 | & lasto, xa, maxnh, |
108 | 236 | & H, S, Dscf, Escf, Ef, Qtot, .false., DE_NEGF ) | 231 | & H, S, Dscf, Escf, Ef, Qtot, .false., DE_NEGF ) |
109 | 237 | 232 | ||
110 | 238 | 233 | ||
111 | === modified file 'Src/diag2g.F' | |||
112 | --- Src/diag2g.F 2018-06-20 10:34:33 +0000 | |||
113 | +++ Src/diag2g.F 2018-06-25 11:35:23 +0000 | |||
114 | @@ -20,7 +20,7 @@ | |||
115 | 20 | use parallel, only : Node, Nodes, BlockSize | 20 | use parallel, only : Node, Nodes, BlockSize |
116 | 21 | use parallelsubs, only : LocalToGlobalOrb,GlobalToLocalOrb | 21 | use parallelsubs, only : LocalToGlobalOrb,GlobalToLocalOrb |
117 | 22 | use m_fermid, only : fermid, stepf | 22 | use m_fermid, only : fermid, stepf |
119 | 23 | use intrinsic_missing, only: MODP1 | 23 | use intrinsic_missing, only: MODP |
120 | 24 | 24 | ||
121 | 25 | #ifdef MPI | 25 | #ifdef MPI |
122 | 26 | use mpi_siesta | 26 | use mpi_siesta |
123 | @@ -163,7 +163,7 @@ | |||
124 | 163 | do j = 1,numh(io) | 163 | do j = 1,numh(io) |
125 | 164 | ind = listhptr(io) + j | 164 | ind = listhptr(io) + j |
126 | 165 | jo = listh(ind) | 165 | jo = listh(ind) |
128 | 166 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 166 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
129 | 167 | Saux(1,jo,1,io) = Saux(1,jo,1,io) + dcmplx( S(ind), 0.0_dp) | 167 | Saux(1,jo,1,io) = Saux(1,jo,1,io) + dcmplx( S(ind), 0.0_dp) |
130 | 168 | Saux(2,jo,2,io) = Saux(2,jo,2,io) + dcmplx( S(ind), 0.0_dp) | 168 | Saux(2,jo,2,io) = Saux(2,jo,2,io) + dcmplx( S(ind), 0.0_dp) |
131 | 169 | Haux(1,jo,1,io) = Haux(1,jo,1,io) + dcmplx(H(ind,1), 0.0_dp) | 169 | Haux(1,jo,1,io) = Haux(1,jo,1,io) + dcmplx(H(ind,1), 0.0_dp) |
132 | @@ -189,7 +189,7 @@ | |||
133 | 189 | do j = 1,numh(io) | 189 | do j = 1,numh(io) |
134 | 190 | ind = listhptr(io) + j | 190 | ind = listhptr(io) + j |
135 | 191 | jo = listh(ind) | 191 | jo = listh(ind) |
137 | 192 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 192 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
138 | 193 | Saux(1,jo,1,io) = Saux(1,jo,1,io) +dcmplx( S(ind), 0.0_dp) | 193 | Saux(1,jo,1,io) = Saux(1,jo,1,io) +dcmplx( S(ind), 0.0_dp) |
139 | 194 | Saux(2,jo,2,io) = Saux(2,jo,2,io) +dcmplx( S(ind), 0.0_dp) | 194 | Saux(2,jo,2,io) = Saux(2,jo,2,io) +dcmplx( S(ind), 0.0_dp) |
140 | 195 | Haux(1,jo,1,io) = Haux(1,jo,1,io) +dcmplx(H(ind,1), 0.0_dp) | 195 | Haux(1,jo,1,io) = Haux(1,jo,1,io) +dcmplx(H(ind,1), 0.0_dp) |
141 | @@ -269,7 +269,7 @@ | |||
142 | 269 | do j = 1,numd(io) | 269 | do j = 1,numd(io) |
143 | 270 | ind = listdptr(io) + j | 270 | ind = listdptr(io) + j |
144 | 271 | jo = listd(ind) | 271 | jo = listd(ind) |
146 | 272 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 272 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
147 | 273 | 273 | ||
148 | 274 | ! | ------- 1,1 ------- ------- 2,1 ------- | | 274 | ! | ------- 1,1 ------- ------- 2,1 ------- | |
149 | 275 | ! | c_{j,up}^* c_{i,up} c_{j,dn}^* c_{i,up) | | 275 | ! | c_{j,up}^* c_{i,up} c_{j,dn}^* c_{i,up) | |
150 | 276 | 276 | ||
151 | === modified file 'Src/diag3g.F' | |||
152 | --- Src/diag3g.F 2018-06-20 10:34:33 +0000 | |||
153 | +++ Src/diag3g.F 2018-06-25 11:35:23 +0000 | |||
154 | @@ -17,7 +17,7 @@ | |||
155 | 17 | use parallel, only : Node, Nodes, BlockSize | 17 | use parallel, only : Node, Nodes, BlockSize |
156 | 18 | use parallelsubs, only : LocalToGlobalOrb,GlobalToLocalOrb | 18 | use parallelsubs, only : LocalToGlobalOrb,GlobalToLocalOrb |
157 | 19 | use m_fermid, only : fermid, stepf | 19 | use m_fermid, only : fermid, stepf |
159 | 20 | use intrinsic_missing, only: MODP1 | 20 | use intrinsic_missing, only: MODP |
160 | 21 | #ifdef MPI | 21 | #ifdef MPI |
161 | 22 | use mpi_siesta | 22 | use mpi_siesta |
162 | 23 | #endif | 23 | #endif |
163 | @@ -155,7 +155,7 @@ | |||
164 | 155 | do j = 1,numh(io) | 155 | do j = 1,numh(io) |
165 | 156 | ind = listhptr(io) + j | 156 | ind = listhptr(io) + j |
166 | 157 | jo = listh(ind) | 157 | jo = listh(ind) |
168 | 158 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 158 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
169 | 159 | Saux(1,jo,1,io) = Saux(1,jo,1,io) + dcmplx( S(ind), 0.0_dp) | 159 | Saux(1,jo,1,io) = Saux(1,jo,1,io) + dcmplx( S(ind), 0.0_dp) |
170 | 160 | Saux(2,jo,2,io) = Saux(2,jo,2,io) + dcmplx( S(ind), 0.0_dp) | 160 | Saux(2,jo,2,io) = Saux(2,jo,2,io) + dcmplx( S(ind), 0.0_dp) |
171 | 161 | Haux(1,jo,1,io) = Haux(1,jo,1,io) + dcmplx(H(ind,1), H(ind,5)) | 161 | Haux(1,jo,1,io) = Haux(1,jo,1,io) + dcmplx(H(ind,1), H(ind,5)) |
172 | @@ -180,7 +180,7 @@ | |||
173 | 180 | do j = 1,numh(io) | 180 | do j = 1,numh(io) |
174 | 181 | ind = listhptr(io) + j | 181 | ind = listhptr(io) + j |
175 | 182 | jo = listh(ind) | 182 | jo = listh(ind) |
177 | 183 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 183 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
178 | 184 | Saux(1,jo,1,io) = Saux(1,jo,1,io) + dcmplx( S(ind), 0.0_dp) | 184 | Saux(1,jo,1,io) = Saux(1,jo,1,io) + dcmplx( S(ind), 0.0_dp) |
179 | 185 | Saux(2,jo,2,io) = Saux(2,jo,2,io) + dcmplx( S(ind), 0.0_dp) | 185 | Saux(2,jo,2,io) = Saux(2,jo,2,io) + dcmplx( S(ind), 0.0_dp) |
180 | 186 | Haux(1,jo,1,io) = Haux(1,jo,1,io) + dcmplx(H(ind,1), H(ind,5)) | 186 | Haux(1,jo,1,io) = Haux(1,jo,1,io) + dcmplx(H(ind,1), H(ind,5)) |
181 | @@ -264,7 +264,7 @@ | |||
182 | 264 | do j = 1,numd(io) | 264 | do j = 1,numd(io) |
183 | 265 | ind = listdptr(io) + j | 265 | ind = listdptr(io) + j |
184 | 266 | jo = listd(ind) | 266 | jo = listd(ind) |
186 | 267 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 267 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
187 | 268 | !------- 1,1 ----------------------------------------------------------- | 268 | !------- 1,1 ----------------------------------------------------------- |
188 | 269 | D11 = caux(1,iio) * dconjg(caux(1,jo)) | 269 | D11 = caux(1,iio) * dconjg(caux(1,jo)) |
189 | 270 | !------- 2,2 ----------------------------------------------------------- | 270 | !------- 2,2 ----------------------------------------------------------- |
190 | 271 | 271 | ||
191 | === modified file 'Src/diagg.F' | |||
192 | --- Src/diagg.F 2018-06-20 10:34:33 +0000 | |||
193 | +++ Src/diagg.F 2018-06-25 11:35:23 +0000 | |||
194 | @@ -90,7 +90,7 @@ | |||
195 | 90 | use m_fermid, only : fermid, fermispin, stepf | 90 | use m_fermid, only : fermid, fermispin, stepf |
196 | 91 | use m_spin, only : spinor_dim, e_spin_dim | 91 | use m_spin, only : spinor_dim, e_spin_dim |
197 | 92 | use alloc | 92 | use alloc |
199 | 93 | use intrinsic_missing, only: MODP1 | 93 | use intrinsic_missing, only: MODP |
200 | 94 | 94 | ||
201 | 95 | #ifdef MPI | 95 | #ifdef MPI |
202 | 96 | use mpi_siesta | 96 | use mpi_siesta |
203 | @@ -158,7 +158,7 @@ | |||
204 | 158 | do j = 1,numh(io) | 158 | do j = 1,numh(io) |
205 | 159 | ind = listhptr(io) + j | 159 | ind = listhptr(io) + j |
206 | 160 | jo = listh(ind) | 160 | jo = listh(ind) |
208 | 161 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 161 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
209 | 162 | Saux(jo,io) = Saux(jo,io) + S(ind) | 162 | Saux(jo,io) = Saux(jo,io) + S(ind) |
210 | 163 | Haux(jo,io) = Haux(jo,io) + H(ind,ispin) | 163 | Haux(jo,io) = Haux(jo,io) + H(ind,ispin) |
211 | 164 | enddo | 164 | enddo |
212 | @@ -184,7 +184,7 @@ | |||
213 | 184 | do j = 1,numh(io) | 184 | do j = 1,numh(io) |
214 | 185 | ind = listhptr(io) + j | 185 | ind = listhptr(io) + j |
215 | 186 | jo = listh(ind) | 186 | jo = listh(ind) |
217 | 187 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 187 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
218 | 188 | Saux(jo,io) = Saux(jo,io) + S(ind) | 188 | Saux(jo,io) = Saux(jo,io) + S(ind) |
219 | 189 | Haux(jo,io) = Haux(jo,io) + H(ind,ispin) | 189 | Haux(jo,io) = Haux(jo,io) + H(ind,ispin) |
220 | 190 | enddo | 190 | enddo |
221 | @@ -301,7 +301,7 @@ | |||
222 | 301 | do j = 1,numd(io) | 301 | do j = 1,numd(io) |
223 | 302 | ind = listdptr(io) + j | 302 | ind = listdptr(io) + j |
224 | 303 | jo = listd(ind) | 303 | jo = listd(ind) |
226 | 304 | jo = MODP1(jo,nuotot) ! To allow auxiliary supercells | 304 | jo = MODP(jo,nuotot) ! To allow auxiliary supercells |
227 | 305 | Dnew(ind,ispin) = Dnew(ind,ispin) + qei*paux(jo) | 305 | Dnew(ind,ispin) = Dnew(ind,ispin) + qei*paux(jo) |
228 | 306 | Enew(ind,ispin) = Enew(ind,ispin) + eei*paux(jo) | 306 | Enew(ind,ispin) = Enew(ind,ispin) + eei*paux(jo) |
229 | 307 | enddo | 307 | enddo |
230 | 308 | 308 | ||
231 | === modified file 'Src/diagon.F' | |||
232 | --- Src/diagon.F 2018-06-12 22:59:08 +0000 | |||
233 | +++ Src/diagon.F 2018-06-25 11:35:23 +0000 | |||
234 | @@ -15,7 +15,7 @@ | |||
235 | 15 | subroutine diagon(no, nspin, maxuo, maxnh, maxnd, | 15 | subroutine diagon(no, nspin, maxuo, maxnh, maxnd, |
236 | 16 | . maxo, numh, listhptr, listh, numd, | 16 | . maxo, numh, listhptr, listh, numd, |
237 | 17 | . listdptr, listd, H, S, qtot, fixspin, | 17 | . listdptr, listd, H, S, qtot, fixspin, |
239 | 18 | . qs, temp, e1, e2, xij, indxuo, nk, | 18 | . qs, temp, e1, e2, xij, indxuo, gamma, nk, |
240 | 19 | . kpoint, wk, eo, qo, Dnew, Enew, ef, efs, | 19 | . kpoint, wk, eo, qo, Dnew, Enew, ef, efs, |
241 | 20 | . Entropy, nuotot, occtol, iscf, neigwanted ) | 20 | . Entropy, nuotot, occtol, iscf, neigwanted ) |
242 | 21 | C ********************************************************************* | 21 | C ********************************************************************* |
243 | @@ -62,6 +62,7 @@ | |||
244 | 62 | C Unit cell orbitals must be the first in | 62 | C Unit cell orbitals must be the first in |
245 | 63 | C orbital lists, i.e. indxuo.le.nuo, with | 63 | C orbital lists, i.e. indxuo.le.nuo, with |
246 | 64 | C nuo the number of orbitals in unit cell | 64 | C nuo the number of orbitals in unit cell |
247 | 65 | C logical Gamma : Whether only the Gamma point is sampled. | ||
248 | 65 | C integer nk : Number of k points | 66 | C integer nk : Number of k points |
249 | 66 | C real*8 kpoint(3,nk) : k point vectors | 67 | C real*8 kpoint(3,nk) : k point vectors |
250 | 67 | C real*8 wk(nk) : k point weights (must sum one) | 68 | C real*8 wk(nk) : k point weights (must sum one) |
251 | @@ -115,6 +116,7 @@ | |||
252 | 115 | implicit none | 116 | implicit none |
253 | 116 | 117 | ||
254 | 117 | real(dp), intent(in) :: H(:,:) | 118 | real(dp), intent(in) :: H(:,:) |
255 | 119 | logical, intent(in) :: gamma | ||
256 | 118 | 120 | ||
257 | 119 | integer | 121 | integer |
258 | 120 | . iscf, maxnd, maxnh, maxuo, maxo, nk, no, nuotot, | 122 | . iscf, maxnd, maxnh, maxuo, maxo, nk, no, nuotot, |
259 | @@ -145,7 +147,6 @@ | |||
260 | 145 | #endif | 147 | #endif |
261 | 146 | integer :: io, iuo, naux, nhs, npsi, nuo | 148 | integer :: io, iuo, naux, nhs, npsi, nuo |
262 | 147 | real(dp), pointer :: aux(:) | 149 | real(dp), pointer :: aux(:) |
263 | 148 | logical :: gamma | ||
264 | 149 | C .................... | 150 | C .................... |
265 | 150 | 151 | ||
266 | 151 | C Get Node number and calculate local orbital range | 152 | C Get Node number and calculate local orbital range |
267 | @@ -158,8 +159,6 @@ | |||
268 | 158 | C Start time counter ................................................ | 159 | C Start time counter ................................................ |
269 | 159 | call timer( 'diagon', 1 ) | 160 | call timer( 'diagon', 1 ) |
270 | 160 | 161 | ||
271 | 161 | gamma = ((nk == 1) .and. (sum(abs(kpoint(:,1))) == 0.0)) | ||
272 | 162 | |||
273 | 163 | C Check internal dimensions .......................................... | 162 | C Check internal dimensions .......................................... |
274 | 164 | 163 | ||
275 | 165 | if ( spin%none .or. spin%Col ) then | 164 | if ( spin%none .or. spin%Col ) then |
276 | 166 | 165 | ||
277 | === modified file 'Src/intrinsic_missing.F90' | |||
278 | --- Src/intrinsic_missing.F90 2018-06-20 10:34:33 +0000 | |||
279 | +++ Src/intrinsic_missing.F90 2018-06-25 11:35:23 +0000 | |||
280 | @@ -96,7 +96,6 @@ | |||
281 | 96 | 96 | ||
282 | 97 | ! Elemental functions (can be called on arrays) | 97 | ! Elemental functions (can be called on arrays) |
283 | 98 | public :: MODP | 98 | public :: MODP |
284 | 99 | public :: MODP1 | ||
285 | 100 | 99 | ||
286 | 101 | ! Missing matrix stuff | 100 | ! Missing matrix stuff |
287 | 102 | public :: EYE | 101 | public :: EYE |
288 | @@ -232,29 +231,9 @@ | |||
289 | 232 | elemental function MODP(a,p) | 231 | elemental function MODP(a,p) |
290 | 233 | integer, intent(in) :: a,p | 232 | integer, intent(in) :: a,p |
291 | 234 | integer :: MODP | 233 | integer :: MODP |
298 | 235 | if ( a > p ) then | 234 | MODP = MOD(a-1,p) + 1 |
293 | 236 | MODP = MOD(a,p) | ||
294 | 237 | if ( MODP == 0 ) MODP = p | ||
295 | 238 | else | ||
296 | 239 | MODP = a | ||
297 | 240 | end if | ||
299 | 241 | end function MODP | 235 | end function MODP |
300 | 242 | 236 | ||
301 | 243 | ! Another implementation of the above function | ||
302 | 244 | ! NOTE that these functions should only be used on NATURAL numbers | ||
303 | 245 | ! The target domain is [1,p] instead of [0,p-1] | ||
304 | 246 | ! In particular, modp1(p,p) = p | ||
305 | 247 | ! This makes it useful in FORTRAN do-loops which are not zero-based | ||
306 | 248 | ! but 1-based. | ||
307 | 249 | |||
308 | 250 | elemental function MODP1(a,p) | ||
309 | 251 | integer, intent(in) :: a,p | ||
310 | 252 | integer :: MODP1 | ||
311 | 253 | |||
312 | 254 | MODP1 = MOD(a-1,p) + 1 | ||
313 | 255 | |||
314 | 256 | end function MODP1 | ||
315 | 257 | |||
316 | 258 | ! Function to return the unique COUNT of an integer array. | 237 | ! Function to return the unique COUNT of an integer array. |
317 | 259 | ! Thus will return how many DIFFERENT entries there exists. | 238 | ! Thus will return how many DIFFERENT entries there exists. |
318 | 260 | pure function UNIQC(array) | 239 | pure function UNIQC(array) |
319 | 261 | 240 | ||
320 | === modified file 'Src/local_DOS.F' | |||
321 | --- Src/local_DOS.F 2018-06-12 22:59:08 +0000 | |||
322 | +++ Src/local_DOS.F 2018-06-25 11:35:23 +0000 | |||
323 | @@ -78,7 +78,7 @@ | |||
324 | 78 | call diagon(no_s, spinor_dim, no_l, maxnh, maxnh, no_u, | 78 | call diagon(no_s, spinor_dim, no_l, maxnh, maxnh, no_u, |
325 | 79 | . numh, listhptr, listh, numh, listhptr, listh, | 79 | . numh, listhptr, listh, numh, listhptr, listh, |
326 | 80 | . H, S, qtot, fixspin, qtots, temp, e1, e2, | 80 | . H, S, qtot, fixspin, qtots, temp, e1, e2, |
328 | 81 | . xijo, indxuo, nkpnt, kpoint, kweight, | 81 | . xijo, indxuo, gamma_SCF, nkpnt, kpoint, kweight, |
329 | 82 | . eo, qo, Dscf, Escf, ef, efs, dummy_Entrop, no_u, | 82 | . eo, qo, Dscf, Escf, ef, efs, dummy_Entrop, no_u, |
330 | 83 | . occtol, dummy_iscf, neigwanted) | 83 | . occtol, dummy_iscf, neigwanted) |
331 | 84 | 84 | ||
332 | 85 | 85 | ||
333 | === modified file 'Src/m_transiesta.F90' | |||
334 | --- Src/m_transiesta.F90 2018-04-04 13:22:33 +0000 | |||
335 | +++ Src/m_transiesta.F90 2018-06-25 11:35:23 +0000 | |||
336 | @@ -46,7 +46,7 @@ | |||
337 | 46 | 46 | ||
338 | 47 | subroutine transiesta(TSiscf,nspin, & | 47 | subroutine transiesta(TSiscf,nspin, & |
339 | 48 | sp_dist, sparse_pattern, & | 48 | sp_dist, sparse_pattern, & |
341 | 49 | Gamma, ucell, nsc, isc_off, no_u, na_u, lasto, xa, n_nzs, & | 49 | no_aux_cell, ucell, nsc, isc_off, no_u, na_u, lasto, xa, n_nzs, & |
342 | 50 | H, S, DM, EDM, Ef, & | 50 | H, S, DM, EDM, Ef, & |
343 | 51 | Qtot, Fermi_correct, DE_NEGF) | 51 | Qtot, Fermi_correct, DE_NEGF) |
344 | 52 | 52 | ||
345 | @@ -82,7 +82,7 @@ | |||
346 | 82 | integer, intent(in) :: nspin | 82 | integer, intent(in) :: nspin |
347 | 83 | type(OrbitalDistribution), intent(inout) :: sp_dist | 83 | type(OrbitalDistribution), intent(inout) :: sp_dist |
348 | 84 | type(Sparsity), intent(inout) :: sparse_pattern | 84 | type(Sparsity), intent(inout) :: sparse_pattern |
350 | 85 | logical, intent(in) :: Gamma | 85 | logical, intent(in) :: no_aux_cell |
351 | 86 | real(dp), intent(in) :: ucell(3,3) | 86 | real(dp), intent(in) :: ucell(3,3) |
352 | 87 | integer, intent(in) :: nsc(3), no_u, na_u | 87 | integer, intent(in) :: nsc(3), no_u, na_u |
353 | 88 | integer, intent(in) :: isc_off(3,product(nsc)) | 88 | integer, intent(in) :: isc_off(3,product(nsc)) |
354 | @@ -134,7 +134,7 @@ | |||
355 | 134 | ! local sparsity pattern... | 134 | ! local sparsity pattern... |
356 | 135 | converged = IsVolt .or. TS_RHOCORR_METHOD == TS_RHOCORR_FERMI | 135 | converged = IsVolt .or. TS_RHOCORR_METHOD == TS_RHOCORR_FERMI |
357 | 136 | call ts_sparse_init(slabel,converged, N_Elec, Elecs, & | 136 | call ts_sparse_init(slabel,converged, N_Elec, Elecs, & |
359 | 137 | ucell, nsc, na_u, xa, lasto, sp_dist, sparse_pattern, Gamma, & | 137 | ucell, nsc, na_u, xa, lasto, sp_dist, sparse_pattern, no_aux_cell, & |
360 | 138 | isc_off) | 138 | isc_off) |
361 | 139 | 139 | ||
362 | 140 | if ( ts_method == TS_BTD ) then | 140 | if ( ts_method == TS_BTD ) then |
363 | 141 | 141 | ||
364 | === modified file 'Src/pdos.F' | |||
365 | --- Src/pdos.F 2018-06-12 22:59:08 +0000 | |||
366 | +++ Src/pdos.F 2018-06-25 11:35:23 +0000 | |||
367 | @@ -8,7 +8,7 @@ | |||
368 | 8 | subroutine pdos( NO, nspin, maxspn, NO_L, MAXNH, | 8 | subroutine pdos( NO, nspin, maxspn, NO_L, MAXNH, |
369 | 9 | . MAXO, NUMH, LISTHPTR, LISTH, H, S, | 9 | . MAXO, NUMH, LISTHPTR, LISTH, H, S, |
370 | 10 | . E1, E2, SIGMA, NHIST, | 10 | . E1, E2, SIGMA, NHIST, |
372 | 11 | . XIJ, INDXUO, NK, KPOINT, WK, EO, NO_U ) | 11 | . XIJ, INDXUO, GAMMA, NK, KPOINT, WK, EO, NO_U ) |
373 | 12 | C ********************************************************************** | 12 | C ********************************************************************** |
374 | 13 | C Subroutine to calculate the projected density of states on the | 13 | C Subroutine to calculate the projected density of states on the |
375 | 14 | C atomic orbitals for a given eigenvalue spectra | 14 | C atomic orbitals for a given eigenvalue spectra |
376 | @@ -43,6 +43,7 @@ | |||
377 | 43 | C Unit cell orbitals must be the first in | 43 | C Unit cell orbitals must be the first in |
378 | 44 | C orbital lists, i.e. indxuo.le.nuo, with | 44 | C orbital lists, i.e. indxuo.le.nuo, with |
379 | 45 | C nuo the nuber of orbitals in the unit cell | 45 | C nuo the nuber of orbitals in the unit cell |
380 | 46 | C logical Gamma : whether only the Gamma point is sampled | ||
381 | 46 | C INTEGER NK : Number of k points | 47 | C INTEGER NK : Number of k points |
382 | 47 | C REAL*8 KPOINT(3,NK) : k point vectors | 48 | C REAL*8 KPOINT(3,NK) : k point vectors |
383 | 48 | C REAL*8 WK(NK) : k point weights (must sum one) | 49 | C REAL*8 WK(NK) : k point weights (must sum one) |
384 | @@ -79,6 +80,7 @@ | |||
385 | 79 | . NO, NSPIN, MAXSPN, NO_L, MAXNH, NK, NHIST, | 80 | . NO, NSPIN, MAXSPN, NO_L, MAXNH, NK, NHIST, |
386 | 80 | . MAXO, NO_U | 81 | . MAXO, NO_U |
387 | 81 | 82 | ||
388 | 83 | logical, intent(in) :: Gamma | ||
389 | 82 | integer | 84 | integer |
390 | 83 | . NUMH(*), LISTH(MAXNH), LISTHPTR(*), INDXUO(NO) | 85 | . NUMH(*), LISTH(MAXNH), LISTHPTR(*), INDXUO(NO) |
391 | 84 | 86 | ||
392 | @@ -98,7 +100,6 @@ | |||
393 | 98 | integer iat, spec, ii, iorb | 100 | integer iat, spec, ii, iorb |
394 | 99 | 101 | ||
395 | 100 | logical :: orig_ParallelOverK, orig_Serial | 102 | logical :: orig_ParallelOverK, orig_Serial |
396 | 101 | logical :: gamma | ||
397 | 102 | 103 | ||
398 | 103 | real(dp), dimension(:), pointer :: tmp | 104 | real(dp), dimension(:), pointer :: tmp |
399 | 104 | 105 | ||
400 | @@ -121,8 +122,6 @@ | |||
401 | 121 | 122 | ||
402 | 122 | call timer( 'pdos', 1) | 123 | call timer( 'pdos', 1) |
403 | 123 | 124 | ||
404 | 124 | gamma = ((nk == 1) .and. (sum(abs(kpoint(:,1))) == 0.0)) | ||
405 | 125 | |||
406 | 126 | orig_Serial = Serial | 125 | orig_Serial = Serial |
407 | 127 | orig_ParallelOverK = ParallelOverK | 126 | orig_ParallelOverK = ParallelOverK |
408 | 128 | 127 | ||
409 | 129 | 128 | ||
410 | === modified file 'Src/post_scf_work.F' | |||
411 | --- Src/post_scf_work.F 2018-06-20 10:34:33 +0000 | |||
412 | +++ Src/post_scf_work.F 2018-06-25 11:35:23 +0000 | |||
413 | @@ -50,12 +50,9 @@ | |||
414 | 50 | character(len=20) :: msg | 50 | character(len=20) :: msg |
415 | 51 | type(Pair_Geometry_dSpData2D) :: pair | 51 | type(Pair_Geometry_dSpData2D) :: pair |
416 | 52 | type(Geometry) :: geom | 52 | type(Geometry) :: geom |
417 | 53 | logical :: not_using_auxcell | ||
418 | 54 | 53 | ||
419 | 55 | call timer( 'PostSCF', 1 ) | 54 | call timer( 'PostSCF', 1 ) |
420 | 56 | 55 | ||
421 | 57 | not_using_auxcell = (no_s == no_u) | ||
422 | 58 | ! | ||
423 | 59 | ! If converged, make one last iteration to find forces and stress | 56 | ! If converged, make one last iteration to find forces and stress |
424 | 60 | 57 | ||
425 | 61 | ! If we use the minimization routine, the energy-density | 58 | ! If we use the minimization routine, the energy-density |
426 | @@ -79,12 +76,12 @@ | |||
427 | 79 | & no_l, maxnh, maxnh, no_u, | 76 | & no_l, maxnh, maxnh, no_u, |
428 | 80 | & numh, listhptr, listh, numh, listhptr, listh, | 77 | & numh, listhptr, listh, numh, listhptr, listh, |
429 | 81 | & H, S, qtot, fixspin, qtots, temp, 1.0_dp, -1.0_dp, | 78 | & H, S, qtot, fixspin, qtots, temp, 1.0_dp, -1.0_dp, |
431 | 82 | & xijo, indxuo, nkpnt, kpoint, kweight, | 79 | & xijo, indxuo, gamma_SCF, nkpnt, kpoint, kweight, |
432 | 83 | & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u, | 80 | & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u, |
433 | 84 | & occtol, iscf, neigwanted) | 81 | & occtol, iscf, neigwanted) |
434 | 85 | Ecorrec = 0.0_dp | 82 | Ecorrec = 0.0_dp |
435 | 86 | else | 83 | else |
437 | 87 | if (not_using_auxcell) then | 84 | if ( gamma_SCF ) then |
438 | 88 | call dminim(.true., .false., iscf, istp, no_l, nspin, no_u, | 85 | call dminim(.true., .false., iscf, istp, no_l, nspin, no_u, |
439 | 89 | & maxnh, numh, listhptr, listh, Escf, eta, qtots) | 86 | & maxnh, numh, listhptr, listh, Escf, eta, qtots) |
440 | 90 | else | 87 | else |
441 | 91 | 88 | ||
442 | === modified file 'Src/projected_DOS.F' | |||
443 | --- Src/projected_DOS.F 2018-06-12 22:59:08 +0000 | |||
444 | +++ Src/projected_DOS.F 2018-06-25 11:35:23 +0000 | |||
445 | @@ -121,7 +121,7 @@ | |||
446 | 121 | call pdos( no_s, h_spin_dim, spinor_dim, no_l, | 121 | call pdos( no_s, h_spin_dim, spinor_dim, no_l, |
447 | 122 | . maxnh, | 122 | . maxnh, |
448 | 123 | . no_u, numh, listhptr, listh, H, S, | 123 | . no_u, numh, listhptr, listh, H, S, |
450 | 124 | . e1, e2, sigma, nhist, xijo, indxuo, | 124 | . e1, e2, sigma, nhist, xijo, indxuo, gamma_PDOS, |
451 | 125 | . nkpnt_pdos, kpoints_pdos, kweight_pdos, eo, | 125 | . nkpnt_pdos, kpoints_pdos, kweight_pdos, eo, |
452 | 126 | . no_u) | 126 | . no_u) |
453 | 127 | else | 127 | else |
454 | @@ -130,7 +130,8 @@ | |||
455 | 130 | . maxnh, | 130 | . maxnh, |
456 | 131 | . no_u, numh, listhptr, listh, H, S, | 131 | . no_u, numh, listhptr, listh, H, S, |
457 | 132 | . e1, e2, sigma, nhist, | 132 | . e1, e2, sigma, nhist, |
459 | 133 | . xijo, indxuo, nkpnt, kpoint, kweight, eo, | 133 | . xijo, indxuo, gamma_SCF, |
460 | 134 | . nkpnt, kpoint, kweight, eo, | ||
461 | 134 | . no_u) | 135 | . no_u) |
462 | 135 | endif | 136 | endif |
463 | 136 | 137 | ||
464 | 137 | 138 | ||
465 | === modified file 'Src/siesta_analysis.F' | |||
466 | --- Src/siesta_analysis.F 2018-06-12 22:59:08 +0000 | |||
467 | +++ Src/siesta_analysis.F 2018-06-25 11:35:23 +0000 | |||
468 | @@ -15,7 +15,7 @@ | |||
469 | 15 | 15 | ||
470 | 16 | subroutine siesta_analysis( relaxd ) | 16 | subroutine siesta_analysis( relaxd ) |
471 | 17 | USE band, only: nbk, bk, maxbk, bands | 17 | USE band, only: nbk, bk, maxbk, bands |
473 | 18 | USE writewave, only: nwk, wfk, wwave | 18 | USE writewave, only: nwk, wfk, wwave, gamma_wavefunctions |
474 | 19 | USE writewave, only: setup_wfs_list, wfs_filename | 19 | USE writewave, only: setup_wfs_list, wfs_filename |
475 | 20 | USE m_ksvinit, only: nkpol, kpol, wgthpol | 20 | USE m_ksvinit, only: nkpol, kpol, wgthpol |
476 | 21 | use m_ksv | 21 | use m_ksv |
477 | @@ -35,7 +35,6 @@ | |||
478 | 35 | & iphkb, no_u, no_s, iza, iphorb, rmaxo, indxua | 35 | & iphkb, no_u, no_s, iza, iphorb, rmaxo, indxua |
479 | 36 | use atomlist, only: qtot | 36 | use atomlist, only: qtot |
480 | 37 | use fdf | 37 | use fdf |
481 | 38 | use writewave, only: wwave | ||
482 | 39 | use siesta_cml | 38 | use siesta_cml |
483 | 40 | use files, only : slabel | 39 | use files, only : slabel |
484 | 41 | use files, only : filesOut_t ! derived type for output file names | 40 | use files, only : filesOut_t ! derived type for output file names |
485 | @@ -274,7 +273,7 @@ | |||
486 | 274 | call wwave( no_s, h_spin_dim, spinor_dim, no_u, no_l, maxnh, | 273 | call wwave( no_s, h_spin_dim, spinor_dim, no_u, no_l, maxnh, |
487 | 275 | & nwk, | 274 | & nwk, |
488 | 276 | & numh, listhptr, listh, H, S, Ef, xijo, indxuo, | 275 | & numh, listhptr, listh, H, S, Ef, xijo, indxuo, |
490 | 277 | & nwk, wfk, no_u, occtol ) | 276 | & gamma_wavefunctions, nwk, wfk, no_u, occtol ) |
491 | 278 | endif | 277 | endif |
492 | 279 | 278 | ||
493 | 280 | 279 | ||
494 | @@ -294,7 +293,7 @@ | |||
495 | 294 | call wwave( no_s, h_spin_dim, spinor_dim, no_u, no_l, maxnh, | 293 | call wwave( no_s, h_spin_dim, spinor_dim, no_u, no_l, maxnh, |
496 | 295 | . nkpnt, | 294 | . nkpnt, |
497 | 296 | . numh, listhptr, listh, H, S, Ef, xijo, indxuo, | 295 | . numh, listhptr, listh, H, S, Ef, xijo, indxuo, |
499 | 297 | . nkpnt, kpoint, no_u, occtol) | 296 | . gamma_SCF, nkpnt, kpoint, no_u, occtol) |
500 | 298 | endif | 297 | endif |
501 | 299 | 298 | ||
502 | 300 | ! Compute bands | 299 | ! Compute bands |
503 | 301 | 300 | ||
504 | === modified file 'Src/writewave.F' | |||
505 | --- Src/writewave.F 2018-06-12 22:59:08 +0000 | |||
506 | +++ Src/writewave.F 2018-06-25 11:35:23 +0000 | |||
507 | @@ -386,7 +386,7 @@ | |||
508 | 386 | subroutine wwave( no, nspin, maxspn, maxo, maxuo, maxnh, | 386 | subroutine wwave( no, nspin, maxspn, maxo, maxuo, maxnh, |
509 | 387 | . maxk, | 387 | . maxk, |
510 | 388 | . numh, listhptr, listh, H, S, ef, xij, indxuo, | 388 | . numh, listhptr, listh, H, S, ef, xij, indxuo, |
512 | 389 | . nk, kpoint, nuotot, occtol) | 389 | . gamma, nk, kpoint, nuotot, occtol) |
513 | 390 | C ********************************************************************* | 390 | C ********************************************************************* |
514 | 391 | C Finds wavefunctions at selected k-points. | 391 | C Finds wavefunctions at selected k-points. |
515 | 392 | C Written by P. Ordejon, June 2003 | 392 | C Written by P. Ordejon, June 2003 |
516 | @@ -415,6 +415,7 @@ | |||
517 | 415 | C Unit cell orbitals must be the first in | 415 | C Unit cell orbitals must be the first in |
518 | 416 | C orbital lists, i.e. indxuo.le.nuo, with | 416 | C orbital lists, i.e. indxuo.le.nuo, with |
519 | 417 | C nuo the number of orbitals in unit cell | 417 | C nuo the number of orbitals in unit cell |
520 | 418 | C logical Gamma : whether only the Gamma-point is sampled | ||
521 | 418 | C integer nk : Number of band k points | 419 | C integer nk : Number of band k points |
522 | 419 | C real*8 kpoint(3,maxk) : k point vectors | 420 | C real*8 kpoint(3,maxk) : k point vectors |
523 | 420 | C integer nuotot : Total number of orbitals in unit cell | 421 | C integer nuotot : Total number of orbitals in unit cell |
524 | @@ -447,6 +448,7 @@ | |||
525 | 447 | 448 | ||
526 | 448 | implicit none | 449 | implicit none |
527 | 449 | 450 | ||
528 | 451 | logical, intent(in) :: Gamma | ||
529 | 450 | integer maxk, maxnh, maxo, maxuo, nk, no, | 452 | integer maxk, maxnh, maxo, maxuo, nk, no, |
530 | 451 | . h_spin_dim, spinor_dim, nspin, maxspn, | 453 | . h_spin_dim, spinor_dim, nspin, maxspn, |
531 | 452 | . nuotot, indxuo(no), listh(maxnh), numh(*), | 454 | . nuotot, indxuo(no), listh(maxnh), numh(*), |
532 | @@ -477,7 +479,6 @@ | |||
533 | 477 | data Dnew, Enew, e1, e2, qk, qtot, temp, wk /8*0.d0/ | 479 | data Dnew, Enew, e1, e2, qk, qtot, temp, wk /8*0.d0/ |
534 | 478 | 480 | ||
535 | 479 | logical :: SaveParallelOverK | 481 | logical :: SaveParallelOverK |
536 | 480 | logical gamma | ||
537 | 481 | 482 | ||
538 | 482 | h_spin_dim=size(H,dim=2) | 483 | h_spin_dim=size(H,dim=2) |
539 | 483 | 484 | ||
540 | @@ -492,8 +493,6 @@ | |||
541 | 492 | C Start time counter | 493 | C Start time counter |
542 | 493 | call timer( 'writewave', 1 ) | 494 | call timer( 'writewave', 1 ) |
543 | 494 | 495 | ||
544 | 495 | gamma = ((nk == 1) .and. (sum(abs(kpoint(:,1))) == 0.0)) | ||
545 | 496 | |||
546 | 497 | C Check parameter maxk | 496 | C Check parameter maxk |
547 | 498 | if (nk .gt. maxk) then | 497 | if (nk .gt. maxk) then |
548 | 499 | if (Node.eq.0) then | 498 | if (Node.eq.0) then |
549 | 500 | 499 | ||
550 | === modified file 'Util/COOP/Makefile' | |||
551 | --- Util/COOP/Makefile 2018-06-20 10:34:33 +0000 | |||
552 | +++ Util/COOP/Makefile 2018-06-25 11:35:23 +0000 | |||
553 | @@ -483,7 +483,7 @@ | |||
554 | 483 | m_ts_electrode.o: parallel.o precision.o units.o | 483 | m_ts_electrode.o: parallel.o precision.o units.o |
555 | 484 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 484 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
556 | 485 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 485 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
558 | 486 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 486 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
559 | 487 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 487 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
560 | 488 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 488 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
561 | 489 | m_ts_electype.o: units.o | 489 | m_ts_electype.o: units.o |
562 | 490 | 490 | ||
563 | === modified file 'Util/Denchar/Src/Makefile' | |||
564 | --- Util/Denchar/Src/Makefile 2018-06-20 10:34:33 +0000 | |||
565 | +++ Util/Denchar/Src/Makefile 2018-06-25 11:35:23 +0000 | |||
566 | @@ -557,7 +557,7 @@ | |||
567 | 557 | m_ts_electrode.o: parallel.o precision.o units.o | 557 | m_ts_electrode.o: parallel.o precision.o units.o |
568 | 558 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 558 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
569 | 559 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 559 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
571 | 560 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 560 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
572 | 561 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 561 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
573 | 562 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 562 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
574 | 563 | m_ts_electype.o: units.o | 563 | m_ts_electype.o: units.o |
575 | 564 | 564 | ||
576 | === modified file 'Util/Gen-basis/Makefile' | |||
577 | --- Util/Gen-basis/Makefile 2018-06-20 10:34:33 +0000 | |||
578 | +++ Util/Gen-basis/Makefile 2018-06-25 11:35:23 +0000 | |||
579 | @@ -547,7 +547,7 @@ | |||
580 | 547 | m_ts_electrode.o: parallel.o precision.o units.o | 547 | m_ts_electrode.o: parallel.o precision.o units.o |
581 | 548 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 548 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
582 | 549 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 549 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
584 | 550 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 550 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
585 | 551 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 551 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
586 | 552 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 552 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
587 | 553 | m_ts_electype.o: units.o | 553 | m_ts_electype.o: units.o |
588 | 554 | 554 | ||
589 | === modified file 'Util/Grimme/Makefile' | |||
590 | --- Util/Grimme/Makefile 2018-06-20 10:34:33 +0000 | |||
591 | +++ Util/Grimme/Makefile 2018-06-25 11:35:23 +0000 | |||
592 | @@ -485,7 +485,7 @@ | |||
593 | 485 | m_ts_electrode.o: parallel.o precision.o units.o | 485 | m_ts_electrode.o: parallel.o precision.o units.o |
594 | 486 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 486 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
595 | 487 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 487 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
597 | 488 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 488 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
598 | 489 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 489 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
599 | 490 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 490 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
600 | 491 | m_ts_electype.o: units.o | 491 | m_ts_electype.o: units.o |
601 | 492 | 492 | ||
602 | === modified file 'Util/Helpers/Makefile' | |||
603 | --- Util/Helpers/Makefile 2018-06-20 10:34:33 +0000 | |||
604 | +++ Util/Helpers/Makefile 2018-06-25 11:35:23 +0000 | |||
605 | @@ -488,7 +488,7 @@ | |||
606 | 488 | m_ts_electrode.o: parallel.o precision.o units.o | 488 | m_ts_electrode.o: parallel.o precision.o units.o |
607 | 489 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 489 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
608 | 490 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 490 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
610 | 491 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 491 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
611 | 492 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 492 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
612 | 493 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 493 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
613 | 494 | m_ts_electype.o: units.o | 494 | m_ts_electype.o: units.o |
614 | 495 | 495 | ||
615 | === modified file 'Util/STM/ol-stm/Src/Makefile' | |||
616 | --- Util/STM/ol-stm/Src/Makefile 2018-06-20 10:34:33 +0000 | |||
617 | +++ Util/STM/ol-stm/Src/Makefile 2018-06-25 11:35:23 +0000 | |||
618 | @@ -570,7 +570,7 @@ | |||
619 | 570 | m_ts_electrode.o: parallel.o precision.o units.o | 570 | m_ts_electrode.o: parallel.o precision.o units.o |
620 | 571 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 571 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
621 | 572 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 572 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
623 | 573 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 573 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
624 | 574 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 574 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
625 | 575 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 575 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
626 | 576 | m_ts_electype.o: units.o | 576 | m_ts_electype.o: units.o |
627 | 577 | 577 | ||
628 | === modified file 'Util/SpPivot/Makefile' | |||
629 | --- Util/SpPivot/Makefile 2018-06-20 10:34:33 +0000 | |||
630 | +++ Util/SpPivot/Makefile 2018-06-25 11:35:23 +0000 | |||
631 | @@ -499,7 +499,7 @@ | |||
632 | 499 | m_ts_electrode.o: parallel.o precision.o units.o | 499 | m_ts_electrode.o: parallel.o precision.o units.o |
633 | 500 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 500 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
634 | 501 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 501 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
636 | 502 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 502 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
637 | 503 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 503 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
638 | 504 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 504 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
639 | 505 | m_ts_electype.o: units.o | 505 | m_ts_electype.o: units.o |
640 | 506 | 506 | ||
641 | === modified file 'Util/TS/TBtrans/Makefile' | |||
642 | --- Util/TS/TBtrans/Makefile 2018-06-20 10:34:33 +0000 | |||
643 | +++ Util/TS/TBtrans/Makefile 2018-06-25 11:35:23 +0000 | |||
644 | @@ -755,7 +755,7 @@ | |||
645 | 755 | m_ts_electrode.o: parallel.o precision.o units.o | 755 | m_ts_electrode.o: parallel.o precision.o units.o |
646 | 756 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 756 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
647 | 757 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 757 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
649 | 758 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 758 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
650 | 759 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 759 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
651 | 760 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 760 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
652 | 761 | m_ts_electype.o: units.o | 761 | m_ts_electype.o: units.o |
653 | 762 | 762 | ||
654 | === modified file 'Util/TS/ts2ts/Makefile' | |||
655 | --- Util/TS/ts2ts/Makefile 2018-06-20 10:34:33 +0000 | |||
656 | +++ Util/TS/ts2ts/Makefile 2018-06-25 11:35:23 +0000 | |||
657 | @@ -492,7 +492,7 @@ | |||
658 | 492 | m_ts_electrode.o: parallel.o precision.o units.o | 492 | m_ts_electrode.o: parallel.o precision.o units.o |
659 | 493 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 493 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
660 | 494 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 494 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
662 | 495 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 495 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
663 | 496 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 496 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
664 | 497 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 497 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
665 | 498 | m_ts_electype.o: units.o | 498 | m_ts_electype.o: units.o |
666 | 499 | 499 | ||
667 | === modified file 'Util/TS/tshs2tshs/Makefile' | |||
668 | --- Util/TS/tshs2tshs/Makefile 2018-06-20 10:34:33 +0000 | |||
669 | +++ Util/TS/tshs2tshs/Makefile 2018-06-25 11:35:23 +0000 | |||
670 | @@ -558,7 +558,7 @@ | |||
671 | 558 | m_ts_electrode.o: parallel.o precision.o units.o | 558 | m_ts_electrode.o: parallel.o precision.o units.o |
672 | 559 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 559 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
673 | 560 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 560 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
675 | 561 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 561 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
676 | 562 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 562 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
677 | 563 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 563 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
678 | 564 | m_ts_electype.o: units.o | 564 | m_ts_electype.o: units.o |
679 | 565 | 565 | ||
680 | === modified file 'Util/VCA/Makefile' | |||
681 | --- Util/VCA/Makefile 2018-06-20 10:34:33 +0000 | |||
682 | +++ Util/VCA/Makefile 2018-06-25 11:35:23 +0000 | |||
683 | @@ -518,7 +518,7 @@ | |||
684 | 518 | m_ts_electrode.o: parallel.o precision.o units.o | 518 | m_ts_electrode.o: parallel.o precision.o units.o |
685 | 519 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o | 519 | m_ts_electype.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o |
686 | 520 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o | 520 | m_ts_electype.o: class_Sparsity.o create_Sparsity_SC.o geom_helper.o |
688 | 521 | m_ts_electype.o: intrinsic_missing.o m_geom_box.o m_geom_plane.o | 521 | m_ts_electype.o: intrinsic_missing.o m_char.o m_geom_box.o m_geom_plane.o |
689 | 522 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o | 522 | m_ts_electype.o: m_handle_sparse.o m_iodm.o m_os.o m_region.o m_ts_chem_pot.o |
690 | 523 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o | 523 | m_ts_electype.o: m_ts_io.o m_ts_io_ctype.o m_ts_iodm.o parallel.o precision.o |
691 | 524 | m_ts_electype.o: units.o | 524 | m_ts_electype.o: units.o |
692 | 525 | 525 | ||
693 | === modified file 'version.info' | |||
694 | --- version.info 2018-06-20 10:43:13 +0000 | |||
695 | +++ version.info 2018-06-25 11:35:23 +0000 | |||
696 | @@ -1,1 +1,1 @@ | |||
698 | 1 | siesta-4.1--933--gamma-931 | 1 | siesta-4.1--933--gamma-931--nick-1 |
It looks good. Indeed more clear.
The only remaining problem is that, I think, the proper logic for choosing between dminim and zminim in the OMM method is based on the supercell (no_u == no_s) and not on whether the gamma point only is used. In other words. dminim will not work if we use a supercell with the gamma point.
There are places where it is obvious where to put a call to "MODP", but in other cases I am not sure.
So pending a possible optimization of this, I am going to merge retaining the "supercell" logic for this in compute_dm and post_scf_work.