# H6 Supercell
# Generates a 6 atom Hydrogen supercell with the multiplicity of 1:2:3 (x:y:z), and computes the band structure.

 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 variables

#Definition of 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, as we are specifically using a supercell in this tutorial.

#Definition of the atom types and pseudopotentials
 ntypat   1
 znucl    1
 pp_dirpath "$ABI_PSPDIR"
 pseudos "Pseudodojo_paw_pw_standard/H.xml"

#Definition of the atoms
 natom   6
 typat   1 1 1 1 1 1
 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

#Numerical parameters of the calculation : planewave basis set and k point grid
 ecut      20.0          # Maximum kinetic energy cutoff (Hartree)
 pawecutdg 40            # PAW - Energy CUToff for the Double 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

#Parameters for the SCF procedure
 diemac    9.0            # Model dielectric preconditioner
  nstep    100            # Maximum number of SCF iterations
 tolvrs    1.0d-6         # tolerance for potential residual

##############################################################
# This section is used only for regression testing of ABINIT #
##############################################################
#%%<BEGIN TEST_INFO>
#%% [setup]
#%% executable = abinit
#%% test_chain = tfold2bloch_1.abi, tfold2bloch_2.abi
#%% [files]
#%% files_to_test = 
#%%   tfold2bloch_1.abo, tolnlines=38, tolabs=2.0e-4, tolrel=2.0e-02
#%% [paral_info]
#%% max_nprocs = 2
#%% [extra_info]
#%% authors = O. Rubel
#%% keywords = FOLD2BLOCH, PAW
#%% description = 
#%%   H6 Supercell
#%%   Generates a 6 atom Hydrogen supercell with the multiplicity of 1:2:3 (x:y:z)
#%%   Produces a WFK file to be analyzed with fold2bloch
#%%<END TEST_INFO>
