Steps to ensure compilation of atm.f

  1. Ensure that you are in QXMD_Course/src/atm folder

  2. Way to ensure this is pwdin your current folder and look for QXMD_Course/src/atm as relative address

  3. Run make ifort from this directory

In [5]:
! make ifort
mkdir Atm
mkdir data
sed "s/^#IFORT#//" Sources/Makefile > Atm/Makefile

Compilation of atm.f continued

  1. Compile the atm.f code by executing make atm command.
  2. This will compile the code with all it's dependencies and move the ./atm executable at root level
In [6]:
! make atm 
cd Atm;  make atm
make[1]: Entering directory `/staging/an/hk_658/QXMD_Course_work/atm/Atm'
cp ../Sources/ftmain.f90 ./ftmain.F90
ifort -c  ftmain.F90
ftmain.F90(1286): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
   2005 FORMAT(A2,I5,' (',D16.10,' )  ',10A8)
---------------------------^
cp ../Sources/funcs.f90  ./funcs.F90
ifort -c  funcs.F90
cp ../Sources/input.f90  ./input.F90
ifort -c  input.F90
cp ../Sources/vxc.f90    ./vxc.F90
ifort -c  vxc.F90
cp ../Sources/ae.f90     ./ae.F90
ifort -c  ae.F90
cp ../Sources/vloc.f90   ./vloc.F90
ifort -c  vloc.F90
cp ../Sources/pp.f90     ./pp.F90
ifort -c  pp.F90
cp ../Sources/ecut.f90   ./ecut.F90
ifort -c  ecut.F90
cp ../Sources/trans.f90  ./trans.F90
ifort -c  trans.F90
Loading atm ... 
ifort ftmain.o funcs.o input.o vxc.o ae.o vloc.o pp.o ecut.o trans.o -o atm
mv atm ..
done
make[1]: Leaving directory `/staging/an/hk_658/QXMD_Course_work/atm/Atm'

Edit in7.dat if necessary (can be done within the jupyter notebook)

  1. Define the atom by the atomic number
  2. Change the valence electron distribution
  3. Change reference energies and cutoff radii for pseudo-wavefuncions

Executing atm executable

  1. This code reads in7.dat and constructs the PAW potential
  2. Run the exectuable by typing ./atm
