(git:2bb242e)
Loading...
Searching...
No Matches
smeagol_control_types.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Input control types for NEGF/SMEAGOL transport calculations.
10!> \author Sergey Chulkov
11!> \author Christian Ahart
12!> \author Clotilde Cucinotta
13! **************************************************************************************************
14
26 USE kinds, ONLY: default_string_length,&
27 dp
28 USE physcon, ONLY: kelvin
30 USE util, ONLY: sort
31#include "./base/base_uses.f90"
32
33
34 IMPLICIT NONE
35 PRIVATE
36
37 CHARACTER(LEN=*), PARAMETER, PRIVATE :: moduleN = 'smeagol_control_types'
38
39 PUBLIC :: smeagol_control_type
41
42! **************************************************************************************************
43!> \brief SMEAGOL-related input parameters
44! **************************************************************************************************
46 LOGICAL :: smeagol_enabled = .false.
47
48 !> type of calculation
49 INTEGER :: run_type = smeagol_runtype_bulktransport
50
51 !> regression test mode
52 LOGICAL :: do_regtest = .false.
53
54 !> current-induced forces. It is set automatically based on GLOBAL/run_type
55 LOGICAL :: emforces = .false.
56
57 !> scale factor to convert from CP2K (Hartree) to SMEAGOL (Rydberg) default energy unit
58 REAL(kind=dp) :: to_smeagol_energy_units = 2.0_dp
59
60 !> number of cell images along i and j cell vectors
61 INTEGER, DIMENSION(2) :: n_cell_images = [1, 1]
62
63 !> what lead (bulk transport calculation)
64 INTEGER :: lead_label = smeagol_bulklead_leftright
65
66 !> The length of the SMEAGOL project name is limited by 20 characters (hardcoded in SMEAGOL)
67 CHARACTER(LEN=20) :: project_name = "PROJECT_NAME"
68
69 TYPE(smeagol_aux_control_type), POINTER :: aux => null()
70
72
73! **************************************************************************************************
74!> \brief SMEAGOL-related auxiliary input parameters. They remain unallocated when
75!> SMEAGOL support is disabled.
76! **************************************************************************************************
77 TYPE smeagol_aux_control_type
78 !> MD or GEO_OPT iteration. In contrast with other components of smeagol_control_type that are read from the input file,
79 !> these variables are initialised at the first NEGF iteration.
80 !>
81 !> index of MD or GEO_OPT iteration level.
82 !> 0 if there is neither MD nor GEO_OPT iteration level (e.g. single-point energy calculation).
83 !> -1 if it is not initialised by run_smeagol_emtrans() subroutine
84 INTEGER :: md_iter_level = -1
85 !> The starting step value for MD / GEO_OPT iterations. The default value 0 can be overrited via STEP_START_VAL input keyword.
86 INTEGER :: md_first_step = 0
87
88 !> BS.SubSystemsDelta(1:BS.Subsystems)
89 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: deltabss_bs
90 !> BS.SubSystemsBoundaries(1:BS.Subsystems, 1:2)
91 INTEGER, ALLOCATABLE, DIMENSION(:, :) :: nebss_bs
92 !>
93 INTEGER, ALLOCATABLE, DIMENSION(:) :: atomlist_bs
94
95 REAL(kind=dp) :: temperature = 300.0_dp/kelvin
96
97 ! reademtr()
98 LOGICAL :: trcoeff = .false.
99 LOGICAL :: skiplast = .false.
100 LOGICAL :: calciets = .false.
101
102 LOGICAL :: isexplicit_maxr = .false.
103
104 LOGICAL :: dsigmade = .false.
105 LOGICAL :: calcmpsh = .false.
106
107 LOGICAL :: coopcalculate = .false.
108
109 INTEGER :: nenergr = 288
110 INTEGER :: nenergic = 32
111 INTEGER :: nenergil = 16
112 INTEGER :: npoles = 16
113 INTEGER :: spincl = 0
114 INTEGER :: atmlvcte = 1
115 INTEGER :: atmrvcte = -1
116 INTEGER :: nslices = 1
117 INTEGER :: nlinmix = 1
118 INTEGER :: tmdskip = 0
119 INTEGER :: tmdsampling = 1
120
121 INTEGER :: nenet = 100
122 INTEGER :: rmoinit = 1
123 INTEGER :: rmolast = 1
124 INTEGER :: rorbinit = 1
125 INTEGER :: rorblast = 1
126
127 INTEGER :: coopnumberofbonds = 0
128
129 REAL(kind=dp) :: delta = 1.0e-10_dp
130
131 REAL(kind=dp) :: maxkappa = 0.0_dp
132
133 REAL(kind=dp) :: vbias = 0.0_dp*0.5_dp
134 REAL(kind=dp) :: energlb = -7.0_dp*0.5_dp
135 REAL(kind=dp) :: minl = 0.0_dp
136
137 REAL(kind=dp) :: maxr = 0.0_dp
138
139 REAL(kind=dp) :: tenergi = -0.3675_dp*0.5_dp
140 REAL(kind=dp) :: tenergf = -0.3675_dp*0.5_dp
141 REAL(kind=dp) :: vgate = 0.0_dp*0.5_dp
142
143 REAL(kind=dp) :: zgater = 0.0_dp
144 REAL(kind=dp) :: zgatel = 0.0_dp
145 REAL(kind=dp) :: alphag = 1.0_dp
146
147 ! ReadOptionsNEGF_DFT()
148 LOGICAL :: timereversal = .false.
149 LOGICAL :: trcaddvcdft = .false.
150 LOGICAL :: addvgcompensatingisolatedlocalcharges = .true.
151 LOGICAL :: add_rho_gate = .false.
152 LOGICAL :: debug_gate = .false.
153 LOGICAL :: empdoskso = .false.
154 LOGICAL :: emtimings = .false.
155
156 LOGICAL :: isexplicit_rglxmin = .false.
157 LOGICAL :: isexplicit_rglxmax = .false.
158 LOGICAL :: isexplicit_rglymin = .false.
159 LOGICAL :: isexplicit_rglymax = .false.
160 LOGICAL :: isexplicit_rglzmin = .false.
161 LOGICAL :: isexplicit_rglzmax = .false.
162
163 INTEGER :: ik_select = 0
164
165 REAL(kind=dp) :: q_gate = 0.0_dp
166
167 REAL(kind=dp) :: rglxmin = 0.0_dp
168 REAL(kind=dp) :: rglxmax = 0.0_dp
169 REAL(kind=dp) :: rglymin = 0.0_dp
170 REAL(kind=dp) :: rglymax = 0.0_dp
171 REAL(kind=dp) :: rglzmin = 0.0_dp
172 REAL(kind=dp) :: rglzmax = 0.0_dp
173
174 REAL(kind=dp) :: zeemanbx = 0.0_dp*0.5_dp
175 REAL(kind=dp) :: zeemanby = 0.0_dp*0.5_dp
176 REAL(kind=dp) :: zeemanbz = 0.0_dp*0.5_dp
177
178 ! emtrans_options()
179 INTEGER :: gridmethod = smeagol_gridmethod_traditional
180 INTEGER :: integraltype = smeagol_integraltype_gauss_legendre
181
182 LOGICAL :: pdosgs = .false.
183 LOGICAL :: skipright = .false.
184 LOGICAL :: sigmatodisk = .false.
185 LOGICAL :: bs_add = .false.
186 LOGICAL :: bs_writetrc = .false.
187 LOGICAL :: writetk = .false.
188 LOGICAL :: setene = .false.
189 LOGICAL :: overwritehs = .true.
190 LOGICAL :: transmembed = .true.
191 LOGICAL :: writeevsigma = .false.
192 LOGICAL :: skiptransm = .false.
193 LOGICAL :: deauto = .false.
194 LOGICAL :: geterrsigma = .false.
195 LOGICAL :: getsigma = .false.
196 LOGICAL :: trcef = .true.
197 LOGICAL :: rhosetzeroifhzero = .false.
198 LOGICAL :: m_usehinv = .false.
199 LOGICAL :: m_usevinv = .false.
200 LOGICAL :: m_callsvd = .false.
201 LOGICAL :: m_complexbands = .false.
202 LOGICAL :: m_dosleads = .false.
203 LOGICAL :: leadsdos = .false.
204 LOGICAL :: leadspdos = .false.
205 LOGICAL :: emldos = .false.
206 LOGICAL :: emldos2 = .false.
207 LOGICAL :: curr_distkene = .false.
208 LOGICAL :: curr_distk = .false.
209 LOGICAL :: curr_dist = .false.
210 LOGICAL :: curr_disttrc = .false.
211 LOGICAL :: em_nonscf = .false.
212 LOGICAL :: transmissionrl = .false.
213 LOGICAL :: emsttk = .false.
214 LOGICAL :: gett0s = .false.
215 LOGICAL :: transmissionchannels = .false.
216 LOGICAL :: transmissionchannelswfs = .false.
217 LOGICAL :: transmissionmatrix = .false.
218 LOGICAL :: transmissionmatrixwfs = .false.
219 LOGICAL :: transmissionmatrixpdos = .false.
220 LOGICAL :: em_endcode1 = .false.
221 LOGICAL :: transmoverk = .false.
222 LOGICAL :: emdos = .false.
223 LOGICAL :: empdos = .false.
224 LOGICAL :: empdosk = .false.
225 LOGICAL :: writeiktrck = .false.
226 LOGICAL :: cbspart = .false.
227 LOGICAL :: evec = .false.
228 LOGICAL :: negfon = .false.
229 LOGICAL :: outinfo = .false.
230 LOGICAL :: writenk = .false.
231 LOGICAL :: set_rhoboundary_leads = .true.
232 LOGICAL :: set_rhoboundaryoverlap_leads = .true.
233 LOGICAL :: set_hboundary_leads = .true.
234 LOGICAL :: set_hlr_zero = .true.
235 LOGICAL :: skipnonequilibriumrho = .false.
236 LOGICAL :: skipequilibriumrho = .false.
237 LOGICAL :: computeimpuritygfmatsubara = .false.
238 LOGICAL :: printimpuritygfmatsubara = .false.
239 LOGICAL :: callimpuritysolver = .false.
240
241 LOGICAL :: isexplicit_nprocs_hs = .false.
242 LOGICAL :: isexplicit_sigma_nxleft = .false.
243 LOGICAL :: isexplicit_sigma_nyleft = .false.
244 LOGICAL :: isexplicit_sigma_nxright = .false.
245 LOGICAL :: isexplicit_sigma_nyright = .false.
246
247 LOGICAL :: isexplicit_getrhosinglelead = .false.
248
249 LOGICAL :: isexplicit_deltamin = .false.
250
251 INTEGER :: nprocs_inverse = 1
252 INTEGER :: sigma_nx = 1
253 INTEGER :: sigma_ny = 1
254
255 INTEGER :: nprocs_hs = 1
256 INTEGER :: sigma_nxleft = 1
257 INTEGER :: sigma_nyleft = 1
258 INTEGER :: sigma_nxright = 1
259 INTEGER :: sigma_nyright = 1
260
261 INTEGER :: maxdepth = 15
262 INTEGER :: ndivisions = 9
263 INTEGER :: storesigma = 0
264 INTEGER :: bs_method = 0
265 INTEGER :: bs_nmid = 0
266 INTEGER :: nrunsigmamax = 3
267 INTEGER :: bsrun = 0
268 INTEGER :: bsskip = 1
269 INTEGER :: bseskip = 1
270 INTEGER :: bssc = 1
271 INTEGER :: inversion_solver = 1
272 INTEGER :: onekp = 0
273 INTEGER :: nbss = 2
274 INTEGER :: nsplit = 0
275 INTEGER :: transmissionchannelswfsskipene = 100
276 INTEGER :: transmissionchannelswfsskipkp = 100
277 INTEGER :: transmissionmatrixpdosnwrite = 20
278 INTEGER :: transmissionmatrixisetphase = -1
279 INTEGER :: minchannelindex = 1
280 INTEGER :: maxchannelindex = 0
281 INTEGER :: n_replace_l = 1
282 INTEGER :: n_replace_r = 1
283 INTEGER :: curr_nb1 = -1
284 INTEGER :: curr_nb2 = -1
285 INTEGER :: nparallelk = 1
286
287 INTEGER :: getrhosinglelead = 0
288
289 INTEGER :: sigma_method = 1
290
291 REAL(kind=dp) :: bs_tol = 1.0e-05_dp
292 REAL(kind=dp) :: bs_min = 0.0_dp
293 REAL(kind=dp) :: hstol = 1.0e-10_dp
294 REAL(kind=dp) :: deltaimag = 0.0_dp
295 REAL(kind=dp) :: deltaini = 1.0e-03_dp
296 REAL(kind=dp) :: deltatode = 1.5_dp
297 REAL(kind=dp) :: critam = 2.0_dp
298 REAL(kind=dp) :: setemin = -1.0_dp
299 REAL(kind=dp) :: setemax = 1.0_dp
300 REAL(kind=dp) :: tolab = 1.0e-06_dp
301 REAL(kind=dp) :: weightrho = 0.5_dp
302 REAL(kind=dp) :: thetaleadsl = 0.0_dp
303 REAL(kind=dp) :: phileadsl = 0.0_dp
304 REAL(kind=dp) :: thetaleadsr = 0.0_dp
305 REAL(kind=dp) :: phileadsr = 0.0_dp
306 REAL(kind=dp) :: deltaimagtrc = 0.0_dp
307 REAL(kind=dp) :: m_tolki = 1.0e-06_dp
308 REAL(kind=dp) :: m_svdtolmax = 5.0e-12_dp
309 REAL(kind=dp) :: m_svdtolmin = 1.0e-15_dp
310 REAL(kind=dp) :: m_dsigmamax = 1.0e-05_dp
311 REAL(kind=dp) :: m_rnoise = 1.0_dp
312 REAL(kind=dp) :: m_skipsvd = 1.0e+03_dp
313 REAL(kind=dp) :: m_svdtolzi = 1.0e-08_dp
314 REAL(kind=dp) :: sigmawideband = 0.0_dp
315 REAL(kind=dp) :: emsttkscale = 1.0_dp
316 REAL(kind=dp) :: nlsetzeroratio = 1.0_dp
317 REAL(kind=dp) :: nrsetzeroratio = 1.0_dp
318 REAL(kind=dp) :: curr_fl_l = 1.0_dp
319 REAL(kind=dp) :: curr_fr_l = 0.0_dp
320 REAL(kind=dp) :: curr_fl_r = 0.0_dp
321 REAL(kind=dp) :: curr_fr_r = 1.0_dp
322
323 REAL(kind=dp) :: deltamin = 0.0_dp
324
325 REAL(kind=dp) :: tolsigma = 1.0e-05_dp*0.5_dp
326 REAL(kind=dp) :: trcde = 0.0_dp*0.5_dp
327
328 ! interface options
329 REAL(kind=dp) :: hartreeleadsleft = 0.0_dp
330 REAL(kind=dp) :: hartreeleadsright = 0.0_dp
331 REAL(kind=dp) :: hartreeleadsbottom = 0.0_dp*0.5_dp
332 LOGICAL :: isexplicit_hartreeleadsbottom = .false.
333
334 END TYPE smeagol_aux_control_type
335CONTAINS
336
337! **************************************************************************************************
338!> \brief allocate control options for SMEAGOL calculation
339!> \param smeagol_control an object to create
340! **************************************************************************************************
341 SUBROUTINE smeagol_control_create(smeagol_control)
342 TYPE(smeagol_control_type), POINTER :: smeagol_control
343
344 CHARACTER(LEN=*), PARAMETER :: routinen = 'smeagol_control_create'
345
346 INTEGER :: handle
347
348 cpassert(.NOT. ASSOCIATED(smeagol_control))
349 CALL timeset(routinen, handle)
350
351 ALLOCATE (smeagol_control)
352#if defined(__SMEAGOL)
353 ALLOCATE (smeagol_control%aux)
354#else
355 NULLIFY (smeagol_control%aux)
356#endif
357
358 CALL timestop(handle)
359 END SUBROUTINE smeagol_control_create
360
361! **************************************************************************************************
362!> \brief release SMEAGOL control object
363!> \param smeagol_control an object to release
364! **************************************************************************************************
365 SUBROUTINE smeagol_control_release(smeagol_control)
366 TYPE(smeagol_control_type), POINTER :: smeagol_control
367
368 CHARACTER(LEN=*), PARAMETER :: routinen = 'smeagol_control_release'
369
370 INTEGER :: handle
371
372 CALL timeset(routinen, handle)
373
374 IF (ASSOCIATED(smeagol_control)) THEN
375 IF (ASSOCIATED(smeagol_control%aux)) THEN
376 IF (ALLOCATED(smeagol_control%aux%nebss_bs)) DEALLOCATE (smeagol_control%aux%nebss_bs)
377 IF (ALLOCATED(smeagol_control%aux%deltabss_bs)) DEALLOCATE (smeagol_control%aux%deltabss_bs)
378 IF (ALLOCATED(smeagol_control%aux%atomlist_bs)) DEALLOCATE (smeagol_control%aux%atomlist_bs)
379
380 DEALLOCATE (smeagol_control%aux)
381 END IF
382 DEALLOCATE (smeagol_control)
383 END IF
384
385 CALL timestop(handle)
386 END SUBROUTINE smeagol_control_release
387
388! **************************************************************************************************
389!> \brief Read SMEAGOL-related input parameters.
390!> \param smeagol_control SMEAGOL control parameters
391!> \param smeagol_section SMEAGOL input section
392! **************************************************************************************************
393 SUBROUTINE read_smeagol_control(smeagol_control, smeagol_section)
394 TYPE(smeagol_control_type), POINTER :: smeagol_control
395 TYPE(section_vals_type), POINTER :: smeagol_section
396
397 CHARACTER(LEN=*), PARAMETER :: routinen = 'read_smeagol_control'
398
399 CHARACTER(LEN=default_string_length) :: project_name
400 INTEGER :: handle
401 INTEGER, DIMENSION(:), POINTER :: n_cell_images_ptr
402
403 CALL timeset(routinen, handle)
404
405 CALL section_vals_val_get(smeagol_section, "_SECTION_PARAMETERS_", l_val=smeagol_control%smeagol_enabled)
406
407 ! SMEAGOL project name
408 CALL section_vals_val_get(smeagol_section, "PROJECT_NAME", c_val=project_name)
409 smeagol_control%project_name = project_name(:20)
410 IF (smeagol_control%smeagol_enabled .AND. smeagol_control%project_name /= project_name) THEN
411 CALL cp_warn(__location__, &
412 "SMEAGOL limits the length of the project name to 20 characters. "// &
413 "The project name is truncated to '"//trim(smeagol_control%project_name)//"'.")
414 END IF
415
416 ! reademtr() enum keywords
417 CALL section_vals_val_get(smeagol_section, "RUN_TYPE", i_val=smeagol_control%run_type)
418
419#if !defined(__SMEAGOL)
420 IF (smeagol_control%run_type == smeagol_runtype_emtransport) THEN
421 CALL cp_abort(__location__, &
422 "CP2K was compiled with no SMEAGOL support. SMEAGOL RUN_TYPE EMTransport is not available")
423 END IF
424#endif
425
426 CALL section_vals_val_get(smeagol_section, "REGRESSION_TEST", l_val=smeagol_control%do_regtest)
427
428 CALL section_vals_val_get(smeagol_section, "BulkLead", i_val=smeagol_control%lead_label)
429
430 ! NOTE: keyword NIMAGES_IJ seems to be identical to ignored SMEAGOL keywords BulkTransvCellSizeX and BulkTransvCellSizeY
431 NULLIFY (n_cell_images_ptr)
432 CALL section_vals_val_get(smeagol_section, "NIMAGES_IJ", i_vals=n_cell_images_ptr)
433 smeagol_control%n_cell_images(1:2) = n_cell_images_ptr(1:2)
434
435 ! Hartree > Rydberg scaling factor
436 smeagol_control%to_smeagol_energy_units = cp_unit_from_cp2k(1.0_dp, "RY")
437
438 IF (ASSOCIATED(smeagol_control%aux)) CALL read_smeagol_aux_control(smeagol_control%aux, smeagol_section)
439
440 CALL timestop(handle)
441 END SUBROUTINE read_smeagol_control
442
443! **************************************************************************************************
444!> \brief Read SMEAGOL-related auxiliary input parameters.
445!> \param smeagol_control SMEAGOL control parameters
446!> \param smeagol_section SMEAGOL input section
447! **************************************************************************************************
448 SUBROUTINE read_smeagol_aux_control(smeagol_control, smeagol_section)
449 TYPE(smeagol_aux_control_type), POINTER :: smeagol_control
450 TYPE(section_vals_type), POINTER :: smeagol_section
451
452 CHARACTER(LEN=*), PARAMETER :: routinen = 'read_smeagol_aux_control'
453
454 CHARACTER(LEN=default_string_length) :: nvals_str
455 INTEGER :: handle, i, n, nrep, n_unique
456 INTEGER, ALLOCATABLE, DIMENSION(:) :: ivec, indices
457 INTEGER, DIMENSION(:), POINTER :: iptr
458 LOGICAL :: is_explicit, do_abort
459 REAL(kind=dp), DIMENSION(:), POINTER :: rptr
460 TYPE(section_vals_type), POINTER :: subsection
461
462 CALL timeset(routinen, handle)
463
464 smeagol_control%md_iter_level = -1
465 smeagol_control%md_first_step = 0
466
467 CALL section_vals_val_get(smeagol_section, "TEMPERATURE", r_val=smeagol_control%temperature)
468
469 ! reademtr() logical keywords
470 ! The following keywords (variables) that are part of the reademtr_local_llist list are read but unused
471 ! CB.WriteComplexBands (WriteComplexBands = .FALSE.) unimplemented.
472 ! Presumably, some of these keywords should be removed.
473 CALL section_vals_val_get(smeagol_section, "TrCoefficients", l_val=smeagol_control%TrCoeff)
474 CALL section_vals_val_get(smeagol_section, "SkipLastIter", l_val=smeagol_control%skiplast)
475 CALL section_vals_val_get(smeagol_section, "CalcIETS", l_val=smeagol_control%CalcIETS)
476 CALL section_vals_val_get(smeagol_section, "Sigma.DSigmaDE", l_val=smeagol_control%dsigmade)
477 CALL section_vals_val_get(smeagol_section, "CalcMPSH", l_val=smeagol_control%calcmpsh)
478 CALL section_vals_val_get(smeagol_section, "EM.COOPCalculate", l_val=smeagol_control%COOPCalculate)
479
480 ! reademtr() integer keywords
481 CALL section_vals_val_get(smeagol_section, "NEnergReal", i_val=smeagol_control%NEnergR)
482 CALL section_vals_val_get(smeagol_section, "NenergImCircle", i_val=smeagol_control%NEnergIC)
483 CALL section_vals_val_get(smeagol_section, "NenergImLine", i_val=smeagol_control%NEnergIL)
484 CALL section_vals_val_get(smeagol_section, "NPoles", i_val=smeagol_control%NPoles)
485 CALL section_vals_val_get(smeagol_section, "SpinConfLeads", i_val=smeagol_control%SpinCL)
486 CALL section_vals_val_get(smeagol_section, "AtomLeftVcte", i_val=smeagol_control%AtmLVCte)
487 CALL section_vals_val_get(smeagol_section, "AtomRightVcte", i_val=smeagol_control%AtmRVCte)
488 CALL section_vals_val_get(smeagol_section, "NSlices", i_val=smeagol_control%NSlices)
489 CALL section_vals_val_get(smeagol_section, "NumberLinearMix", i_val=smeagol_control%nlinmix)
490 CALL section_vals_val_get(smeagol_section, "MD.TRCSkip", i_val=smeagol_control%tmdskip)
491 CALL section_vals_val_get(smeagol_section, "MD.TRCSampling", i_val=smeagol_control%tmdsampling)
492 CALL section_vals_val_get(smeagol_section, "NTransmPoints", i_val=smeagol_control%NeneT)
493 CALL section_vals_val_get(smeagol_section, "MPSHAtomFirst", i_val=smeagol_control%rmoinit)
494 CALL section_vals_val_get(smeagol_section, "MPSHAtomLast", i_val=smeagol_control%rmolast)
495 CALL section_vals_val_get(smeagol_section, "MPSHOrbFirst", i_val=smeagol_control%rorbinit)
496 CALL section_vals_val_get(smeagol_section, "MPSHOrbLast", i_val=smeagol_control%rorblast)
497 CALL section_vals_val_get(smeagol_section, "EM.COOPNumberOfBonds", i_val=smeagol_control%COOPNumberOfBonds)
498
499 ! reademtr() real-valued keywords
500 CALL section_vals_val_get(smeagol_section, "Delta", r_val=smeagol_control%Delta)
501 CALL section_vals_val_get(smeagol_section, "CB.MaxKappa", r_val=smeagol_control%maxkappa)
502
503 ! reademtr() physical-valued keywords
504 CALL section_vals_val_get(smeagol_section, "VBias", r_val=smeagol_control%VBias)
505 CALL section_vals_val_get(smeagol_section, "EnergLowestBound", r_val=smeagol_control%EnergLB)
506 CALL section_vals_val_get(smeagol_section, "ZLeftVcte", r_val=smeagol_control%minL)
507 CALL section_vals_val_get(smeagol_section, "ZRightVcte", &
508 r_val=smeagol_control%maxR, &
509 explicit=smeagol_control%isexplicit_maxR)
510 CALL section_vals_val_get(smeagol_section, "InitTransmRange", r_val=smeagol_control%TEnergI)
511 CALL section_vals_val_get(smeagol_section, "FinalTransmRange", r_val=smeagol_control%TEnergF)
512 CALL section_vals_val_get(smeagol_section, "VGate", r_val=smeagol_control%vgate)
513 CALL section_vals_val_get(smeagol_section, "ZVGateR", r_val=smeagol_control%zgater)
514 CALL section_vals_val_get(smeagol_section, "ZVGateL", r_val=smeagol_control%zgatel)
515 CALL section_vals_val_get(smeagol_section, "ZBroadeningG", r_val=smeagol_control%alphag)
516
517 ! ReadOptionsNEGF_DFT() logical keywords
518 CALL section_vals_val_get(smeagol_section, "EM.TimeReversal", l_val=smeagol_control%timereversal)
519 CALL section_vals_val_get(smeagol_section, "EM.TRCAddVCDFT", l_val=smeagol_control%TRCAddVCDFT)
520 CALL section_vals_val_get(smeagol_section, "EM.AddVgIsolatedLocalCharges", l_val=smeagol_control%AddVgCompensatingIsolated&
521 &localcharges)
522 CALL section_vals_val_get(smeagol_section, "EM.AddRhoGate", l_val=smeagol_control%Add_Rho_Gate)
523 CALL section_vals_val_get(smeagol_section, "EM.DebugRhoGate", l_val=smeagol_control%debug_gate)
524 CALL section_vals_val_get(smeagol_section, "EMPDOSKSO", l_val=smeagol_control%empdoskso)
525 CALL section_vals_val_get(smeagol_section, "EM.Timings", l_val=smeagol_control%emtimings)
526
527 ! ReadOptionsNEGF_DFT() integer keywords
528 CALL section_vals_val_get(smeagol_section, "Ik_Select", i_val=smeagol_control%ik_select)
529
530 ! ReadOptionsNEGF_DFT() real-valued keywords
531 CALL section_vals_val_get(smeagol_section, "EM.NetRhoGateCharge", r_val=smeagol_control%Q_gate)
532
533 ! ReadOptionsNEGF_DFT() physical-valued keywords
534 CALL section_vals_val_get(smeagol_section, "EM.RhoGateLxMin", &
535 r_val=smeagol_control%RGlxmin, &
536 explicit=smeagol_control%isexplicit_RGlxmin)
537 CALL section_vals_val_get(smeagol_section, "EM.RhoGateLxMax", &
538 r_val=smeagol_control%RGlxmax, &
539 explicit=smeagol_control%isexplicit_RGlxmax)
540 CALL section_vals_val_get(smeagol_section, "EM.RhoGateLyMin", &
541 r_val=smeagol_control%RGlymin, &
542 explicit=smeagol_control%isexplicit_RGlymin)
543 CALL section_vals_val_get(smeagol_section, "EM.RhoGateLyMax", &
544 r_val=smeagol_control%RGlymax, &
545 explicit=smeagol_control%isexplicit_RGlymax)
546 CALL section_vals_val_get(smeagol_section, "EM.RhoGateLzMin", &
547 r_val=smeagol_control%RGlzmin, &
548 explicit=smeagol_control%isexplicit_RGlzmin)
549 CALL section_vals_val_get(smeagol_section, "EM.RhoGateLzMax", &
550 r_val=smeagol_control%RGlzmax, &
551 explicit=smeagol_control%isexplicit_RGlzmax)
552
553 CALL section_vals_val_get(smeagol_section, "ZeemanTermBx", r_val=smeagol_control%ZeemanBx)
554 CALL section_vals_val_get(smeagol_section, "ZeemanTermBy", r_val=smeagol_control%ZeemanBy)
555 CALL section_vals_val_get(smeagol_section, "ZeemanTermBz", r_val=smeagol_control%ZeemanBz)
556
557 ! emtrans_options() enum keywords
558 CALL section_vals_val_get(smeagol_section, "EnergyGridType", i_val=smeagol_control%gridmethod)
559 CALL section_vals_val_get(smeagol_section, "TypeOfIntegral", i_val=smeagol_control%integraltype)
560
561 ! emtrans_options() logical keywords
562 CALL section_vals_val_get(smeagol_section, "Sigma.PDOS", l_val=smeagol_control%pdosgs)
563 CALL section_vals_val_get(smeagol_section, "Sigma.SkipRight", l_val=smeagol_control%skipright)
564 CALL section_vals_val_get(smeagol_section, "Sigma.WriteToDisk", l_val=smeagol_control%sigmatodisk)
565 CALL section_vals_val_get(smeagol_section, "BS.Add", l_val=smeagol_control%bs_add)
566 CALL section_vals_val_get(smeagol_section, "BS.WriteTransmission", l_val=smeagol_control%bs_writetrc)
567 CALL section_vals_val_get(smeagol_section, "Current.WriteTransmission", l_val=smeagol_control%writetk)
568 CALL section_vals_val_get(smeagol_section, "SetEnergyRange", l_val=smeagol_control%setene)
569 CALL section_vals_val_get(smeagol_section, "Sigma.OverwriteHS", l_val=smeagol_control%overwritehs)
570 CALL section_vals_val_get(smeagol_section, "TransmissionEmbed", l_val=smeagol_control%transmembed)
571 CALL section_vals_val_get(smeagol_section, "Sigma.WriteEV", l_val=smeagol_control%writeevsigma)
572 CALL section_vals_val_get(smeagol_section, "Sigma.SkipTransmission", l_val=smeagol_control%skiptransm)
573 CALL section_vals_val_get(smeagol_section, "TRCDEAuto", l_val=smeagol_control%deauto)
574 CALL section_vals_val_get(smeagol_section, "Sigma.CheckAccuracy", l_val=smeagol_control%geterrsigma)
575 CALL section_vals_val_get(smeagol_section, "Sigma.Write", l_val=smeagol_control%getsigma)
576 CALL section_vals_val_get(smeagol_section, "TRCScaleEf", l_val=smeagol_control%trcef)
577 CALL section_vals_val_get(smeagol_section, "EM.SetRhoZeroIfHZero", l_val=smeagol_control%RhoSetZeroIfHZero)
578 CALL section_vals_val_get(smeagol_section, "Sigma.InvertH1", l_val=smeagol_control%m_usehinv)
579 CALL section_vals_val_get(smeagol_section, "Sigma.InvertV", l_val=smeagol_control%m_usevinv)
580 CALL section_vals_val_get(smeagol_section, "Sigma.CSVD", l_val=smeagol_control%m_callsvd)
581 CALL section_vals_val_get(smeagol_section, "Sigma.ComplexBands", l_val=smeagol_control%m_complexbands)
582 CALL section_vals_val_get(smeagol_section, "Sigma.DOSVV", l_val=smeagol_control%m_dosleads)
583 CALL section_vals_val_get(smeagol_section, "TRC.LeadsDOS", l_val=smeagol_control%leadsdos)
584 CALL section_vals_val_get(smeagol_section, "TRC.LeadsPDOS", l_val=smeagol_control%leadspdos)
585 CALL section_vals_val_get(smeagol_section, "EM.LDOS3", l_val=smeagol_control%emldos)
586 CALL section_vals_val_get(smeagol_section, "EM.LDOS", l_val=smeagol_control%emldos2)
587 CALL section_vals_val_get(smeagol_section, "EM.CurrentDensityK_Ene", l_val=smeagol_control%curr_distKEne)
588 CALL section_vals_val_get(smeagol_section, "EM.CurrentDensityK", l_val=smeagol_control%curr_distK)
589 CALL section_vals_val_get(smeagol_section, "EM.CurrentDensity", l_val=smeagol_control%curr_dist)
590 CALL section_vals_val_get(smeagol_section, "EM.CurrentDensityTRC", l_val=smeagol_control%curr_distTRC)
591 CALL section_vals_val_get(smeagol_section, "EM.NonSelfConsistentRun", l_val=smeagol_control%em_NonSCF)
592 CALL section_vals_val_get(smeagol_section, "EM.TransmissionRL", l_val=smeagol_control%TransmissionRL)
593 CALL section_vals_val_get(smeagol_section, "EM.SpinTorqueK", l_val=smeagol_control%emSTTk)
594 CALL section_vals_val_get(smeagol_section, "EM.TRCSpinComponents", l_val=smeagol_control%GetT0S)
595 CALL section_vals_val_get(smeagol_section, "EM.TRCChannels", l_val=smeagol_control%TransmissionChannels)
596 CALL section_vals_val_get(smeagol_section, "EM.TRCChannelsWFS", l_val=smeagol_control%TransmissionChannelsWFS)
597 CALL section_vals_val_get(smeagol_section, "EM.TMatrix", l_val=smeagol_control%TransmissionMatrix)
598 CALL section_vals_val_get(smeagol_section, "EM.TMatrixWFS", l_val=smeagol_control%TransmissionMatrixWFS)
599 CALL section_vals_val_get(smeagol_section, "EM.TMatrixPDOS", l_val=smeagol_control%TransmissionMatrixPDOS)
600 CALL section_vals_val_get(smeagol_section, "EM.EndCode1", l_val=smeagol_control%EM_EndCode1)
601 CALL section_vals_val_get(smeagol_section, "TransmissionOverK", l_val=smeagol_control%TransmOverk)
602 CALL section_vals_val_get(smeagol_section, "TRC.EMDOS", l_val=smeagol_control%emdos)
603 CALL section_vals_val_get(smeagol_section, "TRC.EMPDOS", l_val=smeagol_control%empdos)
604 CALL section_vals_val_get(smeagol_section, "TRC.EMPDOSK", l_val=smeagol_control%empdosk)
605 CALL section_vals_val_get(smeagol_section, "TRC.TrcOverKWriteIk", l_val=smeagol_control%WriteIkTrcK)
606 CALL section_vals_val_get(smeagol_section, "CBS.SubSystem", l_val=smeagol_control%cbspart)
607 CALL section_vals_val_get(smeagol_section, "CBS.PrintWaveFunction", l_val=smeagol_control%evec)
608 CALL section_vals_val_get(smeagol_section, "EM.OrderN", l_val=smeagol_control%negfon)
609 CALL section_vals_val_get(smeagol_section, "EM.OutputInfo", l_val=smeagol_control%outinfo)
610 CALL section_vals_val_get(smeagol_section, "EM.WriteNk", l_val=smeagol_control%WriteNk)
611 CALL section_vals_val_get(smeagol_section, "EM.SetRhoBoundaryFromLeads", l_val=smeagol_control%Set_RhoBoundary_Leads)
612 CALL section_vals_val_get(smeagol_section, "EM.SetRhoBoundaryOverlapFromLeads",&
613 & l_val=smeagol_control%Set_RhoBoundaryOverlap_Leads)
614 CALL section_vals_val_get(smeagol_section, "EM.SetHBoundaryFromLeads", l_val=smeagol_control%Set_HBoundary_Leads)
615 CALL section_vals_val_get(smeagol_section, "EM.SetHLRZero", l_val=smeagol_control%Set_HLR_Zero)
616 CALL section_vals_val_get(smeagol_section, "EM.SkipNonEquilibriumRho", l_val=smeagol_control%SkipNonEquilibriumRho)
617 CALL section_vals_val_get(smeagol_section, "EM.SkipEquilibriumRho", l_val=smeagol_control%SkipEquilibriumRho)
618 CALL section_vals_val_get(smeagol_section, "EM.ComputeImpurityGfMatsubara", l_val=smeagol_control%ComputeImpurityGfMatsuba&
619 &ra)
620 CALL section_vals_val_get(smeagol_section, "EM.PrintImpurityGfMatsubara", l_val=smeagol_control%PrintImpurityGfMatsubara)
621 CALL section_vals_val_get(smeagol_section, "EM.CallImpuritySolver", l_val=smeagol_control%CallImpuritySolver)
622
623 ! emtrans_options() integer keywords
624 CALL section_vals_val_get(smeagol_section, "EM.NProcessorsInverse", i_val=smeagol_control%nprocs_inverse)
625 CALL section_vals_val_get(smeagol_section, "Sigma.Nx", i_val=smeagol_control%Sigma_Nx)
626 CALL section_vals_val_get(smeagol_section, "Sigma.Ny", i_val=smeagol_control%Sigma_Ny)
627
628 CALL section_vals_val_get(smeagol_section, "EM.NProcessorsDistributeMatrices", &
629 i_val=smeagol_control%nprocs_hs, &
630 explicit=smeagol_control%isexplicit_nprocs_hs)
631 CALL section_vals_val_get(smeagol_section, "Sigma.NxLeft", &
632 i_val=smeagol_control%Sigma_NxLeft, &
633 explicit=smeagol_control%isexplicit_Sigma_NxLeft)
634 CALL section_vals_val_get(smeagol_section, "Sigma.NyLeft", &
635 i_val=smeagol_control%Sigma_NyLeft, &
636 explicit=smeagol_control%isexplicit_Sigma_NyLeft)
637 CALL section_vals_val_get(smeagol_section, "Sigma.NxRight", &
638 i_val=smeagol_control%Sigma_NxRight, &
639 explicit=smeagol_control%isexplicit_Sigma_NxRight)
640 CALL section_vals_val_get(smeagol_section, "Sigma.NyRight", &
641 i_val=smeagol_control%Sigma_NyRight, &
642 explicit=smeagol_control%isexplicit_Sigma_NyRight)
643
644 CALL section_vals_val_get(smeagol_section, "AM.MaxDepth", i_val=smeagol_control%maxdepth)
645 CALL section_vals_val_get(smeagol_section, "AM.NumberDivisions", i_val=smeagol_control%ndivisions)
646 CALL section_vals_val_get(smeagol_section, "SIGMA.Save", i_val=smeagol_control%storesigma)
647 CALL section_vals_val_get(smeagol_section, "BS.Method", i_val=smeagol_control%bs_method)
648 CALL section_vals_val_get(smeagol_section, "BS.MiddleOrbital", i_val=smeagol_control%bs_nmid)
649 CALL section_vals_val_get(smeagol_section, "Sigma.NRerunSigmaMax", i_val=smeagol_control%NRunSigmaMax)
650 CALL section_vals_val_get(smeagol_section, "BS.TypeOfRun", i_val=smeagol_control%bsrun)
651 CALL section_vals_val_get(smeagol_section, "BS.Skip", i_val=smeagol_control%bsskip)
652 CALL section_vals_val_get(smeagol_section, "BS.ESkip", i_val=smeagol_control%bseskip)
653 CALL section_vals_val_get(smeagol_section, "BS.SetOccupation", i_val=smeagol_control%bssc)
654 CALL section_vals_val_get(smeagol_section, "EM.InverseSolver", i_val=smeagol_control%inversion_solver)
655 CALL section_vals_val_get(smeagol_section, "EM.OneKP", i_val=smeagol_control%onekp)
656 CALL section_vals_val_get(smeagol_section, "BS.Subsystems", i_val=smeagol_control%nbss)
657 CALL section_vals_val_get(smeagol_section, "EM.TRCSpinComponentsOribalSplit", i_val=smeagol_control%nSplit)
658 CALL section_vals_val_get(smeagol_section, "EM.TRCChannelsWFS_SkipEne", i_val=smeagol_control%TransmissionChannelsWFSSkipE&
659 &ne)
660 CALL section_vals_val_get(smeagol_section, "EM.TRCChannelsWFS_SkipKP", i_val=smeagol_control%TransmissionChannelsWFSSkipKP)
661 CALL section_vals_val_get(smeagol_section, "EM.TMatrixPDOSNWrite", i_val=smeagol_control%TransmissionMatrixPDOSNWrite)
662 CALL section_vals_val_get(smeagol_section, "EM.TMatrixSetPhaseIndex", i_val=smeagol_control%TransmissionMatrixiSetPhase)
663 CALL section_vals_val_get(smeagol_section, "EM.TRCMinChannelIndex", i_val=smeagol_control%MinChannelIndex)
664 CALL section_vals_val_get(smeagol_section, "EM.TRCMaxChannelIndex", i_val=smeagol_control%MaxChannelIndex)
665 CALL section_vals_val_get(smeagol_section, "EM.NSetHBoundaryFromLeadsL", i_val=smeagol_control%N_Replace_L)
666 CALL section_vals_val_get(smeagol_section, "EM.NSetHBoundaryFromLeadsR", i_val=smeagol_control%N_Replace_R)
667 CALL section_vals_val_get(smeagol_section, "EM.CurrentFluxOrbital1", i_val=smeagol_control%curr_nb1)
668 CALL section_vals_val_get(smeagol_section, "EM.CurrentFluxOrbital2", i_val=smeagol_control%curr_nb2)
669 CALL section_vals_val_get(smeagol_section, "EM.ParallelOverKNum", i_val=smeagol_control%NParallelK)
670
671 CALL section_vals_val_get(smeagol_section, "EM.LDOSLeadsProjection", &
672 i_val=smeagol_control%GetRhoSingleLead, &
673 explicit=smeagol_control%isexplicit_GetRhoSingleLead)
674
675 CALL section_vals_val_get(smeagol_section, "Sigma.Method", i_val=smeagol_control%sigma_method)
676
677 ! emtrans_options() real-valued keywords
678 CALL section_vals_val_get(smeagol_section, "BS.Tolerance", r_val=smeagol_control%bs_tol)
679 CALL section_vals_val_get(smeagol_section, "BS.Minimum", r_val=smeagol_control%bs_min)
680 CALL section_vals_val_get(smeagol_section, "EM.HSTol", r_val=smeagol_control%HSTol)
681 CALL section_vals_val_get(smeagol_section, "Sigma.EImag", r_val=smeagol_control%deltaimag)
682 CALL section_vals_val_get(smeagol_section, "AM.DeltaInit", r_val=smeagol_control%deltaini)
683 CALL section_vals_val_get(smeagol_section, "AM.DeltaToDe", r_val=smeagol_control%deltatode)
684 CALL section_vals_val_get(smeagol_section, "AM.Criterium", r_val=smeagol_control%critam)
685 CALL section_vals_val_get(smeagol_section, "SetEmin", r_val=smeagol_control%setemin)
686 CALL section_vals_val_get(smeagol_section, "SetEmax", r_val=smeagol_control%setemax)
687 CALL section_vals_val_get(smeagol_section, "Sigma.Tolab", r_val=smeagol_control%tolab)
688 CALL section_vals_val_get(smeagol_section, "EM.WeightRho", r_val=smeagol_control%weightrho)
689 CALL section_vals_val_get(smeagol_section, "EM.RotateSpinLeadsLeft.Theta", r_val=smeagol_control%ThetaLeadsL)
690 CALL section_vals_val_get(smeagol_section, "EM.RotateSpinLeadsLeft.Phi", r_val=smeagol_control%PhiLeadsL)
691 CALL section_vals_val_get(smeagol_section, "EM.RotateSpinLeadsRight.Theta", r_val=smeagol_control%ThetaLeadsR)
692 CALL section_vals_val_get(smeagol_section, "EM.RotateSpinLeadsRight.Phi", r_val=smeagol_control%PhiLeadsR)
693 CALL section_vals_val_get(smeagol_section, "DeltaTransmission", r_val=smeagol_control%deltaimagtrc)
694 CALL section_vals_val_get(smeagol_section, "Sigma.Dkimag", r_val=smeagol_control%m_tolki)
695 CALL section_vals_val_get(smeagol_section, "Sigma.DSVDMax", r_val=smeagol_control%m_svdtolmax)
696 CALL section_vals_val_get(smeagol_section, "Sigma.DSVDMin", r_val=smeagol_control%m_svdtolmin)
697 CALL section_vals_val_get(smeagol_section, "Sigma.DMax", r_val=smeagol_control%m_dsigmamax)
698 CALL section_vals_val_get(smeagol_section, "Sigma.RNoise", r_val=smeagol_control%m_rnoise)
699 CALL section_vals_val_get(smeagol_section, "Sigma.SkipSVD", r_val=smeagol_control%m_skipsvd)
700 CALL section_vals_val_get(smeagol_section, "Sigma.SVDTolZero", r_val=smeagol_control%m_svdtolzi)
701 CALL section_vals_val_get(smeagol_section, "Sigma.WideBandImag", r_val=smeagol_control%SigmaWideBand)
702 CALL section_vals_val_get(smeagol_section, "EM.SpinTorqueKScale", r_val=smeagol_control%emSTTkScale)
703 CALL section_vals_val_get(smeagol_section, "EM.SetHLRZeroRatioLeft", r_val=smeagol_control%nlSetZeroRatio)
704 CALL section_vals_val_get(smeagol_section, "EM.SetHLRZeroRatioRight", r_val=smeagol_control%nrSetZeroRatio)
705 CALL section_vals_val_get(smeagol_section, "EM.CurrentFluxFL_L", r_val=smeagol_control%curr_fl_L)
706 CALL section_vals_val_get(smeagol_section, "EM.CurrentFluxFR_L", r_val=smeagol_control%curr_fr_L)
707 CALL section_vals_val_get(smeagol_section, "EM.CurrentFluxFL_R", r_val=smeagol_control%curr_fl_R)
708 CALL section_vals_val_get(smeagol_section, "EM.CurrentFluxFR_R", r_val=smeagol_control%curr_fr_R)
709
710 CALL section_vals_val_get(smeagol_section, "BS.Delta", &
711 r_val=smeagol_control%deltamin, &
712 explicit=smeagol_control%isexplicit_deltamin)
713
714 ! emtrans_options() physical-valued keywords
715 CALL section_vals_val_get(smeagol_section, "Sigma.WarnInOutput", r_val=smeagol_control%tolsigma)
716 CALL section_vals_val_get(smeagol_section, "TRCDE", r_val=smeagol_control%trcde)
717
718 ! interface physical-valued keywords
719 CALL section_vals_val_get(smeagol_section, "HartreeLeadsLeft", r_val=smeagol_control%HartreeLeadsLeft)
720 CALL section_vals_val_get(smeagol_section, "HartreeLeadsRight", r_val=smeagol_control%HartreeLeadsRight)
721 CALL section_vals_val_get(smeagol_section, "HartreeLeadsBottom", &
722 r_val=smeagol_control%HartreeLeadsBottom, &
723 explicit=smeagol_control%isexplicit_HartreeLeadsBottom)
724
725 ! Bound states
726 IF (smeagol_control%nbss <= 0) THEN
727 CALL cp_abort(__location__, &
728 "BS.Subsystems keyword should have a positive integer value.")
729 END IF
730
731 subsection => section_vals_get_subs_vals(smeagol_section, "BS.SubSystemsBoundaries")
732 CALL section_vals_get(subsection, explicit=is_explicit)
733 IF (is_explicit) THEN
734 CALL section_vals_val_get(subsection, "_DEFAULT_KEYWORD_", n_rep_val=nrep, explicit=is_explicit)
735 IF (.NOT. is_explicit) nrep = 0
736
737 do_abort = .false.
738 IF (smeagol_control%nbss == nrep) THEN
739 IF (is_explicit) THEN
740 ALLOCATE (smeagol_control%nebss_bs(nrep, 2))
741 DO i = 1, nrep
742 CALL section_vals_val_get(subsection, "_DEFAULT_KEYWORD_", i_rep_val=i, i_vals=iptr)
743 IF (SIZE(iptr) == 2) THEN
744 IF (minval(iptr) > 0 .AND. iptr(1) <= iptr(2)) THEN
745 smeagol_control%nebss_bs(i, 1:2) = iptr(1:2)
746 ELSE
747 do_abort = .true.
748 EXIT
749 END IF
750 ELSE
751 do_abort = .true.
752 EXIT
753 END IF
754 END DO
755 END IF
756 ELSE
757 do_abort = .true.
758 END IF
759
760 IF (do_abort) THEN
761 CALL integer_to_string(smeagol_control%nbss, nvals_str)
762 CALL cp_abort(__location__, &
763 "BS.SubSystemsBoundaries section is expected to have BS.Subsystems ("//trim(nvals_str)// &
764 ") lines with two positive integer numbers on each line.")
765 END IF
766
767 END IF
768
769 CALL section_vals_val_get(smeagol_section, "BS.SubSystemsDelta", explicit=is_explicit)
770 IF (is_explicit) THEN
771 CALL section_vals_val_get(smeagol_section, "BS.SubSystemsDelta", r_vals=rptr)
772 IF (smeagol_control%nbss /= SIZE(rptr)) THEN ! do negative deltas make sense ? .OR. MINVAL(rptr) < 0
773 CALL integer_to_string(smeagol_control%nbss, nvals_str)
774 CALL cp_abort(__location__, &
775 "BS.SubSystemsDelta keyword is expected to have BS.Subsystems ("//trim(nvals_str)//") real numbers.")
776 END IF
777
778 n = SIZE(rptr)
779 ALLOCATE (smeagol_control%deltabss_bs(n))
780 smeagol_control%deltabss_bs(1:n) = rptr(1:n)
781 !ELSE allocate and set deltabss_bs() to deltamin
782 END IF
783
784 CALL section_vals_val_get(smeagol_section, "AM.AtomListBS", explicit=is_explicit)
785 IF (is_explicit) THEN
786 CALL section_vals_val_get(smeagol_section, "AM.AtomListBS", i_vals=iptr)
787
788 ! subsys is not available at this stage, so we cannot check that MINVAL(iptr) <= natoms so far
789 IF (SIZE(iptr) == 0 .OR. minval(iptr) <= 0) THEN
790 CALL cp_abort(__location__, &
791 "All atomic indices in AM.AtomListBS should be positive integer numbers.")
792 END IF
793
794 n = SIZE(iptr)
795 ALLOCATE (ivec(n), indices(n))
796 ivec(1:n) = iptr(1:n)
797 CALL sort(ivec, n, indices)
798
799 n_unique = 1
800 DO i = 2, n
801 IF (ivec(i) > ivec(i - 1)) n_unique = n_unique + 1
802 END DO
803
804 ALLOCATE (smeagol_control%atomlist_bs(n_unique))
805 n_unique = 1
806 smeagol_control%atomlist_bs(1) = ivec(1)
807
808 DO i = 2, n
809 IF (ivec(i) > ivec(i - 1)) THEN
810 n_unique = n_unique + 1
811 smeagol_control%atomlist_bs(n_unique) = ivec(i)
812 END IF
813 END DO
814 END IF
815
816 CALL timestop(handle)
817 END SUBROUTINE read_smeagol_aux_control
818END MODULE smeagol_control_types
unit conversion facility
Definition cp_units.F:30
real(kind=dp) function, public cp_unit_from_cp2k(value, unit_str, defaults, power)
converts from the internal cp2k units to the given unit
Definition cp_units.F:1311
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public smeagol_runtype_emtransport
integer, parameter, public smeagol_gridmethod_traditional
integer, parameter, public smeagol_bulklead_leftright
integer, parameter, public smeagol_integraltype_gauss_legendre
integer, parameter, public smeagol_runtype_bulktransport
objects that represent the structure of input sections and the data contained in an input section
recursive type(section_vals_type) function, pointer, public section_vals_get_subs_vals(section_vals, subsection_name, i_rep_section, can_return_null)
returns the values of the requested subsection
subroutine, public section_vals_get(section_vals, ref_count, n_repetition, n_subs_vals_rep, section, explicit)
returns various attributes about the section_vals
subroutine, public section_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)
returns the requested value
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
integer, parameter, public default_string_length
Definition kinds.F:57
Definition of physical constants:
Definition physcon.F:68
real(kind=dp), parameter, public kelvin
Definition physcon.F:165
Input control types for NEGF/SMEAGOL transport calculations.
subroutine, public read_smeagol_control(smeagol_control, smeagol_section)
Read SMEAGOL-related input parameters.
subroutine, public smeagol_control_release(smeagol_control)
release SMEAGOL control object
subroutine, public smeagol_control_create(smeagol_control)
allocate control options for SMEAGOL calculation
Utilities for string manipulations.
subroutine, public integer_to_string(inumber, string)
Converts an integer number to a string. The WRITE statement will return an error message,...
All kind of helpful little routines.
Definition util.F:14