INIT_load.F Source File


Source Code

!
! License-Identifier: GPL
!
! Copyright (C) 2006 The Yambo Team
!
! Authors (see AUTHORS file for details): AM
!
subroutine INIT_load(defs,en,q,k,X,Xw,Dip)
 !
 use drivers,       ONLY:infile_editing
 use pars,          ONLY:schlen,SP
 use electrons,     ONLY:levels,nel,filled_tresh,nel_cond
 use zeros,         ONLY:G_mod_zero
 use frequency,     ONLY:w_samp
 use it_tools,      ONLY:it
 use it_m,          ONLY:initdefs,E_unit,G_unit,T_unit,Bfield_unit,MEM_unit,&
&                        Time_unit,I_unit,Angle_unit,V_parallel,initmode,V_ph,&
&                        V_RL,V_kpt,V_sc,V_qp,V_coul,V_io,V_general,V_resp,&
&                        V_real_time,V_nl_optics,V_fl_optics
 use X_m,           ONLY:Chi_mode,X_t,q_plus_G_direction,Q_Shift_Order,&
&                        global_gauge,Chi_linalg_mode, &
&                        X_terminator_Kind,X_terminator_E,X_DbGd_percentual
 use DIPOLES,       ONLY:DIPOLE_t
 use com,           ONLY:grid_paths
 use stderr,        ONLY:slash
 use QP_m,          ONLY:QP_cg_percent,QP_G_damp,QP_G_mprop,QP_solver,&
&                        QP_n_G_bands,QP_ng_Sx,QP_ng_Sc,QP_ng_SH,QP_ng_Vxc,GW_terminator_E,GW_terminator_Kind,&
&                        QP_G_er,QP_G_ir,QP_G_dr,QP_Sc_steps,QP_G_solver,&
&                        QP_dSc_delta,QP_G_Zoom_treshold,GF_energy_range_mode
 use LIVE_t,        ONLY:nhash
 use wave_func,     ONLY:wf_ng,wf_ng_1st_BZ,rho_map_thresh,WF_load_mode
use D_lattice,     ONLY:Tel,non_periodic_directions,molecule_position,Bose_Temp,Boltz_Temp
 use R_lattice,     ONLY:ng_closed,QP_states_k,nXkibz,k_GRIDS_string,RIM_W_ng,rimw_type,Dirac_v_f,rimw_check, &
&                        bz_samp,RIM_ng,RIM_epsm1,eps_env,RIM_id_epsm1_reference,&
&                        RIM_n_rand_pts,RIM_sphe_n_rand_pts,cyl_ph_radius,box_length,cut_geometry,ws_cutoff
 use BS,            ONLY:BSE_mode,BSE_prop,BSK_mode,BS_eh_en,BS_eh_win,BS_q,BS_bands,BS_bands_frozen_ch,&
&                        BS_n_g_W,BS_n_g_exch,BS_n_g_fxc,BSE_L_kind,BS_K_cutoff,BSK_IO_mode,BSE_dipole_geometry,&
&                        BSE_disk_IO,BSK_IO_shape
 use BS_solvers,    ONLY:BSS_mode,Haydock_threshold,Haydock_iterIO,BSS_n_freqs,BSS_target_E,BSS_trange_E,&
&                        BSS_dr,BSS_er,BSS_E_dir,BSS_Q_dir,BSS_damp_reference,BSS_inversion_mode,BSS_damp_type,&
&                        BSS_Wd,K_INV_EPS,K_INV_PL,BSS_n_eig_Input,BSS_first_eig,Haydock_iterMAX,BSS_ldiago_solver
#if defined _SLEPC && !defined _NL
 use BS_solvers,    ONLY:BSS_slepc_extraction,BSS_slepc_ncv,BSS_slepc_tol,BSS_slepc_maxit,&
 &                       BSS_slepc_precondition,BSS_slepc_approach,BSS_slepc_mpd,BSS_slepc_matrix_format
#endif
 use TDDFT,         ONLY:FXC_n_g_corr,FXC_per_memstps,FXC_LRC_alpha,FXC_LRC_beta, &
&                        FXC_SVD_digits,FXC_PF_alpha,FXC_mode
 use ACFDT,         ONLY:ACFDT_n_lambda,ACFDT_n_freqs,ACFDT_E_range
 use functions,     ONLY:bose_E_cut
 use parallel_m,    ONLY:n_log_CPUs
 use IO_m,          ONLY:DBs_IO_control_string,DBs_FRAG_control_string
#if defined _QED
 use QP_m,          ONLY:QP_QED_ng
#endif
#if defined _SC || defined _RT || defined _QED
 use hamiltonian,   ONLY:H_potential,H_ref_bands_frozen
 use collision_ext, ONLY:COLLISIONS_cutoff,COLL_bands,COLL_bands_frozen,COLL_bands_frozen_ch
#endif
 use QP_m,          ONLY:SC_E_threshold
#if defined _SC
 use QP_m,          ONLY:SC_band_mixing
 use SC,            ONLY:SC_iterations,SC_up_W_iters,&
&                        SC_rho_threshold,SC_cycle_mixing,&
&                        SC_bands,SC_preconditioning,OEP_approx,&
&                        SC_neq_kind,SC_mu,SC_last_coh_it,&
&                        SC_bands_frozen,SC_bands_frozen_ch
#endif
#if defined _RT
 use RT_control,    ONLY:CARR_RT_IO_t,OBS_RT_IO_t,OUTPUT_RT_IO_t,Gless_RESTART_RT_IO_t,Floquet_order,&
&                        CACHE_OBS_INTERVAL_time_INPUT,RT_BSE_Occ_Mode,Gless_RT_IO_t,Vbands_RT_IO_t
 use RT_occupations,ONLY:RT_RTA_temp,RT_RTA_chem
 use RT_lifetimes,  ONLY:RT_life_extrap_times_INPUT
 use real_time,     ONLY:RT_step, Integrator_name, RAD_LifeTime, Phase_LifeTime, &
&                        NE_tot_time,RT_bands,RT_bands_frozen_ch,RT_deph_range,  &
&                        RT_ave_dephasing,RT_eh_en,RT_scatt_tresh,Gr_kind,       &
&                        NE_MEM_treshold,NE_time_step_update_jump_INPUT,         &
&                        two_alpha,DbGd_EE_percent,NE_time_step_update_jump,     &
&                        NE_initial_time_step_update,NE_step_update_treshold,    &
&                        RT_MAX_step,RAD_magnification,RT_bands_frozen,          &
&                        RT_deph_deg_thresh,RT_step_manual_prefactor,NE_time_step_update_manual
 use fields,        ONLY:n_ext_fields_max,n_ext_fields
 use plasma,        ONLY:PLASMA_redux_percent
#endif
#if defined _NL
 use nl_optics,     ONLY:NL_bands,NL_damping,NL_correlation,NL_er,n_frequencies,NL_LRC_alpha, &
&                        NL_verb_name,n_angles,NL_rot_axis,NL_bands_frozen,NL_bands_frozen_ch,max_angle
#endif 
#if defined _FL
 use fl_optics,     ONLY:FL_Chi_order,FL_Chi_thr_1,FL_Chi_thr_2,FL_Chi_thr_3,FL_deg_thrs,FL_deg_lift,&
&                        FL_solver_mode,FL_S_inv_mode,FL_max_iterations,FL_beta,FL_add_mode,&
&                        FL_ild,FL_Pade_damping
#endif 
#if defined _NL | defined _SC
 use fields,        ONLY:Efield
#endif 
#if defined _SC
 use magnetic,      ONLY:MAG_B,MAG_hamiltonian_type,MAG_radius,MAG_gauge,MAG_psi,MAG_theta
#endif
#if defined _ELPH 
 use ELPH,          ONLY:QP_PH_n_G_bands,elph_nQ_used,elph_Ham_ik,elph_Ham_bands,elph_branches,&
&                               RES_tresh,FAN_deltaE_treshold,DW_deltaE_treshold,E_kpq_sh_fact,gkkp_db
 use EXCPH,         ONLY:EXCPH_states,EXCPH_sum,Lout_path,L_damping,EXC_q0,alphaQ,DmType, &
&                        EXCPH_deltaE_treshold,EXCPH_kthresh
 use D_lattice,     ONLY:Boltz_Temp
#endif
#if defined _OPENMP
 use openmp,        ONLY:n_threads_X,n_threads_SE,n_threads_SX,n_threads_RT,n_threads_DIP,n_threads_K,&
&                        n_threads_NL,n_threads_OSCLL
#endif
 use gpu_m,         ONLY:GPU_test_dim
 use PHOTOLUM,      ONLY:PL_weights
#if defined _MEM_CHECK
 use y_memory,      ONLY:MEM_treshold
#endif
#if defined _PHEL
 use PHEL,          ONLY:PH_Self_Energy_mode,PH_DbGd_points,PH_Q,PHEL_broad_factor,PHEL_fit_Energies