In [7]:
! ./atm
 open :in7.dat             

 Self-consistent LDA calculation for atom: W 

 (initial data):
          MESH = 2001      RMAX = 100.00        PHI =  0.3000000
             Z =   74.0    RINF =  75.00       EDEL =  0.0000000
          XION =    1.0       H = 100.00       VDEL =  0.0000010
           NC1 =  300      TIME =  60.00       LATT =  F

 (electron configuration):
       NLJC   orbit    WNLJ      energy (Ryd.)
   1    100     1S    2.0000       0.0000000
   2    200     2S    2.0000       0.0000000
   3    210     2P    6.0000       0.0000000
   4    300     3S    2.0000       0.0000000
   5    310     3P    6.0000       0.0000000
   6    320     3D   10.0000       0.0000000
   7    400     4S    2.0000       0.0000000
   8    410     4P    6.0000       0.0000000
   9    420     4D   10.0000       0.0000000
  10    500     5S    2.0000       0.0000000
  11    510     5P    6.0000       0.0000000
  12    430     4F   14.0000       0.0000000
  13    521     5D    4.0000       0.0000000
  14    601     6S    1.0000       0.0000000
  15    611     6P    0.0000       0.0000000

 (convergence test):
     CYCLET    PH        RLC    VERR      (NERR)   SUME       electrons
  1  0.000 sec 0.300000  0.0000 0.1394E+03(1080) -28863.4494  73.0000000
  2  0.000 sec 0.300000  0.0000 0.1390E+02(1502) -32460.8377  73.0000000
  3  0.000 sec 0.300000  0.0000 0.3153E+01(1594) -32475.8706  73.0000000
  4  0.000 sec 0.300000  0.0000 0.2134E+01(1595) -32422.4903  73.0000000
  5  0.000 sec 0.300000  0.0000 0.1400E+01(1604) -32372.9728  73.0000000
  6  0.000 sec 0.300000  0.0000 0.9036E+00(1614) -32338.9302  73.0000000
  7  0.000 sec 0.300000  0.0000 0.5793E+00(1622) -32317.7331  73.0000000
  8  0.000 sec 0.300000  0.0000 0.3935E+00(1737) -32304.9678  73.0000000
  9  0.000 sec 0.300000  0.0000 0.3090E+00(1744) -32297.3048  73.0000000
 10  0.000 sec 0.300000  0.0000 0.2503E+00(1750) -32292.6341  73.0000000
 11  0.000 sec 0.300000  0.0000 0.2065E+00(1755) -32289.7284  73.0000000
 12  0.000 sec 0.300000  0.0000 0.1711E+00(1760) -32287.8841  73.0000000
 13  0.000 sec 0.300000  0.0000 0.1403E+00(1765) -32286.6938  73.0000000
 14  0.000 sec 0.300000  0.0000 0.1117E+00(1769) -32285.9146  73.0000000
 15  0.000 sec 0.300000  0.0000 0.9105E-01(1817) -32285.3984  73.0000000
 16  0.000 sec 0.300000  0.0000 0.8171E-01(1813) -32285.0551  73.0000000
 17  0.000 sec 0.300000  0.0000 0.7239E-01(1809) -32284.8263  73.0000000
 18  0.000 sec 0.300000  0.0000 0.6722E-01(1761) -32284.6712  73.0000000
 19  0.000 sec 0.300000  0.0000 0.6287E-01(1764) -32284.5666  73.0000000
 20  0.000 sec 0.300000  0.0000 0.5807E-01(1767) -32284.4953  73.0000000
 21  0.000 sec 0.300000  0.0000 0.5305E-01(1770) -32284.4479  73.0000000
 22  0.000 sec 0.300000  0.0000 0.4786E-01(1773) -32284.4154  73.0000000
 23  0.000 sec 0.300000  0.0000 0.4244E-01(1776) -32284.3932  73.0000000
 24  0.000 sec 0.300000  0.0000 0.3703E-01(1778) -32284.3779  73.0000000
 25  0.000 sec 0.300000  0.0000 0.3187E-01(1781) -32284.3669  73.0000000
 26  0.000 sec 0.300000  0.0000 0.2715E-01(1783) -32284.3605  73.0000000
 27  0.000 sec 0.300000  0.0000 0.2292E-01(1785) -32284.3559  73.0000000
 28  0.000 sec 0.300000  0.0000 0.1926E-01(1787) -32284.3528  73.0000000
 29  0.000 sec 0.300000  0.0000 0.1618E-01(1789) -32284.3506  73.0000000
 30  0.000 sec 0.300000  0.0000 0.1364E-01(1790) -32284.3491  73.0000000
 31  0.000 sec 0.300000  0.0000 0.1159E-01(1792) -32284.3481  73.0000000
 32  0.000 sec 0.300000  0.0000 0.9908E-02(1794) -32284.3473  73.0000000
 33  0.000 sec 0.300000  0.0000 0.8522E-02(1796) -32284.3471  73.0000000
 34  0.000 sec 0.300000  0.0000 0.7389E-02(1797) -32284.3466  73.0000000
 35  0.000 sec 0.300000  0.0000 0.6452E-02(1799) -32284.3463  73.0000000
 36  0.000 sec 0.300000  0.0000 0.5743E-02(1829) -32284.3462  73.0000000
 37  0.000 sec 0.300000  0.0000 0.5118E-02(1828) -32284.3460  73.0000000
 38  0.000 sec 0.300000  0.0000 0.4558E-02(1827) -32284.3460  73.0000000
 39  0.000 sec 0.300000  0.0000 0.4057E-02(1827) -32284.3459  73.0000000
 40  0.000 sec 0.300000  0.0000 0.3609E-02(1826) -32284.3459  73.0000000
 41  0.000 sec 0.300000  0.0000 0.3210E-02(1826) -32284.3458  73.0000000
 42  0.000 sec 0.300000  0.0000 0.2854E-02(1826) -32284.3458  73.0000000
 43  0.000 sec 0.300000  0.0000 0.2536E-02(1826) -32284.3458  73.0000000
 44  0.000 sec 0.300000  0.0000 0.2253E-02(1826) -32284.3458  73.0000000
 45  0.000 sec 0.300000  0.0000 0.2002E-02(1826) -32284.3458  73.0000000
 46  0.000 sec 0.300000  0.0000 0.1778E-02(1826) -32284.3458  73.0000000
 47  0.000 sec 0.300000  0.0000 0.1579E-02(1826) -32284.3458  73.0000000
 48  0.000 sec 0.300000  0.0000 0.1402E-02(1827) -32284.3458  73.0000000
 49  0.000 sec 0.300000  0.0000 0.1244E-02(1827) -32284.3458  73.0000000
 50  0.000 sec 0.300000  0.0000 0.1104E-02(1828) -32284.3458  73.0000000
 51  0.000 sec 0.300000  0.0000 0.9796E-03(1828) -32284.3458  73.0000000
 52  0.000 sec 0.300000  0.0000 0.8690E-03(1829) -32284.3458  73.0000000
 53  0.000 sec 0.300000  0.0000 0.7708E-03(1829) -32284.3458  73.0000000
 54  0.000 sec 0.300000  0.0000 0.6835E-03(1830) -32284.3458  73.0000000
 55  0.000 sec 0.300000  0.0000 0.6060E-03(1831) -32284.3458  73.0000000
 56  0.000 sec 0.300000  0.0000 0.5371E-03(1831) -32284.3458  73.0000000
 57  0.000 sec 0.300000  0.0000 0.4761E-03(1832) -32284.3458  73.0000000
 58  0.000 sec 0.300000  0.0000 0.4218E-03(1833) -32284.3458  73.0000000
 59  0.000 sec 0.300000  0.0000 0.3736E-03(1834) -32284.3458  73.0000000
 60  0.000 sec 0.300000  0.0000 0.3309E-03(1835) -32284.3458  73.0000000
 61  0.000 sec 0.300000  0.0000 0.2930E-03(1835) -32284.3458  73.0000000
 62  0.000 sec 0.300000  0.0000 0.2594E-03(1836) -32284.3458  73.0000000
 63  0.000 sec 0.300000  0.0000 0.2296E-03(1837) -32284.3458  73.0000000
 64  0.000 sec 0.300000  0.0000 0.2031E-03(1838) -32284.3458  73.0000000
 65  0.000 sec 0.300000  0.0000 0.1797E-03(1839) -32284.3458  73.0000000
 66  0.000 sec 0.300000  0.0000 0.1589E-03(1840) -32284.3458  73.0000000
 67  0.000 sec 0.300000  0.0000 0.1405E-03(1840) -32284.3458  73.0000000
 68  0.000 sec 0.300000  0.0000 0.1242E-03(1841) -32284.3458  73.0000000
 69  0.000 sec 0.300000  0.0000 0.1098E-03(1842) -32284.3458  73.0000000
 70  0.000 sec 0.300000  0.0000 0.9700E-04(1843) -32284.3458  73.0000000
 71  0.000 sec 0.300000  0.0000 0.8568E-04(1844) -32284.3458  73.0000000
 72  0.000 sec 0.300000  0.0000 0.7566E-04(1845) -32284.3458  73.0000000
 73  0.000 sec 0.300000  0.0000 0.6680E-04(1845) -32284.3458  73.0000000
 74  0.000 sec 0.300000  0.0000 0.5898E-04(1846) -32284.3458  73.0000000
 75  0.000 sec 0.300000  0.0000 0.5206E-04(1847) -32284.3458  73.0000000
 76  0.000 sec 0.300000  0.0000 0.4593E-04(1848) -32284.3458  73.0000000
 77  0.000 sec 0.300000  0.0000 0.4052E-04(1849) -32284.3458  73.0000000
 78  0.000 sec 0.300000  0.0000 0.3573E-04(1850) -32284.3458  73.0000000
 79  0.000 sec 0.300000  0.0000 0.3150E-04(1851) -32284.3458  73.0000000
 80  0.000 sec 0.300000  0.0000 0.2777E-04(1851) -32284.3458  73.0000000
 81  0.000 sec 0.300000  0.0000 0.2448E-04(1852) -32284.3458  73.0000000
 82  0.000 sec 0.300000  0.0000 0.2157E-04(1853) -32284.3458  73.0000000
 83  0.000 sec 0.300000  0.0000 0.1900E-04(1854) -32284.3458  73.0000000
 84  0.000 sec 0.300000  0.0000 0.1673E-04(1855) -32284.3458  73.0000000
 85  0.000 sec 0.300000  0.0000 0.1473E-04(1856) -32284.3458  73.0000000
 86  0.000 sec 0.300000  0.0000 0.1297E-04(1856) -32284.3458  73.0000000
 87  0.000 sec 0.300000  0.0000 0.1142E-04(1857) -32284.3458  73.0000000
 88  0.000 sec 0.300000  0.0000 0.1005E-04(1858) -32284.3458  73.0000000
 89  0.000 sec 0.300000  0.0000 0.8839E-05(1859) -32284.3458  73.0000000
 90  0.000 sec 0.300000  0.0000 0.7773E-05(1860) -32284.3458  73.0000000
 91  0.000 sec 0.300000  0.0000 0.6834E-05(1860) -32284.3458  73.0000000
 92  0.000 sec 0.300000  0.0000 0.6011E-05(1861) -32284.3458  73.0000000
 93  0.000 sec 0.300000  0.0000 0.5285E-05(1862) -32284.3458  73.0000000
 94  0.000 sec 0.300000  0.0000 0.4644E-05(1863) -32284.3458  73.0000000
 95  0.000 sec 0.300000  0.0000 0.4079E-05(1864) -32284.3458  73.0000000
 96  0.000 sec 0.300000  0.0000 0.3583E-05(1864) -32284.3458  73.0000000
 97  0.000 sec 0.300000  0.0000 0.3148E-05(1865) -32284.3458  73.0000000
 98  0.000 sec 0.300000  0.0000 0.2765E-05(1866) -32284.3458  73.0000000
 99  0.000 sec 0.300000  0.0000 0.2427E-05(1867) -32284.3458  73.0000000
