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 | dimension rm(3,3),av1(3),av2(3)
|
---|
35 | logical ishy(mxvr),fxvro(mxvr)
|
---|
36 |
|
---|
37 |
|
---|
38 |
|
---|
39 | wtrg = 1.d0
|
---|
40 | wtey = 0.d0
|
---|
41 |
|
---|
42 | write(*,'(/,a,2(a,f4.2),/)')
|
---|
43 | & ' ====================== Regularization only',
|
---|
44 | & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
|
---|
45 |
|
---|
46 | call minim(2, nsteps, acc)
|
---|
47 |
|
---|
48 | write(*,*) ' '
|
---|
49 | write(*,*) ' ---------- contacts after 1st regularization'
|
---|
50 | write(*,*) ' '
|
---|
51 | call cnteny(nml)
|
---|
52 | write(*,*) ' '
|
---|
53 |
|
---|
54 | nrs = irsml2(nml)-irsml1(nml)+1
|
---|
55 | call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
|
---|
56 |
|
---|
57 | write(*,*) ' RMSD = ',rmsd
|
---|
58 |
|
---|
59 | ! --------------------------------------- fix vars. defined in PDB
|
---|
60 |
|
---|
61 |
|
---|
62 | do i = ivrml1(nml),nvrml(nml)
|
---|
63 | fxvro(i) = fxvr(i) ! save
|
---|
64 | if (isrfvr(i)) fxvr(i) = .true. ! fix vars. defined in ref.str.
|
---|
65 | enddo ! vars.
|
---|
66 | ireg = 0
|
---|
67 |
|
---|
68 | write(*,'(/,a,2(a,f4.2),/)')
|
---|
69 | & ' ====================== Internal Energy for Hydrogens only',
|
---|
70 | & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
|
---|
71 |
|
---|
72 | call minim(1, nsteps, acc)
|
---|
73 |
|
---|
74 | write(*,*) ' '
|
---|
75 | write(*,*) ' ---------- contacs after Emin. for hydrogens'
|
---|
76 | write(*,*) ' '
|
---|
77 | call cnteny(nml)
|
---|
78 |
|
---|
79 | do i = ivrml1(nml),nvrml(nml)
|
---|
80 | fxvr(i) = fxvro(i) ! restore
|
---|
81 | enddo ! vars.
|
---|
82 | ireg = 1
|
---|
83 |
|
---|
84 |
|
---|
85 | wtrg = 1.d0
|
---|
86 | wtey = 0.d0
|
---|
87 |
|
---|
88 | n=iter
|
---|
89 | dn=1.d0/dble(n)
|
---|
90 |
|
---|
91 | do it = 1,n
|
---|
92 |
|
---|
93 | wtrg = 1.d0 - dn*dble(it)
|
---|
94 | wtey = 1.d0 - wtrg
|
---|
95 |
|
---|
96 | write(*,'(/,a,i2,2(a,e11.3),/)')
|
---|
97 | & ' ================ Minimization #',it,
|
---|
98 | & ' Wt(energy) = ',wtey,' Wt(regul.) = ',wtrg
|
---|
99 |
|
---|
100 | call minim(1, nsteps, acc)
|
---|
101 |
|
---|
102 | nrs = irsml2(nml)-irsml1(nml)+1
|
---|
103 | call rmsdopt(nml,1,nrs,ixatp,xatp,yatp,zatp,0,rm,av1,av2,rmsd)
|
---|
104 |
|
---|
105 | write(*,*) ' '
|
---|
106 | write(*,*) ' RMSD = ',rmsd
|
---|
107 |
|
---|
108 | enddo
|
---|
109 |
|
---|
110 | write(*,*) ' '
|
---|
111 | write(*,*) ' ---------- contacts after full regularization'
|
---|
112 | write(*,*) ' '
|
---|
113 | call cnteny(nml)
|
---|
114 |
|
---|
115 | ! call outpdb(nml,12)
|
---|
116 |
|
---|
117 | ! Output of dihedral angles of the regularized structure
|
---|
118 | write(*,*) 'Dihedral angles of the regularized structure;'
|
---|
119 | call outvar(nml, 'regd.var')
|
---|
120 |
|
---|
121 | ireg = 0
|
---|
122 |
|
---|
123 | return
|
---|
124 | end
|
---|
125 |
|
---|