[e40e335] | 1 | ! **************************************************************
|
---|
| 2 | !
|
---|
| 3 | ! This file contains the subroutines: outvar
|
---|
| 4 | !
|
---|
| 5 | ! Copyright 2005 Frank Eisenmenger, U.H.E. Hansmann,
|
---|
[32289cd] | 6 | ! Shura Hayryan, Chin-Ku
|
---|
[bd2278d] | 7 | ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann,
|
---|
| 8 | ! Jan H. Meinke, Sandipan Mohanty
|
---|
[e40e335] | 9 | !
|
---|
| 10 | ! **************************************************************
|
---|
[32289cd] | 11 |
|
---|
[e40e335] | 12 | subroutine outvar(nml,fileName)
|
---|
[32289cd] | 13 |
|
---|
[e40e335] | 14 | !--------------------------------------------------------------------
|
---|
[32289cd] | 15 | ! Output of variables of the current protein conformation
|
---|
| 16 | !-
|
---|
[e40e335] | 17 | ! nml != 0 : molecule index
|
---|
| 18 | ! nml = 0 : all molecules
|
---|
| 19 | ! fileName = '' : write to standard output
|
---|
| 20 | ! fileName != '' : write into file with name
|
---|
| 21 | !
|
---|
| 22 | ! CALLS: iendst,iopfil,ibegst,nursvr
|
---|
| 23 | !-------------------------------------------------------------------
|
---|
| 24 |
|
---|
| 25 | include 'INCL.H'
|
---|
| 26 |
|
---|
[32289cd] | 27 | integer nml, ibegst, iout
|
---|
| 28 |
|
---|
[e40e335] | 29 | character*(*) fileName
|
---|
| 30 |
|
---|
| 31 | if (nml.lt.0.or.nml.gt.ntlml) then
|
---|
[38d77eb] | 32 | write (logString, *) ' outvar> No such molecule #',nml,' !'
|
---|
[e40e335] | 33 | return
|
---|
| 34 | endif
|
---|
| 35 |
|
---|
| 36 | if (ibegst(fileName).gt.0) then
|
---|
| 37 | iout = 98
|
---|
| 38 | open(iout, file=fileName, status='unknown')
|
---|
| 39 | else
|
---|
| 40 | iout = 6
|
---|
| 41 | endif
|
---|
| 42 |
|
---|
| 43 | call outvbs(nml, iout)
|
---|
| 44 |
|
---|
| 45 | if (iout.ne.6) close(iout)
|
---|
| 46 |
|
---|
| 47 | return
|
---|
| 48 | end
|
---|
| 49 |
|
---|
| 50 | subroutine outvbs(nml, iout)
|
---|
| 51 |
|
---|
| 52 | include 'INCL.H'
|
---|
| 53 |
|
---|
[32289cd] | 54 | integer nml, im1, im2, iml, i, iout, ibegst, ifivr, is, nursvr, it
|
---|
| 55 |
|
---|
[e40e335] | 56 | character mlfd*7,strg(6)*17
|
---|
| 57 |
|
---|
| 58 | if (nml.lt.0.or.nml.gt.ntlml) then
|
---|
[38d77eb] | 59 | write (logString, *) ' outvbs> No such molecule #',nml,' !'
|
---|
[e40e335] | 60 | return
|
---|
| 61 | elseif (nml.gt.0) then
|
---|
| 62 | im1 = nml
|
---|
| 63 | im2 = nml
|
---|
| 64 | else
|
---|
| 65 | im1 = 1
|
---|
| 66 | im2 = ntlml
|
---|
| 67 | endif
|
---|
| 68 |
|
---|
| 69 | do iml = im1,im2
|
---|
| 70 |
|
---|
| 71 | write(mlfd,'(i4,a3)') iml,' : '
|
---|
| 72 |
|
---|
| 73 | ! --------------------------------- global pars.
|
---|
| 74 |
|
---|
| 75 | if ( gbpr(1,iml).ne.zero
|
---|
[bd2278d] | 76 | & .or.gbpr(2,iml).ne.zero
|
---|
| 77 | & .or.gbpr(3,iml).ne.zero
|
---|
| 78 | & .or.gbpr(4,iml).ne.zero
|
---|
| 79 | & .or.gbpr(5,iml).ne.zero
|
---|
| 80 | & .or.gbpr(6,iml).ne.zero ) then
|
---|
[e40e335] | 81 |
|
---|
| 82 | do i = 1,3
|
---|
| 83 | write(strg(i),'(f17.6)') gbpr(i,iml)
|
---|
| 84 | enddo
|
---|
| 85 | do i = 4,6
|
---|
| 86 | write(strg(i),'(f17.6)') (gbpr(i,iml)*crd)
|
---|
| 87 | enddo
|
---|
| 88 |
|
---|
| 89 | write(iout,'(1x,2a,1x,12a)')
|
---|
[bd2278d] | 90 | & '@ ',mlfd,(strg(i)(ibegst(strg(i)):),',',i=1,5),
|
---|
| 91 | & strg(6)(ibegst(strg(6)):)
|
---|
[e40e335] | 92 |
|
---|
| 93 | endif
|
---|
| 94 |
|
---|
| 95 | ifivr = ivrml1(iml)
|
---|
| 96 | is = irsml1(iml)-1
|
---|
| 97 |
|
---|
| 98 | do i = ifivr,ifivr+nvrml(iml)-1
|
---|
| 99 |
|
---|
| 100 | if (.not.fxvr(i)) then
|
---|
| 101 |
|
---|
| 102 | write(iout,'(3x,a,i3,1x,a,1x,a,1x,a,1x,f10.3)')
|
---|
[bd2278d] | 103 | & mlfd,(nursvr(i)-is),':',nmvr(i),':',vlvr(i)*crd
|
---|
[e40e335] | 104 | else
|
---|
| 105 |
|
---|
| 106 | it=ityvr(i)
|
---|
| 107 |
|
---|
| 108 | if (it.eq.3) then
|
---|
| 109 |
|
---|
| 110 | write(iout,'(3x,a,i3,1x,a,1x,a,1x,a,1x,f10.3,1x,a)')
|
---|
[bd2278d] | 111 | & mlfd,(nursvr(i)-is),':',nmvr(i),':',vlvr(i)*crd
|
---|
| 112 | & ,' &'
|
---|
[e40e335] | 113 | endif
|
---|
| 114 |
|
---|
| 115 | endif
|
---|
| 116 |
|
---|
| 117 | enddo ! internal vars
|
---|
| 118 |
|
---|
| 119 | enddo ! molecules
|
---|
| 120 |
|
---|
| 121 | end subroutine outvbs
|
---|