100  0.000 sec 0.300000  0.0000 0.2129E-05(1868) -32284.3458  73.0000000
101  0.000 sec 0.300000  0.0000 0.1870E-05(1868) -32284.3458  73.0000000
102  0.000 sec 0.300000  0.0000 0.1641E-05(1869) -32284.3458  73.0000000
103  0.000 sec 0.300000  0.0000 0.1439E-05(1870) -32284.3458  73.0000000
104  0.000 sec 0.300000  0.0000 0.1262E-05(1871) -32284.3458  73.0000000
105  0.000 sec 0.300000  0.0000 0.1107E-05(1871) -32284.3458  73.0000000
 data/W_1S.wvf       
 data/W_2S.wvf       
 data/W_2P.wvf       
 data/W_3S.wvf       
 data/W_3P.wvf       
 data/W_3D.wvf       
 data/W_4S.wvf       
 data/W_4P.wvf       
 data/W_4D.wvf       
 data/W_5S.wvf       
 data/W_5P.wvf       
 data/W_4F.wvf       
 data/W_5D.wvf       
 data/W_6S.wvf       
 data/W_6P.wvf       

 ---- LDA calculation for W  ( Z =  74.00 ) -----------------------------------
      Total No. of electrons :  73.000000  ( ion =  1.000000 )

 (problem converged):
       orbit   electrons   energy (Ryd.)          (eV)
   1    1S      2.000000   -5108.5796283  -69506.31271
   2    2S      2.000000    -882.1729407  -12002.66860
   3    2P      6.000000    -771.4869048  -10496.69653
   4    3S      2.000000    -203.5942929   -2770.06323
   5    3P      6.000000    -170.8216994   -2324.16588
   6    3D     10.000000    -133.1547988   -1811.67756
   7    4S      2.000000     -42.4384770    -577.40943
   8    4P      6.000000     -31.6906017    -431.17599
   9    4D     10.000000     -18.0744616    -245.91751
  10    5S      2.000000      -6.3622644     -86.56370
  11    5P      6.000000      -3.7275873     -50.71681
  12    4F     14.000000      -2.9906923     -40.69076
  13    5D      4.000000      -0.8619636     -11.72770
  14    6S      1.000000      -0.8953288     -12.18167
  15    6P      0.000000      -0.5005211      -6.80999

  * Total energy =   -32284.345788 ( Ryd. ) -439254.3519 (eV)
  * Energy parts ( Ryd. / eV )
           Kinetic        External       Hartree        Exchange    Correlation
       38521.616767  -79791.227391   12572.094660    -636.238154      -8.756768
      524117.4134  -1085623.4816    171053.4055     -8656.5291      -119.1428
 ------------------------------------------------------------------------------
    fcomp    =     1.500000
    rcutmx   =     2.700000 ...... max(rcut)
    rcomp    =     1.800000 ...... fcomp/max(rcut)
    NRCUT    =         1599 ...... r(NRCUT) = rcomp
    r(NRCUT) =     1.795296

  * G-function
    l =  0
    l =  2
    l =  4
    l =  6
    l =  8

  * Local pseudopotential
                    V_loc             V_AE              diff.
    0th derivs. :  -3.2784880961E+00 -3.2784880961E+00  2.9709568139E-12
    1st derivs. :   7.0221675041E+00  7.0221633698E+00  4.1343312986E-06
    2nd derivs. :  -1.8039191883E+01 -1.8037271847E+01  1.9200355815E-03
    3rd derivs. :   4.1489769101E+01  4.1582146415E+01  9.2377314879E-02
    4th derivs. :   3.5840738777E+02 -6.3158352783E+01  4.2156574055E+02

    Create : vloc.dat     
