1 |
commit: 5059dd1c79e30fdd1b4c0d24e4ef96775c0c16c1 |
2 |
Author: Horea Christian <chr <AT> chymera <DOT> eu> |
3 |
AuthorDate: Mon Sep 28 10:16:49 2020 +0000 |
4 |
Commit: Horea Christian <horea.christ <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Sep 28 10:16:49 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=5059dd1c |
7 |
|
8 |
patches: removed patch for deprecated package |
9 |
|
10 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
11 |
Signed-off-by: Horea Christian <chr <AT> chymera.eu> |
12 |
|
13 |
patches/bigdft-abi-1.0.4-0005.patch | 5317 ----------------------------------- |
14 |
1 file changed, 5317 deletions(-) |
15 |
|
16 |
diff --git a/patches/bigdft-abi-1.0.4-0005.patch b/patches/bigdft-abi-1.0.4-0005.patch |
17 |
deleted file mode 100644 |
18 |
index ae59b7ba1..000000000 |
19 |
--- a/patches/bigdft-abi-1.0.4-0005.patch |
20 |
+++ /dev/null |
21 |
@@ -1,5317 +0,0 @@ |
22 |
-diff -urN bigdft-abi-1.0.4.old/configure.ac bigdft-abi-1.0.4.new/configure.ac |
23 |
---- bigdft-abi-1.0.4.old/configure.ac 2012-07-09 16:43:33.000000000 +0200 |
24 |
-+++ bigdft-abi-1.0.4.new/configure.ac 2013-06-11 16:51:00.000000000 +0200 |
25 |
-@@ -806,8 +806,8 @@ |
26 |
- |
27 |
- dnl Test the given implementation of libabinit. |
28 |
- AC_CHECK_LIB(abinit, symbrav, withlibabinit=yes, withlibabinit=no) |
29 |
-- AC_CHECK_FILE($ac_libabinit_dir/include/ab6_moldyn.$ax_fc_mod_ext, moldyn="yes", moldyn="no") |
30 |
-- AC_CHECK_FILE($ac_libabinit_dir/include/ab6_symmetry.$ax_fc_mod_ext, sym="yes", sym="no") |
31 |
-+ AC_CHECK_FILE($ac_libabinit_dir/include/ab7_moldyn.$ax_fc_mod_ext, moldyn="yes", moldyn="no") |
32 |
-+ AC_CHECK_FILE($ac_libabinit_dir/include/ab7_symmetry.$ax_fc_mod_ext, sym="yes", sym="no") |
33 |
- AC_CHECK_FILE($ac_libabinit_dir/include/libxc_functionals.$ax_fc_mod_ext, libxc="yes", libxc="no") |
34 |
- if test "$withlibabinit" = "yes" -a "$moldyn" = "yes" -a "$sym" = "yes" -a "$libxc" = "yes"; then |
35 |
- ac_use_libabinit="yes" |
36 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/10_defs/defs_basis.F90 bigdft-abi-1.0.4.new/libABINIT/src/10_defs/defs_basis.F90 |
37 |
---- bigdft-abi-1.0.4.old/libABINIT/src/10_defs/defs_basis.F90 2012-07-09 16:43:33.000000000 +0200 |
38 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/10_defs/defs_basis.F90 2013-06-11 16:51:00.000000000 +0200 |
39 |
-@@ -211,18 +211,18 @@ |
40 |
- integer, parameter :: abinit_comm_serial = -12345 |
41 |
- |
42 |
- ! Error codes used by the bindings. |
43 |
-- integer, parameter, public :: AB6_NO_ERROR = 0 |
44 |
-- integer, parameter, public :: AB6_ERROR_OBJ = 1 |
45 |
-- integer, parameter, public :: AB6_ERROR_ARG = 2 |
46 |
-- integer, parameter, public :: AB6_ERROR_INVARS_ATT = 3 |
47 |
-- integer, parameter, public :: AB6_ERROR_INVARS_ID = 4 |
48 |
-- integer, parameter, public :: AB6_ERROR_INVARS_SIZE = 5 |
49 |
-- integer, parameter, public :: AB6_ERROR_SYM_NOT_PRIMITIVE = 6 |
50 |
-- integer, parameter, public :: AB6_ERROR_SYM_BRAVAIS_XRED = 7 |
51 |
-- integer, parameter, public :: AB6_ERROR_MIXING_ARG = 8 |
52 |
-- integer, parameter, public :: AB6_ERROR_MIXING_CONVERGENCE = 9 |
53 |
-- integer, parameter, public :: AB6_ERROR_MIXING_INTERNAL = 10 |
54 |
-- integer, parameter, public :: AB6_ERROR_MIXING_INC_NNSLOOP = 11 |
55 |
-+ integer, parameter, public :: AB7_NO_ERROR = 0 |
56 |
-+ integer, parameter, public :: AB7_ERROR_OBJ = 1 |
57 |
-+ integer, parameter, public :: AB7_ERROR_ARG = 2 |
58 |
-+ integer, parameter, public :: AB7_ERROR_INVARS_ATT = 3 |
59 |
-+ integer, parameter, public :: AB7_ERROR_INVARS_ID = 4 |
60 |
-+ integer, parameter, public :: AB7_ERROR_INVARS_SIZE = 5 |
61 |
-+ integer, parameter, public :: AB7_ERROR_SYM_NOT_PRIMITIVE = 6 |
62 |
-+ integer, parameter, public :: AB7_ERROR_SYM_BRAVAIS_XRED = 7 |
63 |
-+ integer, parameter, public :: AB7_ERROR_MIXING_ARG = 8 |
64 |
-+ integer, parameter, public :: AB7_ERROR_MIXING_CONVERGENCE = 9 |
65 |
-+ integer, parameter, public :: AB7_ERROR_MIXING_INTERNAL = 10 |
66 |
-+ integer, parameter, public :: AB7_ERROR_MIXING_INC_NNSLOOP = 11 |
67 |
- |
68 |
- ! Values of optdriver corresponding to the different run-levels. |
69 |
- integer, parameter, public :: RUNL_GSTATE = 0 |
70 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/14_hidewrite/wrtout.F90 bigdft-abi-1.0.4.new/libABINIT/src/14_hidewrite/wrtout.F90 |
71 |
---- bigdft-abi-1.0.4.old/libABINIT/src/14_hidewrite/wrtout.F90 2012-07-09 16:43:33.000000000 +0200 |
72 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/14_hidewrite/wrtout.F90 2013-06-11 16:51:00.000000000 +0200 |
73 |
-@@ -62,7 +62,7 @@ |
74 |
- !! ioniondist,irrzg,isfile,jellium,klocal,kpgio,kpgsph,kpgstr |
75 |
- !! kramerskronig,ks_ddiago,kxc_alda,kxc_eok,ladielmt,lattice,lavnl |
76 |
- !! leave_new,leave_test,linemin,listkk,lobpcgIIwf,lobpcgccIIwf,lobpcgccwf |
77 |
--!! lobpcgwf,loop3dte,loper3,lwf,m_ab6_invars_f90,m_abilasi,m_atom |
78 |
-+!! lobpcgwf,loop3dte,loper3,lwf,m_ab7_invars_f90,m_abilasi,m_atom |
79 |
- !! m_bands_sym,m_bs_defs,m_bz_mesh,m_coulombian,m_crystal,m_dyson_solver |
80 |
- !! m_ebands,m_errors,m_fft_mesh,m_fftw3,m_geometry,m_green,m_gsphere |
81 |
- !! m_gwdefs,m_hamiltonian,m_hidecudarec,m_initcuda,m_io_kss,m_io_screening |
82 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/16_hideleave/leave_new.F90 bigdft-abi-1.0.4.new/libABINIT/src/16_hideleave/leave_new.F90 |
83 |
---- bigdft-abi-1.0.4.old/libABINIT/src/16_hideleave/leave_new.F90 2012-07-09 16:43:33.000000000 +0200 |
84 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/16_hideleave/leave_new.F90 2013-06-11 16:51:00.000000000 +0200 |
85 |
-@@ -54,7 +54,7 @@ |
86 |
- !! inupper,invars0,invars1,invars1m,invars2,invars9,invcb,inwffil,inwffil3 |
87 |
- !! ioarr,ioddb8_in,iofn1,iofn2,irrzg,isfile,jellium,klocal,kpgsph,kpgstr |
88 |
- !! kxc_alda,kxc_eok,ladielmt,lavnl,linemin,listkk,lobpcgIIwf,lobpcgccIIwf |
89 |
--!! loper3,lwf,m_ab6_invars_f90,m_errors,m_green,m_libxc_functionals |
90 |
-+!! loper3,lwf,m_ab7_invars_f90,m_errors,m_green,m_libxc_functionals |
91 |
- !! m_matlu,m_matrix,m_oper,m_paw_dmft,m_special_funcs,m_wffile |
92 |
- !! mat_mlms2jmj,mat_slm2ylm,matcginv,matcginv_dpc,mati3inv,matrginv |
93 |
- !! matrixelmt_g,mean_fftr,meanvalue_g,memana,metcon,metric,metstr,mka2f |
94 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/18_timing/timab.F90 bigdft-abi-1.0.4.new/libABINIT/src/18_timing/timab.F90 |
95 |
---- bigdft-abi-1.0.4.old/libABINIT/src/18_timing/timab.F90 2012-07-09 16:43:33.000000000 +0200 |
96 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/18_timing/timab.F90 2013-06-11 16:51:00.000000000 +0200 |
97 |
-@@ -50,7 +50,7 @@ |
98 |
- !! getgsc,getngrec,gran_potrec,green_kernel,gstate,gstateimg,hartre |
99 |
- !! hartre1,initylmg,inkpts,invars2,inwffil,inwffil3,kpgio,kpgsph,ladielmt |
100 |
- !! lavnl,leave_test,lobpcgIIwf,lobpcgccIIwf,lobpcgccwf,lobpcgwf,loop3dte |
101 |
--!! loper3,m_ab6_invars_f90,m_hidecudarec,m_screening,matrixelmt_g |
102 |
-+!! loper3,m_ab7_invars_f90,m_hidecudarec,m_screening,matrixelmt_g |
103 |
- !! mean_fftr,meanvalue_g,mkcore,mkffnl,mklocl_realspace,mklocl_recipspace |
104 |
- !! mkresi,mkrho,mkrho3,mkvxc3,mkvxcstr3,newkpt,newocc,newrho,newvtr |
105 |
- !! newvtr3,nhatgrid,nlenergyrec,nonlinear,nonlop,nstdy3,nstwf3,odamix |
106 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/32_util/mati3inv.F90 bigdft-abi-1.0.4.new/libABINIT/src/32_util/mati3inv.F90 |
107 |
---- bigdft-abi-1.0.4.old/libABINIT/src/32_util/mati3inv.F90 2012-07-09 16:43:33.000000000 +0200 |
108 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/32_util/mati3inv.F90 2013-06-11 16:51:00.000000000 +0200 |
109 |
-@@ -32,7 +32,7 @@ |
110 |
- !! TODO |
111 |
- !! |
112 |
- !! PARENTS |
113 |
--!! ab6_symmetry_f90,debug_tools,get_full_kgrid,getkgrid,ingeo,invars2m |
114 |
-+!! ab7_symmetry_f90,debug_tools,get_full_kgrid,getkgrid,ingeo,invars2m |
115 |
- !! m_bands_sym,m_crystal,m_fft_mesh,m_io_kss,nstdy3,optic,outscfcv,rdddb9 |
116 |
- !! read_gkk,setsym,strainsym,symdij,symdyma,wfconv |
117 |
- !! |
118 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/42_geometry/chkprimit.F90 bigdft-abi-1.0.4.new/libABINIT/src/42_geometry/chkprimit.F90 |
119 |
---- bigdft-abi-1.0.4.old/libABINIT/src/42_geometry/chkprimit.F90 2012-07-09 16:43:33.000000000 +0200 |
120 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/42_geometry/chkprimit.F90 2013-06-11 16:51:00.000000000 +0200 |
121 |
-@@ -32,7 +32,7 @@ |
122 |
- ! |
123 |
- !! |
124 |
- !! PARENTS |
125 |
--!! ingeo,ab6_symmetry_f90 |
126 |
-+!! ingeo,ab7_symmetry_f90 |
127 |
- !! |
128 |
- !! CHILDREN |
129 |
- !! leave_new,wrtout |
130 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/42_geometry/m_ab6_symmetry.F90 bigdft-abi-1.0.4.new/libABINIT/src/42_geometry/m_ab6_symmetry.F90 |
131 |
---- bigdft-abi-1.0.4.old/libABINIT/src/42_geometry/m_ab6_symmetry.F90 2012-07-09 16:43:33.000000000 +0200 |
132 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/42_geometry/m_ab6_symmetry.F90 1970-01-01 01:00:00.000000000 +0100 |
133 |
-@@ -1,1088 +0,0 @@ |
134 |
--!* * Fortran90 source file * |
135 |
--!* |
136 |
--!* Copyright (c) 2008-2010 ABINIT Group (Damien Caliste) |
137 |
--!* All rights reserved. |
138 |
--!* |
139 |
--!* This file is part of the ABINIT software package. For license information, |
140 |
--!* please see the COPYING file in the top-level directory of the ABINIT source |
141 |
--!* distribution. |
142 |
--!* |
143 |
--!* |
144 |
-- |
145 |
--module m_ab6_symmetry |
146 |
-- |
147 |
-- use defs_basis |
148 |
-- |
149 |
-- implicit none |
150 |
-- |
151 |
-- private |
152 |
-- |
153 |
-- integer, parameter, public :: AB6_MAX_SYMMETRIES = 384 |
154 |
-- |
155 |
-- type, public :: symmetry_type |
156 |
-- ! The input characteristics |
157 |
-- real(dp) :: tolsym |
158 |
-- real(dp) :: rprimd(3,3), gprimd(3,3), rmet(3,3) |
159 |
-- integer :: nAtoms |
160 |
-- integer, pointer :: typeAt(:) |
161 |
-- real(dp), pointer :: xRed(:,:) |
162 |
-- |
163 |
-- logical :: withField |
164 |
-- real(dp) :: field(3) |
165 |
-- |
166 |
-- logical :: withJellium |
167 |
-- |
168 |
-- integer :: withSpin |
169 |
-- real(dp), pointer :: spinAt(:,:) |
170 |
-- |
171 |
-- logical :: withSpinOrbit |
172 |
-- |
173 |
-- integer :: vacuum(3) |
174 |
-- |
175 |
-- ! The output characteristics |
176 |
-- ! The bravais parameters |
177 |
-- integer :: nBravSym |
178 |
-- integer :: bravais(11), bravSym(3, 3, AB6_MAX_SYMMETRIES) |
179 |
-- ! The symmetry matrices |
180 |
-- logical :: auto |
181 |
-- integer :: nSym |
182 |
-- integer, pointer :: sym(:,:,:) |
183 |
-- real(dp), pointer :: transNon(:,:) |
184 |
-- integer, pointer :: symAfm(:) |
185 |
-- ! Some additional information |
186 |
-- integer :: multiplicity |
187 |
-- real(dp) :: genAfm(3) |
188 |
-- integer :: spaceGroup, pointGroupMagn |
189 |
-- integer, pointer :: indexingAtoms(:,:,:) |
190 |
-- end type symmetry_type |
191 |
-- |
192 |
-- ! We store here a list of symmetry objects to be able to |
193 |
-- ! call several symmetry operations on different objects. |
194 |
-- ! The simplest portable way to do it, is to create |
195 |
-- ! a list of Fortran structure and to use the list index |
196 |
-- ! as an identifier that can be given to the other languages. |
197 |
-- type, private :: symmetry_list |
198 |
-- integer :: id |
199 |
-- type(symmetry_list), pointer :: next |
200 |
-- type(symmetry_type) :: data |
201 |
-- end type symmetry_list |
202 |
-- type(symmetry_list), pointer :: my_symmetries |
203 |
-- integer :: n_symmetries = 0 |
204 |
-- |
205 |
-- logical, private, parameter :: AB_DBG = .false. |
206 |
-- |
207 |
-- public :: symmetry_new |
208 |
-- public :: symmetry_free |
209 |
-- public :: symmetry_set_tolerance |
210 |
-- public :: symmetry_set_lattice |
211 |
-- public :: symmetry_set_structure |
212 |
-- public :: symmetry_set_collinear_spin |
213 |
-- public :: symmetry_set_spin |
214 |
-- public :: symmetry_set_spin_orbit |
215 |
-- public :: symmetry_set_field |
216 |
-- public :: symmetry_set_jellium |
217 |
-- public :: symmetry_set_periodicity |
218 |
-- public :: symmetry_set_n_sym |
219 |
-- |
220 |
-- public :: symmetry_get_from_id |
221 |
-- public :: symmetry_get_n_atoms |
222 |
-- public :: symmetry_get_n_sym |
223 |
-- public :: symmetry_get_multiplicity |
224 |
-- public :: symmetry_get_bravais |
225 |
-- public :: symmetry_get_matrices |
226 |
-- public :: symmetry_get_matrices_p |
227 |
-- public :: symmetry_get_group |
228 |
-- public :: symmetry_get_equivalent_atom |
229 |
-- |
230 |
--contains |
231 |
-- |
232 |
-- subroutine new_item(token) |
233 |
-- |
234 |
-- |
235 |
--!This section has been created automatically by the script Abilint (TD). |
236 |
--!Do not modify the following lines by hand. |
237 |
--!End of the abilint section |
238 |
-- |
239 |
-- type(symmetry_list), pointer :: token |
240 |
-- |
241 |
-- ! We allocate a new list token and prepend it. |
242 |
-- if (AB_DBG) write(0,*) "AB symmetry: create a new token." |
243 |
-- |
244 |
-- ! Init case, very first call. |
245 |
-- if (n_symmetries == 0) then |
246 |
-- nullify(my_symmetries) |
247 |
-- end if |
248 |
-- |
249 |
-- ! Normal treatment. |
250 |
-- n_symmetries = n_symmetries + 1 |
251 |
-- |
252 |
-- allocate(token) |
253 |
-- token%id = n_symmetries |
254 |
-- call new_symmetry(token%data) |
255 |
-- token%next => my_symmetries |
256 |
-- |
257 |
-- my_symmetries => token |
258 |
-- if (AB_DBG) write(0,*) "AB symmetry: creation OK with id ", token%id |
259 |
-- end subroutine new_item |
260 |
-- |
261 |
-- subroutine free_item(token) |
262 |
-- |
263 |
-- |
264 |
--!This section has been created automatically by the script Abilint (TD). |
265 |
--!Do not modify the following lines by hand. |
266 |
--!End of the abilint section |
267 |
-- |
268 |
-- type(symmetry_list), pointer :: token |
269 |
-- |
270 |
-- type(symmetry_list), pointer :: tmp |
271 |
-- |
272 |
-- if (.not. associated(token)) then |
273 |
-- return |
274 |
-- end if |
275 |
-- |
276 |
-- call free_symmetry(token%data) |
277 |
-- |
278 |
-- if (AB_DBG) write(0,*) "AB symmetry: free request on token ", token%id |
279 |
-- ! We remove token from the list. |
280 |
-- if (my_symmetries%id == token%id) then |
281 |
-- my_symmetries => token%next |
282 |
-- else |
283 |
-- tmp => my_symmetries |
284 |
-- do |
285 |
-- if (.not.associated(tmp)) then |
286 |
-- return |
287 |
-- end if |
288 |
-- if (associated(tmp%next) .and. tmp%next%id == token%id) then |
289 |
-- exit |
290 |
-- end if |
291 |
-- tmp => tmp%next |
292 |
-- end do |
293 |
-- tmp%next => token%next |
294 |
-- end if |
295 |
-- deallocate(token) |
296 |
-- if (AB_DBG) write(0,*) "AB symmetry: free done" |
297 |
-- end subroutine free_item |
298 |
-- |
299 |
-- subroutine get_item(token, id) |
300 |
-- |
301 |
-- |
302 |
-- type(symmetry_list), pointer :: token |
303 |
-- integer, intent(in) :: id |
304 |
-- |
305 |
-- type(symmetry_list), pointer :: tmp |
306 |
-- |
307 |
-- if (AB_DBG) write(0,*) "AB symmetry: request list element ", id |
308 |
-- nullify(token) |
309 |
-- |
310 |
-- tmp => my_symmetries |
311 |
-- do |
312 |
-- if (.not. associated(tmp)) then |
313 |
-- exit |
314 |
-- end if |
315 |
-- if (tmp%id == id) then |
316 |
-- token => tmp |
317 |
-- return |
318 |
-- end if |
319 |
-- tmp => tmp%next |
320 |
-- end do |
321 |
-- end subroutine get_item |
322 |
-- |
323 |
-- subroutine symmetry_get_from_id(sym, id, errno) |
324 |
-- |
325 |
-- type(symmetry_type), pointer :: sym |
326 |
-- integer, intent(in) :: id |
327 |
-- integer, intent(out) :: errno |
328 |
-- |
329 |
-- type(symmetry_list), pointer :: token |
330 |
-- |
331 |
-- errno = AB6_NO_ERROR |
332 |
-- call get_item(token, id) |
333 |
-- if (associated(token)) then |
334 |
-- sym => token%data |
335 |
-- if (sym%nSym <= 0) then |
336 |
-- ! We do the computation of the matrix part. |
337 |
-- call compute_matrices(sym, errno) |
338 |
-- end if |
339 |
-- else |
340 |
-- errno = AB6_ERROR_OBJ |
341 |
-- nullify(sym) |
342 |
-- end if |
343 |
-- end subroutine symmetry_get_from_id |
344 |
-- |
345 |
-- subroutine new_symmetry(sym) |
346 |
-- |
347 |
-- |
348 |
-- type(symmetry_type), intent(out) :: sym |
349 |
-- |
350 |
-- if (AB_DBG) write(0,*) "AB symmetry: create a new symmetry object." |
351 |
-- nullify(sym%xRed) |
352 |
-- nullify(sym%spinAt) |
353 |
-- nullify(sym%typeAt) |
354 |
-- sym%tolsym = tol8 |
355 |
-- sym%auto = .true. |
356 |
-- sym%nSym = 0 |
357 |
-- nullify(sym%sym) |
358 |
-- nullify(sym%symAfm) |
359 |
-- nullify(sym%transNon) |
360 |
-- sym%nBravSym = -1 |
361 |
-- sym%withField = .false. |
362 |
-- sym%withJellium = .false. |
363 |
-- sym%withSpin = 1 |
364 |
-- sym%withSpinOrbit = .false. |
365 |
-- sym%multiplicity = -1 |
366 |
-- nullify(sym%indexingAtoms) |
367 |
-- sym%vacuum = 0 |
368 |
-- end subroutine new_symmetry |
369 |
-- |
370 |
-- subroutine free_symmetry(sym) |
371 |
-- |
372 |
-- |
373 |
-- type(symmetry_type), intent(inout) :: sym |
374 |
-- |
375 |
-- if (AB_DBG) write(0,*) "AB symmetry: free a symmetry." |
376 |
-- |
377 |
-- if (associated(sym%xRed)) deallocate(sym%xRed) |
378 |
-- if (associated(sym%spinAt)) deallocate(sym%spinAt) |
379 |
-- if (associated(sym%typeAt)) deallocate(sym%typeAt) |
380 |
-- if (associated(sym%indexingAtoms)) deallocate(sym%indexingAtoms) |
381 |
-- if (associated(sym%sym)) deallocate(sym%sym) |
382 |
-- if (associated(sym%symAfm)) deallocate(sym%symAfm) |
383 |
-- if (associated(sym%transNon)) deallocate(sym%transNon) |
384 |
-- end subroutine free_symmetry |
385 |
-- |
386 |
-- |
387 |
-- |
388 |
-- |
389 |
-- |
390 |
-- subroutine symmetry_new(id) |
391 |
-- |
392 |
-- |
393 |
--!This section has been created automatically by the script Abilint (TD). |
394 |
--!Do not modify the following lines by hand. |
395 |
--!End of the abilint section |
396 |
-- |
397 |
-- integer, intent(out) :: id |
398 |
-- |
399 |
-- type(symmetry_list), pointer :: token |
400 |
-- |
401 |
-- if (AB_DBG) write(0,*) "AB symmetry: call new symmetry." |
402 |
-- call new_item(token) |
403 |
-- id = token%id |
404 |
-- end subroutine symmetry_new |
405 |
-- |
406 |
-- subroutine symmetry_free(id) |
407 |
-- |
408 |
-- |
409 |
--!This section has been created automatically by the script Abilint (TD). |
410 |
--!Do not modify the following lines by hand. |
411 |
--!End of the abilint section |
412 |
-- |
413 |
-- integer, intent(in) :: id |
414 |
-- |
415 |
-- type(symmetry_list), pointer :: token |
416 |
-- |
417 |
-- if (AB_DBG) write(0,*) "AB symmetry: call free symmetry." |
418 |
-- |
419 |
-- call get_item(token, id) |
420 |
-- if (associated(token)) call free_item(token) |
421 |
-- end subroutine symmetry_free |
422 |
-- |
423 |
-- subroutine symmetry_set_tolerance(id, tolsym, errno) |
424 |
-- |
425 |
-- |
426 |
--!This section has been created automatically by the script Abilint (TD). |
427 |
--!Do not modify the following lines by hand. |
428 |
--!End of the abilint section |
429 |
-- |
430 |
-- integer, intent(in) :: id |
431 |
-- real(dp), intent(in) :: tolsym |
432 |
-- integer, intent(out) :: errno |
433 |
-- |
434 |
-- type(symmetry_list), pointer :: token |
435 |
-- |
436 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set tolerance." |
437 |
-- |
438 |
-- errno = AB6_NO_ERROR |
439 |
-- call get_item(token, id) |
440 |
-- if (.not. associated(token)) then |
441 |
-- errno = AB6_ERROR_OBJ |
442 |
-- return |
443 |
-- end if |
444 |
-- |
445 |
-- token%data%tolsym = tolsym |
446 |
-- |
447 |
-- ! We unset all the computed symmetries |
448 |
-- token%data%nBravSym = -1 |
449 |
-- if (token%data%auto) then |
450 |
-- token%data%nSym = 0 |
451 |
-- end if |
452 |
-- end subroutine symmetry_set_tolerance |
453 |
-- |
454 |
-- subroutine symmetry_set_lattice(id, rprimd, errno) |
455 |
-- |
456 |
-- |
457 |
--!This section has been created automatically by the script Abilint (TD). |
458 |
--!Do not modify the following lines by hand. |
459 |
-- use interfaces_42_geometry |
460 |
--!End of the abilint section |
461 |
-- |
462 |
-- integer, intent(in) :: id |
463 |
-- real(dp), intent(in) :: rprimd(3,3) |
464 |
-- integer, intent(out) :: errno |
465 |
-- |
466 |
-- type(symmetry_list), pointer :: token |
467 |
-- real(dp) :: ucvol |
468 |
-- real(dp) :: gmet(3,3) |
469 |
-- |
470 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set lattice." |
471 |
-- if (AB_DBG) write(0, "(A,3F12.6,A)") " (", rprimd(:,1), ")" |
472 |
-- if (AB_DBG) write(0, "(A,3F12.6,A)") " (", rprimd(:,2), ")" |
473 |
-- if (AB_DBG) write(0, "(A,3F12.6,A)") " (", rprimd(:,3), ")" |
474 |
-- |
475 |
-- errno = AB6_NO_ERROR |
476 |
-- call get_item(token, id) |
477 |
-- if (.not. associated(token)) then |
478 |
-- errno = AB6_ERROR_OBJ |
479 |
-- return |
480 |
-- end if |
481 |
-- |
482 |
-- token%data%rprimd = rprimd |
483 |
-- call metric(gmet, token%data%gprimd, -1, token%data%rmet, rprimd, ucvol) |
484 |
-- |
485 |
-- ! We unset all the computed symmetries |
486 |
-- token%data%nBravSym = -1 |
487 |
-- if (token%data%auto) then |
488 |
-- token%data%nSym = 0 |
489 |
-- end if |
490 |
-- end subroutine symmetry_set_lattice |
491 |
-- |
492 |
-- subroutine symmetry_set_structure(id, nAtoms, typeAt, xRed, errno) |
493 |
-- |
494 |
-- |
495 |
--!This section has been created automatically by the script Abilint (TD). |
496 |
--!Do not modify the following lines by hand. |
497 |
--!End of the abilint section |
498 |
-- |
499 |
-- integer, intent(in) :: id |
500 |
-- integer, intent(in) :: nAtoms |
501 |
-- integer, intent(in) :: typeAt(nAtoms) |
502 |
-- real(dp), intent(in) :: xRed(3,nAtoms) |
503 |
-- integer, intent(out) :: errno |
504 |
-- |
505 |
-- type(symmetry_list), pointer :: token |
506 |
-- integer :: i |
507 |
-- |
508 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set structure." |
509 |
-- if (AB_DBG) write(0, "(A,I3,A)") " ", nAtoms, " atoms" |
510 |
-- if (AB_DBG) then |
511 |
-- do i = 1, nAtoms, 1 |
512 |
-- write(0, "(A,3F12.6,I3)") " ", xRed(:, i), typeAt(i) |
513 |
-- end do |
514 |
-- end if |
515 |
-- |
516 |
-- errno = AB6_NO_ERROR |
517 |
-- call get_item(token, id) |
518 |
-- if (.not. associated(token)) then |
519 |
-- errno = AB6_ERROR_OBJ |
520 |
-- return |
521 |
-- end if |
522 |
-- |
523 |
-- token%data%nAtoms = nAtoms |
524 |
-- allocate(token%data%typeAt(nAtoms)) |
525 |
-- token%data%typeAt = typeAt |
526 |
-- allocate(token%data%xRed(3, nAtoms)) |
527 |
-- token%data%xRed = xRed |
528 |
-- |
529 |
-- ! We unset only the symmetries |
530 |
-- if (token%data%auto) then |
531 |
-- token%data%nSym = 0 |
532 |
-- end if |
533 |
-- if (associated(token%data%indexingAtoms)) deallocate(token%data%indexingAtoms) |
534 |
-- end subroutine symmetry_set_structure |
535 |
-- |
536 |
-- subroutine symmetry_set_spin(id, nAtoms, spinAt, errno) |
537 |
-- |
538 |
-- |
539 |
--!This section has been created automatically by the script Abilint (TD). |
540 |
--!Do not modify the following lines by hand. |
541 |
--!End of the abilint section |
542 |
-- |
543 |
-- integer, intent(in) :: id |
544 |
-- integer, intent(in) :: nAtoms |
545 |
-- real(dp), intent(in) :: spinAt(3,nAtoms) |
546 |
-- integer, intent(out) :: errno |
547 |
-- |
548 |
-- type(symmetry_list), pointer :: token |
549 |
-- integer :: i |
550 |
-- |
551 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set spin." |
552 |
-- if (AB_DBG) then |
553 |
-- do i = 1, nAtoms, 1 |
554 |
-- write(0, "(A,3F12.6)") " ", spinAt(:, i) |
555 |
-- end do |
556 |
-- end if |
557 |
-- |
558 |
-- errno = AB6_NO_ERROR |
559 |
-- call get_item(token, id) |
560 |
-- if (.not. associated(token)) then |
561 |
-- errno = AB6_ERROR_OBJ |
562 |
-- return |
563 |
-- end if |
564 |
-- if (token%data%nAtoms /= nAtoms) then |
565 |
-- errno = AB6_ERROR_ARG |
566 |
-- return |
567 |
-- end if |
568 |
-- |
569 |
-- token%data%withSpin = 4 |
570 |
-- allocate(token%data%spinAt(3, nAtoms)) |
571 |
-- token%data%spinAt = spinAt |
572 |
-- |
573 |
-- ! We unset only the symmetries |
574 |
-- if (token%data%auto) then |
575 |
-- token%data%nSym = 0 |
576 |
-- end if |
577 |
-- end subroutine symmetry_set_spin |
578 |
-- |
579 |
-- subroutine symmetry_set_collinear_spin(id, nAtoms, spinAt, errno) |
580 |
-- |
581 |
-- |
582 |
--!This section has been created automatically by the script Abilint (TD). |
583 |
--!Do not modify the following lines by hand. |
584 |
--!End of the abilint section |
585 |
-- |
586 |
-- integer, intent(in) :: id |
587 |
-- integer, intent(in) :: nAtoms |
588 |
-- integer, intent(in) :: spinAt(nAtoms) |
589 |
-- integer, intent(out) :: errno |
590 |
-- |
591 |
-- type(symmetry_list), pointer :: token |
592 |
-- integer :: i |
593 |
-- |
594 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set collinear spin." |
595 |
-- if (AB_DBG) then |
596 |
-- do i = 1, nAtoms, 1 |
597 |
-- write(0, "(A,I3)") " ", spinAt(i) |
598 |
-- end do |
599 |
-- end if |
600 |
-- |
601 |
-- errno = AB6_NO_ERROR |
602 |
-- call get_item(token, id) |
603 |
-- if (.not. associated(token)) then |
604 |
-- errno = AB6_ERROR_OBJ |
605 |
-- return |
606 |
-- end if |
607 |
-- if (token%data%nAtoms /= nAtoms) then |
608 |
-- errno = AB6_ERROR_ARG |
609 |
-- return |
610 |
-- end if |
611 |
-- |
612 |
-- token%data%withSpin = 2 |
613 |
-- allocate(token%data%spinAt(1, nAtoms)) |
614 |
-- token%data%spinAt = real(reshape(spinAt, (/ 1, nAtoms /)), dp) |
615 |
-- |
616 |
-- ! We unset only the symmetries |
617 |
-- if (token%data%auto) then |
618 |
-- token%data%nSym = 0 |
619 |
-- end if |
620 |
-- end subroutine symmetry_set_collinear_spin |
621 |
-- |
622 |
-- subroutine symmetry_set_spin_orbit(id, withSpinOrbit, errno) |
623 |
-- |
624 |
-- |
625 |
--!This section has been created automatically by the script Abilint (TD). |
626 |
--!Do not modify the following lines by hand. |
627 |
--!End of the abilint section |
628 |
-- |
629 |
-- integer, intent(in) :: id |
630 |
-- logical, intent(in) :: withSpinOrbit |
631 |
-- integer, intent(out) :: errno |
632 |
-- |
633 |
-- type(symmetry_list), pointer :: token |
634 |
-- |
635 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set spin orbit." |
636 |
-- |
637 |
-- errno = AB6_NO_ERROR |
638 |
-- call get_item(token, id) |
639 |
-- if (.not. associated(token)) then |
640 |
-- errno = AB6_ERROR_OBJ |
641 |
-- return |
642 |
-- end if |
643 |
-- |
644 |
-- token%data%withSpinOrbit = withSpinOrbit |
645 |
-- |
646 |
-- ! We unset only the symmetries |
647 |
-- if (token%data%auto) then |
648 |
-- token%data%nSym = 0 |
649 |
-- end if |
650 |
-- end subroutine symmetry_set_spin_orbit |
651 |
-- |
652 |
-- subroutine symmetry_set_field(id, field, errno) |
653 |
-- |
654 |
-- |
655 |
--!This section has been created automatically by the script Abilint (TD). |
656 |
--!Do not modify the following lines by hand. |
657 |
--!End of the abilint section |
658 |
-- |
659 |
-- integer, intent(in) :: id |
660 |
-- real(dp), intent(in) :: field(3) |
661 |
-- integer, intent(out) :: errno |
662 |
-- |
663 |
-- type(symmetry_list), pointer :: token |
664 |
-- |
665 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set field." |
666 |
-- |
667 |
-- errno = AB6_NO_ERROR |
668 |
-- call get_item(token, id) |
669 |
-- if (.not. associated(token)) then |
670 |
-- errno = AB6_ERROR_OBJ |
671 |
-- return |
672 |
-- end if |
673 |
-- |
674 |
-- token%data%withField = .true. |
675 |
-- token%data%field = field |
676 |
-- |
677 |
-- ! We unset all the computed symmetries |
678 |
-- token%data%nBravSym = -1 |
679 |
-- if (token%data%auto) then |
680 |
-- token%data%nSym = 0 |
681 |
-- end if |
682 |
-- end subroutine symmetry_set_field |
683 |
-- |
684 |
-- subroutine symmetry_set_jellium(id, jellium, errno) |
685 |
-- |
686 |
-- |
687 |
--!This section has been created automatically by the script Abilint (TD). |
688 |
--!Do not modify the following lines by hand. |
689 |
--!End of the abilint section |
690 |
-- |
691 |
-- integer, intent(in) :: id |
692 |
-- logical, intent(in) :: jellium |
693 |
-- integer, intent(out) :: errno |
694 |
-- |
695 |
-- type(symmetry_list), pointer :: token |
696 |
-- |
697 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set jellium." |
698 |
-- |
699 |
-- errno = AB6_NO_ERROR |
700 |
-- call get_item(token, id) |
701 |
-- if (.not. associated(token)) then |
702 |
-- errno = AB6_ERROR_OBJ |
703 |
-- return |
704 |
-- end if |
705 |
-- |
706 |
-- token%data%withJellium = jellium |
707 |
-- |
708 |
-- ! We unset only the symmetries |
709 |
-- if (token%data%auto) then |
710 |
-- token%data%nSym = 0 |
711 |
-- end if |
712 |
-- end subroutine symmetry_set_jellium |
713 |
-- |
714 |
-- subroutine symmetry_set_periodicity(id, periodic, errno) |
715 |
-- |
716 |
-- |
717 |
--!This section has been created automatically by the script Abilint (TD). |
718 |
--!Do not modify the following lines by hand. |
719 |
--!End of the abilint section |
720 |
-- |
721 |
-- integer, intent(in) :: id |
722 |
-- logical, intent(in) :: periodic(3) |
723 |
-- integer, intent(out) :: errno |
724 |
-- |
725 |
-- type(symmetry_list), pointer :: token |
726 |
-- |
727 |
-- if (AB_DBG) write(0,*) "AB symmetry: call set periodicity." |
728 |
-- if (AB_DBG) write(0, "(A,3L1,A)") " (", periodic, ")" |
729 |
-- |
730 |
-- errno = AB6_NO_ERROR |
731 |
-- call get_item(token, id) |
732 |
-- if (.not. associated(token)) then |
733 |
-- errno = AB6_ERROR_OBJ |
734 |
-- return |
735 |
-- end if |
736 |
-- |
737 |
-- token%data%vacuum = 0 |
738 |
-- if (.not. periodic(1)) token%data%vacuum(1) = 1 |
739 |
-- if (.not. periodic(2)) token%data%vacuum(2) = 1 |
740 |
-- if (.not. periodic(3)) token%data%vacuum(3) = 1 |
741 |
-- end subroutine symmetry_set_periodicity |
742 |
-- |
743 |
-- |
744 |
-- |
745 |
-- |
746 |
-- |
747 |
-- subroutine symmetry_get_n_atoms(id, nAtoms, errno) |
748 |
-- !scalars |
749 |
-- |
750 |
--!This section has been created automatically by the script Abilint (TD). |
751 |
--!Do not modify the following lines by hand. |
752 |
--!End of the abilint section |
753 |
-- |
754 |
-- integer, intent(in) :: id |
755 |
-- integer, intent(out) :: errno |
756 |
-- integer, intent(out) :: nAtoms |
757 |
-- |
758 |
-- type(symmetry_list), pointer :: token |
759 |
-- |
760 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get nAtoms." |
761 |
-- |
762 |
-- errno = AB6_NO_ERROR |
763 |
-- call get_item(token, id) |
764 |
-- if (.not. associated(token)) then |
765 |
-- errno = AB6_ERROR_OBJ |
766 |
-- return |
767 |
-- end if |
768 |
-- |
769 |
-- nAtoms = token%data%nAtoms |
770 |
-- end subroutine symmetry_get_n_atoms |
771 |
-- |
772 |
-- subroutine compute_bravais(sym) |
773 |
-- |
774 |
-- |
775 |
--!This section has been created automatically by the script Abilint (TD). |
776 |
--!Do not modify the following lines by hand. |
777 |
-- use interfaces_42_geometry |
778 |
--!End of the abilint section |
779 |
-- |
780 |
-- type(symmetry_type), intent(inout) :: sym |
781 |
-- |
782 |
-- integer :: berryopt |
783 |
-- |
784 |
-- ! We do the computation |
785 |
-- if (sym%withField) then |
786 |
-- berryopt = 4 |
787 |
-- else |
788 |
-- berryopt = 0 |
789 |
-- end if |
790 |
-- if (AB_DBG) write(0,*) "AB symmetry: call ABINIT symlatt." |
791 |
-- call symlatt(sym%bravais, AB6_MAX_SYMMETRIES, & |
792 |
-- & sym%nBravSym, sym%bravSym, sym%rprimd, sym%tolsym) |
793 |
-- if (AB_DBG) write(0,*) "AB symmetry: call ABINIT OK." |
794 |
-- if (AB_DBG) write(0, "(A,I3)") " nSymBrav :", sym%nBravSym |
795 |
-- if (AB_DBG) write(0, "(A,I3)") " holohedry:", sym%bravais(1) |
796 |
-- if (AB_DBG) write(0, "(A,I3)") " center :", sym%bravais(2) |
797 |
-- end subroutine compute_bravais |
798 |
-- |
799 |
-- subroutine symmetry_get_bravais(id, bravais, holohedry, center, & |
800 |
-- & nBravSym, bravSym, errno) |
801 |
-- !scalars |
802 |
-- |
803 |
--!This section has been created automatically by the script Abilint (TD). |
804 |
--!Do not modify the following lines by hand. |
805 |
--!End of the abilint section |
806 |
-- |
807 |
-- integer, intent(in) :: id |
808 |
-- integer, intent(out) :: errno |
809 |
-- integer, intent(out) :: nBravSym, holohedry, center |
810 |
-- !arrays |
811 |
-- integer, intent(out) :: bravais(3,3), bravSym(3, 3, AB6_MAX_SYMMETRIES) |
812 |
-- |
813 |
-- type(symmetry_list), pointer :: token |
814 |
-- |
815 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get bravais." |
816 |
-- |
817 |
-- errno = AB6_NO_ERROR |
818 |
-- call get_item(token, id) |
819 |
-- if (.not. associated(token)) then |
820 |
-- errno = AB6_ERROR_OBJ |
821 |
-- return |
822 |
-- end if |
823 |
-- |
824 |
-- if (token%data%nBravSym < 0) then |
825 |
-- ! We do the computation |
826 |
-- call compute_bravais(token%data) |
827 |
-- end if |
828 |
-- |
829 |
-- holohedry = token%data%bravais(1) |
830 |
-- center = token%data%bravais(2) |
831 |
-- bravais = reshape(token%data%bravais(3:11), (/ 3,3 /)) |
832 |
-- nBravSym = token%data%nBravSym |
833 |
-- bravSym(:, :, 1:nBravSym) = token%data%bravSym(:, :, 1:nBravSym) |
834 |
-- end subroutine symmetry_get_bravais |
835 |
-- |
836 |
-- subroutine compute_matrices(sym, errno) |
837 |
-- |
838 |
-- |
839 |
--!This section has been created automatically by the script Abilint (TD). |
840 |
--!Do not modify the following lines by hand. |
841 |
-- use interfaces_42_geometry |
842 |
--!End of the abilint section |
843 |
-- |
844 |
-- type(symmetry_type), intent(inout) :: sym |
845 |
-- integer, intent(out) :: errno |
846 |
-- |
847 |
-- integer :: berryopt, jellslab, noncol |
848 |
-- integer :: use_inversion |
849 |
-- real(dp), pointer :: spinAt_(:,:) |
850 |
-- integer :: sym_(3, 3, AB6_MAX_SYMMETRIES) |
851 |
-- real(dp) :: transNon_(3, AB6_MAX_SYMMETRIES) |
852 |
-- integer :: symAfm_(AB6_MAX_SYMMETRIES) |
853 |
-- |
854 |
-- errno = AB6_NO_ERROR |
855 |
-- |
856 |
-- if (sym%nBravSym < 0) then |
857 |
-- ! We do the computation of the Bravais part. |
858 |
-- call compute_bravais(sym) |
859 |
-- end if |
860 |
-- |
861 |
-- if (sym%withField) then |
862 |
-- berryopt = 4 |
863 |
-- else |
864 |
-- berryopt = 0 |
865 |
-- end if |
866 |
-- if (sym%withJellium) then |
867 |
-- jellslab = 1 |
868 |
-- else |
869 |
-- jellslab = 0 |
870 |
-- end if |
871 |
-- if (sym%withSpin == 4) then |
872 |
-- noncol = 1 |
873 |
-- spinAt_ => sym%spinAt |
874 |
-- else if (sym%withSpin == 2) then |
875 |
-- noncol = 0 |
876 |
-- spinAt_ => sym%spinAt |
877 |
-- else |
878 |
-- noncol = 0 |
879 |
-- allocate(spinAt_(3, sym%nAtoms)) |
880 |
-- spinAt_ = 0 |
881 |
-- end if |
882 |
-- if (sym%withSpinOrbit) then |
883 |
-- use_inversion = 0 |
884 |
-- else |
885 |
-- use_inversion = 1 |
886 |
-- end if |
887 |
-- |
888 |
-- if (sym%nsym == 0) then |
889 |
-- if (AB_DBG) write(0,*) "AB symmetry: call ABINIT symfind." |
890 |
-- call symfind(berryopt, sym%field, sym%gprimd, jellslab, AB6_MAX_SYMMETRIES, & |
891 |
-- & sym%nAtoms, noncol, sym%nBravSym, sym%nSym, sym%bravSym, spinAt_, & |
892 |
-- & symAfm_, sym_, transNon_, sym%tolsym, sym%typeAt, & |
893 |
-- & use_inversion, sym%xRed) |
894 |
-- if (AB_DBG) write(0,*) "AB symmetry: call ABINIT OK." |
895 |
-- if (AB_DBG) write(0, "(A,I3)") " nSym:", sym%nSym |
896 |
-- if (associated(sym%sym)) deallocate(sym%sym) |
897 |
-- if (associated(sym%symAfm)) deallocate(sym%symAfm) |
898 |
-- if (associated(sym%transNon)) deallocate(sym%transNon) |
899 |
-- allocate(sym%sym(3, 3, sym%nSym)) |
900 |
-- sym%sym(:,:,:) = sym_(:,:, 1:sym%nSym) |
901 |
-- allocate(sym%symAfm(sym%nSym)) |
902 |
-- sym%symAfm(:) = symAfm_(1:sym%nSym) |
903 |
-- allocate(sym%transNon(3, sym%nSym)) |
904 |
-- sym%transNon(:,:) = transNon_(:, 1:sym%nSym) |
905 |
-- else if (sym%nsym < 0) then |
906 |
-- sym%nsym = -sym%nsym |
907 |
-- sym_(:,:, 1:sym%nSym) = sym%sym(:,:,:) |
908 |
-- transNon_(:, 1:sym%nSym) = sym%transNon(:,:) |
909 |
-- symAfm_(1:sym%nSym) = sym%symAfm(:) |
910 |
-- end if |
911 |
-- |
912 |
-- if (sym%withSpin == 1) then |
913 |
-- deallocate(spinAt_) |
914 |
-- end if |
915 |
-- |
916 |
-- if (AB_DBG) write(0,*) "AB symmetry: call ABINIT symanal." |
917 |
-- call symanal(sym%bravais, 0, sym%genAfm, AB6_MAX_SYMMETRIES, sym%nSym, & |
918 |
-- & sym%pointGroupMagn, sym%rprimd, sym%spaceGroup, symAfm_, & |
919 |
-- & sym_, transNon_, sym%tolsym) |
920 |
-- if (AB_DBG) write(0,*) "AB symmetry: call ABINIT OK." |
921 |
-- sym%transNon(:,:) = transNon_(:, 1:sym%nSym) |
922 |
-- |
923 |
-- if (sym%bravais(1) < 0) then |
924 |
-- sym%multiplicity = 2 |
925 |
-- else |
926 |
-- sym%multiplicity = 1 |
927 |
-- end if |
928 |
-- if (AB_DBG) write(0, "(A,I3)") " multi:", sym%multiplicity |
929 |
-- if (AB_DBG) write(0, "(A,I3)") " space:", sym%spaceGroup |
930 |
-- end subroutine compute_matrices |
931 |
-- |
932 |
-- subroutine symmetry_get_n_sym(id, nSym, errno) |
933 |
-- !scalars |
934 |
-- |
935 |
--!This section has been created automatically by the script Abilint (TD). |
936 |
--!Do not modify the following lines by hand. |
937 |
--!End of the abilint section |
938 |
-- |
939 |
-- integer, intent(in) :: id |
940 |
-- integer, intent(out) :: errno |
941 |
-- integer, intent(out) :: nSym |
942 |
-- |
943 |
-- type(symmetry_list), pointer :: token |
944 |
-- |
945 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get nSym." |
946 |
-- |
947 |
-- errno = AB6_NO_ERROR |
948 |
-- call get_item(token, id) |
949 |
-- if (.not. associated(token)) then |
950 |
-- errno = AB6_ERROR_OBJ |
951 |
-- return |
952 |
-- end if |
953 |
-- |
954 |
-- if (token%data%nSym <= 0) then |
955 |
-- ! We do the computation of the matrix part. |
956 |
-- call compute_matrices(token%data, errno) |
957 |
-- end if |
958 |
-- |
959 |
-- nSym = token%data%nSym |
960 |
-- end subroutine symmetry_get_n_sym |
961 |
-- |
962 |
-- subroutine symmetry_set_n_sym(id, nSym, sym, transNon, symAfm, errno) |
963 |
-- !scalars |
964 |
-- |
965 |
--!This section has been created automatically by the script Abilint (TD). |
966 |
--!Do not modify the following lines by hand. |
967 |
--!End of the abilint section |
968 |
-- |
969 |
-- integer, intent(in) :: id |
970 |
-- integer, intent(in) :: nSym |
971 |
-- integer, intent(in) :: sym(3, 3, nSym) |
972 |
-- real(dp), intent(in) :: transNon(3, nSym) |
973 |
-- integer, intent(in) :: symAfm(nSym) |
974 |
-- integer, intent(out) :: errno |
975 |
-- |
976 |
-- type(symmetry_list), pointer :: token |
977 |
-- |
978 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get nSym." |
979 |
-- |
980 |
-- errno = AB6_NO_ERROR |
981 |
-- call get_item(token, id) |
982 |
-- if (.not. associated(token)) then |
983 |
-- errno = AB6_ERROR_OBJ |
984 |
-- return |
985 |
-- end if |
986 |
-- |
987 |
-- if (nSym <= 0) then |
988 |
-- errno = AB6_ERROR_ARG |
989 |
-- return |
990 |
-- else |
991 |
-- allocate(token%data%sym(3, 3, nSym)) |
992 |
-- token%data%sym(:,:,:) = sym(:,:,:) |
993 |
-- allocate(token%data%symAfm(nSym)) |
994 |
-- token%data%symAfm(:) = symAfm(:) |
995 |
-- allocate(token%data%transNon(3, nSym)) |
996 |
-- token%data%transNon(:,:) = transNon(:,:) |
997 |
-- |
998 |
-- token%data%auto = .false. |
999 |
-- token%data%nsym = -nSym |
1000 |
-- end if |
1001 |
-- |
1002 |
-- ! We do the computation of the matrix part. |
1003 |
-- call compute_matrices(token%data, errno) |
1004 |
-- end subroutine symmetry_set_n_sym |
1005 |
-- |
1006 |
-- subroutine symmetry_get_matrices(id, nSym, sym, transNon, symAfm, errno) |
1007 |
-- |
1008 |
-- |
1009 |
--!This section has been created automatically by the script Abilint (TD). |
1010 |
--!Do not modify the following lines by hand. |
1011 |
--!End of the abilint section |
1012 |
-- |
1013 |
-- integer, intent(in) :: id |
1014 |
-- integer, intent(out) :: errno |
1015 |
-- integer, intent(out) :: nSym |
1016 |
-- integer, intent(out) :: sym(3, 3, AB6_MAX_SYMMETRIES) |
1017 |
-- integer, intent(out) :: symAfm(AB6_MAX_SYMMETRIES) |
1018 |
-- real(dp), intent(out) :: transNon(3, AB6_MAX_SYMMETRIES) |
1019 |
-- |
1020 |
-- type(symmetry_list), pointer :: token |
1021 |
-- |
1022 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get matrices." |
1023 |
-- |
1024 |
-- errno = AB6_NO_ERROR |
1025 |
-- call get_item(token, id) |
1026 |
-- if (.not. associated(token)) then |
1027 |
-- errno = AB6_ERROR_OBJ |
1028 |
-- return |
1029 |
-- end if |
1030 |
-- |
1031 |
-- if (token%data%nSym <= 0) then |
1032 |
-- ! We do the computation of the matrix part. |
1033 |
-- call compute_matrices(token%data, errno) |
1034 |
-- end if |
1035 |
-- |
1036 |
-- nSym = token%data%nSym |
1037 |
-- sym(:, :, 1:nSym) = token%data%sym(:, :,:) |
1038 |
-- symAfm(1:nSym) = token%data%symAfm(:) |
1039 |
-- transNon(:, 1:nSym) = token%data%transNon(:,:) |
1040 |
-- end subroutine symmetry_get_matrices |
1041 |
-- |
1042 |
-- subroutine symmetry_get_matrices_p(id, nSym, sym, transNon, symAfm, errno) |
1043 |
-- |
1044 |
-- |
1045 |
--!This section has been created automatically by the script Abilint (TD). |
1046 |
--!Do not modify the following lines by hand. |
1047 |
--!End of the abilint section |
1048 |
-- |
1049 |
-- integer, intent(in) :: id |
1050 |
-- integer, intent(out) :: errno |
1051 |
-- integer, intent(out) :: nSym |
1052 |
-- integer, pointer :: sym(:,:,:) |
1053 |
-- integer, pointer :: symAfm(:) |
1054 |
-- real(dp), pointer :: transNon(:,:) |
1055 |
-- |
1056 |
-- type(symmetry_list), pointer :: token |
1057 |
-- |
1058 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get matrices as pointers." |
1059 |
-- |
1060 |
-- errno = AB6_NO_ERROR |
1061 |
-- call get_item(token, id) |
1062 |
-- if (.not. associated(token)) then |
1063 |
-- errno = AB6_ERROR_OBJ |
1064 |
-- return |
1065 |
-- end if |
1066 |
-- |
1067 |
-- if (token%data%nSym <= 0) then |
1068 |
-- ! We do the computation of the matrix part. |
1069 |
-- call compute_matrices(token%data, errno) |
1070 |
-- end if |
1071 |
-- |
1072 |
-- nSym = token%data%nSym |
1073 |
-- sym => token%data%sym |
1074 |
-- symAfm => token%data%symAfm |
1075 |
-- transNon => token%data%transNon |
1076 |
-- end subroutine symmetry_get_matrices_p |
1077 |
-- |
1078 |
-- subroutine symmetry_get_multiplicity(id, multiplicity, errno) |
1079 |
-- |
1080 |
-- |
1081 |
--!This section has been created automatically by the script Abilint (TD). |
1082 |
--!Do not modify the following lines by hand. |
1083 |
--!End of the abilint section |
1084 |
-- |
1085 |
-- integer, intent(in) :: id |
1086 |
-- integer, intent(out) :: multiplicity, errno |
1087 |
-- |
1088 |
-- type(symmetry_list), pointer :: token |
1089 |
-- |
1090 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get multiplicity." |
1091 |
-- |
1092 |
-- errno = AB6_NO_ERROR |
1093 |
-- call get_item(token, id) |
1094 |
-- if (.not. associated(token)) then |
1095 |
-- errno = AB6_ERROR_OBJ |
1096 |
-- return |
1097 |
-- end if |
1098 |
-- |
1099 |
-- if (token%data%multiplicity < 0) then |
1100 |
-- ! We do the computation of the matrix part. |
1101 |
-- call compute_matrices(token%data, errno) |
1102 |
-- end if |
1103 |
-- multiplicity = token%data%multiplicity |
1104 |
-- end subroutine symmetry_get_multiplicity |
1105 |
-- |
1106 |
-- subroutine symmetry_get_group(id, spaceGroup, spaceGroupId, & |
1107 |
-- & pointGroupMagn, genAfm, errno) |
1108 |
-- |
1109 |
-- |
1110 |
--!This section has been created automatically by the script Abilint (TD). |
1111 |
--!Do not modify the following lines by hand. |
1112 |
-- use interfaces_42_geometry |
1113 |
--!End of the abilint section |
1114 |
-- |
1115 |
-- integer, intent(in) :: id |
1116 |
-- integer, intent(out) :: errno |
1117 |
-- real(dp), intent(out) :: genAfm(3) |
1118 |
-- character(len=15), intent(out) :: spaceGroup |
1119 |
-- integer, intent(out) :: spaceGroupId, pointGroupMagn |
1120 |
-- |
1121 |
-- type(symmetry_list), pointer :: token |
1122 |
-- integer :: sporder |
1123 |
-- character(len=1) :: brvLattice |
1124 |
-- character(len=15) :: ptintsb,ptschsb,schsb,spgrp |
1125 |
-- character(len=35) :: intsbl |
1126 |
-- |
1127 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get group." |
1128 |
-- |
1129 |
-- errno = AB6_NO_ERROR |
1130 |
-- call get_item(token, id) |
1131 |
-- if (.not. associated(token)) then |
1132 |
-- errno = AB6_ERROR_OBJ |
1133 |
-- return |
1134 |
-- end if |
1135 |
-- |
1136 |
-- if (token%data%multiplicity < 0) then |
1137 |
-- ! We do the computation of the matrix part. |
1138 |
-- call compute_matrices(token%data, errno) |
1139 |
-- end if |
1140 |
-- |
1141 |
-- if (token%data%multiplicity /= 1) then |
1142 |
-- errno = AB6_ERROR_SYM_NOT_PRIMITIVE |
1143 |
-- return |
1144 |
-- end if |
1145 |
-- |
1146 |
-- call spgdata(brvLattice,spgrp,intsbl,ptintsb,ptschsb,& |
1147 |
-- & schsb,1,token%data%spaceGroup,sporder,1) |
1148 |
-- |
1149 |
-- write(spaceGroup, "(3A)") brvLattice, " ", trim(spgrp(1:13)) |
1150 |
-- pointGroupMagn = token%data%pointGroupMagn |
1151 |
-- spaceGroupId = token%data%spaceGroup |
1152 |
-- genAfm = token%data%genAfm |
1153 |
-- end subroutine symmetry_get_group |
1154 |
-- |
1155 |
-- subroutine compute_equivalent_atoms(sym) |
1156 |
-- |
1157 |
-- |
1158 |
--!This section has been created automatically by the script Abilint (TD). |
1159 |
--!Do not modify the following lines by hand. |
1160 |
-- use interfaces_32_util |
1161 |
-- use interfaces_42_geometry |
1162 |
--!End of the abilint section |
1163 |
-- |
1164 |
-- type(symmetry_type), intent(inout) :: sym |
1165 |
-- |
1166 |
-- integer, allocatable :: symrec(:,:,:) |
1167 |
-- integer :: isym |
1168 |
-- |
1169 |
-- if (.not. associated(sym%indexingAtoms)) & |
1170 |
-- & allocate(sym%indexingAtoms(4, sym%nSym, sym%nAtoms)) |
1171 |
-- |
1172 |
-- !Get the symmetry matrices in terms of reciprocal basis |
1173 |
-- allocate(symrec(3, 3, sym%nSym)) |
1174 |
-- do isym = 1, sym%nSym, 1 |
1175 |
-- call mati3inv(sym%sym(:,:,isym), symrec(:,:,isym)) |
1176 |
-- end do |
1177 |
-- |
1178 |
-- !Obtain a list of rotated atom labels: |
1179 |
-- call symatm(sym%indexingAtoms, sym%nAtoms, sym%nSym, symrec, & |
1180 |
-- & sym%transNon, sym%tolsym, sym%typeAt, sym%xRed) |
1181 |
-- |
1182 |
-- deallocate(symrec) |
1183 |
-- end subroutine compute_equivalent_atoms |
1184 |
-- |
1185 |
-- subroutine symmetry_get_equivalent_atom(id, equiv, iAtom, errno) |
1186 |
-- |
1187 |
-- |
1188 |
--!This section has been created automatically by the script Abilint (TD). |
1189 |
--!Do not modify the following lines by hand. |
1190 |
--!End of the abilint section |
1191 |
-- |
1192 |
-- integer, intent(in) :: id |
1193 |
-- integer, intent(in) :: iAtom |
1194 |
-- integer, intent(out) :: equiv(4, AB6_MAX_SYMMETRIES) |
1195 |
-- integer, intent(out) :: errno |
1196 |
-- |
1197 |
-- type(symmetry_list), pointer :: token |
1198 |
-- |
1199 |
-- if (AB_DBG) write(0,*) "AB symmetry: call get equivalent." |
1200 |
-- |
1201 |
-- errno = AB6_NO_ERROR |
1202 |
-- call get_item(token, id) |
1203 |
-- if (.not. associated(token)) then |
1204 |
-- errno = AB6_ERROR_OBJ |
1205 |
-- return |
1206 |
-- end if |
1207 |
-- |
1208 |
-- if (iAtom < 1 .or. iAtom > token%data%nAtoms) then |
1209 |
-- errno = AB6_ERROR_ARG |
1210 |
-- return |
1211 |
-- end if |
1212 |
-- |
1213 |
-- if (.not. associated(token%data%indexingAtoms)) then |
1214 |
-- ! We do the computation of the matrix part. |
1215 |
-- call compute_equivalent_atoms(token%data) |
1216 |
-- end if |
1217 |
-- |
1218 |
-- equiv(:, 1:token%data%nSym) = token%data%indexingAtoms(:,:,iAtom) |
1219 |
-- end subroutine symmetry_get_equivalent_atom |
1220 |
-- |
1221 |
--end module m_ab6_symmetry |
1222 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/42_geometry/m_ab7_symmetry.F90 bigdft-abi-1.0.4.new/libABINIT/src/42_geometry/m_ab7_symmetry.F90 |
1223 |
---- bigdft-abi-1.0.4.old/libABINIT/src/42_geometry/m_ab7_symmetry.F90 1970-01-01 01:00:00.000000000 +0100 |
1224 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/42_geometry/m_ab7_symmetry.F90 2013-06-11 16:51:00.000000000 +0200 |
1225 |
-@@ -0,0 +1,1088 @@ |
1226 |
-+!* * Fortran90 source file * |
1227 |
-+!* |
1228 |
-+!* Copyright (c) 2008-2010 ABINIT Group (Damien Caliste) |
1229 |
-+!* All rights reserved. |
1230 |
-+!* |
1231 |
-+!* This file is part of the ABINIT software package. For license information, |
1232 |
-+!* please see the COPYING file in the top-level directory of the ABINIT source |
1233 |
-+!* distribution. |
1234 |
-+!* |
1235 |
-+!* |
1236 |
-+ |
1237 |
-+module m_ab7_symmetry |
1238 |
-+ |
1239 |
-+ use defs_basis |
1240 |
-+ |
1241 |
-+ implicit none |
1242 |
-+ |
1243 |
-+ private |
1244 |
-+ |
1245 |
-+ integer, parameter, public :: AB7_MAX_SYMMETRIES = 384 |
1246 |
-+ |
1247 |
-+ type, public :: symmetry_type |
1248 |
-+ ! The input characteristics |
1249 |
-+ real(dp) :: tolsym |
1250 |
-+ real(dp) :: rprimd(3,3), gprimd(3,3), rmet(3,3) |
1251 |
-+ integer :: nAtoms |
1252 |
-+ integer, pointer :: typeAt(:) |
1253 |
-+ real(dp), pointer :: xRed(:,:) |
1254 |
-+ |
1255 |
-+ logical :: withField |
1256 |
-+ real(dp) :: field(3) |
1257 |
-+ |
1258 |
-+ logical :: withJellium |
1259 |
-+ |
1260 |
-+ integer :: withSpin |
1261 |
-+ real(dp), pointer :: spinAt(:,:) |
1262 |
-+ |
1263 |
-+ logical :: withSpinOrbit |
1264 |
-+ |
1265 |
-+ integer :: vacuum(3) |
1266 |
-+ |
1267 |
-+ ! The output characteristics |
1268 |
-+ ! The bravais parameters |
1269 |
-+ integer :: nBravSym |
1270 |
-+ integer :: bravais(11), bravSym(3, 3, AB7_MAX_SYMMETRIES) |
1271 |
-+ ! The symmetry matrices |
1272 |
-+ logical :: auto |
1273 |
-+ integer :: nSym |
1274 |
-+ integer, pointer :: sym(:,:,:) |
1275 |
-+ real(dp), pointer :: transNon(:,:) |
1276 |
-+ integer, pointer :: symAfm(:) |
1277 |
-+ ! Some additional information |
1278 |
-+ integer :: multiplicity |
1279 |
-+ real(dp) :: genAfm(3) |
1280 |
-+ integer :: spaceGroup, pointGroupMagn |
1281 |
-+ integer, pointer :: indexingAtoms(:,:,:) |
1282 |
-+ end type symmetry_type |
1283 |
-+ |
1284 |
-+ ! We store here a list of symmetry objects to be able to |
1285 |
-+ ! call several symmetry operations on different objects. |
1286 |
-+ ! The simplest portable way to do it, is to create |
1287 |
-+ ! a list of Fortran structure and to use the list index |
1288 |
-+ ! as an identifier that can be given to the other languages. |
1289 |
-+ type, private :: symmetry_list |
1290 |
-+ integer :: id |
1291 |
-+ type(symmetry_list), pointer :: next |
1292 |
-+ type(symmetry_type) :: data |
1293 |
-+ end type symmetry_list |
1294 |
-+ type(symmetry_list), pointer :: my_symmetries |
1295 |
-+ integer :: n_symmetries = 0 |
1296 |
-+ |
1297 |
-+ logical, private, parameter :: AB_DBG = .false. |
1298 |
-+ |
1299 |
-+ public :: symmetry_new |
1300 |
-+ public :: symmetry_free |
1301 |
-+ public :: symmetry_set_tolerance |
1302 |
-+ public :: symmetry_set_lattice |
1303 |
-+ public :: symmetry_set_structure |
1304 |
-+ public :: symmetry_set_collinear_spin |
1305 |
-+ public :: symmetry_set_spin |
1306 |
-+ public :: symmetry_set_spin_orbit |
1307 |
-+ public :: symmetry_set_field |
1308 |
-+ public :: symmetry_set_jellium |
1309 |
-+ public :: symmetry_set_periodicity |
1310 |
-+ public :: symmetry_set_n_sym |
1311 |
-+ |
1312 |
-+ public :: symmetry_get_from_id |
1313 |
-+ public :: symmetry_get_n_atoms |
1314 |
-+ public :: symmetry_get_n_sym |
1315 |
-+ public :: symmetry_get_multiplicity |
1316 |
-+ public :: symmetry_get_bravais |
1317 |
-+ public :: symmetry_get_matrices |
1318 |
-+ public :: symmetry_get_matrices_p |
1319 |
-+ public :: symmetry_get_group |
1320 |
-+ public :: symmetry_get_equivalent_atom |
1321 |
-+ |
1322 |
-+contains |
1323 |
-+ |
1324 |
-+ subroutine new_item(token) |
1325 |
-+ |
1326 |
-+ |
1327 |
-+!This section has been created automatically by the script Abilint (TD). |
1328 |
-+!Do not modify the following lines by hand. |
1329 |
-+!End of the abilint section |
1330 |
-+ |
1331 |
-+ type(symmetry_list), pointer :: token |
1332 |
-+ |
1333 |
-+ ! We allocate a new list token and prepend it. |
1334 |
-+ if (AB_DBG) write(0,*) "AB symmetry: create a new token." |
1335 |
-+ |
1336 |
-+ ! Init case, very first call. |
1337 |
-+ if (n_symmetries == 0) then |
1338 |
-+ nullify(my_symmetries) |
1339 |
-+ end if |
1340 |
-+ |
1341 |
-+ ! Normal treatment. |
1342 |
-+ n_symmetries = n_symmetries + 1 |
1343 |
-+ |
1344 |
-+ allocate(token) |
1345 |
-+ token%id = n_symmetries |
1346 |
-+ call new_symmetry(token%data) |
1347 |
-+ token%next => my_symmetries |
1348 |
-+ |
1349 |
-+ my_symmetries => token |
1350 |
-+ if (AB_DBG) write(0,*) "AB symmetry: creation OK with id ", token%id |
1351 |
-+ end subroutine new_item |
1352 |
-+ |
1353 |
-+ subroutine free_item(token) |
1354 |
-+ |
1355 |
-+ |
1356 |
-+!This section has been created automatically by the script Abilint (TD). |
1357 |
-+!Do not modify the following lines by hand. |
1358 |
-+!End of the abilint section |
1359 |
-+ |
1360 |
-+ type(symmetry_list), pointer :: token |
1361 |
-+ |
1362 |
-+ type(symmetry_list), pointer :: tmp |
1363 |
-+ |
1364 |
-+ if (.not. associated(token)) then |
1365 |
-+ return |
1366 |
-+ end if |
1367 |
-+ |
1368 |
-+ call free_symmetry(token%data) |
1369 |
-+ |
1370 |
-+ if (AB_DBG) write(0,*) "AB symmetry: free request on token ", token%id |
1371 |
-+ ! We remove token from the list. |
1372 |
-+ if (my_symmetries%id == token%id) then |
1373 |
-+ my_symmetries => token%next |
1374 |
-+ else |
1375 |
-+ tmp => my_symmetries |
1376 |
-+ do |
1377 |
-+ if (.not.associated(tmp)) then |
1378 |
-+ return |
1379 |
-+ end if |
1380 |
-+ if (associated(tmp%next) .and. tmp%next%id == token%id) then |
1381 |
-+ exit |
1382 |
-+ end if |
1383 |
-+ tmp => tmp%next |
1384 |
-+ end do |
1385 |
-+ tmp%next => token%next |
1386 |
-+ end if |
1387 |
-+ deallocate(token) |
1388 |
-+ if (AB_DBG) write(0,*) "AB symmetry: free done" |
1389 |
-+ end subroutine free_item |
1390 |
-+ |
1391 |
-+ subroutine get_item(token, id) |
1392 |
-+ |
1393 |
-+ |
1394 |
-+ type(symmetry_list), pointer :: token |
1395 |
-+ integer, intent(in) :: id |
1396 |
-+ |
1397 |
-+ type(symmetry_list), pointer :: tmp |
1398 |
-+ |
1399 |
-+ if (AB_DBG) write(0,*) "AB symmetry: request list element ", id |
1400 |
-+ nullify(token) |
1401 |
-+ |
1402 |
-+ tmp => my_symmetries |
1403 |
-+ do |
1404 |
-+ if (.not. associated(tmp)) then |
1405 |
-+ exit |
1406 |
-+ end if |
1407 |
-+ if (tmp%id == id) then |
1408 |
-+ token => tmp |
1409 |
-+ return |
1410 |
-+ end if |
1411 |
-+ tmp => tmp%next |
1412 |
-+ end do |
1413 |
-+ end subroutine get_item |
1414 |
-+ |
1415 |
-+ subroutine symmetry_get_from_id(sym, id, errno) |
1416 |
-+ |
1417 |
-+ type(symmetry_type), pointer :: sym |
1418 |
-+ integer, intent(in) :: id |
1419 |
-+ integer, intent(out) :: errno |
1420 |
-+ |
1421 |
-+ type(symmetry_list), pointer :: token |
1422 |
-+ |
1423 |
-+ errno = AB7_NO_ERROR |
1424 |
-+ call get_item(token, id) |
1425 |
-+ if (associated(token)) then |
1426 |
-+ sym => token%data |
1427 |
-+ if (sym%nSym <= 0) then |
1428 |
-+ ! We do the computation of the matrix part. |
1429 |
-+ call compute_matrices(sym, errno) |
1430 |
-+ end if |
1431 |
-+ else |
1432 |
-+ errno = AB7_ERROR_OBJ |
1433 |
-+ nullify(sym) |
1434 |
-+ end if |
1435 |
-+ end subroutine symmetry_get_from_id |
1436 |
-+ |
1437 |
-+ subroutine new_symmetry(sym) |
1438 |
-+ |
1439 |
-+ |
1440 |
-+ type(symmetry_type), intent(out) :: sym |
1441 |
-+ |
1442 |
-+ if (AB_DBG) write(0,*) "AB symmetry: create a new symmetry object." |
1443 |
-+ nullify(sym%xRed) |
1444 |
-+ nullify(sym%spinAt) |
1445 |
-+ nullify(sym%typeAt) |
1446 |
-+ sym%tolsym = tol8 |
1447 |
-+ sym%auto = .true. |
1448 |
-+ sym%nSym = 0 |
1449 |
-+ nullify(sym%sym) |
1450 |
-+ nullify(sym%symAfm) |
1451 |
-+ nullify(sym%transNon) |
1452 |
-+ sym%nBravSym = -1 |
1453 |
-+ sym%withField = .false. |
1454 |
-+ sym%withJellium = .false. |
1455 |
-+ sym%withSpin = 1 |
1456 |
-+ sym%withSpinOrbit = .false. |
1457 |
-+ sym%multiplicity = -1 |
1458 |
-+ nullify(sym%indexingAtoms) |
1459 |
-+ sym%vacuum = 0 |
1460 |
-+ end subroutine new_symmetry |
1461 |
-+ |
1462 |
-+ subroutine free_symmetry(sym) |
1463 |
-+ |
1464 |
-+ |
1465 |
-+ type(symmetry_type), intent(inout) :: sym |
1466 |
-+ |
1467 |
-+ if (AB_DBG) write(0,*) "AB symmetry: free a symmetry." |
1468 |
-+ |
1469 |
-+ if (associated(sym%xRed)) deallocate(sym%xRed) |
1470 |
-+ if (associated(sym%spinAt)) deallocate(sym%spinAt) |
1471 |
-+ if (associated(sym%typeAt)) deallocate(sym%typeAt) |
1472 |
-+ if (associated(sym%indexingAtoms)) deallocate(sym%indexingAtoms) |
1473 |
-+ if (associated(sym%sym)) deallocate(sym%sym) |
1474 |
-+ if (associated(sym%symAfm)) deallocate(sym%symAfm) |
1475 |
-+ if (associated(sym%transNon)) deallocate(sym%transNon) |
1476 |
-+ end subroutine free_symmetry |
1477 |
-+ |
1478 |
-+ |
1479 |
-+ |
1480 |
-+ |
1481 |
-+ |
1482 |
-+ subroutine symmetry_new(id) |
1483 |
-+ |
1484 |
-+ |
1485 |
-+!This section has been created automatically by the script Abilint (TD). |
1486 |
-+!Do not modify the following lines by hand. |
1487 |
-+!End of the abilint section |
1488 |
-+ |
1489 |
-+ integer, intent(out) :: id |
1490 |
-+ |
1491 |
-+ type(symmetry_list), pointer :: token |
1492 |
-+ |
1493 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call new symmetry." |
1494 |
-+ call new_item(token) |
1495 |
-+ id = token%id |
1496 |
-+ end subroutine symmetry_new |
1497 |
-+ |
1498 |
-+ subroutine symmetry_free(id) |
1499 |
-+ |
1500 |
-+ |
1501 |
-+!This section has been created automatically by the script Abilint (TD). |
1502 |
-+!Do not modify the following lines by hand. |
1503 |
-+!End of the abilint section |
1504 |
-+ |
1505 |
-+ integer, intent(in) :: id |
1506 |
-+ |
1507 |
-+ type(symmetry_list), pointer :: token |
1508 |
-+ |
1509 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call free symmetry." |
1510 |
-+ |
1511 |
-+ call get_item(token, id) |
1512 |
-+ if (associated(token)) call free_item(token) |
1513 |
-+ end subroutine symmetry_free |
1514 |
-+ |
1515 |
-+ subroutine symmetry_set_tolerance(id, tolsym, errno) |
1516 |
-+ |
1517 |
-+ |
1518 |
-+!This section has been created automatically by the script Abilint (TD). |
1519 |
-+!Do not modify the following lines by hand. |
1520 |
-+!End of the abilint section |
1521 |
-+ |
1522 |
-+ integer, intent(in) :: id |
1523 |
-+ real(dp), intent(in) :: tolsym |
1524 |
-+ integer, intent(out) :: errno |
1525 |
-+ |
1526 |
-+ type(symmetry_list), pointer :: token |
1527 |
-+ |
1528 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set tolerance." |
1529 |
-+ |
1530 |
-+ errno = AB7_NO_ERROR |
1531 |
-+ call get_item(token, id) |
1532 |
-+ if (.not. associated(token)) then |
1533 |
-+ errno = AB7_ERROR_OBJ |
1534 |
-+ return |
1535 |
-+ end if |
1536 |
-+ |
1537 |
-+ token%data%tolsym = tolsym |
1538 |
-+ |
1539 |
-+ ! We unset all the computed symmetries |
1540 |
-+ token%data%nBravSym = -1 |
1541 |
-+ if (token%data%auto) then |
1542 |
-+ token%data%nSym = 0 |
1543 |
-+ end if |
1544 |
-+ end subroutine symmetry_set_tolerance |
1545 |
-+ |
1546 |
-+ subroutine symmetry_set_lattice(id, rprimd, errno) |
1547 |
-+ |
1548 |
-+ |
1549 |
-+!This section has been created automatically by the script Abilint (TD). |
1550 |
-+!Do not modify the following lines by hand. |
1551 |
-+ use interfaces_42_geometry |
1552 |
-+!End of the abilint section |
1553 |
-+ |
1554 |
-+ integer, intent(in) :: id |
1555 |
-+ real(dp), intent(in) :: rprimd(3,3) |
1556 |
-+ integer, intent(out) :: errno |
1557 |
-+ |
1558 |
-+ type(symmetry_list), pointer :: token |
1559 |
-+ real(dp) :: ucvol |
1560 |
-+ real(dp) :: gmet(3,3) |
1561 |
-+ |
1562 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set lattice." |
1563 |
-+ if (AB_DBG) write(0, "(A,3F12.6,A)") " (", rprimd(:,1), ")" |
1564 |
-+ if (AB_DBG) write(0, "(A,3F12.6,A)") " (", rprimd(:,2), ")" |
1565 |
-+ if (AB_DBG) write(0, "(A,3F12.6,A)") " (", rprimd(:,3), ")" |
1566 |
-+ |
1567 |
-+ errno = AB7_NO_ERROR |
1568 |
-+ call get_item(token, id) |
1569 |
-+ if (.not. associated(token)) then |
1570 |
-+ errno = AB7_ERROR_OBJ |
1571 |
-+ return |
1572 |
-+ end if |
1573 |
-+ |
1574 |
-+ token%data%rprimd = rprimd |
1575 |
-+ call metric(gmet, token%data%gprimd, -1, token%data%rmet, rprimd, ucvol) |
1576 |
-+ |
1577 |
-+ ! We unset all the computed symmetries |
1578 |
-+ token%data%nBravSym = -1 |
1579 |
-+ if (token%data%auto) then |
1580 |
-+ token%data%nSym = 0 |
1581 |
-+ end if |
1582 |
-+ end subroutine symmetry_set_lattice |
1583 |
-+ |
1584 |
-+ subroutine symmetry_set_structure(id, nAtoms, typeAt, xRed, errno) |
1585 |
-+ |
1586 |
-+ |
1587 |
-+!This section has been created automatically by the script Abilint (TD). |
1588 |
-+!Do not modify the following lines by hand. |
1589 |
-+!End of the abilint section |
1590 |
-+ |
1591 |
-+ integer, intent(in) :: id |
1592 |
-+ integer, intent(in) :: nAtoms |
1593 |
-+ integer, intent(in) :: typeAt(nAtoms) |
1594 |
-+ real(dp), intent(in) :: xRed(3,nAtoms) |
1595 |
-+ integer, intent(out) :: errno |
1596 |
-+ |
1597 |
-+ type(symmetry_list), pointer :: token |
1598 |
-+ integer :: i |
1599 |
-+ |
1600 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set structure." |
1601 |
-+ if (AB_DBG) write(0, "(A,I3,A)") " ", nAtoms, " atoms" |
1602 |
-+ if (AB_DBG) then |
1603 |
-+ do i = 1, nAtoms, 1 |
1604 |
-+ write(0, "(A,3F12.6,I3)") " ", xRed(:, i), typeAt(i) |
1605 |
-+ end do |
1606 |
-+ end if |
1607 |
-+ |
1608 |
-+ errno = AB7_NO_ERROR |
1609 |
-+ call get_item(token, id) |
1610 |
-+ if (.not. associated(token)) then |
1611 |
-+ errno = AB7_ERROR_OBJ |
1612 |
-+ return |
1613 |
-+ end if |
1614 |
-+ |
1615 |
-+ token%data%nAtoms = nAtoms |
1616 |
-+ allocate(token%data%typeAt(nAtoms)) |
1617 |
-+ token%data%typeAt = typeAt |
1618 |
-+ allocate(token%data%xRed(3, nAtoms)) |
1619 |
-+ token%data%xRed = xRed |
1620 |
-+ |
1621 |
-+ ! We unset only the symmetries |
1622 |
-+ if (token%data%auto) then |
1623 |
-+ token%data%nSym = 0 |
1624 |
-+ end if |
1625 |
-+ if (associated(token%data%indexingAtoms)) deallocate(token%data%indexingAtoms) |
1626 |
-+ end subroutine symmetry_set_structure |
1627 |
-+ |
1628 |
-+ subroutine symmetry_set_spin(id, nAtoms, spinAt, errno) |
1629 |
-+ |
1630 |
-+ |
1631 |
-+!This section has been created automatically by the script Abilint (TD). |
1632 |
-+!Do not modify the following lines by hand. |
1633 |
-+!End of the abilint section |
1634 |
-+ |
1635 |
-+ integer, intent(in) :: id |
1636 |
-+ integer, intent(in) :: nAtoms |
1637 |
-+ real(dp), intent(in) :: spinAt(3,nAtoms) |
1638 |
-+ integer, intent(out) :: errno |
1639 |
-+ |
1640 |
-+ type(symmetry_list), pointer :: token |
1641 |
-+ integer :: i |
1642 |
-+ |
1643 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set spin." |
1644 |
-+ if (AB_DBG) then |
1645 |
-+ do i = 1, nAtoms, 1 |
1646 |
-+ write(0, "(A,3F12.6)") " ", spinAt(:, i) |
1647 |
-+ end do |
1648 |
-+ end if |
1649 |
-+ |
1650 |
-+ errno = AB7_NO_ERROR |
1651 |
-+ call get_item(token, id) |
1652 |
-+ if (.not. associated(token)) then |
1653 |
-+ errno = AB7_ERROR_OBJ |
1654 |
-+ return |
1655 |
-+ end if |
1656 |
-+ if (token%data%nAtoms /= nAtoms) then |
1657 |
-+ errno = AB7_ERROR_ARG |
1658 |
-+ return |
1659 |
-+ end if |
1660 |
-+ |
1661 |
-+ token%data%withSpin = 4 |
1662 |
-+ allocate(token%data%spinAt(3, nAtoms)) |
1663 |
-+ token%data%spinAt = spinAt |
1664 |
-+ |
1665 |
-+ ! We unset only the symmetries |
1666 |
-+ if (token%data%auto) then |
1667 |
-+ token%data%nSym = 0 |
1668 |
-+ end if |
1669 |
-+ end subroutine symmetry_set_spin |
1670 |
-+ |
1671 |
-+ subroutine symmetry_set_collinear_spin(id, nAtoms, spinAt, errno) |
1672 |
-+ |
1673 |
-+ |
1674 |
-+!This section has been created automatically by the script Abilint (TD). |
1675 |
-+!Do not modify the following lines by hand. |
1676 |
-+!End of the abilint section |
1677 |
-+ |
1678 |
-+ integer, intent(in) :: id |
1679 |
-+ integer, intent(in) :: nAtoms |
1680 |
-+ integer, intent(in) :: spinAt(nAtoms) |
1681 |
-+ integer, intent(out) :: errno |
1682 |
-+ |
1683 |
-+ type(symmetry_list), pointer :: token |
1684 |
-+ integer :: i |
1685 |
-+ |
1686 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set collinear spin." |
1687 |
-+ if (AB_DBG) then |
1688 |
-+ do i = 1, nAtoms, 1 |
1689 |
-+ write(0, "(A,I3)") " ", spinAt(i) |
1690 |
-+ end do |
1691 |
-+ end if |
1692 |
-+ |
1693 |
-+ errno = AB7_NO_ERROR |
1694 |
-+ call get_item(token, id) |
1695 |
-+ if (.not. associated(token)) then |
1696 |
-+ errno = AB7_ERROR_OBJ |
1697 |
-+ return |
1698 |
-+ end if |
1699 |
-+ if (token%data%nAtoms /= nAtoms) then |
1700 |
-+ errno = AB7_ERROR_ARG |
1701 |
-+ return |
1702 |
-+ end if |
1703 |
-+ |
1704 |
-+ token%data%withSpin = 2 |
1705 |
-+ allocate(token%data%spinAt(1, nAtoms)) |
1706 |
-+ token%data%spinAt = real(reshape(spinAt, (/ 1, nAtoms /)), dp) |
1707 |
-+ |
1708 |
-+ ! We unset only the symmetries |
1709 |
-+ if (token%data%auto) then |
1710 |
-+ token%data%nSym = 0 |
1711 |
-+ end if |
1712 |
-+ end subroutine symmetry_set_collinear_spin |
1713 |
-+ |
1714 |
-+ subroutine symmetry_set_spin_orbit(id, withSpinOrbit, errno) |
1715 |
-+ |
1716 |
-+ |
1717 |
-+!This section has been created automatically by the script Abilint (TD). |
1718 |
-+!Do not modify the following lines by hand. |
1719 |
-+!End of the abilint section |
1720 |
-+ |
1721 |
-+ integer, intent(in) :: id |
1722 |
-+ logical, intent(in) :: withSpinOrbit |
1723 |
-+ integer, intent(out) :: errno |
1724 |
-+ |
1725 |
-+ type(symmetry_list), pointer :: token |
1726 |
-+ |
1727 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set spin orbit." |
1728 |
-+ |
1729 |
-+ errno = AB7_NO_ERROR |
1730 |
-+ call get_item(token, id) |
1731 |
-+ if (.not. associated(token)) then |
1732 |
-+ errno = AB7_ERROR_OBJ |
1733 |
-+ return |
1734 |
-+ end if |
1735 |
-+ |
1736 |
-+ token%data%withSpinOrbit = withSpinOrbit |
1737 |
-+ |
1738 |
-+ ! We unset only the symmetries |
1739 |
-+ if (token%data%auto) then |
1740 |
-+ token%data%nSym = 0 |
1741 |
-+ end if |
1742 |
-+ end subroutine symmetry_set_spin_orbit |
1743 |
-+ |
1744 |
-+ subroutine symmetry_set_field(id, field, errno) |
1745 |
-+ |
1746 |
-+ |
1747 |
-+!This section has been created automatically by the script Abilint (TD). |
1748 |
-+!Do not modify the following lines by hand. |
1749 |
-+!End of the abilint section |
1750 |
-+ |
1751 |
-+ integer, intent(in) :: id |
1752 |
-+ real(dp), intent(in) :: field(3) |
1753 |
-+ integer, intent(out) :: errno |
1754 |
-+ |
1755 |
-+ type(symmetry_list), pointer :: token |
1756 |
-+ |
1757 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set field." |
1758 |
-+ |
1759 |
-+ errno = AB7_NO_ERROR |
1760 |
-+ call get_item(token, id) |
1761 |
-+ if (.not. associated(token)) then |
1762 |
-+ errno = AB7_ERROR_OBJ |
1763 |
-+ return |
1764 |
-+ end if |
1765 |
-+ |
1766 |
-+ token%data%withField = .true. |
1767 |
-+ token%data%field = field |
1768 |
-+ |
1769 |
-+ ! We unset all the computed symmetries |
1770 |
-+ token%data%nBravSym = -1 |
1771 |
-+ if (token%data%auto) then |
1772 |
-+ token%data%nSym = 0 |
1773 |
-+ end if |
1774 |
-+ end subroutine symmetry_set_field |
1775 |
-+ |
1776 |
-+ subroutine symmetry_set_jellium(id, jellium, errno) |
1777 |
-+ |
1778 |
-+ |
1779 |
-+!This section has been created automatically by the script Abilint (TD). |
1780 |
-+!Do not modify the following lines by hand. |
1781 |
-+!End of the abilint section |
1782 |
-+ |
1783 |
-+ integer, intent(in) :: id |
1784 |
-+ logical, intent(in) :: jellium |
1785 |
-+ integer, intent(out) :: errno |
1786 |
-+ |
1787 |
-+ type(symmetry_list), pointer :: token |
1788 |
-+ |
1789 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set jellium." |
1790 |
-+ |
1791 |
-+ errno = AB7_NO_ERROR |
1792 |
-+ call get_item(token, id) |
1793 |
-+ if (.not. associated(token)) then |
1794 |
-+ errno = AB7_ERROR_OBJ |
1795 |
-+ return |
1796 |
-+ end if |
1797 |
-+ |
1798 |
-+ token%data%withJellium = jellium |
1799 |
-+ |
1800 |
-+ ! We unset only the symmetries |
1801 |
-+ if (token%data%auto) then |
1802 |
-+ token%data%nSym = 0 |
1803 |
-+ end if |
1804 |
-+ end subroutine symmetry_set_jellium |
1805 |
-+ |
1806 |
-+ subroutine symmetry_set_periodicity(id, periodic, errno) |
1807 |
-+ |
1808 |
-+ |
1809 |
-+!This section has been created automatically by the script Abilint (TD). |
1810 |
-+!Do not modify the following lines by hand. |
1811 |
-+!End of the abilint section |
1812 |
-+ |
1813 |
-+ integer, intent(in) :: id |
1814 |
-+ logical, intent(in) :: periodic(3) |
1815 |
-+ integer, intent(out) :: errno |
1816 |
-+ |
1817 |
-+ type(symmetry_list), pointer :: token |
1818 |
-+ |
1819 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call set periodicity." |
1820 |
-+ if (AB_DBG) write(0, "(A,3L1,A)") " (", periodic, ")" |
1821 |
-+ |
1822 |
-+ errno = AB7_NO_ERROR |
1823 |
-+ call get_item(token, id) |
1824 |
-+ if (.not. associated(token)) then |
1825 |
-+ errno = AB7_ERROR_OBJ |
1826 |
-+ return |
1827 |
-+ end if |
1828 |
-+ |
1829 |
-+ token%data%vacuum = 0 |
1830 |
-+ if (.not. periodic(1)) token%data%vacuum(1) = 1 |
1831 |
-+ if (.not. periodic(2)) token%data%vacuum(2) = 1 |
1832 |
-+ if (.not. periodic(3)) token%data%vacuum(3) = 1 |
1833 |
-+ end subroutine symmetry_set_periodicity |
1834 |
-+ |
1835 |
-+ |
1836 |
-+ |
1837 |
-+ |
1838 |
-+ |
1839 |
-+ subroutine symmetry_get_n_atoms(id, nAtoms, errno) |
1840 |
-+ !scalars |
1841 |
-+ |
1842 |
-+!This section has been created automatically by the script Abilint (TD). |
1843 |
-+!Do not modify the following lines by hand. |
1844 |
-+!End of the abilint section |
1845 |
-+ |
1846 |
-+ integer, intent(in) :: id |
1847 |
-+ integer, intent(out) :: errno |
1848 |
-+ integer, intent(out) :: nAtoms |
1849 |
-+ |
1850 |
-+ type(symmetry_list), pointer :: token |
1851 |
-+ |
1852 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get nAtoms." |
1853 |
-+ |
1854 |
-+ errno = AB7_NO_ERROR |
1855 |
-+ call get_item(token, id) |
1856 |
-+ if (.not. associated(token)) then |
1857 |
-+ errno = AB7_ERROR_OBJ |
1858 |
-+ return |
1859 |
-+ end if |
1860 |
-+ |
1861 |
-+ nAtoms = token%data%nAtoms |
1862 |
-+ end subroutine symmetry_get_n_atoms |
1863 |
-+ |
1864 |
-+ subroutine compute_bravais(sym) |
1865 |
-+ |
1866 |
-+ |
1867 |
-+!This section has been created automatically by the script Abilint (TD). |
1868 |
-+!Do not modify the following lines by hand. |
1869 |
-+ use interfaces_42_geometry |
1870 |
-+!End of the abilint section |
1871 |
-+ |
1872 |
-+ type(symmetry_type), intent(inout) :: sym |
1873 |
-+ |
1874 |
-+ integer :: berryopt |
1875 |
-+ |
1876 |
-+ ! We do the computation |
1877 |
-+ if (sym%withField) then |
1878 |
-+ berryopt = 4 |
1879 |
-+ else |
1880 |
-+ berryopt = 0 |
1881 |
-+ end if |
1882 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call ABINIT symlatt." |
1883 |
-+ call symlatt(sym%bravais, AB7_MAX_SYMMETRIES, & |
1884 |
-+ & sym%nBravSym, sym%bravSym, sym%rprimd, sym%tolsym) |
1885 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call ABINIT OK." |
1886 |
-+ if (AB_DBG) write(0, "(A,I3)") " nSymBrav :", sym%nBravSym |
1887 |
-+ if (AB_DBG) write(0, "(A,I3)") " holohedry:", sym%bravais(1) |
1888 |
-+ if (AB_DBG) write(0, "(A,I3)") " center :", sym%bravais(2) |
1889 |
-+ end subroutine compute_bravais |
1890 |
-+ |
1891 |
-+ subroutine symmetry_get_bravais(id, bravais, holohedry, center, & |
1892 |
-+ & nBravSym, bravSym, errno) |
1893 |
-+ !scalars |
1894 |
-+ |
1895 |
-+!This section has been created automatically by the script Abilint (TD). |
1896 |
-+!Do not modify the following lines by hand. |
1897 |
-+!End of the abilint section |
1898 |
-+ |
1899 |
-+ integer, intent(in) :: id |
1900 |
-+ integer, intent(out) :: errno |
1901 |
-+ integer, intent(out) :: nBravSym, holohedry, center |
1902 |
-+ !arrays |
1903 |
-+ integer, intent(out) :: bravais(3,3), bravSym(3, 3, AB7_MAX_SYMMETRIES) |
1904 |
-+ |
1905 |
-+ type(symmetry_list), pointer :: token |
1906 |
-+ |
1907 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get bravais." |
1908 |
-+ |
1909 |
-+ errno = AB7_NO_ERROR |
1910 |
-+ call get_item(token, id) |
1911 |
-+ if (.not. associated(token)) then |
1912 |
-+ errno = AB7_ERROR_OBJ |
1913 |
-+ return |
1914 |
-+ end if |
1915 |
-+ |
1916 |
-+ if (token%data%nBravSym < 0) then |
1917 |
-+ ! We do the computation |
1918 |
-+ call compute_bravais(token%data) |
1919 |
-+ end if |
1920 |
-+ |
1921 |
-+ holohedry = token%data%bravais(1) |
1922 |
-+ center = token%data%bravais(2) |
1923 |
-+ bravais = reshape(token%data%bravais(3:11), (/ 3,3 /)) |
1924 |
-+ nBravSym = token%data%nBravSym |
1925 |
-+ bravSym(:, :, 1:nBravSym) = token%data%bravSym(:, :, 1:nBravSym) |
1926 |
-+ end subroutine symmetry_get_bravais |
1927 |
-+ |
1928 |
-+ subroutine compute_matrices(sym, errno) |
1929 |
-+ |
1930 |
-+ |
1931 |
-+!This section has been created automatically by the script Abilint (TD). |
1932 |
-+!Do not modify the following lines by hand. |
1933 |
-+ use interfaces_42_geometry |
1934 |
-+!End of the abilint section |
1935 |
-+ |
1936 |
-+ type(symmetry_type), intent(inout) :: sym |
1937 |
-+ integer, intent(out) :: errno |
1938 |
-+ |
1939 |
-+ integer :: berryopt, jellslab, noncol |
1940 |
-+ integer :: use_inversion |
1941 |
-+ real(dp), pointer :: spinAt_(:,:) |
1942 |
-+ integer :: sym_(3, 3, AB7_MAX_SYMMETRIES) |
1943 |
-+ real(dp) :: transNon_(3, AB7_MAX_SYMMETRIES) |
1944 |
-+ integer :: symAfm_(AB7_MAX_SYMMETRIES) |
1945 |
-+ |
1946 |
-+ errno = AB7_NO_ERROR |
1947 |
-+ |
1948 |
-+ if (sym%nBravSym < 0) then |
1949 |
-+ ! We do the computation of the Bravais part. |
1950 |
-+ call compute_bravais(sym) |
1951 |
-+ end if |
1952 |
-+ |
1953 |
-+ if (sym%withField) then |
1954 |
-+ berryopt = 4 |
1955 |
-+ else |
1956 |
-+ berryopt = 0 |
1957 |
-+ end if |
1958 |
-+ if (sym%withJellium) then |
1959 |
-+ jellslab = 1 |
1960 |
-+ else |
1961 |
-+ jellslab = 0 |
1962 |
-+ end if |
1963 |
-+ if (sym%withSpin == 4) then |
1964 |
-+ noncol = 1 |
1965 |
-+ spinAt_ => sym%spinAt |
1966 |
-+ else if (sym%withSpin == 2) then |
1967 |
-+ noncol = 0 |
1968 |
-+ spinAt_ => sym%spinAt |
1969 |
-+ else |
1970 |
-+ noncol = 0 |
1971 |
-+ allocate(spinAt_(3, sym%nAtoms)) |
1972 |
-+ spinAt_ = 0 |
1973 |
-+ end if |
1974 |
-+ if (sym%withSpinOrbit) then |
1975 |
-+ use_inversion = 0 |
1976 |
-+ else |
1977 |
-+ use_inversion = 1 |
1978 |
-+ end if |
1979 |
-+ |
1980 |
-+ if (sym%nsym == 0) then |
1981 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call ABINIT symfind." |
1982 |
-+ call symfind(berryopt, sym%field, sym%gprimd, jellslab, AB7_MAX_SYMMETRIES, & |
1983 |
-+ & sym%nAtoms, noncol, sym%nBravSym, sym%nSym, sym%bravSym, spinAt_, & |
1984 |
-+ & symAfm_, sym_, transNon_, sym%tolsym, sym%typeAt, & |
1985 |
-+ & use_inversion, sym%xRed) |
1986 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call ABINIT OK." |
1987 |
-+ if (AB_DBG) write(0, "(A,I3)") " nSym:", sym%nSym |
1988 |
-+ if (associated(sym%sym)) deallocate(sym%sym) |
1989 |
-+ if (associated(sym%symAfm)) deallocate(sym%symAfm) |
1990 |
-+ if (associated(sym%transNon)) deallocate(sym%transNon) |
1991 |
-+ allocate(sym%sym(3, 3, sym%nSym)) |
1992 |
-+ sym%sym(:,:,:) = sym_(:,:, 1:sym%nSym) |
1993 |
-+ allocate(sym%symAfm(sym%nSym)) |
1994 |
-+ sym%symAfm(:) = symAfm_(1:sym%nSym) |
1995 |
-+ allocate(sym%transNon(3, sym%nSym)) |
1996 |
-+ sym%transNon(:,:) = transNon_(:, 1:sym%nSym) |
1997 |
-+ else if (sym%nsym < 0) then |
1998 |
-+ sym%nsym = -sym%nsym |
1999 |
-+ sym_(:,:, 1:sym%nSym) = sym%sym(:,:,:) |
2000 |
-+ transNon_(:, 1:sym%nSym) = sym%transNon(:,:) |
2001 |
-+ symAfm_(1:sym%nSym) = sym%symAfm(:) |
2002 |
-+ end if |
2003 |
-+ |
2004 |
-+ if (sym%withSpin == 1) then |
2005 |
-+ deallocate(spinAt_) |
2006 |
-+ end if |
2007 |
-+ |
2008 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call ABINIT symanal." |
2009 |
-+ call symanal(sym%bravais, 0, sym%genAfm, AB7_MAX_SYMMETRIES, sym%nSym, & |
2010 |
-+ & sym%pointGroupMagn, sym%rprimd, sym%spaceGroup, symAfm_, & |
2011 |
-+ & sym_, transNon_, sym%tolsym) |
2012 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call ABINIT OK." |
2013 |
-+ sym%transNon(:,:) = transNon_(:, 1:sym%nSym) |
2014 |
-+ |
2015 |
-+ if (sym%bravais(1) < 0) then |
2016 |
-+ sym%multiplicity = 2 |
2017 |
-+ else |
2018 |
-+ sym%multiplicity = 1 |
2019 |
-+ end if |
2020 |
-+ if (AB_DBG) write(0, "(A,I3)") " multi:", sym%multiplicity |
2021 |
-+ if (AB_DBG) write(0, "(A,I3)") " space:", sym%spaceGroup |
2022 |
-+ end subroutine compute_matrices |
2023 |
-+ |
2024 |
-+ subroutine symmetry_get_n_sym(id, nSym, errno) |
2025 |
-+ !scalars |
2026 |
-+ |
2027 |
-+!This section has been created automatically by the script Abilint (TD). |
2028 |
-+!Do not modify the following lines by hand. |
2029 |
-+!End of the abilint section |
2030 |
-+ |
2031 |
-+ integer, intent(in) :: id |
2032 |
-+ integer, intent(out) :: errno |
2033 |
-+ integer, intent(out) :: nSym |
2034 |
-+ |
2035 |
-+ type(symmetry_list), pointer :: token |
2036 |
-+ |
2037 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get nSym." |
2038 |
-+ |
2039 |
-+ errno = AB7_NO_ERROR |
2040 |
-+ call get_item(token, id) |
2041 |
-+ if (.not. associated(token)) then |
2042 |
-+ errno = AB7_ERROR_OBJ |
2043 |
-+ return |
2044 |
-+ end if |
2045 |
-+ |
2046 |
-+ if (token%data%nSym <= 0) then |
2047 |
-+ ! We do the computation of the matrix part. |
2048 |
-+ call compute_matrices(token%data, errno) |
2049 |
-+ end if |
2050 |
-+ |
2051 |
-+ nSym = token%data%nSym |
2052 |
-+ end subroutine symmetry_get_n_sym |
2053 |
-+ |
2054 |
-+ subroutine symmetry_set_n_sym(id, nSym, sym, transNon, symAfm, errno) |
2055 |
-+ !scalars |
2056 |
-+ |
2057 |
-+!This section has been created automatically by the script Abilint (TD). |
2058 |
-+!Do not modify the following lines by hand. |
2059 |
-+!End of the abilint section |
2060 |
-+ |
2061 |
-+ integer, intent(in) :: id |
2062 |
-+ integer, intent(in) :: nSym |
2063 |
-+ integer, intent(in) :: sym(3, 3, nSym) |
2064 |
-+ real(dp), intent(in) :: transNon(3, nSym) |
2065 |
-+ integer, intent(in) :: symAfm(nSym) |
2066 |
-+ integer, intent(out) :: errno |
2067 |
-+ |
2068 |
-+ type(symmetry_list), pointer :: token |
2069 |
-+ |
2070 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get nSym." |
2071 |
-+ |
2072 |
-+ errno = AB7_NO_ERROR |
2073 |
-+ call get_item(token, id) |
2074 |
-+ if (.not. associated(token)) then |
2075 |
-+ errno = AB7_ERROR_OBJ |
2076 |
-+ return |
2077 |
-+ end if |
2078 |
-+ |
2079 |
-+ if (nSym <= 0) then |
2080 |
-+ errno = AB7_ERROR_ARG |
2081 |
-+ return |
2082 |
-+ else |
2083 |
-+ allocate(token%data%sym(3, 3, nSym)) |
2084 |
-+ token%data%sym(:,:,:) = sym(:,:,:) |
2085 |
-+ allocate(token%data%symAfm(nSym)) |
2086 |
-+ token%data%symAfm(:) = symAfm(:) |
2087 |
-+ allocate(token%data%transNon(3, nSym)) |
2088 |
-+ token%data%transNon(:,:) = transNon(:,:) |
2089 |
-+ |
2090 |
-+ token%data%auto = .false. |
2091 |
-+ token%data%nsym = -nSym |
2092 |
-+ end if |
2093 |
-+ |
2094 |
-+ ! We do the computation of the matrix part. |
2095 |
-+ call compute_matrices(token%data, errno) |
2096 |
-+ end subroutine symmetry_set_n_sym |
2097 |
-+ |
2098 |
-+ subroutine symmetry_get_matrices(id, nSym, sym, transNon, symAfm, errno) |
2099 |
-+ |
2100 |
-+ |
2101 |
-+!This section has been created automatically by the script Abilint (TD). |
2102 |
-+!Do not modify the following lines by hand. |
2103 |
-+!End of the abilint section |
2104 |
-+ |
2105 |
-+ integer, intent(in) :: id |
2106 |
-+ integer, intent(out) :: errno |
2107 |
-+ integer, intent(out) :: nSym |
2108 |
-+ integer, intent(out) :: sym(3, 3, AB7_MAX_SYMMETRIES) |
2109 |
-+ integer, intent(out) :: symAfm(AB7_MAX_SYMMETRIES) |
2110 |
-+ real(dp), intent(out) :: transNon(3, AB7_MAX_SYMMETRIES) |
2111 |
-+ |
2112 |
-+ type(symmetry_list), pointer :: token |
2113 |
-+ |
2114 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get matrices." |
2115 |
-+ |
2116 |
-+ errno = AB7_NO_ERROR |
2117 |
-+ call get_item(token, id) |
2118 |
-+ if (.not. associated(token)) then |
2119 |
-+ errno = AB7_ERROR_OBJ |
2120 |
-+ return |
2121 |
-+ end if |
2122 |
-+ |
2123 |
-+ if (token%data%nSym <= 0) then |
2124 |
-+ ! We do the computation of the matrix part. |
2125 |
-+ call compute_matrices(token%data, errno) |
2126 |
-+ end if |
2127 |
-+ |
2128 |
-+ nSym = token%data%nSym |
2129 |
-+ sym(:, :, 1:nSym) = token%data%sym(:, :,:) |
2130 |
-+ symAfm(1:nSym) = token%data%symAfm(:) |
2131 |
-+ transNon(:, 1:nSym) = token%data%transNon(:,:) |
2132 |
-+ end subroutine symmetry_get_matrices |
2133 |
-+ |
2134 |
-+ subroutine symmetry_get_matrices_p(id, nSym, sym, transNon, symAfm, errno) |
2135 |
-+ |
2136 |
-+ |
2137 |
-+!This section has been created automatically by the script Abilint (TD). |
2138 |
-+!Do not modify the following lines by hand. |
2139 |
-+!End of the abilint section |
2140 |
-+ |
2141 |
-+ integer, intent(in) :: id |
2142 |
-+ integer, intent(out) :: errno |
2143 |
-+ integer, intent(out) :: nSym |
2144 |
-+ integer, pointer :: sym(:,:,:) |
2145 |
-+ integer, pointer :: symAfm(:) |
2146 |
-+ real(dp), pointer :: transNon(:,:) |
2147 |
-+ |
2148 |
-+ type(symmetry_list), pointer :: token |
2149 |
-+ |
2150 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get matrices as pointers." |
2151 |
-+ |
2152 |
-+ errno = AB7_NO_ERROR |
2153 |
-+ call get_item(token, id) |
2154 |
-+ if (.not. associated(token)) then |
2155 |
-+ errno = AB7_ERROR_OBJ |
2156 |
-+ return |
2157 |
-+ end if |
2158 |
-+ |
2159 |
-+ if (token%data%nSym <= 0) then |
2160 |
-+ ! We do the computation of the matrix part. |
2161 |
-+ call compute_matrices(token%data, errno) |
2162 |
-+ end if |
2163 |
-+ |
2164 |
-+ nSym = token%data%nSym |
2165 |
-+ sym => token%data%sym |
2166 |
-+ symAfm => token%data%symAfm |
2167 |
-+ transNon => token%data%transNon |
2168 |
-+ end subroutine symmetry_get_matrices_p |
2169 |
-+ |
2170 |
-+ subroutine symmetry_get_multiplicity(id, multiplicity, errno) |
2171 |
-+ |
2172 |
-+ |
2173 |
-+!This section has been created automatically by the script Abilint (TD). |
2174 |
-+!Do not modify the following lines by hand. |
2175 |
-+!End of the abilint section |
2176 |
-+ |
2177 |
-+ integer, intent(in) :: id |
2178 |
-+ integer, intent(out) :: multiplicity, errno |
2179 |
-+ |
2180 |
-+ type(symmetry_list), pointer :: token |
2181 |
-+ |
2182 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get multiplicity." |
2183 |
-+ |
2184 |
-+ errno = AB7_NO_ERROR |
2185 |
-+ call get_item(token, id) |
2186 |
-+ if (.not. associated(token)) then |
2187 |
-+ errno = AB7_ERROR_OBJ |
2188 |
-+ return |
2189 |
-+ end if |
2190 |
-+ |
2191 |
-+ if (token%data%multiplicity < 0) then |
2192 |
-+ ! We do the computation of the matrix part. |
2193 |
-+ call compute_matrices(token%data, errno) |
2194 |
-+ end if |
2195 |
-+ multiplicity = token%data%multiplicity |
2196 |
-+ end subroutine symmetry_get_multiplicity |
2197 |
-+ |
2198 |
-+ subroutine symmetry_get_group(id, spaceGroup, spaceGroupId, & |
2199 |
-+ & pointGroupMagn, genAfm, errno) |
2200 |
-+ |
2201 |
-+ |
2202 |
-+!This section has been created automatically by the script Abilint (TD). |
2203 |
-+!Do not modify the following lines by hand. |
2204 |
-+ use interfaces_42_geometry |
2205 |
-+!End of the abilint section |
2206 |
-+ |
2207 |
-+ integer, intent(in) :: id |
2208 |
-+ integer, intent(out) :: errno |
2209 |
-+ real(dp), intent(out) :: genAfm(3) |
2210 |
-+ character(len=15), intent(out) :: spaceGroup |
2211 |
-+ integer, intent(out) :: spaceGroupId, pointGroupMagn |
2212 |
-+ |
2213 |
-+ type(symmetry_list), pointer :: token |
2214 |
-+ integer :: sporder |
2215 |
-+ character(len=1) :: brvLattice |
2216 |
-+ character(len=15) :: ptintsb,ptschsb,schsb,spgrp |
2217 |
-+ character(len=35) :: intsbl |
2218 |
-+ |
2219 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get group." |
2220 |
-+ |
2221 |
-+ errno = AB7_NO_ERROR |
2222 |
-+ call get_item(token, id) |
2223 |
-+ if (.not. associated(token)) then |
2224 |
-+ errno = AB7_ERROR_OBJ |
2225 |
-+ return |
2226 |
-+ end if |
2227 |
-+ |
2228 |
-+ if (token%data%multiplicity < 0) then |
2229 |
-+ ! We do the computation of the matrix part. |
2230 |
-+ call compute_matrices(token%data, errno) |
2231 |
-+ end if |
2232 |
-+ |
2233 |
-+ if (token%data%multiplicity /= 1) then |
2234 |
-+ errno = AB7_ERROR_SYM_NOT_PRIMITIVE |
2235 |
-+ return |
2236 |
-+ end if |
2237 |
-+ |
2238 |
-+ call spgdata(brvLattice,spgrp,intsbl,ptintsb,ptschsb,& |
2239 |
-+ & schsb,1,token%data%spaceGroup,sporder,1) |
2240 |
-+ |
2241 |
-+ write(spaceGroup, "(3A)") brvLattice, " ", trim(spgrp(1:13)) |
2242 |
-+ pointGroupMagn = token%data%pointGroupMagn |
2243 |
-+ spaceGroupId = token%data%spaceGroup |
2244 |
-+ genAfm = token%data%genAfm |
2245 |
-+ end subroutine symmetry_get_group |
2246 |
-+ |
2247 |
-+ subroutine compute_equivalent_atoms(sym) |
2248 |
-+ |
2249 |
-+ |
2250 |
-+!This section has been created automatically by the script Abilint (TD). |
2251 |
-+!Do not modify the following lines by hand. |
2252 |
-+ use interfaces_32_util |
2253 |
-+ use interfaces_42_geometry |
2254 |
-+!End of the abilint section |
2255 |
-+ |
2256 |
-+ type(symmetry_type), intent(inout) :: sym |
2257 |
-+ |
2258 |
-+ integer, allocatable :: symrec(:,:,:) |
2259 |
-+ integer :: isym |
2260 |
-+ |
2261 |
-+ if (.not. associated(sym%indexingAtoms)) & |
2262 |
-+ & allocate(sym%indexingAtoms(4, sym%nSym, sym%nAtoms)) |
2263 |
-+ |
2264 |
-+ !Get the symmetry matrices in terms of reciprocal basis |
2265 |
-+ allocate(symrec(3, 3, sym%nSym)) |
2266 |
-+ do isym = 1, sym%nSym, 1 |
2267 |
-+ call mati3inv(sym%sym(:,:,isym), symrec(:,:,isym)) |
2268 |
-+ end do |
2269 |
-+ |
2270 |
-+ !Obtain a list of rotated atom labels: |
2271 |
-+ call symatm(sym%indexingAtoms, sym%nAtoms, sym%nSym, symrec, & |
2272 |
-+ & sym%transNon, sym%tolsym, sym%typeAt, sym%xRed) |
2273 |
-+ |
2274 |
-+ deallocate(symrec) |
2275 |
-+ end subroutine compute_equivalent_atoms |
2276 |
-+ |
2277 |
-+ subroutine symmetry_get_equivalent_atom(id, equiv, iAtom, errno) |
2278 |
-+ |
2279 |
-+ |
2280 |
-+!This section has been created automatically by the script Abilint (TD). |
2281 |
-+!Do not modify the following lines by hand. |
2282 |
-+!End of the abilint section |
2283 |
-+ |
2284 |
-+ integer, intent(in) :: id |
2285 |
-+ integer, intent(in) :: iAtom |
2286 |
-+ integer, intent(out) :: equiv(4, AB7_MAX_SYMMETRIES) |
2287 |
-+ integer, intent(out) :: errno |
2288 |
-+ |
2289 |
-+ type(symmetry_list), pointer :: token |
2290 |
-+ |
2291 |
-+ if (AB_DBG) write(0,*) "AB symmetry: call get equivalent." |
2292 |
-+ |
2293 |
-+ errno = AB7_NO_ERROR |
2294 |
-+ call get_item(token, id) |
2295 |
-+ if (.not. associated(token)) then |
2296 |
-+ errno = AB7_ERROR_OBJ |
2297 |
-+ return |
2298 |
-+ end if |
2299 |
-+ |
2300 |
-+ if (iAtom < 1 .or. iAtom > token%data%nAtoms) then |
2301 |
-+ errno = AB7_ERROR_ARG |
2302 |
-+ return |
2303 |
-+ end if |
2304 |
-+ |
2305 |
-+ if (.not. associated(token%data%indexingAtoms)) then |
2306 |
-+ ! We do the computation of the matrix part. |
2307 |
-+ call compute_equivalent_atoms(token%data) |
2308 |
-+ end if |
2309 |
-+ |
2310 |
-+ equiv(:, 1:token%data%nSym) = token%data%indexingAtoms(:,:,iAtom) |
2311 |
-+ end subroutine symmetry_get_equivalent_atom |
2312 |
-+ |
2313 |
-+end module m_ab7_symmetry |
2314 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/42_geometry/symfind.F90 bigdft-abi-1.0.4.new/libABINIT/src/42_geometry/symfind.F90 |
2315 |
---- bigdft-abi-1.0.4.old/libABINIT/src/42_geometry/symfind.F90 2012-07-09 16:43:33.000000000 +0200 |
2316 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/42_geometry/symfind.F90 2013-06-11 16:51:00.000000000 +0200 |
2317 |
-@@ -49,7 +49,7 @@ |
2318 |
- !! be 0 0 0 each for a symmorphic space group) |
2319 |
- !! |
2320 |
- !! PARENTS |
2321 |
--!! ingeo,ab6_symmetry_f90 |
2322 |
-+!! ingeo,ab7_symmetry_f90 |
2323 |
- !! |
2324 |
- !! CHILDREN |
2325 |
- !! leave_new,wrtout |
2326 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/findminscf.F90 bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/findminscf.F90 |
2327 |
---- bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/findminscf.F90 2012-07-09 16:43:33.000000000 +0200 |
2328 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/findminscf.F90 2013-06-11 16:51:00.000000000 +0200 |
2329 |
-@@ -92,7 +92,7 @@ |
2330 |
- !write(6,*)' choice,lambda_1,lambda_2=',choice,lambda_1,lambda_2 |
2331 |
- !ENDDEBUG |
2332 |
- |
2333 |
-- errid = AB6_NO_ERROR |
2334 |
-+ errid = AB7_NO_ERROR |
2335 |
- d_lambda=lambda_1-lambda_2 |
2336 |
- |
2337 |
- if(choice==1) then |
2338 |
-@@ -111,7 +111,7 @@ |
2339 |
- & +0.5_dp*d2edv2_1*(lambda_2-lambda_1)**2 |
2340 |
- |
2341 |
- if(d2edv2_mid<0.0_dp)then |
2342 |
-- errid = AB6_ERROR_MIXING_INTERNAL |
2343 |
-+ errid = AB7_ERROR_MIXING_INTERNAL |
2344 |
- write(errmess, '(a,a,a,a,es18.10,a)' ) ch10,& |
2345 |
- & ' findminscf : WARNING -',ch10,& |
2346 |
- & ' (scfcge) The second derivative is negative, equal to',d2edv2_mid ,'.' |
2347 |
-@@ -128,7 +128,7 @@ |
2348 |
- d2edv2_2=d2edv2_1 |
2349 |
- d2edv2_predict=d2edv2_1 |
2350 |
- if(d2edv2_predict<0.0_dp)then |
2351 |
-- errid = AB6_ERROR_MIXING_INTERNAL |
2352 |
-+ errid = AB7_ERROR_MIXING_INTERNAL |
2353 |
- write(errmess, '(a,a,a,a,es18.10,a,a,a)' ) ch10,& |
2354 |
- & ' findmin : WARNING -',ch10,& |
2355 |
- & ' (scfcge) The second derivative is negative, equal to',d2edv2_predict,'.',& |
2356 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/m_ab6_mixing.F90 bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/m_ab6_mixing.F90 |
2357 |
---- bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/m_ab6_mixing.F90 2012-07-09 16:43:33.000000000 +0200 |
2358 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/m_ab6_mixing.F90 1970-01-01 01:00:00.000000000 +0100 |
2359 |
-@@ -1,688 +0,0 @@ |
2360 |
--#if defined HAVE_CONFIG_H |
2361 |
--#include "config.h" |
2362 |
--#endif |
2363 |
-- |
2364 |
-- module m_ab6_mixing |
2365 |
-- |
2366 |
-- use m_profiling |
2367 |
-- use defs_basis |
2368 |
-- |
2369 |
-- implicit none |
2370 |
-- |
2371 |
-- private |
2372 |
-- |
2373 |
-- integer, parameter, public :: AB6_MIXING_NONE = 0 |
2374 |
-- integer, parameter, public :: AB6_MIXING_EIG = 1 |
2375 |
-- integer, parameter, public :: AB6_MIXING_SIMPLE = 2 |
2376 |
-- integer, parameter, public :: AB6_MIXING_ANDERSON = 3 |
2377 |
-- integer, parameter, public :: AB6_MIXING_ANDERSON_2 = 4 |
2378 |
-- integer, parameter, public :: AB6_MIXING_CG_ENERGY = 5 |
2379 |
-- integer, parameter, public :: AB6_MIXING_CG_ENERGY_2 = 6 |
2380 |
-- integer, parameter, public :: AB6_MIXING_PULAY = 7 |
2381 |
-- |
2382 |
-- integer, parameter, public :: AB6_MIXING_POTENTIAL = 0 |
2383 |
-- integer, parameter, public :: AB6_MIXING_DENSITY = 1 |
2384 |
-- |
2385 |
-- integer, parameter, public :: AB6_MIXING_REAL_SPACE = 1 |
2386 |
-- integer, parameter, public :: AB6_MIXING_FOURRIER_SPACE = 2 |
2387 |
-- |
2388 |
-- type, public :: ab6_mixing_object |
2389 |
-- integer :: iscf |
2390 |
-- integer :: nfft, nspden, kind, space |
2391 |
-- |
2392 |
-- logical :: useprec |
2393 |
-- integer :: mffmem |
2394 |
-- character(len = fnlen) :: diskCache |
2395 |
-- integer :: n_index, n_fftgr, n_pulayit, n_pawmix |
2396 |
-- integer, dimension(:), pointer :: i_rhor, i_vtrial, i_vresid, i_vrespc |
2397 |
-- real(dp), dimension(:,:,:), pointer :: f_fftgr, f_atm |
2398 |
-- real(dp), dimension(:,:), pointer :: f_paw |
2399 |
-- |
2400 |
-- ! Private |
2401 |
-- integer :: n_atom |
2402 |
-- real(dp), pointer :: xred(:,:), dtn_pc(:,:) |
2403 |
-- end type ab6_mixing_object |
2404 |
-- |
2405 |
-- public :: ab6_mixing_new |
2406 |
-- public :: ab6_mixing_deallocate |
2407 |
-- |
2408 |
-- public :: ab6_mixing_use_disk_cache |
2409 |
-- public :: ab6_mixing_use_moving_atoms |
2410 |
-- public :: ab6_mixing_copy_current_step |
2411 |
-- |
2412 |
-- public :: ab6_mixing_eval_allocate |
2413 |
-- public :: ab6_mixing_eval |
2414 |
-- public :: ab6_mixing_eval_deallocate |
2415 |
-- |
2416 |
-- contains |
2417 |
-- |
2418 |
-- subroutine init_(mix) |
2419 |
-- implicit none |
2420 |
-- |
2421 |
-- type(ab6_mixing_object), intent(out) :: mix |
2422 |
-- |
2423 |
-- ! Default values. |
2424 |
-- mix%iscf = AB6_MIXING_NONE |
2425 |
-- mix%mffmem = 1 |
2426 |
-- mix%n_index = 0 |
2427 |
-- mix%n_fftgr = 0 |
2428 |
-- mix%n_pulayit = 7 |
2429 |
-- mix%n_pawmix = 0 |
2430 |
-- mix%n_atom = 0 |
2431 |
-- mix%useprec = .true. |
2432 |
-- |
2433 |
-- call nullify_(mix) |
2434 |
-- end subroutine init_ |
2435 |
-- |
2436 |
-- subroutine nullify_(mix) |
2437 |
-- |
2438 |
-- |
2439 |
-- implicit none |
2440 |
-- |
2441 |
-- type(ab6_mixing_object), intent(inout) :: mix |
2442 |
-- |
2443 |
-- ! Nullify internal pointers. |
2444 |
-- nullify(mix%i_rhor) |
2445 |
-- nullify(mix%i_vtrial) |
2446 |
-- nullify(mix%i_vresid) |
2447 |
-- nullify(mix%i_vrespc) |
2448 |
-- nullify(mix%f_fftgr) |
2449 |
-- nullify(mix%f_atm) |
2450 |
-- nullify(mix%f_paw) |
2451 |
-- nullify(mix%dtn_pc) |
2452 |
-- nullify(mix%xred) |
2453 |
-- end subroutine nullify_ |
2454 |
-- |
2455 |
-- subroutine ab6_mixing_new(mix, iscf, kind, space, nfft, nspden, & |
2456 |
-- & npawmix, errid, errmess, npulayit, useprec) |
2457 |
-- implicit none |
2458 |
-- |
2459 |
-- type(ab6_mixing_object), intent(out) :: mix |
2460 |
-- integer, intent(in) :: iscf, kind, space, nfft, nspden, npawmix |
2461 |
-- integer, intent(out) :: errid |
2462 |
-- character(len = 500), intent(out) :: errmess |
2463 |
-- integer, intent(in), optional :: npulayit |
2464 |
-- logical, intent(in), optional :: useprec |
2465 |
-- |
2466 |
-- integer :: ii, i_stat |
2467 |
-- character(len = *), parameter :: subname = "ab6_mixing_new" |
2468 |
-- |
2469 |
-- ! Set default values. |
2470 |
-- call init_(mix) |
2471 |
-- |
2472 |
-- ! Argument checkings. |
2473 |
-- if (kind /= AB6_MIXING_POTENTIAL .and. kind /= AB6_MIXING_DENSITY) then |
2474 |
-- errid = AB6_ERROR_MIXING_ARG |
2475 |
-- write(errmess, '(a,a,a,a)' )ch10,& |
2476 |
-- & ' ab6_mixing_set_arrays: ERROR -',ch10,& |
2477 |
-- & ' Mixing must be done on density or potential only.' |
2478 |
-- return |
2479 |
-- end if |
2480 |
-- if (space /= AB6_MIXING_REAL_SPACE .and. & |
2481 |
-- & space /= AB6_MIXING_FOURRIER_SPACE) then |
2482 |
-- errid = AB6_ERROR_MIXING_ARG |
2483 |
-- write(errmess, '(a,a,a,a)' )ch10,& |
2484 |
-- & ' ab6_mixing_set_arrays: ERROR -',ch10,& |
2485 |
-- & ' Mixing must be done in real or Fourrier space only.' |
2486 |
-- return |
2487 |
-- end if |
2488 |
-- if (iscf /= AB6_MIXING_EIG .and. iscf /= AB6_MIXING_SIMPLE .and. & |
2489 |
-- & iscf /= AB6_MIXING_ANDERSON .and. & |
2490 |
-- & iscf /= AB6_MIXING_ANDERSON_2 .and. & |
2491 |
-- & iscf /= AB6_MIXING_CG_ENERGY .and. & |
2492 |
-- & iscf /= AB6_MIXING_PULAY .and. & |
2493 |
-- & iscf /= AB6_MIXING_CG_ENERGY_2) then |
2494 |
-- errid = AB6_ERROR_MIXING_ARG |
2495 |
-- write(errmess, "(A,I0,A)") "Unknown mixing scheme (", iscf, ")." |
2496 |
-- return |
2497 |
-- end if |
2498 |
-- errid = AB6_NO_ERROR |
2499 |
-- |
2500 |
-- ! Mandatory arguments. |
2501 |
-- mix%iscf = iscf |
2502 |
-- mix%kind = kind |
2503 |
-- mix%space = space |
2504 |
-- mix%nfft = nfft |
2505 |
-- mix%nspden = nspden |
2506 |
-- mix%n_pawmix = npawmix |
2507 |
-- |
2508 |
-- ! Optional arguments. |
2509 |
-- if (present(useprec)) mix%useprec = useprec |
2510 |
-- |
2511 |
-- ! Set-up internal dimensions. |
2512 |
-- !These arrays are needed only in the self-consistent case |
2513 |
-- if (iscf == AB6_MIXING_EIG) then |
2514 |
-- ! For iscf==1, five additional vectors are needed |
2515 |
-- ! The index 1 is attributed to the old trial potential, |
2516 |
-- ! The new residual potential, and the new |
2517 |
-- ! preconditioned residual potential receive now a temporary index |
2518 |
-- ! The indices number 4 and 5 are attributed to work vectors. |
2519 |
-- mix%n_fftgr=5 ; mix%n_index=1 |
2520 |
-- else if(iscf == AB6_MIXING_SIMPLE) then |
2521 |
-- ! For iscf==2, three additional vectors are needed. |
2522 |
-- ! The index number 1 is attributed to the old trial vector |
2523 |
-- ! The new residual potential, and the new preconditioned |
2524 |
-- ! residual potential, receive now a temporary index. |
2525 |
-- mix%n_fftgr=3 ; mix%n_index=1 |
2526 |
-- if (.not. mix%useprec) mix%n_fftgr = 2 |
2527 |
-- else if(iscf == AB6_MIXING_ANDERSON) then |
2528 |
-- ! For iscf==3 , four additional vectors are needed. |
2529 |
-- ! The index number 1 is attributed to the old trial vector |
2530 |
-- ! The new residual potential, and the new and old preconditioned |
2531 |
-- ! residual potential, receive now a temporary index. |
2532 |
-- mix%n_fftgr=4 ; mix%n_index=2 |
2533 |
-- if (.not. mix%useprec) mix%n_fftgr = 3 |
2534 |
-- else if (iscf == AB6_MIXING_ANDERSON_2) then |
2535 |
-- ! For iscf==4 , six additional vectors are needed. |
2536 |
-- ! The indices number 1 and 2 are attributed to two old trial vectors |
2537 |
-- ! The new residual potential, and the new and two old preconditioned |
2538 |
-- ! residual potentials, receive now a temporary index. |
2539 |
-- mix%n_fftgr=6 ; mix%n_index=3 |
2540 |
-- if (.not. mix%useprec) mix%n_fftgr = 5 |
2541 |
-- else if(iscf == AB6_MIXING_CG_ENERGY .or. iscf == AB6_MIXING_CG_ENERGY_2) then |
2542 |
-- ! For iscf==5 or 6, ten additional vectors are needed |
2543 |
-- ! The index number 1 is attributed to the old trial vector |
2544 |
-- ! The index number 6 is attributed to the search vector |
2545 |
-- ! Other indices are attributed now. Altogether ten vectors |
2546 |
-- mix%n_fftgr=10 ; mix%n_index=3 |
2547 |
-- else if(iscf == AB6_MIXING_PULAY) then |
2548 |
-- ! For iscf==7, lot of additional vectors are needed |
2549 |
-- ! The index number 1 is attributed to the old trial vector |
2550 |
-- ! The index number 2 is attributed to the old residual |
2551 |
-- ! The indices number 2 and 3 are attributed to two old precond. residuals |
2552 |
-- ! Other indices are attributed now. |
2553 |
-- if (present(npulayit)) mix%n_pulayit = npulayit |
2554 |
-- mix%n_fftgr=2+2*mix%n_pulayit ; mix%n_index=1+mix%n_pulayit |
2555 |
-- if (.not. mix%useprec) mix%n_fftgr = 1+2*mix%n_pulayit |
2556 |
-- end if ! iscf cases |
2557 |
-- |
2558 |
-- ! Allocate new arrays. |
2559 |
-- allocate(mix%i_rhor(mix%n_index), stat = i_stat) |
2560 |
-- call memocc(i_stat, mix%i_rhor, 'mix%i_rhor', subname) |
2561 |
-- allocate(mix%i_vtrial(mix%n_index), stat = i_stat) |
2562 |
-- call memocc(i_stat, mix%i_vtrial, 'mix%i_vtrial', subname) |
2563 |
-- allocate(mix%i_vresid(mix%n_index), stat = i_stat) |
2564 |
-- call memocc(i_stat, mix%i_vresid, 'mix%i_vresid', subname) |
2565 |
-- allocate(mix%i_vrespc(mix%n_index), stat = i_stat) |
2566 |
-- call memocc(i_stat, mix%i_vrespc, 'mix%i_vrespc', subname) |
2567 |
-- |
2568 |
-- ! Setup initial values. |
2569 |
-- if (iscf == AB6_MIXING_EIG) then |
2570 |
-- mix%i_vtrial(1)=1 ; mix%i_vresid(1)=2 ; mix%i_vrespc(1)=3 |
2571 |
-- else if(iscf == AB6_MIXING_SIMPLE) then |
2572 |
-- mix%i_vtrial(1)=1 ; mix%i_vresid(1)=2 ; mix%i_vrespc(1)=3 |
2573 |
-- if (.not. mix%useprec) mix%i_vrespc(1)=2 |
2574 |
-- else if(iscf == AB6_MIXING_ANDERSON) then |
2575 |
-- mix%i_vtrial(1)=1 ; mix%i_vresid(1)=2 |
2576 |
-- if (mix%useprec) then |
2577 |
-- mix%i_vrespc(1)=3 ; mix%i_vrespc(2)=4 |
2578 |
-- else |
2579 |
-- mix%i_vrespc(1)=2 ; mix%i_vrespc(2)=3 |
2580 |
-- end if |
2581 |
-- else if (iscf == AB6_MIXING_ANDERSON_2) then |
2582 |
-- mix%i_vtrial(1)=1 ; mix%i_vtrial(2)=2 |
2583 |
-- mix%i_vresid(1)=3 |
2584 |
-- if (mix%useprec) then |
2585 |
-- mix%i_vrespc(1)=4 ; mix%i_vrespc(2)=5 ; mix%i_vrespc(3)=6 |
2586 |
-- else |
2587 |
-- mix%i_vrespc(1)=3 ; mix%i_vrespc(2)=4 ; mix%i_vrespc(3)=5 |
2588 |
-- end if |
2589 |
-- else if(iscf == AB6_MIXING_CG_ENERGY .or. & |
2590 |
-- & iscf == AB6_MIXING_CG_ENERGY_2) then |
2591 |
-- mix%n_fftgr=10 ; mix%n_index=3 |
2592 |
-- mix%i_vtrial(1)=1 |
2593 |
-- mix%i_vresid(1)=2 ; mix%i_vresid(2)=4 ; mix%i_vresid(3)=7 |
2594 |
-- mix%i_vrespc(1)=3 ; mix%i_vrespc(2)=5 ; mix%i_vrespc(3)=8 |
2595 |
-- mix%i_rhor(2)=9 ; mix%i_rhor(3)=10 |
2596 |
-- else if(iscf == AB6_MIXING_PULAY) then |
2597 |
-- do ii=1,mix%n_pulayit |
2598 |
-- mix%i_vtrial(ii)=2*ii-1 ; mix%i_vrespc(ii)=2*ii |
2599 |
-- end do |
2600 |
-- mix%i_vrespc(mix%n_pulayit+1)=2*mix%n_pulayit+1 |
2601 |
-- mix%i_vresid(1)=2*mix%n_pulayit+2 |
2602 |
-- if (.not. mix%useprec) mix%i_vresid(1)=2 |
2603 |
-- end if ! iscf cases |
2604 |
-- end subroutine ab6_mixing_new |
2605 |
-- |
2606 |
-- subroutine ab6_mixing_use_disk_cache(mix, fnametmp_fft) |
2607 |
-- |
2608 |
-- |
2609 |
-- implicit none |
2610 |
-- |
2611 |
-- |
2612 |
-- type(ab6_mixing_object), intent(inout) :: mix |
2613 |
-- character(len = *), intent(in) :: fnametmp_fft |
2614 |
-- |
2615 |
-- if (len(trim(fnametmp_fft)) > 0) then |
2616 |
-- mix%mffmem = 0 |
2617 |
-- write(mix%diskCache, "(A)") fnametmp_fft |
2618 |
-- else |
2619 |
-- mix%mffmem = 1 |
2620 |
-- end if |
2621 |
-- end subroutine ab6_mixing_use_disk_cache |
2622 |
-- |
2623 |
-- subroutine ab6_mixing_use_moving_atoms(mix, natom, xred, dtn_pc) |
2624 |
-- |
2625 |
-- |
2626 |
-- type(ab6_mixing_object), intent(inout) :: mix |
2627 |
-- integer, intent(in) :: natom |
2628 |
-- real(dp), intent(in), target :: dtn_pc(3, natom) |
2629 |
-- real(dp), intent(in), target :: xred(3, natom) |
2630 |
-- |
2631 |
-- mix%n_atom = natom |
2632 |
-- mix%dtn_pc => dtn_pc |
2633 |
-- mix%xred => xred |
2634 |
-- end subroutine ab6_mixing_use_moving_atoms |
2635 |
-- |
2636 |
-- subroutine ab6_mixing_copy_current_step(mix, arr_resid, errid, errmess, & |
2637 |
-- & arr_respc, arr_paw_resid, arr_paw_respc, arr_atm) |
2638 |
-- |
2639 |
-- |
2640 |
-- type(ab6_mixing_object), intent(inout) :: mix |
2641 |
-- real(dp), intent(in) :: arr_resid(mix%space * mix%nfft, mix%nspden) |
2642 |
-- integer, intent(out) :: errid |
2643 |
-- character(len = 500), intent(out) :: errmess |
2644 |
-- real(dp), intent(in), optional :: arr_respc(mix%space * mix%nfft, mix%nspden) |
2645 |
-- real(dp), intent(in), optional :: arr_paw_resid(mix%n_pawmix), & |
2646 |
-- & arr_paw_respc(mix%n_pawmix) |
2647 |
-- real(dp), intent(in), optional :: arr_atm(3, mix%n_atom) |
2648 |
-- |
2649 |
-- if (.not. associated(mix%f_fftgr)) then |
2650 |
-- errid = AB6_ERROR_MIXING_ARG |
2651 |
-- write(errmess, '(a,a,a,a)' )ch10,& |
2652 |
-- & ' ab6_mixing_set_arr_current_step: ERROR -',ch10,& |
2653 |
-- & ' Working arrays not yet allocated.' |
2654 |
-- return |
2655 |
-- end if |
2656 |
-- errid = AB6_NO_ERROR |
2657 |
-- |
2658 |
-- mix%f_fftgr(:,:,mix%i_vresid(1)) = arr_resid(:,:) |
2659 |
-- if (present(arr_respc)) mix%f_fftgr(:,:,mix%i_vrespc(1)) = arr_respc(:,:) |
2660 |
-- if (present(arr_paw_resid)) mix%f_paw(:, mix%i_vresid(1)) = arr_paw_resid(:) |
2661 |
-- if (present(arr_paw_respc)) mix%f_paw(:, mix%i_vrespc(1)) = arr_paw_respc(:) |
2662 |
-- if (present(arr_atm)) mix%f_atm(:,:, mix%i_vresid(1)) = arr_atm(:,:) |
2663 |
-- end subroutine ab6_mixing_copy_current_step |
2664 |
-- |
2665 |
-- subroutine ab6_mixing_eval_allocate(mix, istep) |
2666 |
-- |
2667 |
-- |
2668 |
--!This section has been created automatically by the script Abilint (TD). |
2669 |
--!Do not modify the following lines by hand. |
2670 |
-- use interfaces_18_timing |
2671 |
--!End of the abilint section |
2672 |
-- |
2673 |
-- implicit none |
2674 |
-- |
2675 |
-- type(ab6_mixing_object), intent(inout) :: mix |
2676 |
-- integer, intent(in), optional :: istep |
2677 |
-- |
2678 |
-- integer :: istep_, i_stat, usepaw |
2679 |
-- real(dp) :: tsec(2) |
2680 |
-- character(len = *), parameter :: subname = "ab6_mixing_eval_allocate" |
2681 |
-- |
2682 |
-- istep_ = 1 |
2683 |
-- if (present(istep)) istep_ = istep |
2684 |
-- |
2685 |
-- ! Allocate work array. |
2686 |
-- if (.not. associated(mix%f_fftgr)) then |
2687 |
-- allocate(mix%f_fftgr(mix%space * mix%nfft,mix%nspden,mix%n_fftgr), stat = i_stat) |
2688 |
-- call memocc(i_stat, mix%f_fftgr, 'mix%f_fftgr', subname) |
2689 |
-- mix%f_fftgr(:,:,:)=zero |
2690 |
-- if (mix%mffmem == 0 .and. istep_ > 1) then |
2691 |
-- call timab(83,1,tsec) |
2692 |
-- open(unit=tmp_unit,file=mix%diskCache,form='unformatted',status='old') |
2693 |
-- rewind(tmp_unit) |
2694 |
-- read(tmp_unit) mix%f_fftgr |
2695 |
-- if (mix%n_pawmix == 0) close(unit=tmp_unit) |
2696 |
-- call timab(83,2,tsec) |
2697 |
-- end if |
2698 |
-- end if |
2699 |
-- ! Allocate PAW work array. |
2700 |
-- if (.not. associated(mix%f_paw)) then |
2701 |
-- usepaw = 0 |
2702 |
-- if (mix%n_pawmix > 0) usepaw = 1 |
2703 |
-- allocate(mix%f_paw(max(1,mix%n_pawmix),max(1,mix%n_fftgr * usepaw)), & |
2704 |
-- & stat = i_stat) |
2705 |
-- call memocc(i_stat, mix%f_paw, 'mix%f_paw', subname) |
2706 |
-- if (mix%n_pawmix > 0) then |
2707 |
-- mix%f_paw(:,:)=zero |
2708 |
-- if (mix%mffmem == 0 .and. istep_ > 1) then |
2709 |
-- read(tmp_unit) mix%f_paw |
2710 |
-- close(unit=tmp_unit) |
2711 |
-- call timab(83,2,tsec) |
2712 |
-- end if |
2713 |
-- end if |
2714 |
-- end if |
2715 |
-- ! Allocate atom work array. |
2716 |
-- if (.not. associated(mix%f_atm)) then |
2717 |
-- allocate(mix%f_atm(3,mix%n_atom,mix%n_fftgr), stat = i_stat) |
2718 |
-- call memocc(i_stat, mix%f_atm, 'mix%f_atm', subname) |
2719 |
-- end if |
2720 |
-- end subroutine ab6_mixing_eval_allocate |
2721 |
-- |
2722 |
-- subroutine ab6_mixing_eval_deallocate(mix) |
2723 |
-- |
2724 |
-- |
2725 |
--!This section has been created automatically by the script Abilint (TD). |
2726 |
--!Do not modify the following lines by hand. |
2727 |
-- use interfaces_18_timing |
2728 |
--!End of the abilint section |
2729 |
-- |
2730 |
-- implicit none |
2731 |
-- |
2732 |
-- type(ab6_mixing_object), intent(inout) :: mix |
2733 |
-- |
2734 |
-- integer :: i_all, i_stat |
2735 |
-- real(dp) :: tsec(2) |
2736 |
-- character(len = *), parameter :: subname = "ab6_mixing_eval_deallocate" |
2737 |
-- |
2738 |
-- ! Save on disk and deallocate work array in case on disk cache only. |
2739 |
-- if (mix%mffmem == 0) then |
2740 |
-- call timab(83,1,tsec) |
2741 |
-- open(unit=tmp_unit,file=mix%diskCache,form='unformatted',status='unknown') |
2742 |
-- rewind(tmp_unit) |
2743 |
-- ! VALGRIND complains not all of f_fftgr_disk is initialized |
2744 |
-- write(tmp_unit) mix%f_fftgr |
2745 |
-- if (mix%n_pawmix > 0) then |
2746 |
-- write(tmp_unit) mix%f_paw |
2747 |
-- end if |
2748 |
-- close(unit=tmp_unit) |
2749 |
-- call timab(83,2,tsec) |
2750 |
-- i_all = -product(shape(mix%f_fftgr))*kind(mix%f_fftgr) |
2751 |
-- deallocate(mix%f_fftgr, stat = i_stat) |
2752 |
-- call memocc(i_stat, i_all, 'mix%f_atm', subname) |
2753 |
-- nullify(mix%f_fftgr) |
2754 |
-- if (associated(mix%f_paw)) then |
2755 |
-- i_all = -product(shape(mix%f_paw))*kind(mix%f_paw) |
2756 |
-- deallocate(mix%f_paw, stat = i_stat) |
2757 |
-- call memocc(i_stat, i_all, 'mix%f_paw', subname) |
2758 |
-- nullify(mix%f_paw) |
2759 |
-- end if |
2760 |
-- end if |
2761 |
-- end subroutine ab6_mixing_eval_deallocate |
2762 |
-- |
2763 |
-- subroutine ab6_mixing_eval(mix, arr, istep, nfftot, ucvol, & |
2764 |
-- & mpi_comm, mpi_summarize, errid, errmess, & |
2765 |
-- & reset, isecur, pawarr, pawopt, response, etotal, potden, & |
2766 |
-- & resnrm, fnrm, fdot, user_data) |
2767 |
-- |
2768 |
-- |
2769 |
--!This section has been created automatically by the script Abilint (TD). |
2770 |
--!Do not modify the following lines by hand. |
2771 |
-- use interfaces_56_mixing |
2772 |
--!End of the abilint section |
2773 |
-- |
2774 |
-- implicit none |
2775 |
-- |
2776 |
-- type(ab6_mixing_object), intent(inout) :: mix |
2777 |
-- integer, intent(in) :: istep, nfftot, mpi_comm |
2778 |
-- logical, intent(in) :: mpi_summarize |
2779 |
-- real(dp), intent(in) :: ucvol |
2780 |
-- real(dp), intent(inout) :: arr(mix%space * mix%nfft,mix%nspden) |
2781 |
-- integer, intent(out) :: errid |
2782 |
-- character(len = 500), intent(out) :: errmess |
2783 |
-- |
2784 |
-- logical, intent(in), optional :: reset |
2785 |
-- integer, intent(in), optional :: isecur, pawopt, response |
2786 |
-- real(dp), intent(inout), optional, target :: pawarr(mix%n_pawmix) |
2787 |
-- real(dp), intent(in), optional :: etotal |
2788 |
-- real(dp), intent(in), optional :: potden(mix%space * mix%nfft,mix%nspden) |
2789 |
-- real(dp), intent(out), optional :: resnrm |
2790 |
-- optional :: fnrm, fdot |
2791 |
-- integer, intent(in), optional :: user_data(:) |
2792 |
-- |
2793 |
-- interface |
2794 |
-- function fdot(x,y,cplex,nfft,nspden,opt_denpot,user_data) |
2795 |
-- integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
2796 |
-- double precision, intent(in) :: x(*), y(*) |
2797 |
-- integer, intent(in) :: user_data(:) |
2798 |
-- |
2799 |
-- double precision :: fdot |
2800 |
-- end function fdot |
2801 |
-- |
2802 |
-- function fnrm(x,cplex,nfft,nspden,opt_denpot,user_data) |
2803 |
-- integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
2804 |
-- double precision, intent(in) :: x(*) |
2805 |
-- integer, intent(in) :: user_data(:) |
2806 |
-- |
2807 |
-- double precision :: fnrm |
2808 |
-- end function fnrm |
2809 |
-- end interface |
2810 |
-- |
2811 |
-- character(len = *), parameter :: subname = "ab6_mixing_eval" |
2812 |
-- integer :: moveAtm, dbl_nnsclo, initialized, isecur_ |
2813 |
-- integer :: usepaw, pawoptmix_, response_, i_stat, i_all |
2814 |
-- integer :: user_data_(2) |
2815 |
-- real(dp) :: resnrm_ |
2816 |
-- real(dp), pointer :: pawarr_(:) |
2817 |
-- |
2818 |
-- ! Argument checkings. |
2819 |
-- if (mix%iscf == AB6_MIXING_NONE) then |
2820 |
-- errid = AB6_ERROR_MIXING_ARG |
2821 |
-- write(errmess, '(a,a,a,a)' )ch10,& |
2822 |
-- & ' ab6_mixing_eval: ERROR -',ch10,& |
2823 |
-- & ' No method has been chosen.' |
2824 |
-- return |
2825 |
-- end if |
2826 |
-- if (mix%n_pawmix > 0 .and. .not. present(pawarr)) then |
2827 |
-- errid = AB6_ERROR_MIXING_ARG |
2828 |
-- write(errmess, '(a,a,a,a)' )ch10,& |
2829 |
-- & ' ab6_mixing_eval: ERROR -',ch10,& |
2830 |
-- & ' PAW is used, but no pawarr argument provided.' |
2831 |
-- return |
2832 |
-- end if |
2833 |
-- if (mix%n_atom > 0 .and. (.not. associated(mix%dtn_pc) .or. & |
2834 |
-- & .not. associated(mix%xred))) then |
2835 |
-- errid = AB6_ERROR_MIXING_ARG |
2836 |
-- write(errmess, '(a,a,a,a)' )ch10,& |
2837 |
-- & ' ab6_mixing_eval: ERROR -',ch10,& |
2838 |
-- & ' Moving atoms is used, but no xred or dtn_pc attributes provided.' |
2839 |
-- return |
2840 |
-- end if |
2841 |
-- if ((present(fnrm) .or. present(fdot) .or. present(user_data)) .and. & |
2842 |
-- & .not. (present(fnrm) .and. present(fdot) .and. present(user_data))) then |
2843 |
-- errid = AB6_ERROR_MIXING_ARG |
2844 |
-- write(errmess, '(a,a,a,a)' )ch10,& |
2845 |
-- & ' ab6_mixing_eval: ERROR -',ch10,& |
2846 |
-- & ' Passing optional norm and dot product routines without user_data argument.' |
2847 |
-- return |
2848 |
-- end if |
2849 |
-- errid = AB6_NO_ERROR |
2850 |
-- |
2851 |
-- ! Miscellaneous |
2852 |
-- moveAtm = 0 |
2853 |
-- if (mix%n_atom > 0) moveAtm = 1 |
2854 |
-- initialized = 1 |
2855 |
-- if (present(reset)) then |
2856 |
-- if (reset) initialized = 0 |
2857 |
-- end if |
2858 |
-- isecur_ = 0 |
2859 |
-- if (present(isecur)) isecur_ = isecur |
2860 |
-- usepaw = 0 |
2861 |
-- if (mix%n_pawmix > 0) usepaw = 1 |
2862 |
-- pawoptmix_ = 0 |
2863 |
-- if (present(pawopt)) pawoptmix_ = pawopt |
2864 |
-- response_ = 0 |
2865 |
-- if (present(response)) response_ = response |
2866 |
-- if (present(pawarr)) then |
2867 |
-- pawarr_ => pawarr |
2868 |
-- else |
2869 |
-- allocate(pawarr_(1), stat = i_stat) |
2870 |
-- call memocc(i_stat, pawarr_, 'pawarr_', subname) |
2871 |
-- end if |
2872 |
-- |
2873 |
-- ! Norm and dot products. |
2874 |
-- if (.not. present(user_data)) then |
2875 |
-- user_data_(1) = 0 |
2876 |
-- if (mpi_summarize) user_data_(1) = 1 |
2877 |
-- user_data_(2) = mpi_comm |
2878 |
-- end if |
2879 |
-- |
2880 |
-- ! Do the mixing. |
2881 |
-- resnrm_ = 0.d0 |
2882 |
-- if (mix%iscf == AB6_MIXING_EIG) then |
2883 |
-- ! This routine compute the eigenvalues of the SCF operator |
2884 |
-- call scfeig(istep, mix%space * mix%nfft, mix%nspden, & |
2885 |
-- & mix%f_fftgr(:,:,mix%i_vrespc(1)), arr, & |
2886 |
-- & mix%f_fftgr(:,:,1), mix%f_fftgr(:,:,4:5), errid, errmess) |
2887 |
-- else if (mix%iscf == AB6_MIXING_SIMPLE .or. & |
2888 |
-- & mix%iscf == AB6_MIXING_ANDERSON .or. & |
2889 |
-- & mix%iscf == AB6_MIXING_ANDERSON_2 .or. & |
2890 |
-- & mix%iscf == AB6_MIXING_PULAY) then |
2891 |
-- if (present(user_data)) then |
2892 |
-- call scfopt(mix%space, mix%f_fftgr,mix%f_paw,mix%iscf,istep,& |
2893 |
-- & mix%i_vrespc,mix%i_vtrial, mix%nfft,mix%n_pawmix,mix%nspden, & |
2894 |
-- & mix%n_fftgr,mix%n_index,mix%kind,pawoptmix_,usepaw,pawarr_, & |
2895 |
-- & resnrm_, arr, fnrm, fdot, user_data, errid, errmess) |
2896 |
-- else |
2897 |
-- call scfopt(mix%space, mix%f_fftgr,mix%f_paw,mix%iscf,istep,& |
2898 |
-- & mix%i_vrespc,mix%i_vtrial, mix%nfft,mix%n_pawmix,mix%nspden, & |
2899 |
-- & mix%n_fftgr,mix%n_index,mix%kind,pawoptmix_,usepaw,pawarr_, & |
2900 |
-- & resnrm_, arr, fnrm_default, fdot_default, user_data_, errid, errmess) |
2901 |
-- end if |
2902 |
-- ! Change atomic positions |
2903 |
-- if((istep==1 .or. mix%iscf==AB6_MIXING_SIMPLE) .and. mix%n_atom > 0)then |
2904 |
-- ! GAF: 2009-06-03 |
2905 |
-- ! Apparently there are not reason |
2906 |
-- ! to restrict iscf=2 for ionmov=5 |
2907 |
-- mix%xred(:,:) = mix%xred(:,:) + mix%dtn_pc(:,:) |
2908 |
-- end if |
2909 |
-- else if (mix%iscf == AB6_MIXING_CG_ENERGY .or. & |
2910 |
-- & mix%iscf == AB6_MIXING_CG_ENERGY_2) then |
2911 |
-- ! Optimize next vtrial using an algorithm based |
2912 |
-- ! on the conjugate gradient minimization of etotal |
2913 |
-- if (.not. present(etotal) .or. .not. present(potden)) then |
2914 |
-- errid = AB6_ERROR_MIXING_ARG |
2915 |
-- write(errmess, '(a,a,a,a)' )ch10,& |
2916 |
-- & ' ab6_mixing_eval: ERROR -',ch10,& |
2917 |
-- & ' Arguments etotal or potden are missing for CG on energy methods.' |
2918 |
-- return |
2919 |
-- end if |
2920 |
-- if (mix%n_atom == 0) then |
2921 |
-- allocate(mix%xred(3,0), stat = i_stat) |
2922 |
-- call memocc(i_stat, mix%xred, 'mix%xred', subname) |
2923 |
-- allocate(mix%dtn_pc(3,0), stat = i_stat) |
2924 |
-- call memocc(i_stat, mix%dtn_pc, 'mix%dtn_pc', subname) |
2925 |
-- end if |
2926 |
-- if (present(user_data)) then |
2927 |
-- call scfcge(mix%space,dbl_nnsclo,mix%dtn_pc,etotal,mix%f_atm,& |
2928 |
-- & mix%f_fftgr,initialized,mix%iscf,isecur_,istep,& |
2929 |
-- & mix%i_rhor,mix%i_vresid,mix%i_vrespc,moveAtm,& |
2930 |
-- & mix%n_atom,mix%nfft,nfftot,& |
2931 |
-- & mix%nspden,mix%n_fftgr,mix%n_index,mix%kind,& |
2932 |
-- & response_,potden,ucvol,arr,mix%xred, & |
2933 |
-- & fnrm, fdot, user_data, errid, errmess) |
2934 |
-- else |
2935 |
-- call scfcge(mix%space,dbl_nnsclo,mix%dtn_pc,etotal,mix%f_atm,& |
2936 |
-- & mix%f_fftgr,initialized,mix%iscf,isecur_,istep,& |
2937 |
-- & mix%i_rhor,mix%i_vresid,mix%i_vrespc,moveAtm,& |
2938 |
-- & mix%n_atom,mix%nfft,nfftot,& |
2939 |
-- & mix%nspden,mix%n_fftgr,mix%n_index,mix%kind,& |
2940 |
-- & response_,potden,ucvol,arr,mix%xred, fnrm_default, & |
2941 |
-- & fdotn_default, user_data_, errid, errmess) |
2942 |
-- end if |
2943 |
-- if (mix%n_atom == 0) then |
2944 |
-- i_all = -product(shape(mix%xred))*kind(mix%xred) |
2945 |
-- deallocate(mix%xred, stat = i_stat) |
2946 |
-- call memocc(i_stat, i_all, 'mix%xred', subname) |
2947 |
-- i_all = -product(shape(mix%dtn_pc))*kind(mix%dtn_pc) |
2948 |
-- deallocate(mix%dtn_pc, stat = i_stat) |
2949 |
-- call memocc(i_stat, i_all, 'mix%dtn_pc', subname) |
2950 |
-- end if |
2951 |
-- if (dbl_nnsclo == 1) errid = AB6_ERROR_MIXING_INC_NNSLOOP |
2952 |
-- end if |
2953 |
-- |
2954 |
-- if (present(resnrm)) resnrm = resnrm_ |
2955 |
-- if (.not. present(pawarr)) then |
2956 |
-- i_all = -product(shape(pawarr_))*kind(pawarr_) |
2957 |
-- deallocate(pawarr_, stat = i_stat) |
2958 |
-- call memocc(i_stat, i_all, 'pawarr_', subname) |
2959 |
-- end if |
2960 |
-- end subroutine ab6_mixing_eval |
2961 |
-- |
2962 |
-- subroutine ab6_mixing_deallocate(mix) |
2963 |
-- implicit none |
2964 |
-- |
2965 |
-- type(ab6_mixing_object), intent(inout) :: mix |
2966 |
-- |
2967 |
-- integer :: i_all, i_stat |
2968 |
-- character(len = *), parameter :: subname = "ab6_mixing_deallocate" |
2969 |
-- |
2970 |
-- if (associated(mix%i_rhor)) then |
2971 |
-- i_all = -product(shape(mix%i_rhor))*kind(mix%i_rhor) |
2972 |
-- deallocate(mix%i_rhor, stat = i_stat) |
2973 |
-- call memocc(i_stat, i_all, 'mix%i_rhor', subname) |
2974 |
-- end if |
2975 |
-- if (associated(mix%i_vtrial)) then |
2976 |
-- i_all = -product(shape(mix%i_vtrial))*kind(mix%i_vtrial) |
2977 |
-- deallocate(mix%i_vtrial, stat = i_stat) |
2978 |
-- call memocc(i_stat, i_all, 'mix%i_vtrial', subname) |
2979 |
-- end if |
2980 |
-- if (associated(mix%i_vresid)) then |
2981 |
-- i_all = -product(shape(mix%i_vresid))*kind(mix%i_vresid) |
2982 |
-- deallocate(mix%i_vresid, stat = i_stat) |
2983 |
-- call memocc(i_stat, i_all, 'mix%i_vresid', subname) |
2984 |
-- end if |
2985 |
-- if (associated(mix%i_vrespc)) then |
2986 |
-- i_all = -product(shape(mix%i_vrespc))*kind(mix%i_vrespc) |
2987 |
-- deallocate(mix%i_vrespc, stat = i_stat) |
2988 |
-- call memocc(i_stat, i_all, 'mix%i_vrespc', subname) |
2989 |
-- end if |
2990 |
-- if (associated(mix%f_fftgr)) then |
2991 |
-- i_all = -product(shape(mix%f_fftgr))*kind(mix%f_fftgr) |
2992 |
-- deallocate(mix%f_fftgr, stat = i_stat) |
2993 |
-- call memocc(i_stat, i_all, 'mix%f_fftgr', subname) |
2994 |
-- end if |
2995 |
-- if (associated(mix%f_paw)) then |
2996 |
-- i_all = -product(shape(mix%f_paw))*kind(mix%f_paw) |
2997 |
-- deallocate(mix%f_paw, stat = i_stat) |
2998 |
-- call memocc(i_stat, i_all, 'mix%f_paw', subname) |
2999 |
-- end if |
3000 |
-- if (associated(mix%f_atm)) then |
3001 |
-- i_all = -product(shape(mix%f_atm))*kind(mix%f_atm) |
3002 |
-- deallocate(mix%f_atm, stat = i_stat) |
3003 |
-- call memocc(i_stat, i_all, 'mix%f_atm', subname) |
3004 |
-- end if |
3005 |
-- |
3006 |
-- call nullify_(mix) |
3007 |
-- end subroutine ab6_mixing_deallocate |
3008 |
-- |
3009 |
-- function fnrm_default(x,cplex,nfft,nspden,opt_denpot,user_data) |
3010 |
-- integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
3011 |
-- double precision, intent(in) :: x(*) |
3012 |
-- integer, intent(in) :: user_data(:) |
3013 |
-- |
3014 |
-- double precision :: fnrm_default |
3015 |
-- real(dp) :: resid_new(1) |
3016 |
-- |
3017 |
-- call sqnormm_v(cplex,1,user_data(2),(user_data(1) /= 0),1,& |
3018 |
-- & nfft,resid_new,1,nspden,opt_denpot,x) |
3019 |
-- fnrm_default = resid_new(1) |
3020 |
-- end function fnrm_default |
3021 |
-- |
3022 |
-- function fdot_default(x,y,cplex,nfft,nspden,opt_denpot,user_data) |
3023 |
-- integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
3024 |
-- double precision, intent(in) :: x(*), y(*) |
3025 |
-- integer, intent(in) :: user_data(:) |
3026 |
-- |
3027 |
-- double precision :: fdot_default |
3028 |
-- real(dp) :: prod_resid(1) |
3029 |
-- |
3030 |
-- call dotprodm_v(cplex,1,prod_resid,1,1,user_data(2),(user_data(1) /= 0),1,1,& |
3031 |
-- & nfft,1,1,nspden,opt_denpot,x,y) |
3032 |
-- fdot_default = prod_resid(1) |
3033 |
-- end function fdot_default |
3034 |
-- |
3035 |
-- function fdotn_default(x,y,cplex,nfft,nspden,opt_denpot,user_data) |
3036 |
-- integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
3037 |
-- double precision, intent(in) :: x(*), y(*) |
3038 |
-- integer, intent(in) :: user_data(:) |
3039 |
-- |
3040 |
-- double precision :: fdotn_default |
3041 |
-- real(dp) :: prod_resid(1,1,1) |
3042 |
-- |
3043 |
-- call dotprodm_vn(cplex,1,x,prod_resid,1,1,user_data(2),(user_data(1) /= 0),1,1,& |
3044 |
-- & 1,nfft,1,nspden,y) |
3045 |
-- fdotn_default = prod_resid(1,1,1) |
3046 |
-- end function fdotn_default |
3047 |
-- end module m_ab6_mixing |
3048 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/m_ab7_mixing.F90 bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/m_ab7_mixing.F90 |
3049 |
---- bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/m_ab7_mixing.F90 1970-01-01 01:00:00.000000000 +0100 |
3050 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/m_ab7_mixing.F90 2013-06-11 16:51:00.000000000 +0200 |
3051 |
-@@ -0,0 +1,688 @@ |
3052 |
-+#if defined HAVE_CONFIG_H |
3053 |
-+#include "config.h" |
3054 |
-+#endif |
3055 |
-+ |
3056 |
-+ module m_ab7_mixing |
3057 |
-+ |
3058 |
-+ use m_profiling |
3059 |
-+ use defs_basis |
3060 |
-+ |
3061 |
-+ implicit none |
3062 |
-+ |
3063 |
-+ private |
3064 |
-+ |
3065 |
-+ integer, parameter, public :: AB7_MIXING_NONE = 0 |
3066 |
-+ integer, parameter, public :: AB7_MIXING_EIG = 1 |
3067 |
-+ integer, parameter, public :: AB7_MIXING_SIMPLE = 2 |
3068 |
-+ integer, parameter, public :: AB7_MIXING_ANDERSON = 3 |
3069 |
-+ integer, parameter, public :: AB7_MIXING_ANDERSON_2 = 4 |
3070 |
-+ integer, parameter, public :: AB7_MIXING_CG_ENERGY = 5 |
3071 |
-+ integer, parameter, public :: AB7_MIXING_CG_ENERGY_2 = 6 |
3072 |
-+ integer, parameter, public :: AB7_MIXING_PULAY = 7 |
3073 |
-+ |
3074 |
-+ integer, parameter, public :: AB7_MIXING_POTENTIAL = 0 |
3075 |
-+ integer, parameter, public :: AB7_MIXING_DENSITY = 1 |
3076 |
-+ |
3077 |
-+ integer, parameter, public :: AB7_MIXING_REAL_SPACE = 1 |
3078 |
-+ integer, parameter, public :: AB7_MIXING_FOURRIER_SPACE = 2 |
3079 |
-+ |
3080 |
-+ type, public :: ab7_mixing_object |
3081 |
-+ integer :: iscf |
3082 |
-+ integer :: nfft, nspden, kind, space |
3083 |
-+ |
3084 |
-+ logical :: useprec |
3085 |
-+ integer :: mffmem |
3086 |
-+ character(len = fnlen) :: diskCache |
3087 |
-+ integer :: n_index, n_fftgr, n_pulayit, n_pawmix |
3088 |
-+ integer, dimension(:), pointer :: i_rhor, i_vtrial, i_vresid, i_vrespc |
3089 |
-+ real(dp), dimension(:,:,:), pointer :: f_fftgr, f_atm |
3090 |
-+ real(dp), dimension(:,:), pointer :: f_paw |
3091 |
-+ |
3092 |
-+ ! Private |
3093 |
-+ integer :: n_atom |
3094 |
-+ real(dp), pointer :: xred(:,:), dtn_pc(:,:) |
3095 |
-+ end type ab7_mixing_object |
3096 |
-+ |
3097 |
-+ public :: ab7_mixing_new |
3098 |
-+ public :: ab7_mixing_deallocate |
3099 |
-+ |
3100 |
-+ public :: ab7_mixing_use_disk_cache |
3101 |
-+ public :: ab7_mixing_use_moving_atoms |
3102 |
-+ public :: ab7_mixing_copy_current_step |
3103 |
-+ |
3104 |
-+ public :: ab7_mixing_eval_allocate |
3105 |
-+ public :: ab7_mixing_eval |
3106 |
-+ public :: ab7_mixing_eval_deallocate |
3107 |
-+ |
3108 |
-+ contains |
3109 |
-+ |
3110 |
-+ subroutine init_(mix) |
3111 |
-+ implicit none |
3112 |
-+ |
3113 |
-+ type(ab7_mixing_object), intent(out) :: mix |
3114 |
-+ |
3115 |
-+ ! Default values. |
3116 |
-+ mix%iscf = AB7_MIXING_NONE |
3117 |
-+ mix%mffmem = 1 |
3118 |
-+ mix%n_index = 0 |
3119 |
-+ mix%n_fftgr = 0 |
3120 |
-+ mix%n_pulayit = 7 |
3121 |
-+ mix%n_pawmix = 0 |
3122 |
-+ mix%n_atom = 0 |
3123 |
-+ mix%useprec = .true. |
3124 |
-+ |
3125 |
-+ call nullify_(mix) |
3126 |
-+ end subroutine init_ |
3127 |
-+ |
3128 |
-+ subroutine nullify_(mix) |
3129 |
-+ |
3130 |
-+ |
3131 |
-+ implicit none |
3132 |
-+ |
3133 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
3134 |
-+ |
3135 |
-+ ! Nullify internal pointers. |
3136 |
-+ nullify(mix%i_rhor) |
3137 |
-+ nullify(mix%i_vtrial) |
3138 |
-+ nullify(mix%i_vresid) |
3139 |
-+ nullify(mix%i_vrespc) |
3140 |
-+ nullify(mix%f_fftgr) |
3141 |
-+ nullify(mix%f_atm) |
3142 |
-+ nullify(mix%f_paw) |
3143 |
-+ nullify(mix%dtn_pc) |
3144 |
-+ nullify(mix%xred) |
3145 |
-+ end subroutine nullify_ |
3146 |
-+ |
3147 |
-+ subroutine ab7_mixing_new(mix, iscf, kind, space, nfft, nspden, & |
3148 |
-+ & npawmix, errid, errmess, npulayit, useprec) |
3149 |
-+ implicit none |
3150 |
-+ |
3151 |
-+ type(ab7_mixing_object), intent(out) :: mix |
3152 |
-+ integer, intent(in) :: iscf, kind, space, nfft, nspden, npawmix |
3153 |
-+ integer, intent(out) :: errid |
3154 |
-+ character(len = 500), intent(out) :: errmess |
3155 |
-+ integer, intent(in), optional :: npulayit |
3156 |
-+ logical, intent(in), optional :: useprec |
3157 |
-+ |
3158 |
-+ integer :: ii, i_stat |
3159 |
-+ character(len = *), parameter :: subname = "ab7_mixing_new" |
3160 |
-+ |
3161 |
-+ ! Set default values. |
3162 |
-+ call init_(mix) |
3163 |
-+ |
3164 |
-+ ! Argument checkings. |
3165 |
-+ if (kind /= AB7_MIXING_POTENTIAL .and. kind /= AB7_MIXING_DENSITY) then |
3166 |
-+ errid = AB7_ERROR_MIXING_ARG |
3167 |
-+ write(errmess, '(a,a,a,a)' )ch10,& |
3168 |
-+ & ' ab7_mixing_set_arrays: ERROR -',ch10,& |
3169 |
-+ & ' Mixing must be done on density or potential only.' |
3170 |
-+ return |
3171 |
-+ end if |
3172 |
-+ if (space /= AB7_MIXING_REAL_SPACE .and. & |
3173 |
-+ & space /= AB7_MIXING_FOURRIER_SPACE) then |
3174 |
-+ errid = AB7_ERROR_MIXING_ARG |
3175 |
-+ write(errmess, '(a,a,a,a)' )ch10,& |
3176 |
-+ & ' ab7_mixing_set_arrays: ERROR -',ch10,& |
3177 |
-+ & ' Mixing must be done in real or Fourrier space only.' |
3178 |
-+ return |
3179 |
-+ end if |
3180 |
-+ if (iscf /= AB7_MIXING_EIG .and. iscf /= AB7_MIXING_SIMPLE .and. & |
3181 |
-+ & iscf /= AB7_MIXING_ANDERSON .and. & |
3182 |
-+ & iscf /= AB7_MIXING_ANDERSON_2 .and. & |
3183 |
-+ & iscf /= AB7_MIXING_CG_ENERGY .and. & |
3184 |
-+ & iscf /= AB7_MIXING_PULAY .and. & |
3185 |
-+ & iscf /= AB7_MIXING_CG_ENERGY_2) then |
3186 |
-+ errid = AB7_ERROR_MIXING_ARG |
3187 |
-+ write(errmess, "(A,I0,A)") "Unknown mixing scheme (", iscf, ")." |
3188 |
-+ return |
3189 |
-+ end if |
3190 |
-+ errid = AB7_NO_ERROR |
3191 |
-+ |
3192 |
-+ ! Mandatory arguments. |
3193 |
-+ mix%iscf = iscf |
3194 |
-+ mix%kind = kind |
3195 |
-+ mix%space = space |
3196 |
-+ mix%nfft = nfft |
3197 |
-+ mix%nspden = nspden |
3198 |
-+ mix%n_pawmix = npawmix |
3199 |
-+ |
3200 |
-+ ! Optional arguments. |
3201 |
-+ if (present(useprec)) mix%useprec = useprec |
3202 |
-+ |
3203 |
-+ ! Set-up internal dimensions. |
3204 |
-+ !These arrays are needed only in the self-consistent case |
3205 |
-+ if (iscf == AB7_MIXING_EIG) then |
3206 |
-+ ! For iscf==1, five additional vectors are needed |
3207 |
-+ ! The index 1 is attributed to the old trial potential, |
3208 |
-+ ! The new residual potential, and the new |
3209 |
-+ ! preconditioned residual potential receive now a temporary index |
3210 |
-+ ! The indices number 4 and 5 are attributed to work vectors. |
3211 |
-+ mix%n_fftgr=5 ; mix%n_index=1 |
3212 |
-+ else if(iscf == AB7_MIXING_SIMPLE) then |
3213 |
-+ ! For iscf==2, three additional vectors are needed. |
3214 |
-+ ! The index number 1 is attributed to the old trial vector |
3215 |
-+ ! The new residual potential, and the new preconditioned |
3216 |
-+ ! residual potential, receive now a temporary index. |
3217 |
-+ mix%n_fftgr=3 ; mix%n_index=1 |
3218 |
-+ if (.not. mix%useprec) mix%n_fftgr = 2 |
3219 |
-+ else if(iscf == AB7_MIXING_ANDERSON) then |
3220 |
-+ ! For iscf==3 , four additional vectors are needed. |
3221 |
-+ ! The index number 1 is attributed to the old trial vector |
3222 |
-+ ! The new residual potential, and the new and old preconditioned |
3223 |
-+ ! residual potential, receive now a temporary index. |
3224 |
-+ mix%n_fftgr=4 ; mix%n_index=2 |
3225 |
-+ if (.not. mix%useprec) mix%n_fftgr = 3 |
3226 |
-+ else if (iscf == AB7_MIXING_ANDERSON_2) then |
3227 |
-+ ! For iscf==4 , six additional vectors are needed. |
3228 |
-+ ! The indices number 1 and 2 are attributed to two old trial vectors |
3229 |
-+ ! The new residual potential, and the new and two old preconditioned |
3230 |
-+ ! residual potentials, receive now a temporary index. |
3231 |
-+ mix%n_fftgr=6 ; mix%n_index=3 |
3232 |
-+ if (.not. mix%useprec) mix%n_fftgr = 5 |
3233 |
-+ else if(iscf == AB7_MIXING_CG_ENERGY .or. iscf == AB7_MIXING_CG_ENERGY_2) then |
3234 |
-+ ! For iscf==5 or 6, ten additional vectors are needed |
3235 |
-+ ! The index number 1 is attributed to the old trial vector |
3236 |
-+ ! The index number 6 is attributed to the search vector |
3237 |
-+ ! Other indices are attributed now. Altogether ten vectors |
3238 |
-+ mix%n_fftgr=10 ; mix%n_index=3 |
3239 |
-+ else if(iscf == AB7_MIXING_PULAY) then |
3240 |
-+ ! For iscf==7, lot of additional vectors are needed |
3241 |
-+ ! The index number 1 is attributed to the old trial vector |
3242 |
-+ ! The index number 2 is attributed to the old residual |
3243 |
-+ ! The indices number 2 and 3 are attributed to two old precond. residuals |
3244 |
-+ ! Other indices are attributed now. |
3245 |
-+ if (present(npulayit)) mix%n_pulayit = npulayit |
3246 |
-+ mix%n_fftgr=2+2*mix%n_pulayit ; mix%n_index=1+mix%n_pulayit |
3247 |
-+ if (.not. mix%useprec) mix%n_fftgr = 1+2*mix%n_pulayit |
3248 |
-+ end if ! iscf cases |
3249 |
-+ |
3250 |
-+ ! Allocate new arrays. |
3251 |
-+ allocate(mix%i_rhor(mix%n_index), stat = i_stat) |
3252 |
-+ call memocc(i_stat, mix%i_rhor, 'mix%i_rhor', subname) |
3253 |
-+ allocate(mix%i_vtrial(mix%n_index), stat = i_stat) |
3254 |
-+ call memocc(i_stat, mix%i_vtrial, 'mix%i_vtrial', subname) |
3255 |
-+ allocate(mix%i_vresid(mix%n_index), stat = i_stat) |
3256 |
-+ call memocc(i_stat, mix%i_vresid, 'mix%i_vresid', subname) |
3257 |
-+ allocate(mix%i_vrespc(mix%n_index), stat = i_stat) |
3258 |
-+ call memocc(i_stat, mix%i_vrespc, 'mix%i_vrespc', subname) |
3259 |
-+ |
3260 |
-+ ! Setup initial values. |
3261 |
-+ if (iscf == AB7_MIXING_EIG) then |
3262 |
-+ mix%i_vtrial(1)=1 ; mix%i_vresid(1)=2 ; mix%i_vrespc(1)=3 |
3263 |
-+ else if(iscf == AB7_MIXING_SIMPLE) then |
3264 |
-+ mix%i_vtrial(1)=1 ; mix%i_vresid(1)=2 ; mix%i_vrespc(1)=3 |
3265 |
-+ if (.not. mix%useprec) mix%i_vrespc(1)=2 |
3266 |
-+ else if(iscf == AB7_MIXING_ANDERSON) then |
3267 |
-+ mix%i_vtrial(1)=1 ; mix%i_vresid(1)=2 |
3268 |
-+ if (mix%useprec) then |
3269 |
-+ mix%i_vrespc(1)=3 ; mix%i_vrespc(2)=4 |
3270 |
-+ else |
3271 |
-+ mix%i_vrespc(1)=2 ; mix%i_vrespc(2)=3 |
3272 |
-+ end if |
3273 |
-+ else if (iscf == AB7_MIXING_ANDERSON_2) then |
3274 |
-+ mix%i_vtrial(1)=1 ; mix%i_vtrial(2)=2 |
3275 |
-+ mix%i_vresid(1)=3 |
3276 |
-+ if (mix%useprec) then |
3277 |
-+ mix%i_vrespc(1)=4 ; mix%i_vrespc(2)=5 ; mix%i_vrespc(3)=6 |
3278 |
-+ else |
3279 |
-+ mix%i_vrespc(1)=3 ; mix%i_vrespc(2)=4 ; mix%i_vrespc(3)=5 |
3280 |
-+ end if |
3281 |
-+ else if(iscf == AB7_MIXING_CG_ENERGY .or. & |
3282 |
-+ & iscf == AB7_MIXING_CG_ENERGY_2) then |
3283 |
-+ mix%n_fftgr=10 ; mix%n_index=3 |
3284 |
-+ mix%i_vtrial(1)=1 |
3285 |
-+ mix%i_vresid(1)=2 ; mix%i_vresid(2)=4 ; mix%i_vresid(3)=7 |
3286 |
-+ mix%i_vrespc(1)=3 ; mix%i_vrespc(2)=5 ; mix%i_vrespc(3)=8 |
3287 |
-+ mix%i_rhor(2)=9 ; mix%i_rhor(3)=10 |
3288 |
-+ else if(iscf == AB7_MIXING_PULAY) then |
3289 |
-+ do ii=1,mix%n_pulayit |
3290 |
-+ mix%i_vtrial(ii)=2*ii-1 ; mix%i_vrespc(ii)=2*ii |
3291 |
-+ end do |
3292 |
-+ mix%i_vrespc(mix%n_pulayit+1)=2*mix%n_pulayit+1 |
3293 |
-+ mix%i_vresid(1)=2*mix%n_pulayit+2 |
3294 |
-+ if (.not. mix%useprec) mix%i_vresid(1)=2 |
3295 |
-+ end if ! iscf cases |
3296 |
-+ end subroutine ab7_mixing_new |
3297 |
-+ |
3298 |
-+ subroutine ab7_mixing_use_disk_cache(mix, fnametmp_fft) |
3299 |
-+ |
3300 |
-+ |
3301 |
-+ implicit none |
3302 |
-+ |
3303 |
-+ |
3304 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
3305 |
-+ character(len = *), intent(in) :: fnametmp_fft |
3306 |
-+ |
3307 |
-+ if (len(trim(fnametmp_fft)) > 0) then |
3308 |
-+ mix%mffmem = 0 |
3309 |
-+ write(mix%diskCache, "(A)") fnametmp_fft |
3310 |
-+ else |
3311 |
-+ mix%mffmem = 1 |
3312 |
-+ end if |
3313 |
-+ end subroutine ab7_mixing_use_disk_cache |
3314 |
-+ |
3315 |
-+ subroutine ab7_mixing_use_moving_atoms(mix, natom, xred, dtn_pc) |
3316 |
-+ |
3317 |
-+ |
3318 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
3319 |
-+ integer, intent(in) :: natom |
3320 |
-+ real(dp), intent(in), target :: dtn_pc(3, natom) |
3321 |
-+ real(dp), intent(in), target :: xred(3, natom) |
3322 |
-+ |
3323 |
-+ mix%n_atom = natom |
3324 |
-+ mix%dtn_pc => dtn_pc |
3325 |
-+ mix%xred => xred |
3326 |
-+ end subroutine ab7_mixing_use_moving_atoms |
3327 |
-+ |
3328 |
-+ subroutine ab7_mixing_copy_current_step(mix, arr_resid, errid, errmess, & |
3329 |
-+ & arr_respc, arr_paw_resid, arr_paw_respc, arr_atm) |
3330 |
-+ |
3331 |
-+ |
3332 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
3333 |
-+ real(dp), intent(in) :: arr_resid(mix%space * mix%nfft, mix%nspden) |
3334 |
-+ integer, intent(out) :: errid |
3335 |
-+ character(len = 500), intent(out) :: errmess |
3336 |
-+ real(dp), intent(in), optional :: arr_respc(mix%space * mix%nfft, mix%nspden) |
3337 |
-+ real(dp), intent(in), optional :: arr_paw_resid(mix%n_pawmix), & |
3338 |
-+ & arr_paw_respc(mix%n_pawmix) |
3339 |
-+ real(dp), intent(in), optional :: arr_atm(3, mix%n_atom) |
3340 |
-+ |
3341 |
-+ if (.not. associated(mix%f_fftgr)) then |
3342 |
-+ errid = AB7_ERROR_MIXING_ARG |
3343 |
-+ write(errmess, '(a,a,a,a)' )ch10,& |
3344 |
-+ & ' ab7_mixing_set_arr_current_step: ERROR -',ch10,& |
3345 |
-+ & ' Working arrays not yet allocated.' |
3346 |
-+ return |
3347 |
-+ end if |
3348 |
-+ errid = AB7_NO_ERROR |
3349 |
-+ |
3350 |
-+ mix%f_fftgr(:,:,mix%i_vresid(1)) = arr_resid(:,:) |
3351 |
-+ if (present(arr_respc)) mix%f_fftgr(:,:,mix%i_vrespc(1)) = arr_respc(:,:) |
3352 |
-+ if (present(arr_paw_resid)) mix%f_paw(:, mix%i_vresid(1)) = arr_paw_resid(:) |
3353 |
-+ if (present(arr_paw_respc)) mix%f_paw(:, mix%i_vrespc(1)) = arr_paw_respc(:) |
3354 |
-+ if (present(arr_atm)) mix%f_atm(:,:, mix%i_vresid(1)) = arr_atm(:,:) |
3355 |
-+ end subroutine ab7_mixing_copy_current_step |
3356 |
-+ |
3357 |
-+ subroutine ab7_mixing_eval_allocate(mix, istep) |
3358 |
-+ |
3359 |
-+ |
3360 |
-+!This section has been created automatically by the script Abilint (TD). |
3361 |
-+!Do not modify the following lines by hand. |
3362 |
-+ use interfaces_18_timing |
3363 |
-+!End of the abilint section |
3364 |
-+ |
3365 |
-+ implicit none |
3366 |
-+ |
3367 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
3368 |
-+ integer, intent(in), optional :: istep |
3369 |
-+ |
3370 |
-+ integer :: istep_, i_stat, usepaw |
3371 |
-+ real(dp) :: tsec(2) |
3372 |
-+ character(len = *), parameter :: subname = "ab7_mixing_eval_allocate" |
3373 |
-+ |
3374 |
-+ istep_ = 1 |
3375 |
-+ if (present(istep)) istep_ = istep |
3376 |
-+ |
3377 |
-+ ! Allocate work array. |
3378 |
-+ if (.not. associated(mix%f_fftgr)) then |
3379 |
-+ allocate(mix%f_fftgr(mix%space * mix%nfft,mix%nspden,mix%n_fftgr), stat = i_stat) |
3380 |
-+ call memocc(i_stat, mix%f_fftgr, 'mix%f_fftgr', subname) |
3381 |
-+ mix%f_fftgr(:,:,:)=zero |
3382 |
-+ if (mix%mffmem == 0 .and. istep_ > 1) then |
3383 |
-+ call timab(83,1,tsec) |
3384 |
-+ open(unit=tmp_unit,file=mix%diskCache,form='unformatted',status='old') |
3385 |
-+ rewind(tmp_unit) |
3386 |
-+ read(tmp_unit) mix%f_fftgr |
3387 |
-+ if (mix%n_pawmix == 0) close(unit=tmp_unit) |
3388 |
-+ call timab(83,2,tsec) |
3389 |
-+ end if |
3390 |
-+ end if |
3391 |
-+ ! Allocate PAW work array. |
3392 |
-+ if (.not. associated(mix%f_paw)) then |
3393 |
-+ usepaw = 0 |
3394 |
-+ if (mix%n_pawmix > 0) usepaw = 1 |
3395 |
-+ allocate(mix%f_paw(max(1,mix%n_pawmix),max(1,mix%n_fftgr * usepaw)), & |
3396 |
-+ & stat = i_stat) |
3397 |
-+ call memocc(i_stat, mix%f_paw, 'mix%f_paw', subname) |
3398 |
-+ if (mix%n_pawmix > 0) then |
3399 |
-+ mix%f_paw(:,:)=zero |
3400 |
-+ if (mix%mffmem == 0 .and. istep_ > 1) then |
3401 |
-+ read(tmp_unit) mix%f_paw |
3402 |
-+ close(unit=tmp_unit) |
3403 |
-+ call timab(83,2,tsec) |
3404 |
-+ end if |
3405 |
-+ end if |
3406 |
-+ end if |
3407 |
-+ ! Allocate atom work array. |
3408 |
-+ if (.not. associated(mix%f_atm)) then |
3409 |
-+ allocate(mix%f_atm(3,mix%n_atom,mix%n_fftgr), stat = i_stat) |
3410 |
-+ call memocc(i_stat, mix%f_atm, 'mix%f_atm', subname) |
3411 |
-+ end if |
3412 |
-+ end subroutine ab7_mixing_eval_allocate |
3413 |
-+ |
3414 |
-+ subroutine ab7_mixing_eval_deallocate(mix) |
3415 |
-+ |
3416 |
-+ |
3417 |
-+!This section has been created automatically by the script Abilint (TD). |
3418 |
-+!Do not modify the following lines by hand. |
3419 |
-+ use interfaces_18_timing |
3420 |
-+!End of the abilint section |
3421 |
-+ |
3422 |
-+ implicit none |
3423 |
-+ |
3424 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
3425 |
-+ |
3426 |
-+ integer :: i_all, i_stat |
3427 |
-+ real(dp) :: tsec(2) |
3428 |
-+ character(len = *), parameter :: subname = "ab7_mixing_eval_deallocate" |
3429 |
-+ |
3430 |
-+ ! Save on disk and deallocate work array in case on disk cache only. |
3431 |
-+ if (mix%mffmem == 0) then |
3432 |
-+ call timab(83,1,tsec) |
3433 |
-+ open(unit=tmp_unit,file=mix%diskCache,form='unformatted',status='unknown') |
3434 |
-+ rewind(tmp_unit) |
3435 |
-+ ! VALGRIND complains not all of f_fftgr_disk is initialized |
3436 |
-+ write(tmp_unit) mix%f_fftgr |
3437 |
-+ if (mix%n_pawmix > 0) then |
3438 |
-+ write(tmp_unit) mix%f_paw |
3439 |
-+ end if |
3440 |
-+ close(unit=tmp_unit) |
3441 |
-+ call timab(83,2,tsec) |
3442 |
-+ i_all = -product(shape(mix%f_fftgr))*kind(mix%f_fftgr) |
3443 |
-+ deallocate(mix%f_fftgr, stat = i_stat) |
3444 |
-+ call memocc(i_stat, i_all, 'mix%f_atm', subname) |
3445 |
-+ nullify(mix%f_fftgr) |
3446 |
-+ if (associated(mix%f_paw)) then |
3447 |
-+ i_all = -product(shape(mix%f_paw))*kind(mix%f_paw) |
3448 |
-+ deallocate(mix%f_paw, stat = i_stat) |
3449 |
-+ call memocc(i_stat, i_all, 'mix%f_paw', subname) |
3450 |
-+ nullify(mix%f_paw) |
3451 |
-+ end if |
3452 |
-+ end if |
3453 |
-+ end subroutine ab7_mixing_eval_deallocate |
3454 |
-+ |
3455 |
-+ subroutine ab7_mixing_eval(mix, arr, istep, nfftot, ucvol, & |
3456 |
-+ & mpi_comm, mpi_summarize, errid, errmess, & |
3457 |
-+ & reset, isecur, pawarr, pawopt, response, etotal, potden, & |
3458 |
-+ & resnrm, fnrm, fdot, user_data) |
3459 |
-+ |
3460 |
-+ |
3461 |
-+!This section has been created automatically by the script Abilint (TD). |
3462 |
-+!Do not modify the following lines by hand. |
3463 |
-+ use interfaces_56_mixing |
3464 |
-+!End of the abilint section |
3465 |
-+ |
3466 |
-+ implicit none |
3467 |
-+ |
3468 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
3469 |
-+ integer, intent(in) :: istep, nfftot, mpi_comm |
3470 |
-+ logical, intent(in) :: mpi_summarize |
3471 |
-+ real(dp), intent(in) :: ucvol |
3472 |
-+ real(dp), intent(inout) :: arr(mix%space * mix%nfft,mix%nspden) |
3473 |
-+ integer, intent(out) :: errid |
3474 |
-+ character(len = 500), intent(out) :: errmess |
3475 |
-+ |
3476 |
-+ logical, intent(in), optional :: reset |
3477 |
-+ integer, intent(in), optional :: isecur, pawopt, response |
3478 |
-+ real(dp), intent(inout), optional, target :: pawarr(mix%n_pawmix) |
3479 |
-+ real(dp), intent(in), optional :: etotal |
3480 |
-+ real(dp), intent(in), optional :: potden(mix%space * mix%nfft,mix%nspden) |
3481 |
-+ real(dp), intent(out), optional :: resnrm |
3482 |
-+ optional :: fnrm, fdot |
3483 |
-+ integer, intent(in), optional :: user_data(:) |
3484 |
-+ |
3485 |
-+ interface |
3486 |
-+ function fdot(x,y,cplex,nfft,nspden,opt_denpot,user_data) |
3487 |
-+ integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
3488 |
-+ double precision, intent(in) :: x(*), y(*) |
3489 |
-+ integer, intent(in) :: user_data(:) |
3490 |
-+ |
3491 |
-+ double precision :: fdot |
3492 |
-+ end function fdot |
3493 |
-+ |
3494 |
-+ function fnrm(x,cplex,nfft,nspden,opt_denpot,user_data) |
3495 |
-+ integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
3496 |
-+ double precision, intent(in) :: x(*) |
3497 |
-+ integer, intent(in) :: user_data(:) |
3498 |
-+ |
3499 |
-+ double precision :: fnrm |
3500 |
-+ end function fnrm |
3501 |
-+ end interface |
3502 |
-+ |
3503 |
-+ character(len = *), parameter :: subname = "ab7_mixing_eval" |
3504 |
-+ integer :: moveAtm, dbl_nnsclo, initialized, isecur_ |
3505 |
-+ integer :: usepaw, pawoptmix_, response_, i_stat, i_all |
3506 |
-+ integer :: user_data_(2) |
3507 |
-+ real(dp) :: resnrm_ |
3508 |
-+ real(dp), pointer :: pawarr_(:) |
3509 |
-+ |
3510 |
-+ ! Argument checkings. |
3511 |
-+ if (mix%iscf == AB7_MIXING_NONE) then |
3512 |
-+ errid = AB7_ERROR_MIXING_ARG |
3513 |
-+ write(errmess, '(a,a,a,a)' )ch10,& |
3514 |
-+ & ' ab7_mixing_eval: ERROR -',ch10,& |
3515 |
-+ & ' No method has been chosen.' |
3516 |
-+ return |
3517 |
-+ end if |
3518 |
-+ if (mix%n_pawmix > 0 .and. .not. present(pawarr)) then |
3519 |
-+ errid = AB7_ERROR_MIXING_ARG |
3520 |
-+ write(errmess, '(a,a,a,a)' )ch10,& |
3521 |
-+ & ' ab7_mixing_eval: ERROR -',ch10,& |
3522 |
-+ & ' PAW is used, but no pawarr argument provided.' |
3523 |
-+ return |
3524 |
-+ end if |
3525 |
-+ if (mix%n_atom > 0 .and. (.not. associated(mix%dtn_pc) .or. & |
3526 |
-+ & .not. associated(mix%xred))) then |
3527 |
-+ errid = AB7_ERROR_MIXING_ARG |
3528 |
-+ write(errmess, '(a,a,a,a)' )ch10,& |
3529 |
-+ & ' ab7_mixing_eval: ERROR -',ch10,& |
3530 |
-+ & ' Moving atoms is used, but no xred or dtn_pc attributes provided.' |
3531 |
-+ return |
3532 |
-+ end if |
3533 |
-+ if ((present(fnrm) .or. present(fdot) .or. present(user_data)) .and. & |
3534 |
-+ & .not. (present(fnrm) .and. present(fdot) .and. present(user_data))) then |
3535 |
-+ errid = AB7_ERROR_MIXING_ARG |
3536 |
-+ write(errmess, '(a,a,a,a)' )ch10,& |
3537 |
-+ & ' ab7_mixing_eval: ERROR -',ch10,& |
3538 |
-+ & ' Passing optional norm and dot product routines without user_data argument.' |
3539 |
-+ return |
3540 |
-+ end if |
3541 |
-+ errid = AB7_NO_ERROR |
3542 |
-+ |
3543 |
-+ ! Miscellaneous |
3544 |
-+ moveAtm = 0 |
3545 |
-+ if (mix%n_atom > 0) moveAtm = 1 |
3546 |
-+ initialized = 1 |
3547 |
-+ if (present(reset)) then |
3548 |
-+ if (reset) initialized = 0 |
3549 |
-+ end if |
3550 |
-+ isecur_ = 0 |
3551 |
-+ if (present(isecur)) isecur_ = isecur |
3552 |
-+ usepaw = 0 |
3553 |
-+ if (mix%n_pawmix > 0) usepaw = 1 |
3554 |
-+ pawoptmix_ = 0 |
3555 |
-+ if (present(pawopt)) pawoptmix_ = pawopt |
3556 |
-+ response_ = 0 |
3557 |
-+ if (present(response)) response_ = response |
3558 |
-+ if (present(pawarr)) then |
3559 |
-+ pawarr_ => pawarr |
3560 |
-+ else |
3561 |
-+ allocate(pawarr_(1), stat = i_stat) |
3562 |
-+ call memocc(i_stat, pawarr_, 'pawarr_', subname) |
3563 |
-+ end if |
3564 |
-+ |
3565 |
-+ ! Norm and dot products. |
3566 |
-+ if (.not. present(user_data)) then |
3567 |
-+ user_data_(1) = 0 |
3568 |
-+ if (mpi_summarize) user_data_(1) = 1 |
3569 |
-+ user_data_(2) = mpi_comm |
3570 |
-+ end if |
3571 |
-+ |
3572 |
-+ ! Do the mixing. |
3573 |
-+ resnrm_ = 0.d0 |
3574 |
-+ if (mix%iscf == AB7_MIXING_EIG) then |
3575 |
-+ ! This routine compute the eigenvalues of the SCF operator |
3576 |
-+ call scfeig(istep, mix%space * mix%nfft, mix%nspden, & |
3577 |
-+ & mix%f_fftgr(:,:,mix%i_vrespc(1)), arr, & |
3578 |
-+ & mix%f_fftgr(:,:,1), mix%f_fftgr(:,:,4:5), errid, errmess) |
3579 |
-+ else if (mix%iscf == AB7_MIXING_SIMPLE .or. & |
3580 |
-+ & mix%iscf == AB7_MIXING_ANDERSON .or. & |
3581 |
-+ & mix%iscf == AB7_MIXING_ANDERSON_2 .or. & |
3582 |
-+ & mix%iscf == AB7_MIXING_PULAY) then |
3583 |
-+ if (present(user_data)) then |
3584 |
-+ call scfopt(mix%space, mix%f_fftgr,mix%f_paw,mix%iscf,istep,& |
3585 |
-+ & mix%i_vrespc,mix%i_vtrial, mix%nfft,mix%n_pawmix,mix%nspden, & |
3586 |
-+ & mix%n_fftgr,mix%n_index,mix%kind,pawoptmix_,usepaw,pawarr_, & |
3587 |
-+ & resnrm_, arr, fnrm, fdot, user_data, errid, errmess) |
3588 |
-+ else |
3589 |
-+ call scfopt(mix%space, mix%f_fftgr,mix%f_paw,mix%iscf,istep,& |
3590 |
-+ & mix%i_vrespc,mix%i_vtrial, mix%nfft,mix%n_pawmix,mix%nspden, & |
3591 |
-+ & mix%n_fftgr,mix%n_index,mix%kind,pawoptmix_,usepaw,pawarr_, & |
3592 |
-+ & resnrm_, arr, fnrm_default, fdot_default, user_data_, errid, errmess) |
3593 |
-+ end if |
3594 |
-+ ! Change atomic positions |
3595 |
-+ if((istep==1 .or. mix%iscf==AB7_MIXING_SIMPLE) .and. mix%n_atom > 0)then |
3596 |
-+ ! GAF: 2009-06-03 |
3597 |
-+ ! Apparently there are not reason |
3598 |
-+ ! to restrict iscf=2 for ionmov=5 |
3599 |
-+ mix%xred(:,:) = mix%xred(:,:) + mix%dtn_pc(:,:) |
3600 |
-+ end if |
3601 |
-+ else if (mix%iscf == AB7_MIXING_CG_ENERGY .or. & |
3602 |
-+ & mix%iscf == AB7_MIXING_CG_ENERGY_2) then |
3603 |
-+ ! Optimize next vtrial using an algorithm based |
3604 |
-+ ! on the conjugate gradient minimization of etotal |
3605 |
-+ if (.not. present(etotal) .or. .not. present(potden)) then |
3606 |
-+ errid = AB7_ERROR_MIXING_ARG |
3607 |
-+ write(errmess, '(a,a,a,a)' )ch10,& |
3608 |
-+ & ' ab7_mixing_eval: ERROR -',ch10,& |
3609 |
-+ & ' Arguments etotal or potden are missing for CG on energy methods.' |
3610 |
-+ return |
3611 |
-+ end if |
3612 |
-+ if (mix%n_atom == 0) then |
3613 |
-+ allocate(mix%xred(3,0), stat = i_stat) |
3614 |
-+ call memocc(i_stat, mix%xred, 'mix%xred', subname) |
3615 |
-+ allocate(mix%dtn_pc(3,0), stat = i_stat) |
3616 |
-+ call memocc(i_stat, mix%dtn_pc, 'mix%dtn_pc', subname) |
3617 |
-+ end if |
3618 |
-+ if (present(user_data)) then |
3619 |
-+ call scfcge(mix%space,dbl_nnsclo,mix%dtn_pc,etotal,mix%f_atm,& |
3620 |
-+ & mix%f_fftgr,initialized,mix%iscf,isecur_,istep,& |
3621 |
-+ & mix%i_rhor,mix%i_vresid,mix%i_vrespc,moveAtm,& |
3622 |
-+ & mix%n_atom,mix%nfft,nfftot,& |
3623 |
-+ & mix%nspden,mix%n_fftgr,mix%n_index,mix%kind,& |
3624 |
-+ & response_,potden,ucvol,arr,mix%xred, & |
3625 |
-+ & fnrm, fdot, user_data, errid, errmess) |
3626 |
-+ else |
3627 |
-+ call scfcge(mix%space,dbl_nnsclo,mix%dtn_pc,etotal,mix%f_atm,& |
3628 |
-+ & mix%f_fftgr,initialized,mix%iscf,isecur_,istep,& |
3629 |
-+ & mix%i_rhor,mix%i_vresid,mix%i_vrespc,moveAtm,& |
3630 |
-+ & mix%n_atom,mix%nfft,nfftot,& |
3631 |
-+ & mix%nspden,mix%n_fftgr,mix%n_index,mix%kind,& |
3632 |
-+ & response_,potden,ucvol,arr,mix%xred, fnrm_default, & |
3633 |
-+ & fdotn_default, user_data_, errid, errmess) |
3634 |
-+ end if |
3635 |
-+ if (mix%n_atom == 0) then |
3636 |
-+ i_all = -product(shape(mix%xred))*kind(mix%xred) |
3637 |
-+ deallocate(mix%xred, stat = i_stat) |
3638 |
-+ call memocc(i_stat, i_all, 'mix%xred', subname) |
3639 |
-+ i_all = -product(shape(mix%dtn_pc))*kind(mix%dtn_pc) |
3640 |
-+ deallocate(mix%dtn_pc, stat = i_stat) |
3641 |
-+ call memocc(i_stat, i_all, 'mix%dtn_pc', subname) |
3642 |
-+ end if |
3643 |
-+ if (dbl_nnsclo == 1) errid = AB7_ERROR_MIXING_INC_NNSLOOP |
3644 |
-+ end if |
3645 |
-+ |
3646 |
-+ if (present(resnrm)) resnrm = resnrm_ |
3647 |
-+ if (.not. present(pawarr)) then |
3648 |
-+ i_all = -product(shape(pawarr_))*kind(pawarr_) |
3649 |
-+ deallocate(pawarr_, stat = i_stat) |
3650 |
-+ call memocc(i_stat, i_all, 'pawarr_', subname) |
3651 |
-+ end if |
3652 |
-+ end subroutine ab7_mixing_eval |
3653 |
-+ |
3654 |
-+ subroutine ab7_mixing_deallocate(mix) |
3655 |
-+ implicit none |
3656 |
-+ |
3657 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
3658 |
-+ |
3659 |
-+ integer :: i_all, i_stat |
3660 |
-+ character(len = *), parameter :: subname = "ab7_mixing_deallocate" |
3661 |
-+ |
3662 |
-+ if (associated(mix%i_rhor)) then |
3663 |
-+ i_all = -product(shape(mix%i_rhor))*kind(mix%i_rhor) |
3664 |
-+ deallocate(mix%i_rhor, stat = i_stat) |
3665 |
-+ call memocc(i_stat, i_all, 'mix%i_rhor', subname) |
3666 |
-+ end if |
3667 |
-+ if (associated(mix%i_vtrial)) then |
3668 |
-+ i_all = -product(shape(mix%i_vtrial))*kind(mix%i_vtrial) |
3669 |
-+ deallocate(mix%i_vtrial, stat = i_stat) |
3670 |
-+ call memocc(i_stat, i_all, 'mix%i_vtrial', subname) |
3671 |
-+ end if |
3672 |
-+ if (associated(mix%i_vresid)) then |
3673 |
-+ i_all = -product(shape(mix%i_vresid))*kind(mix%i_vresid) |
3674 |
-+ deallocate(mix%i_vresid, stat = i_stat) |
3675 |
-+ call memocc(i_stat, i_all, 'mix%i_vresid', subname) |
3676 |
-+ end if |
3677 |
-+ if (associated(mix%i_vrespc)) then |
3678 |
-+ i_all = -product(shape(mix%i_vrespc))*kind(mix%i_vrespc) |
3679 |
-+ deallocate(mix%i_vrespc, stat = i_stat) |
3680 |
-+ call memocc(i_stat, i_all, 'mix%i_vrespc', subname) |
3681 |
-+ end if |
3682 |
-+ if (associated(mix%f_fftgr)) then |
3683 |
-+ i_all = -product(shape(mix%f_fftgr))*kind(mix%f_fftgr) |
3684 |
-+ deallocate(mix%f_fftgr, stat = i_stat) |
3685 |
-+ call memocc(i_stat, i_all, 'mix%f_fftgr', subname) |
3686 |
-+ end if |
3687 |
-+ if (associated(mix%f_paw)) then |
3688 |
-+ i_all = -product(shape(mix%f_paw))*kind(mix%f_paw) |
3689 |
-+ deallocate(mix%f_paw, stat = i_stat) |
3690 |
-+ call memocc(i_stat, i_all, 'mix%f_paw', subname) |
3691 |
-+ end if |
3692 |
-+ if (associated(mix%f_atm)) then |
3693 |
-+ i_all = -product(shape(mix%f_atm))*kind(mix%f_atm) |
3694 |
-+ deallocate(mix%f_atm, stat = i_stat) |
3695 |
-+ call memocc(i_stat, i_all, 'mix%f_atm', subname) |
3696 |
-+ end if |
3697 |
-+ |
3698 |
-+ call nullify_(mix) |
3699 |
-+ end subroutine ab7_mixing_deallocate |
3700 |
-+ |
3701 |
-+ function fnrm_default(x,cplex,nfft,nspden,opt_denpot,user_data) |
3702 |
-+ integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
3703 |
-+ double precision, intent(in) :: x(*) |
3704 |
-+ integer, intent(in) :: user_data(:) |
3705 |
-+ |
3706 |
-+ double precision :: fnrm_default |
3707 |
-+ real(dp) :: resid_new(1) |
3708 |
-+ |
3709 |
-+ call sqnormm_v(cplex,1,user_data(2),(user_data(1) /= 0),1,& |
3710 |
-+ & nfft,resid_new,1,nspden,opt_denpot,x) |
3711 |
-+ fnrm_default = resid_new(1) |
3712 |
-+ end function fnrm_default |
3713 |
-+ |
3714 |
-+ function fdot_default(x,y,cplex,nfft,nspden,opt_denpot,user_data) |
3715 |
-+ integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
3716 |
-+ double precision, intent(in) :: x(*), y(*) |
3717 |
-+ integer, intent(in) :: user_data(:) |
3718 |
-+ |
3719 |
-+ double precision :: fdot_default |
3720 |
-+ real(dp) :: prod_resid(1) |
3721 |
-+ |
3722 |
-+ call dotprodm_v(cplex,1,prod_resid,1,1,user_data(2),(user_data(1) /= 0),1,1,& |
3723 |
-+ & nfft,1,1,nspden,opt_denpot,x,y) |
3724 |
-+ fdot_default = prod_resid(1) |
3725 |
-+ end function fdot_default |
3726 |
-+ |
3727 |
-+ function fdotn_default(x,y,cplex,nfft,nspden,opt_denpot,user_data) |
3728 |
-+ integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
3729 |
-+ double precision, intent(in) :: x(*), y(*) |
3730 |
-+ integer, intent(in) :: user_data(:) |
3731 |
-+ |
3732 |
-+ double precision :: fdotn_default |
3733 |
-+ real(dp) :: prod_resid(1,1,1) |
3734 |
-+ |
3735 |
-+ call dotprodm_vn(cplex,1,x,prod_resid,1,1,user_data(2),(user_data(1) /= 0),1,1,& |
3736 |
-+ & 1,nfft,1,nspden,y) |
3737 |
-+ fdotn_default = prod_resid(1,1,1) |
3738 |
-+ end function fdotn_default |
3739 |
-+ end module m_ab7_mixing |
3740 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/scfcge.F90 bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/scfcge.F90 |
3741 |
---- bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/scfcge.F90 2012-07-09 16:43:33.000000000 +0200 |
3742 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/scfcge.F90 2013-06-11 16:51:00.000000000 +0200 |
3743 |
-@@ -182,7 +182,7 @@ |
3744 |
- !DEBUG |
3745 |
- !write(6,*)' scfcge : enter ' |
3746 |
- !ENDDEBUG |
3747 |
-- errid = AB6_NO_ERROR |
3748 |
-+ errid = AB7_NO_ERROR |
3749 |
- dbl_nnsclo = 0 |
3750 |
- |
3751 |
- !reduction gives the level of reduction of the error in |
3752 |
-@@ -318,7 +318,7 @@ |
3753 |
- & d2edv2_new,d2edv2_old,d2edv2_predict,& |
3754 |
- & etotal,etotal_old,etotal_predict,& |
3755 |
- & lambda_new,lambda_old,lambda_predict,errid_,message) |
3756 |
-- if (errid_ /= AB6_NO_ERROR) then |
3757 |
-+ if (errid_ /= AB7_NO_ERROR) then |
3758 |
- call wrtout(std_out,message,'COLL') |
3759 |
- end if |
3760 |
- |
3761 |
-@@ -388,7 +388,7 @@ |
3762 |
- & (abs(lambda_predict)<0.005_dp*lambda_adapt .and. iscf==6).or. & |
3763 |
- & ilinmin==mlinmin ) )then |
3764 |
- if(number_of_restart>12)then |
3765 |
-- errid = AB6_ERROR_MIXING_CONVERGENCE |
3766 |
-+ errid = AB7_ERROR_MIXING_CONVERGENCE |
3767 |
- write(errmess, '(a,a,a,a,a,i3,a,a,a,a,a)' ) ch10,& |
3768 |
- & ' scfcge : ERROR -',ch10,& |
3769 |
- & ' Potential-based CG line minimization not',& |
3770 |
-@@ -572,7 +572,7 @@ |
3771 |
- & d2edv2_new,d2edv2_old,d2edv2_predict,& |
3772 |
- & etotal,etotal_old,etotal_predict,& |
3773 |
- & lambda_new,lambda_old,lambda_predict,errid_,message) |
3774 |
-- if (errid_ /= AB6_NO_ERROR) then |
3775 |
-+ if (errid_ /= AB7_NO_ERROR) then |
3776 |
- call wrtout(std_out,message,'COLL') |
3777 |
- end if |
3778 |
- lambda_predict2=0.0_dp |
3779 |
-@@ -836,7 +836,7 @@ |
3780 |
- ! End of choice between initialisation or more developed |
3781 |
- ! parts of the CG algorithm |
3782 |
- else |
3783 |
-- errid = AB6_ERROR_MIXING_ARG |
3784 |
-+ errid = AB7_ERROR_MIXING_ARG |
3785 |
- write(errmess, '(a,a,a,a)' ) ch10,& |
3786 |
- & ' scfcge : BUG ',ch10,& |
3787 |
- & ' You should not be here ! ' |
3788 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/scfeig.F90 bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/scfeig.F90 |
3789 |
---- bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/scfeig.F90 2012-07-09 16:43:33.000000000 +0200 |
3790 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/scfeig.F90 2013-06-11 16:51:00.000000000 +0200 |
3791 |
-@@ -71,10 +71,10 @@ |
3792 |
- |
3793 |
- ! ************************************************************************* |
3794 |
- |
3795 |
-- errid = AB6_NO_ERROR |
3796 |
-+ errid = AB7_NO_ERROR |
3797 |
- |
3798 |
- if(nspden==4)then |
3799 |
-- errid = AB6_ERROR_MIXING_ARG |
3800 |
-+ errid = AB7_ERROR_MIXING_ARG |
3801 |
- write(errmess, *) ' scfeig : does not work yet for nspden=4' |
3802 |
- return |
3803 |
- end if |
3804 |
-@@ -103,7 +103,7 @@ |
3805 |
- & ' scfeig : initial PC_residual square =',resid_old |
3806 |
- call wrtout(std_out,message,'COLL') |
3807 |
- if(resid_old>1.0d-8)then |
3808 |
-- errid = AB6_ERROR_MIXING_ARG |
3809 |
-+ errid = AB7_ERROR_MIXING_ARG |
3810 |
- write(errmess,'(a,a,a,a,a,a,a,a,a,a)') ch10,& |
3811 |
- & ' scfeig : ERROR -',ch10,& |
3812 |
- & ' This value is not good enough to allow',ch10,& |
3813 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/scfopt.F90 bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/scfopt.F90 |
3814 |
---- bigdft-abi-1.0.4.old/libABINIT/src/56_mixing/scfopt.F90 2012-07-09 16:43:33.000000000 +0200 |
3815 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/56_mixing/scfopt.F90 2013-06-11 16:51:00.000000000 +0200 |
3816 |
-@@ -136,7 +136,7 @@ |
3817 |
- !DEBUG |
3818 |
- !write(6,*)' scfopt : enter ; istep,iscf ',istep,iscf |
3819 |
- !ENDDEBUG |
3820 |
-- errid = AB6_NO_ERROR |
3821 |
-+ errid = AB7_NO_ERROR |
3822 |
- |
3823 |
- i_vstore=i_vtrial(1) |
3824 |
- if (iscf==4) i_vstore=i_vtrial(2) |
3825 |
-@@ -322,7 +322,7 @@ |
3826 |
- call wrtout(std_out,message,'COLL') |
3827 |
- |
3828 |
- if (npulay>npulaymax) then |
3829 |
-- errid = AB6_ERROR_MIXING_CONVERGENCE |
3830 |
-+ errid = AB7_ERROR_MIXING_CONVERGENCE |
3831 |
- write(errmess, '(4a)' ) ch10,& |
3832 |
- & ' scfopt : ERROR - ',ch10,& |
3833 |
- & ' Too much iterations required for Pulay algorithm (<50) !' |
3834 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/56_recipspace/m_ab6_kpoints.F90 bigdft-abi-1.0.4.new/libABINIT/src/56_recipspace/m_ab6_kpoints.F90 |
3835 |
---- bigdft-abi-1.0.4.old/libABINIT/src/56_recipspace/m_ab6_kpoints.F90 2012-07-09 16:43:33.000000000 +0200 |
3836 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/56_recipspace/m_ab6_kpoints.F90 1970-01-01 01:00:00.000000000 +0100 |
3837 |
-@@ -1,281 +0,0 @@ |
3838 |
--!* * Fortran90 source file * |
3839 |
--!* |
3840 |
--!* Copyright (C) 2008-2011 ABINIT Group (Damien Caliste) |
3841 |
--!* All rights reserved. |
3842 |
--!* |
3843 |
--!* This file is part of the ABINIT software package. For license information, |
3844 |
--!* please see the COPYING file in the top-level directory of the ABINIT source |
3845 |
--!* distribution. |
3846 |
--!* |
3847 |
--!* |
3848 |
-- |
3849 |
--#if defined HAVE_CONFIG_H |
3850 |
--#include "config.inc" |
3851 |
--#endif |
3852 |
-- |
3853 |
--module m_ab6_kpoints |
3854 |
-- |
3855 |
-- use defs_basis |
3856 |
-- use m_ab6_symmetry |
3857 |
-- |
3858 |
-- implicit none |
3859 |
-- |
3860 |
-- private |
3861 |
-- |
3862 |
-- logical, private, parameter :: AB_DBG = .false. |
3863 |
-- |
3864 |
-- public :: kpoints_get_irreductible_zone |
3865 |
-- |
3866 |
-- public :: kpoints_get_mp_k_grid |
3867 |
-- public :: kpoints_get_auto_k_grid |
3868 |
-- |
3869 |
-- public :: kpoints_binding_mp_k_1 |
3870 |
-- public :: kpoints_binding_mp_k_2 |
3871 |
-- public :: kpoints_binding_auto_k_1 |
3872 |
-- public :: kpoints_binding_auto_k_2 |
3873 |
-- |
3874 |
--contains |
3875 |
-- |
3876 |
-- subroutine kpoints_get_irreductible_zone(irrzon, phnons, & |
3877 |
-- & n1, n2, n3, nsppol, nspden, symid, errno) |
3878 |
-- |
3879 |
-- |
3880 |
--!This section has been created automatically by the script Abilint (TD). |
3881 |
--!Do not modify the following lines by hand. |
3882 |
-- use interfaces_56_recipspace |
3883 |
--!End of the abilint section |
3884 |
-- |
3885 |
-- integer, intent(in) :: symid |
3886 |
-- integer, intent(in) :: n1, n2, n3, nsppol, nspden |
3887 |
-- integer, intent(out) :: irrzon(n1*n2*n3,2,(nspden/nsppol)-3*(nspden/4)) |
3888 |
-- real(dp), intent(out) :: phnons(2,n1*n2*n3,(nspden/nsppol)-3*(nspden/4)) |
3889 |
-- integer, intent(out) :: errno |
3890 |
-- |
3891 |
-- type(symmetry_type), pointer :: sym |
3892 |
-- |
3893 |
-- if (AB_DBG) write(std_err,*) "AB kpoints: call get irreductible zone." |
3894 |
-- |
3895 |
-- errno = AB6_NO_ERROR |
3896 |
-- call symmetry_get_from_id(sym, symid, errno) |
3897 |
-- if (errno /= AB6_NO_ERROR) return |
3898 |
-- |
3899 |
-- if (sym%withSpin /= nspden) then |
3900 |
-- errno = AB6_ERROR_ARG |
3901 |
-- return |
3902 |
-- end if |
3903 |
-- |
3904 |
-- call irrzg(irrzon, nspden, nsppol, sym%nSym, n1, n2, n3, phnons, & |
3905 |
-- & sym%symAfm, sym%sym, sym%transNon) |
3906 |
-- end subroutine kpoints_get_irreductible_zone |
3907 |
-- |
3908 |
-- |
3909 |
-- |
3910 |
-- subroutine kpoints_binding_mp_k_1(symid, nkpt, ngkpt, & |
3911 |
-- & kptrlatt, kptrlen, nshiftk, shiftk, errno) |
3912 |
-- |
3913 |
-- |
3914 |
--!This section has been created automatically by the script Abilint (TD). |
3915 |
--!Do not modify the following lines by hand. |
3916 |
-- use interfaces_56_recipspace |
3917 |
--!End of the abilint section |
3918 |
-- |
3919 |
-- integer, intent(in) :: symid |
3920 |
-- integer, intent(out) :: errno |
3921 |
-- integer, intent(in) :: ngkpt(3) |
3922 |
-- integer, intent(inout) :: nshiftk |
3923 |
-- real(dp), intent(inout) :: shiftk(3, 8) |
3924 |
-- real(dp), intent(out) :: kptrlen |
3925 |
-- integer, intent(out) :: kptrlatt(3,3) |
3926 |
-- integer, intent(out) :: nkpt |
3927 |
-- |
3928 |
-- type(symmetry_type), pointer :: sym |
3929 |
-- real(dp) :: kpt(3,1), wkpt(1) |
3930 |
-- |
3931 |
-- if (AB_DBG) write(std_err,*) "AB symmetry: call get k grid1." |
3932 |
-- |
3933 |
-- errno = AB6_NO_ERROR |
3934 |
-- call symmetry_get_from_id(sym, symid, errno) |
3935 |
-- if (errno /= AB6_NO_ERROR) return |
3936 |
-- |
3937 |
-- ! First, compute the number of kpoints |
3938 |
-- kptrlatt(:,:) = 0 |
3939 |
-- kptrlatt(1,1) = ngkpt(1) |
3940 |
-- kptrlatt(2,2) = ngkpt(2) |
3941 |
-- kptrlatt(3,3) = ngkpt(3) |
3942 |
-- kptrlen = 20. |
3943 |
-- |
3944 |
-- call getkgrid(6, 1, kpt, 1, kptrlatt, kptrlen, & |
3945 |
-- & AB6_MAX_SYMMETRIES, 0, nkpt, nshiftk, sym%nSym, & |
3946 |
-- & sym%rprimd, shiftk, sym%symAfm, sym%sym, & |
3947 |
-- & sym%vacuum, wkpt) |
3948 |
-- end subroutine kpoints_binding_mp_k_1 |
3949 |
-- |
3950 |
-- subroutine kpoints_binding_mp_k_2(symid, nkpt, kpt, wkpt, & |
3951 |
-- & kptrlatt, kptrlen, nshiftk, shiftk, errno) |
3952 |
-- |
3953 |
-- |
3954 |
--!This section has been created automatically by the script Abilint (TD). |
3955 |
--!Do not modify the following lines by hand. |
3956 |
-- use interfaces_56_recipspace |
3957 |
--!End of the abilint section |
3958 |
-- |
3959 |
-- integer, intent(in) :: symid |
3960 |
-- integer, intent(out) :: errno |
3961 |
-- integer, intent(inout) :: nshiftk |
3962 |
-- real(dp), intent(inout) :: shiftk(3, 8) |
3963 |
-- integer, intent(in) :: nkpt |
3964 |
-- real(dp), intent(out) :: kpt(3,nkpt), wkpt(nkpt) |
3965 |
-- real(dp), intent(inout) :: kptrlen |
3966 |
-- integer, intent(inout) :: kptrlatt(3,3) |
3967 |
-- |
3968 |
-- type(symmetry_type), pointer :: sym |
3969 |
-- integer :: nkpt_ |
3970 |
-- |
3971 |
-- if (AB_DBG) write(std_err,*) "AB symmetry: call get k grid2." |
3972 |
-- |
3973 |
-- errno = AB6_NO_ERROR |
3974 |
-- call symmetry_get_from_id(sym, symid, errno) |
3975 |
-- if (errno /= AB6_NO_ERROR) return |
3976 |
-- |
3977 |
-- ! Then, we call it again to get the actual values for the k points. |
3978 |
-- call getkgrid(6, 1, kpt, 1, kptrlatt, kptrlen, & |
3979 |
-- & AB6_MAX_SYMMETRIES, nkpt, nkpt_, nshiftk, sym%nSym, & |
3980 |
-- & sym%rprimd, shiftk, sym%symAfm, sym%sym, & |
3981 |
-- & sym%vacuum, wkpt) |
3982 |
-- end subroutine kpoints_binding_mp_k_2 |
3983 |
-- |
3984 |
-- |
3985 |
-- subroutine kpoints_get_mp_k_grid(symid, nkpt, kpt, wkpt, & |
3986 |
-- & ngkpt, nshiftk, shiftk, errno) |
3987 |
-- |
3988 |
-- integer, intent(in) :: symid |
3989 |
-- integer, intent(out) :: errno |
3990 |
-- integer, intent(in) :: ngkpt(3) |
3991 |
-- integer, intent(in) :: nshiftk |
3992 |
-- real(dp), intent(in) :: shiftk(3, nshiftk) |
3993 |
-- integer, intent(out) :: nkpt |
3994 |
-- real(dp), pointer :: kpt(:,:), wkpt(:) |
3995 |
-- |
3996 |
-- real(dp) :: kptrlen |
3997 |
-- integer :: kptrlatt(3,3) |
3998 |
-- integer :: nshiftk_ |
3999 |
-- real(dp) :: shiftk_(3, 8) |
4000 |
-- |
4001 |
-- if (AB_DBG) write(std_err,*) "AB symmetry: call get k grid." |
4002 |
-- |
4003 |
-- nshiftk_ = nshiftk |
4004 |
-- shiftk_(:,1:nshiftk_) = shiftk(:,:) |
4005 |
-- |
4006 |
-- call kpoints_binding_mp_k_1(symid, nkpt, ngkpt, kptrlatt, kptrlen, & |
4007 |
-- & nshiftk_, shiftk_, errno) |
4008 |
-- if (errno /= AB6_NO_ERROR) return |
4009 |
-- allocate(kpt(3, nkpt)) |
4010 |
-- allocate(wkpt(nkpt)) |
4011 |
-- call kpoints_binding_mp_k_2(symid, nkpt, kpt, wkpt, & |
4012 |
-- & kptrlatt, kptrlen, nshiftk_, shiftk_, errno) |
4013 |
-- end subroutine kpoints_get_mp_k_grid |
4014 |
-- |
4015 |
-- |
4016 |
-- |
4017 |
-- subroutine kpoints_binding_auto_k_1(symid, nkpt, kptrlatt, kptrlen, & |
4018 |
-- & nshiftk, shiftk, errno) |
4019 |
-- |
4020 |
-- |
4021 |
--!This section has been created automatically by the script Abilint (TD). |
4022 |
--!Do not modify the following lines by hand. |
4023 |
-- use interfaces_56_recipspace |
4024 |
--!End of the abilint section |
4025 |
-- |
4026 |
-- integer, intent(in) :: symid |
4027 |
-- integer, intent(out) :: errno |
4028 |
-- integer, intent(out) :: nkpt |
4029 |
-- real(dp), intent(inout) :: kptrlen |
4030 |
-- integer, intent(out) :: nshiftk |
4031 |
-- real(dp), intent(out) :: shiftk(3, 8) |
4032 |
-- integer, intent(out) :: kptrlatt(3,3) |
4033 |
-- |
4034 |
-- type(symmetry_type), pointer :: sym |
4035 |
-- real(dp), allocatable :: kpt(:,:), wkpt(:) |
4036 |
-- |
4037 |
-- if (AB_DBG) write(std_err,*) "AB symmetry: call get auto k grid1." |
4038 |
-- |
4039 |
-- errno = AB6_NO_ERROR |
4040 |
-- call symmetry_get_from_id(sym, symid, errno) |
4041 |
-- if (errno /= AB6_NO_ERROR) return |
4042 |
-- |
4043 |
-- ! The parameters of the k lattice are not known, compute |
4044 |
-- ! kptrlatt, nshiftk, shiftk. |
4045 |
-- call testkgrid(sym%bravais,6,kptrlatt,kptrlen,& |
4046 |
-- & AB6_MAX_SYMMETRIES,nshiftk,sym%nSym,0,sym%rprimd,& |
4047 |
-- & shiftk,sym%symAfm,sym%sym,sym%vacuum) |
4048 |
-- if (AB_DBG) write(std_err,*) "AB symmetry: testkgrid -> kptrlatt=", kptrlatt |
4049 |
-- |
4050 |
-- call getkgrid(6, 1, kpt, 1, kptrlatt, kptrlen, & |
4051 |
-- & AB6_MAX_SYMMETRIES, 0, nkpt, nshiftk, sym%nSym, & |
4052 |
-- & sym%rprimd, shiftk, sym%symAfm, sym%sym, & |
4053 |
-- & sym%vacuum, wkpt) |
4054 |
-- if (AB_DBG) write(std_err,*) "AB symmetry: getkgrid -> nkpt=", nkpt |
4055 |
-- end subroutine kpoints_binding_auto_k_1 |
4056 |
-- |
4057 |
-- |
4058 |
-- subroutine kpoints_binding_auto_k_2(symid, nkpt, kpt, wkpt, kptrlatt, kptrlen, & |
4059 |
-- & nshiftk, shiftk, errno) |
4060 |
-- |
4061 |
-- |
4062 |
--!This section has been created automatically by the script Abilint (TD). |
4063 |
--!Do not modify the following lines by hand. |
4064 |
-- use interfaces_56_recipspace |
4065 |
--!End of the abilint section |
4066 |
-- |
4067 |
-- integer, intent(in) :: symid |
4068 |
-- integer, intent(out) :: errno |
4069 |
-- integer, intent(in) :: nkpt |
4070 |
-- real(dp), intent(out) :: kpt(3,nkpt), wkpt(nkpt) |
4071 |
-- real(dp), intent(inout) :: kptrlen |
4072 |
-- integer, intent(inout) :: nshiftk |
4073 |
-- real(dp), intent(inout) :: shiftk(3, 8) |
4074 |
-- integer, intent(inout) :: kptrlatt(3,3) |
4075 |
-- |
4076 |
-- type(symmetry_type), pointer :: sym |
4077 |
-- integer :: nkpt_ |
4078 |
-- |
4079 |
-- if (AB_DBG) write(std_err,*) "AB symmetry: call get auto k grid2." |
4080 |
-- |
4081 |
-- errno = AB6_NO_ERROR |
4082 |
-- call symmetry_get_from_id(sym, symid, errno) |
4083 |
-- if (errno /= AB6_NO_ERROR) return |
4084 |
-- |
4085 |
-- ! Then, we call it again to get the actual values for the k points. |
4086 |
-- call getkgrid(6, 1, kpt, 1, kptrlatt, kptrlen, & |
4087 |
-- & AB6_MAX_SYMMETRIES, nkpt, nkpt_, nshiftk, sym%nSym, & |
4088 |
-- & sym%rprimd, shiftk, sym%symAfm, sym%sym, & |
4089 |
-- & sym%vacuum, wkpt) |
4090 |
-- end subroutine kpoints_binding_auto_k_2 |
4091 |
-- |
4092 |
-- subroutine kpoints_get_auto_k_grid(symid, nkpt, kpt, wkpt, & |
4093 |
-- & kptrlen, errno) |
4094 |
-- |
4095 |
-- integer, intent(in) :: symid |
4096 |
-- integer, intent(out) :: errno |
4097 |
-- integer, intent(out) :: nkpt |
4098 |
-- real(dp), intent(in) :: kptrlen |
4099 |
-- real(dp), pointer :: kpt(:,:), wkpt(:) |
4100 |
-- |
4101 |
-- real(dp) :: kptrlen_ |
4102 |
-- integer :: kptrlatt(3,3) |
4103 |
-- integer :: nshiftk |
4104 |
-- real(dp) :: shiftk(3, 8) |
4105 |
-- |
4106 |
-- if (AB_DBG) write(std_err,*) "AB symmetry: call get auto k grid." |
4107 |
-- |
4108 |
-- kptrlen_ = kptrlen |
4109 |
-- call kpoints_binding_auto_k_1(symid, nkpt, kptrlatt, kptrlen_, & |
4110 |
-- & nshiftk, shiftk, errno) |
4111 |
-- if (errno /= AB6_NO_ERROR) return |
4112 |
-- allocate(kpt(3, nkpt)) |
4113 |
-- allocate(wkpt(nkpt)) |
4114 |
-- call kpoints_binding_auto_k_2(symid, nkpt, kpt, wkpt, kptrlatt, kptrlen_, & |
4115 |
-- & nshiftk, shiftk, errno) |
4116 |
-- end subroutine kpoints_get_auto_k_grid |
4117 |
-- |
4118 |
--end module m_ab6_kpoints |
4119 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/56_recipspace/m_ab7_kpoints.F90 bigdft-abi-1.0.4.new/libABINIT/src/56_recipspace/m_ab7_kpoints.F90 |
4120 |
---- bigdft-abi-1.0.4.old/libABINIT/src/56_recipspace/m_ab7_kpoints.F90 1970-01-01 01:00:00.000000000 +0100 |
4121 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/56_recipspace/m_ab7_kpoints.F90 2013-06-11 16:51:00.000000000 +0200 |
4122 |
-@@ -0,0 +1,281 @@ |
4123 |
-+!* * Fortran90 source file * |
4124 |
-+!* |
4125 |
-+!* Copyright (C) 2008-2011 ABINIT Group (Damien Caliste) |
4126 |
-+!* All rights reserved. |
4127 |
-+!* |
4128 |
-+!* This file is part of the ABINIT software package. For license information, |
4129 |
-+!* please see the COPYING file in the top-level directory of the ABINIT source |
4130 |
-+!* distribution. |
4131 |
-+!* |
4132 |
-+!* |
4133 |
-+ |
4134 |
-+#if defined HAVE_CONFIG_H |
4135 |
-+#include "config.inc" |
4136 |
-+#endif |
4137 |
-+ |
4138 |
-+module m_ab7_kpoints |
4139 |
-+ |
4140 |
-+ use defs_basis |
4141 |
-+ use m_ab7_symmetry |
4142 |
-+ |
4143 |
-+ implicit none |
4144 |
-+ |
4145 |
-+ private |
4146 |
-+ |
4147 |
-+ logical, private, parameter :: AB_DBG = .false. |
4148 |
-+ |
4149 |
-+ public :: kpoints_get_irreductible_zone |
4150 |
-+ |
4151 |
-+ public :: kpoints_get_mp_k_grid |
4152 |
-+ public :: kpoints_get_auto_k_grid |
4153 |
-+ |
4154 |
-+ public :: kpoints_binding_mp_k_1 |
4155 |
-+ public :: kpoints_binding_mp_k_2 |
4156 |
-+ public :: kpoints_binding_auto_k_1 |
4157 |
-+ public :: kpoints_binding_auto_k_2 |
4158 |
-+ |
4159 |
-+contains |
4160 |
-+ |
4161 |
-+ subroutine kpoints_get_irreductible_zone(irrzon, phnons, & |
4162 |
-+ & n1, n2, n3, nsppol, nspden, symid, errno) |
4163 |
-+ |
4164 |
-+ |
4165 |
-+!This section has been created automatically by the script Abilint (TD). |
4166 |
-+!Do not modify the following lines by hand. |
4167 |
-+ use interfaces_56_recipspace |
4168 |
-+!End of the abilint section |
4169 |
-+ |
4170 |
-+ integer, intent(in) :: symid |
4171 |
-+ integer, intent(in) :: n1, n2, n3, nsppol, nspden |
4172 |
-+ integer, intent(out) :: irrzon(n1*n2*n3,2,(nspden/nsppol)-3*(nspden/4)) |
4173 |
-+ real(dp), intent(out) :: phnons(2,n1*n2*n3,(nspden/nsppol)-3*(nspden/4)) |
4174 |
-+ integer, intent(out) :: errno |
4175 |
-+ |
4176 |
-+ type(symmetry_type), pointer :: sym |
4177 |
-+ |
4178 |
-+ if (AB_DBG) write(std_err,*) "AB kpoints: call get irreductible zone." |
4179 |
-+ |
4180 |
-+ errno = AB7_NO_ERROR |
4181 |
-+ call symmetry_get_from_id(sym, symid, errno) |
4182 |
-+ if (errno /= AB7_NO_ERROR) return |
4183 |
-+ |
4184 |
-+ if (sym%withSpin /= nspden) then |
4185 |
-+ errno = AB7_ERROR_ARG |
4186 |
-+ return |
4187 |
-+ end if |
4188 |
-+ |
4189 |
-+ call irrzg(irrzon, nspden, nsppol, sym%nSym, n1, n2, n3, phnons, & |
4190 |
-+ & sym%symAfm, sym%sym, sym%transNon) |
4191 |
-+ end subroutine kpoints_get_irreductible_zone |
4192 |
-+ |
4193 |
-+ |
4194 |
-+ |
4195 |
-+ subroutine kpoints_binding_mp_k_1(symid, nkpt, ngkpt, & |
4196 |
-+ & kptrlatt, kptrlen, nshiftk, shiftk, errno) |
4197 |
-+ |
4198 |
-+ |
4199 |
-+!This section has been created automatically by the script Abilint (TD). |
4200 |
-+!Do not modify the following lines by hand. |
4201 |
-+ use interfaces_56_recipspace |
4202 |
-+!End of the abilint section |
4203 |
-+ |
4204 |
-+ integer, intent(in) :: symid |
4205 |
-+ integer, intent(out) :: errno |
4206 |
-+ integer, intent(in) :: ngkpt(3) |
4207 |
-+ integer, intent(inout) :: nshiftk |
4208 |
-+ real(dp), intent(inout) :: shiftk(3, 8) |
4209 |
-+ real(dp), intent(out) :: kptrlen |
4210 |
-+ integer, intent(out) :: kptrlatt(3,3) |
4211 |
-+ integer, intent(out) :: nkpt |
4212 |
-+ |
4213 |
-+ type(symmetry_type), pointer :: sym |
4214 |
-+ real(dp) :: kpt(3,1), wkpt(1) |
4215 |
-+ |
4216 |
-+ if (AB_DBG) write(std_err,*) "AB symmetry: call get k grid1." |
4217 |
-+ |
4218 |
-+ errno = AB7_NO_ERROR |
4219 |
-+ call symmetry_get_from_id(sym, symid, errno) |
4220 |
-+ if (errno /= AB7_NO_ERROR) return |
4221 |
-+ |
4222 |
-+ ! First, compute the number of kpoints |
4223 |
-+ kptrlatt(:,:) = 0 |
4224 |
-+ kptrlatt(1,1) = ngkpt(1) |
4225 |
-+ kptrlatt(2,2) = ngkpt(2) |
4226 |
-+ kptrlatt(3,3) = ngkpt(3) |
4227 |
-+ kptrlen = 20. |
4228 |
-+ |
4229 |
-+ call getkgrid(6, 1, kpt, 1, kptrlatt, kptrlen, & |
4230 |
-+ & AB7_MAX_SYMMETRIES, 0, nkpt, nshiftk, sym%nSym, & |
4231 |
-+ & sym%rprimd, shiftk, sym%symAfm, sym%sym, & |
4232 |
-+ & sym%vacuum, wkpt) |
4233 |
-+ end subroutine kpoints_binding_mp_k_1 |
4234 |
-+ |
4235 |
-+ subroutine kpoints_binding_mp_k_2(symid, nkpt, kpt, wkpt, & |
4236 |
-+ & kptrlatt, kptrlen, nshiftk, shiftk, errno) |
4237 |
-+ |
4238 |
-+ |
4239 |
-+!This section has been created automatically by the script Abilint (TD). |
4240 |
-+!Do not modify the following lines by hand. |
4241 |
-+ use interfaces_56_recipspace |
4242 |
-+!End of the abilint section |
4243 |
-+ |
4244 |
-+ integer, intent(in) :: symid |
4245 |
-+ integer, intent(out) :: errno |
4246 |
-+ integer, intent(inout) :: nshiftk |
4247 |
-+ real(dp), intent(inout) :: shiftk(3, 8) |
4248 |
-+ integer, intent(in) :: nkpt |
4249 |
-+ real(dp), intent(out) :: kpt(3,nkpt), wkpt(nkpt) |
4250 |
-+ real(dp), intent(inout) :: kptrlen |
4251 |
-+ integer, intent(inout) :: kptrlatt(3,3) |
4252 |
-+ |
4253 |
-+ type(symmetry_type), pointer :: sym |
4254 |
-+ integer :: nkpt_ |
4255 |
-+ |
4256 |
-+ if (AB_DBG) write(std_err,*) "AB symmetry: call get k grid2." |
4257 |
-+ |
4258 |
-+ errno = AB7_NO_ERROR |
4259 |
-+ call symmetry_get_from_id(sym, symid, errno) |
4260 |
-+ if (errno /= AB7_NO_ERROR) return |
4261 |
-+ |
4262 |
-+ ! Then, we call it again to get the actual values for the k points. |
4263 |
-+ call getkgrid(6, 1, kpt, 1, kptrlatt, kptrlen, & |
4264 |
-+ & AB7_MAX_SYMMETRIES, nkpt, nkpt_, nshiftk, sym%nSym, & |
4265 |
-+ & sym%rprimd, shiftk, sym%symAfm, sym%sym, & |
4266 |
-+ & sym%vacuum, wkpt) |
4267 |
-+ end subroutine kpoints_binding_mp_k_2 |
4268 |
-+ |
4269 |
-+ |
4270 |
-+ subroutine kpoints_get_mp_k_grid(symid, nkpt, kpt, wkpt, & |
4271 |
-+ & ngkpt, nshiftk, shiftk, errno) |
4272 |
-+ |
4273 |
-+ integer, intent(in) :: symid |
4274 |
-+ integer, intent(out) :: errno |
4275 |
-+ integer, intent(in) :: ngkpt(3) |
4276 |
-+ integer, intent(in) :: nshiftk |
4277 |
-+ real(dp), intent(in) :: shiftk(3, nshiftk) |
4278 |
-+ integer, intent(out) :: nkpt |
4279 |
-+ real(dp), pointer :: kpt(:,:), wkpt(:) |
4280 |
-+ |
4281 |
-+ real(dp) :: kptrlen |
4282 |
-+ integer :: kptrlatt(3,3) |
4283 |
-+ integer :: nshiftk_ |
4284 |
-+ real(dp) :: shiftk_(3, 8) |
4285 |
-+ |
4286 |
-+ if (AB_DBG) write(std_err,*) "AB symmetry: call get k grid." |
4287 |
-+ |
4288 |
-+ nshiftk_ = nshiftk |
4289 |
-+ shiftk_(:,1:nshiftk_) = shiftk(:,:) |
4290 |
-+ |
4291 |
-+ call kpoints_binding_mp_k_1(symid, nkpt, ngkpt, kptrlatt, kptrlen, & |
4292 |
-+ & nshiftk_, shiftk_, errno) |
4293 |
-+ if (errno /= AB7_NO_ERROR) return |
4294 |
-+ allocate(kpt(3, nkpt)) |
4295 |
-+ allocate(wkpt(nkpt)) |
4296 |
-+ call kpoints_binding_mp_k_2(symid, nkpt, kpt, wkpt, & |
4297 |
-+ & kptrlatt, kptrlen, nshiftk_, shiftk_, errno) |
4298 |
-+ end subroutine kpoints_get_mp_k_grid |
4299 |
-+ |
4300 |
-+ |
4301 |
-+ |
4302 |
-+ subroutine kpoints_binding_auto_k_1(symid, nkpt, kptrlatt, kptrlen, & |
4303 |
-+ & nshiftk, shiftk, errno) |
4304 |
-+ |
4305 |
-+ |
4306 |
-+!This section has been created automatically by the script Abilint (TD). |
4307 |
-+!Do not modify the following lines by hand. |
4308 |
-+ use interfaces_56_recipspace |
4309 |
-+!End of the abilint section |
4310 |
-+ |
4311 |
-+ integer, intent(in) :: symid |
4312 |
-+ integer, intent(out) :: errno |
4313 |
-+ integer, intent(out) :: nkpt |
4314 |
-+ real(dp), intent(inout) :: kptrlen |
4315 |
-+ integer, intent(out) :: nshiftk |
4316 |
-+ real(dp), intent(out) :: shiftk(3, 8) |
4317 |
-+ integer, intent(out) :: kptrlatt(3,3) |
4318 |
-+ |
4319 |
-+ type(symmetry_type), pointer :: sym |
4320 |
-+ real(dp), allocatable :: kpt(:,:), wkpt(:) |
4321 |
-+ |
4322 |
-+ if (AB_DBG) write(std_err,*) "AB symmetry: call get auto k grid1." |
4323 |
-+ |
4324 |
-+ errno = AB7_NO_ERROR |
4325 |
-+ call symmetry_get_from_id(sym, symid, errno) |
4326 |
-+ if (errno /= AB7_NO_ERROR) return |
4327 |
-+ |
4328 |
-+ ! The parameters of the k lattice are not known, compute |
4329 |
-+ ! kptrlatt, nshiftk, shiftk. |
4330 |
-+ call testkgrid(sym%bravais,6,kptrlatt,kptrlen,& |
4331 |
-+ & AB7_MAX_SYMMETRIES,nshiftk,sym%nSym,0,sym%rprimd,& |
4332 |
-+ & shiftk,sym%symAfm,sym%sym,sym%vacuum) |
4333 |
-+ if (AB_DBG) write(std_err,*) "AB symmetry: testkgrid -> kptrlatt=", kptrlatt |
4334 |
-+ |
4335 |
-+ call getkgrid(6, 1, kpt, 1, kptrlatt, kptrlen, & |
4336 |
-+ & AB7_MAX_SYMMETRIES, 0, nkpt, nshiftk, sym%nSym, & |
4337 |
-+ & sym%rprimd, shiftk, sym%symAfm, sym%sym, & |
4338 |
-+ & sym%vacuum, wkpt) |
4339 |
-+ if (AB_DBG) write(std_err,*) "AB symmetry: getkgrid -> nkpt=", nkpt |
4340 |
-+ end subroutine kpoints_binding_auto_k_1 |
4341 |
-+ |
4342 |
-+ |
4343 |
-+ subroutine kpoints_binding_auto_k_2(symid, nkpt, kpt, wkpt, kptrlatt, kptrlen, & |
4344 |
-+ & nshiftk, shiftk, errno) |
4345 |
-+ |
4346 |
-+ |
4347 |
-+!This section has been created automatically by the script Abilint (TD). |
4348 |
-+!Do not modify the following lines by hand. |
4349 |
-+ use interfaces_56_recipspace |
4350 |
-+!End of the abilint section |
4351 |
-+ |
4352 |
-+ integer, intent(in) :: symid |
4353 |
-+ integer, intent(out) :: errno |
4354 |
-+ integer, intent(in) :: nkpt |
4355 |
-+ real(dp), intent(out) :: kpt(3,nkpt), wkpt(nkpt) |
4356 |
-+ real(dp), intent(inout) :: kptrlen |
4357 |
-+ integer, intent(inout) :: nshiftk |
4358 |
-+ real(dp), intent(inout) :: shiftk(3, 8) |
4359 |
-+ integer, intent(inout) :: kptrlatt(3,3) |
4360 |
-+ |
4361 |
-+ type(symmetry_type), pointer :: sym |
4362 |
-+ integer :: nkpt_ |
4363 |
-+ |
4364 |
-+ if (AB_DBG) write(std_err,*) "AB symmetry: call get auto k grid2." |
4365 |
-+ |
4366 |
-+ errno = AB7_NO_ERROR |
4367 |
-+ call symmetry_get_from_id(sym, symid, errno) |
4368 |
-+ if (errno /= AB7_NO_ERROR) return |
4369 |
-+ |
4370 |
-+ ! Then, we call it again to get the actual values for the k points. |
4371 |
-+ call getkgrid(6, 1, kpt, 1, kptrlatt, kptrlen, & |
4372 |
-+ & AB7_MAX_SYMMETRIES, nkpt, nkpt_, nshiftk, sym%nSym, & |
4373 |
-+ & sym%rprimd, shiftk, sym%symAfm, sym%sym, & |
4374 |
-+ & sym%vacuum, wkpt) |
4375 |
-+ end subroutine kpoints_binding_auto_k_2 |
4376 |
-+ |
4377 |
-+ subroutine kpoints_get_auto_k_grid(symid, nkpt, kpt, wkpt, & |
4378 |
-+ & kptrlen, errno) |
4379 |
-+ |
4380 |
-+ integer, intent(in) :: symid |
4381 |
-+ integer, intent(out) :: errno |
4382 |
-+ integer, intent(out) :: nkpt |
4383 |
-+ real(dp), intent(in) :: kptrlen |
4384 |
-+ real(dp), pointer :: kpt(:,:), wkpt(:) |
4385 |
-+ |
4386 |
-+ real(dp) :: kptrlen_ |
4387 |
-+ integer :: kptrlatt(3,3) |
4388 |
-+ integer :: nshiftk |
4389 |
-+ real(dp) :: shiftk(3, 8) |
4390 |
-+ |
4391 |
-+ if (AB_DBG) write(std_err,*) "AB symmetry: call get auto k grid." |
4392 |
-+ |
4393 |
-+ kptrlen_ = kptrlen |
4394 |
-+ call kpoints_binding_auto_k_1(symid, nkpt, kptrlatt, kptrlen_, & |
4395 |
-+ & nshiftk, shiftk, errno) |
4396 |
-+ if (errno /= AB7_NO_ERROR) return |
4397 |
-+ allocate(kpt(3, nkpt)) |
4398 |
-+ allocate(wkpt(nkpt)) |
4399 |
-+ call kpoints_binding_auto_k_2(symid, nkpt, kpt, wkpt, kptrlatt, kptrlen_, & |
4400 |
-+ & nshiftk, shiftk, errno) |
4401 |
-+ end subroutine kpoints_get_auto_k_grid |
4402 |
-+ |
4403 |
-+end module m_ab7_kpoints |
4404 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/72_geomoptim/ab6_moldyn.F90 bigdft-abi-1.0.4.new/libABINIT/src/72_geomoptim/ab6_moldyn.F90 |
4405 |
---- bigdft-abi-1.0.4.old/libABINIT/src/72_geomoptim/ab6_moldyn.F90 2012-07-09 16:43:33.000000000 +0200 |
4406 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/72_geomoptim/ab6_moldyn.F90 1970-01-01 01:00:00.000000000 +0100 |
4407 |
-@@ -1,42 +0,0 @@ |
4408 |
--module ab6_moldyn |
4409 |
-- |
4410 |
-- use defs_basis |
4411 |
-- |
4412 |
-- implicit none |
4413 |
-- |
4414 |
-- interface |
4415 |
-- subroutine scfloop_main(acell, epot, fcart, grad, itime, me, natom, rprimd, xred) |
4416 |
-- use defs_basis |
4417 |
-- |
4418 |
-- integer, intent(in) :: natom, itime, me |
4419 |
-- real(dp), intent(out) :: epot |
4420 |
-- real(dp), intent(in) :: acell(3) |
4421 |
-- real(dp), intent(in) :: rprimd(3,3), xred(3,natom) |
4422 |
-- real(dp), intent(out) :: fcart(3, natom), grad(3, natom) |
4423 |
-- end subroutine scfloop_main |
4424 |
-- end interface |
4425 |
-- |
4426 |
-- interface |
4427 |
-- subroutine scfloop_output(acell, epot, ekin, fred, itime, me, natom, rprimd, vel, xred) |
4428 |
-- use defs_basis |
4429 |
-- |
4430 |
-- integer, intent(in) :: natom, itime, me |
4431 |
-- real(dp), intent(in) :: epot, ekin |
4432 |
-- real(dp), intent(in) :: acell(3) |
4433 |
-- real(dp), intent(in) :: rprimd(3,3), xred(3,natom) |
4434 |
-- real(dp), intent(in) :: fred(3, natom), vel(3, natom) |
4435 |
-- end subroutine scfloop_output |
4436 |
-- end interface |
4437 |
-- |
4438 |
--contains |
4439 |
-- |
4440 |
-- include "velocity_verlet.F90" |
4441 |
-- include "quenched.F90" |
4442 |
-- include "langevin.F90" |
4443 |
-- include "nose.F90" |
4444 |
-- include "isokinetic.F90" |
4445 |
-- include "isotemp.F90" |
4446 |
-- include "isothermal.F90" |
4447 |
-- include "moldyn.F90" |
4448 |
-- |
4449 |
--end module ab6_moldyn |
4450 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/72_geomoptim/ab7_moldyn.F90 bigdft-abi-1.0.4.new/libABINIT/src/72_geomoptim/ab7_moldyn.F90 |
4451 |
---- bigdft-abi-1.0.4.old/libABINIT/src/72_geomoptim/ab7_moldyn.F90 1970-01-01 01:00:00.000000000 +0100 |
4452 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/72_geomoptim/ab7_moldyn.F90 2013-06-11 16:51:00.000000000 +0200 |
4453 |
-@@ -0,0 +1,42 @@ |
4454 |
-+module ab7_moldyn |
4455 |
-+ |
4456 |
-+ use defs_basis |
4457 |
-+ |
4458 |
-+ implicit none |
4459 |
-+ |
4460 |
-+ interface |
4461 |
-+ subroutine scfloop_main(acell, epot, fcart, grad, itime, me, natom, rprimd, xred) |
4462 |
-+ use defs_basis |
4463 |
-+ |
4464 |
-+ integer, intent(in) :: natom, itime, me |
4465 |
-+ real(dp), intent(out) :: epot |
4466 |
-+ real(dp), intent(in) :: acell(3) |
4467 |
-+ real(dp), intent(in) :: rprimd(3,3), xred(3,natom) |
4468 |
-+ real(dp), intent(out) :: fcart(3, natom), grad(3, natom) |
4469 |
-+ end subroutine scfloop_main |
4470 |
-+ end interface |
4471 |
-+ |
4472 |
-+ interface |
4473 |
-+ subroutine scfloop_output(acell, epot, ekin, fred, itime, me, natom, rprimd, vel, xred) |
4474 |
-+ use defs_basis |
4475 |
-+ |
4476 |
-+ integer, intent(in) :: natom, itime, me |
4477 |
-+ real(dp), intent(in) :: epot, ekin |
4478 |
-+ real(dp), intent(in) :: acell(3) |
4479 |
-+ real(dp), intent(in) :: rprimd(3,3), xred(3,natom) |
4480 |
-+ real(dp), intent(in) :: fred(3, natom), vel(3, natom) |
4481 |
-+ end subroutine scfloop_output |
4482 |
-+ end interface |
4483 |
-+ |
4484 |
-+contains |
4485 |
-+ |
4486 |
-+ include "velocity_verlet.F90" |
4487 |
-+ include "quenched.F90" |
4488 |
-+ include "langevin.F90" |
4489 |
-+ include "nose.F90" |
4490 |
-+ include "isokinetic.F90" |
4491 |
-+ include "isotemp.F90" |
4492 |
-+ include "isothermal.F90" |
4493 |
-+ include "moldyn.F90" |
4494 |
-+ |
4495 |
-+end module ab7_moldyn |
4496 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/Makefile.am bigdft-abi-1.0.4.new/libABINIT/src/Makefile.am |
4497 |
---- bigdft-abi-1.0.4.old/libABINIT/src/Makefile.am 2012-11-08 11:12:57.000000000 +0100 |
4498 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/Makefile.am 2013-06-11 16:51:00.000000000 +0200 |
4499 |
-@@ -85,7 +85,7 @@ |
4500 |
- 42_geometry/getspinrot.F90 \ |
4501 |
- 42_geometry/gridgcart.F90 \ |
4502 |
- 42_geometry/holocell.F90 \ |
4503 |
-- 42_geometry/m_ab6_symmetry.F90 \ |
4504 |
-+ 42_geometry/m_ab7_symmetry.F90 \ |
4505 |
- 42_geometry/metric.F90 \ |
4506 |
- 42_geometry/mkrdim.F90 \ |
4507 |
- 42_geometry/operat.F90 \ |
4508 |
-@@ -128,14 +128,14 @@ |
4509 |
- 56_mixing/dotprodm_vn.F90 \ |
4510 |
- 56_mixing/findminscf.F90 \ |
4511 |
- 56_mixing/interfaces_56_mixing.F90 \ |
4512 |
-- 56_mixing/m_ab6_mixing.F90 \ |
4513 |
-+ 56_mixing/m_ab7_mixing.F90 \ |
4514 |
- 56_mixing/scfcge.F90 \ |
4515 |
- 56_mixing/scfeig.F90 \ |
4516 |
- 56_mixing/scfopt.F90 \ |
4517 |
- 56_mixing/sqnormm_v.F90 \ |
4518 |
- 56_recipspace/interfaces_56_recipspace.F90 \ |
4519 |
- 56_recipspace/irrzg.F90 \ |
4520 |
-- 56_recipspace/m_ab6_kpoints.F90 \ |
4521 |
-+ 56_recipspace/m_ab7_kpoints.F90 \ |
4522 |
- 56_recipspace/getkgrid.F90 \ |
4523 |
- 56_recipspace/smpbz.F90 \ |
4524 |
- 56_recipspace/symkpt.F90 \ |
4525 |
-@@ -159,7 +159,7 @@ |
4526 |
- 67_common/ewald2.F90 \ |
4527 |
- 67_common/fconv.F90 \ |
4528 |
- 67_common/prtxvf.F90 \ |
4529 |
-- 72_geomoptim/ab6_moldyn.F90 \ |
4530 |
-+ 72_geomoptim/ab7_moldyn.F90 \ |
4531 |
- 72_geomoptim/xfpack.F90 |
4532 |
- |
4533 |
- CLEANFILES = mpif.h *.@MODULE_EXT@ |
4534 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/Makefile.in bigdft-abi-1.0.4.new/libABINIT/src/Makefile.in |
4535 |
---- bigdft-abi-1.0.4.old/libABINIT/src/Makefile.in 2013-01-28 14:39:34.000000000 +0100 |
4536 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/Makefile.in 2013-06-11 16:51:00.000000000 +0200 |
4537 |
-@@ -91,7 +91,7 @@ |
4538 |
- gensymshub4.$(OBJEXT) gensymshub.$(OBJEXT) \ |
4539 |
- gensymspgr.$(OBJEXT) getptgroupma.$(OBJEXT) \ |
4540 |
- getspinrot.$(OBJEXT) gridgcart.$(OBJEXT) holocell.$(OBJEXT) \ |
4541 |
-- m_ab6_symmetry.$(OBJEXT) metric.$(OBJEXT) mkrdim.$(OBJEXT) \ |
4542 |
-+ m_ab7_symmetry.$(OBJEXT) metric.$(OBJEXT) mkrdim.$(OBJEXT) \ |
4543 |
- operat.$(OBJEXT) prtspgroup.$(OBJEXT) ptgmadata.$(OBJEXT) \ |
4544 |
- smallprim.$(OBJEXT) spgdata.$(OBJEXT) strainsym.$(OBJEXT) \ |
4545 |
- strconv.$(OBJEXT) stresssym.$(OBJEXT) sym2cart.$(OBJEXT) \ |
4546 |
-@@ -106,10 +106,10 @@ |
4547 |
- symzat.$(OBJEXT) xredxcart.$(OBJEXT) defs_abitypes.$(OBJEXT) \ |
4548 |
- aprxdr.$(OBJEXT) dotprodm_v.$(OBJEXT) dotprodm_vn.$(OBJEXT) \ |
4549 |
- findminscf.$(OBJEXT) interfaces_56_mixing.$(OBJEXT) \ |
4550 |
-- m_ab6_mixing.$(OBJEXT) scfcge.$(OBJEXT) scfeig.$(OBJEXT) \ |
4551 |
-+ m_ab7_mixing.$(OBJEXT) scfcge.$(OBJEXT) scfeig.$(OBJEXT) \ |
4552 |
- scfopt.$(OBJEXT) sqnormm_v.$(OBJEXT) \ |
4553 |
- interfaces_56_recipspace.$(OBJEXT) irrzg.$(OBJEXT) \ |
4554 |
-- m_ab6_kpoints.$(OBJEXT) getkgrid.$(OBJEXT) smpbz.$(OBJEXT) \ |
4555 |
-+ m_ab7_kpoints.$(OBJEXT) getkgrid.$(OBJEXT) smpbz.$(OBJEXT) \ |
4556 |
- symkpt.$(OBJEXT) testkgrid.$(OBJEXT) \ |
4557 |
- interfaces_56_xc.$(OBJEXT) drivexc.$(OBJEXT) invcb.$(OBJEXT) \ |
4558 |
- mkdenpos.$(OBJEXT) m_libxc_functionals.$(OBJEXT) \ |
4559 |
-@@ -117,7 +117,7 @@ |
4560 |
- xclb.$(OBJEXT) xcpbe.$(OBJEXT) xcpzca.$(OBJEXT) \ |
4561 |
- xcspol.$(OBJEXT) xctetr.$(OBJEXT) xcwign.$(OBJEXT) \ |
4562 |
- xcxalp.$(OBJEXT) ewald.$(OBJEXT) ewald2.$(OBJEXT) \ |
4563 |
-- fconv.$(OBJEXT) prtxvf.$(OBJEXT) ab6_moldyn.$(OBJEXT) \ |
4564 |
-+ fconv.$(OBJEXT) prtxvf.$(OBJEXT) ab7_moldyn.$(OBJEXT) \ |
4565 |
- xfpack.$(OBJEXT) |
4566 |
- libabinit_a_OBJECTS = $(am_libabinit_a_OBJECTS) |
4567 |
- DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) |
4568 |
-@@ -352,7 +352,7 @@ |
4569 |
- 42_geometry/getspinrot.F90 \ |
4570 |
- 42_geometry/gridgcart.F90 \ |
4571 |
- 42_geometry/holocell.F90 \ |
4572 |
-- 42_geometry/m_ab6_symmetry.F90 \ |
4573 |
-+ 42_geometry/m_ab7_symmetry.F90 \ |
4574 |
- 42_geometry/metric.F90 \ |
4575 |
- 42_geometry/mkrdim.F90 \ |
4576 |
- 42_geometry/operat.F90 \ |
4577 |
-@@ -395,14 +395,14 @@ |
4578 |
- 56_mixing/dotprodm_vn.F90 \ |
4579 |
- 56_mixing/findminscf.F90 \ |
4580 |
- 56_mixing/interfaces_56_mixing.F90 \ |
4581 |
-- 56_mixing/m_ab6_mixing.F90 \ |
4582 |
-+ 56_mixing/m_ab7_mixing.F90 \ |
4583 |
- 56_mixing/scfcge.F90 \ |
4584 |
- 56_mixing/scfeig.F90 \ |
4585 |
- 56_mixing/scfopt.F90 \ |
4586 |
- 56_mixing/sqnormm_v.F90 \ |
4587 |
- 56_recipspace/interfaces_56_recipspace.F90 \ |
4588 |
- 56_recipspace/irrzg.F90 \ |
4589 |
-- 56_recipspace/m_ab6_kpoints.F90 \ |
4590 |
-+ 56_recipspace/m_ab7_kpoints.F90 \ |
4591 |
- 56_recipspace/getkgrid.F90 \ |
4592 |
- 56_recipspace/smpbz.F90 \ |
4593 |
- 56_recipspace/symkpt.F90 \ |
4594 |
-@@ -426,7 +426,7 @@ |
4595 |
- 67_common/ewald2.F90 \ |
4596 |
- 67_common/fconv.F90 \ |
4597 |
- 67_common/prtxvf.F90 \ |
4598 |
-- 72_geomoptim/ab6_moldyn.F90 \ |
4599 |
-+ 72_geomoptim/ab7_moldyn.F90 \ |
4600 |
- 72_geomoptim/xfpack.F90 |
4601 |
- |
4602 |
- CLEANFILES = mpif.h *.@MODULE_EXT@ |
4603 |
-@@ -633,8 +633,8 @@ |
4604 |
- holocell.obj: 42_geometry/holocell.F90 |
4605 |
- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o holocell.obj `if test -f '42_geometry/holocell.F90'; then $(CYGPATH_W) '42_geometry/holocell.F90'; else $(CYGPATH_W) '$(srcdir)/42_geometry/holocell.F90'; fi` |
4606 |
- |
4607 |
--m_ab6_symmetry.obj: 42_geometry/m_ab6_symmetry.F90 |
4608 |
-- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o m_ab6_symmetry.obj `if test -f '42_geometry/m_ab6_symmetry.F90'; then $(CYGPATH_W) '42_geometry/m_ab6_symmetry.F90'; else $(CYGPATH_W) '$(srcdir)/42_geometry/m_ab6_symmetry.F90'; fi` |
4609 |
-+m_ab7_symmetry.obj: 42_geometry/m_ab7_symmetry.F90 |
4610 |
-+ $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o m_ab7_symmetry.obj `if test -f '42_geometry/m_ab7_symmetry.F90'; then $(CYGPATH_W) '42_geometry/m_ab7_symmetry.F90'; else $(CYGPATH_W) '$(srcdir)/42_geometry/m_ab7_symmetry.F90'; fi` |
4611 |
- |
4612 |
- metric.obj: 42_geometry/metric.F90 |
4613 |
- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o metric.obj `if test -f '42_geometry/metric.F90'; then $(CYGPATH_W) '42_geometry/metric.F90'; else $(CYGPATH_W) '$(srcdir)/42_geometry/metric.F90'; fi` |
4614 |
-@@ -762,8 +762,8 @@ |
4615 |
- interfaces_56_mixing.obj: 56_mixing/interfaces_56_mixing.F90 |
4616 |
- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o interfaces_56_mixing.obj `if test -f '56_mixing/interfaces_56_mixing.F90'; then $(CYGPATH_W) '56_mixing/interfaces_56_mixing.F90'; else $(CYGPATH_W) '$(srcdir)/56_mixing/interfaces_56_mixing.F90'; fi` |
4617 |
- |
4618 |
--m_ab6_mixing.obj: 56_mixing/m_ab6_mixing.F90 |
4619 |
-- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o m_ab6_mixing.obj `if test -f '56_mixing/m_ab6_mixing.F90'; then $(CYGPATH_W) '56_mixing/m_ab6_mixing.F90'; else $(CYGPATH_W) '$(srcdir)/56_mixing/m_ab6_mixing.F90'; fi` |
4620 |
-+m_ab7_mixing.obj: 56_mixing/m_ab7_mixing.F90 |
4621 |
-+ $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o m_ab7_mixing.obj `if test -f '56_mixing/m_ab7_mixing.F90'; then $(CYGPATH_W) '56_mixing/m_ab7_mixing.F90'; else $(CYGPATH_W) '$(srcdir)/56_mixing/m_ab7_mixing.F90'; fi` |
4622 |
- |
4623 |
- scfcge.obj: 56_mixing/scfcge.F90 |
4624 |
- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o scfcge.obj `if test -f '56_mixing/scfcge.F90'; then $(CYGPATH_W) '56_mixing/scfcge.F90'; else $(CYGPATH_W) '$(srcdir)/56_mixing/scfcge.F90'; fi` |
4625 |
-@@ -783,8 +783,8 @@ |
4626 |
- irrzg.obj: 56_recipspace/irrzg.F90 |
4627 |
- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o irrzg.obj `if test -f '56_recipspace/irrzg.F90'; then $(CYGPATH_W) '56_recipspace/irrzg.F90'; else $(CYGPATH_W) '$(srcdir)/56_recipspace/irrzg.F90'; fi` |
4628 |
- |
4629 |
--m_ab6_kpoints.obj: 56_recipspace/m_ab6_kpoints.F90 |
4630 |
-- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o m_ab6_kpoints.obj `if test -f '56_recipspace/m_ab6_kpoints.F90'; then $(CYGPATH_W) '56_recipspace/m_ab6_kpoints.F90'; else $(CYGPATH_W) '$(srcdir)/56_recipspace/m_ab6_kpoints.F90'; fi` |
4631 |
-+m_ab7_kpoints.obj: 56_recipspace/m_ab7_kpoints.F90 |
4632 |
-+ $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o m_ab7_kpoints.obj `if test -f '56_recipspace/m_ab7_kpoints.F90'; then $(CYGPATH_W) '56_recipspace/m_ab7_kpoints.F90'; else $(CYGPATH_W) '$(srcdir)/56_recipspace/m_ab7_kpoints.F90'; fi` |
4633 |
- |
4634 |
- getkgrid.obj: 56_recipspace/getkgrid.F90 |
4635 |
- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o getkgrid.obj `if test -f '56_recipspace/getkgrid.F90'; then $(CYGPATH_W) '56_recipspace/getkgrid.F90'; else $(CYGPATH_W) '$(srcdir)/56_recipspace/getkgrid.F90'; fi` |
4636 |
-@@ -855,8 +855,8 @@ |
4637 |
- prtxvf.obj: 67_common/prtxvf.F90 |
4638 |
- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o prtxvf.obj `if test -f '67_common/prtxvf.F90'; then $(CYGPATH_W) '67_common/prtxvf.F90'; else $(CYGPATH_W) '$(srcdir)/67_common/prtxvf.F90'; fi` |
4639 |
- |
4640 |
--ab6_moldyn.obj: 72_geomoptim/ab6_moldyn.F90 |
4641 |
-- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o ab6_moldyn.obj `if test -f '72_geomoptim/ab6_moldyn.F90'; then $(CYGPATH_W) '72_geomoptim/ab6_moldyn.F90'; else $(CYGPATH_W) '$(srcdir)/72_geomoptim/ab6_moldyn.F90'; fi` |
4642 |
-+ab7_moldyn.obj: 72_geomoptim/ab7_moldyn.F90 |
4643 |
-+ $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o ab7_moldyn.obj `if test -f '72_geomoptim/ab7_moldyn.F90'; then $(CYGPATH_W) '72_geomoptim/ab7_moldyn.F90'; else $(CYGPATH_W) '$(srcdir)/72_geomoptim/ab7_moldyn.F90'; fi` |
4644 |
- |
4645 |
- xfpack.obj: 72_geomoptim/xfpack.F90 |
4646 |
- $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o xfpack.obj `if test -f '72_geomoptim/xfpack.F90'; then $(CYGPATH_W) '72_geomoptim/xfpack.F90'; else $(CYGPATH_W) '$(srcdir)/72_geomoptim/xfpack.F90'; fi` |
4647 |
-@@ -1268,11 +1268,11 @@ |
4648 |
- interfaces_42_geometry.o |
4649 |
- $(PPFCCOMPILE) -c -o symptgroup.o `test -f '42_geometry/symptgroup.F90' || echo '$(srcdir)/'`42_geometry/symptgroup.F90 |
4650 |
- |
4651 |
--m_ab6_symmetry.o: 42_geometry/m_ab6_symmetry.F90 \ |
4652 |
-+m_ab7_symmetry.o: 42_geometry/m_ab7_symmetry.F90 \ |
4653 |
- defs_basis.o \ |
4654 |
- interfaces_32_util.o \ |
4655 |
- interfaces_42_geometry.o |
4656 |
-- $(PPFCCOMPILE) -c -o m_ab6_symmetry.o `test -f '42_geometry/m_ab6_symmetry.F90' || echo '$(srcdir)/'`42_geometry/m_ab6_symmetry.F90 |
4657 |
-+ $(PPFCCOMPILE) -c -o m_ab7_symmetry.o `test -f '42_geometry/m_ab7_symmetry.F90' || echo '$(srcdir)/'`42_geometry/m_ab7_symmetry.F90 |
4658 |
- |
4659 |
- symchk.o: 42_geometry/symchk.F90 \ |
4660 |
- defs_basis.o |
4661 |
-@@ -1498,11 +1498,11 @@ |
4662 |
- interfaces_56_recipspace.o |
4663 |
- $(PPFCCOMPILE) -c -o getkgrid.o `test -f '56_recipspace/getkgrid.F90' || echo '$(srcdir)/'`56_recipspace/getkgrid.F90 |
4664 |
- |
4665 |
--m_ab6_kpoints.o: 56_recipspace/m_ab6_kpoints.F90 \ |
4666 |
-+m_ab7_kpoints.o: 56_recipspace/m_ab7_kpoints.F90 \ |
4667 |
- defs_basis.o \ |
4668 |
- interfaces_56_recipspace.o \ |
4669 |
-- m_ab6_symmetry.o |
4670 |
-- $(PPFCCOMPILE) -c -o m_ab6_kpoints.o `test -f '56_recipspace/m_ab6_kpoints.F90' || echo '$(srcdir)/'`56_recipspace/m_ab6_kpoints.F90 |
4671 |
-+ m_ab7_symmetry.o |
4672 |
-+ $(PPFCCOMPILE) -c -o m_ab7_kpoints.o `test -f '56_recipspace/m_ab7_kpoints.F90' || echo '$(srcdir)/'`56_recipspace/m_ab7_kpoints.F90 |
4673 |
- |
4674 |
- interfaces_56_recipspace.o: 56_recipspace/interfaces_56_recipspace.F90 \ |
4675 |
- defs_abitypes.o \ |
4676 |
-@@ -1647,7 +1647,7 @@ |
4677 |
- defs_datatypes.o |
4678 |
- $(PPFCCOMPILE) -c -o moldyn.o `test -f '72_geomoptim/moldyn.F90' || echo '$(srcdir)/'`72_geomoptim/moldyn.F90 |
4679 |
- |
4680 |
--ab6_moldyn.o: 72_geomoptim/ab6_moldyn.F90 \ |
4681 |
-+ab7_moldyn.o: 72_geomoptim/ab7_moldyn.F90 \ |
4682 |
- defs_basis.o \ |
4683 |
- defs_basis.o \ |
4684 |
- 72_geomoptim/isokinetic.F90 \ |
4685 |
-@@ -1669,7 +1669,7 @@ |
4686 |
- 72_geomoptim/quenched.F90 \ |
4687 |
- defs_basis.o \ |
4688 |
- 72_geomoptim/velocity_verlet.F90 |
4689 |
-- $(PPFCCOMPILE) -c -o ab6_moldyn.o `test -f '72_geomoptim/ab6_moldyn.F90' || echo '$(srcdir)/'`72_geomoptim/ab6_moldyn.F90 |
4690 |
-+ $(PPFCCOMPILE) -c -o ab7_moldyn.o `test -f '72_geomoptim/ab7_moldyn.F90' || echo '$(srcdir)/'`72_geomoptim/ab7_moldyn.F90 |
4691 |
- |
4692 |
- velocity_verlet.o: 72_geomoptim/velocity_verlet.F90 \ |
4693 |
- defs_basis.o |
4694 |
-@@ -1768,12 +1768,12 @@ |
4695 |
- interfaces_14_hidewrite.o |
4696 |
- $(PPFCCOMPILE) -c -o scfeig.o `test -f '56_mixing/scfeig.F90' || echo '$(srcdir)/'`56_mixing/scfeig.F90 |
4697 |
- |
4698 |
--m_ab6_mixing.o: 56_mixing/m_ab6_mixing.F90 \ |
4699 |
-+m_ab7_mixing.o: 56_mixing/m_ab7_mixing.F90 \ |
4700 |
- defs_basis.o \ |
4701 |
- interfaces_18_timing.o \ |
4702 |
- interfaces_56_mixing.o \ |
4703 |
- m_profiling.o |
4704 |
-- $(PPFCCOMPILE) -c -o m_ab6_mixing.o `test -f '56_mixing/m_ab6_mixing.F90' || echo '$(srcdir)/'`56_mixing/m_ab6_mixing.F90 |
4705 |
-+ $(PPFCCOMPILE) -c -o m_ab7_mixing.o `test -f '56_mixing/m_ab7_mixing.F90' || echo '$(srcdir)/'`56_mixing/m_ab7_mixing.F90 |
4706 |
- |
4707 |
- dotprodm_vn.o: 56_mixing/dotprodm_vn.F90 \ |
4708 |
- defs_abitypes.o \ |
4709 |
-diff -urN bigdft-abi-1.0.4.old/libABINIT/src/deps bigdft-abi-1.0.4.new/libABINIT/src/deps |
4710 |
---- bigdft-abi-1.0.4.old/libABINIT/src/deps 2012-11-08 11:13:29.000000000 +0100 |
4711 |
-+++ bigdft-abi-1.0.4.new/libABINIT/src/deps 2013-06-11 16:51:00.000000000 +0200 |
4712 |
-@@ -194,11 +194,11 @@ |
4713 |
- interfaces_42_geometry.o |
4714 |
- $(PPFCCOMPILE) -c -o symptgroup.o `test -f '42_geometry/symptgroup.F90' || echo '$(srcdir)/'`42_geometry/symptgroup.F90 |
4715 |
- |
4716 |
--m_ab6_symmetry.o: 42_geometry/m_ab6_symmetry.F90 \ |
4717 |
-+m_ab7_symmetry.o: 42_geometry/m_ab7_symmetry.F90 \ |
4718 |
- defs_basis.o \ |
4719 |
- interfaces_32_util.o \ |
4720 |
- interfaces_42_geometry.o |
4721 |
-- $(PPFCCOMPILE) -c -o m_ab6_symmetry.o `test -f '42_geometry/m_ab6_symmetry.F90' || echo '$(srcdir)/'`42_geometry/m_ab6_symmetry.F90 |
4722 |
-+ $(PPFCCOMPILE) -c -o m_ab7_symmetry.o `test -f '42_geometry/m_ab7_symmetry.F90' || echo '$(srcdir)/'`42_geometry/m_ab7_symmetry.F90 |
4723 |
- |
4724 |
- symchk.o: 42_geometry/symchk.F90 \ |
4725 |
- defs_basis.o |
4726 |
-@@ -424,11 +424,11 @@ |
4727 |
- interfaces_56_recipspace.o |
4728 |
- $(PPFCCOMPILE) -c -o getkgrid.o `test -f '56_recipspace/getkgrid.F90' || echo '$(srcdir)/'`56_recipspace/getkgrid.F90 |
4729 |
- |
4730 |
--m_ab6_kpoints.o: 56_recipspace/m_ab6_kpoints.F90 \ |
4731 |
-+m_ab7_kpoints.o: 56_recipspace/m_ab7_kpoints.F90 \ |
4732 |
- defs_basis.o \ |
4733 |
- interfaces_56_recipspace.o \ |
4734 |
-- m_ab6_symmetry.o |
4735 |
-- $(PPFCCOMPILE) -c -o m_ab6_kpoints.o `test -f '56_recipspace/m_ab6_kpoints.F90' || echo '$(srcdir)/'`56_recipspace/m_ab6_kpoints.F90 |
4736 |
-+ m_ab7_symmetry.o |
4737 |
-+ $(PPFCCOMPILE) -c -o m_ab7_kpoints.o `test -f '56_recipspace/m_ab7_kpoints.F90' || echo '$(srcdir)/'`56_recipspace/m_ab7_kpoints.F90 |
4738 |
- |
4739 |
- interfaces_56_recipspace.o: 56_recipspace/interfaces_56_recipspace.F90 \ |
4740 |
- defs_abitypes.o \ |
4741 |
-@@ -573,7 +573,7 @@ |
4742 |
- defs_datatypes.o |
4743 |
- $(PPFCCOMPILE) -c -o moldyn.o `test -f '72_geomoptim/moldyn.F90' || echo '$(srcdir)/'`72_geomoptim/moldyn.F90 |
4744 |
- |
4745 |
--ab6_moldyn.o: 72_geomoptim/ab6_moldyn.F90 \ |
4746 |
-+ab7_moldyn.o: 72_geomoptim/ab7_moldyn.F90 \ |
4747 |
- defs_basis.o \ |
4748 |
- defs_basis.o \ |
4749 |
- 72_geomoptim/isokinetic.F90 \ |
4750 |
-@@ -595,7 +595,7 @@ |
4751 |
- 72_geomoptim/quenched.F90 \ |
4752 |
- defs_basis.o \ |
4753 |
- 72_geomoptim/velocity_verlet.F90 |
4754 |
-- $(PPFCCOMPILE) -c -o ab6_moldyn.o `test -f '72_geomoptim/ab6_moldyn.F90' || echo '$(srcdir)/'`72_geomoptim/ab6_moldyn.F90 |
4755 |
-+ $(PPFCCOMPILE) -c -o ab7_moldyn.o `test -f '72_geomoptim/ab7_moldyn.F90' || echo '$(srcdir)/'`72_geomoptim/ab7_moldyn.F90 |
4756 |
- |
4757 |
- velocity_verlet.o: 72_geomoptim/velocity_verlet.F90 \ |
4758 |
- defs_basis.o |
4759 |
-@@ -694,12 +694,12 @@ |
4760 |
- interfaces_14_hidewrite.o |
4761 |
- $(PPFCCOMPILE) -c -o scfeig.o `test -f '56_mixing/scfeig.F90' || echo '$(srcdir)/'`56_mixing/scfeig.F90 |
4762 |
- |
4763 |
--m_ab6_mixing.o: 56_mixing/m_ab6_mixing.F90 \ |
4764 |
-+m_ab7_mixing.o: 56_mixing/m_ab7_mixing.F90 \ |
4765 |
- defs_basis.o \ |
4766 |
- interfaces_18_timing.o \ |
4767 |
- interfaces_56_mixing.o \ |
4768 |
- m_profiling.o |
4769 |
-- $(PPFCCOMPILE) -c -o m_ab6_mixing.o `test -f '56_mixing/m_ab6_mixing.F90' || echo '$(srcdir)/'`56_mixing/m_ab6_mixing.F90 |
4770 |
-+ $(PPFCCOMPILE) -c -o m_ab7_mixing.o `test -f '56_mixing/m_ab7_mixing.F90' || echo '$(srcdir)/'`56_mixing/m_ab7_mixing.F90 |
4771 |
- |
4772 |
- dotprodm_vn.o: 56_mixing/dotprodm_vn.F90 \ |
4773 |
- defs_abitypes.o \ |
4774 |
-diff -urN bigdft-abi-1.0.4.old/src/abscalc.f90 bigdft-abi-1.0.4.new/src/abscalc.f90 |
4775 |
---- bigdft-abi-1.0.4.old/src/abscalc.f90 2012-07-09 16:43:33.000000000 +0200 |
4776 |
-+++ bigdft-abi-1.0.4.new/src/abscalc.f90 2013-06-11 16:51:00.000000000 +0200 |
4777 |
-@@ -13,7 +13,7 @@ |
4778 |
- use module_base |
4779 |
- use module_types |
4780 |
- use module_interfaces |
4781 |
-- use m_ab6_symmetry |
4782 |
-+ use m_ab7_symmetry |
4783 |
- ! use minimization, only: parameterminimization |
4784 |
- |
4785 |
- implicit none |
4786 |
-@@ -323,9 +323,9 @@ |
4787 |
- use module_xc |
4788 |
- use vdwcorrection |
4789 |
- use esatto |
4790 |
-- use m_ab6_symmetry |
4791 |
-- use m_ab6_mixing |
4792 |
-- use m_ab6_kpoints |
4793 |
-+ use m_ab7_symmetry |
4794 |
-+ use m_ab7_mixing |
4795 |
-+ use m_ab7_kpoints |
4796 |
- implicit none |
4797 |
- integer, intent(in) :: nproc,iproc |
4798 |
- real(gp), intent(inout) :: hx_old,hy_old,hz_old |
4799 |
-diff -urN bigdft-abi-1.0.4.old/src/cluster.f90 bigdft-abi-1.0.4.new/src/cluster.f90 |
4800 |
---- bigdft-abi-1.0.4.old/src/cluster.f90 2012-11-29 11:18:04.000000000 +0100 |
4801 |
-+++ bigdft-abi-1.0.4.new/src/cluster.f90 2013-06-11 16:51:00.000000000 +0200 |
4802 |
-@@ -192,7 +192,7 @@ |
4803 |
- ! use Poisson_Solver |
4804 |
- use module_xc |
4805 |
- ! use vdwcorrection |
4806 |
-- use m_ab6_mixing |
4807 |
-+ use m_ab7_mixing |
4808 |
- use yaml_output |
4809 |
- implicit none |
4810 |
- integer, intent(in) :: nproc,iproc |
4811 |
-@@ -1140,7 +1140,7 @@ |
4812 |
- use module_types |
4813 |
- use module_interfaces, except_this_one => kswfn_optimization_loop |
4814 |
- use yaml_output |
4815 |
-- use m_ab6_mixing |
4816 |
-+ use m_ab7_mixing |
4817 |
- implicit none |
4818 |
- real(dp), dimension(6), intent(out) :: xcstr |
4819 |
- integer, intent(in) :: iproc, nproc, idsx, inputpsi |
4820 |
-@@ -1306,7 +1306,7 @@ |
4821 |
- if (nproc > 1) call MPI_BARRIER(MPI_COMM_WORLD,ierr) |
4822 |
- !call kswfn_free_scf_data(KSwfn, (nproc > 1)) |
4823 |
- !if (opt%iscf /= SCF_KIND_DIRECT_MINIMIZATION) then |
4824 |
-- ! call ab6_mixing_deallocate(denspot%mix) |
4825 |
-+ ! call ab7_mixing_deallocate(denspot%mix) |
4826 |
- ! deallocate(denspot%mix) |
4827 |
- !end if |
4828 |
- !>todo: change this return into a clean out of the routine, so the YAML is clean. |
4829 |
-diff -urN bigdft-abi-1.0.4.old/src/distances.f90 bigdft-abi-1.0.4.new/src/distances.f90 |
4830 |
---- bigdft-abi-1.0.4.old/src/distances.f90 2012-07-09 16:43:33.000000000 +0200 |
4831 |
-+++ bigdft-abi-1.0.4.new/src/distances.f90 2013-06-11 16:51:00.000000000 +0200 |
4832 |
-@@ -275,7 +275,7 @@ |
4833 |
- subroutine box_features(whichone,contcar,nrep,nat,ntypes,iatype,pos,factor) |
4834 |
- use BigDFT_API |
4835 |
- use module_interfaces |
4836 |
-- use m_ab6_symmetry |
4837 |
-+ use m_ab7_symmetry |
4838 |
- implicit none |
4839 |
- character(len=1), intent(in) :: whichone |
4840 |
- character(len=40), intent(in) :: contcar |
4841 |
-@@ -375,7 +375,7 @@ |
4842 |
- subroutine read_pos(iunit,whichone,nat,pos,nrep) |
4843 |
- use BigDFT_API |
4844 |
- use module_interfaces |
4845 |
-- use m_ab6_symmetry |
4846 |
-+ use m_ab7_symmetry |
4847 |
- implicit none |
4848 |
- character(len=1), intent(in) :: whichone |
4849 |
- integer, intent(in) :: iunit,nat,nrep |
4850 |
-diff -urN bigdft-abi-1.0.4.old/src/forces.f90 bigdft-abi-1.0.4.new/src/forces.f90 |
4851 |
---- bigdft-abi-1.0.4.old/src/forces.f90 2012-07-09 16:43:33.000000000 +0200 |
4852 |
-+++ bigdft-abi-1.0.4.new/src/forces.f90 2013-06-11 16:51:00.000000000 +0200 |
4853 |
-@@ -3757,7 +3757,7 @@ |
4854 |
- subroutine symm_stress(dump,tens,symobj) |
4855 |
- use defs_basis |
4856 |
- use module_base, only: verbose,gp |
4857 |
-- use m_ab6_symmetry |
4858 |
-+ use m_ab7_symmetry |
4859 |
- use module_types |
4860 |
- implicit none |
4861 |
- !Arguments |
4862 |
-@@ -3773,7 +3773,7 @@ |
4863 |
- real(gp),dimension(3,3) :: symtens |
4864 |
- |
4865 |
- call symmetry_get_matrices_p(symObj, nsym, sym, transNon, symAfm, errno) |
4866 |
-- if (errno /= AB6_NO_ERROR) stop |
4867 |
-+ if (errno /= AB7_NO_ERROR) stop |
4868 |
- if (nsym < 2) return |
4869 |
- |
4870 |
- if (dump)& |
4871 |
-@@ -3824,7 +3824,7 @@ |
4872 |
- !> Symmetrize the atomic forces (needed with special k points) |
4873 |
- subroutine symmetrise_forces(iproc, fxyz, at) |
4874 |
- use defs_basis |
4875 |
-- use m_ab6_symmetry |
4876 |
-+ use m_ab7_symmetry |
4877 |
- use module_types |
4878 |
- |
4879 |
- implicit none |
4880 |
-@@ -3833,7 +3833,7 @@ |
4881 |
- type(atoms_data), intent(in) :: at |
4882 |
- real(gp), intent(inout) :: fxyz(3, at%nat) |
4883 |
- integer :: ia, mu, isym, errno, ind, nsym |
4884 |
-- integer :: indsym(4, AB6_MAX_SYMMETRIES) |
4885 |
-+ integer :: indsym(4, AB7_MAX_SYMMETRIES) |
4886 |
- real(gp) :: summ |
4887 |
- real(gp) :: alat(3) |
4888 |
- real(gp), allocatable :: dedt(:,:) |
4889 |
-@@ -3843,7 +3843,7 @@ |
4890 |
- real(gp), pointer :: transNon(:,:) |
4891 |
- |
4892 |
- call symmetry_get_matrices_p(at%sym%symObj, nsym, sym, transNon, symAfm, errno) |
4893 |
-- if (errno /= AB6_NO_ERROR) stop |
4894 |
-+ if (errno /= AB7_NO_ERROR) stop |
4895 |
- if (nsym < 2) return |
4896 |
- |
4897 |
- if (iproc == 0) write(*,"(1x,A,I0,A)") "Symmetrise forces with ", nsym, " symmetries." |
4898 |
-@@ -3866,7 +3866,7 @@ |
4899 |
- ! actually conduct symmetrization |
4900 |
- do ia = 1, at%nat |
4901 |
- call symmetry_get_equivalent_atom(at%sym%symObj, indsym, ia, errno) |
4902 |
-- if (errno /= AB6_NO_ERROR) stop |
4903 |
-+ if (errno /= AB7_NO_ERROR) stop |
4904 |
- do mu = 1, 3 |
4905 |
- summ = real(0, gp) |
4906 |
- do isym = 1, nsym |
4907 |
-diff -urN bigdft-abi-1.0.4.old/src/frequencies.f90 bigdft-abi-1.0.4.new/src/frequencies.f90 |
4908 |
---- bigdft-abi-1.0.4.old/src/frequencies.f90 2012-07-09 16:43:33.000000000 +0200 |
4909 |
-+++ bigdft-abi-1.0.4.new/src/frequencies.f90 2013-06-11 16:51:00.000000000 +0200 |
4910 |
-@@ -20,7 +20,7 @@ |
4911 |
- use module_base |
4912 |
- use module_types |
4913 |
- use module_interfaces |
4914 |
-- use m_ab6_symmetry |
4915 |
-+ use m_ab7_symmetry |
4916 |
- use yaml_output |
4917 |
- implicit none |
4918 |
- |
4919 |
-diff -urN bigdft-abi-1.0.4.old/src/geometry.f90 bigdft-abi-1.0.4.new/src/geometry.f90 |
4920 |
---- bigdft-abi-1.0.4.old/src/geometry.f90 2012-07-09 16:43:33.000000000 +0200 |
4921 |
-+++ bigdft-abi-1.0.4.new/src/geometry.f90 2013-06-11 16:51:00.000000000 +0200 |
4922 |
-@@ -159,7 +159,7 @@ |
4923 |
- use module_base |
4924 |
- use module_types |
4925 |
- use scfloop_API |
4926 |
-- use ab6_moldyn |
4927 |
-+ use ab7_moldyn |
4928 |
- implicit none |
4929 |
- integer, intent(in) :: nproc,iproc |
4930 |
- integer, intent(inout) :: ncount_bigdft |
4931 |
-diff -urN bigdft-abi-1.0.4.old/src/hpsiortho.f90 bigdft-abi-1.0.4.new/src/hpsiortho.f90 |
4932 |
---- bigdft-abi-1.0.4.old/src/hpsiortho.f90 2013-01-30 10:10:56.000000000 +0100 |
4933 |
-+++ bigdft-abi-1.0.4.new/src/hpsiortho.f90 2013-06-11 16:51:00.000000000 +0200 |
4934 |
-@@ -17,7 +17,7 @@ |
4935 |
- use module_types |
4936 |
- use module_interfaces, fake_name => psitohpsi |
4937 |
- use Poisson_Solver |
4938 |
-- use m_ab6_mixing |
4939 |
-+ use m_ab7_mixing |
4940 |
- use yaml_output |
4941 |
- implicit none |
4942 |
- logical, intent(in) :: scf |
4943 |
-@@ -144,7 +144,7 @@ |
4944 |
- |
4945 |
- !here the density can be mixed |
4946 |
- if (iscf > SCF_KIND_DIRECT_MINIMIZATION ) then |
4947 |
-- if (denspot%mix%kind == AB6_MIXING_DENSITY) then |
4948 |
-+ if (denspot%mix%kind == AB7_MIXING_DENSITY) then |
4949 |
- call mix_rhopot(iproc,nproc,denspot%mix%nfft*denspot%mix%nspden,alphamix,denspot%mix,& |
4950 |
- denspot%rhov,itrp,wfn%Lzd%Glr%d%n1i,wfn%Lzd%Glr%d%n2i,wfn%Lzd%Glr%d%n3i,& |
4951 |
- atoms%alat1*atoms%alat2*atoms%alat3,&!hx*hy*hz,& !volume should be used |
4952 |
-@@ -215,7 +215,7 @@ |
4953 |
- |
4954 |
- !here the potential can be mixed |
4955 |
- if (iscf > SCF_KIND_DIRECT_MINIMIZATION ) then |
4956 |
-- if (denspot%mix%kind == AB6_MIXING_POTENTIAL) then |
4957 |
-+ if (denspot%mix%kind == AB7_MIXING_POTENTIAL) then |
4958 |
- call mix_rhopot(iproc,nproc,denspot%mix%nfft*denspot%mix%nspden,alphamix,denspot%mix,& |
4959 |
- denspot%rhov,itrp,wfn%Lzd%Glr%d%n1i,wfn%Lzd%Glr%d%n2i,wfn%Lzd%Glr%d%n3i,& |
4960 |
- atoms%alat1*atoms%alat2*atoms%alat3,&!volume should be used |
4961 |
-diff -urN bigdft-abi-1.0.4.old/src/init/atoms.f90 bigdft-abi-1.0.4.new/src/init/atoms.f90 |
4962 |
---- bigdft-abi-1.0.4.old/src/init/atoms.f90 2012-07-09 16:43:33.000000000 +0200 |
4963 |
-+++ bigdft-abi-1.0.4.new/src/init/atoms.f90 2013-06-11 16:51:00.000000000 +0200 |
4964 |
-@@ -210,7 +210,7 @@ |
4965 |
- use module_base |
4966 |
- use module_types |
4967 |
- use defs_basis |
4968 |
-- use m_ab6_symmetry |
4969 |
-+ use m_ab7_symmetry |
4970 |
- implicit none |
4971 |
- type(atoms_data), intent(inout) :: atoms |
4972 |
- real(gp), dimension(3,atoms%nat), intent(in) :: rxyz |
4973 |
-@@ -1901,8 +1901,8 @@ |
4974 |
- subroutine symmetry_set_irreductible_zone(sym, geocode, n1i, n2i, n3i, nspin) |
4975 |
- use module_base |
4976 |
- use module_types |
4977 |
-- use m_ab6_kpoints |
4978 |
-- use m_ab6_symmetry |
4979 |
-+ use m_ab7_kpoints |
4980 |
-+ use m_ab7_symmetry |
4981 |
- implicit none |
4982 |
- type(symmetry_data), intent(inout) :: sym |
4983 |
- integer, intent(in) :: n1i, n2i, n3i, nspin |
4984 |
-diff -urN bigdft-abi-1.0.4.old/src/init/denspotd.f90 bigdft-abi-1.0.4.new/src/init/denspotd.f90 |
4985 |
---- bigdft-abi-1.0.4.old/src/init/denspotd.f90 2012-07-09 16:43:33.000000000 +0200 |
4986 |
-+++ bigdft-abi-1.0.4.new/src/init/denspotd.f90 2013-06-11 16:51:00.000000000 +0200 |
4987 |
-@@ -95,7 +95,7 @@ |
4988 |
- & n1i, n2i) !to be removed arguments when denspot has dimensions |
4989 |
- use module_base |
4990 |
- use module_types |
4991 |
-- use m_ab6_mixing |
4992 |
-+ use m_ab7_mixing |
4993 |
- implicit none |
4994 |
- type(DFT_local_fields), intent(inout) :: denspot |
4995 |
- integer, intent(in) :: iscf, n1i, n2i, nspin |
4996 |
-@@ -104,20 +104,20 @@ |
4997 |
- character(len=500) :: errmess |
4998 |
- |
4999 |
- if (iscf < 10) then |
5000 |
-- potden = AB6_MIXING_POTENTIAL |
5001 |
-+ potden = AB7_MIXING_POTENTIAL |
5002 |
- npoints = n1i*n2i*denspot%dpbox%n3p |
5003 |
- if (denspot%dpbox%n3p==0) npoints=1 |
5004 |
- else |
5005 |
-- potden = AB6_MIXING_DENSITY |
5006 |
-+ potden = AB7_MIXING_DENSITY |
5007 |
- npoints = n1i*n2i*denspot%dpbox%n3d |
5008 |
- if (denspot%dpbox%n3d==0) npoints=1 |
5009 |
- end if |
5010 |
- if (iscf > SCF_KIND_DIRECT_MINIMIZATION) then |
5011 |
- allocate(denspot%mix) |
5012 |
-- call ab6_mixing_new(denspot%mix, modulo(iscf, 10), potden, & |
5013 |
-- AB6_MIXING_REAL_SPACE, npoints, nspin, 0, & |
5014 |
-+ call ab7_mixing_new(denspot%mix, modulo(iscf, 10), potden, & |
5015 |
-+ AB7_MIXING_REAL_SPACE, npoints, nspin, 0, & |
5016 |
- ierr, errmess, useprec = .false.) |
5017 |
-- call ab6_mixing_eval_allocate(denspot%mix) |
5018 |
-+ call ab7_mixing_eval_allocate(denspot%mix) |
5019 |
- else |
5020 |
- nullify(denspot%mix) |
5021 |
- end if |
5022 |
-@@ -125,12 +125,12 @@ |
5023 |
- |
5024 |
- subroutine denspot_free_history(denspot) |
5025 |
- use module_types |
5026 |
-- use m_ab6_mixing |
5027 |
-+ use m_ab7_mixing |
5028 |
- implicit none |
5029 |
- type(DFT_local_fields), intent(inout) :: denspot |
5030 |
- |
5031 |
- if (associated(denspot%mix)) then |
5032 |
-- call ab6_mixing_deallocate(denspot%mix) |
5033 |
-+ call ab7_mixing_deallocate(denspot%mix) |
5034 |
- deallocate(denspot%mix) |
5035 |
- end if |
5036 |
- end subroutine denspot_free_history |
5037 |
-@@ -396,7 +396,7 @@ |
5038 |
- use module_base |
5039 |
- use module_types |
5040 |
- use module_interfaces, except_this_one => allocateRhoPot |
5041 |
-- use m_ab6_mixing |
5042 |
-+ use m_ab7_mixing |
5043 |
- implicit none |
5044 |
- integer, intent(in) :: iproc,nspin |
5045 |
- type(locreg_descriptors), intent(in) :: Glr |
5046 |
-diff -urN bigdft-abi-1.0.4.old/src/init/sysprop.f90 bigdft-abi-1.0.4.new/src/init/sysprop.f90 |
5047 |
---- bigdft-abi-1.0.4.old/src/init/sysprop.f90 2012-07-09 16:43:33.000000000 +0200 |
5048 |
-+++ bigdft-abi-1.0.4.new/src/init/sysprop.f90 2013-06-11 16:51:00.000000000 +0200 |
5049 |
-@@ -879,7 +879,7 @@ |
5050 |
- use module_base |
5051 |
- use module_types |
5052 |
- use module_xc |
5053 |
-- use m_ab6_symmetry |
5054 |
-+ use m_ab7_symmetry |
5055 |
- implicit none |
5056 |
- character (len=*), intent(in) :: fileocc |
5057 |
- type(atoms_data), intent(inout) :: atoms |
5058 |
-diff -urN bigdft-abi-1.0.4.old/src/input_variables.f90 bigdft-abi-1.0.4.new/src/input_variables.f90 |
5059 |
---- bigdft-abi-1.0.4.old/src/input_variables.f90 2012-07-09 16:43:33.000000000 +0200 |
5060 |
-+++ bigdft-abi-1.0.4.new/src/input_variables.f90 2013-06-11 16:51:00.000000000 +0200 |
5061 |
-@@ -908,7 +908,7 @@ |
5062 |
- use module_base |
5063 |
- use module_types |
5064 |
- use defs_basis |
5065 |
-- use m_ab6_kpoints |
5066 |
-+ use m_ab7_kpoints |
5067 |
- use module_input |
5068 |
- implicit none |
5069 |
- character(len=*), intent(in) :: filename |
5070 |
-@@ -958,7 +958,7 @@ |
5071 |
- comment='Equivalent length of K-space resolution (Bohr)') |
5072 |
- call kpoints_get_auto_k_grid(sym%symObj, in%nkpt, in%kpt, in%wkpt, & |
5073 |
- & kptrlen, ierror) |
5074 |
-- if (ierror /= AB6_NO_ERROR) then |
5075 |
-+ if (ierror /= AB7_NO_ERROR) then |
5076 |
- if (iproc==0) write(*,*) " ERROR in symmetry library. Error code is ", ierror |
5077 |
- stop |
5078 |
- end if |
5079 |
-@@ -984,7 +984,7 @@ |
5080 |
- end do |
5081 |
- call kpoints_get_mp_k_grid(sym%symObj, in%nkpt, in%kpt, in%wkpt, & |
5082 |
- & ngkpt, nshiftk, shiftk, ierror) |
5083 |
-- if (ierror /= AB6_NO_ERROR) then |
5084 |
-+ if (ierror /= AB7_NO_ERROR) then |
5085 |
- if (iproc==0) write(*,*) " ERROR in symmetry library. Error code is ", ierror |
5086 |
- stop |
5087 |
- end if |
5088 |
-@@ -1126,7 +1126,7 @@ |
5089 |
- use module_base |
5090 |
- use module_types |
5091 |
- use defs_basis |
5092 |
-- use m_ab6_kpoints |
5093 |
-+ use m_ab7_kpoints |
5094 |
- implicit none |
5095 |
- character(len=*), intent(in) :: filename |
5096 |
- integer, intent(in) :: iproc |
5097 |
-@@ -1178,11 +1178,11 @@ |
5098 |
- call check() |
5099 |
- call kpoints_get_auto_k_grid(atoms%sym%symObj, in%nkpt, in%kpt, in%wkpt, & |
5100 |
- & kptrlen, ierror) |
5101 |
-- if (ierror /= AB6_NO_ERROR) then |
5102 |
-+ if (ierror /= AB7_NO_ERROR) then |
5103 |
- if (iproc==0) write(*,*) " ERROR in symmetry library. Error code is ", ierror |
5104 |
- stop |
5105 |
- end if |
5106 |
-- ! in%kpt and in%wkpt will be allocated by ab6_symmetry routine. |
5107 |
-+ ! in%kpt and in%wkpt will be allocated by ab7_symmetry routine. |
5108 |
- call memocc(0,in%kpt,'in%kpt',subname) |
5109 |
- call memocc(0,in%wkpt,'in%wkpt',subname) |
5110 |
- else if (trim(type) == "MPgrid" .or. trim(type) == "mpgrid") then |
5111 |
-@@ -1198,11 +1198,11 @@ |
5112 |
- if (atoms%geocode == 'F') ngkpt = 1 |
5113 |
- call kpoints_get_mp_k_grid(atoms%sym%symObj, in%nkpt, in%kpt, in%wkpt, & |
5114 |
- & ngkpt, nshiftk, shiftk, ierror) |
5115 |
-- if (ierror /= AB6_NO_ERROR) then |
5116 |
-+ if (ierror /= AB7_NO_ERROR) then |
5117 |
- if (iproc==0) write(*,*) " ERROR in symmetry library. Error code is ", ierror |
5118 |
- stop |
5119 |
- end if |
5120 |
-- ! in%kpt and in%wkpt will be allocated by ab6_symmetry routine. |
5121 |
-+ ! in%kpt and in%wkpt will be allocated by ab7_symmetry routine. |
5122 |
- call memocc(0,in%kpt,'in%kpt',subname) |
5123 |
- call memocc(0,in%wkpt,'in%wkpt',subname) |
5124 |
- else if (trim(type) == "manual" .or. trim(type) == "Manual") then |
5125 |
-@@ -1858,7 +1858,7 @@ |
5126 |
- use module_base |
5127 |
- use module_types |
5128 |
- use module_interfaces, except_this_one => read_atomic_file |
5129 |
-- use m_ab6_symmetry |
5130 |
-+ use m_ab7_symmetry |
5131 |
- use position_files |
5132 |
- implicit none |
5133 |
- character(len=*), intent(in) :: file |
5134 |
-@@ -2430,7 +2430,7 @@ |
5135 |
- use module_base |
5136 |
- use module_types |
5137 |
- use module_interfaces, except_this_one => initialize_atomic_file |
5138 |
-- use m_ab6_symmetry |
5139 |
-+ use m_ab7_symmetry |
5140 |
- implicit none |
5141 |
- integer, intent(in) :: iproc |
5142 |
- type(atoms_data), intent(inout) :: atoms |
5143 |
-diff -urN bigdft-abi-1.0.4.old/src/memguess.f90 bigdft-abi-1.0.4.new/src/memguess.f90 |
5144 |
---- bigdft-abi-1.0.4.old/src/memguess.f90 2012-07-09 16:43:33.000000000 +0200 |
5145 |
-+++ bigdft-abi-1.0.4.new/src/memguess.f90 2013-06-11 16:51:00.000000000 +0200 |
5146 |
-@@ -16,7 +16,7 @@ |
5147 |
- use module_types |
5148 |
- use module_interfaces |
5149 |
- use module_xc |
5150 |
-- use m_ab6_symmetry |
5151 |
-+ use m_ab7_symmetry |
5152 |
- |
5153 |
- implicit none |
5154 |
- character(len=*), parameter :: subname='memguess' |
5155 |
-diff -urN bigdft-abi-1.0.4.old/src/modules/defs.F90 bigdft-abi-1.0.4.new/src/modules/defs.F90 |
5156 |
---- bigdft-abi-1.0.4.old/src/modules/defs.F90 2012-07-09 16:43:33.000000000 +0200 |
5157 |
-+++ bigdft-abi-1.0.4.new/src/modules/defs.F90 2013-06-11 16:51:00.000000000 +0200 |
5158 |
-@@ -1074,7 +1074,7 @@ |
5159 |
- end subroutine herk_double |
5160 |
- |
5161 |
- function fnrm_denpot(x,cplex,nfft,nspden,opt_denpot,user_data) |
5162 |
-- use m_ab6_mixing |
5163 |
-+ use m_ab7_mixing |
5164 |
- implicit none |
5165 |
- integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
5166 |
- double precision, intent(in) :: x(*) |
5167 |
-@@ -1084,7 +1084,7 @@ |
5168 |
- double precision :: fnrm_denpot, ar, nrm_local, dnrm2 |
5169 |
- |
5170 |
- ! In case of density, we use nscatterarr. |
5171 |
-- if (opt_denpot == AB6_MIXING_DENSITY) then |
5172 |
-+ if (opt_denpot == AB7_MIXING_DENSITY) then |
5173 |
- call MPI_COMM_RANK(MPI_COMM_WORLD,iproc,ierr) |
5174 |
- if (ierr /= 0) then |
5175 |
- call MPI_ABORT(MPI_COMM_WORLD, ierr, ie) |
5176 |
-@@ -1125,7 +1125,7 @@ |
5177 |
- end function fnrm_denpot |
5178 |
- |
5179 |
- function fdot_denpot(x,y,cplex,nfft,nspden,opt_denpot,user_data) |
5180 |
-- use m_ab6_mixing |
5181 |
-+ use m_ab7_mixing |
5182 |
- implicit none |
5183 |
- integer, intent(in) :: cplex,nfft,nspden,opt_denpot |
5184 |
- double precision, intent(in) :: x(*), y(*) |
5185 |
-@@ -1135,7 +1135,7 @@ |
5186 |
- double precision :: fdot_denpot, ar, dot_local, ddot |
5187 |
- |
5188 |
- ! In case of density, we use nscatterarr. |
5189 |
-- if (opt_denpot == AB6_MIXING_DENSITY) then |
5190 |
-+ if (opt_denpot == AB7_MIXING_DENSITY) then |
5191 |
- call MPI_COMM_RANK(MPI_COMM_WORLD,iproc,ierr) |
5192 |
- if (ierr /= 0) then |
5193 |
- call MPI_ABORT(MPI_COMM_WORLD, ierr, ie) |
5194 |
-diff -urN bigdft-abi-1.0.4.old/src/modules/interfaces.f90 bigdft-abi-1.0.4.new/src/modules/interfaces.f90 |
5195 |
---- bigdft-abi-1.0.4.old/src/modules/interfaces.f90 2013-01-03 10:10:13.000000000 +0100 |
5196 |
-+++ bigdft-abi-1.0.4.new/src/modules/interfaces.f90 2013-06-11 16:51:00.000000000 +0200 |
5197 |
-@@ -5857,7 +5857,7 @@ |
5198 |
- energs,rpnrm,xcstr,proj_G,paw) |
5199 |
- use module_base |
5200 |
- use module_types |
5201 |
-- use m_ab6_mixing |
5202 |
-+ use m_ab7_mixing |
5203 |
- implicit none |
5204 |
- logical, intent(in) :: scf |
5205 |
- integer, intent(in) :: iproc,nproc,itrp,iscf,ixc,linflag,itwfn |
5206 |
-diff -urN bigdft-abi-1.0.4.old/src/modules/types.f90 bigdft-abi-1.0.4.new/src/modules/types.f90 |
5207 |
---- bigdft-abi-1.0.4.old/src/modules/types.f90 2013-01-03 10:18:08.000000000 +0100 |
5208 |
-+++ bigdft-abi-1.0.4.new/src/modules/types.f90 2013-06-11 16:51:00.000000000 +0200 |
5209 |
-@@ -12,7 +12,7 @@ |
5210 |
- !! and the routines of allocations and de-allocations |
5211 |
- module module_types |
5212 |
- |
5213 |
-- use m_ab6_mixing, only : ab6_mixing_object |
5214 |
-+ use m_ab7_mixing, only : ab7_mixing_object |
5215 |
- use module_base, only : gp,wp,dp,tp,uninitialized |
5216 |
- implicit none |
5217 |
- |
5218 |
-@@ -828,7 +828,7 @@ |
5219 |
- type, public :: DFT_local_fields |
5220 |
- real(dp), dimension(:), pointer :: rhov !< generic workspace. What is there is indicated by rhov_is |
5221 |
- |
5222 |
-- type(ab6_mixing_object), pointer :: mix !< History of rhov, allocated only when using diagonalisation |
5223 |
-+ type(ab7_mixing_object), pointer :: mix !< History of rhov, allocated only when using diagonalisation |
5224 |
- !local fields which are associated to their name |
5225 |
- !normally given in parallel distribution |
5226 |
- real(dp), dimension(:,:), pointer :: rho_psi !< density as given by square of el. WFN |
5227 |
-@@ -1658,7 +1658,7 @@ |
5228 |
- |
5229 |
- subroutine deallocate_symmetry(sym, subname) |
5230 |
- use module_base |
5231 |
-- use m_ab6_symmetry |
5232 |
-+ use m_ab7_symmetry |
5233 |
- implicit none |
5234 |
- type(symmetry_data), intent(inout) :: sym |
5235 |
- character(len = *), intent(in) :: subname |
5236 |
-diff -urN bigdft-abi-1.0.4.old/src/output.f90 bigdft-abi-1.0.4.new/src/output.f90 |
5237 |
---- bigdft-abi-1.0.4.old/src/output.f90 2012-07-09 16:43:33.000000000 +0200 |
5238 |
-+++ bigdft-abi-1.0.4.new/src/output.f90 2013-06-11 16:51:00.000000000 +0200 |
5239 |
-@@ -63,7 +63,7 @@ |
5240 |
- use module_base |
5241 |
- use module_types |
5242 |
- use defs_basis |
5243 |
-- use m_ab6_symmetry |
5244 |
-+ use m_ab7_symmetry |
5245 |
- implicit none |
5246 |
- !Arguments |
5247 |
- integer, intent(in) :: nproc |
5248 |
-@@ -71,9 +71,9 @@ |
5249 |
- type(atoms_data), intent(in) :: atoms |
5250 |
- |
5251 |
- integer :: nSym, ierr, ityp, iat, i, lg |
5252 |
-- integer :: sym(3, 3, AB6_MAX_SYMMETRIES) |
5253 |
-- integer :: symAfm(AB6_MAX_SYMMETRIES) |
5254 |
-- real(gp) :: transNon(3, AB6_MAX_SYMMETRIES) |
5255 |
-+ integer :: sym(3, 3, AB7_MAX_SYMMETRIES) |
5256 |
-+ integer :: symAfm(AB7_MAX_SYMMETRIES) |
5257 |
-+ real(gp) :: transNon(3, AB7_MAX_SYMMETRIES) |
5258 |
- real(gp) :: genAfm(3) |
5259 |
- character(len=15) :: spaceGroup |
5260 |
- integer :: spaceGroupId, pointGroupMagn |
5261 |
-@@ -138,7 +138,7 @@ |
5262 |
- call symmetry_get_matrices(atoms%sym%symObj, nSym, sym, transNon, symAfm, ierr) |
5263 |
- call symmetry_get_group(atoms%sym%symObj, spaceGroup, & |
5264 |
- & spaceGroupId, pointGroupMagn, genAfm, ierr) |
5265 |
-- if (ierr == AB6_ERROR_SYM_NOT_PRIMITIVE) write(spaceGroup, "(A)") "not prim." |
5266 |
-+ if (ierr == AB7_ERROR_SYM_NOT_PRIMITIVE) write(spaceGroup, "(A)") "not prim." |
5267 |
- write(add(1), '(a,i0)') "N. sym. = ", nSym |
5268 |
- write(add(2), '(a,a,a)') "Sp. group = ", trim(spaceGroup) |
5269 |
- else if (atoms%geocode /= 'F' .and. input%disableSym) then |
5270 |
-diff -urN bigdft-abi-1.0.4.old/src/splinedsaddle.f90 bigdft-abi-1.0.4.new/src/splinedsaddle.f90 |
5271 |
---- bigdft-abi-1.0.4.old/src/splinedsaddle.f90 2012-07-09 16:43:33.000000000 +0200 |
5272 |
-+++ bigdft-abi-1.0.4.new/src/splinedsaddle.f90 2013-06-11 16:51:00.000000000 +0200 |
5273 |
-@@ -14,7 +14,7 @@ |
5274 |
- use module_base |
5275 |
- use module_types |
5276 |
- use module_interfaces |
5277 |
-- use m_ab6_symmetry |
5278 |
-+ use m_ab7_symmetry |
5279 |
- use yaml_output |
5280 |
- implicit none |
5281 |
- character(len=*), parameter :: subname='BigDFT' |
5282 |
-diff -urN bigdft-abi-1.0.4.old/src/sumrho.f90 bigdft-abi-1.0.4.new/src/sumrho.f90 |
5283 |
---- bigdft-abi-1.0.4.old/src/sumrho.f90 2012-07-09 16:43:33.000000000 +0200 |
5284 |
-+++ bigdft-abi-1.0.4.new/src/sumrho.f90 2013-06-11 16:51:00.000000000 +0200 |
5285 |
-@@ -719,7 +719,7 @@ |
5286 |
- sym) |
5287 |
- use module_base!, only: gp,dp,wp,ndebug,memocc |
5288 |
- use module_types |
5289 |
-- use m_ab6_symmetry |
5290 |
-+ use m_ab7_symmetry |
5291 |
- |
5292 |
- implicit none |
5293 |
- integer, intent(in) :: iproc,nproc,nspin, n1i, n2i, n3i |
5294 |
-diff -urN bigdft-abi-1.0.4.old/src/test_forces.f90 bigdft-abi-1.0.4.new/src/test_forces.f90 |
5295 |
---- bigdft-abi-1.0.4.old/src/test_forces.f90 2012-07-09 16:43:33.000000000 +0200 |
5296 |
-+++ bigdft-abi-1.0.4.new/src/test_forces.f90 2013-06-11 16:51:00.000000000 +0200 |
5297 |
-@@ -22,7 +22,7 @@ |
5298 |
- use module_base |
5299 |
- use module_types |
5300 |
- use module_interfaces |
5301 |
-- use m_ab6_symmetry |
5302 |
-+ use m_ab7_symmetry |
5303 |
- |
5304 |
- implicit none |
5305 |
- character(len=*), parameter :: subname='test_forces' |
5306 |
-diff -urN bigdft-abi-1.0.4.old/src/wfn_opt/diis.f90 bigdft-abi-1.0.4.new/src/wfn_opt/diis.f90 |
5307 |
---- bigdft-abi-1.0.4.old/src/wfn_opt/diis.f90 2012-08-22 09:55:24.000000000 +0200 |
5308 |
-+++ bigdft-abi-1.0.4.new/src/wfn_opt/diis.f90 2013-06-11 16:51:00.000000000 +0200 |
5309 |
-@@ -459,13 +459,13 @@ |
5310 |
- subroutine mix_rhopot(iproc,nproc,npoints,alphamix,mix,rhopot,istep,& |
5311 |
- & n1,n2,n3,ucvol,rpnrm,nscatterarr) |
5312 |
- use module_base |
5313 |
-- use defs_basis, only: AB6_NO_ERROR |
5314 |
-- use m_ab6_mixing |
5315 |
-+ use defs_basis, only: AB7_NO_ERROR |
5316 |
-+ use m_ab7_mixing |
5317 |
- implicit none |
5318 |
- integer, intent(in) :: npoints, istep, n1, n2, n3, nproc, iproc |
5319 |
- real(gp), intent(in) :: alphamix, ucvol |
5320 |
- integer, dimension(0:nproc-1,4), intent(in) :: nscatterarr |
5321 |
-- type(ab6_mixing_object), intent(inout) :: mix |
5322 |
-+ type(ab7_mixing_object), intent(inout) :: mix |
5323 |
- real(dp), dimension(npoints), intent(inout) :: rhopot |
5324 |
- real(gp), intent(out) :: rpnrm |
5325 |
- !local variables |
5326 |
-@@ -497,10 +497,10 @@ |
5327 |
- end do |
5328 |
- |
5329 |
- ! Do the mixing |
5330 |
-- call ab6_mixing_eval(mix, rhopot, istep, n1 * n2 * n3, ucvol, & |
5331 |
-+ call ab7_mixing_eval(mix, rhopot, istep, n1 * n2 * n3, ucvol, & |
5332 |
- & MPI_COMM_WORLD, (nproc > 1), ierr, errmess, resnrm = rpnrm, & |
5333 |
- & fnrm = fnrm_denpot, fdot = fdot_denpot, user_data = user_data) |
5334 |
-- if (ierr /= AB6_NO_ERROR) then |
5335 |
-+ if (ierr /= AB7_NO_ERROR) then |
5336 |
- if (iproc == 0) write(0,*) errmess |
5337 |
- call MPI_ABORT(MPI_COMM_WORLD, ierr, ie) |
5338 |
- end if |