#######################################################################
#Test strain perturbation in paw.  AlAS crystal generation of database
#######################################################################

ndtset 3 jdtset 1 2 3

#First dataset : self-consistent run with limited convergence
  prtwf1 1 
  nline1 5
 tolwfr1 1.0d-20
 
#Dataset 2 : ddk perturbation
  getwfk2   1
    iscf2  -3
   nline2   10
  kptopt2   3
    nqpt2   1
     qpt2   0 0 0
  rfelfd2   2
   rfdir2   1 1 1
  tolwfr2   1.0d-20
   prtwf2   1

#Dataset 12 : response function strain perturbation calculation
  rfstrs3  3
  rfphon3  1
  rfelfd3  3
 rfatpol3  1 4
   rfdir3  1 1 1
    nqpt3  1
     qpt3  0 0 0
  kptopt3  3
  getwfk3  1
  getddk3  2
  tolvrs3 1.0d-10

#######################################################################
#Common input variables

#Definition of the unit cell
  acell  7.5389648144E+00  7.5389648144E+00  1.2277795374E+01 

  rprim   sqrt(0.75)  0.5  0.0
         -sqrt(0.75)  0.5  0.0
          0.0         0.0  1.0

#Definition of the atom types
   ntypat 2
    znucl 13 33

#Definition of the atoms
   natom  4
   typat 1 1 2 2
   xred  1/3    2/3    0
         2/3    1/3    1/2
         1/3    2/3    3.7608588373E-01
         2/3    1/3    8.7608588373E-01

#Number of band
   nband  10

#Definition of the planewave basis set
    ecut  6

#Definition of the k-point grid
  kptopt   1
   ngkpt   2 2 2
 nshiftk   1
  shiftk   0.0 0.0 0.5

#Definition of the SCF procedure
     nstep 200
    tolvrs 1.0d-6
 usexcnhat 1
    occopt 7
    ecutsm 0.5
    tsmear 5d-3 

#PAW parameters
 pawecutdg 6

 prtwf 0 prteig 0 prtden 0
 prtvol 10

## 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 = t95.in,t96.in,t97.in,t98.in
#%% [files]
#%% psp_files = al_ps.abinit.paw, as_ps.paw
#%% [paral_info]
#%% nprocs_to_test = 1, 2, 4, 10
#%% max_nprocs = 10
#%% [NCPU_1]
#%% files_to_test = 
#%%   t95_MPI1.out, tolnlines = 0, tolabs = 0, tolrel = 0, fld_options = -easy;
#%%   t95_MPI1o_DS3_DDB, tolnlines = 0, tolabs = 0, tolrel = 0, fld_options = -easy
#%% [NCPU_2]
#%% files_to_test = 
#%%   t95_MPI2.out, tolnlines = 0, tolabs = 0, tolrel = 0, fld_options = -easy;
#%%   t95_MPI2o_DS3_DDB, tolnlines = 0, tolabs = 0, tolrel = 0, fld_options = -easy
#%% [NCPU_4]
#%% files_to_test = 
#%%   t95_MPI4.out, tolnlines = 0, tolabs = 0, tolrel = 0, fld_options = -easy;
#%%   t95_MPI4o_DS3_DDB, tolnlines = 0, tolabs = 0, tolrel = 0, fld_options = -easy
#%% [NCPU_10]
#%% files_to_test = 
#%%   t95_MPI10.out, tolnlines = 0, tolabs = 0, tolrel = 0, fld_options = -easy;
#%%   t95_MPI10o_DS3_DDB, tolnlines = 0, tolabs = 0, tolrel = 0, fld_options = -easy
#%% [extra_info]
#%% authors = A. MARTIN
#%% keywords = PAW, DFPT, ELASTIC
#%% description = 
#%%   Computation of elastic tensor and internal strain in DFPT+PAW
#%%   Ground state is computed.
#%%   DFPT is computed
#%%<END TEST_INFO>
