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