From 35b38ecabffabf2bb56e927bbe14fda707def0ac Mon Sep 17 00:00:00 2001 From: Adam Sieradzan Date: Tue, 24 Jun 2014 10:26:42 +0200 Subject: [PATCH] bug fix for langevin dynamics --- .gitignore | 1 + source/unres/src_MD-M-newcorr/stochfric.F | 8 ++++---- source/unres/src_MD-M/stochfric.F | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 035c785..fc74d7b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ build2/ build_prere/ period_build/ period_build2/ +build_*/ # latex files in documentation doc/*/*.aux diff --git a/source/unres/src_MD-M-newcorr/stochfric.F b/source/unres/src_MD-M-newcorr/stochfric.F index bc12f3e..13d02fb 100644 --- a/source/unres/src_MD-M-newcorr/stochfric.F +++ b/source/unres/src_MD-M-newcorr/stochfric.F @@ -39,7 +39,7 @@ ind=ind+3 enddo do i=nnt,nct - if (itype(i).ne.10) then + if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 d_t_work(ind+j)=d_t(j,i+nres) enddo @@ -68,7 +68,7 @@ ind=ind+3 enddo do i=nnt,nct - if (itype(i).ne.10) then + if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 friction(j,i+nres)=fric_work(ind+j) enddo @@ -234,7 +234,7 @@ c Compute the stochastic forces acting on virtual-bond vectors. stochforc(j,0)=ff(j)+force(j,nnt+nres) enddo do i=nnt,nct - if (itype(i).ne.10) then + if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 stochforc(j,i+nres)=force(j,i+nres) enddo @@ -252,7 +252,7 @@ c Compute the stochastic forces acting on virtual-bond vectors. ind=ind+3 enddo do i=nnt,nct - if (itype(i).ne.10) then + if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 stochforcvec(ind+j)=stochforc(j,i+nres) enddo diff --git a/source/unres/src_MD-M/stochfric.F b/source/unres/src_MD-M/stochfric.F index bc12f3e..13d02fb 100644 --- a/source/unres/src_MD-M/stochfric.F +++ b/source/unres/src_MD-M/stochfric.F @@ -39,7 +39,7 @@ ind=ind+3 enddo do i=nnt,nct - if (itype(i).ne.10) then + if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 d_t_work(ind+j)=d_t(j,i+nres) enddo @@ -68,7 +68,7 @@ ind=ind+3 enddo do i=nnt,nct - if (itype(i).ne.10) then + if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 friction(j,i+nres)=fric_work(ind+j) enddo @@ -234,7 +234,7 @@ c Compute the stochastic forces acting on virtual-bond vectors. stochforc(j,0)=ff(j)+force(j,nnt+nres) enddo do i=nnt,nct - if (itype(i).ne.10) then + if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 stochforc(j,i+nres)=force(j,i+nres) enddo @@ -252,7 +252,7 @@ c Compute the stochastic forces acting on virtual-bond vectors. ind=ind+3 enddo do i=nnt,nct - if (itype(i).ne.10) then + if ((itype(i).ne.10).and.(itype(i).ne.ntyp1)) then do j=1,3 stochforcvec(ind+j)=stochforc(j,i+nres) enddo -- 1.7.9.5