From c19cbe797165f8ead25137acde536b036c288d60 Mon Sep 17 00:00:00 2001 From: aichhorn Date: Mon, 16 Sep 2024 14:29:58 +0200 Subject: [PATCH] Allow for comment lines in SRC_templates (newer Wien2k versions) --- fortran/dmftproj/set_ang_trans.f | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/fortran/dmftproj/set_ang_trans.f b/fortran/dmftproj/set_ang_trans.f index e6b2493d..361893ef 100644 --- a/fortran/dmftproj/set_ang_trans.f +++ b/fortran/dmftproj/set_ang_trans.f @@ -128,19 +128,24 @@ C Reading of the file OPEN(iumatfile,file=fullpath,status='old') ind=-l irep=0 - DO m=-l,l + m = -l + DO WHILE (m.le.l) READ(iumatfile,'(a)')buf1 READ(buf1(1:1),'(a)')repsign - IF(repsign=='*') THEN +C Get rid of comment lines first + IF (repsign.NE.'#') THEN + IF(repsign=='*') THEN C Finding the different ireps in the new basis (a "*" means the end of an irep) - irep=irep+1 - degrep(irep)=m-ind+1 - ind=m+1 - ENDIF - READ(buf1(2:250),*)(rtrans(m1),itrans(m1),m1=-l,l) + irep=irep+1 + degrep(irep)=m-ind+1 + ind=m+1 + ENDIF + READ(buf1(2:250),*)(rtrans(m1),itrans(m1),m1=-l,l) C The line of the file is stored in the column of reptrans, which is temporarly "P". - reptrans(l,isrt)%transmat(-l:l,m)= - & CMPLX(rtrans(-l:l),itrans(-l:l)) + reptrans(l,isrt)%transmat(-l:l,m)= + & CMPLX(rtrans(-l:l),itrans(-l:l)) + m = m + 1 + ENDIF ENDDO reptrans(l,isrt)%transmat(-l:l,-l:l)= = TRANSPOSE(CONJG(reptrans(l,isrt)%transmat(-l:l,-l:l)))