# H6 Supercell
# Generates a 6 atom Hydrogen supercell with the multiplicity of 1:2:3 (x:y:z)

   prtcif   1       # If set to 1, a CIF file is output with the crystallographic data for the present run (cell size shape and atomic positions)

ndtset 2 # There will be two datasets here: SCF run and the band structure

# Dataset 2 : the band structure
iscf2    -2
getden2  -1 # get charge density from the 1st run
kptopt2  -5 # band structure plot with 5 intervals
ndivk2   10 10 1 10 10 # number of divisors for each interval

kptbounds2  0.0  -0.5  0.0 # Y point
            0.0  0.0  0.0  # Gamma point
            0.0  0.5  0.0  # Y point
            0.0  0.0  -0.5 # Z point
            0.0  0.0  0.0  # Gamma
            0.0  0.0  0.5  # Z point

tolwfr2  1.0d-12
enunit2  1             # Will output the eigenenergies in eV 

#Common input data

      ixc   2       # 2 => LDA

#Starting approximation for the unit cell
    acell   3.0  6.0  9.0     # [Bohr]

    rprim   1    0    0   
            0    1    0   
            0    0    1   
                          
chkprim   0 # do not check for primitive cell

#Definition of the atom types and atoms
 ntypat   1
  znucl   1
  natom   6
  typat   1 1 1 1 1 1

#Atomic positions in REDUCED coordinates

   xred
          0.0  0.0  0.0
          0.0  0.0  1/3
          0.0  0.0  2/3
          0.0  0.5  0.0
          0.0  0.5  1/3
          0.0  0.5  2/3

#  fband 0 # In case fband is 0.0d0, the code computes from the pseudopotential
          # files and the geometry data contained in the input file, the number 
          # of electrons present in the system. Then, it computes the minimum 
          # number of bands that can accomodate them, and use that value for _nband_

#Definition of the plane wave basis set
   ecut  10.0            # Maximum kinetic energy cutoff (Hartree)
pawecutdg 25 # PAW - Energy CUToff for the Double Grid

#Definition of the k-point grid
  ngkpt   3 2 1          # 3x2x1 Monkhorst-Pack grid
nshiftk   1              # Use one copy of grid only (default)
 shiftk   0.0  0.0  0.0  # Unshifted K-mesh

#Definition of the self-consistency procedure
 diemac   9.0            # Model dielectric preconditioner
   iscf   7              # PAW compatible Pulay mixing of the potential based on the npulayit previous iterations
  nstep   999            # Maxiumum number of SCF iterations
 tolvrs   1.0d-6         # tolerance for potential residual


## After modifying the following section, one might need to regenerate the pickle database with runtests.py -r
#%%<BEGIN TEST_INFO>
#%% [setup]
#%% executable = abinit
#%% test_chain = tfold2bloch_1.in, tfold2bloch_2.in
#%% [files]
#%% files_to_test = 
#%%   tfold2bloch_1.out, tolnlines=35, tolabs=1.0e-5, tolrel=2.0e-02
#%% psp_files = H-LDA-uspp.paw 
#%% [paral_info]
#%% max_nprocs = 2
#%% [extra_info]
#%% authors = O. Rubel
#%% keywords = FOLD2BLOCH
#%% description = 
#%%   H6 Supercell
#%%   Generates a 6 atom Hydrogen supercell with the multiplicity of 1:2:3 (x:y:z)
#%%   Produce WFK file to be analyzed with fold2bloch
#%%<END TEST_INFO>
