# _== Convergency and starting
# DATASET 1: LDA 
# DATASET 2: LDA+DMFT
ndtset 2
jdtset 1 2
prtvol    4
pawprtvol 3
getwfk -1

##### CONVERGENCE PARAMETERS
nstep1   30
nstep2   1
ecut      16 # low cutoff !
pawecutdg 60
tolvrs 1.0d-7
nband     23
occopt 3 tsmear 2000 K
#npulayit 30

##### PHYSICAL PARAMETERS
nspinor 1
nsppol  2
nspden  2
natom 5 ntypat 3 typat 1 2 3 3 3 
znucl  23.0 38.0 8.0
# V Sr O*3
xred 0.00 0.00 0.00
     0.50 0.50 0.50 
     0.50 0.00 0.00 
     0.00 0.50 0.00 
     0.00 0.00 0.50 
acell   3*7.2605
rprim 1.0 0.0 0.0
      0.0 1.0 0.0
      0.0 0.0 1.0 

# == Points k and symetries
kptopt 4
kptrlatt 3 0 0 0 3 0 0 0 3 # insufficient nb of k-points.
nshiftk 4
shiftk 1/2 1/2 1/2
       1/2 0.0 0.0
       0.0 1/2 0.0
       0.0 0.0 1/2
istwfk *1

# == LDA+DMFT
usedmft1 0
usedmft2 1
dmftbandi 21 # t2g bands only
dmftbandf 23 # t2g bands only
#dmft_nwlo 200 # log frequency are not used when dmft_solv=6 or 7
dmft_nwli 100
dmft_iter 1
dmftcheck 0  
dmft_rslf 0
dmft_mxsf 0.7
dmft_dc 1
dmft_t2g 1   # special value for t2g only calculation.
dmft_tolfreq 0.01
dmftctqmc_triqs_nleg 30

# == CTQMC
dmft_solv 7 # Rotationally invariant interaction with TRIQS/CTHYB Monte Carlo code.
dmftqmc_l 201
dmftqmc_n 1.d6
dmftqmc_therm 10000

# == LDA+U
usepawu     1  #  For density matrix printout.
dmatpuopt  1   # The density matrix: the simplest expression.
lpawu  2 -1 -1
upawu1  0.00  0.0  0.0  eV
upawu2  3.1333333333333333  0.0  0.0  eV
f4of2_sla3  0.0  0.0  0.0 
jpawu2  0.7583333333333333  0.0  0.0  eV

## After modifying the following section, one might need to regenerate the pickle database with runtests.py -r
#%%<BEGIN TEST_INFO>
#%% [setup]
#%% executable = abinit
#%% need_cpp_vars = HAVE_TRIQS
#%% [files]
#%% files_to_test =
#%%                  t01.out,  tolnlines =2, tolabs =1.1e-06, tolrel = 2.0e-03, fld_options=-medium ;
#%% psp_files = 23v.paw, 38sr.paw, 8o.2.paw
#%% [paral_info]
#%% nprocs_to_test = 4
#%% max_nprocs = 4
#%% [NCPU_4]
#%% files_to_test = 
#%%   t99_MPI4.out, tolnlines = 0, tolabs = 0.0, tolrel = 0.0, fld_options = -medium;
#%%   t99_MPI4o_DS2_Legendre_coefficients.dat, tolnlines = 0, tolabs = 0.0, tolrel = 0.0, fld_options = -medium
#%% [extra_info]
#%% authors = B. Amadon, V. Planes
#%% keywords = PAW, DMFT, CTQMC, TRIQS
#%% description = Test CT-QMC within DMFT in ABINIT and QMC solver from TRIQS for VSrO3 NSCF over density
#%%<END TEST_INFO>
