TABLE OF CONTENTS


::pwtk::lobster::plot

SYNOPSIS

proc ::pwtk::lobster::plot {args} {

USAGE

   ::pwtk::lobster::plot  ?-dir DIR?  ?PLOTTING-OPTIONS?  ?STANDARD-PLOTTING-OPTIONS?  PROPERTY_INTERACTIONS_LIST  ?HEAD?

   where PLOTTING-OPTIONS are:
    
      -xE
      -cohp+
      -int
      -sumspin
      -fill
      -dt_dw DASHTYPE
      -ft_dw TRANSPARENCY

   For STANDARD-PLOTTING-OPTIONS, see: ::pwtk::plot

OPTION

PLOTTING OPTIONS

ARGUMENTS

DESCRIPTION

This command plots the LOBSTER-calculated data using the following operations:

Which LOBSTER-calculated data to plot is specified with the PROPERTY_INTERACTIONS_LIST argument, which is a list consisting of the "property interactionList" pairs, where:

       (i1+i2+i3)/3.0+i4

Here is the PROPERTY_INTERACTIONS_LIST example:

    set PROPERTY_INTERACTIONS_LIST {    
         COHP  {i0 (i1+i2+i3)/3.0}    
         COOP  {i0 (i1+i2+i3)/3.0}
    }

With such a specification, two COHP curves and two COOP curves would be plotted in a single plot with the first curve corresponding to 'i0' and the second to '(i1+i2+i3)/3.0'.

The meaning of the 'iX' strings is explained in the header of the transformed *CAR*.dat file (this transformation can also be achieved manually with the ::pwtk::lobster::datafy command). Here are two examples:

  * header of the COHPCAR.dat file:

     # ESCALE ; pCOHP file generated by LOBSTER. Energy is shifted such that the Fermi level lies at 0 eV.
     # non-shifted Emin = 3.10273e+00 eV, Emax = 1.91529e+01 eV, Efermi = 1.31341e+01 eV; npoints = 321
     # nspin = 2
     # number of interactions = 4  (including the Average)
     # iX indices of COHP interactions:
     # i0 = Average
     # i1 = No.1:Fe1->Ni2(2.513764596130672)
     # i2 = No.2:Fe1->Ni3(2.513764596130672)
     # i3 = No.3:Fe1->Ni4(2.513764596130672)
  
  * header of the DOSCAR.orbatom1.dat file:

     # Projected DOS to atom 1 (Z= 26): 4s 4p_y 4p_z 4p_x 3d_xy 3d_yz 3d_z^2 3d_xz 3d_x^2-y^2
     # Energy is shifted such that the Fermi level lies at 0 eV.
     # non-shifted Emin = 3.10273151 eV, Emax = 19.15288825 eV, Efermi = 13.13407947 eV; npoints = 321
     # nspin = 2
     # nproj = 10  (including the sum)
     # iX indices of DOS components:
     # i0 = sum
     # i1 = 4s
     # i2 = 4p_y
     # i3 = 4p_z
     # i4 = 4p_x
     # i5 = 3d_xy
     # i6 = 3d_yz
     # i7 = 3d_z^2
     # i8 = 3d_xz
     # i9 = 3d_x^2-y^2

DOS plotting specifics

PWTK tranforms DOSCAR.lobster and DOSCAR.LSO.lobster files into the following *.dat files suitable for Gnuplot plotting:

while DOSCAR.LCFO.lobster is transformed into the following *.dat files:

These files (i.e. their data) can be accessed in the PROPERTY_INTERACTIONS_LIST by specifying, e.g., DOS.atom, DOS.orbatom2, or DOS.LCFO.orbfrag1 as the property.

Summing atom and fragment DOSes

The DOSCAR.orbatomX.dat and DOSCAR.orbfragX.dat files can be summed with the ::pwtk::lobster::sumdos command. For example, to obtain the DOS projected to atoms 2, 3, 4, and 5, one can use:

    ::pwtk::lobster::sumdos 2-4,5 DOSCAR

which creates:

or:

Analogously:

    ::pwtk::lobster::sumdos 2-4,5 DOSCAR.LCFO

creates either DOSCAR.orbfrag2-4,5.dat or DOSCAR.frag2-4,5.dat depending on whether fragments 2-4,5 have compatible fragment orbitals or not.

These files (i.e. their data) can be accessed in the PROPERTY_INTERACTIONS_LIST by specifying, e.g., DOS.atom2-4,5 or DOS.orbatom2-4,5 or DOS.LCFO.orbfrag2-4,5 as the property.

EXAMPLE

    # plot two COOP and two COHP curves in a single plot, corresponding 
    # to 'i0' and average of i1,i2,i3 interactions (i.e. (i1+i2+i3)/3.0)

    ::pwtk::lobster::plot -fill -xf '' {
         COOP  {i0 (i1+i2+i3)/3.0}    
         COHP  {i0 (i1+i2+i3)/3.0}
    }

    # plot DOS projected to atom1, atom2, and the sum of atom1 and atom2

    ::pwtk::lobster::plot -xE -fill -xf '' {
         DOS.atom i1
         DOS.atom i2
         DOS.atom i1+i2
    }

    # plot DOS projected to atom1 and the sum of its sp orbitals and d orbitals

    ::pwtk::lobster::plot -xE -fill -xf '' {
         DOS.orbatom1 {i0  i1+i2+i3+i4   i5+i6+i7+i8+i9}
    }

    # N.B. to learn about the meaning of iX strings, run in the PWTK prompt:  ::pwtk::lobster::datafy DOS
    # and look into the generated DOSCAR.orbatom1.dat file, i.e.:    
    #    i0 = sum
    #    i1 = 4s
    #    i2 = 4p_y
    #    i3 = 4p_z
    #    i4 = 4p_x
    #    i5 = 3d_xy
    #    i6 = 3d_yz
    #    i7 = 3d_z^2
    #    i8 = 3d_xz
    #    i9 = 3d_x^2-y^2

RETURN VALUE

Filename of the created Gnuplot plot (for file terminals) or the empty string (for window terminals).

SOURCE

    printTitle "Plotting LOBSTER data"

    set type plot
    set arg1 FILE_INTERACTION_LIST
    xplotParseCmdline_

    ::pwtk::eval_in_dir $opt(dir) {
        if { $opt(xE) } {
            ifset opt(yl) [label_ [lindex $FILE_INTERACTION_LIST 0] $opt(cohp+)]
        } else {
            ifset opt(xl) [label_ [lindex $FILE_INTERACTION_LIST 0] $opt(cohp+)]
        }

        set ax2 [expr { $opt(xE) ? "y2l" : "x2l" }]
        if { $opt(int) && $opt($ax2) eq {} } {
            set opt($ax2) "Integrated"
        }    
        
        set font $::pwtk::gp::gp(font),[expr round(0.85*$::pwtk::gp::gp(fontSize))]
        set gp [::pwtk::gp::plot new -s $opt(s) $head.$opt(t)]
        $gp cmdlineOpts opt
        $gp set key  "top left Left reverse samplen 1 noenhanced font '$font'"
        
        if { $opt(int) } {
            if { $opt(xE) } {
                $gp options { ytics nomirror y2tics { } }
            } else {
                $gp options { xtics nomirror x2tics { } }
            }
        }

        set fileL {}
        set datL  {}
        $gp plot [plot_ opt fileL datL $FILE_INTERACTION_LIST]
        
        set result [::pwtk::gp::execDisplay_ $gp opt]
    }
    return $result
}