------------------------------------------------------------------------------

  * 6S
    Create : S_Pae.dat    

 ---- RRKJ2: Construction of Ultrasoft pseudo-wave-functions -----------------
    rcut(1636) = 2.59911288
    zero point of sphere bessel function (l=0)
      x0 =   0.000000  3.141593  6.283185  9.424778 12.566371

    Reference energy :  -0.8953288468
      qi =   0.619237  1.818146
      alpha = -3.196975E-03  1.185560E-03  5.804978E-04  2.098074E-03
                      P_US              P_AE              diff.
      1st derivs. :   3.6184685366E-04  3.6184943270E-04  2.5790458469E-09
      2nd derivs. :   2.8286216509E-02  2.8285501595E-02  7.1491408144E-07
      3rd derivs. :  -2.5537635678E-02 -2.5600464492E-02  6.2828814320E-05
      4th derivs. :  -3.9684698091E-01 -2.3719307632E-01  1.5965390459E-01

    Reference energy :  -0.1000000000
      qi =   0.912020  1.983121
      alpha = -3.998773E-03  1.865033E-03  3.902049E-04  1.617884E-03
                      P_US              P_AE              diff.
      1st derivs. :   9.5264365989E-03  9.5264387135E-03  2.1146403396E-09
      2nd derivs. :   4.9282394744E-02  4.9281791983E-02  6.0276174089E-07
      3rd derivs. :  -4.0711031935E-02 -4.0762340797E-02  5.1308862391E-05
      4th derivs. :  -6.8184856166E-01 -5.4740471093E-01  1.3444385073E-01

    Create : S_Pus.dat    

 ---- Prepare for Construction of pseudo-potentials --------------------------
    Create : S_chi.dat    
    Create : S_beta.dat   
    Create : S_Q_L=0.dat  

 ---- Solve the Generalized eigenequations -----------------------------------
    eig  :   -0.8953303818
    node :   0

 ---- Estimate plane-wave cutoff energies ------------------------------------
    Create : S_delE.dat   

    Create : S_Qbar.dat   


 ---- Estimate transferability -----------------------------------------------
    Create : S_chiae.dat  

    Create : S_chil.dat   


  * 6P
    Create : P_Pae.dat    

 ---- RRKJ2: Construction of Ultrasoft pseudo-wave-functions -----------------
    rcut(1639) = 2.67826765
    zero point of sphere bessel function (l=1)
      x0 =   0.000000  4.493409  7.725252 10.904122 14.066194

    Reference energy :  -0.5005211445
      qi =   0.763341  2.215258
      alpha =  2.218861E-05 -6.578995E-06 -2.871562E-06 -1.046503E-05
                      P_US              P_AE              diff.
      1st derivs. :   3.0056534015E-05  3.0056521132E-05  1.2883920683E-11
      2nd derivs. :  -1.2474674591E-04 -1.2474320775E-04  3.5381650725E-09
      3rd derivs. :  -1.7707542854E-04 -1.7676147770E-04  3.1395083890E-07
      4th derivs. :   1.6789974794E-03  8.8883318829E-04  7.9016429113E-04

    Reference energy :  -0.7000000000
      qi =   0.632218  2.193178
      alpha =  2.399741E-05 -6.417267E-06 -2.960597E-06 -1.061988E-05
                      P_US              P_AE              diff.
      1st derivs. :   4.0861560537E-05  4.0861547558E-05  1.2978949004E-11
      2nd derivs. :  -7.6146740831E-05 -7.6143186564E-05  3.5542668240E-09
      3rd derivs. :  -3.9366904852E-05 -3.9050495934E-05  3.1640891832E-07
      4th derivs. :   1.9420874520E-03  1.1482040863E-03  7.9388336577E-04

    Create : P_Pus.dat    

 ---- Prepare for Construction of pseudo-potentials --------------------------
    Create : P_chi.dat    
    Create : P_beta.dat   
    Create : P_Q_L=0.dat  
    Create : P_Q_L=2.dat  

 ---- Solve the Generalized eigenequations -----------------------------------
    eig  :   -0.5005201456
    node :   0

 ---- Estimate plane-wave cutoff energies ------------------------------------
    Create : P_delE.dat   

    Create : P_Qbar.dat   


 ---- Estimate transferability -----------------------------------------------
    Create : P_chiae.dat  

    Create : P_chil.dat   


  * 5D
    Create : D_Pae.dat    

 ---- RRKJ2: Construction of Ultrasoft pseudo-wave-functions -----------------
    rcut(1609) = 1.98410947
    zero point of sphere bessel function (l=2)
      x0 =   0.000000  5.763459  9.095011 12.322941 15.514603

    Reference energy :  -0.8619636351
      qi =   2.099735  3.809931
      alpha =  5.549641E-06  2.186663E-06 -2.601997E-07 -4.360540E-07
                      P_US              P_AE              diff.
      1st derivs. :  -1.7892077548E-06 -1.7892079802E-06  2.2534207878E-13
      2nd derivs. :  -4.2354445725E-06 -4.2354104529E-06  3.4119598235E-11
      3rd derivs. :   1.3958075220E-05  1.3964040899E-05  5.9656788489E-09
      4th derivs. :   3.4210786049E-06 -4.5136578800E-06  7.9347364849E-06

    Reference energy :  -1.5000000000
      qi =   1.831863  3.713274
      alpha =  6.499051E-06  2.441315E-06 -3.671212E-07 -6.564307E-07
                      P_US              P_AE              diff.
      1st derivs. :   1.5904402100E-06  1.5904397911E-06  4.1887157597E-13
      2nd derivs. :   6.1845238385E-06  6.1846048117E-06  8.0973147785E-11
      3rd derivs. :   4.7503548921E-05  4.7514298446E-05  1.0749524899E-08
      4th derivs. :   1.4933417882E-04  1.3102119612E-04  1.8312982708E-05

    Create : D_Pus.dat    

 ---- Prepare for Construction of pseudo-potentials --------------------------
    Create : D_chi.dat    
    Create : D_beta.dat   
    Create : D_Q_L=0.dat  
    Create : D_Q_L=2.dat  
    Create : D_Q_L=4.dat  

 ---- Solve the Generalized eigenequations -----------------------------------
    eig  :   -0.8619648473
    node :   0

 ---- Estimate plane-wave cutoff energies ------------------------------------
    Create : D_delE.dat   

    Create : D_Qbar.dat   


 ---- Estimate transferability -----------------------------------------------
    Create : D_chiae.dat  

    Create : D_chil.dat   

 ---start ele2---
    Create : ele.dat
    valence :    5.0000000000  68.0000000000   5.0118568607
 W_A.wps             
 W_S1.wps            
 W_S1.pwf            
 W_S1.ae             
 W_P3.wps            
 W_P3.pwf            
 W_P3.ae             
 W_D5.wps            
 W_D5.pwf            
 W_D5.ae             
 W_local             
  No. of valence electrons (soft part):   4.96634374014924     
  No. of valence electrons (hard part):  4.551312059342613E-002
  No. of valence electrons (  total  ):   5.01185686074267     
 W_val               

 ----- atomic calculation ended ( code : 0 ) -----

