update new files
[unres.git] / source / maxlik / src_MD_T_maxlik-NEWCORR-PMF-5 / rescode.f
1       integer function rescode(iseq,nam,itype,lprn)
2       include 'DIMENSIONS'
3       include 'DIMENSIONS.ZSCOPT'
4       include 'COMMON.NAMES'
5       include 'COMMON.IOUNITS'
6       character*3 nam,ucase
7       logical lprn
8
9       if (itype.eq.0) then
10
11       do i=1,ntyp1
12         if (ucase(nam).eq.restyp(i)) then
13           rescode=i
14           return
15         endif
16       enddo
17
18       else
19
20       do i=1,ntyp1
21         if (nam(1:1).eq.onelet(i)) then
22           rescode=i
23           return  
24         endif  
25       enddo
26
27       endif
28
29       if (lprn) write (iout,10) iseq,nam
30       rescode=0
31       return
32    10 format ('**** Error - residue',i4,' has an unresolved name ',a3)
33       end
34