source: regul.f

Last change on this file was 38d77eb, checked in by baerbaer <baerbaer@…>, 14 years ago

Redirected standard out to logString.

SMMP produced a lot of log messages. This became an issue when run in massively
parallel environments. I replaced all writes to standard out to a write to logString.
The next step is to pass this string to a function that writes the messages to a log
file according to their importance and the chosen log level.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@34 26dc1dd8-5c4e-0410-9ffe-d298b4865968

  • Property mode set to 100644
File size: 3.4 KB
Line 
1!**************************************************************
2!
3! This file contains the subroutines: regul
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
12
13 subroutine regul(nml, iter, nsteps, acc)
14
15! ----------------------------------------------------------
16! PURPOSE: regularization of PDB-structure into SMMP geometry
17!
18! @param nml molecule to be regularized
19! @param iter number of iterations during regularization
20! @param nsteps maximum number of steps in minimization
21! @param acc acceptance criterium for minimization
22!
23! CALLS: minim, cnteny, outvar,rmsdopt
24! ----------------------------------------------------------
25
26 include 'INCL.H'
27 include 'INCP.H'
28
29!f2py intent(in) nml
30!f2py intent(in) iter
31!f2py intent(in) nsteps
32!f2py intent(in) acc
33
34 double precision acc, rm, av1, av2, rmsd, dn
35
36 integer nsteps, nml, nrs, i, n, iter, it
37
38 dimension rm(3,3),av1(3),av2(3)
39 logical ishy(mxvr),fxvro(mxvr)
40
41
42
43 wtrg = 1.d0
44 wtey = 0.d0
45
46 write (logString, '(/,a,2(a,f4.2),/)')
47 & ' ====================== Regularization only',
48 & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
49
50 call minim(2, nsteps, acc)
51
52 write (logString, *) ' '
53 write (logString, *) ' -------- contacts after 1st regularization'
54 write (logString, *) ' '
55 call cnteny(nml)
56 write (logString, *) ' '
57
58 nrs = irsml2(nml)-irsml1(nml)+1
59 call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
60
61 write (logString, *) ' RMSD = ',rmsd
62
63! --------------------------------------- fix vars. defined in PDB
64
65
66 do i = ivrml1(nml),nvrml(nml)
67 fxvro(i) = fxvr(i) ! save
68 if (isrfvr(i)) fxvr(i) = .true. ! fix vars. defined in ref.str.
69 enddo ! vars.
70 ireg = 0
71
72 write (logString, '(/,a,2(a,f4.2),/)')
73 & ' ====================== Internal Energy for Hydrogens only',
74 & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
75
76 call minim(1, nsteps, acc)
77
78 write (logString, *) ' '
79 write (logString, *) ' -------- contacs after Emin. for hydrogens'
80 write (logString, *) ' '
81 call cnteny(nml)
82
83 do i = ivrml1(nml),nvrml(nml)
84 fxvr(i) = fxvro(i) ! restore
85 enddo ! vars.
86 ireg = 1
87
88
89 wtrg = 1.d0
90 wtey = 0.d0
91
92 n=iter
93 dn=1.d0/dble(n)
94
95 do it = 1,n
96
97 wtrg = 1.d0 - dn*dble(it)
98 wtey = 1.d0 - wtrg
99
100 write (logString, '(/,a,i2,2(a,e11.3),/)')
101 & ' ================ Minimization #',it,
102 & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
103
104 call minim(1, nsteps, acc)
105
106 nrs = irsml2(nml)-irsml1(nml)+1
107 call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
108
109 write (logString, *) ' '
110 write (logString, *) ' RMSD = ',rmsd
111
112 enddo
113
114 write (logString, *) ' '
115 write (logString, *) ' ------- contacts after full regularization'
116 write (logString, *) ' '
117 call cnteny(nml)
118
119! call outpdb(nml,12)
120
121! Output of dihedral angles of the regularized structure
122 write (logString, *)
123 & 'Dihedral angles of the regularized structure;'
124 call outvar(nml, 'regd.var')
125
126 ireg = 0
127
128 return
129 end
130
Note: See TracBrowser for help on using the repository browser.