From 0f881114c90e71a886f1c0d1fcdf573e9d3d7b77 Mon Sep 17 00:00:00 2001 From: Adam Sieradzan Date: Tue, 16 May 2017 10:50:50 +0200 Subject: [PATCH] change for lipid last gly --- source/unres/src_MD-M/energy_p_new_barrier.F | 51 ++++++++++++++++++-------- 1 file changed, 36 insertions(+), 15 deletions(-) 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 2647bce..443471d 100644 --- a/source/unres/src_MD-M/energy_p_new_barrier.F +++ b/source/unres/src_MD-M/energy_p_new_barrier.F @@ -141,7 +141,7 @@ cmc Sep-06: egb takes care of dynamic ss bonds too cmc c if (dyn_ss) call dyn_set_nss -c print *,"Processor",myrank," computed USCSC" +C print *,"Processor",myrank," computed USCSC" #ifdef TIMING time01=MPI_Wtime() #endif @@ -232,7 +232,7 @@ C#undef DEBUG enddo #endif endif -c print *,"Processor",myrank," left VEC_AND_DERIV" +C print *,"Processor",myrank," left VEC_AND_DERIV" if (ipot.lt.6) then #ifdef SPLITELE if (welec.gt.0d0.or.wvdwpp.gt.0d0.or.wel_loc.gt.0d0.or. @@ -254,11 +254,11 @@ c print *,"Processor",myrank," left VEC_AND_DERIV" eello_turn4=0.0d0 endif else - write (iout,*) "Soft-spheer ELEC potential" +C write (iout,*) "Soft-spheer ELEC potential" c call eelec_soft_sphere(ees,evdw1,eel_loc,eello_turn3, c & eello_turn4) endif -c print *,"Processor",myrank," computed UELEC" +C print *,"Processor",myrank," computed UELEC" C C Calculate excluded-volume interaction energy between peptide groups C and side chains. @@ -281,9 +281,9 @@ c C C Calculate the disulfide-bridge and other energy and the contributions C from other distance constraints. -cd print *,'Calling EHPB' +C print *,'Calling EHPB' call edis(ehpb) -cd print *,'EHPB exitted succesfully.' +C print *,'EHPB exitted succesfully.' C C Calculate the virtual-bond-angle energy. C @@ -300,13 +300,13 @@ C energy function ebe=0 ethetacnstr=0 endif -c print *,"Processor",myrank," computed UB" +C print *,"Processor",myrank," computed UB" C C Calculate the SC local energy. C C print *,"TU DOCHODZE?" call esc(escloc) -c print *,"Processor",myrank," computed USC" +C print *,"Processor",myrank," computed USC" C C Calculate the virtual-bond torsional energy. C @@ -325,7 +325,7 @@ C energy function etors=0 edihcnstr=0 endif -c print *,"Processor",myrank," computed Utor" +C print *,"Processor",myrank," computed Utor" C C 6/23/01 Calculate double-torsional energy C @@ -334,7 +334,7 @@ C else etors_d=0 endif -c print *,"Processor",myrank," computed Utord" +C print *,"Processor",myrank," computed Utord" C C 21/5/07 Calculate local sicdechain correlation energy C @@ -344,7 +344,7 @@ C esccor=0.0d0 endif C print *,"PRZED MULIt" -c print *,"Processor",myrank," computed Usccorr" +C print *,"Processor",myrank," computed Usccorr" C C 12/1/95 Multi-body terms C @@ -5125,6 +5125,7 @@ C Derivatives in gamma(i+1) &*((sslipi+sslipj)/2.0d0*lipscale+1.0d0) C Cartesian derivatives +!DIR$ UNROLL(0) do l=1,3 c ghalf1=0.5d0*agg(l,1) c ghalf2=0.5d0*agg(l,2) @@ -5814,6 +5815,7 @@ C include 'COMMON.CONTROL' include 'COMMON.SPLITELE' dimension ggg(3) + integer xshift,yshift,zshift evdw2=0.0D0 evdw2_14=0.0d0 c print *,boxxsize,boxysize,boxzsize,'wymiary pudla' @@ -6395,8 +6397,9 @@ C c time11=dexp(-2*time) c time12=1.0d0 etheta=0.0D0 -c write (*,'(a,i2)') 'EBEND ICG=',icg + write (*,'(a,i2)') 'EBEND ICG=',icg do i=ithet_start,ithet_end + if (i.le.2) cycle if ((itype(i-1).eq.ntyp1).or.itype(i-2).eq.ntyp1 & .or.itype(i).eq.ntyp1) cycle C Zero the energy function and its derivative at 0 or pi. @@ -6415,7 +6418,8 @@ C Zero the energy function and its derivative at 0 or pi. ichir22=isign(1,itype(i)) endif - if (i.gt.3 .and. itype(i-3).ne.ntyp1) then + if (i.gt.3 ) then + if (itype(i-3).ne.ntyp1) then #ifdef OSF phii=phi(i) if (phii.ne.phii) phii=150.0 @@ -6428,6 +6432,11 @@ C Zero the energy function and its derivative at 0 or pi. y(1)=0.0D0 y(2)=0.0D0 endif + else + y(1)=0.0D0 + y(2)=0.0D0 + endif + if (i.lt.nres .and. itype(i+1).ne.ntyp1) then #ifdef OSF phii1=phi(i+1) @@ -6669,6 +6678,7 @@ C logical lprn /.false./, lprn1 /.false./ etheta=0.0D0 do i=ithet_start,ithet_end + if (i.le.2) cycle c print *,i,itype(i-1),itype(i),itype(i-2) C if (itype(i-1).eq.ntyp1) cycle if ((itype(i-1).eq.ntyp1).or.itype(i-2).eq.ntyp1 @@ -6686,7 +6696,8 @@ C print *,i,theta(i) sinkt(k)=dsin(k*theti2) enddo C print *,ethetai - if (i.gt.3 .and. itype(i-3).ne.ntyp1) then + if (i.gt.3) then + if (itype(i-3).ne.ntyp1) then #ifdef OSF phii=phi(i) if (phii.ne.phii) phii=150.0 @@ -6707,6 +6718,15 @@ C propagation of chirality for glycine type sinph1(k)=0.0d0 enddo endif + else + phii=0.0d0 + do k=1,nsingle + ityp1=ithetyp((itype(i-2))) + cosph1(k)=0.0d0 + sinph1(k)=0.0d0 + enddo + endif + if (i.lt.nres .and. itype(i+1).ne.ntyp1) then #ifdef OSF phii1=phi(i+1) @@ -11577,7 +11597,8 @@ C--bordlipbot--buffore ends eliptran=0.0 do i=ilip_start,ilip_end C do i=1,1 - if (itype(i).eq.ntyp1) cycle + if ((itype(i).eq.ntyp1).or.(itype(i+1).eq.ntyp1).or.(i.eq.nres)) + & cycle positi=(mod(((c(3,i)+c(3,i+1))/2.0d0),boxzsize)) if (positi.le.0.0) positi=positi+boxzsize -- 1.7.9.5