script_fermi_lines Subroutine

private subroutine script_fermi_lines(scriptunit, seedname, fermi_energy_list)

Uses

  • proc~~script_fermi_lines~~UsesGraph proc~script_fermi_lines script_fermi_lines module~w90_constants w90_constants proc~script_fermi_lines->module~w90_constants

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: scriptunit
character(len=50), intent(in) :: seedname
real(kind=dp), intent(in), allocatable :: fermi_energy_list(:)

Called by

proc~~script_fermi_lines~~CalledByGraph proc~script_fermi_lines script_fermi_lines proc~k_slice k_slice proc~k_slice->proc~script_fermi_lines program~postw90 postw90 program~postw90->proc~k_slice

Source Code

  subroutine script_fermi_lines(scriptunit, seedname, fermi_energy_list)
    !================================================!

    use w90_constants, only: dp
    implicit none
    real(kind=dp), allocatable, intent(in) :: fermi_energy_list(:)
    integer, intent(in) :: scriptunit
    character(len=50), intent(in)  :: seedname

    write (scriptunit, '(a)') &
      "# Energy level for isocontours (typically the Fermi level)"
    write (scriptunit, '(a,f12.6)') "ef=", fermi_energy_list(1)
    write (scriptunit, '(a)') " "
    write (scriptunit, '(a)') &
      "bands=np.loadtxt('"//trim(seedname)//"-kslice-bands.dat')"
    write (scriptunit, '(a)') "numbands=bands.size//num_pt"
    write (scriptunit, '(a)') "if square:"
    write (scriptunit, '(a)') &
      "  bbands=bands.reshape((dimy,dimx,numbands))"
    write (scriptunit, '(a)') "  for i in range(numbands):"
    write (scriptunit, '(a)') "    Z=bbands[:,:,i]"
    write (scriptunit, '(a)') "    pl.contour(x_coord,y_coord,Z," &
      //"[ef],colors='black')"
    write (scriptunit, '(a)') "else:"
    write (scriptunit, '(a)') "  bbands=bands.reshape((num_pt," &
      //"numbands))"
    write (scriptunit, '(a)') "  bandint=[]"
    write (scriptunit, '(a)') "  grid_x, grid_y = np.meshgrid(xint,yint)"
    write (scriptunit, '(a)') "  for i in range(numbands):"
    write (scriptunit, '(a)') "    bandint.append(interpolate.griddata" &
      //"((points_x,points_y), bbands[:,i], (grid_x,grid_y), " &
      //"method='nearest'))"
    write (scriptunit, '(a)') "    pl.contour(grid_x,grid_y," &
      //"bandint[i],[ef],colors='black')"

  end subroutine script_fermi_lines