# Zinc-blende GaAs (2 atoms per unit cell),
#    using HGH psps.
#    Test the computation of the Berry phase.
#    Grid sampling is very rough, for speed.
#    8 dataset, testing all combinations of
#    location of wfs (memory or disk), spin polarisation,
#    use (or non-use) of time-reversal symmetry.
#    Test case provided by M. Veithen

#Definition of the unit cell
#***************************
   acell 3*10.67695686
   rprim 0  0.5 0.5
         0.5 0  0.5
         0.5 0.5 0

ndtset 8

#Definition of the atoms
#**********************
   ntypat 2
   znucl 31 33
   ixc 1
   natom 2
   typat 1 2
   xcart 0    0    0
           3*2.6692392150
#            3*2.6792392150

#Definition of the plane wave basis set
#**************************************
   ecut 1
   nshiftk 1
   shiftk 3*0.0
   nbdbuf 0

#Definition of the SCF cycle
#***************************
   nstep 200
   diemac 12.0

#Dataset1: wavefunctions + density in the irreductible BZ
#********************************************************
   prtden1 1
   ngkpt1 2 2 2
   kptopt1 1
   toldfe1 1.0d-12


#Dataset2: grid 4 2 2 in the whole BZ + polarisation (all wf in core memory)
#***************************************************
   berryopt2 1
   nberry2 1
   bdberry2 1 4
   kberry2 1 0 0
   iscf2 -2
   nband2 4 
   kptopt2 3
   ngkpt2 4 2 2
   getden2 1
   tolwfr2 1.0d-12
   istwfk2 16*1          ! Insist on full storage mode
 

#Dataset3: grid 4 2 2 in the whole BZ + polarisation (all wf on disk)
#***************************************************
   berryopt3  1
   nberry3 1
   bdberry3 1 4
   kberry3 1 0 0
   iscf3 -2
   nband3 4 
   kptopt3 3
   ngkpt3 4 2 2
   getden3 1
   tolwfr3 1.0d-12
   istwfk3 16*1          ! Insist on full storage mode


#Dataset4: grid 4 2 2 in half the BZ using time-reversal symetry + polarisation (all wf in core memory)
#*******************************************************************************
   berryopt4  1
   nberry4 1
   bdberry4 1 4
   kberry4 1 0 0
   iscf4 -2
   nband4 4 
   kptopt4 2
   ngkpt4 4 2 2
   getden4 1
   tolwfr4 1.0d-12
   istwfk4 12*1          ! Insist on full storage mode


#Dataset5: grid 4 2 2 in half the BZ using time-reversal symetry + polarisation (all wf on disk)
#*******************************************************************************
   berryopt5  1
   nberry5 1
   bdberry5 1 4
   kberry5 1 0 0
   iscf5 -2
   nband5 4 
   kptopt5 2
   ngkpt5 4 2 2
   getden5 1
   tolwfr5 1.0d-12
   istwfk5 12*1          ! Insist on full storage mode


#Dataset6: polarised calculation
#*******************************
   nsppol6 2      spinmagntarget6  0.0d0
   nspden6 2
   prtden6 1
   ngkpt6 2 2 2
   kptopt6 1
   toldfe6 1.0d-12


#Dataset7: grid 4 2 2 in the whole BZ + polarisation (all wf in core memory)
#***************************************************
   nsppol7 2      spinmagntarget7  0.0d0
   nspden7 2
   berryopt7 1
   nberry7 1
   bdberry7 1 4 1 4
   kberry7 1 0 0
   iscf7 -2
   nband7 4 
   kptopt7 3
   ngkpt7 4 2 2
   getden7 6
   tolwfr7 1.0d-12
   istwfk7 16*1          ! Insist on full storage mode
 

#Dataset8: grid 4 2 2 in the whole BZ + polarisation (all wf on disk)
#***************************************************
   nsppol8 2      spinmagntarget8  0.0d0
   nspden8 2
   berryopt8 1
   nberry8 1
   bdberry8 1 4 1 4
   kberry8 1 0 0
   iscf8 -2
   nband8 4 
   kptopt8 3
   ngkpt8 4 2 2
   getden8 6
   tolwfr8 1.0d-12
   istwfk8 16*1          ! Insist on full storage mode


## After modifying the following section, one might need to regenerate the pickle database with runtests.py -r
#%%<BEGIN TEST_INFO>
#%% [setup]
#%% executable = abinit
#%% [files]
#%% files_to_test = tsv3_03.out, tolnlines=0, tolabs=0.0, tolrel=0.0, fld_options=-medium
#%% psp_files= 31ga.hgh, 33as.hgh 
#%% [paral_info]
#%% max_nprocs = 1
#%% [extra_info]
#%% keywords = NC
#%% authors = M. Veithen
#%% description = 
#%%  Zinc-blende GaAs (2 atoms per unit cell),
#%%  using HGH psps.
#%%  Test the computation of the Berry phase.
#%%  Grid sampling is very rough, for speed.
#%%  8 dataset, testing all combinations of
#%%  location of wfs (memory or disk), spin polarisation,
#%%  use (or non-use) of time-reversal symmetry.
#%%<END TEST_INFO>
