c c PROGRAM MEGEN c by TOMASZ CZOSNYKA c character*1 ans dimension xlev(50,4) open(11,file='levels.inp',status='old') open(12,file='me.out',status='unknown') 99 format(1a1) nul=0 nuni=1 98 format(1x,1i1,1x,1i1,1x,1i1,1x,1i1,1x,1i1) 97 format(1x,1i2,1x,1i2,1x,1i1,1x,1f5.1,1x,1f5.1) 96 format(1x,1i2,1x,1i3,1x,1i1,1x,1i2,1x,1i2) nlev=0 do 1 i=1,50 read(11,*)(xlev(i,j),j=1,4) if(xlev(i,1).lt..5)go to 2 nlev=nlev+1 1 continue 2 continue do 3 m=1,8 write(*,*)m write(*,*)'Create setup for this multipolarity (y/n)' read(*,99)ans if(ans.ne.'y'.and.ans.ne.'Y')go to 3 write(*,*)'Do you want them coupled ?' read(*,99)ans icpl=0 if(ans.eq.'y'.or.ans.eq.'Y')icpl=1 write(*,*)'Please give limit value' read(*,*)xlim if(icpl.eq.1)write(*,*)'Please specify the master matrix element' if(icpl.eq.1)read(*,*)jm1,jm2 write(12,98)m,nul,nul,nul,nul do 4 l=1,nlev do 5 ly=l,nlev sp=abs(xlev(l,3)-xlev(ly,3)) ssp=xlev(l,3)+xlev(ly,3) mssp=int(ssp+.01) msp=int(sp+.01) mr=m if(m.gt.6)mr=m-6 if(msp.gt.mr)go to 5 if(mr.gt.mssp)go to 5 pr=xlev(l,2)*xlev(ly,2) if((m.eq.1.or.m.eq.3.or.m.eq.5.or.m.eq.8).and.pr.gt.0.)go to 5 if((m.eq.2.or.m.eq.4.or.m.eq.6.or.m.eq.7).and.pr.lt.0.)go to 5 if(icpl.eq.1.and.l.eq.jm1.and.ly.eq.jm2)write(12,97)l,ly,nuni, $-xlim,xlim if(icpl.eq.1)write(12,96)l,-ly,nuni,jm1,jm2 if(icpl.eq.0)write(12,97)l,ly,nuni,-xlim,xlim 5 continue 4 continue 3 continue write(12,98)nul,nul,nul,nul,nul stop end