- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
canon.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: canon,can_weight4 c 5 cCopyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann,6 cShura Hayryan, Chin-Ku7 cCopyright 2007 Frank Eisenmenger, U.H.E. Hansmann,8 cJan H. Meinke, Sandipan Mohanty9 c 10 c**************************************************************1 ! ************************************************************** 2 ! 3 ! This file contains the subroutines: canon,can_weight 4 ! 5 ! Copyright 2003-2005 Frank Eisenmenger, U.H.E. Hansmann, 6 ! Shura Hayryan, Chin-Ku 7 ! Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann, 8 ! Jan H. Meinke, Sandipan Mohanty 9 ! 10 ! ************************************************************** 11 11 12 12 subroutine canon(nequi, nswp, nmes, temp, lrand) 13 C-----------------------------------------------------------------14 CPURPOSE: CANONICAL SIMULATION OF PROTEINS USING METROPOLIS UPDATES15 C 16 CCALLS: addang,energy,metropolis,hbond,helix,outvar,outpdb,rgyr17 C 18 C-------------------------------------------------------------------13 ! ----------------------------------------------------------------- 14 ! PURPOSE: CANONICAL SIMULATION OF PROTEINS USING METROPOLIS UPDATES 15 ! 16 ! CALLS: addang,energy,metropolis,hbond,helix,outvar,outpdb,rgyr 17 ! 18 !------------------------------------------------------------------- 19 19 include 'INCL.H' 20 20 21 cf2py intent(in) nequi22 cf2py intent(in) nswp23 cf2py intent(in) nmes24 cf2py intent(in) temp25 cf2py logical optional, intent(in):: lrand = 121 !f2py intent(in) nequi 22 !f2py intent(in) nswp 23 !f2py intent(in) nmes 24 !f2py intent(in) temp 25 !f2py logical optional, intent(in):: lrand = 1 26 26 27 cexternal rand27 ! external rand 28 28 external can_weight 29 29 30 30 logical lrand 31 cparameter(lrand=.false.)32 cparameter(nequi=10, nswp=1000,nmes=10)33 cparameter(temp=300.0)34 Clrand=.true.: creates random start configuration35 Cnequi: Number of sweeps for equilibrisation of system31 ! parameter(lrand=.false.) 32 ! parameter(nequi=10, nswp=1000,nmes=10) 33 ! parameter(temp=300.0) 34 ! lrand=.true.: creates random start configuration 35 ! nequi: Number of sweeps for equilibrisation of system 36 36 integer nequi 37 Cnswp: Number of sweeps for simulation run37 ! nswp: Number of sweeps for simulation run 38 38 integer nswp 39 cnmes: Number of sweeps between measurments39 ! nmes: Number of sweeps between measurments 40 40 integer nmes 41 Ctemp: Temperature of simulation41 ! temp: Temperature of simulation 42 42 double precision temp 43 C 43 ! 44 44 ! common/bet/beta 45 45 46 46 character*80 file 47 47 48 cDefine files for output:48 ! Define files for output: 49 49 open(13,file='time.d') 50 50 … … 52 52 beta=1.0/ ( temp * 1.98773d-3 ) 53 53 54 c_________________________________ random start54 ! _________________________________ random start 55 55 if(lrand) then 56 56 do i=1,nvr … … 65 65 write (*,'(a,e12.5,/)') 'energy of start configuration:',eol 66 66 67 CWrite start configuration in pdb-format into file67 ! Write start configuration in pdb-format into file 68 68 call outpdb(0,'start.pdb') 69 69 70 c=====================Equilibration by Metropolis70 ! =====================Equilibration by Metropolis 71 71 acz = 0.0d0 72 72 do nsw=1,nequi … … 75 75 write(*,*) 'Energy after equilibration:',eol 76 76 77 C======================Simulation in canonical ensemble77 !======================Simulation in canonical ensemble 78 78 acz = 0.0d0 79 79 do nsw=0,nswp 80 80 call metropolis(eol,acz,can_weight) 81 c 81 ! 82 82 if(mod(nsw,nmes).eq.0) then 83 CMeasure radius of gyration and end-to-end distance84 Crgy: radius of gyration85 Cee: end-to-end distance83 ! Measure radius of gyration and end-to-end distance 84 ! rgy: radius of gyration 85 ! ee: end-to-end distance 86 86 call rgyr(1,rgy,ee) 87 CMeasure helicity88 Cnhel: number of helical residues89 cmhel: number of helical segments90 cnbet: number of sheet-like residues91 cmbet: number of sheet-like segments87 ! Measure helicity 88 ! nhel: number of helical residues 89 ! mhel: number of helical segments 90 ! nbet: number of sheet-like residues 91 ! mbet: number of sheet-like segments 92 92 call helix(nhel,mhel,nbet,mbet) 93 CMeasure number of hydrogen bonds (mhb)93 ! Measure number of hydrogen bonds (mhb) 94 94 do i=1,ntlml 95 95 call hbond(i,mhb,0) 96 96 end do 97 CWrite down information on actual conformation97 ! Write down information on actual conformation 98 98 write(13,'(i5,2f12.3,5i7)') nsw, eol, rgy, 99 99 & nhel,mhel,nbet,mbet,mhb 100 100 end if 101 C 101 ! 102 102 end do 103 103 … … 105 105 write(*,*) 'acceptance rate:',acz 106 106 write(*,*) 107 c------------ Output Dihedreals of final configuration107 ! ------------ Output Dihedreals of final configuration 108 108 write(*,*) 'last energy',eol 109 109 call outvar(0,'lastconf.var') 110 COutput final conformation as pdb-file110 ! Output final conformation as pdb-file 111 111 call outpdb(0,'final.pdb') 112 112 … … 114 114 close(12) 115 115 close(13) 116 c=====================116 ! ===================== 117 117 118 118 119 119 end 120 120 121 c********************************************************121 ! ******************************************************** 122 122 real*8 function can_weight(x) 123 c 124 cCALLS: none125 c 123 ! 124 ! CALLS: none 125 ! 126 126 127 127 implicit real*8 (a-h,o-z)
Note:
See TracChangeset
for help on using the changeset viewer.