@@ -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
135138C 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)
141144C 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