Merge lp:~nickpapior/siesta/4.1-fdf-blocks into lp:siesta/4.1
- 4.1-fdf-blocks
- Merge into rel-4.1
Proposed by
Nick Papior
Status: | Merged |
---|---|
Approved by: | Alberto Garcia |
Approved revision: | 984 |
Merged at revision: | 986 |
Proposed branch: | lp:~nickpapior/siesta/4.1-fdf-blocks |
Merge into: | lp:siesta/4.1 |
Diff against target: |
770 lines (+112/-109) 31 files modified
Src/Makefile (+4/-4) Src/broyden_optim.F (+2/-0) Src/cell_broyden_optim.F (+2/-0) Src/cgvc.F (+2/-0) Src/cgvc_zmatrix.F (+2/-0) Src/chemical.f (+5/-13) Src/coor.F (+5/-9) Src/fdf_extra.F90 (+19/-19) Src/get_target_stress.f (+2/-0) Src/kgrid.F (+1/-1) Src/kgridinit.F (+2/-1) Src/kpoint_grid.F90 (+1/-0) Src/kpoint_pdos.F90 (+2/-1) Src/ksvinit.F (+1/-1) Src/ldau_specs.f (+1/-1) Src/local_DOS.F (+1/-0) Src/m_efield.F (+3/-6) Src/m_new_dm.F90 (+1/-1) Src/m_spin.F90 (+4/-1) Src/m_target_stress.F (+2/-0) Src/m_ts_io_ctype.f90 (+11/-26) Src/m_ts_kpoints.F90 (+1/-0) Src/meshsubs.F (+1/-0) Src/metaforce.F (+24/-17) Src/projected_DOS.F (+3/-4) Src/read_xc_info.F (+1/-0) Src/readsp.F (+1/-0) Src/redcel.F (+4/-2) Src/reoptical.F (+1/-0) Src/zm_broyden_optim.F (+2/-1) version.info (+1/-1) |
To merge this branch: | bzr merge lp:~nickpapior/siesta/4.1-fdf-blocks |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Garcia | Approve | ||
Review via email: mp+354532@code.launchpad.net |
Commit message
Implemented closing of the majority of commonly used blocks
Closing of blocks in the log when using fdf_b* calls was problematic
if the code did not read the last line of the block (i.e. this was
the only way to ensure the %endblock <label> in the fdf-*.log.
There are some problems with this and transiesta because the transiesta
codes are using fdf_bbackspace (which re-writes to the log file).
However, for Siesta the above should work.%
Description of the change
Since this change touches some core places I think it is better if you had a glance at it.
I have tested a few tests and it now writes out the %endblock in the log file.
It does, however, have some problems when using the fdf_bbackspace methods.
To post a comment you must log in.
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-09-04 11:56:15 +0000 | |||
3 | +++ Src/Makefile 2018-09-09 19:50:11 +0000 | |||
4 | @@ -865,7 +865,7 @@ | |||
5 | 865 | m_ncdf_io.o: class_Sparsity.o m_io_s.o parallel.o precision.o | 865 | m_ncdf_io.o: class_Sparsity.o m_io_s.o parallel.o precision.o |
6 | 866 | m_ncdf_siesta.o: atm_types.o atmparams.o atomlist.o class_Sparsity.o files.o | 866 | m_ncdf_siesta.o: atm_types.o atmparams.o atomlist.o class_Sparsity.o files.o |
7 | 867 | m_ncdf_siesta.o: kpoint_grid.o m_energies.o m_forces.o m_kinetic.o m_ncdf_io.o | 867 | m_ncdf_siesta.o: kpoint_grid.o m_energies.o m_forces.o m_kinetic.o m_ncdf_io.o |
9 | 868 | m_ncdf_siesta.o: m_ntm.o m_spin.o m_stress.o m_ts_electype.o m_ts_kpoints.o | 868 | m_ncdf_siesta.o: m_spin.o m_stress.o m_ts_electype.o m_ts_kpoints.o |
10 | 869 | m_ncdf_siesta.o: m_ts_options.o parallel.o precision.o radial.o siesta_geom.o | 869 | m_ncdf_siesta.o: m_ts_options.o parallel.o precision.o radial.o siesta_geom.o |
11 | 870 | m_ncdf_siesta.o: siesta_options.o sparse_matrices.o timestamp.o | 870 | m_ncdf_siesta.o: siesta_options.o sparse_matrices.o timestamp.o |
12 | 871 | m_new_dm.o: alloc.o atomlist.o class_Data2D.o class_Fstack_Data1D.o | 871 | m_new_dm.o: alloc.o atomlist.o class_Data2D.o class_Fstack_Data1D.o |
13 | @@ -1238,9 +1238,9 @@ | |||
14 | 1238 | siesta_analysis.o: write_subs.o writewave.o zmatrix.o | 1238 | siesta_analysis.o: write_subs.o writewave.o zmatrix.o |
15 | 1239 | siesta_cmlsubs.o: files.o m_uuid.o parallel.o siesta_cml.o timestamp.o | 1239 | siesta_cmlsubs.o: files.o m_uuid.o parallel.o siesta_cml.o timestamp.o |
16 | 1240 | siesta_cmlsubs.o: | 1240 | siesta_cmlsubs.o: |
20 | 1241 | siesta_dicts.o: atomlist.o files.o kpoint_grid.o m_energies.o m_forces.o | 1241 | siesta_dicts.o: atomlist.o class_SpData1D.o files.o kpoint_grid.o m_energies.o |
21 | 1242 | siesta_dicts.o: m_mixing_scf.o m_steps.o m_stress.o precision.o siesta_geom.o | 1242 | siesta_dicts.o: m_forces.o m_mixing_scf.o m_steps.o m_stress.o precision.o |
22 | 1243 | siesta_dicts.o: siesta_options.o | 1243 | siesta_dicts.o: siesta_geom.o siesta_options.o sparse_matrices.o |
23 | 1244 | siesta_end.o: alloc.o bands.o densematrix.o diag.o extrae_eventllist.o | 1244 | siesta_end.o: alloc.o bands.o densematrix.o diag.o extrae_eventllist.o |
24 | 1245 | siesta_end.o: flook_siesta.o m_dscfcomm.o m_fixed.o m_io.o m_mixing_scf.o | 1245 | siesta_end.o: flook_siesta.o m_dscfcomm.o m_fixed.o m_io.o m_mixing_scf.o |
25 | 1246 | siesta_end.o: m_rhog.o m_wallclock.o meshdscf.o meshphi.o moremeshsubs.o | 1246 | siesta_end.o: m_rhog.o m_wallclock.o meshdscf.o meshphi.o moremeshsubs.o |
26 | 1247 | 1247 | ||
27 | === modified file 'Src/broyden_optim.F' | |||
28 | --- Src/broyden_optim.F 2016-01-25 16:00:16 +0000 | |||
29 | +++ Src/broyden_optim.F 2018-09-09 19:50:11 +0000 | |||
30 | @@ -187,6 +187,8 @@ | |||
31 | 187 | sxy = fdf_bvalues(pline,4) | 187 | sxy = fdf_bvalues(pline,4) |
32 | 188 | sxz = fdf_bvalues(pline,5) | 188 | sxz = fdf_bvalues(pline,5) |
33 | 189 | syz = fdf_bvalues(pline,6) | 189 | syz = fdf_bvalues(pline,6) |
34 | 190 | call fdf_bclose(bfdf) | ||
35 | 191 | |||
36 | 190 | tstres(1,1) = - sxx * tp | 192 | tstres(1,1) = - sxx * tp |
37 | 191 | tstres(2,2) = - syy * tp | 193 | tstres(2,2) = - syy * tp |
38 | 192 | tstres(3,3) = - szz * tp | 194 | tstres(3,3) = - szz * tp |
39 | 193 | 195 | ||
40 | === modified file 'Src/cell_broyden_optim.F' | |||
41 | --- Src/cell_broyden_optim.F 2016-01-25 16:00:16 +0000 | |||
42 | +++ Src/cell_broyden_optim.F 2018-09-09 19:50:11 +0000 | |||
43 | @@ -180,6 +180,8 @@ | |||
44 | 180 | sxy = fdf_bvalues(pline,4) | 180 | sxy = fdf_bvalues(pline,4) |
45 | 181 | sxz = fdf_bvalues(pline,5) | 181 | sxz = fdf_bvalues(pline,5) |
46 | 182 | syz = fdf_bvalues(pline,6) | 182 | syz = fdf_bvalues(pline,6) |
47 | 183 | call fdf_bclose(bfdf) | ||
48 | 184 | |||
49 | 183 | target_stress(1,1) = - sxx * tp | 185 | target_stress(1,1) = - sxx * tp |
50 | 184 | target_stress(2,2) = - syy * tp | 186 | target_stress(2,2) = - syy * tp |
51 | 185 | target_stress(3,3) = - szz * tp | 187 | target_stress(3,3) = - szz * tp |
52 | 186 | 188 | ||
53 | === modified file 'Src/cgvc.F' | |||
54 | --- Src/cgvc.F 2016-01-25 16:00:16 +0000 | |||
55 | +++ Src/cgvc.F 2018-09-09 19:50:11 +0000 | |||
56 | @@ -145,6 +145,8 @@ | |||
57 | 145 | sxy = fdf_bvalues(pline,4) | 145 | sxy = fdf_bvalues(pline,4) |
58 | 146 | sxz = fdf_bvalues(pline,5) | 146 | sxz = fdf_bvalues(pline,5) |
59 | 147 | syz = fdf_bvalues(pline,6) | 147 | syz = fdf_bvalues(pline,6) |
60 | 148 | call fdf_bclose(bfdf) | ||
61 | 149 | |||
62 | 148 | tstres(1,1) = - sxx * tp | 150 | tstres(1,1) = - sxx * tp |
63 | 149 | tstres(2,2) = - syy * tp | 151 | tstres(2,2) = - syy * tp |
64 | 150 | tstres(3,3) = - szz * tp | 152 | tstres(3,3) = - szz * tp |
65 | 151 | 153 | ||
66 | === modified file 'Src/cgvc_zmatrix.F' | |||
67 | --- Src/cgvc_zmatrix.F 2016-01-25 16:00:16 +0000 | |||
68 | +++ Src/cgvc_zmatrix.F 2018-09-09 19:50:11 +0000 | |||
69 | @@ -141,6 +141,8 @@ | |||
70 | 141 | sxy = fdf_bvalues(pline,4) | 141 | sxy = fdf_bvalues(pline,4) |
71 | 142 | sxz = fdf_bvalues(pline,5) | 142 | sxz = fdf_bvalues(pline,5) |
72 | 143 | syz = fdf_bvalues(pline,6) | 143 | syz = fdf_bvalues(pline,6) |
73 | 144 | call fdf_bclose(bfdf) | ||
74 | 145 | |||
75 | 144 | tstres(1,1) = - sxx * tp | 146 | tstres(1,1) = - sxx * tp |
76 | 145 | tstres(2,2) = - syy * tp | 147 | tstres(2,2) = - syy * tp |
77 | 146 | tstres(3,3) = - szz * tp | 148 | tstres(3,3) = - szz * tp |
78 | 147 | 149 | ||
79 | === modified file 'Src/chemical.f' | |||
80 | --- Src/chemical.f 2017-01-25 10:42:39 +0000 | |||
81 | +++ Src/chemical.f 2018-09-09 19:50:11 +0000 | |||
82 | @@ -115,22 +115,17 @@ | |||
83 | 115 | if ( present(silent) ) lsilent = silent | 115 | if ( present(silent) ) lsilent = silent |
84 | 116 | if ( Node /= 0 ) lsilent = .true. | 116 | if ( Node /= 0 ) lsilent = .true. |
85 | 117 | 117 | ||
86 | 118 | ! Default to 0 | ||
87 | 119 | nsp = fdf_integer('Number_of_species',0) | ||
88 | 120 | |||
89 | 118 | ! The most important thing to find is | 121 | ! The most important thing to find is |
90 | 119 | ! the block containing the species | 122 | ! the block containing the species |
92 | 120 | found = fdf_block('Chemical_species_label',bfdf) | 123 | found = fdf_block('Chemical_species_label', bfdf) |
93 | 121 | if (.not. found ) | 124 | if (.not. found ) |
94 | 122 | $ call die("Block Chemical_species_label does not exist.") | 125 | $ call die("Block Chemical_species_label does not exist.") |
95 | 123 | 126 | ||
96 | 124 | ! Default to 0 | ||
97 | 125 | nsp = fdf_integer('Number_of_species',0) | ||
98 | 126 | if ( nsp == 0 ) then | 127 | if ( nsp == 0 ) then |
106 | 127 | ! try and guess the number of species | 128 | ns_read = fdf_block_linecount('Chemical_species_label', 'iin') |
100 | 128 | ns_read = 0 | ||
101 | 129 | do while( fdf_bline(bfdf,pline) ) | ||
102 | 130 | if ( fdf_bmatch(pline,'iin') ) then | ||
103 | 131 | ns_read = ns_read + 1 | ||
104 | 132 | end if | ||
105 | 133 | end do | ||
107 | 134 | else | 129 | else |
108 | 135 | ns_read = nsp | 130 | ns_read = nsp |
109 | 136 | end if | 131 | end if |
110 | @@ -144,9 +139,6 @@ | |||
111 | 144 | allocate(chemical_list%z(nsp)) | 139 | allocate(chemical_list%z(nsp)) |
112 | 145 | chemical_list%no_of_species = nsp | 140 | chemical_list%no_of_species = nsp |
113 | 146 | 141 | ||
114 | 147 | ! Rewind the block | ||
115 | 148 | call fdf_brewind(bfdf) | ||
116 | 149 | |||
117 | 150 | ns_read = 0 | 142 | ns_read = 0 |
118 | 151 | do while( fdf_bline(bfdf,pline) ) | 143 | do while( fdf_bline(bfdf,pline) ) |
119 | 152 | if ( .not. fdf_bmatch(pline,'iin') ) cycle | 144 | if ( .not. fdf_bmatch(pline,'iin') ) cycle |
120 | 153 | 145 | ||
121 | === modified file 'Src/coor.F' | |||
122 | --- Src/coor.F 2016-09-14 10:57:36 +0000 | |||
123 | +++ Src/coor.F 2018-09-09 19:50:11 +0000 | |||
124 | @@ -138,13 +138,8 @@ | |||
125 | 138 | if ( na == 0 ) then | 138 | if ( na == 0 ) then |
126 | 139 | ! estimate the number of atoms by reading the block | 139 | ! estimate the number of atoms by reading the block |
127 | 140 | ! Currently we do not try to estimate from a Z-matrix | 140 | ! Currently we do not try to estimate from a Z-matrix |
135 | 141 | if (fdf_block('AtomicCoordinatesAndAtomicSpecies',bfdf)) then | 141 | na = fdf_block_linecount('AtomicCoordinatesAndAtomicSpecies', |
136 | 142 | na = 0 | 142 | & 'vvvi') |
130 | 143 | do while ( fdf_bline(bfdf,pline) ) | ||
131 | 144 | ! each line should contain one atom | ||
132 | 145 | na = na + 1 | ||
133 | 146 | end do | ||
134 | 147 | end if | ||
137 | 148 | end if | 143 | end if |
138 | 149 | if ( na == 0 ) then | 144 | if ( na == 0 ) then |
139 | 150 | call die("Must specify number of atoms AND coordinates!") | 145 | call die("Must specify number of atoms AND coordinates!") |
140 | @@ -170,6 +165,7 @@ | |||
141 | 170 | origin(1) = fdf_bvalues(pline,1) | 165 | origin(1) = fdf_bvalues(pline,1) |
142 | 171 | origin(2) = fdf_bvalues(pline,2) | 166 | origin(2) = fdf_bvalues(pline,2) |
143 | 172 | origin(3) = fdf_bvalues(pline,3) | 167 | origin(3) = fdf_bvalues(pline,3) |
144 | 168 | call fdf_bclose(bfdf) | ||
145 | 173 | else | 169 | else |
146 | 174 | origin = 0._dp | 170 | origin = 0._dp |
147 | 175 | endif | 171 | endif |
148 | @@ -195,7 +191,7 @@ | |||
149 | 195 | else | 191 | else |
150 | 196 | 192 | ||
151 | 197 | C If Z matrix hasn't been found, read regular atomic coordinates | 193 | C If Z matrix hasn't been found, read regular atomic coordinates |
153 | 198 | if (fdf_block('AtomicCoordinatesAndAtomicSpecies',bfdf)) then | 194 | if ( fdf_block('AtomicCoordinatesAndAtomicSpecies',bfdf) ) then |
154 | 199 | do ia= 1, nua | 195 | do ia= 1, nua |
155 | 200 | if (.not. fdf_bline(bfdf,pline)) | 196 | if (.not. fdf_bline(bfdf,pline)) |
156 | 201 | . call die('coor: ERROR in ' // | 197 | . call die('coor: ERROR in ' // |
157 | @@ -209,7 +205,7 @@ | |||
158 | 209 | endif | 205 | endif |
159 | 210 | 206 | ||
160 | 211 | enddo | 207 | enddo |
162 | 212 | 208 | call fdf_bclose(bfdf) | |
163 | 213 | else | 209 | else |
164 | 214 | call die("coor: You must specify the atomic coordinates") | 210 | call die("coor: You must specify the atomic coordinates") |
165 | 215 | endif | 211 | endif |
166 | 216 | 212 | ||
167 | === modified file 'Src/fdf_extra.F90' | |||
168 | --- Src/fdf_extra.F90 2018-07-30 10:26:25 +0000 | |||
169 | +++ Src/fdf_extra.F90 2018-09-09 19:50:11 +0000 | |||
170 | @@ -73,13 +73,13 @@ | |||
171 | 73 | call fdf_blists(pline,il,i1,list(n+1:)) | 73 | call fdf_blists(pline,il,i1,list(n+1:)) |
172 | 74 | if ( i1 + n > size(list) ) then | 74 | if ( i1 + n > size(list) ) then |
173 | 75 | print *,'Parsed line: ',trim(pline%line) | 75 | print *,'Parsed line: ',trim(pline%line) |
175 | 76 | call die('fdf_extra: number of elements in block list & | 76 | call die('fdf_brange: number of elements in block list & |
176 | 77 | &is too many to fit the maximal range of the & | 77 | &is too many to fit the maximal range of the & |
177 | 78 | &list. Please correct.') | 78 | &list. Please correct.') |
178 | 79 | end if | 79 | end if |
179 | 80 | if ( i1 == 0 ) then | 80 | if ( i1 == 0 ) then |
180 | 81 | print *,'Parsed line: ',trim(pline%line) | 81 | print *,'Parsed line: ',trim(pline%line) |
182 | 82 | call die('fdf_extra: a block list with zero elements is not & | 82 | call die('fdf_brange: a block list with zero elements is not & |
183 | 83 | &allowed, please correct input.') | 83 | &allowed, please correct input.') |
184 | 84 | end if | 84 | end if |
185 | 85 | 85 | ||
186 | @@ -102,14 +102,14 @@ | |||
187 | 102 | g = fdf_bnames(pline,2) | 102 | g = fdf_bnames(pline,2) |
188 | 103 | if ( .not. leqi(g,'from') ) then | 103 | if ( .not. leqi(g,'from') ) then |
189 | 104 | print *,'Parsed line: ',trim(pline%line) | 104 | print *,'Parsed line: ',trim(pline%line) |
191 | 105 | call die('fdf_extra: error in range block: & | 105 | call die('fdf_brange: error in range block: & |
192 | 106 | &from <int> to/plus/minus <int> is ill formatted') | 106 | &from <int> to/plus/minus <int> is ill formatted') |
193 | 107 | end if | 107 | end if |
194 | 108 | 108 | ||
195 | 109 | g = fdf_bnames(pline,3) | 109 | g = fdf_bnames(pline,3) |
196 | 110 | if ( fdf_bnintegers(pline) < 2 ) then | 110 | if ( fdf_bnintegers(pline) < 2 ) then |
197 | 111 | print *,'Parsed line: ',trim(pline%line) | 111 | print *,'Parsed line: ',trim(pline%line) |
199 | 112 | call die('fdf_extra: error in range block & | 112 | call die('fdf_brange: error in range block & |
200 | 113 | &from <int> to/plus/minus <int> is ill formatted') | 113 | &from <int> to/plus/minus <int> is ill formatted') |
201 | 114 | end if | 114 | end if |
202 | 115 | 115 | ||
203 | @@ -135,7 +135,7 @@ | |||
204 | 135 | i2 = i1 - i2 + 1 | 135 | i2 = i1 - i2 + 1 |
205 | 136 | else | 136 | else |
206 | 137 | print *,'Parsed line: ',trim(pline%line) | 137 | print *,'Parsed line: ',trim(pline%line) |
208 | 138 | call die('fdf_extra: unrecognized designator of ending range, & | 138 | call die('fdf_brange: unrecognized designator of ending range, & |
209 | 139 | &[to, plus, minus] accepted.') | 139 | &[to, plus, minus] accepted.') |
210 | 140 | end if | 140 | end if |
211 | 141 | 141 | ||
212 | @@ -153,7 +153,7 @@ | |||
213 | 153 | (i1 > i2 .and. step > 0) ) then | 153 | (i1 > i2 .and. step > 0) ) then |
214 | 154 | print *,'Parsed line: ',trim(pline%line) | 154 | print *,'Parsed line: ',trim(pline%line) |
215 | 155 | print *,i1,i2,step | 155 | print *,i1,i2,step |
217 | 156 | call die('fdf_extra: block range is not consecutive') | 156 | call die('fdf_brange: block range is not consecutive') |
218 | 157 | end if | 157 | end if |
219 | 158 | 158 | ||
220 | 159 | ! Create list | 159 | ! Create list |
221 | @@ -166,14 +166,14 @@ | |||
222 | 166 | else | 166 | else |
223 | 167 | 167 | ||
224 | 168 | print *,'Parsed line: ',trim(pline%line) | 168 | print *,'Parsed line: ',trim(pline%line) |
226 | 169 | call die('fdf_extra: error in range block, input not recognized') | 169 | call die('fdf_brange: error in range block, input not recognized') |
227 | 170 | 170 | ||
228 | 171 | end if | 171 | end if |
229 | 172 | 172 | ||
230 | 173 | do j = 1 , n | 173 | do j = 1 , n |
231 | 174 | if ( list(j) < low .or. high < list(j) ) then | 174 | if ( list(j) < low .or. high < list(j) ) then |
232 | 175 | print *,'Parsed line: ',trim(pline%line) | 175 | print *,'Parsed line: ',trim(pline%line) |
234 | 176 | call die('fdf_extra: error in range block. Input is beyond range') | 176 | call die('fdf_brange: error in range block. Input is beyond range') |
235 | 177 | end if | 177 | end if |
236 | 178 | end do | 178 | end do |
237 | 179 | 179 | ||
238 | @@ -240,16 +240,16 @@ | |||
239 | 240 | n_r = 0 | 240 | n_r = 0 |
240 | 241 | if ( allocated(rgns) ) deallocate(rgns) | 241 | if ( allocated(rgns) ) deallocate(rgns) |
241 | 242 | 242 | ||
250 | 243 | ! If the block does not exist, simply return | 243 | ! Get number of regions |
251 | 244 | if ( .not. fdf_block(bName,bfdf) ) return | 244 | il = fdf_block_linecount(bName) |
252 | 245 | 245 | if ( il == 0 ) return | |
253 | 246 | ! the initial number of regions | 246 | |
254 | 247 | il = 0 | 247 | if ( .not. fdf_block(bName,bfdf) ) then |
255 | 248 | do while ( fdf_bnext(bfdf,pline) ) | 248 | call die('fdf_bregions: failed implementation.') |
256 | 249 | il = il + 1 | 249 | end if |
257 | 250 | end do | 250 | |
258 | 251 | ! allocate | ||
259 | 251 | allocate(rlist(il)) | 252 | allocate(rlist(il)) |
260 | 252 | call fdf_brewind(bfdf) | ||
261 | 253 | 253 | ||
262 | 254 | ! first count number of differently named regions | 254 | ! first count number of differently named regions |
263 | 255 | do while ( fdf_bnext(bfdf,pline) ) | 255 | do while ( fdf_bnext(bfdf,pline) ) |
264 | @@ -302,7 +302,7 @@ | |||
265 | 302 | call fdf_brange(pline,r1,1,n) | 302 | call fdf_brange(pline,r1,1,n) |
266 | 303 | if ( r1%n == 0 ) then | 303 | if ( r1%n == 0 ) then |
267 | 304 | print *,'Region: ',trim(g) | 304 | print *,'Region: ',trim(g) |
269 | 305 | call die('fdf_extra: Could not read in anything in region!') | 305 | call die('fdf_bregions: Could not read in anything in region!') |
270 | 306 | end if | 306 | end if |
271 | 307 | call rgn_union(rgns(il),r1,rgns(il)) | 307 | call rgn_union(rgns(il),r1,rgns(il)) |
272 | 308 | rgns(il)%name = trim(g) | 308 | rgns(il)%name = trim(g) |
273 | @@ -312,7 +312,7 @@ | |||
274 | 312 | call fdf_brange(pline,r1,1,n) | 312 | call fdf_brange(pline,r1,1,n) |
275 | 313 | if ( r1%n == 0 ) then | 313 | if ( r1%n == 0 ) then |
276 | 314 | print *,'Region: ',trim(g) | 314 | print *,'Region: ',trim(g) |
278 | 315 | call die('fdf_extra: Could not read in anything in region!') | 315 | call die('fdf_bregions: Could not read in anything in region!') |
279 | 316 | end if | 316 | end if |
280 | 317 | call rgn_union(rgns(ic),r1,rgns(ic)) | 317 | call rgn_union(rgns(ic),r1,rgns(ic)) |
281 | 318 | rgns(ic)%name = trim(g) | 318 | rgns(ic)%name = trim(g) |
282 | 319 | 319 | ||
283 | === modified file 'Src/get_target_stress.f' | |||
284 | --- Src/get_target_stress.f 2016-01-25 16:00:16 +0000 | |||
285 | +++ Src/get_target_stress.f 2018-09-09 19:50:11 +0000 | |||
286 | @@ -42,6 +42,8 @@ | |||
287 | 42 | sxy = fdf_bvalues(pline,4) | 42 | sxy = fdf_bvalues(pline,4) |
288 | 43 | sxz = fdf_bvalues(pline,5) | 43 | sxz = fdf_bvalues(pline,5) |
289 | 44 | syz = fdf_bvalues(pline,6) | 44 | syz = fdf_bvalues(pline,6) |
290 | 45 | call fdf_bclose(bfdf) | ||
291 | 46 | |||
292 | 45 | tstres(1,1) = - sxx * tp | 47 | tstres(1,1) = - sxx * tp |
293 | 46 | tstres(2,2) = - syy * tp | 48 | tstres(2,2) = - syy * tp |
294 | 47 | tstres(3,3) = - szz * tp | 49 | tstres(3,3) = - szz * tp |
295 | 48 | 50 | ||
296 | === modified file 'Src/kgrid.F' | |||
297 | --- Src/kgrid.F 2016-01-25 16:00:16 +0000 | |||
298 | +++ Src/kgrid.F 2018-09-09 19:50:11 +0000 | |||
299 | @@ -63,7 +63,7 @@ | |||
300 | 63 | parameter (tiny = 1.d-12) | 63 | parameter (tiny = 1.d-12) |
301 | 64 | 64 | ||
302 | 65 | C Find out if there is spiral arrangement of spins | 65 | C Find out if there is spiral arrangement of spins |
304 | 66 | spiral = fdf_block('SpinSpiral',bfdf) | 66 | spiral = fdf_isblock('SpinSpiral') |
305 | 67 | 67 | ||
306 | 68 | C Find total number of points (determinant of kscell) | 68 | C Find total number of points (determinant of kscell) |
307 | 69 | nktot = abs( kscell(1,1) * kscell(2,2) * kscell(3,3) + | 69 | nktot = abs( kscell(1,1) * kscell(2,2) * kscell(3,3) + |
308 | 70 | 70 | ||
309 | === modified file 'Src/kgridinit.F' | |||
310 | --- Src/kgridinit.F 2017-10-10 19:47:15 +0000 | |||
311 | +++ Src/kgridinit.F 2018-09-09 19:50:11 +0000 | |||
312 | @@ -92,7 +92,7 @@ | |||
313 | 92 | 92 | ||
314 | 93 | genlogic = .false. | 93 | genlogic = .false. |
315 | 94 | C Find out if there is spiral arrangement of spins | 94 | C Find out if there is spiral arrangement of spins |
317 | 95 | spiral = fdf_block('SpinSpiral',bfdf) | 95 | spiral = fdf_isblock('SpinSpiral') |
318 | 96 | 96 | ||
319 | 97 | C Find total number of points (determinant of kscell) | 97 | C Find total number of points (determinant of kscell) |
320 | 98 | nktot = abs( kscell(1,1) * kscell(2,2) * kscell(3,3) + | 98 | nktot = abs( kscell(1,1) * kscell(2,2) * kscell(3,3) + |
321 | @@ -118,6 +118,7 @@ | |||
322 | 118 | displ(i) = 0._dp | 118 | displ(i) = 0._dp |
323 | 119 | end if | 119 | end if |
324 | 120 | enddo | 120 | enddo |
325 | 121 | call fdf_bclose(bfdf) | ||
326 | 121 | nktot = abs( kscell(1,1) * kscell(2,2) * kscell(3,3) + | 122 | nktot = abs( kscell(1,1) * kscell(2,2) * kscell(3,3) + |
327 | 122 | . kscell(2,1) * kscell(3,2) * kscell(1,3) + | 123 | . kscell(2,1) * kscell(3,2) * kscell(1,3) + |
328 | 123 | . kscell(3,1) * kscell(1,2) * kscell(2,3) - | 124 | . kscell(3,1) * kscell(1,2) * kscell(2,3) - |
329 | 124 | 125 | ||
330 | === modified file 'Src/kpoint_grid.F90' | |||
331 | --- Src/kpoint_grid.F90 2018-04-14 23:14:53 +0000 | |||
332 | +++ Src/kpoint_grid.F90 2018-09-09 19:50:11 +0000 | |||
333 | @@ -145,6 +145,7 @@ | |||
334 | 145 | kdispl(i) = 0._dp | 145 | kdispl(i) = 0._dp |
335 | 146 | end if | 146 | end if |
336 | 147 | enddo | 147 | enddo |
337 | 148 | call fdf_bclose(bfdf) | ||
338 | 148 | firm_displ = .true. | 149 | firm_displ = .true. |
339 | 149 | 150 | ||
340 | 150 | else | 151 | else |
341 | 151 | 152 | ||
342 | === modified file 'Src/kpoint_pdos.F90' | |||
343 | --- Src/kpoint_pdos.F90 2018-04-14 23:14:53 +0000 | |||
344 | +++ Src/kpoint_pdos.F90 2018-09-09 19:50:11 +0000 | |||
345 | @@ -159,7 +159,8 @@ | |||
346 | 159 | else | 159 | else |
347 | 160 | kdispl(i) = 0._dp | 160 | kdispl(i) = 0._dp |
348 | 161 | end if | 161 | end if |
350 | 162 | enddo | 162 | enddo |
351 | 163 | call fdf_bclose(bfdf) | ||
352 | 163 | firm_displ = .true. | 164 | firm_displ = .true. |
353 | 164 | 165 | ||
354 | 165 | else | 166 | else |
355 | 166 | 167 | ||
356 | === modified file 'Src/ksvinit.F' | |||
357 | --- Src/ksvinit.F 2016-01-25 16:00:16 +0000 | |||
358 | +++ Src/ksvinit.F 2018-09-09 19:50:11 +0000 | |||
359 | @@ -229,7 +229,7 @@ | |||
360 | 229 | endif | 229 | endif |
361 | 230 | 230 | ||
362 | 231 | enddo | 231 | enddo |
364 | 232 | 232 | call fdf_bclose(bfdf) | |
365 | 233 | endif | 233 | endif |
366 | 234 | 234 | ||
367 | 235 | end subroutine repol | 235 | end subroutine repol |
368 | 236 | 236 | ||
369 | === modified file 'Src/ldau_specs.f' | |||
370 | --- Src/ldau_specs.f 2016-11-25 18:04:25 +0000 | |||
371 | +++ Src/ldau_specs.f 2018-09-09 19:50:11 +0000 | |||
372 | @@ -428,7 +428,7 @@ | |||
373 | 428 | nprojsldau(:) = 0 | 428 | nprojsldau(:) = 0 |
374 | 429 | 429 | ||
375 | 430 | ! Read the LDAU.proj block | 430 | ! Read the LDAU.proj block |
377 | 431 | if (.not. fdf_block('LDAU.proj',bfdf)) RETURN | 431 | if (.not. fdf_block('LDAU.proj', bfdf)) RETURN |
378 | 432 | 432 | ||
379 | 433 | ! Add citation | 433 | ! Add citation |
380 | 434 | if ( IONode ) then | 434 | if ( IONode ) then |
381 | 435 | 435 | ||
382 | === modified file 'Src/local_DOS.F' | |||
383 | --- Src/local_DOS.F 2018-06-25 11:33:42 +0000 | |||
384 | +++ Src/local_DOS.F 2018-09-09 19:50:11 +0000 | |||
385 | @@ -70,6 +70,7 @@ | |||
386 | 70 | factor = fdf_convfac( fdf_bnames(pline,1), 'Ry' ) | 70 | factor = fdf_convfac( fdf_bnames(pline,1), 'Ry' ) |
387 | 71 | e1 = fdf_bvalues(pline,1)*factor | 71 | e1 = fdf_bvalues(pline,1)*factor |
388 | 72 | e2 = fdf_bvalues(pline,2)*factor | 72 | e2 = fdf_bvalues(pline,2)*factor |
389 | 73 | call fdf_bclose(bfdf) | ||
390 | 73 | 74 | ||
391 | 74 | !Find the density matrix for states between e1 and e2 | 75 | !Find the density matrix for states between e1 and e2 |
392 | 75 | if ((isolve .eq. SOLVE_DIAGON) .or. | 76 | if ((isolve .eq. SOLVE_DIAGON) .or. |
393 | 76 | 77 | ||
394 | === modified file 'Src/m_efield.F' | |||
395 | --- Src/m_efield.F 2018-01-26 13:17:30 +0000 | |||
396 | +++ Src/m_efield.F 2018-09-09 19:50:11 +0000 | |||
397 | @@ -52,7 +52,6 @@ | |||
398 | 52 | 52 | ||
399 | 53 | real(dp), intent(out) :: input_field(3) | 53 | real(dp), intent(out) :: input_field(3) |
400 | 54 | 54 | ||
401 | 55 | logical :: found | ||
402 | 56 | type(block_fdf) :: bfdf | 55 | type(block_fdf) :: bfdf |
403 | 57 | type(parsed_line), pointer :: pline => null() | 56 | type(parsed_line), pointer :: pline => null() |
404 | 58 | 57 | ||
405 | @@ -63,10 +62,8 @@ | |||
406 | 63 | 62 | ||
407 | 64 | input_field(1:3) = 0.0_dp | 63 | input_field(1:3) = 0.0_dp |
408 | 65 | 64 | ||
413 | 66 | found = fdf_block('ExternalElectricField',bfdf) | 65 | if (.not. fdf_block('ExternalElectricField',bfdf) ) RETURN |
414 | 67 | if (.not. found ) RETURN | 66 | do while ( fdf_bline(bfdf,pline) ) |
411 | 68 | loop: DO | ||
412 | 69 | if (.not. fdf_bline(bfdf,pline)) exit loop | ||
415 | 70 | if (.not. fdf_bmatch(pline,"vvvn")) | 67 | if (.not. fdf_bmatch(pline,"vvvn")) |
416 | 71 | $ call die("Wrong format in ElectricField block") | 68 | $ call die("Wrong format in ElectricField block") |
417 | 72 | eunits = fdf_bnames(pline,1) | 69 | eunits = fdf_bnames(pline,1) |
418 | @@ -74,7 +71,7 @@ | |||
419 | 74 | do ix = 1,3 | 71 | do ix = 1,3 |
420 | 75 | input_field(ix) = fdf_bvalues(pline,ix) * cfactor | 72 | input_field(ix) = fdf_bvalues(pline,ix) * cfactor |
421 | 76 | enddo | 73 | enddo |
423 | 77 | enddo loop | 74 | enddo |
424 | 78 | 75 | ||
425 | 79 | end subroutine get_user_specified_field | 76 | end subroutine get_user_specified_field |
426 | 80 | !---------------------------------------------------------------- | 77 | !---------------------------------------------------------------- |
427 | 81 | 78 | ||
428 | === modified file 'Src/m_new_dm.F90' | |||
429 | --- Src/m_new_dm.F90 2018-06-28 13:53:17 +0000 | |||
430 | +++ Src/m_new_dm.F90 2018-09-09 19:50:11 +0000 | |||
431 | @@ -981,7 +981,7 @@ | |||
432 | 981 | 981 | ||
433 | 982 | ! Read the data from the block and then we populate DM | 982 | ! Read the data from the block and then we populate DM |
434 | 983 | na = 0 | 983 | na = 0 |
436 | 984 | do while( fdf_bline(bfdf,pline) .and. na < na_u ) | 984 | do while( fdf_bline(bfdf,pline) ) |
437 | 985 | 985 | ||
438 | 986 | ! Read number of names, integers and reals on this line | 986 | ! Read number of names, integers and reals on this line |
439 | 987 | ni = fdf_bnintegers(pline) | 987 | ni = fdf_bnintegers(pline) |
440 | 988 | 988 | ||
441 | === modified file 'Src/m_spin.F90' | |||
442 | --- Src/m_spin.F90 2018-02-27 14:03:49 +0000 | |||
443 | +++ Src/m_spin.F90 2018-09-09 19:50:11 +0000 | |||
444 | @@ -338,7 +338,7 @@ | |||
445 | 338 | subroutine init_spiral( ucell ) | 338 | subroutine init_spiral( ucell ) |
446 | 339 | use fdf, only : fdf_get, leqi | 339 | use fdf, only : fdf_get, leqi |
447 | 340 | use fdf, only: block_fdf, parsed_line | 340 | use fdf, only: block_fdf, parsed_line |
449 | 341 | use fdf, only: fdf_block, fdf_bline | 341 | use fdf, only: fdf_block, fdf_bline, fdf_bclose |
450 | 342 | use fdf, only: fdf_bnames, fdf_bvalues | 342 | use fdf, only: fdf_bnames, fdf_bvalues |
451 | 343 | use units, only: Pi | 343 | use units, only: Pi |
452 | 344 | 344 | ||
453 | @@ -381,6 +381,9 @@ | |||
454 | 381 | call die('init_spiral: ERROR: ReciprocalCoordinates must be' // & | 381 | call die('init_spiral: ERROR: ReciprocalCoordinates must be' // & |
455 | 382 | ' ''Cubic'' or ''ReciprocalLatticeVectors''') | 382 | ' ''Cubic'' or ''ReciprocalLatticeVectors''') |
456 | 383 | end if | 383 | end if |
457 | 384 | |||
458 | 385 | call fdf_bclose(bfdf) | ||
459 | 386 | |||
460 | 384 | end subroutine init_spiral | 387 | end subroutine init_spiral |
461 | 385 | 388 | ||
462 | 386 | function fname_spin(nspin,ispin,slabel,suffix,basename) result(fname) | 389 | function fname_spin(nspin,ispin,slabel,suffix,basename) result(fname) |
463 | 387 | 390 | ||
464 | === modified file 'Src/m_target_stress.F' | |||
465 | --- Src/m_target_stress.F 2016-10-31 21:00:50 +0000 | |||
466 | +++ Src/m_target_stress.F 2018-09-09 19:50:11 +0000 | |||
467 | @@ -73,6 +73,8 @@ | |||
468 | 73 | sxy = fdf_bvalues(pline,4) | 73 | sxy = fdf_bvalues(pline,4) |
469 | 74 | sxz = fdf_bvalues(pline,5) | 74 | sxz = fdf_bvalues(pline,5) |
470 | 75 | syz = fdf_bvalues(pline,6) | 75 | syz = fdf_bvalues(pline,6) |
471 | 76 | call fdf_bclose(bfdf) | ||
472 | 77 | |||
473 | 76 | target_stress(1,1) = - sxx * tp | 78 | target_stress(1,1) = - sxx * tp |
474 | 77 | target_stress(2,2) = - syy * tp | 79 | target_stress(2,2) = - syy * tp |
475 | 78 | target_stress(3,3) = - szz * tp | 80 | target_stress(3,3) = - szz * tp |
476 | 79 | 81 | ||
477 | === modified file 'Src/m_ts_io_ctype.f90' | |||
478 | --- Src/m_ts_io_ctype.f90 2018-05-04 10:51:06 +0000 | |||
479 | +++ Src/m_ts_io_ctype.f90 2018-09-09 19:50:11 +0000 | |||
480 | @@ -98,26 +98,11 @@ | |||
481 | 98 | character(len=*), intent(in) :: suffix | 98 | character(len=*), intent(in) :: suffix |
482 | 99 | integer :: n | 99 | integer :: n |
483 | 100 | 100 | ||
484 | 101 | ! prepare to read in the data... | ||
485 | 102 | type(block_fdf) :: bfdf | ||
486 | 103 | type(parsed_line), pointer :: pline => null() | ||
487 | 104 | |||
488 | 105 | logical :: found | ||
489 | 106 | |||
490 | 107 | n = 0 | ||
491 | 108 | if ( len_trim(suffix) == 0 ) then | 101 | if ( len_trim(suffix) == 0 ) then |
493 | 109 | found = fdf_block(trim(prefix)//'.Contours',bfdf) | 102 | n = fdf_block_linecount(trim(prefix)//'.Contours', 'l') |
494 | 110 | else | 103 | else |
496 | 111 | found = fdf_block(trim(prefix)//'.Contours.'//trim(suffix),bfdf) | 104 | n = fdf_block_linecount(trim(prefix)//'.Contours'//trim(suffix), 'l') |
497 | 112 | end if | 105 | end if |
498 | 113 | if ( .not. found ) return | ||
499 | 114 | |||
500 | 115 | ! first count the number of electrodes | ||
501 | 116 | n = 0 | ||
502 | 117 | do while ( fdf_bline(bfdf,pline) ) | ||
503 | 118 | if ( fdf_bnnames(pline) == 0 ) cycle | ||
504 | 119 | n = n + 1 | ||
505 | 120 | end do | ||
506 | 121 | 106 | ||
507 | 122 | end function fdf_nc_iotype | 107 | end function fdf_nc_iotype |
508 | 123 | 108 | ||
509 | @@ -143,15 +128,16 @@ | |||
510 | 143 | end if | 128 | end if |
511 | 144 | if ( .not. found ) return | 129 | if ( .not. found ) return |
512 | 145 | 130 | ||
514 | 146 | ! first count the number of electrodes | 131 | ! Find the name of the contour |
515 | 147 | n = 0 | 132 | n = 0 |
516 | 148 | do while ( fdf_bline(bfdf,pline) ) | 133 | do while ( fdf_bline(bfdf,pline) ) |
523 | 149 | if ( fdf_bnnames(pline) == 0 ) cycle | 134 | if ( fdf_bnnames(pline) == 0 ) cycle |
524 | 150 | n = n + 1 | 135 | n = n + 1 |
525 | 151 | if ( n == i ) then | 136 | if ( n == i ) then |
526 | 152 | name = fdf_bnames(pline,1) | 137 | name = fdf_bnames(pline,1) |
527 | 153 | return | 138 | call fdf_bclose(bfdf) |
528 | 154 | end if | 139 | return |
529 | 140 | end if | ||
530 | 155 | end do | 141 | end do |
531 | 156 | 142 | ||
532 | 157 | end function fdf_name_c_iotype | 143 | end function fdf_name_c_iotype |
533 | @@ -226,7 +212,6 @@ | |||
534 | 226 | type(block_fdf), optional :: bfdf | 212 | type(block_fdf), optional :: bfdf |
535 | 227 | logical :: exist | 213 | logical :: exist |
536 | 228 | 214 | ||
537 | 229 | type(block_fdf) :: bfdf_tmp | ||
538 | 230 | character(len=c_N) :: g | 215 | character(len=c_N) :: g |
539 | 231 | 216 | ||
540 | 232 | ! if the block does not exist, return | 217 | ! if the block does not exist, return |
541 | @@ -242,7 +227,7 @@ | |||
542 | 242 | bfdf%label = trim(g) | 227 | bfdf%label = trim(g) |
543 | 243 | end if | 228 | end if |
544 | 244 | else | 229 | else |
546 | 245 | exist = fdf_block(trim(g),bfdf_tmp) | 230 | exist = fdf_isblock(trim(g)) |
547 | 246 | end if | 231 | end if |
548 | 247 | 232 | ||
549 | 248 | end function ts_exists_contour_block | 233 | end function ts_exists_contour_block |
550 | 249 | 234 | ||
551 | === modified file 'Src/m_ts_kpoints.F90' | |||
552 | --- Src/m_ts_kpoints.F90 2017-11-23 14:17:27 +0000 | |||
553 | +++ Src/m_ts_kpoints.F90 2018-09-09 19:50:11 +0000 | |||
554 | @@ -131,6 +131,7 @@ | |||
555 | 131 | 'kgrid_Monkhorst_Pack block' ) | 131 | 'kgrid_Monkhorst_Pack block' ) |
556 | 132 | endif | 132 | endif |
557 | 133 | enddo | 133 | enddo |
558 | 134 | call fdf_bclose(bfdf) | ||
559 | 134 | ts_firm_displ = .true. | 135 | ts_firm_displ = .true. |
560 | 135 | 136 | ||
561 | 136 | else | 137 | else |
562 | 137 | 138 | ||
563 | === modified file 'Src/meshsubs.F' | |||
564 | --- Src/meshsubs.F 2017-07-01 00:59:38 +0000 | |||
565 | +++ Src/meshsubs.F 2018-09-09 19:50:11 +0000 | |||
566 | @@ -334,6 +334,7 @@ | |||
567 | 334 | else | 334 | else |
568 | 335 | call die('initmesh: ERROR in MeshSizes block') | 335 | call die('initmesh: ERROR in MeshSizes block') |
569 | 336 | endif | 336 | endif |
570 | 337 | call fdf_bclose(bfdf) | ||
571 | 337 | RealCutoff = huge(1.0_dp) | 338 | RealCutoff = huge(1.0_dp) |
572 | 338 | call chkgmx( k0, rcell, ntm, RealCutoff ) | 339 | call chkgmx( k0, rcell, ntm, RealCutoff ) |
573 | 339 | if (RealCutoff < G2max) then | 340 | if (RealCutoff < G2max) then |
574 | 340 | 341 | ||
575 | === modified file 'Src/metaforce.F' | |||
576 | --- Src/metaforce.F 2016-01-25 16:00:16 +0000 | |||
577 | +++ Src/metaforce.F 2018-09-09 19:50:11 +0000 | |||
578 | @@ -11,13 +11,12 @@ | |||
579 | 11 | 11 | ||
580 | 12 | implicit none | 12 | implicit none |
581 | 13 | 13 | ||
582 | 14 | integer, save :: maxGauss = 100 | ||
583 | 15 | integer, save :: nGauss = 0 | 14 | integer, save :: nGauss = 0 |
589 | 16 | logical, save :: lMetaForce | 15 | logical, save :: lMetaForce = .false. |
590 | 17 | integer, pointer, save :: nGaussPtr(:,:) | 16 | integer, pointer, save :: nGaussPtr(:,:) => null() |
591 | 18 | real(dp), pointer, save :: GaussK(:) | 17 | real(dp), pointer, save :: GaussK(:) => null() |
592 | 19 | real(dp), pointer, save :: GaussR0(:) | 18 | real(dp), pointer, save :: GaussR0(:) => null() |
593 | 20 | real(dp), pointer, save :: GaussZeta(:) | 19 | real(dp), pointer, save :: GaussZeta(:) => null() |
594 | 21 | 20 | ||
595 | 22 | CONTAINS | 21 | CONTAINS |
596 | 23 | 22 | ||
597 | @@ -41,34 +40,42 @@ | |||
598 | 41 | type(block_fdf) :: bfdf | 40 | type(block_fdf) :: bfdf |
599 | 42 | type(parsed_line), pointer :: pline | 41 | type(parsed_line), pointer :: pline |
600 | 43 | 42 | ||
604 | 44 | C Find if there are any Gaussians specified | 43 | C Find if there are any Gaussians specified |
605 | 45 | lMetaForce = fdf_defined('MetaForce') | 44 | nGauss = fdf_block_linecount('MetaForce', 'iirrr') |
606 | 46 | if (lMetaForce) then | 45 | lMetaForce = nGauss > 0 |
607 | 46 | if ( lMetaForce ) then | ||
608 | 47 | 47 | ||
609 | 48 | C Allocate arrays for Gaussian data | 48 | C Allocate arrays for Gaussian data |
611 | 49 | call re_alloc( nGaussPtr, 1, 2, 1, maxGauss, 'nGaussPtr', | 49 | call re_alloc( nGaussPtr, 1, 2, 1, nGauss, 'nGaussPtr', |
612 | 50 | & 'initmeta' ) | 50 | & 'initmeta' ) |
616 | 51 | call re_alloc( GaussK, 1, maxGauss, 'GaussK', 'initmeta' ) | 51 | call re_alloc( GaussK, 1, nGauss, 'GaussK', 'initmeta' ) |
617 | 52 | call re_alloc( GaussR0, 1, maxGauss, 'GaussR0', 'initmeta' ) | 52 | call re_alloc( GaussR0, 1, nGauss, 'GaussR0', 'initmeta' ) |
618 | 53 | call re_alloc( GaussZeta, 1, maxGauss, 'GaussZeta', 'initmeta' ) | 53 | call re_alloc( GaussZeta, 1, nGauss, 'GaussZeta', 'initmeta' ) |
619 | 54 | 54 | ||
620 | 55 | C Read Gaussians from block | 55 | C Read Gaussians from block |
622 | 56 | lMetaForce = fdf_block('MetaForce',bfdf) | 56 | lMetaForce = fdf_block('MetaForce', bfdf) |
623 | 57 | 57 | ||
625 | 58 | do k= 1, maxGauss | 58 | do while ( fdf_bline(bfdf, pline) ) |
626 | 59 | C Read and parse data line | 59 | C Read and parse data line |
627 | 60 | if (.not. fdf_bline(bfdf,pline)) | ||
628 | 61 | . call die('initmeta: ERROR in MetaForce block') | ||
629 | 62 | ni = fdf_bnintegers(pline) | 60 | ni = fdf_bnintegers(pline) |
630 | 63 | nr = fdf_bnreals(pline) | 61 | nr = fdf_bnreals(pline) |
631 | 64 | 62 | ||
632 | 65 | C Check that correct info is given | 63 | C Check that correct info is given |
633 | 66 | if ((ni .ge. 2) .and. (nr .ge. 3)) then | 64 | if ((ni .ge. 2) .and. (nr .ge. 3)) then |
634 | 67 | nGauss = nGauss + 1 | 65 | nGauss = nGauss + 1 |
635 | 66 | ! Atom 1 | ||
636 | 68 | nGaussPtr(1,nGauss) = abs(fdf_bintegers(pline,1)) | 67 | nGaussPtr(1,nGauss) = abs(fdf_bintegers(pline,1)) |
637 | 68 | ! Atom 2 | ||
638 | 69 | nGaussPtr(2,nGauss) = abs(fdf_bintegers(pline,2)) | 69 | nGaussPtr(2,nGauss) = abs(fdf_bintegers(pline,2)) |
639 | 70 | ! Gaussian pre-factor for the force | ||
640 | 71 | ! Unit: Ry | ||
641 | 70 | GaussK(nGauss) = fdf_breals(pline,1) | 72 | GaussK(nGauss) = fdf_breals(pline,1) |
642 | 73 | ! Distance in r - r_0, where r is the distance between | ||
643 | 74 | ! atom i and j | ||
644 | 75 | ! Unit: Ang | ||
645 | 71 | GaussR0(nGauss) = fdf_breals(pline,2)/0.529177_dp | 76 | GaussR0(nGauss) = fdf_breals(pline,2)/0.529177_dp |
646 | 77 | ! Gaussian prefactor | ||
647 | 78 | ! Unit: 1/Bohr**2 | ||
648 | 72 | GaussZeta(nGauss) = fdf_breals(pline,3) | 79 | GaussZeta(nGauss) = fdf_breals(pline,3) |
649 | 73 | endif | 80 | endif |
650 | 74 | enddo | 81 | enddo |
651 | 75 | 82 | ||
652 | === modified file 'Src/projected_DOS.F' | |||
653 | --- Src/projected_DOS.F 2018-06-25 11:33:42 +0000 | |||
654 | +++ Src/projected_DOS.F 2018-09-09 19:50:11 +0000 | |||
655 | @@ -22,17 +22,15 @@ | |||
656 | 22 | subroutine init_projected_DOS() | 22 | subroutine init_projected_DOS() |
657 | 23 | 23 | ||
658 | 24 | USE siesta_options | 24 | USE siesta_options |
660 | 25 | use fdf, only: fdf_block, block_fdf | 25 | use fdf, only: fdf_block, fdf_isblock |
661 | 26 | use Kpoint_pdos | 26 | use Kpoint_pdos |
662 | 27 | use parallel, only: IOnode, Nodes | 27 | use parallel, only: IOnode, Nodes |
663 | 28 | use siesta_geom, only: ucell | 28 | use siesta_geom, only: ucell |
664 | 29 | use m_spin, only: spin | 29 | use m_spin, only: spin |
665 | 30 | 30 | ||
666 | 31 | type(block_fdf) :: bfdf | ||
667 | 32 | |||
668 | 33 | !-------------------------------------------------------------------------BEGIN | 31 | !-------------------------------------------------------------------------BEGIN |
669 | 34 | ! Compute the projected density of states | 32 | ! Compute the projected density of states |
671 | 35 | do_pdos = fdf_block('ProjectedDensityOfStates', bfdf) | 33 | do_pdos = fdf_isblock('ProjectedDensityOfStates') |
672 | 36 | if ( .not. do_pdos ) return | 34 | if ( .not. do_pdos ) return |
673 | 37 | 35 | ||
674 | 38 | if (isolve.ne.SOLVE_DIAGON) then | 36 | if (isolve.ne.SOLVE_DIAGON) then |
675 | @@ -108,6 +106,7 @@ | |||
676 | 108 | $ 'siesta: e1, e2, sigma, nhist: ', | 106 | $ 'siesta: e1, e2, sigma, nhist: ', |
677 | 109 | $ e1/eV,' eV',e2/eV,' eV',sigma/eV,' eV', nhist | 107 | $ e1/eV,' eV',e2/eV,' eV',sigma/eV,' eV', nhist |
678 | 110 | end if | 108 | end if |
679 | 109 | call fdf_bclose(bfdf) | ||
680 | 111 | 110 | ||
681 | 112 | ! If the k points have been set specifically for the PDOS then use this set | 111 | ! If the k points have been set specifically for the PDOS then use this set |
682 | 113 | if (different_pdos_grid) then | 112 | if (different_pdos_grid) then |
683 | 114 | 113 | ||
684 | === modified file 'Src/read_xc_info.F' | |||
685 | --- Src/read_xc_info.F 2016-01-25 16:00:16 +0000 | |||
686 | +++ Src/read_xc_info.F 2018-09-09 19:50:11 +0000 | |||
687 | @@ -78,6 +78,7 @@ | |||
688 | 78 | XCweightC(n) = 1.0_dp | 78 | XCweightC(n) = 1.0_dp |
689 | 79 | endif | 79 | endif |
690 | 80 | enddo | 80 | enddo |
691 | 81 | call fdf_bclose(bfdf) | ||
692 | 81 | else | 82 | else |
693 | 82 | nXCfunc = 1 | 83 | nXCfunc = 1 |
694 | 83 | XCfunc(1) = fdf_string('xc.functional','LDA') | 84 | XCfunc(1) = fdf_string('xc.functional','LDA') |
695 | 84 | 85 | ||
696 | === modified file 'Src/readsp.F' | |||
697 | --- Src/readsp.F 2016-01-25 16:00:16 +0000 | |||
698 | +++ Src/readsp.F 2018-09-09 19:50:11 +0000 | |||
699 | @@ -84,6 +84,7 @@ | |||
700 | 84 | call die('redata: ERROR: ReciprocalCoordinates must be' // | 84 | call die('redata: ERROR: ReciprocalCoordinates must be' // |
701 | 85 | . ' ''Cubic'' or ''ReciprocalLatticeVectors''') | 85 | . ' ''Cubic'' or ''ReciprocalLatticeVectors''') |
702 | 86 | endif | 86 | endif |
703 | 87 | call fdf_bclose(bfdf) | ||
704 | 87 | else | 88 | else |
705 | 88 | spiral = .false. | 89 | spiral = .false. |
706 | 89 | q(1) = 0.d0 | 90 | q(1) = 0.d0 |
707 | 90 | 91 | ||
708 | === modified file 'Src/redcel.F' | |||
709 | --- Src/redcel.F 2016-01-25 16:00:16 +0000 | |||
710 | +++ Src/redcel.F 2018-09-09 19:50:11 +0000 | |||
711 | @@ -43,8 +43,8 @@ | |||
712 | 43 | 43 | ||
713 | 44 | C Lattice vectors | 44 | C Lattice vectors |
714 | 45 | 45 | ||
717 | 46 | if ( fdf_block('LatticeParameters',bfdf) .and. | 46 | if ( fdf_isblock('LatticeParameters') .and. |
718 | 47 | . fdf_block('LatticeVectors',bfdf) ) then | 47 | . fdf_isblock('LatticeVectors') ) then |
719 | 48 | call die('redcel: ERROR: Lattice vectors doubly ' // | 48 | call die('redcel: ERROR: Lattice vectors doubly ' // |
720 | 49 | $ 'specified: by LatticeVectors and by LatticeParameters.') | 49 | $ 'specified: by LatticeVectors and by LatticeParameters.') |
721 | 50 | endif | 50 | endif |
722 | @@ -97,6 +97,7 @@ | |||
723 | 97 | cell(i,i) = 1.0_dp | 97 | cell(i,i) = 1.0_dp |
724 | 98 | enddo | 98 | enddo |
725 | 99 | endif | 99 | endif |
726 | 100 | call fdf_bclose(bfdf) | ||
727 | 100 | 101 | ||
728 | 101 | ! Note that cell will be zero if alat is not specified | 102 | ! Note that cell will be zero if alat is not specified |
729 | 102 | ! This is not very intuitive | 103 | ! This is not very intuitive |
730 | @@ -117,6 +118,7 @@ | |||
731 | 117 | mscell(2,i) = fdf_bvalues(pline,2) | 118 | mscell(2,i) = fdf_bvalues(pline,2) |
732 | 118 | mscell(3,i) = fdf_bvalues(pline,3) | 119 | mscell(3,i) = fdf_bvalues(pline,3) |
733 | 119 | enddo | 120 | enddo |
734 | 121 | call fdf_bclose(bfdf) | ||
735 | 120 | else | 122 | else |
736 | 121 | do i = 1,3 | 123 | do i = 1,3 |
737 | 122 | do j = 1,3 | 124 | do j = 1,3 |
738 | 123 | 125 | ||
739 | === modified file 'Src/reoptical.F' | |||
740 | --- Src/reoptical.F 2016-03-21 22:47:29 +0000 | |||
741 | +++ Src/reoptical.F 2018-09-09 19:50:11 +0000 | |||
742 | @@ -138,6 +138,7 @@ | |||
743 | 138 | nmeshk(1) = fdf_bintegers(pline,1) | 138 | nmeshk(1) = fdf_bintegers(pline,1) |
744 | 139 | nmeshk(2) = fdf_bintegers(pline,2) | 139 | nmeshk(2) = fdf_bintegers(pline,2) |
745 | 140 | nmeshk(3) = fdf_bintegers(pline,3) | 140 | nmeshk(3) = fdf_bintegers(pline,3) |
746 | 141 | call fdf_bclose(bfdf) | ||
747 | 141 | endif | 142 | endif |
748 | 142 | 143 | ||
749 | 143 | C Read whether this is a polarised, unpolarised or polycrystal calc | 144 | C Read whether this is a polarised, unpolarised or polycrystal calc |
750 | 144 | 145 | ||
751 | === modified file 'Src/zm_broyden_optim.F' | |||
752 | --- Src/zm_broyden_optim.F 2016-03-01 14:24:48 +0000 | |||
753 | +++ Src/zm_broyden_optim.F 2018-09-09 19:50:11 +0000 | |||
754 | @@ -175,7 +175,8 @@ | |||
755 | 175 | sxy = fdf_bvalues(pline,4) | 175 | sxy = fdf_bvalues(pline,4) |
756 | 176 | sxz = fdf_bvalues(pline,5) | 176 | sxz = fdf_bvalues(pline,5) |
757 | 177 | syz = fdf_bvalues(pline,6) | 177 | syz = fdf_bvalues(pline,6) |
759 | 178 | 178 | call fdf_bclose(bfdf) | |
760 | 179 | |||
761 | 179 | tstres(1,1) = - sxx * tp | 180 | tstres(1,1) = - sxx * tp |
762 | 180 | tstres(2,2) = - syy * tp | 181 | tstres(2,2) = - syy * tp |
763 | 181 | tstres(3,3) = - szz * tp | 182 | tstres(3,3) = - szz * tp |
764 | 182 | 183 | ||
765 | === modified file 'version.info' | |||
766 | --- version.info 2018-09-08 04:18:59 +0000 | |||
767 | +++ version.info 2018-09-09 19:50:11 +0000 | |||
768 | @@ -1,1 +1,1 @@ | |||
770 | 1 | siesta-4.1--983 | 1 | siesta-4.1--983--fdf-close-1 |
Approved.