- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anneal.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: anneal4 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$Id: anneal.f 334 2007-08-07 09:23:59Z meinke $11 c**************************************************************1 ! ************************************************************** 2 ! 3 ! This file contains the subroutines: anneal 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 ! $Id: anneal.f 334 2007-08-07 09:23:59Z meinke $ 11 ! ************************************************************** 12 12 13 13 subroutine anneal(nequi, nswp, nmes, tmax, tmin, lrand) 14 14 15 C--------------------------------------------------------------16 CPURPOSE: SIMULATED ANNEALING SEARCH OF LOWEST-POTENTIAL-ENERGY17 CCONFORMATIONS OF PROTEINS18 C 19 CCALLS: addang,energy,metropolis,outvar,outpdb,rgyr,setvar,zimmer20 C 21 C---------------------------------------------------------------15 ! -------------------------------------------------------------- 16 ! PURPOSE: SIMULATED ANNEALING SEARCH OF LOWEST-POTENTIAL-ENERGY 17 ! CONFORMATIONS OF PROTEINS 18 ! 19 ! CALLS: addang,energy,metropolis,outvar,outpdb,rgyr,setvar,zimmer 20 ! 21 ! --------------------------------------------------------------- 22 22 23 23 include 'INCL.H' 24 24 25 cf2py intent(in) nequi26 cf2py intent(in) nswp27 cf2py intent(in) nmes28 cf2py intent(in) Tmax29 cf2py intent(in) Tmin30 cf2py logical optional, intent(in):: lrand = 125 !f2py intent(in) nequi 26 !f2py intent(in) nswp 27 !f2py intent(in) nmes 28 !f2py intent(in) Tmax 29 !f2py intent(in) Tmin 30 !f2py logical optional, intent(in):: lrand = 1 31 31 32 cexternal rand32 ! external rand 33 33 external can_weight 34 cparameter(lrand=.true.)35 cparameter(nequi=100, nswp=100000,nmes=1000)36 cparameter(tmax=1000.0,tmin=100.0)37 Clrand=.true.: creates random start configuration34 ! parameter(lrand=.true.) 35 ! parameter(nequi=100, nswp=100000,nmes=1000) 36 ! parameter(tmax=1000.0,tmin=100.0) 37 ! lrand=.true.: creates random start configuration 38 38 logical lrand 39 Cnequi: Number of sweeps for equilibrisation of system39 ! nequi: Number of sweeps for equilibrisation of system 40 40 integer nequi 41 Cnswp: Number of sweeps for simulation run41 ! nswp: Number of sweeps for simulation run 42 42 integer nswp 43 cnmes: Number of sweeps between measurments43 ! nmes: Number of sweeps between measurments 44 44 integer nmes 45 Ctmax: Start temperature45 ! tmax: Start temperature 46 46 double precision tmax 47 Ctmin: Final temperature47 ! tmin: Final temperature 48 48 double precision tmin 49 49 50 50 51 51 ! common/bet/beta 52 C 52 ! 53 53 dimension vlvrm(mxvr) 54 54 55 55 56 56 57 cDefine files for output:57 ! Define files for output: 58 58 open(14,file='time.d') 59 59 write(14, *) '# $Id: anneal.f 334 2007-08-07 09:23:59Z meinke $' … … 64 64 db = exp(log(bmax/bmin)/nswp) 65 65 66 cnresi: Number of residues67 cFIXME: Should loop over all proteins66 ! nresi: Number of residues 67 ! FIXME: Should loop over all proteins 68 68 nresi=irsml2(ntlml)-irsml1(1)+1 69 c_________________________________ random start69 ! _________________________________ random start 70 70 if(lrand) then 71 71 do i=1,nvr … … 80 80 write (*,'(a,e12.5,/)') 'energy of start configuration: ',eol 81 81 82 CWrite start configuration in pdb-format into file82 ! Write start configuration in pdb-format into file 83 83 call outpdb(0, "start.pdb") 84 84 85 c=====================Equilibration by Metropolis85 ! =====================Equilibration by Metropolis 86 86 beta = bmin 87 87 do nsw=1,nequi … … 90 90 write(*,*) 'Energy after equilibration:',eol 91 91 92 C======================Simulation by simulated annealing92 !======================Simulation by simulated annealing 93 93 acz = 0.0d0 94 94 ymin = eol … … 96 96 beta = bmin*db**nsw 97 97 call metropolis(eol,acz,can_weight) 98 cStore lowest-energy conformation98 ! Store lowest-energy conformation 99 99 if(eol.lt.ymin) then 100 100 ymin = eol 101 101 nemin = nsw 102 102 call outvar(0,'global.var') 103 COutput of lowest-energy conformation as pdb-file103 ! Output of lowest-energy conformation as pdb-file 104 104 call outpdb(0,"global.pdb") 105 105 do j=1,nvr … … 108 108 end do 109 109 end if 110 c 110 ! 111 111 if(mod(nsw,nmes).eq.0) then 112 CMeasure radius of gyration and end-to-end distance112 ! Measure radius of gyration and end-to-end distance 113 113 call rgyr(1, rgy, ee) 114 CDetermine Zimmerman code of actual conformation114 ! Determine Zimmerman code of actual conformation 115 115 call zimmer(nresi) 116 CWrite down information on actual conformation116 ! Write down information on actual conformation 117 117 temp = 1.0d0/beta/0.00198773 118 118 write(14,'(i6,13f12.3,1x,a)') … … 121 121 & eyhb, eyvw, eyel, eyvr, zimm(1:nresi) 122 122 end if 123 C 123 ! 124 124 end do 125 125 … … 127 127 write(*,*) 'acceptance rate:',acz 128 128 write(*,*) 129 c------------ Output Dihedreals of final configuration129 ! ------------ Output Dihedreals of final configuration 130 130 write(*,*) 'last energy',eol 131 131 call outvar(0,' ') 132 COutput final conformation as pdb-file132 ! Output final conformation as pdb-file 133 133 call outpdb(0,"final.pdb") 134 134 write(*,*) 135 135 136 c------------ Output Dihedreals of conformation with lowest energy136 ! ------------ Output Dihedreals of conformation with lowest energy 137 137 write(*,*) 'lowest energy ever found:',nemin,ymin 138 138 close(14) 139 c=====================139 ! ===================== 140 140 141 141
Note:
See TracChangeset
for help on using the changeset viewer.