integer function rescode(iseq,nam,itype,lprn) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' include 'COMMON.NAMES' include 'COMMON.IOUNITS' character*3 nam,ucase logical lprn if (itype.eq.0) then do i=1,ntyp1 if (ucase(nam).eq.restyp(i)) then rescode=i return endif enddo else do i=1,ntyp1 if (nam(1:1).eq.onelet(i)) then rescode=i return endif enddo endif if (lprn) write (iout,10) iseq,nam rescode=0 return 10 format ('**** Error - residue',i4,' has an unresolved name ',a3) end