Changeset bd2278d for metropolis.f
- Timestamp:
- 09/05/08 11:49:42 (16 years ago)
- Branches:
- master
- Children:
- fafe4d6
- Parents:
- 2ebb8b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
metropolis.f
r2ebb8b6 rbd2278d 1 c**************************************************************2 c 3 cThis file contains the subroutines: metropolis4 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: metropolis 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 13 13 subroutine metropolis(eol1,acz,dummy) 14 C 15 CSUBROUTINE FOR METROPOLIS UPDATE OF CONFIGURATIONS16 C 17 CCALLS: energy,addang,grnd,dummy (function provided as argument)18 C 14 ! 15 ! SUBROUTINE FOR METROPOLIS UPDATE OF CONFIGURATIONS 16 ! 17 ! CALLS: energy,addang,grnd,dummy (function provided as argument) 18 ! 19 19 include 'INCL.H' 20 20 include 'INCP.H' … … 25 25 integer updtch1, updtch2,bgs 26 26 double precision vrol(mxvr), gbol 27 cf2py intent(in, out) eol28 cf2py intent(in, out) acz27 !f2py intent(in, out) eol 28 !f2py intent(in, out) acz 29 29 eol = energy() 30 cexternal rand30 ! external rand 31 31 do nsw=1,nvr 32 cLoop over dihedrals33 c 32 ! Loop over dihedrals 33 ! 34 34 iupstate=0 35 35 iupt=1 … … 54 54 iupstate=bgs(eol,dummy) 55 55 else 56 cSimple twist of57 cGet Proposal configuration56 ! Simple twist of 57 ! Get Proposal configuration 58 58 vrol=vlvr!(jv) 59 59 dv=axvr(jv)*(grnd()-0.5) 60 60 vlvr(jv)=addang(vrol(jv),dv) 61 c 62 cGet dummy of proposal configuration63 c 61 ! 62 ! Get dummy of proposal configuration 63 ! 64 64 enw = energy() 65 c 65 ! 66 66 delta = dummy(enw) - dummy(eol) 67 c___________________________ check acceptance criteria67 ! ___________________________ check acceptance criteria 68 68 if (delta.le.0.0d0) then 69 69 eol=enw … … 90 90 end do 91 91 92 cUpdates on relative position of different molecules when there are many92 ! Updates on relative position of different molecules when there are many 93 93 if (ntlml.gt.1) then 94 94 do iml=1, ntlml … … 104 104 endif 105 105 endif 106 c107 cGet dummy of proposal configuration108 c106 ! 107 ! Get dummy of proposal configuration 108 ! 109 109 enw = energy() 110 c 110 ! 111 111 delta = dummy(enw) - dummy(eol) 112 c113 c____________________________ check acceptance criteria114 c112 ! 113 ! ____________________________ check acceptance criteria 114 ! 115 115 if (delta.le.0.0d0) then 116 116 eol=enw … … 138 138 gbpr(i, iml) = (grnd()-0.5) * pi2 139 139 endif 140 c141 cGet dummy of proposal configuration142 c140 ! 141 ! Get dummy of proposal configuration 142 ! 143 143 enw = energy() 144 c144 ! 145 145 delta = dummy(enw) - dummy(eol) 146 c147 c____________________________ check acceptance criteria148 c146 ! 147 ! ____________________________ check acceptance criteria 148 ! 149 149 if (delta.le.0.0d0) then 150 150 eol=enw … … 166 166 enddo 167 167 endif 168 c169 cRe-calculate energy170 c168 ! 169 ! Re-calculate energy 170 ! 171 171 enw = energy() 172 172 if(abs(eol-enw).gt.0.000001) then … … 176 176 endif 177 177 endif 178 c178 ! 179 179 eol1 = eol 180 180 return 181 c181 ! 182 182 end 183 183
Note:
See TracChangeset
for help on using the changeset viewer.