From: Adam Sieradzan Date: Wed, 23 Sep 2015 17:31:51 +0000 (+0200) Subject: bug fix in extconf X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?p=unres.git;a=commitdiff_plain;h=481eb42509493d4d1e082eb01a7479377c6db79c bug fix in extconf --- diff --git a/source/unres/src_MD-M/chainbuild.F b/source/unres/src_MD-M/chainbuild.F index 157baa9..a0fe42c 100644 --- a/source/unres/src_MD-M/chainbuild.F +++ b/source/unres/src_MD-M/chainbuild.F @@ -22,120 +22,27 @@ C Set lprn=.true. for debugging call chainbuild_cart return end -#ifdef DEBUG - if (perbox) then - cost=dcos(theta(3)) - sint=dsin(theta(3)) - print *,'before refsys' - call refsys(2,3,4,e1,e2,e3,fail) - print *,'after refsys' - if (fail) then - e2(1)=0.0d0 - e2(2)=1.0d0 - e2(3)=0.0d0 - endif - dc(1,0)=c(1,1) - dc(2,0)=c(2,1) - dc(3,0)=c(3,1) - print *,'dc',dc(1,0),dc(2,0),dc(3,0) - dc(1,1)=c(1,2)-c(1,1) - dc(2,1)=c(2,2)-c(2,1) - dc(3,1)=c(3,2)-c(3,1) - dc(1,2)=c(1,3)-c(1,2) - dc(2,2)=c(2,3)-c(2,2) - dc(3,2)=c(3,3)-c(3,2) - t(1,1,1)=e1(1) - t(1,2,1)=e1(2) - t(1,3,1)=e1(3) - t(2,1,1)=e2(1) - t(2,2,1)=e2(2) - t(2,3,1)=e2(3) - t(3,1,1)=e3(1) - t(3,2,1)=e3(2) - t(3,3,1)=e3(3) - veclen=0.0d0 - do i=1,3 - veclen=veclen+(c(i,2)-c(i,1))**2 - enddo - veclen=sqrt(veclen) - r(1,1,1)= 1.0D0 - r(1,2,1)= 0.0D0 - r(1,3,1)= 0.0D0 - r(2,1,1)= 0.0D0 - r(2,2,1)= 1.0D0 - r(2,3,1)= 0.0D0 - r(3,1,1)= 0.0D0 - r(3,2,1)= 0.0D0 - r(3,3,1)= 1.0D0 - do i=1,3 - do j=1,3 - rt(i,j,1)=t(i,j,1) - enddo - enddo - do i=1,3 - do j=1,3 - prod(i,j,1)=0.0D0 - prod(i,j,2)=t(i,j,1) - enddo - prod(i,i,1)=1.0D0 - enddo - call locate_side_chain(2) - do i=4,nres -#ifdef OSF - theti=theta(i) - if (theti.ne.theti) theti=100.0 - phii=phi(i) - if (phii.ne.phii) phii=180.0 -#else - theti=theta(i) - phii=phi(i) -#endif - cost=dcos(theti) - sint=dsin(theti) - cosphi=dcos(phii) - sinphi=dsin(phii) -* Define the matrices of the rotation about the virtual-bond valence angles -* theta, T(i,j,k), virtual-bond dihedral angles gamma (miscalled PHI in this -* program), R(i,j,k), and, the cumulative matrices of rotation RT - t(1,1,i-2)=-cost - t(1,2,i-2)=-sint - t(1,3,i-2)= 0.0D0 - t(2,1,i-2)=-sint - t(2,2,i-2)= cost - t(2,3,i-2)= 0.0D0 - t(3,1,i-2)= 0.0D0 - t(3,2,i-2)= 0.0D0 - t(3,3,i-2)= 1.0D0 - r(1,1,i-2)= 1.0D0 - r(1,2,i-2)= 0.0D0 - r(1,3,i-2)= 0.0D0 - r(2,1,i-2)= 0.0D0 - r(2,2,i-2)=-cosphi - r(2,3,i-2)= sinphi - r(3,1,i-2)= 0.0D0 - r(3,2,i-2)= sinphi - r(3,3,i-2)= cosphi - rt(1,1,i-2)=-cost - rt(1,2,i-2)=-sint - rt(1,3,i-2)=0.0D0 - rt(2,1,i-2)=sint*cosphi - rt(2,2,i-2)=-cost*cosphi - rt(2,3,i-2)=sinphi - rt(3,1,i-2)=-sint*sinphi - rt(3,2,i-2)=cost*sinphi - rt(3,3,i-2)=cosphi - call matmult(prod(1,1,i-2),rt(1,1,i-2),prod(1,1,i-1)) - do j=1,3 - dc_norm(j,i-1)=prod(j,1,i-1) - dc(j,i-1)=vbld(i)*prod(j,1,i-1) - enddo - call locate_side_chain(i-1) - enddo - else -C -C Define the origin and orientation of the coordinate system and locate the +C#ifdef DEBUG +C if (perbox) then C first three CA's and SC(2). C + subroutine chainbuild_extconf +C +C Build the virtual polypeptide chain. Side-chain centroids are moveable. +C As of 2/17/95. +C + implicit real*8 (a-h,o-z) + include 'DIMENSIONS' + include 'COMMON.CHAIN' + include 'COMMON.LOCAL' + include 'COMMON.GEO' + include 'COMMON.VAR' + include 'COMMON.IOUNITS' + include 'COMMON.NAMES' + include 'COMMON.INTERACT' + double precision e1(3),e2(3),e3(3) + logical lprn,perbox,fail + call orig_frame * * Build the alpha-carbon chain. @@ -175,11 +82,11 @@ C enddo 1212 format (a3,'(',i3,')',2(f10.5,2f10.2)) - endif +C endif endif return end -#endif +C#endif c------------------------------------------------------------------------- subroutine orig_frame C diff --git a/source/unres/src_MD-M/fitsq.f b/source/unres/src_MD-M/fitsq.f index 1c97e6d..2040074 100644 --- a/source/unres/src_MD-M/fitsq.f +++ b/source/unres/src_MD-M/fitsq.f @@ -44,11 +44,11 @@ c enddo enddo rms=dabs(rms/fn) - + c write(iout,*)'xav = ',(xav(j),j=1,3) c write(iout,*)'yav = ',(yav(j),j=1,3) c write(iout,*)'t = ',(t(j),j=1,3) -c write(iout,*)'rms=',rms + write(iout,*)'rms=',rms if (rms.lt.small) return diff --git a/source/unres/src_MD-M/readrtns_CSA.F b/source/unres/src_MD-M/readrtns_CSA.F index bdc7c9d..d25c4eb 100644 --- a/source/unres/src_MD-M/readrtns_CSA.F +++ b/source/unres/src_MD-M/readrtns_CSA.F @@ -1132,6 +1132,7 @@ C initial geometry. omeg(i)=-120d0*deg2rad if (itype(i).le.0) omeg(i)=-omeg(i) enddo + call chainbuild_extconf else if(me.eq.king.or..not.out1file) & write (iout,'(a)') 'Random-generated initial geometry.' diff --git a/source/unres/src_MD-M/rmsd.F b/source/unres/src_MD-M/rmsd.F index 82749b4..58c4a1b 100644 --- a/source/unres/src_MD-M/rmsd.F +++ b/source/unres/src_MD-M/rmsd.F @@ -43,6 +43,7 @@ c--------------------------------------------------------------------------- rminroz=100d2 c print *,"nz_start",nz_start," nz_end",nz_end c if (symetr.le.1) then + print *,nperm,"nperm" do kkk=1,nperm c do i=nz_start,nz_end c iatom=iatom+1 @@ -81,14 +82,14 @@ c enddo c endif c ----- diagnostics -c do kkk=1,nperm -c write (iout,*) 'Ccopy and CREFcopy' -c print '(i5,3f10.5,5x,3f10.5)',(k,(ccopy(j,k),j=1,3), -c & (crefcopy(j,k),j=1,3),k=1,iatom) -c write (iout,'(i5,3f10.5,5x,3f10.5)') (k,(ccopy(j,k),j=1,3), -c & (crefcopy(j,k),j=1,3),k=1,iatom) -c enddo -c ----- end diagnostics +C do kkk=1,nperm + write (iout,*) 'Ccopy and CREFcopy adasko',iatom + print '(i5,3f10.5,5x,3f10.5)',(k,(ccopy(j,k),j=1,3), + & (crefcopy(j,k),j=1,3),k=1,iatom) + write (iout,'(i5,3f10.5,5x,3f10.5)') (k,(ccopy(j,k),j=1,3), + & (crefcopy(j,k),j=1,3),k=1,iatom) +C enddo +Cc ----- end diagnostics c do kkk=1,nperm call fitsq(roznica,ccopy(1,1),crefcopy(1,1),iatom, & przes,obrot,non_conv) @@ -108,7 +109,7 @@ c call mpi_abort(mpi_comm_world,ierror,ierrcode) stop #endif endif -c write (iout,*) "roznica", roznica,kkk + write (iout,*) "roznica", roznica,kkk if (roznica.le.rminroz) rminroz=roznica enddo drms=dsqrt(dabs(rminroz)) diff --git a/source/unres/src_MD/readrtns.F b/source/unres/src_MD/readrtns.F index af416e8..0493d41 100644 --- a/source/unres/src_MD/readrtns.F +++ b/source/unres/src_MD/readrtns.F @@ -1188,6 +1188,7 @@ C initial geometry. do i=2,nres-1 omeg(i)=-120d0*deg2rad enddo + call chainbuild else if(me.eq.king.or..not.out1file) & write (iout,'(a)') 'Random-generated initial geometry.'