1 double precision function rmscalc(ishif,i,j,jcon,lprn)
2 implicit real*8 (a-h,o-z)
4 include 'DIMENSIONS.ZSCOPT'
5 include 'DIMENSIONS.COMPAR'
6 include 'COMMON.IOUNITS'
7 include 'COMMON.COMPAR'
9 include 'COMMON.INTERACT'
11 double precision przes(3),obrot(3,3)
12 double precision creff(3,maxres2),cc(3,maxres2)
13 logical iadded(maxres)
14 integer inumber(2,maxres)
15 common /ccc/ creff,cc,iadded,inumber
20 write (iout,*) "i",i," j",j," jcont",jcon," ishif",ishif
21 write (iout,*) "npiece",npiece(j,i)
30 & write (iout,*) "Level 1: j=",j,"k=",k," adding fragment",
31 & ifrag(1,k,j),ifrag(2,k,j)
32 call cprep(ifrag(1,k,j),ifrag(2,k,j),ishif,ii)
33 c write (iout,*) "ii=",ii
36 c write (iout,*) "kk",kk," npiece",npiece(kk,1)
39 & write (iout,*) "Level",i,": j=",j,"k=",k," kk=",kk,
40 & " l=",l," adding fragment",
41 & ifrag(1,l,kk),ifrag(2,l,kk)
42 call cprep(ifrag(1,l,kk),ifrag(2,l,kk),ishif,ii)
48 write(iout,'(5i4,2(3f10.5,5x))') i,j,k,inumber(1,k),
49 & inumber(2,k),(creff(l,k),l=1,3),(cc(l,k),l=1,3)
52 call fitsq(rms,cc(1,1),creff(1,1),ii,przes,obrot,non_conv)
54 print *,'Error: FITSQ non-convergent, jcon',jcon
56 else if (rms.lt.-1.0d-6) then
57 print *,'Error: rms^2 = ',rms,jcon
59 else if (rms.ge.1.0d-6 .and. rms.lt.0) then
66 c-------------------------------------------------------------------------
67 subroutine cprep(if1,if2,ishif,ii)
68 implicit real*8 (a-h,o-z)
70 include 'DIMENSIONS.ZSCOPT'
71 include 'DIMENSIONS.COMPAR'
72 include 'COMMON.IOUNITS'
73 include 'COMMON.COMPAR'
74 include 'COMMON.CHAIN'
75 include 'COMMON.INTERACT'
77 double precision przes(3),obrot(3,3)
78 double precision creff(3,maxres2),cc(3,maxres2)
79 logical iadded(maxres)
80 integer inumber(2,maxres)
81 common /ccc/ creff,cc,iadded,inumber
82 c write (iout,*) "Calling cprep"
84 c write (iout,*) "l",l," iadded",iadded(l)
85 if (l+ishif.gt.1 .and. l+ishif.le.nres .and. .not.iadded(l))
99 c-------------------------------------------------------------------------
100 double precision function rmsnat(jcon)
101 implicit real*8 (a-h,o-z)
103 include 'DIMENSIONS.ZSCOPT'
104 include 'DIMENSIONS.COMPAR'
105 include 'COMMON.IOUNITS'
106 include 'COMMON.COMPAR'
107 include 'COMMON.CHAIN'
108 include 'COMMON.INTERACT'
110 double precision przes(3),obrot(3,3)
113 call fitsq(rms,c(1,nstart_sup),cref(1,nstart_sup),nsup,
114 & przes,obrot,non_conv)
116 print *,'Error: FITSQ non-convergent, jcon',jcon
118 else if (rms.lt.-1.0d-6) then
119 print *,'Error: rms^2 = ',rms,jcon
121 else if (rms.ge.1.0d-6 .and. rms.lt.0) then
128 c-----------------------------------------------------------------------------
129 double precision function gyrate(jcon)
130 implicit real*8 (a-h,o-z)
132 include 'COMMON.INTERACT'
133 include 'COMMON.CHAIN'
134 double precision cen(3),rg
146 cen(j)=cen(j)/dble(nct-nnt+1)
151 rg = rg + (c(j,i)-cen(j))**2
154 gyrate = dsqrt(rg/dble(nct-nnt+1))