Compare all electron and pseudo wavefunctions

In [8]:
import numpy as np
import matplotlib.pyplot as plt

# figure size (inch)
figx, figy = 16, 4

# y range 
dymin, dymax = -0.0000015, 0.000004
symin, symax = -0.006, 0.006
pymin, pymax = -0.00002, 0.00005

# cutoff
dcut = 2
scut = 2.6
pcut = 2.7

dae0, dae1, dae2 = [], [], []
dps0, dps1, dps2 = [], [], []
sae0, sae1, sae2 = [], [], []
sps0, sps1, sps2 = [], [], []
pae0, pae1, pae2 = [], [], []
pps0, pps1, pps2 = [], [], []

#####    5d orbital

# AE wavefunctions
ffile1 = open('D_Pae.dat', 'r')
# PS wavefunctions
ffile2 = open('D_Pus.dat', 'r')

lines1 = ffile1.readlines()
lines2 = ffile2.readlines()

for line in lines1:
    dae0.append(float(line.split()[0]))
    dae1.append(float(line.split()[1]))
    dae2.append(float(line.split()[2]))
   
for line in lines2:
    dps0.append(float(line.split()[0]))
    dps1.append(float(line.split()[1]))
    dps2.append(float(line.split()[2]))

ffile1.close()
ffile2.close()

