[e40e335] | 1 | c**************************************************************
|
---|
| 2 | c
|
---|
| 3 | c This file contains the subroutines: nursvr, nursat
|
---|
| 4 | c
|
---|
| 5 | c Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,
|
---|
| 6 | c Shura Hayryan, Chin-Ku
|
---|
| 7 | c Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann,
|
---|
| 8 | c Jan H. Meinke, Sandipan Mohanty
|
---|
| 9 | c
|
---|
| 10 | c **************************************************************
|
---|
| 11 | integer*4 function nursvr(ivr)
|
---|
| 12 |
|
---|
| 13 | c ...........................................................
|
---|
| 14 | c PURPOSE: defines index of residue for given variable 'ivr'
|
---|
| 15 | c
|
---|
| 16 | c CALLS: none
|
---|
| 17 | c
|
---|
| 18 | c ...........................................................
|
---|
| 19 | include 'INCL.H'
|
---|
| 20 |
|
---|
| 21 | do i=ntlml,1,-1
|
---|
| 22 | ifirs=irsml1(i)
|
---|
| 23 | if (ivr.ge.ivrrs1(ifirs).and.nvrml(i).gt.0) then
|
---|
| 24 | do j=irsml2(i),ifirs,-1
|
---|
| 25 | if (ivr.ge.ivrrs1(j).and.nvrrs(j).gt.0) then
|
---|
| 26 | nursvr=j
|
---|
| 27 | return
|
---|
| 28 | endif
|
---|
| 29 | enddo
|
---|
| 30 | endif
|
---|
| 31 | enddo
|
---|
| 32 |
|
---|
| 33 | write (*,'(a,i5)') ' nursvr > Cannot find variable # ',ivr
|
---|
| 34 | stop
|
---|
| 35 |
|
---|
| 36 | end
|
---|
| 37 |
|
---|
| 38 | c **********************************
|
---|
| 39 | integer*4 function nursat(iat)
|
---|
| 40 |
|
---|
| 41 | c .......................................................
|
---|
| 42 | c PURPOSE: defines index of residue for given atom 'iat'
|
---|
| 43 | c .......................................................
|
---|
| 44 |
|
---|
| 45 | include 'INCL.H'
|
---|
| 46 |
|
---|
| 47 | do i=1,ntlml
|
---|
| 48 |
|
---|
| 49 | ifirs=irsml1(i)
|
---|
| 50 | ilars=irsml2(i)
|
---|
| 51 |
|
---|
| 52 | if (iat.ge.iatrs1(ifirs).and.iat.le.iatrs2(ilars)) then
|
---|
| 53 |
|
---|
| 54 | do j=ifirs,ilars
|
---|
| 55 |
|
---|
| 56 | if (iat.ge.iatrs1(j).and.iat.le.iatrs2(j)) then
|
---|
| 57 |
|
---|
| 58 | nursat=j
|
---|
| 59 |
|
---|
| 60 | return
|
---|
| 61 | endif
|
---|
| 62 |
|
---|
| 63 | enddo
|
---|
| 64 |
|
---|
| 65 | endif
|
---|
| 66 | enddo
|
---|
| 67 |
|
---|
| 68 | write (*,'(a,i5)') ' nursat > Cannot find atom # ',iat
|
---|
| 69 | stop
|
---|
| 70 |
|
---|
| 71 | end
|
---|