<html>
<head>
<title>v5 : README</title>
</head>
<body>

<h5>Copyright (C) 2002-2009 ABINIT group (FJollet, MTorrent, GZerah, XGonze, DHamann, MVeithen)
<br> This file is distributed under the terms of the GNU General Public License, see
~abinit/COPYING or <a href="http://www.gnu.org/copyleft/gpl.txt">
http://www.gnu.org/copyleft/gpl.txt </a>.
<br> For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
</h5>

<pre>

This directory, v5, contains tests which
are related to the development of the various development in
version 5.x.x of Abinit: New build system, new files format,
real space wavelet calculation, real space preconditioner ...
This file gives first a very brief description
of the tests, then a much longer one.

A classification of the tests is provided now. Later, each test is described
in more detail, with accompanying notes and references (some of the notes
might have to be updated, due to the small possible drift related to improvement
of the accuracy of the code).

------------------------------------------------------------------
(the following list is to be clarified later)

* Tests 1-20 should be PAW

* Tests 1-5 concern the SCF preconditioners
* Test 7 is now free
* Tests 8 and 11 concern the PAW+U method
* Tests 9-10 concern the calculation of the conductivity with PAW
* Test 16 concerns the non-collinear magnetism with PAW (and other magnetisms)
* Test 17 concerns the spin-orbit with PAW

* Tests 20-29 concern response functions

* Tests 30-59 concern ground state and geometry optimization

* Tests 60-79 concern electronic excitations

* Tests 80-90 concern molecular dynamics

* Tests 91-99 concern new algorithms
------------------------------------------------------------------
***************

To run these tests, do the following:

0. Be sure that the perl script "run-standard-tests", in the main directory,
   has been generated from the primitive file "run-standard-tests.pl",
   thanks to the command "make perl"
   issued in ~abinit (see the installation notes on the Web).

1. Submit the "run-standard-tests" script, specifying a machine, and
   the keyword "v5" (for Tests_v5) and either
   the index of a test case, i.e.
   (run-standard-tests name_of_machine v5 22) >& log_file
   or a whole range of test cases (two indices), i.e.
   (run-standard-tests name_of_machine v5 02 08) >& log_file
   or, if you want to run all the test cases of this directory
   (run-standard-tests name_of_machine v5) >& log_file
   This will send stdout and stderr to log_file.
   The script 'run-standard-tests', will create a subdirectory of ~abinit/tests/v5,
   with the name_of_machine and the
   date, where all the results will be placed.

2. In that directory, you will find for each test case that you have
   run, a log file (with the name of the test case), an output
   file, but also a 'diff.xxx' file, automatically created by making
   a 'diff' with respect to the "Refs" subdirectory output files.
   It contains output files from a recent version of the ABINIT code.
   There may be large differences in timing but there should only
   be minor differences in the output of physical quantities.

3. There is also a global report file, generated by the use of the
   fldiff script. Its name is fldiff.report . See the last
   version of the  ~abinit/doc/install_notes/install** file
   in the Infos directory for information about the use of this file.
   This file is the most convenient for a quick look at the correctness
   of results. When the results are not correct, one has often to
   rely on the 'diff.xxx' file to understand what was going wrong.


**********