#####    6s orbital

# AE wavefunctions
ffile1 = open('S_Pae.dat', 'r')
# PS wavefunctions
ffile2 = open('S_Pus.dat', 'r')

lines1 = ffile1.readlines()
lines2 = ffile2.readlines()

for line in lines1:
    sae0.append(float(line.split()[0]))
    sae1.append(float(line.split()[1]))
    sae2.append(float(line.split()[2]))
   
for line in lines2:
    sps0.append(float(line.split()[0]))
    sps1.append(float(line.split()[1]))
    sps2.append(float(line.split()[2]))

ffile1.close()
ffile2.close()

#####    6p orbital

# AE wavefunctions
ffile1 = open('P_Pae.dat', 'r')
# PS wavefunctions
ffile2 = open('P_Pus.dat', 'r')

lines1 = ffile1.readlines()
lines2 = ffile2.readlines()

for line in lines1:
    pae0.append(float(line.split()[0]))
    pae1.append(float(line.split()[1]))
    pae2.append(float(line.split()[2]))
   
for line in lines2:
    pps0.append(float(line.split()[0]))
    pps1.append(float(line.split()[1]))
    pps2.append(float(line.split()[2]))

ffile1.close()
ffile2.close()

fig = plt.figure(figsize=(figx,figy))

# d-orbital
p1 = fig.add_subplot(131)
p1.plot(dps0, dps1, "blue")
p1.plot(dps0, dps2, "red")
p1.plot(dae0, dae1, "blue", linestyle='dashed')
p1.plot(dae0, dae2, "red", linestyle='dashed')
p1.vlines([dcut], dymin, dymax, linestyle='dotted')