#endif
 use levels_mirror_m, ONLY: num_user_fields
 !
 implicit none
 !
 type(initdefs)::defs
 type(levels)  ::en          
 type(bz_samp) ::q,k
 type(X_t)     ::X(5)
 type(DIPOLE_t)::Dip
 type(w_samp)  ::Xw(5)
 !
 ! Work Space
 !
 integer  :: wf_ng_closed
#if defined _RT
 integer  :: i_field
#endif
 real(SP) :: IO_times(3)
 logical  :: l_USER_fields(num_user_fields)
 !
 ! RunLevels...
 !==============
 !
 ! ... list of USER fields 
 call LEVELS_get_user_fields(l_USER_fields)
 !
 ! ... from C_driver
 !
 call INIT_C_driver_runlevels(defs)
 !
 ! ... derived
 !=============
 call it('r',defs,'chi',     '[R][CHI] Dyson equation for Chi.')
 call it('r',defs,'bse',     '[R][BSE] Bethe Salpeter Equation.')
 call it('r',defs,'tddft',   '[R][K] Use TDDFT kernel')
 call it('r',defs,'cohsex',  '[R][Xp] Coulomb Hole Screened EXchange')
 call it('r',defs,'Xx',       '[R][Xx] Dynamical Response Function')
 call it('r',defs,'em1s',    '[R][Xs] Statically Screened Interaction')
 call it('r',defs,'em1d',    '[R][X] Dynamically Screened Interaction')
 call it('r',defs,'ppa',     '[R][Xp] Plasmon Pole Approximation for the Screened Interaction')
 call it('r',defs,'mpa',     '[R][Xm] Multi Pole Approximation for the Screened Interaction')
 !
#if defined _RT_SCATT
 call it('r',defs,'el_el_scatt','[R] Electron-Electron Scattering')
#endif
#if defined _RT_SCATT && _ELPH
 call it('r',defs,'el_ph_scatt','[R] Electron-Phonon   Scattering')   
#endif
#if defined _RT_SCATT && _PHEL
 call it('r',defs,'ph_el_scatt','[R] Phonon-Electron Scattering')   
#endif
#if defined _RT_SCATT
 call it('r',defs,'el_photon_scatt','[R] Electron-Photon   Scattering')   
#endif
#if defined _ELPH 
 call it('r',defs,'el_ph_corr',    '[R] Electron-Phonon Correlation')   
 call it('r',defs,'ExcGkkp',       '[R][EXCPH] Exciton-Phonon Matrix Elements')
 call it('r',defs,'ExcPhOptics',   '[R][EXCPH] Exciton-Phonon Optics')
 call it('r',defs,'ExcPhLifeT',    '[R][EXCPH] Exciton-Phonon Life-Times')
#endif
#if defined _PHEL 
 call it('r',defs,'ph_el_corr',    '[R] Phonon-Electron Correlation')   
#endif
 call it('r',defs,'el_el_corr',    '[R] Electron-Electron Correlation') 
#if defined _QED
 call it('r',defs,'el_photon_corr','[R] Electron-Photon Correlation') 
#endif
 !
 !=======
 ! CPU's
 !=======
 !
#if defined _MPI 
 call CPU_structure_load(defs)
#endif
 !
 ! Cutoff on the density
 ! ng_closed (cutoff on the density) should never be lower than wf_ng (cutoff on the WFs)
 ! Indeed, the two cutoffs should be correlated. However, it is not in the code
 ! Here there is a simple check, just in case
 call it(defs,'MaxGvecs','[INI] Max number of G-vectors planned to use',ng_closed,unit=G_unit,verb_level=V_RL)
 if (ng_closed<wf_ng) then
   wf_ng=ng_closed
   wf_ng_1st_BZ=ng_closed
 endif
 !
 ! Here the it interface closes the value of wf_ng when initmode==2
 ! Such operation is pointless, because WFs are defined w.r.t. spheres centered at k
 ! The lowering of the cutoff for the WFs should be done accordingly.
 ! Moreover, if the cutoff is not lowered, the closing may increase wf_ng
 ! The if below is coded to prevent such issue
 wf_ng_closed=wf_ng
 call it(defs,'FFTGvecs','[FFT] Plane-waves',wf_ng_closed,G_unit,verb_level=V_RL)
 if (wf_ng_closed<wf_ng) then
   wf_ng=wf_ng_closed
   wf_ng_1st_BZ=wf_ng_closed
 endif
 !
 ! Basics
 !
 call it(defs,'StdoHash','[IO] Live-timing Hashes',nhash,verb_level=V_io)
 call it(defs,'Gthresh' ,'[INI] Accuracy for energy shell separation [-1. automatic]',G_mod_zero,verb_level=V_RL)
 call it(defs,'NonPDirs','[X/BSS] Non periodic cartesian directions (X,Y,Z,XY...)',non_periodic_directions,verb_level=V_resp)
 call it(defs,'MolPos',  '[X/BSS] Molecule coord in supercell, 0.5 is the middle',molecule_position,verb_level=V_resp)
 call it(defs,'K_grids', '[KPT] Select the grids (X=response, S=sigma, C=collisions, B=bse) [default X S C B]',&
&                        k_GRIDS_string,verb_level=V_kpt)
 call it(defs,'IkSigLim','[KPT] QP K-points indices range',QP_states_k,verb_level=V_kpt)
 call it(defs,'IkXLim',  '[KPT] X grid last k-point index',nXkibz,verb_level=V_kpt)
 call it(defs,'Nelectro','Electrons number',nel,verb_level=V_general)
 call it(defs,'NelCond' ,'Number of electrons in conduction (Quasi-Fermi distribution)',nel_cond,verb_level=V_general)
 call it(defs,'ElecTemp','Electronic Temperature',Tel,T_unit,verb_level=V_general)
 call it(defs,'OccTresh','Occupation threshold (metallic bands)',filled_tresh,verb_level=V_general)
#if defined _ELPH 
 call it(defs,'BoseTemp','Bosonic Temperature',Bose_Temp,T_unit)
#else
 call it(defs,'BoseTemp','Bosonic Temperature',Bose_Temp,T_unit,verb_level=V_general)
#endif
 call it(defs,'EXCTemp', 'Excitonic Temperature (for luminescence spectra and EXCPH)',Boltz_Temp,T_unit)
 call it(defs,'BoseCut', 'Finite T Bose function cutoff',bose_E_cut,verb_level=V_general)
#if defined _ELPH 
 call it('f',defs,'BSEscatt', '[KPT] Compute extended k/q scattering',verb_level=V_kpt)
call it(defs,'ElPhRndNq',  '[ELPH] Read random Q-points',elph_nQ_used,verb_level=V_ph) 
 call it(defs,'EkpqShFact', '[ELPH] E(k+q) Interpolation shell factor (used only with double-grid)',E_kpq_sh_fact,verb_level=V_ph)
#endif
 call it('f',defs,'WFbuffIO','[IO] Wave-functions buffered I/O',verb_level=V_io) 
 call it('f',defs,'NoDiagSC','New setup for non-diagonal supercells') 
 call it('f',defs,'DegFix','Force the code to impose the energy levels to respect their degeneracy',verb_level=V_general) 
 !
 ! Parallel Setup
 !
#if defined _OPENMP
 call it(defs,'K_Threads',       '[OPENMP/BSK] Number of threads for response functions',n_threads_K,verb_level=V_parallel)
 call it(defs,'X_Threads',       '[OPENMP/X] Number of threads for response functions',n_threads_X,verb_level=V_parallel)
 call it(defs,'DIP_Threads',     '[OPENMP/X] Number of threads for dipoles',n_threads_DIP,verb_level=V_parallel)
 call it(defs,'OSCLL_Threads',    '[OPENMP/X] Number of threads for Oscillators',n_threads_OSCLL,verb_level=V_parallel)
 call it(defs,'SX_Threads',      '[OPENMP/HF] Number of threads for the X self-energy',n_threads_SX,verb_level=V_parallel)
 call it(defs,'SE_Threads',      '[OPENMP/GW] Number of threads for self-energy',n_threads_SE,verb_level=V_parallel)
 call it(defs,'RT_Threads',      '[OPENMP/RT] Number of threads for real-time',n_threads_RT,verb_level=V_parallel)
 call it(defs,'NL_Threads',      '[OPENMP/NL] Number of threads for nl-optics',n_threads_NL,verb_level=V_parallel)
#endif
#if defined _MPI 
 call it(defs,'NLogCPUs',     '[PARALLEL] Live-timing CPU`s (0 for all)',n_log_CPUs,verb_level=V_parallel)
