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
RevLine 
[bd2278d]1!**************************************************************
2!
3! This file contains the subroutines: regul
4!
5! Copyright 2003-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
9!
10! **************************************************************
[e40e335]11
[32289cd]12
[e40e335]13 subroutine regul(nml, iter, nsteps, acc)
14
[bd2278d]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! ----------------------------------------------------------
[e40e335]25
26 include 'INCL.H'
27 include 'INCP.H'
[32289cd]28
[bd2278d]29!f2py intent(in) nml
30!f2py intent(in) iter
31!f2py intent(in) nsteps
32!f2py intent(in) acc
[e40e335]33
[32289cd]34 double precision acc, rm, av1, av2, rmsd, dn
35
36 integer nsteps, nml, nrs, i, n, iter, it
37
[e40e335]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
[38d77eb]46 write (logString, '(/,a,2(a,f4.2),/)')
[bd2278d]47 & ' ====================== Regularization only',
48 & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
[e40e335]49
[cb47b9c]50 call minim(2, nsteps, acc)
[e40e335]51
[38d77eb]52 write (logString, *) ' '
53 write (logString, *) ' -------- contacts after 1st regularization'
54 write (logString, *) ' '
[e40e335]55 call cnteny(nml)
[38d77eb]56 write (logString, *) ' '
[e40e335]57
58 nrs = irsml2(nml)-irsml1(nml)+1
59 call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
60
[38d77eb]61 write (logString, *) ' RMSD = ',rmsd
[e40e335]62
[bd2278d]63! --------------------------------------- fix vars. defined in PDB
[e40e335]64
65
[32289cd]66 do i = ivrml1(nml),nvrml(nml)
[e40e335]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
[38d77eb]72 write (logString, '(/,a,2(a,f4.2),/)')
[bd2278d]73 & ' ====================== Internal Energy for Hydrogens only',
74 & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
[e40e335]75
76 call minim(1, nsteps, acc)
77
[38d77eb]78 write (logString, *) ' '
79 write (logString, *) ' -------- contacs after Emin. for hydrogens'
80 write (logString, *) ' '
[e40e335]81 call cnteny(nml)
82
[32289cd]83 do i = ivrml1(nml),nvrml(nml)
[e40e335]84 fxvr(i) = fxvro(i) ! restore
85 enddo ! vars.
86 ireg = 1
87
88
89 wtrg = 1.d0
90 wtey = 0.d0
91
[32289cd]92 n=iter
[e40e335]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
[38d77eb]100 write (logString, '(/,a,i2,2(a,e11.3),/)')
[bd2278d]101 & ' ================ Minimization #',it,
102 & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
[e40e335]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
[38d77eb]109 write (logString, *) ' '
110 write (logString, *) ' RMSD = ',rmsd
[e40e335]111
112 enddo
113
[38d77eb]114 write (logString, *) ' '
115 write (logString, *) ' ------- contacts after full regularization'
116 write (logString, *) ' '
[e40e335]117 call cnteny(nml)
118
[bd2278d]119! call outpdb(nml,12)
[e40e335]120
[bd2278d]121! Output of dihedral angles of the regularized structure
[38d77eb]122 write (logString, *)
123 & 'Dihedral angles of the regularized structure;'
[e40e335]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.