p1.set_ylim(dymin, dymax)
p1.ticklabel_format(style='sci',axis='y',scilimits=(0,0))
p1.set_ylabel('Wavefunction', size=15)
# p1.set_xlabel('Radius (bohr)', size=15)
p1.legend(('PP_E=ae', 'PP_E=ref', 'AE_E=ae', 'AE_E=ref'), loc='upper right')
p1.set_title('5d orbital', size = 15)

# s-orbital
p2 = fig.add_subplot(132)
p2.plot(sps0, sps1, "blue")
p2.plot(sps0, sps2, "red")
p2.plot(sae0, sae1, "blue", linestyle='dashed')
p2.plot(sae0, sae2, "red", linestyle='dashed')
p2.vlines([scut], symin, symax, linestyle='dotted')

p2.set_ylim(symin, symax)
p2.ticklabel_format(style='sci',axis='y',scilimits=(0,0))
# p2.set_ylabel('Wavefunction', size=15)
p2.set_xlabel('Radius (bohr)', size=15)
p2.set_title('6s orbital', size = 15)

# p-obital
p3 = fig.add_subplot(133)
p3.plot(pps0, pps1, "blue")
p3.plot(pps0, pps2, "red")
p3.plot(pae0, pae1, "blue", linestyle='dashed')
p3.plot(pae0, pae2, "red", linestyle='dashed')
p3.vlines([pcut], pymin, pymax, linestyle='dotted')

p3.set_ylim(pymin, pymax)
p3.ticklabel_format(style='sci',axis='y',scilimits=(0,0))
# p3.set_ylabel('Wavefunction', size=15)
# p3.set_xlabel('Radius (bohr)', size=15)
p3.set_title('6p orbital', size = 15)


plt.show()

Compare logarithmic derivatives of all electron and pseudo wavefunctions

In [9]:
import numpy as np
import matplotlib.pyplot as plt

# figure size (inch)
figx, figy = 16, 4

# y range
ymin, ymax = -4, 4

dae0, dae1, dae2 = [], [], []
dps0, dps1, dps2 = [], [], []
sae0, sae1, sae2 = [], [], []
sps0, sps1, sps2 = [], [], []
pae0, pae1, pae2 = [], [], []
pps0, pps1, pps2 = [], [], []

#####    5d orbital

# AE wavefunctions
ffile1 = open('D_chiae.dat', 'r')
# PS wavefunctions
ffile2 = open('D_chil.dat', 'r')

lines1 = ffile1.readlines()
lines2 = ffile2.readlines()

for line in lines1:
    dae0.append(float(line.split()[0]))
    dae1.append(float(line.split()[1]))

for line in lines2:
    dps0.append(float(line.split()[0]))
    dps1.append(float(line.split()[1]))


ffile1.close()
ffile2.close()

#####    6s orbital

# AE wavefunctions
ffile1 = open('S_chiae.dat', 'r')
# PS wavefunctions
ffile2 = open('S_chil.dat', 'r')

lines1 = ffile1.readlines()
lines2 = ffile2.readlines()

for line in lines1:
    sae0.append(float(line.split()[0]))
    sae1.append(float(line.split()[1]))

for line in lines2:
    sps0.append(float(line.split()[0]))
    sps1.append(float(line.split()[1]))

ffile1.close()
ffile2.close()

#####    6p orbital

# AE wavefunctions
ffile1 = open('P_chiae.dat', 'r')
# PS wavefunctions
ffile2 = open('P_chil.dat', 'r')

lines1 = ffile1.readlines()
lines2 = ffile2.readlines()

for line in lines1:
    pae0.append(float(line.split()[0]))
    pae1.append(float(line.split()[1]))

for line in lines2:
    pps0.append(float(line.split()[0]))
    pps1.append(float(line.split()[1]))

ffile1.close()
ffile2.close()

fig = plt.figure(figsize=(figx,figy))

# d-orbital
p1 = fig.add_subplot(131)
p1.plot(dps0, dps1, "blue")
p1.plot(dae0, dae1, "red", linestyle='dashed')

p1.set_ylim(ymin, ymax)
p1.set_ylabel('Logarithmic derivative', size=15)
# p1.set_xlabel('Energy (Ry)', size=15)
p1.legend(('PP', 'AE'), loc='upper right')
p1.set_title('5d orbital', size = 15)

# s-orbital
p2 = fig.add_subplot(132)
p2.plot(sps0, sps1, "blue")
p2.plot(sae0, sae1, "red", linestyle='dashed')