Test cases:

  1. Simple test for TFvW preconditionner (not already effective)
     simple scf calculation
     following part of the code are tested:
     04rsprc/prctfw.F90
     defs/functofrho_tfw.F90
     01cg/*
     (from PMAnglade)

  2. Simple test for TFvW2 preconditionner (not already effective)
     simple scf calculation
     following part of the code are tested:
     04rsprc/prctfw2.F90
     defs/func_tfvw2.F90
     01cg/*
     THIS TEST DOES NOT WORK AT PRESENT
     (from PMAnglade)

  3. Simple test for rsprc preconditionner (not already effective)
     simple scf calculation
     following part of the code are tested:
     04rsprc/prcrscgres.F90
     defs/func_rscgres.F90
     01cg/*
     (from PMAnglade)

  4. Simple test for rsprc preconditionner (not already effective)
     simple scf calculation
     following part of the code are tested:
     04rsprc/prcrscgres2.F90
     defs/func_rscgres2.F90
     01cg/*
     (from PMAnglade)

  8. Simple test for LDA+U implementation.
     no forces, 2 Ni and 2 O atoms in an fcc supercell.
     The cut-off is unrealistic. This test tests the
     following part of the code :
      * paw LDA+U (pawpupot, pawpuenergy, pawpuinit)
     (from B. Amadon)

  9. Test to prepare a conductivity calculation (test 10)
     Ground state calculation for 4 Al atoms
     The number of bands is unrealistic. This test produces files that are inputs for test 10. It tests the
     following part of the code :
     *optic_paw
     (from S. Mazevet)

 10. Test a PAW conductivity calculation
     The code conducti calls conducti_paw
     (from S. Mazevet)

 11. Simple test for LDA+U features.
     2 Ni and 2 O atoms in an fcc supercell.
     The cut-offs are unrealistic.
     The aim of this test is to verify:
      * Antiferromagnetism and PAW+U
      * Use of an initial and constant density matrix during the first SCF iterations
      * Computation of "local magnetic moment" with prtdensph keyword
     (from M. Torrent)

 12. NaF Sodium Fluoride FCC (rocksalt structure) with 2 atoms per cell.
     Test computation of the Berry phase in PAW.
     Contributed by P. Hermet.

 13. GaAs with 2 atoms per cell.
     Test computation of the Berry phase in PAW, with GGA functional.
     Contributed by P. Hermet.

 14. Ni atom in a big box.
     Test the use of the atvshift variable :
     change the potential of the d orbitals.

 15. Ni molecule in a big box.
     Test the use of the atvshift variable
     First dataset : no shift, the ten states number 9 to 18
     come from the 3d atomic states, the state number 19 is a bonding 4s state.
     States number 16 and 17 are degenerate 3d pi antibonding states (m=1 and -1).
     State number 18 is a 3d sigma antibonding state (m=0).
     Second dataset : add a 0.001 atomic shift to the m=0 potential. Most of the
     levels change by less than 0.0002 (and their energy decrease), except state number
     9 (a 3d sigma bonding state (m=0)), that goes from -0.24020 to -0.23982 (+0.0004)
     and state number 18, that goes from -0.15439 to 0.15399 (+0.0004).
     Third dataset : add a 0.001 atomic shift to the m=1 and m=-1 potentials.
     All the leves are affected (likely the m=1 and -1 orbitals adjust, and cause modification
     of the potential), but the states 10, 11, 16, and 17 increase their energy, while the
     other state see their energy decrease.
     Acting separately on the m=1 potential or the m=-1 cause the (correctly) the breaking
     of the degeneracy.

 16. NiO: 2 Ni and 2 O atoms in an fcc supercell.
     Different combinations of nsppol/nspden/nspinor are tested in the PAW+U formalism:
       1- non-magnetic (without U)  nsppol/nspden/nspinor=1/1/1
       2- ferro-magnetic            nsppol/nspden/nspinor=2/2/1
       3- antiferro-magnetic        nsppol/nspden/nspinor=1/2/1
       4- non-collinear magnetism   nsppol/nspden/nspinor=1/4/2
     Cut-off and k-points are unrealistic.
     (from M. Torrent)

 17. Bi A7 structure (2 atoms per unit cell),
     using PAW, within LDA.
     Fixed cell dimensions. Treated as a semi-conductor
     Test the spin-orbit coupling
      - with zero magnetization      (nspden=1, nspinor=2)
      - with non-collinear magnetism (nspden=4, nspinor=2)
     (from M. Torrent)

 18. NiO with 4 atoms per cell
     Test computation of the local exact exchange (PBE0) in PAW.
     Contributed by F. Jollet

 19. FCC Gadolinium
     PAW + U calculation
     Test the imposition of the density matrix (10 first steps)
     and related variables. 
     COntributed by B. Amadon
     
 21. PbFCl in the matlockite structure P4/nmm. 6 atoms per cell.
     Compute a set of matrix elements of the dynamical matrix,
     for q wavevector 0.5 0.5 0.5 .
     In this test case, the symmetry operations have an important
     non-symmorphic character. There was a bug in the treatment
     of this material, prior to v5.2.4 .

 22. SiO2 alpha-quartz with 9 atoms per cell.
     Compute the atomic temperature factors.
     Contributed by P. Boulanger

 23. AlAs in Zincblende structure.
     Test calculation of the Born effective charge and dielectric constant
     tensor at finite electric fields.
     The first dataset is for normal ground-
     state calculation at zero electric field. The second dataset is for
     ground-state calculation at finite electric field. The final dataset
     is the linear-response calculation at finite electric field.
     (contributed by Xinjie Wang)

 24. GeTe in rhombohedral structure
     Test the computation of phonons, dielectric tensor and Born effective
     charges, with and without spin-orbit coupling.

 25. PbTe in rocksalt structure
     Test the computation of phonons, dielectric tensor and Born effective
     charges, with and without spin-obit coupling.
     BUG : even without spin-orbit coupling, with ngkpt 2 2 2
     the Born effective charges are not symmetric, why ??
     BUG : even with only Gamma point, the dynamical matrix is not symmetric :
       3    2   1    1        -0.0488343140         0.0000000000

 28. H2 molecule, using a local pseudopotential, and Wu-Cohen GGA.
     Similar to test v3#08
     Compute the interatomic force constant for the
     displacement of the second atom along x.
     RF calculation of the 2DTE gives 189.49410411 Ha
     while finite differences gives :
     with delta(xred)=0.0002, 189.4945677  Ha
     with delta(xred)=0.0001, 189.49422003  Ha .
     Combining the results gives 189.4941041 Ha. Perfect !

 31. Bismuth atom, isolated, in a supercell.
     Compares different spin treatments :
     - spin-polarized collinear (nspinor=1, nspden=2, nsppol=2, no spin-orbit)
     - spinor (nspinor=2, nspden=4, nsppol=1, no spin-orbit)
     Both with fixed occupation numbers and metallic occupations.
     Also, consider mkmem=0
     This test has been contributed by LEDiaz

 32. Bismuth atom, isolated, in a supercell.
     Analyse the collinear spin-density obtained in test 31 , using cut3d

 33. Bismuth atom, isolated, in a supercell.
     Analyse the non-collinear spin-density obtained in test 31 , using cut3d

 34. Stishovite, high-pressure polymorph of SiO2. LDA.
     Computation of the Fermi contact term at each atomic site.
     Coded and contributed by J. Zwanziger.
 
 35. Stishovite, high-pressure polymorph of SiO2. LDA.
     Computation of the electric field gradient at each site using both PAW and
     a simple point charge model.
     Coded and contributed by J. Zwanziger.

 36. BCC iron, ferromagnetic, computation of Fermi contact term with two spin densities.
     Coded and contributed by J. Zwanziger.

 37. White tin, body-centered tetragonal. This test checks that in an optcell 2 run, the symmetry
     of the body-centered case is not broken.
     Coded and contributed by J. Zwanziger.

 41. Al2 molecule in a big box. Treat 8 bands, occupied using occopt=4.
     Compare tolrff and toldff stopping criteria
     Contributed M. Verstraete

 42. NH3 and NH2-CH3 molecules , supercell geometry
     Show the computations needed to obtain the differential
     pseudopotentials 7n.pspnc (just usual atomic configuration)
     and 7n.1s_psp.mod (with a hole in state 1s).
     The differential core-level shift is obtained by comparing
     difference in the total energies of the NH3 molecule with both pseudopotentials
     with the one of the NH2CH3 molecule :
     0.41522 Ha for the NH3 molecule
     0.41768 Ha for the NH2-CH3 molecule, making for a shift of 2.46 mHa=0.0669 eV
     due to the replacement of one H atom of the NH3 molecule by a CH3 group.
     Note that these are completely non converged values. Parameters
     like ecut and acell should be the subject of a convergence study.
     For applications of this technique, see
     Rignanese GM et al, Phys. Rev. Lett. 79, 5174 (1997),
     or Travaly Y et al, Phys. Rev. B 61, 7716 (2000).
     This test has been contributed by GMRignanese.

 44. Bismuth atom, isolated, in a supercell.
     Try alchemical pseudopotentials with spin-orbit.
     Spinor calculation (nspinor=2, nspden=1, nsppol=1)
     Metallic occupations.
     Also compare the halved spin-orbit interaction alchemical mixing
     with a pseudopotential directly prepared with halved spin-orbit interaction.
     The agreement is perfect.

 48. H2 molecule, using a local pseudopotential,
     and the Wu-Cohen GGA.
     Similar to Test v3#48
     Compute the total energy and force as a
     displacement of the second atom along x.
     Direct calculation of the gradient with respect
     to reduced coordinates gives -3.469435369425Ha
     while finite differences gives :
     with delta(xred)=0.0002, -3.4694479488 Ha
     with delta(xred)=0.0001, -3.4694385143 Ha .
     Combining the results gives -3.4694353695 Ha.
     Excellent.

 49. Si2 diatomic molecule. Spin-polarized (ferromagnetic).
     Test the Wu-Cohen GGA functional.
     Similar to Test v3#49
     Direct calculation of the gradient with respect
     to reduced coordinates gives  0.344935232634 Ha
     while finite differences gives :
     with delta(xred)=0.002,  0.34493521   Ha

 51. Stishovite, high-pressure polymorph of SiO2. LDA.
     Computation of the electric field gradient at each atomic site.
     This tests the implementation of the PAW-based
     efg algorithm as outlined in Profeta, Mauri, and Pickard, J. Am. Chem. Soc.
     125, 541-548 (2003). Coded by J. Zwanziger and M. Torrent, test contributed
     by J. Zwanziger.

 52. Stishovite, high-pressure polymorph of SiO2. GGA (PBE).
     Computation of the electric field gradient at each atomic site.
     This tests the implementation of the PAW-based
     efg algorithm as outlined in Profeta, Mauri, and Pickard, J. Am. Chem. Soc.
     125, 541-548 (2003). Test contributed by J. Zwanziger.

 53. Crystalline Cu2O
     Computation of the total energy and EFG tensors in LDA+U formalism
     Note: Cu2O is a nonmagnetic insulator. However, LDA+U
     as implemented requires nspden=2 in all cases.

 54. Crystalline Silicon to test the CP2K pseudopotential implementation with
     the new pseudo type: pspcod 10 (same formalism as HGH pseudos, pspcod 3).
     Same input file as t35.in of tests/tutorial, the only difference is that
     in the test the used pseudo is taken from the CP2K library.
     (http://cvs.berlios.de/cgi-bin/viewcvs.cgi/cp2k/potentials/Goedecker/abinit/)
     The bandstructure is in agreement with that calculated in the tutorial
     example with the pspcod=1 pseudopotential.
     Tests provided by S. Caravati .

 55. Crystalline rhombohedral Antimonium. CP2K PBE pseudopotential.
     Optimization of the atomic positions with ionmov 2. In the input file
     several datasets are defined but actually only one of them is chosen for
     the calculation. The provided xred (one for each dataset) are already the
     equilibrium position, so the calculation should use only one optimization
     step per dataset.
     Tests provided by S. Caravati .

 56. Bulk jellium (the slab fills up the entire cell): computation of the total
     energy. Tested 3 Wigner-Seitz radii: 1.5, 2 (~aluminum), 4. For each
     Wigner-Seitz radius the energy per particle agrees with that analytically
     calculated using the Teter-Pade functional form.
     The number of k points has been much reduced, for the purpose of the automatic testing.
     Test provided by S. Caravati .

 57. Jellium slab (50 jellium/ 50 vacuum) with Wigner-Seitz radius=4.
     Computation of the total energy
     The number of k points has been much reduced
     Test provided by S. Caravati .

 58. Jellium thin slab with Wigner-Seitz radius=2.56 (~copper) + 1 Na adatom.
     Computation of the total energy and force on the Na atom. Its position
     with respect to the slab already is the equilibrium position so the
     calculation should use only one optimization step.
     Test provided by S. Caravati .

 59. Jellium thin slab with Wigner-Seitz radius=2.56 (~copper) + 1 Na adatom.
     Computation of the total energy at the Na equilibrium distance from the
     jellium edge and two other ones, slightly farther and slightly closer.
     The total energies should indicate as more stable the equilibrium distance.
     The number of k points has been much reduced
     Test provided by S. Caravati .

 60. Crystalline Silicon
     Computation of the non-self-consistent kinetic energy at fixed density.

 61. N2 molecule non-spin-polarized, but treated with nsppol=2, in a big box.
     Similar to test 55 of tests/v3. There should be only
     small numerical differences with respect to datasets 1 and 2 of this test,
     due to the fact that the tetragonal symmetry was here slightly broken
     for sake of portability of the automatic test.
     Note however that the singlet and triplet states cannot be disentagled,
     so one gets a big list of excitations, the merge of singlet and triplet
     excitations.

 62. BeH spin-polarized, in a supercell
     Test the spin-polarized TDDFT implementation.
     nband 20 , ecut 8 , acell 14 14 14 .
     For the first two excitations, one finds :
     2.40967E+00 eV , doubly degenerate  (Pi excitation)
     3.94165E+00 eV  (Sigma+ excitation)
     They come mainly from the 2nd occupied Kohn-Sham state, spin up.
     The third excitation, at 5.11592E+00 eV (Sigma+ excitation) comes mainly from
     the 1st occupied Kohn-Sham state, spin down.
     Then, come excitations that are in the continuum, or close to it
     (depending on the parameters of the calculation), so, harder to converge,
     In order to have a calculation converged
     at the level of 0.1 eV, one needs parameters like
     nband 40 , ecut 10 , acell 30.
     In that case, the three above-mentioned excitations become
     2.388 eV (Pi), 4.432 eV (Sigma+), 5.357 eV (Sigma+).
     In this case, the latter is no more the third excitation, as other ones,
     coupled to the vacuum have a lower energy.
     These numbers can be compared to the values given by
     J. Guan, ME Casida, DR Salahub, J. of Mol. Structure - Theochem 527,
     229, Sp. Iss. SI (2000) :
     2.391 eV (1Pi), 4.593 eV (2Sigma+), 5.418 eV (5Sigma+),
     and to the experimental values (see the above paper)
     2.56 eV/2.484 eV , 5.51 eV , 6.71 eV.
     Test provided by D. Sangalli

 63. Bcc Hydrogen, r_s=2.6 a.u AF
     To check a GW+spin calculation with and without symmetries
     Test provided by Matteo Giantomassi

 64. Crystalline alpha-quartz
     Calculation of the GW corrections with and without non-symmorphic operations
     Test provided by Matteo Giantomassi

 65. Beta-SiC
     Calculation of the GW corrections with out-of-core solutions and
     extrapolar approximation. Test provided by Fabien Bruneval

 66. Silicon
     One-shot GW calculations within the PAW formalism
     Test provided by Matteo Giantomassi

 67. SiC in zinc-blende structure
     G0W0 calculation updating G and W by a scissor operator
     Test provided by Riad Shaltaf

 68. Bcc Hydrogen, r_s=2.6 a.u AF
     To check a G0W0+spin calculation with AFM symmetries (same as test t63 but only spin up
     wavefunctions, non-symmorphic symmetries are obviously included)
     Test provided by Matteo Giantomassi

 69. Beta-SiC
     Calculation of the GW corrections with extrapolar approximation and in-core solution.
     Similar to t65, the main difference is that symmetries are used both in chi0 and sigma and also
     the extrapolar term is symmetrized. Using a larger G-sphere for wavefunctions wrt t65 in order to
     reduce the number of G1-G2 vectors falling outside the "ecutwfn" sphere (see completchi0_deltapart.F90).
     Test provided by Matteo Giantomassi.

 70. Silicon
     One-shot GW calculation starting either from the SCR file or from the SUSC file.
     In the later case both the in-core solution and the out-of-core solution 
     for the storage of the inverse dielectric matrix are tested.
     Test provided by Matteo Giantomassi

 81. This is a test, in the norm conserving case, of the Molecular Dynamics flag
     ionmov==13. With the values of optcell=0, 1, 2 (isothermal (0) , isothermal/isenthalpic
     with homogeneous cell deformations (1) or full cell deformations (2).)
     This is the reversible integrator of Martyna, Tuckerman, Tobias and Klein.
     (Mol. Phys., 1996, p 1117).

 85. FCC Aluminium - get phonons and ddk in preparation for an electron-phonon coupling run.
     a few extra features are used compared to the tutorial.

 86. mrgddb: merge the ddb files from t85

 87. mrggkk: merge the 1WF files from t85

 88. anaddb run for Al, from t85 t86 t87. Calculate e-p coupling

 91. This is a test of the version of the lobpcgII method, where, when an eigenvalue diverges, the vector with the smallest
     residual is kept (ideas from S. Leroux, A. Knyazev, still under development)

 95. FCC Ni - get phonons and ddk in preparation for an electron-phonon coupling run.
     a few extra features are used compared to the tutorial.

 96. mrgddb: merge the ddb files from t95

 97. mrggkk: merge the 1WF files from t95

 98. anaddb run for Al, from t95 t96 t97. Calculate e-p coupling

</pre>

