From a70be6e9e57486949af48628f1bc8810bcbe7ce6 Mon Sep 17 00:00:00 2001 From: Adam Sieradzan Date: Tue, 30 Dec 2014 12:04:30 +0100 Subject: [PATCH] wprowadzenie do multichaina SCcorr --- source/unres/src_MD-M/checkder_p.F | 2 +- source/unres/src_MD-M/energy_p_new_barrier.F | 2 +- source/unres/src_MD-M/intcartderiv.F | 10 ++++++---- source/unres/src_MD-M/parmread.F | 3 ++- source/unres/src_MD-M/unres.F | 2 ++ source/unres/src_MD/COMMON.SCCOR | 10 +--------- source/unres/src_MD/energy_p_new_barrier.F | 2 +- 7 files changed, 14 insertions(+), 17 deletions(-) diff --git a/source/unres/src_MD-M/checkder_p.F b/source/unres/src_MD-M/checkder_p.F index 0539e48..bd2f453 100644 --- a/source/unres/src_MD-M/checkder_p.F +++ b/source/unres/src_MD-M/checkder_p.F @@ -281,7 +281,7 @@ C Check the gradient of the energy in Cartesian coordinates. c call intcartderiv c call checkintcartgrad call zerograd - aincr=1.0D-5 + aincr=1.0D-4 write(iout,*) 'Calling CHECK_ECARTINT.' nf=0 icall=0 diff --git a/source/unres/src_MD-M/energy_p_new_barrier.F b/source/unres/src_MD-M/energy_p_new_barrier.F index 0c2f5ed..eae81d8 100644 --- a/source/unres/src_MD-M/energy_p_new_barrier.F +++ b/source/unres/src_MD-M/energy_p_new_barrier.F @@ -3665,7 +3665,7 @@ c write (iout,*) "eturn4 i",i," j",j," j1",j1," j2",j2 iti1=itortyp(itype(i+1)) iti2=itortyp(itype(i+2)) iti3=itortyp(itype(i+3)) - write(iout,*) "iti1",iti1," iti2",iti2," iti3",iti3 +C write(iout,*) i,"iti1",iti1," iti2",iti2," iti3",iti3,itype(i+3) call transpose2(EUg(1,1,i+1),e1t(1,1)) call transpose2(Eug(1,1,i+2),e2t(1,1)) call transpose2(Eug(1,1,i+3),e3t(1,1)) diff --git a/source/unres/src_MD-M/intcartderiv.F b/source/unres/src_MD-M/intcartderiv.F index b8f84b9..94b3989 100644 --- a/source/unres/src_MD-M/intcartderiv.F +++ b/source/unres/src_MD-M/intcartderiv.F @@ -46,12 +46,14 @@ c We need dtheta(:,:,i-1) to compute dphi(:,:,i) cost=dcos(theta(i)) sint=sqrt(1-cost*cost) do j=1,3 +C if (itype(i-1).ne.21) then dcostheta(j,1,i)=-(dc_norm(j,i-1)+cost*dc_norm(j,i-2))/ & vbld(i-1) - if (itype(i-1).ne.21) dtheta(j,1,i)=-dcostheta(j,1,i)/sint + if (itype(i-1).ne.21) dtheta(j,1,i)=-dcostheta(j,1,i)/sint dcostheta(j,2,i)=-(dc_norm(j,i-2)+cost*dc_norm(j,i-1))/ & vbld(i) - if (itype(i-1).ne.21) dtheta(j,2,i)=-dcostheta(j,2,i)/sint + if (itype(i-1).ne.21) dtheta(j,2,i)=-dcostheta(j,2,i)/sint +C endif enddo enddo #if defined(MPI) && defined(PARINTDER) @@ -622,7 +624,7 @@ c Check alpha gradient write (iout,*) & "Analytical (upper) and numerical (lower) gradient of alpha" do i=2,nres-1 - if(itype(i).ne.10) then + if((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 dcji=dc(j,i-1) dc(j,i-1)=dcji+aincr @@ -658,7 +660,7 @@ c Check omega gradient write (iout,*) & "Analytical (upper) and numerical (lower) gradient of omega" do i=2,nres-1 - if(itype(i).ne.10) then + if((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 dcji=dc(j,i-1) dc(j,i-1)=dcji+aincr diff --git a/source/unres/src_MD-M/parmread.F b/source/unres/src_MD-M/parmread.F index 9bc2d20..64203a2 100644 --- a/source/unres/src_MD-M/parmread.F +++ b/source/unres/src_MD-M/parmread.F @@ -705,8 +705,9 @@ c ee(2,1,i)=0.0d0 c ee(1,2,i)=0.0d0 c ee(2,1,i)=ee(1,2,i) enddo +C write(iout,*) "parm", B1(1,nloctyp+1),B1(2,nloctyp+1) if (lprint) then - do i=1,nloctyp + do i=1,nloctyp+1 write (iout,*) 'Type',i write (iout,*) 'B1' write(iout,*) B1(1,i),B1(2,i) diff --git a/source/unres/src_MD-M/unres.F b/source/unres/src_MD-M/unres.F index b1ddb28..7addf74 100644 --- a/source/unres/src_MD-M/unres.F +++ b/source/unres/src_MD-M/unres.F @@ -734,6 +734,8 @@ c enddo print *,'icheckgrad=',icheckgrad goto (10,20,30) icheckgrad 10 call check_ecartint + write(iout,*) "kupadupa" + call check_ecartint return 20 call check_cartgrad return diff --git a/source/unres/src_MD/COMMON.SCCOR b/source/unres/src_MD/COMMON.SCCOR index 78ff482..208d60b 100644 --- a/source/unres/src_MD/COMMON.SCCOR +++ b/source/unres/src_MD/COMMON.SCCOR @@ -4,23 +4,15 @@ cc Parameters of the SCCOR term & dcostau,dsintau,dtauangle,dcosomicron, & domicron,v0sccor integer nterm_sccor,isccortyp,nsccortyp,nlor_sccor -<<<<<<< HEAD - common/sccor/v1sccor(maxterm_sccor,3,20,20), - & v2sccor(maxterm_sccor,3,20,20), -======= common/sccor/v1sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp), & v2sccor(maxterm_sccor,3,-ntyp:ntyp,-ntyp:ntyp), & v0sccor(maxterm_sccor,-ntyp:ntyp), & nterm_sccor(-ntyp:ntyp,-ntyp:ntyp),isccortyp(-ntyp:ntyp), & nsccortyp, & nlor_sccor(-ntyp:ntyp,-ntyp:ntyp), ->>>>>>> 2acc991... Wprowadznie potencjalow SC-COR do multichain oraz ich pseudosymetrii dla & vlor1sccor(maxterm_sccor,20,20), & vlor2sccor(maxterm_sccor,20,20), & vlor3sccor(maxterm_sccor,20,20),gloc_sc(3,0:maxres2,10), - & v0sccor(ntyp,ntyp), & dcostau(3,3,3,maxres2),dsintau(3,3,3,maxres2), & dtauangle(3,3,3,maxres2),dcosomicron(3,3,3,maxres2), - & domicron(3,3,3,maxres2), - & nterm_sccor(ntyp,ntyp),isccortyp(ntyp),nsccortyp, - & nlor_sccor(ntyp,ntyp) + & domicron(3,3,3,maxres2) diff --git a/source/unres/src_MD/energy_p_new_barrier.F b/source/unres/src_MD/energy_p_new_barrier.F index 1bc9be6..a647966 100644 --- a/source/unres/src_MD/energy_p_new_barrier.F +++ b/source/unres/src_MD/energy_p_new_barrier.F @@ -5957,7 +5957,7 @@ c write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor esccor=0.0D0 do i=itau_start,itau_end esccor_ii=0.0D0 - if ((itype(i-2).eq.ntyp1).or(itype(i-1).eq.ntyp1)) cycle + if ((itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)) cycle isccori=isccortyp(itype(i-2)) isccori1=isccortyp(itype(i-1)) phii=phi(i) -- 1.7.9.5