p2.set_ylim(ymin, ymax)
# p2.set_ylabel('Logarithmic derivative', size=15)
p2.set_xlabel('Energy (Ry)', size=15)
p2.set_title('6s orbital', size = 15)

# p-obital
p3 = fig.add_subplot(133)
p3.plot(pps0, pps1, "blue")
p3.plot(pae0, pae1, "red", linestyle='dashed')

p3.set_ylim(ymin, ymax)
# p3.set_ylabel('Logarithmic derivative', size=15)
# p3.set_xlabel('Energy (Ry)', size=15)
p3.set_title('6p orbital', size = 15)


plt.show()

Estimation of plane-wave cutoff energies for wavefunctions

In [10]:
import numpy as np
import matplotlib.pyplot as plt

xmin, xmax = 0, 50
ymin, ymax = 0, 0.002

d0, d1 = [], []
s0, s1 = [], []
p0, p1 = [], []


ffile1 = open('D_delE.dat', 'r')
ffile2 = open('S_delE.dat', 'r')
ffile3 = open('P_delE.dat', 'r')

lines1 = ffile1.readlines()
lines2 = ffile2.readlines()
lines3 = ffile3.readlines()

for line in lines1:
    d0.append(float(line.split()[0]))
    d1.append(float(line.split()[1]))
for line in lines2:
    s0.append(float(line.split()[0]))
    s1.append(float(line.split()[1]))
for line in lines3:
    p0.append(float(line.split()[0]))
    p1.append(float(line.split()[1]))


fig = plt.gcf()

fig.set_size_inches(6.5, 4.5)

p1 = plt.plot(d0, d1, s0, s1, p0, p1)
p1 = plt.hlines([0.001], xmin, xmax, linestyle='dotted')

plt.xlim(xmin, xmax)
plt.ylim(ymin, ymax)
plt.ticklabel_format(style='sci',axis='y',scilimits=(0,0))
plt.ylabel('Relative energy (Ry)', size=15)
plt.xlabel('Energy (Ry)', size=15)
plt.legend(('d orbital', 's orbital', 'p orbital'), loc='upper right')

plt.show()

Estimation of plane-wave cutoff energies for electron densities

In [11]:
import numpy as np
import matplotlib.pyplot as plt

# figure size (inch)
figx, figy = 16, 4

sq0, sq1 = [], []
pq0, pq1, pq2 = [], [], []
dq0, dq1, dq2, dq3 = [], [], [], []


ffile1 = open('D_Qbar.dat', 'r')
ffile2 = open('S_Qbar.dat', 'r')
ffile3 = open('P_Qbar.dat', 'r')

lines1 = ffile1.readlines()
lines2 = ffile2.readlines()
lines3 = ffile3.readlines()

for line in lines1:
    dq0.append(float(line.split()[0]))
    dq1.append(float(line.split()[1]))
    dq2.append(float(line.split()[2]))
    dq3.append(float(line.split()[3]))

for line in lines2:
    sq0.append(float(line.split()[0]))
    sq1.append(float(line.split()[1]))

for line in lines3:
    pq0.append(float(line.split()[0]))
    pq1.append(float(line.split()[1]))
    pq2.append(float(line.split()[2]))

ffile1.close()
ffile2.close()
ffile3.close()


fig = plt.figure(figsize=(figx,figy))

# d-orbital
p1 = fig.add_subplot(131)
p1.plot(dq0, dq1, "blue")
p1.plot(dq0, dq2, "red")
p1.plot(dq0, dq3, "orange")

p1.ticklabel_format(style='sci',axis='y',scilimits=(0,0))
p1.set_ylabel('Fourier compornets', size=15)
# p1.set_xlabel('Energy (Ry)', size=15)
p1.legend(('L = 0', 'L = 2', 'L = 4'), loc='upper right')
p1.set_title('5d orbital', size = 15)

# s-orbital
p2 = fig.add_subplot(132)
p2.plot(sq0, sq1, "blue")

p2.ticklabel_format(style='sci',axis='y',scilimits=(0,0))
# p2.set_ylabel('Fourier compornets', size=15)
p2.set_xlabel('Energy (Ry)', size=15)
p2.set_title('6s orbital', size = 15)

# p-obital
p3 = fig.add_subplot(133)
p3.plot(pq0, pq1, "blue")
p3.plot(pq0, pq2, "red")

p3.ticklabel_format(style='sci',axis='y',scilimits=(0,0))
# p3.set_ylabel('Fourier compornets', size=15)
# p3.set_xlabel('Energy (Ry)', size=15)
p3.set_title('6p orbital', size = 15)


plt.show()