#endif
 !
 ! I/O
 !
 call it(defs,'DBsIOoff', &
&             '[IO] Space-separated list of DB with NO I/O. DB=(DIP,X,HF,COLLs,J,GF,CARRIERs,OBS,W,SC,BS,ALL)',&
&             DBs_IO_control_string,verb_level=V_io)
 call it(defs,'DBsFRAGpm', &
&             '[IO] Space-separated list of +DB to FRAG and -DB to NOT FRAG. DB=(DIP,X,W,HF,COLLS,K,BS,QINDX,RT,ELPH,SC,ALL)',&
&             DBs_FRAG_control_string,verb_level=V_io)
 call it(defs,"WF_load_mode",'[WF-IO] Default distribution mode ("all"/"on-the-fly")',&
&            WF_load_mode,verb_level=V_io)
 !
 ! S_xc
 !
 call it(defs,'LifeTrCG', '[GW] [o/o] Lifetime transition reduction',QP_cg_percent)
 call it(defs,'HARRLvcs', '[HA] Hartree     RL components',QP_ng_SH,G_unit)
 call it(defs,'EXXRLvcs', '[XX] Exchange    RL components',QP_ng_Sx,G_unit)
 call it('f',defs,'UseNLCC',  '[XC] If present, add NLCC contributions to the charge density ',verb_level=V_qp)
 call it(defs,'VXCRLvcs', '[XC] XCpotential RL components',QP_ng_Vxc,G_unit)
 call it(defs,'CORRLvcs', '[GW] Correlation RL components [if -1 uses all the G-vectors of W_{G,Gp}]',QP_ng_Sc,G_unit)
#if defined _QED
 call it(defs,'QEDRLvcs', '[QED] Vector-Potential G-vectors components',QP_QED_ng,G_unit)
#endif
#if defined _SC
 call it(defs,'GbndRnge', '[GW] G[W] bands range',QP_n_G_bands,verb_level=V_sc)
 call it('f',defs,'UseEbands', '[GW] Force COHSEX to use empty bands',verb_level=V_sc)
 call it('f',defs,'ALLGexx', '[XX] Force the use all RL vectors for the exchange part',verb_level=V_sc)
 call it('f',defs,'ALLGHAR', '[HA] Force the use all RL vectors for the Hartree potential',verb_level=V_sc)
#else
 call it(defs,'GbndRnge', '[GW] G[W] bands range',QP_n_G_bands)
 call it('f',defs,'UseEbands', '[GW] Force COHSEX to use empty bands',verb_level=V_qp)
#endif
#if defined _PHEL || _ELPH 
 call it(defs,'GDamping', '[GW] G[W] damping',QP_G_damp,E_unit)
#else
 call it(defs,'GDamping', '[GW] G[W] damping',QP_G_damp,E_unit,verb_level=V_qp)
