Skip to content

Commit c19cbe7

Browse files
committed
Allow for comment lines in SRC_templates (newer Wien2k versions)
1 parent 8943404 commit c19cbe7

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

fortran/dmftproj/set_ang_trans.f

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,24 @@ SUBROUTINE set_ang_trans
128128
OPEN(iumatfile,file=fullpath,status='old')
129129
ind=-l
130130
irep=0
131-
DO m=-l,l
131+
m = -l
132+
DO WHILE (m.le.l)
132133
READ(iumatfile,'(a)')buf1
133134
READ(buf1(1:1),'(a)')repsign
134-
IF(repsign=='*') THEN
135+
C Get rid of comment lines first
136+
IF (repsign.NE.'#') THEN
137+
IF(repsign=='*') THEN
135138
C Finding the different ireps in the new basis (a "*" means the end of an irep)
136-
irep=irep+1
137-
degrep(irep)=m-ind+1
138-
ind=m+1
139-
ENDIF
140-
READ(buf1(2:250),*)(rtrans(m1),itrans(m1),m1=-l,l)
139+
irep=irep+1
140+
degrep(irep)=m-ind+1
141+
ind=m+1
142+
ENDIF
143+
READ(buf1(2:250),*)(rtrans(m1),itrans(m1),m1=-l,l)
141144
C The line of the file is stored in the column of reptrans, which is temporarly "P".
142-
reptrans(l,isrt)%transmat(-l:l,m)=
143-
& CMPLX(rtrans(-l:l),itrans(-l:l))
145+
reptrans(l,isrt)%transmat(-l:l,m)=
146+
& CMPLX(rtrans(-l:l),itrans(-l:l))
147+
m = m + 1
148+
ENDIF
144149
ENDDO
145150
reptrans(l,isrt)%transmat(-l:l,-l:l)=
146151
= TRANSPOSE(CONJG(reptrans(l,isrt)%transmat(-l:l,-l:l)))

0 commit comments

Comments
 (0)