X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Frefsys.f;h=21fcc1f9355a863cbc98f872cf8ce199cc101f92;hb=32e6a2acce59b6cf4ba4addd790bfaeccff42f02;hp=86b0524a25ba5a3a77df83f9466490f5d5d7f5cb;hpb=7f26ead9a8f9804b8426debe2d931dab4763fc3f;p=unres.git diff --git a/source/unres/src_MD-M/refsys.f b/source/unres/src_MD-M/refsys.f index 86b0524..21fcc1f 100644 --- a/source/unres/src_MD-M/refsys.f +++ b/source/unres/src_MD-M/refsys.f @@ -1,4 +1,4 @@ - subroutine refsys(fail) + subroutine refsys(i2,i3,i4,e1,e2,e3,fail) c This subroutine calculates unit vectors of a local reference system c defined by atoms (i2), (i3), and (i4). The x axis is the axis from c atom (i3) to atom (i2), and the xy plane is the plane defined by atoms @@ -14,12 +14,17 @@ c form a linear fragment. Returns vectors e1, e2, and e3. include 'COMMON.IOUNITS' include 'COMMON.CHAIN' double precision coinc/1.0D-13/,align /1.0D-13/ +c print *,'just initialize' fail=.false. +c print *,fail s1=0.0 s2=0.0 + print *,s1,s2 do 1 i=1,3 + print *, i2,i3,i4 zi=c(i,i2)-c(i,i3) ui=c(i,i4)-c(i,i3) + print *,zi,ui s1=s1+zi*zi s2=s2+ui*ui z(i)=zi @@ -38,6 +43,7 @@ c 3 c(i,i1)=0.0D0 do 5 i=1,3 5 c(i,i1)=0.0D0 return + print *,'two if pass' 4 s1=1.0/s1 s2=1.0/s2 v1=z(2)*u(3)-z(3)*u(2) @@ -60,6 +66,7 @@ c 7 c(i,i1)=0.0D0 e2(1)=e1(3)*e3(2)-e1(2)*e3(3) e2(2)=e1(1)*e3(3)-e1(3)*e3(1) e2(3)=e1(2)*e3(1)-e1(1)*e3(2) + print *,'just before leave' 1000 format (/1x,' * * * Error - atoms',i4,' and',i4,' coincide.', 1 'coordinates of atom',i4,' are set to zero.') 1010 format (/1x,' * * * Error - atoms',2(i4,2h, ),i4,' form a linear',