#endif
 call it(defs,'GDmRnge',  '[GW] G_gw damping range',QP_G_dr,E_unit)
 call it(defs,'G_mprop',  '[GW] G[W] propagator order',QP_G_mprop,verb_level=V_qp)
 call it(defs,'dScStep',  '[GW] Energy step to evaluate Z factors',QP_dSc_delta,E_unit,verb_level=V_qp)
 call it(defs,'DysSolver','[GW] Dyson Equation solver ("n","s","g","q")',QP_solver,protect=.FALSE.,case="a")
 call it(defs,'GsampType','[GW] Type of sampling ("ra" FF-RA, "1l" MPA-1l, "2l" MPA-2l)',QP_G_solver)
 call it(defs,'GEnSteps', '[GW] Green`s Function (GF) energy steps',QP_Sc_steps)
 call it(defs,'GEnRnge',  '[GW] GF energy range',QP_G_er,E_unit)
 call it(defs,'GImRnge',  '[GW] GF imaginary range',QP_G_ir,E_unit)
 call it(defs,'GEnMode',  '[GW] GF energy mode ("centered","absolute"). "Centered" around the bare energy',&
&        GF_energy_range_mode,verb_level=V_qp)
 call it(defs,'GTermKind','[GW] GW terminator ("none","BG" Bruneval-Gonze,"BRS" Berger-Reining-Sottile)', GW_terminator_Kind)
 call it(defs,'GTermEn',  '[GW] GW terminator energy (only for kind="BG")', GW_terminator_E,E_unit,verb_level=V_qp)
 call it('f',defs,'NewtDchk',  '[GW] Test dSc/dw convergence',verb_level=V_qp)
 call it('f',defs,'ExtendOut', '[GW] Print all variables in the output file',verb_level=V_qp)
 call it('f',defs,'QPsymmtrz', '[GW] Force symmetrization of states with the same energy',verb_level=V_qp)
 !
 ! Xx Xs Xd Xp Xm
 !
 call it(defs,'Chimod',       '[X] IP/Hartree/ALDA/LRC/PF/BSfxc',Chi_mode,protect=.FALSE.,case="A")
 call it(defs,'ChiLinAlgMod', '[X] inversion/lin_sys,cpu/gpu',Chi_linalg_mode,verb_level=V_resp,case="A")
 call Xload(X(2),Xw(2))
 call Xload(X(3),Xw(3))
 call Xload(X(4),Xw(4))
 call Xload(X(5),Xw(5))
 call it(defs,'XTermKind','[X] X terminator ("none","BG" Bruneval-Gonze)',X_terminator_Kind,verb_level=V_resp)
 call it(defs,'XTermEn',  '[X] X terminator energy (only for kind="BG")',X_terminator_E,E_unit,verb_level=V_resp)
 call it('f',defs,'DrClassic', '[X] Use a classical model for the drude term',verb_level=V_resp)
 call it('f',defs,'mpERdb',  '[Xm] Write to disk MPA poles and residues')
 call it('f',defs,'WriteXo', '[X] Write on the-fly the IP response function',verb_level=V_resp)
 !
 ! BSE/BSK
 !
 call it(defs,'BSEmod',    '[BSE] resonant/retarded/coupling',BSE_mode,case="a")
 call it(defs,'Lkind',     '[BSE,X] bar(default)/full/tilde',BSE_L_kind,verb_level=V_resp)
 call it(defs,'BSKIOshape','[BSK] "1D_linear"/"2D_standard"',BSK_IO_shape,verb_level=V_resp)
 call it(defs,'BSEdiskIO','[BSE] high(restart always) |medium(restart only corr.) |low(writes at the end)|none',BSE_disk_IO)
 call it(defs,'BSEBands','[BSK] Bands range',BS_bands)
 call it(defs,'BSEFrozenBands','[BSK] Bands excluded from BSE construction',BS_bands_frozen_ch,verb_level=V_resp)
 call it(defs,'BSENGBlk','[BSK] Screened interaction block size [if -1 uses all the G-vectors of W_{G,Gp}]',BS_n_g_W,G_unit)
 call it(defs,'BSENGexx','[BSK] Exchange components',BS_n_g_exch,G_unit)
 call it(defs,'BSENGfxc','[BSK] Fxc components', BS_n_g_fxc,G_unit,verb_level=V_resp)
 call it(defs,'RhoMapThresh','[BSK] Density cutoff for <Fxc> integrals region',rho_map_thresh,verb_level=V_resp)
 call it(defs,'FxcMode', '[TDDFT] ("G-XXX" or "R-XXX" with XXX=def/full/cut_Gmax/cut_GmGp") ',FXC_mode,verb_level=V_resp)
 call it(defs,'BSEEhEny','[BSK] Electron-hole energy range',BS_eh_en,E_unit,verb_level=V_resp)
 call it(defs,'BSKCut',  '[BSK] Cutoff on the BSE Kernel, 0=full 1=none',BS_K_cutoff,verb_level=V_resp)
 call it(defs,'BSKmod',  '[BSE] IP/Hartree/HF/ALDA/SEX/BSfxc',BSK_mode,protect=.FALSE.,case="A")
 call it(defs,'Gauge' ,  '[BSE/X] Gauge (length|velocity)',global_gauge,verb_level=V_resp)
 call it('f',defs,'NoCondSumRule' ,'[BSE/X] Do not impose the conductivity sum rule in velocity gauge',verb_level=V_resp)
 call it('f',defs,'MetDamp' ,      '[BSE] Define '//slash//'w+=sqrt('//slash//'w*('//slash//'w+i'//slash//'eta))',verb_level=V_resp)
 call it(defs,'BSSmod',    '[BSS] (h)aydock/(d)iago/(o)ld-diago/(s)lepc/(i)nversion/(c)hase'&
&       ,BSS_mode,protect=.FALSE.)
 call it(defs,'BSEprop',   '[BSS] Can be any among abs/jdos/kerr/asymm/anHAll/magn/dich/photolum/esrt/MEspin/MEorb',BSE_prop)
 call it(defs,'BSEdips',   '[BSS] Can be "trace/none" or "xy/xz/yz" to define off-diagonal rotation plane',BSE_dipole_geometry)
 call it(defs,'BSSldiaLib','[BSS] Library used with ldiago solver `(s)scalapack/(e1)elpa1/(e2)elpa2`',BSS_ldiago_solver)
 call it(defs,'BSSInvMode','[BSS] Inversion solver modality `(f)ull/(p)erturbative`',BSS_inversion_mode)
 call it(defs,'BSSInvPFratio','[BSS] Inversion solver. Ratio between the number of frequencies solved pert/full',&
&             K_INV_EPS%PERT_FULL_ratio)
 call it(defs,'BLongDir',  '[BSS] [cc] Electric Field versor',BSS_E_dir)
 !call it(defs,'EFieldDir',  '[BSS] [cc] Electric Field versor',BSS_E_dir)
 call it(defs,'QPropDir',   '[BSS] [cc] Propagation versor Field',BSS_Q_dir,verb_level=V_resp)
 call it(defs,'BEnRange',  '[BSS] Energy range',BSS_er,E_unit)
 call it(defs,'BDmType',  '[BSS] Damping type (Lorentzian | Gaussian)',BSS_damp_type)
 call it(defs,'BDmRange',  '[BSS] Damping range',BSS_dr,E_unit)
 call it(defs,'BSHayTrs',  '[BSS] Relative [o/o] Haydock threshold. Strict(>0)/Average(<0)',Haydock_threshold)
 call it(defs,'BSHayItrMAX','[BSS] MaX number of Haydock iterations.',Haydock_iterMAX,verb_level=V_resp)
 call it(defs,'BSHayItrIO', '[BSS] Iterations between IO for Haydock restart.',Haydock_iterIO,verb_level=V_resp)
 call it(defs,'BSEPSInvTrs', '[BSS EPS] Inversion threshold. Relative[o/o](>0)/Absolute(<0)',K_INV_EPS%treshold)
 call it(defs,'BSPLInvTrs',  '[BSS PL] Inversion threshold',K_INV_PL%treshold)
 call it(defs,'BEnSteps',  '[BSS] Energy steps',BSS_n_freqs)
 call it(defs,'DrudeWBS',  '[BSE] Drude plasmon',BSS_Wd,E_unit,verb_level=V_resp)
 call it('f',defs,'FxcLibxc','[BSK] force computing Fxc via libxc',verb_level=V_resp)
 call it('f',defs,'WehDiag', '[BSK] diagonal (G-space) the eh interaction',verb_level=V_resp)
 call it('f',defs,'WehCpl',  '[BSK] eh interaction included also in coupling')
 call it('f',defs,'WRbsWF',  '[BSS] Write to disk excitonic WFs')
 call it(defs,'BSSNEig',       '[SLEPC/DIAGO] Number of eigenvalues to compute',BSS_n_eig_Input)
 call it(defs,'BSSFirstEig',  '[DIAGO] Index of the first eigenvalues to compute',BSS_first_eig,verb_level=V_resp)
 call it(defs,'BSSEnRange',   '[DIAGO] Target energy to find eigenvalues',BSS_trange_E,E_unit,verb_level=V_resp)
#if defined _SLEPC && !defined _NL
 call it(defs,'BSSSlepcApproach','[SLEPC] Approach ("Krylov-Schur","Generalized-Davidson","Jacobi-Davidson")',&
&                                                                          BSS_slepc_approach,verb_level=V_resp)
 call it(defs,'BSSEnTarget',   '[SLEPC] Target energy to find eigenvalues',BSS_target_E,E_unit,verb_level=V_resp)
 call it(defs,'BSSSlepcMaxIt', '[SLEPC] Maximum number of iterations',BSS_slepc_maxit)
 call it(defs,'BSSSlepcPrecondition','[SLEPC] Precondition technique (none|preonly+jacobi|bcgs+jacobi)',&
 &                                                                              BSS_slepc_precondition,verb_level=V_resp)
 call it(defs,'BSSSlepcExtraction','[SLEPC] Extraction technique (ritz|harmonic)',BSS_slepc_extraction,verb_level=V_resp)
 call it(defs,'BSSSlepcNCV',   '[SLEPC] Dimension of the subspace',BSS_slepc_ncv,verb_level=V_resp)
 call it(defs,'BSSSlepcMPD',   '[SLEPC] Maximum allowed dimension',BSS_slepc_mpd,verb_level=V_resp)
 call it(defs,'BSSSlepcTol',   '[SLEPC] Tolerance for the iterative solver',BSS_slepc_tol,verb_level=V_resp)
 call it(defs,'BSSSlepcMatrixFormat','[SLEPC] Matrix type (shell|explicit)',&
 &                                                BSS_slepc_matrix_format,verb_level=V_resp)
#endif
#if !defined _SC
 call it('f',defs,'ALLGexx', '[BSS] Force the use of all RL vectors for the exchange part',verb_level=V_resp)
#endif
 call it('f',defs,'BSHayTer','[BSS] Terminate Haydock continuous fraction',verb_level=V_resp)
 call it('f',defs,'Reflectivity', '[BSS] Compute reflectivity at normal incidence',verb_level=V_resp)
 call it('f',defs,'BSSPertWidth', '[BSS] Include QPs lifetime in a perturbative way',verb_level=V_resp)
 call it('f',defs,'BSSInvKdiag','[BSS] In the inversion solver keep the diagonal kernel in place',verb_level=V_resp)
 !
 ! F_xc
 !
 call it(defs,'FxcGRLc',  '[TDDFT] XC-kernel RL size',FXC_n_g_corr,G_unit)
 call it(defs,'LRC_alpha','[TDDFT] LRC alpha factor',FXC_LRC_alpha)
 call it(defs,'PF_alpha','[TDDFT] PF alpha factor approximation: CUR/EMP/RBO/JGM',FXC_PF_alpha)
 call it(defs,'LRC_beta', '[TDDFT] LRC beta factor',FXC_LRC_beta,verb_level=V_resp)
 !
 ! Optics: Q=0 directions average
 !
 call it('f',defs,'OptDipAverage', '[Xd] Average Xd along the non-zero Electric Field directions',verb_level=V_resp)
 !
 ! Optics: large Q momenta
 !
 call it(defs,'Qdirection', '[Xd] Transferred momentum direction (iku)',q_plus_G_direction,verb_level=V_resp)
 call it(defs,'QShiftOrder','[Xd] Pick-up the (QShiftOrder)th q+G vector',Q_Shift_Order,verb_level=V_resp)
 !
 ! BSE properties: kerr, magnons, absorption, ...
 !
 call it(defs,'PL_weights','[PL] [cc] Weights of the cartesian components of the emitted radiation',PL_weights,verb_level=V_resp)
 !
#if defined _RT
 !
 ! BSE: Real-Time
 !
 call it(defs,'RTOccMode','[RT-BSE] (K)ernel/(R)esiduals. BSE components to be corrected with the TD occupations',&
&             RT_BSE_Occ_Mode,verb_level=V_real_time)
 call it('f',defs,'ForceEqTrans','[RT-BSE] Use only equilibrium transitions',verb_level=V_real_time)
 !
#endif
 !
 ! Double Grid(s)
 !
 call it(defs,'DbGdQsize', '[X,DbGd][o/o] Percentage of the total DbGd transitions to be used',X_DbGd_percentual,verb_level=V_resp)
 !
 ! RIM
 !
 call it(defs,'Em1Anys', '[RIM] X Y Z Static Inverse dielectric matrix Anisotropy',RIM_epsm1,verb_level=V_RL)
 call it(defs,'IDEm1Ref','[RIM] Dielectric matrix reference component 1(x)/2(y)/3(z)',&
&                         RIM_id_epsm1_reference,verb_level=V_RL)
 call it(defs,'RandQpts','[RIM] Number of random q-points in the BZ',RIM_n_rand_pts)
 call it(defs,'RandQptsSphe','[RIM] Number of random q-points in the BZ',RIM_sphe_n_rand_pts)
 call it(defs,'RandGvec','[RIM] Coulomb interaction RS components',RIM_ng,G_unit)
 call it('f',defs,'QpgFull', '[F RIM] Coulomb interaction: Full matrix',verb_level=V_RL)
 !
 ! RIM-W
 !
 call it(defs,'RandGvecW','[RIM-W] Screened interaction RS components (smaller than X matrix)',RIM_W_ng,G_unit)
 call it(defs,'rimw_type','[RIM-W] Screened interaction limit metal/semiconductor/2D Dirac',rimw_type)
 call it(defs,'Dirac_v_f','[RIM-W] In case of 2D Dirac, specify the Fermi velocity of the cone (10^6 m/s)',&
 &                                                                                 Dirac_v_f,verb_level=V_coul)
 call it('f',defs,'rimw_check','[RIM-W] Debug option to check W, XV and auxiliary functions',verb_level=V_coul)
 !
 ! CUTOFF
 !
 call it(defs,'EpsEnv',   '[COL] Static Inverse dielectric matrix of environment',eps_env,verb_level=V_RL)
 call it(defs,'CUTGeo',   '[CUT] Coulomb Cutoff geometry: box/cylinder/sphere/ws/slab X/Y/Z/XY..',cut_geometry)
 call it(defs,'CUTBox',   '[CUT] [au] Box sides',box_length)
 call it(defs,'CUTRadius','[CUT] [au] Sphere/Cylinder radius',cyl_ph_radius)
 call it(defs,'CUTwsGvec','[CUT] WS cutoff: number of G to be modified',ws_cutoff)
 call it('f',defs,'CUTCol_test','[CUT] Perform a cutoff test in R-space',verb_level=V_RL)
 !
 ! S_xc
 !
 call it(defs,'GreenFTresh','[GW] [o/o] Threshold to define the new zoomed energy range',QP_G_Zoom_treshold,verb_level=V_qp)
 call it('f',defs,'QPExpand',   '[F GW] The QP corrections are expanded all over the BZ',verb_level=V_qp)
 call it('f',defs,'GreenF2QP',  '[F GW] Use real axis Green`s function to define the QPs',verb_level=V_qp)
 call it('f',defs,'OnMassShell','[F GW] On mass shell approximation',verb_level=V_qp)
 !
#if defined _RT
 !
 ! Real Time dynamics
 !
 call it(defs,'RTBands',    '[RT] Bands',RT_bands)
 call it(defs,'RTFrozenBands','[RT] Frozen Bands list',RT_bands_frozen_ch,Verb_level=V_real_time)
 !
 ! This call is a temporary fix due to the multiple definition of energy ranges.
 ! The call is needed to align the different values based on the USER definition.
 !
 call it(defs,'TwoAlpha',   '[RT] C_nk ~ alpha*Gamma_nk^2 ',two_alpha,Verb_level=V_real_time)
 call it(defs,'GrKind',     '[RT] G-ret kind: Lorentzian (QP)/ Hyperbolic QP_secant (HS)',Gr_kind,Verb_level=V_real_time)
 call it(defs,'RADLifeTime','[RT] Radiative life-time (if negative RADLifeTime=Phase_LifeTime)', &
&         RAD_LifeTime,unit=Time_unit(1))
 call it(defs,'RADmagnific','[RT] Radiative life-time magnification',RAD_magnification,Verb_level=V_real_time)
 call it(defs,'PhLifeTime', '[RT] Constant Dephasing Time',Phase_LifeTime,unit=Time_unit(1))
 call it(defs,'DephTRange', '[RT] Time range in which Dephasing is applied',RT_deph_range,unit=Time_unit(1),Verb_level=V_real_time)
 call it(defs,'DephEThresh', '[RT] Threshold on the energy difference between two states to dephase them',&
         &   RT_deph_deg_thresh,unit=E_unit,Verb_level=V_real_time)
 !
 ! Dynamics
 !
 call it(defs,'RTstep',      '[RT] Real Time step length',RT_step,unit=Time_unit(3))
 call it(defs,'NETime',      '[RT] Simulation Time',NE_tot_time,unit=Time_unit(2))
 call it(defs,'dTupdateTimeSet','[RT] Time for manual deltaT update',NE_time_step_update_manual,&
&                            unit=Time_unit(1),verb_level=V_real_time)
 call it(defs,'dTupdateTime','[RT] Initial Time for deltaT update (active only if non-zero) ',NE_initial_time_step_update,&
&                            unit=Time_unit(1),verb_level=V_real_time)
 call it(defs,'dTupdateJump','[RT] Time between two deltaT updates',  NE_time_step_update_jump_INPUT,&
&                            unit=Time_unit(1),verb_level=V_real_time)
 call it(defs,'dTupdateTresh','[RT][o/o] Threshold of deltaT updates',  NE_step_update_treshold ,verb_level=V_real_time)
 call it(defs,'dT_MAX',      '[RT] Maximum value for the time-dependent dT',  RT_MAX_step ,verb_level=V_real_time,unit=Time_unit(1))
 call it(defs,'dT_SET',      '[RT] Prefactor for manual dT update',  RT_step_manual_prefactor,verb_level=V_real_time)
 call it(defs,'Integrator',  '[RT] Integrator. Use keywords space separated  ( "EULER/EXPn/INV" "SIMPLE/RK2/RK4/HEUN" "RWA") ',&
&              Integrator_name)
 !
#if defined _NL
 IO_times=(/CARR_RT_IO_t%INTERVAL_time_INPUT,Vbands_RT_IO_t%INTERVAL_time_INPUT,OUTPUT_RT_IO_t%INTERVAL_time_INPUT/)
#elif defined _RT
 IO_times=(/CARR_RT_IO_t%INTERVAL_time_INPUT,Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT,OUTPUT_RT_IO_t%INTERVAL_time_INPUT/)
#endif
 call it(defs,'IOtime',      '[RT] Time between two consecutive I/O (CARRIERs - GF/WF - OUTPUT)',IO_times,unit=Time_unit(1))
 CARR_RT_IO_t%INTERVAL_time_INPUT             =IO_times(1)
 Gless_RESTART_RT_IO_t%INTERVAL_time_INPUT    =IO_times(2)
 Gless_RT_IO_t%INTERVAL_time_INPUT            =IO_times(2)
 Vbands_RT_IO_t%INTERVAL_time_INPUT           =IO_times(2)
 OUTPUT_RT_IO_t%INTERVAL_time_INPUT           =IO_times(3)
 !
 IO_times(1:2)=(/CACHE_OBS_INTERVAL_time_INPUT,OBS_RT_IO_t%INTERVAL_time_INPUT/)
 call it(defs,'IOCachetime', '[RT] Time between two consecutive (caching - I/O) of OBSERVABLES',IO_times(1:2),unit=Time_unit(1),&
 &       verb_level=V_real_time)
 CACHE_OBS_INTERVAL_time_INPUT  =IO_times(1)
 OBS_RT_IO_t%INTERVAL_time_INPUT=IO_times(2)
 !
 call it(defs,'RTehEny',     '[RT] Electron-hole energy range',RT_eh_en,unit=E_unit,verb_level=V_real_time)
 !
 ! ... flags ...
 call it('f',defs,'DephCVonly',    '[RT] Dephase only in the CV channel',Verb_level=V_real_time)
 call it('f',defs,'RTskipImposeN', '[RT] Conservation of N, dN  imposed by hand on-the-fly',Verb_level=V_real_time)
 call it('f',defs,'RTEvalEnergy',  '[RT] Energy variation computed on the fly',Verb_level=V_real_time)
 call it('f',defs,'RTEvalEntropy', '[RT] Entropy variation computed on the fly',Verb_level=V_real_time)
 call it('f',defs,'SaveGhistory',  '[RT] Save the history of the green function',Verb_level=V_real_time)
 call it('f',defs,'RTgradk',       '[RT] Compute the term grad_k(rho).E',Verb_level=V_real_time)
 !
 ! ... updates ...
 call it('f',defs,'RTUpdateSOC',     '[RT] Update the SOC interaction',Verb_level=V_real_time)
 call it('f',defs,'RTUpdateE',     '[RT] Update the Energy levels on-the-fly',Verb_level=V_real_time)
 !
 call it('f',defs,'RTEqScatt',     '[RT] Include Gamma0f0 term in scattering',Verb_level=V_real_time)
 call it('f',defs,'RTImpForMet',   '[RT] Impose structure optimized for metals',Verb_level=V_real_time)
 call it('f',defs,'RTzeroTempRef', '[RT] Use zero temperature Fermi distribution as reference',Verb_level=V_real_time)
 call it('f',defs,'RTskipPHabs',   '[RT] Skip e-p Lifetimes due to phonon absorption',Verb_level=V_real_time)
 !
 ! Scattering
 !
 call it('f',defs,'LifeExtrapolation',    '[RT] Skipped Lifetimes are extrapolated')
 call it(defs,'LifeExtrapSteps',   '[RT] Step length between and inside two consecutive groups of lifetimes',&
&                                  RT_life_extrap_times_INPUT,unit=Time_unit(1))
 call it('f',defs,'RelaxTimeApprox',    '[RT] Skipped Lifetimes are extrapolated',Verb_level=V_real_time)
 call it(defs,'RTAtemp',   '[RT] Temperatures for relaxation time approximation',&
&              RT_RTA_temp,unit=T_unit,Verb_level=V_real_time)
 call it(defs,'RTAchem',   '[RT] Chemical potentials for relaxation time approximation',&
&              RT_RTA_chem,unit=E_unit,Verb_level=V_real_time)
 call it(defs,'ScattTresh', '[RT] Threshold on the eh energy to compute the scattering',RT_scatt_tresh,&
&                           unit=E_unit,verb_level=V_real_time)
 !
 ! EE scattering
 !
 call it(defs,'PlasmaPerc', '[RT] % (0-100) of PLASMA eh pair reduction. =0 correspond to no reduction.',&
&        PLASMA_redux_percent,Verb_level=V_real_time)
 call it(defs,'EERimPerc',  '[RT] EE Double Grid (0-100): % of the points used in EE scatt',DbGd_EE_percent,Verb_level=V_real_time)
 call it('f',defs,'RTskipImposeE',   '[RT] Conservation of E (e-e channel) imposed by hand on-the-fly')
 !
 ! ELPH
 !
 call it(defs,'MemTresh',   '[RT] Threshold on the decay of the retarded GF',NE_MEM_treshold,verb_level=V_real_time)
 call it('f',defs,'UseDebyeE',   '[RT] Use a single Debye energy for all phonon modes',verb_level=V_real_time)
 call it('f',defs,'RT_T_evol',   '[RT] Use a complete Time evolution instead of the CCA',verb_level=V_real_time)
 !
 call it('f',defs,'InducedField','[RT] Include induced field in coupling and current',verb_level=V_real_time)
 call it('f',defs,'VelGaugeCorr','[RT] Correct the non local term of the pseudo with the vector potential',verb_level=V_real_time)
 !
 ! OLD / EXPERIMENTAL
 !
 call it(defs,'RTAveDeph',    '[RT] Dephasing for all elements not included in RTDePhMatrix', &
&                             RT_ave_dephasing,verb_level=V_real_time,unit=Time_unit(1))
 call it('f',defs,'LifeFitTemp','[RT] Fit on the fly  lifetimes ratio to a Fermi distribution',verb_level=V_real_time)
 !
#endif
 !
#if defined _NL
 !
 ! Non-linear Optics
 !
 call it(defs,'NLBands',      '[NL] Bands range',NL_bands)
 call it(defs,'NLFrozenBands','[NL] Frozen Bands list',NL_bands_frozen_ch,Verb_level=V_nl_optics)
 call it(defs,'NLverbosity',  '[NL] Verbosity level (low | high)',NL_verb_name) 
 call it(defs,'NLstep',       '[NL] Time step length',RT_step,unit=Time_unit(1),Verb_level=V_nl_optics)
 call it('f',defs,'NLStepDiv','[NL] Set the time step to be a divisor of the field period ')
 call it(defs,'NLtime',       '[NL] Simulation Time',NE_tot_time,unit=Time_unit(1))
 call it(defs,'NLintegrator', '[NL] Integrator ("EULEREXP/RK2/RK4/RK2EXP/HEUN/INVINT/CRANKNIC")',Integrator_name)
 call it(defs,'NLCorrelation','[NL] Correlation ("IPA/HARTREE/TDDFT/LRC/LRW/JGM/SEX/LSEX/LHF") ',NL_correlation)
 call it(defs,'NLLrcAlpha',   '[NL] Long Range Correction',NL_LRC_alpha)
 call it(defs,'NLDamping',    '[NL] Damping (or dephasing)',NL_damping,unit=E_unit)
 call it(defs,'NLEnRange',    '[NL] Energy range (for loop on frequencies NLEnSteps/=0',NL_er,E_unit)
 call it(defs,'NLAngSteps',   '[NL] Angular steps (if NLAngSteps/=0 field versor will be ignored)',n_angles)
 call it(defs,'NLMaxAng',     '[NL] Max angle in degree (default 360 degree)',max_angle)
 call it(defs,'NLrotaxis',    '[NL] Rotation axis (for the loop on angles NLAngSteps/=0)',NL_rot_axis)
 call it(defs,'NLEnSteps',    '[NL] Energy steps for the loop on frequencies',n_frequencies)
 call it('f',defs,'UseDipoles','[NL] Use Covariant Dipoles (just for test purpose)',verb_level=V_nl_optics)
 call it('f',defs,'TestOSCLL','[NL] Test Oscillators vs Full Collisions [for testing purposes]',verb_level=V_nl_optics)
 call it('f',defs,'FrSndOrd','[NL] Force second order in Covariant Dipoles',verb_level=V_nl_optics)
 call it('f',defs,'FrNoPerP','[DIP] Force not periodic polarization (for strong fields, HHG, etc..)',verb_level=V_nl_optics)
 call it('f',defs,'NoComprCOLL','[NL] Load collisions in double-precision and do not remove small elements (default false)',&
&  verb_level=V_nl_optics)
 call it('f',defs,'NoUseSymm','[NL] Do not use residual-symms for polar/current (def false)', &
&  verb_level=V_nl_optics)
 call it('f',defs,'EvalCurrent','[NL] Evaluate the current')
 call it('f',defs,'SaveVbhistory',  '[RT] Save the history of the wave-functions function',Verb_level=V_nl_optics)
 call it(defs,'FLOrder',  '[NL] Fourier Order of Floquet Analysis',Floquet_order, Verb_level=V_nl_optics)
! call it('f',defs,'SaveVbfloquet',  '[RT] Save wave-functions for Floquet Analysis',Verb_level=V_nl_optics)
 !
#endif
 !
#if defined _FL
 !
 ! Floquet optics
 !
 call it(defs,'Xorder',    '[FL] Max order of the response/exc functions',FL_Chi_order)
 call it(defs,'Xadd_mode', '[FL] Additional modes to ensure convergence',FL_add_mode,verb_level=V_fl_optics)
 call it(defs,'Xthresh_1', '[FL] Self-consistent threshold on 1st order response function',FL_Chi_thr_1)
 call it(defs,'Xthresh_2', '[FL] Self-consistent threshold on 2nd order response function',FL_Chi_thr_2)
 call it(defs,'Xthresh_3', '[FL] Self-consistent threshold on 3rd order response function',FL_Chi_thr_3)
 call it(defs,'FL_solver',    '[FL] Eigenproblem solver mode ("(D)IAGONALIZATION")',FL_solver_mode,verb_level=V_fl_optics)
 call it(defs,'FL_deg_thresh','[FL] Degeneracy threshold in KS band structure',FL_deg_thrs,verb_level=V_fl_optics)
 call it(defs,'FL_deg_lift',  '[FL] Degeneracy lifting of KS band structure',FL_deg_lift,verb_level=V_fl_optics)
 call it(defs,'S_inv_mode',   '[FL] Inversion method ("(N)UMERICAL/(P)ERTURBATIVE")',FL_S_inv_mode,verb_level=V_fl_optics)
 call it(defs,'FL_beta',     '[FL] Mixing beta',FL_beta,verb_level=V_fl_optics)
 call it(defs,'FL_max_it',   '[FL] Maximum number of iterations',FL_max_iterations,verb_level=V_fl_optics)
 call it(defs,'FL_2D_ild',   '[FL] Interlayer distance [Bohr] (-1 for bulk)',FL_ild,verb_level=V_fl_optics)
 call it(defs,'FL_Pade',   '[FL] Additional Floquet-mode-dependent damping',FL_Pade_damping,unit=E_unit,verb_level=V_fl_optics)
 !
#endif
 !
#if defined _RT || defined _NL
 !
 ! External fields
 !
 if (initmode==4.and..not.infile_editing) n_ext_fields=0
 do i_field=1,n_ext_fields_max
   call Afield(defs,i_field)
 enddo
 !
#endif
 !
#if defined _SC
 call it(defs,'ExtF_Dir',             '[NL ExtF] Versor',Efield(1)%versor)
 call it(defs,'ExtF_Int',             '[NL ExtF] Intensity',Efield(1)%intensity,unit=I_unit)
 call it(defs,'ExtF2_Dir',             '[NL ExtF] Versor',Efield(2)%versor,verb_level=V_nl_optics)
 call it(defs,'ExtF2_Int',             '[NL ExtF] Intensity',Efield(2)%intensity,unit=I_unit,verb_level=V_nl_optics)
 call it('f',defs,'FrSndOrd','[NL] Force second order in Covariant Dipoles',verb_level=V_sc)
#endif
 !
 ! GPU test
 !
 call it(defs,'GPUdim',  '[GPU] Matrix Dimension',GPU_test_dim)
 !
#if defined _SC
 call it(defs,'Hamiltonian',   '[MAG] Hamiltonian kind [pauli,landau,all]',MAG_hamiltonian_type,protect=.FALSE.)
 call it(defs,'B_Field',       '[MAG] Magnetic field modulus',MAG_B,unit=Bfield_unit)
 call it(defs,'B_psi',         '[MAG] Magnetic field psi angle',MAG_psi,unit=Angle_unit(1),verb_level=V_sc)
 call it(defs,'B_theta',       '[MAG] Magnetic field theta angle',MAG_theta,unit=Angle_unit(1),verb_level=V_sc)
 call it(defs,'B_Gauge',       '[MAG] Gauge ("SYMM"etric, "X_ASYMM", "Y_ASYMM" or "Z_ASYMM"etric)',MAG_gauge,verb_level=V_sc)
 call it('f',defs,'PhaseTrick','[MAG] Phase trick for a better diagonalization',verb_level=V_sc)
 call it(defs,'B_radius',      '[MAG] Magnetic flux radius',MAG_radius,verb_level=V_sc)
#endif
 !
#if defined _MEM_CHECK
 !
 ! Memory
 !
 call it(defs,'MEM_tresh',     '[MEMORY] Threshold on traced memory allocations/deallocations',MEM_treshold,verb_level=V_general,&
&                                                                                             unit=MEM_unit(1))
 !
#endif
 !
 ! QP ctl 
 !
 call INIT_QP_ctl_load(defs,1)
 call INIT_QP_ctl_load(defs,2)
 call INIT_QP_ctl_load(defs,3)
 !
#if defined _PHEL 
 call it(defs,'PHDbGdsize', '[PHEL] Size of subset of double grid k-points',PH_DbGd_points)
 call it(defs,'PHELQpts',   '[PHEL] Q-points considered',PH_Q)
 call it(defs,'PHELTrans',  '[PHEL] Energy window around W_ph to select transitions (units of GDamping)',PHEL_broad_factor)
 call it(defs,'PHEL_QPH_En','[PHEL] Energy points to get the Quasi-Phonon solution (units of the bare PH energy)',PHEL_fit_Energies)
 call it(defs,'PH_SE_mode', '[PHEL] Self-Energy scattering mode ("bare-bare","dressed-bare","dressed-dressed")',PH_Self_Energy_mode)
#endif
 !
#if defined _RT
 !
 ! RT ctl 
 !
 call INIT_RT_ctl_load(defs,1)
 call INIT_RT_ctl_load(defs,2)
 call INIT_RT_ctl_load(defs,3)
 !
#endif
 !
 ! F_xc
 !
 call it(defs,'FxcMEStps','[TDDFT] [o/o] Memory energy steps',&
&                         FXC_per_memstps,verb_level=V_resp)
 call it(defs,'FxcSVdig','[TDDFT] Keep SV that are within FxcSVdig digits',&
&                         FXC_SVD_digits,verb_level=V_resp)
 call it('f',defs,'FxcRetarded', '[TDDFT] Retarded TDDFT kernel',verb_level=V_resp)
 !
 ! BSE
 !
 call it(defs,'BSehWind','[BSK] [o/o] E/h coupling pairs energy window',BS_eh_win,verb_level=V_resp)
 call it(defs,'BSEQptR', '[BSK] Transferred momenta range',BS_q,verb_level=0)
 call it(defs,'BDmERef', '[BSS] Damping energy reference',BSS_damp_reference,E_unit,verb_level=V_resp)
 !
 ! Xx
 !
 call Xload(X(1),Xw(1))
 !
 ! ACFDT
 !
 call it(defs,'AC_n_LAM', '[ACFDT] Coupling Constant GL-grid points',ACFDT_n_lambda)
 call it(defs,'AC_n_FR',  '[ACFDT] Integration frequency points',ACFDT_n_freqs)
 call it(defs,'AC_E_Rng', '[ACFDT] Imaginary axis 2nd & 3rd energy points',ACFDT_E_range,E_unit)
 !
 ! DIPOLES
 !
 call it(defs,'DipBands',       '[DIP] Bands range for dipoles',Dip%ib,verb_level=V_resp)
 call it(defs,'DipQpts',        '[DIP] Qpts range for dipoles',Dip%iq,verb_level=V_resp)
 call it(defs,'DipoleEtresh',   '[DIP] Threshold in the definition of R=P/deltaE',Dip%Energy_threshold,&
&                                                                               verb_level=V_resp,unit=E_unit)
 call it(defs,'DipApproach',    '[DIP] [G-space v/R-space x/Covariant/Shifted grids/derk]',Dip%approach,verb_level=V_resp)
 call it(defs,'DipComputed',    '[DIP] [default R P V; extra P2 Spin Orb]',Dip%computed,verb_level=V_resp)
 call it(defs,'ShiftedPaths',   '[DIP] Shifted grids paths (separated by a space)',grid_paths,verb_level=V_resp)
 call it('f',defs,'DipPDirect', '[DIP] Directly compute <v> also when using other approaches for dipoles',verb_level=V_resp)
 call it('f',defs,'DipBandsALL','[DIP] Compute all bands range, not only valence and conduction',verb_level=V_resp)
#if defined _NL || defined _ELECTRIC
 call it('f',defs,'EvPolarization','[DIP] Evaluate Polarization (require DipApproach=Covariant)',verb_level=V_resp)
 call it('f',defs,'FrNoPerP','[DIP] Force not periodic polarization (for strong fields, HHG, etc..)')
#endif
#if defined _RT
 call it('f',defs,'SPINprojected', '[DIP] Project the spin dipoles in the c/v channels ',verb_level=V_real_time)
#endif
 !
 ! El-Ph
 !
#if defined _ELPH 
 call it(defs,'GphBRnge',  '[ELPH] G[W] bands range',QP_PH_n_G_bands)
 call it(defs,'ElPhModes', '[ELPH] Phonon modes included',elph_branches)
 call it(defs,'FANdEtresh','[ELPH] Energy threshold for Fan denominator',FAN_deltaE_treshold,unit=E_unit)
 call it(defs,'DWdEtresh', '[ELPH] Energy threshold for DW denominator',DW_deltaE_treshold,verb_level=V_ph,unit=E_unit)
 call it(defs,'GkkpDB',    '[ELPH] GKKP database (gkkp | gkkp_expanded | genFroh )',gkkp_db)
 !
 call it(defs,'ELPhExcStates', '[EXCPH] Incoming (external) exciton states',EXCPH_states)
 call it(defs,'ELPhExcSum',    '[EXCPH] Outgoing (virtual) exciton states',EXCPH_sum)
 call it(defs,'LoutPath',      '[EXCPH] Path of the outgoing L',Lout_path)
 call it(defs,'AlphaQ'       ,'[EXCPH] Excitonic band structure 2D distortion',alphaQ,verb_level=V_resp)
 call it(defs,'EXCLongDr'     ,'[EXCPH] Electric field versor for the excitons',EXC_q0)
 !
 call it('f',defs,'DbGdOnlyPh'   , '[EXCPH] Use Double-Grid only for phonon & 
& energies (do not interpolate excitons)',verb_level=V_resp)
 call it('f',defs,'ExtendOutput', '[EXCPH] Print additional output with q-resolved lifetimes and resonances')
 call it('f',defs,'DbGdWEIGHTs', '[EXCPH] Use Double-grid also for satellite &
&  weights and renormalization',verb_level=V_resp)
 call it(defs,'DmType',     '[EXCPH] Smearing type(Lorentzian | Gaussian | FermiDer)',DmType)
 call it('f',defs,'PLqres', '[EXCPH] Write contribution from each q-point')
 !
 ! Testing only zone <
 call it('f',defs,'ConstElph' , '[EXCPH] Set all electron-phonon matrix elements to one (for testing purpose)')
 call it('f',defs,'NoMatrxEl' , '[EXCPH] Set all  exciton-phonon matrix elements to one (for testing purpose)')
 call it('f',defs,'KeepDeg'   , '[EXCPH] Keep degenerate states (for testing purpose)')
 !
 call it('f',defs,'AbsElph', '[EXCPH] Module of elph matrix elements (for testing purpose)')
 call it('f',defs,'AbsExc',  '[EXCPH] Module of excitonic WFs (for testing purpose)')
 call it('f',defs,'HoleContributionOnly', '[EXCPH] Hole channel only (for testing purpose)')
 call it('f',defs,'ElectronContributionOnly',  '[EXCPH] Elec channel only (for testing purpose)')
 call it(defs,'MaxKShells', '[EXCPH] K-sum up to a max shell within k-radius in IKU (for testing purpose)',EXCPH_kthresh)
 ! Testing only zone >
 !
 call it(defs,'LDamping', '[EXCPH] Damping of exc-ph self-energy',L_damping,E_unit)
 call it(defs,'EXCPHdEtresh','[ELPH] Energy threshold for exc-ph denominator',EXCPH_deltaE_treshold,unit=E_unit)
 call it('f',defs,'ExcPhOffDiago', '[EXCPH] Exciton-Phonon off-diagonal self-energy')
 !
 call it(defs,'ElPhHBRnge','[ELPH] Hamiltonian bands range',elph_Ham_bands)
 call it(defs,'ElPhHKpt',  '[ELPH] Hamiltonian k-point',elph_Ham_ik)
 call it(defs,'REStresh',  '[ELPH] Residual threshold to report in output files',RES_tresh)
 call it('f',defs,'WRgFsq','[ELPH] Dump on file gFsq coefficients')
#endif
 ! 
 ! SC
 !
#if defined _SC
 !
 call it(defs,'SCBands',   '[SC] Bands',SC_bands)
 !
 call it(defs,'SCIter',    '[SC] SC Iterations',SC_iterations)
 call it(defs,'SCRhoTresh','[SC] Rho convergence threshold',SC_rho_threshold)
 call it(defs,'SC_precondition','[SC] Kind of preconditionin: thomas-fermi, simple, none',SC_preconditioning,verb_level=V_sc)
 call it(defs,'SCUpWIter', "[SC] Update W(q,G,G') every SCUpWIter iterations",SC_up_W_iters,verb_level=V_qp) 
 call it('f',defs,'Mean_Potential','[SC] Real-space Mean Potential',verb_level=V_sc)
 call it('f',defs,'SCnlMix','[SC] Use SC non-local mixing',verb_level=V_sc)
 call it('f',defs,'FrozeDensity','[NL] Do not update density (for testing purposes)',verb_level=V_sc)
 !
 ! SC [NEQ]
 !
 call it(defs,'SCneqKIND',  '[SC] Options are [contrained-occ/constrained-mu/matsubara]',SC_neq_kind,verb_level=V_sc)
 call it(defs,'SCmu',       '[SC] Reference / holes / electrons chem potential',SC_mu,unit=E_unit,verb_level=V_sc)
 call it(defs,'SCcohIt',    '[SC] Impose off-diagonal rho in the initial basis set for N iterations',SC_last_coh_it,verb_level=V_sc)
 ! 
 ! SC [common with RT]
 !
 call it(defs,'BandMix',   '[SC] Band mixing',SC_band_mixing)
 call it(defs,'SCmixing',  '[SC] SC Cycle Mixing (< 1.)',SC_cycle_mixing,verb_level=V_sc)
 call it('f',defs,'SCdiag','[SC] Diagonal approximation for the self-energy(WF unchaged)',verb_level=V_sc)
 !
#endif
 ! 
 call it(defs,'SCEtresh',  '[SC] Energy convergence threshold for SC-GW',SC_E_threshold,unit=E_unit,verb_level=V_qp)
 !
#if defined _SC || defined _RT || defined _QED
 !
 ! SC and RT common
 !
 call it(defs,'COLLBands',   '[COLL] Bands for the collisions',COLL_bands)
 call it(defs,'COLLFrozenBands','[COLL] Frozen Bands list',COLL_bands_frozen_ch,Verb_level=V_sc)
 !
 call it(defs,'HXC_Potential',  '[SC] SC HXC Potential',H_potential,protect=.FALSE.,case="A")
 call it(defs,'COLLCut',        '[SC,RT] Cutoff on the collisions, 0=full 1=none (default =0.0005)',&
 &                                                                   COLLISIONS_cutoff,verb_level=V_sc)
 call it('f',defs,'COLLBseMem', '[SC,RT] Minimize memory use in bse kernel conversion',verb_level=V_sc)
 !
#endif
 !
 !
#if defined _SC
 call it('f',defs,'OEPItSolver','[SC] Iterative solution instead of inversion of OEP')
 call it(defs,'OEPapprox','[SC] OEP approximation: n=none s=Slater k=KLI c=CED +w=Weighted',OEP_approx)
#endif
 !
 if (initmode==4) then
   !
   call LEVELS_frozen(en)
   call LEVELS_mirror_q(l_USER_fields,X,Dip)
   call LEVELS_mirror_bands(en,X,Dip,l_USER_fields)
 endif
 ! 
 contains 
   !
   subroutine Xload(X,wv)
     !
     use pars,   ONLY:SP
     use units,  ONLY:HA2EV
     !
     type(X_t):: X
     type(w_samp):: wv
     ! 
     ! Work Space
     ! 
     integer           ::i1,V_iq,V_DmRnge
     integer,parameter ::n_des=19
     character(8)      ::nms(n_des),sfx
     character(100)    ::des(n_des)
     character(schlen) ::lch1,lch2
     !
     nms=(/'GrFnTp','EnSamp','EnGrid','EnRnge','ImRnge','DmRnge','CGrdSp','ETStps','IntSol','EMStps',&
&          'DrudeW','LongDr','EhEngy','PPAPnt',&
&          'NGsBlk','QpntsR','BndsRn','DmERef','DmType'/)
     des(1) ='Green`s function (T)ordered,(R)etarded,(r)esonant,(a)ntiresonant [T, R, r, Ta, Ra]'
     des(2) ='Frequency sampling in the complex plane ("1l" one line, "2l" two lines)'
     des(3) ='Partition along the real axis ("ho" homogeneous, "lP" linear, "qP" quadratic, "cP" cubic)'
     des(4) ='Energy range'
     if (X%whoami==5) then
       des(4) ='Energy range; if 0.0 | -1.0 | half the maximum e-h pair included in X is used'
     endif
     des(5) ='Imaginary range'
     des(6) ='Damping range'
     des(7) ='[o/o] Coarse grid controller'
     des(8) ='Total Energy steps'
     des(9) ='MPA interpolation solver ("LA" linear algebra, "PT" Pade-Thiele, "PR" PT + pole refinement)'
     des(10)='[o/o] Memory Energy steps'
     des(11)='Drude plasmon'
     des(12)='[cc] Electric Field'
     des(13)='Electron-hole energy range'
     des(14)='PPA imaginary energy'
     des(15)='Response block size'
     des(16)='Transferred momenta'
     des(17)='Polarization function bands'
     des(18)='Damping reference energy'
     des(19)='Damping type (Lorentzian | Gaussian )'
     !
     do i1=1,n_des
       lch1=des(i1)
       lch2=nms(i1)
       if (X%whoami==1) sfx='Xx'
       if (X%whoami==2) sfx='Xs'
       if (X%whoami==3) sfx='Xd'
       if (X%whoami==4) sfx='Xp'
       if (X%whoami==5) sfx='Xm'
       write (des(i1),'(4a)')  '[',trim(sfx),'] ',trim(lch1)
       write (nms(i1),'(2a)')  lch2(1:6),trim(sfx)
     enddo
     !
     V_iq     = 0
     V_DmRnge = 0
     !
     if (.not.X%whoami==3.and.(.not.X%whoami==5.or.X%whoami==1)) then
       V_iq     = V_resp 
       V_DmRnge = V_resp
     endif
     !
     call it(defs,nms( 1),des( 1),X%ordering,verb_level=V_resp)
     call it(defs,nms( 2),des( 2),wv%samp_type,verb_level=0)
     call it(defs,nms( 3),des( 3),wv%samp_grid,verb_level=0) 
     call it(defs,nms( 4),des( 4),wv%er,E_unit,verb_level=0) 
     call it(defs,nms( 5),des( 5),wv%ir,E_unit,verb_level=0) 
     call it(defs,nms( 6),des( 6),wv%dr,E_unit,verb_level=V_DmRnge)
     call it(defs,nms( 7),des( 7),X%cg_percentual,verb_level=V_resp)
     call it(defs,nms( 8),des( 8),wv%n_freqs,verb_level=0)
     call it(defs,nms( 9),des( 9),wv%mpa_solver,verb_level=0) 
     call it(defs,nms(10),des(10),wv%per_memstps,verb_level=V_resp)
     call it(defs,nms(11),des(11),X%Wd,E_unit,verb_level=V_resp)
     call it(defs,nms(12),des(12),X%q0,verb_level=0)
     call it(defs,nms(13),des(13),X%ehe,E_unit,verb_level=V_resp)
     call it(defs,nms(14),des(14),X%ppaE,E_unit,verb_level=0)
     call it(defs,nms(15),des(15),X%ng,G_unit,verb_level=0)
     call it(defs,nms(16),des(16),X%iq,verb_level=V_iq)
     call it(defs,nms(17),des(17),X%ib,verb_level=0)
     call it(defs,nms(18),des(18),wv%damp_reference,E_unit,verb_level=V_resp)
     call it(defs,nms(19),des(19),wv%damp_type,verb_level=V_resp)
     !
   end subroutine
   !
end subroutine
!
!
#if defined _MPI 
!
subroutine CPU_structure_load(defs)
  use pars,          ONLY:schlen
  use it_tools,      ONLY:it
  use it_m,          ONLY:initdefs,V_parallel
  use parallel_m,    ONLY:n_CPU_str_max,CPU_structure,PARALLEL_default_mode
  !
  implicit none
  !
  type(initdefs)    :: defs
  !
  integer           :: i_s
  character(schlen) :: name,possible_fields
  !
  call it(defs,"PAR_def_mode",'[PARALLEL] Default distribution mode ("balanced"/"memory"/"workload"/"KQmemory")',&
&         PARALLEL_default_mode,verb_level=V_parallel)
  !
  do i_s=1,n_CPU_str_max 
    !
    if (i_s==1) possible_fields='(k,c,v)'     ! DIP
    if (i_s==2) possible_fields='(q,g,k,c,v)' ! X_and_IO
    if (i_s==3) possible_fields='(q,g,k,c,v)' ! X
    if (i_s==4) possible_fields='(k,eh,t)'    ! BS
    if (i_s==5) possible_fields='(q,qp,b)'    ! SE
    if (i_s==6) possible_fields='(k,b,q,qp)'  ! RT
    if (i_s==7) possible_fields='(p,d) '      ! SLK
    if (i_s==8) possible_fields='(w,k) '      ! NL
    if (i_s==9) possible_fields='(k) '        ! BZ
    if (i_s==10)possible_fields='(q,k,b) '    ! PH_SE
    if (i_s==11)possible_fields='(k,b) '      ! OSCLL
    if (i_s==12)possible_fields='(q,g,qp,b)'  ! SX
    !
    if (len_trim(CPU_structure(i_s)%Short_Description)==0) cycle
    name=trim(CPU_structure(i_s)%Short_Description)//"_CPU"
    call it(defs,trim(name),'[PARALLEL] CPUs for each role',&
&           CPU_structure(i_s)%CPU_string,verb_level=V_parallel)
    name=trim(CPU_structure(i_s)%Short_Description)//"_ROLEs"
    call it(defs,trim(name),'[PARALLEL] CPUs roles '//trim(possible_fields),&
&           CPU_structure(i_s)%ROLE_string,verb_level=V_parallel)
    name=trim(CPU_structure(i_s)%Short_Description)//"_nCPU_LinAlg_INV"
    call it(defs,trim(name),'[PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)',&
&           CPU_structure(i_s)%nCPU_lin_algebra_INV,verb_level=V_parallel)
    name=trim(CPU_structure(i_s)%Short_Description)//"_nCPU_LinAlg_DIAGO"
    call it(defs,trim(name),'[PARALLEL] CPUs for Linear Algebra (if -1 it is automatically set)',&
&           CPU_structure(i_s)%nCPU_lin_algebra_DIAGO,verb_level=V_parallel)
  enddo
  !
end subroutine
   !
#endif

📚 Documentation Pages
⏱️ Real-Time
🔗 Code API