program rw_ints c **************** Program RW_INTS ***************** c This program is designed to read the one- and two- c electron AO integrals (in Dirac <12|12> c convention) from user input and put them out to c disk in canonical order. c c Copyright (C) 1992 Jeff Nichols and Jack Simons c c ************************************************** implicit real (a-h,o-z) logical yesno character*30 dfname, fname, dscrpt include "limits.h" itotal=10 call modinfo('rw_ints ') call shwmem('rw_ints ',itotal) call goon 10 continue c c Open the integral file. c dscrpt = '1e- and 2e- integrals' ids = 21 dfname = 'integrals.dat' idf = 13 fname = ' ' ifn = 30 iflnum = 30 call wfile(fname,ifn,dscrpt,ids,dfname,idf,iflnum,yesno) write(*,*) write(*,*)' Input the number of orbitals in your system: ' read(*,*)iorb if(iorb.gt.maxorb)then write(*,1010)maxorb goto 10 endif call inp1e(iorb,yesno) call inp2e(iorb,yesno) c c Close 1e- and 2e- integrals file. c close(unit=30) call qmexit stop 1010 format(' Maximum number of orbitals is ',I2,'. ',/, & ' Please try again. ') end subroutine inp1e(numorb,yesno) implicit real (a-h,o-z) logical yesno character*1 ans c c Read in the one-electron integrals. c write(*,*)' Begin processing one-electron ao integrals. ' do 30 i = 1,numorb do 20 j = 1,i 10 continue write(*,1000)i,j read(*,*)value write(*,1010)i,j,value write(*,*)' is this correct? ' read(*,'(a)')ans if(ans.eq.'Y'.or.ans.eq.'y')then if(yesno)write(30,1020)value else goto 10 endif 20 continue 30 continue return 1000 format(' Input the value of ao integral <',i2,',',i2,'>:' ) 1010 format(' Input integral <',i2,',',i2,'> is: ',f15.8) 1020 format(1x,f15.8) end subroutine inp2e(numorb,yesno) implicit real (a-h,o-z) logical yesno character*1 ans c c Read in the two-electron integrals. c write(*,*)' Begin processing two-electron ao integrals. ' do 50 i = 1,numorb do 40 k = 1,i do 30 j = 1,i lend = j if(i.eq.j)lend = k do 20 l = 1,lend 10 continue write(*,1000)i,j,k,l read(*,*)value write(*,1010)i,j,k,l,value write(*,*)' is this correct? ' read(*,'(a)')ans if(ans.eq.'Y'.or.ans.eq.'y')then if(yesno)write(30,1020)value else goto 10 endif 20 continue 30 continue 40 continue 50 continue return 1000 format(' Input the value of ao integral <',i2,',',i2, & ' | ',i2,',',i2,'>:') 1010 format(' Input integral <',i2,',',i2,' | ',i2,',',i2, & '> is: ',f15.8) 1020 format(1x,f15.8) end