X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_Eshel%2Frescode.f;fp=source%2Funres%2Fsrc_Eshel%2Frescode.f;h=2973ef9529f86eace91eee011b4595ca4317aa07;hb=d101c97dea752458d76055fdbae49c26fff03c1f;hp=0000000000000000000000000000000000000000;hpb=325eda160c9ad2982501e091ca40606a29043712;p=unres.git diff --git a/source/unres/src_Eshel/rescode.f b/source/unres/src_Eshel/rescode.f new file mode 100644 index 0000000..2973ef9 --- /dev/null +++ b/source/unres/src_Eshel/rescode.f @@ -0,0 +1,32 @@ + integer function rescode(iseq,nam,itype) + implicit real*8 (a-h,o-z) + include 'DIMENSIONS' + include 'COMMON.NAMES' + include 'COMMON.IOUNITS' + character*3 nam,ucase + + 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 + + write (iout,10) iseq,nam + stop + 10 format ('**** Error - residue',i4,' has an unresolved name ',a3) + end +