Skip to content
Snippets Groups Projects
Commit 38dbc4cf authored by Philipp Rüssmann's avatar Philipp Rüssmann
Browse files

Write G_LL'(k,E) to npy files

Works only for the Chebychev solver and for this combination of inputs:

<use_chebychev_solver>=  T # requires Chebychev solver
<calc_gmat_lm_full>= T     # activates computation of the full Gmat
<gflle_to_npy>=  T         # switch from writing a fortran file (gflle) to numpy npy files for each atom and energy
<use_qdos>=  T             # optional, use qvecs from qdos mode for k-points

This version is still experimental.
parent a34347b9
No related branches found
No related tags found
No related merge requests found
......@@ -389,6 +389,7 @@ add_library(lib_kkrhost STATIC
source/KKRhost/wrmoms.f90
source/KKRhost/wunfiles.F90
source/KKRhost/ylag.f90
source/KKRhost/write_gflle_npy.f90
)
# disable cmake auto add of 'lib' prefix to .so file
SET_TARGET_PROPERTIES(lib_kkrhost PROPERTIES PREFIX "")
......
......@@ -41,7 +41,7 @@ contains
use :: mod_save_wavefun, only: t_wavefunctions, read_wavefunc
use :: mod_runoptions, only: calc_exchange_couplings, calc_gmat_lm_full, disable_tmat_sratrick, fix_nonco_angles, &
use_qdos, write_complex_qdos, write_pkkr_operators, write_DOS_lm, set_cheby_nospeedup, &
decouple_spins_cheby, disable_print_serialnumber
decouple_spins_cheby, disable_print_serialnumber, gflle_to_npy
use :: mod_version_info, only: version_print_header
use :: global_variables, only: lmmaxd, iemxd, ncleb, lmxspd, irmd, ntotd, nrmaxd, lmpotd, nspotd, nfund, korbit, mmaxd, nspind, angles_cutoff
use :: mod_constants, only: czero, cvlight, cone, pi, ci
......@@ -62,6 +62,7 @@ contains
use :: mod_wunfiles, only: t_params
use :: mod_bfield, only: add_bfield
use :: mod_torque, only: calc_torque
use mod_write_gflle, only: write_gflle_to_npy
implicit none
......@@ -400,7 +401,7 @@ contains
#else
i1_myrank = i1 ! lmlm-dos ruess
#endif
if ((calc_gmat_lm_full) .and. (i1_myrank==1)) then ! lmlm-dos ruess
if ((calc_gmat_lm_full) .and. (i1_myrank==1) .and..not.gflle_to_npy) then ! lmlm-dos ruess
lrecgflle = nspin*(1+korbit)*lmmaxd*lmmaxd*ielast*nqdos ! lmlm-dos ruess
open (91, access='direct', recl=lrecgflle, file='gflle' & ! lmlm-dos ruess
, form='unformatted', status='replace', err=110, iostat=ierr) ! lmlm-dos ruess
......@@ -984,7 +985,11 @@ contains
if (t_inc%i_write>0) then ! lmlm-dos
write (1337, *) 'gflle:', shape(gflle), shape(gflle_part), lrecgflle ! lmlm-dos
end if ! lmlm-dos
write (91, rec=i1) gflle ! lmlm-dos
if (gflle_to_npy) then
call write_gflle_to_npy(lmmaxd, ielast, nqdos, i1, gflle)
else
write (91, rec=i1) gflle ! lmlm-dos
end if
end if ! lmlm-dos
allocate (rhotemp(irmdnew,lmpotd), stat=i_stat)
......
This diff is collapsed.
......@@ -25,6 +25,7 @@ module mod_runoptions
logical :: calc_exchange_couplings = .false. !!calculate magnetic exchange coupling parameters (former: 'XCPL')
logical :: calc_exchange_couplings_energy = .false. !!write energy-resolved Jij-files also if npol/=0 (former: 'Jijenerg')
logical :: calc_gmat_lm_full = .false. !!calculate all lm-lm components of systems greens function and store to file `gflle` (former: 'lmlm-dos')
logical :: gflle_to_npy = .false. !!write gflle file to npy instead of to gflle file (contains G(k,e)LL'
logical :: dirac_scale_SpeefOfLight = .false. !!scale the speed of light for Dirac solver (former: 'CSCALE')
logical :: disable_charge_neutrality = .false. !!no charge neutrailty required: leaving Fermi level unaffected (former: 'no-neutr')
logical :: disable_print_serialnumber = .false. !!deactivate writing of serial number and version information to files (for backwards compatibility) (former: 'noserial')
......@@ -155,6 +156,7 @@ module mod_runoptions
call set_runoption(write_lloyd_tralpha_file , '<write_lloyd_tralpha_file>' , '<wrttral>' )
call set_runoption(write_lloyd_cdos_file , '<write_lloyd_cdos_file>' , '<wrtcdos>' )
call set_runoption(calc_gmat_lm_full , '<calc_gmat_lm_full>' , '<lmlm-dos>')
call set_runoption(gflle_to_npy , '<gflle_to_npy>')
call set_runoption(simulate_asa , '<simulate_asa>' , '<simulasa>')
call set_runoption(use_readcpa , '<use_readcpa>' , '<readcpa>' )
call set_runoption(print_kpoints , '<print_kpoints>' , '<BZKP>' )
......@@ -694,6 +696,7 @@ module mod_runoptions
call mpi_bcast(write_lloyd_tralpha_file , 1, mpi_logical, master, mpi_comm_world, ierr)
call mpi_bcast(write_lloyd_cdos_file , 1, mpi_logical, master, mpi_comm_world, ierr)
call mpi_bcast(calc_gmat_lm_full , 1, mpi_logical, master, mpi_comm_world, ierr)
call mpi_bcast(gflle_to_npy , 1, mpi_logical, master, mpi_comm_world, ierr)
call mpi_bcast(simulate_asa , 1, mpi_logical, master, mpi_comm_world, ierr)
call mpi_bcast(use_readcpa , 1, mpi_logical, master, mpi_comm_world, ierr)
call mpi_bcast(print_kpoints , 1, mpi_logical, master, mpi_comm_world, ierr)
......@@ -800,6 +803,7 @@ module mod_runoptions
write(iounit, '(A35,1x,1L,3x,A)') '<calc_exchange_couplings>=', calc_exchange_couplings, "calculate magnetic exchange coupling parameters (former: 'XCPL')"
write(iounit, '(A35,1x,1L,3x,A)') '<calc_exchange_couplings_energy>=', calc_exchange_couplings_energy, "write energy-resolved Jij-files also if npol/=0 (former: 'Jijenerg')"
write(iounit, '(A35,1x,1L,3x,A)') '<calc_gmat_lm_full>=', calc_gmat_lm_full, "calculate all lm-lm components of systems greens function and store to file `gflle` (former: 'lmlm-dos')"
write(iounit, '(A35,1x,1L,3x,A)') '<gflle_to_npy>=', gflle_to_npy, "Write G_LL'(k,E) to npy files, one file per atom and energy"
write(iounit, '(A35,1x,1L,3x,A)') '<dirac_scale_SpeefOfLight>=', dirac_scale_SpeefOfLight, "scale the speed of light for Dirac solver (former: 'CSCALE')"
write(iounit, '(A35,1x,1L,3x,A)') '<disable_charge_neutrality>=', disable_charge_neutrality, "no charge neutrailty required: leaving Fermi level unaffected (former: 'no-neutr')"
write(iounit, '(A35,1x,1L,3x,A)') '<disable_print_serialnumber>=', disable_print_serialnumber, "deactivate writing of serial number and version information to files (for backwards compatibility) (former: 'noserial')"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment