projects
/
unres.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adam's changes
[unres.git]
/
source
/
unres
/
src-HCD-5D
/
MD_A-MTS.F
diff --git
a/source/unres/src-HCD-5D/MD_A-MTS.F
b/source/unres/src-HCD-5D/MD_A-MTS.F
index
ca52aaa
..
d82cf17
100644
(file)
--- a/
source/unres/src-HCD-5D/MD_A-MTS.F
+++ b/
source/unres/src-HCD-5D/MD_A-MTS.F
@@
-166,14
+166,14
@@
c Entering the MD loop
& .and. mod(itime,count_reset_vel).eq.0) then
call random_vel
write(iout,'(a,f20.2)')
& .and. mod(itime,count_reset_vel).eq.0) then
call random_vel
write(iout,'(a,f20.2)')
- & "Velocities reset to random values, time",totT
+ & "Velocities reset to random values, time",totT
do i=0,2*nres
do j=1,3
d_t_old(j,i)=d_t(j,i)
enddo
enddo
endif
do i=0,2*nres
do j=1,3
d_t_old(j,i)=d_t(j,i)
enddo
enddo
endif
- if (reset_moment .and. mod(itime,count_reset_moment).eq.0) then
+ if (reset_moment .and. mod(itime,count_reset_moment).eq.0) then
call inertia_tensor
call vcm_vel(vcm)
do j=1,3
call inertia_tensor
call vcm_vel(vcm)
do j=1,3
@@
-182,7
+182,7
@@
c Entering the MD loop
call kinetic(EK)
kinetic_T=2.0d0/(dimen3*Rb)*EK
scalfac=dsqrt(T_bath/kinetic_T)
call kinetic(EK)
kinetic_T=2.0d0/(dimen3*Rb)*EK
scalfac=dsqrt(T_bath/kinetic_T)
- write(iout,'(a,f20.2)') "Momenta zeroed out, time",totT
+ write(iout,'(a,f20.2)') "Momenta zeroed out, time",totT
do i=0,2*nres
do j=1,3
d_t_old(j,i)=scalfac*d_t(j,i)
do i=0,2*nres
do j=1,3
d_t_old(j,i)=scalfac*d_t(j,i)
@@
-209,6
+209,7
@@
c Variable time step algorithm.
stop
#endif
endif
stop
#endif
endif
+ itime_mat=itime
if (ntwe.ne.0) then
if (mod(itime,ntwe).eq.0) then
call statout(itime)
if (ntwe.ne.0) then
if (mod(itime,ntwe).eq.0) then
call statout(itime)
@@
-1256,7
+1257,6
@@
c write (iout,*) "friction accelerations"
call fivediaginv_mult(dimen,fric_work, d_af_work)
c write (iout,*) "stochastic acceleratios"
call fivediaginv_mult(dimen,stochforcvec, d_as_work)
call fivediaginv_mult(dimen,fric_work, d_af_work)
c write (iout,*) "stochastic acceleratios"
call fivediaginv_mult(dimen,stochforcvec, d_as_work)
-c write (iout,*) "Leaving sddir_precalc"
#else
call ginv_mult(fric_work, d_af_work)
call ginv_mult(stochforcvec, d_as_work)
#else
call ginv_mult(fric_work, d_af_work)
call ginv_mult(stochforcvec, d_as_work)
@@
-1266,6
+1266,7
@@
c write (iout,*) "Leaving sddir_precalc"
write (iout,'(3f10.5)') (d_af_work(i),i=1,dimen3)
write (iout,*) "d_as_work"
write (iout,'(3f10.5)') (d_as_work(i),i=1,dimen3)
write (iout,'(3f10.5)') (d_af_work(i),i=1,dimen3)
write (iout,*) "d_as_work"
write (iout,'(3f10.5)') (d_as_work(i),i=1,dimen3)
+ write (iout,*) "Leaving sddir_precalc"
#endif
return
end
#endif
return
end
@@
-1811,10
+1812,11
@@
c rest2name = prefix(:ilen(prefix))//'.rst'
write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),
& (d_t(j,i+nres),j=1,3)
enddo
write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),
& (d_t(j,i+nres),j=1,3)
enddo
+ endif
+ if (lang.eq.0) then
c Zeroing the total angular momentum of the system
write(iout,*) "Calling the zero-angular
& momentum subroutine"
c Zeroing the total angular momentum of the system
write(iout,*) "Calling the zero-angular
& momentum subroutine"
- endif
call inertia_tensor
c Getting the potential energy and forces and velocities and accelerations
call vcm_vel(vcm)
call inertia_tensor
c Getting the potential energy and forces and velocities and accelerations
call vcm_vel(vcm)
@@
-1829,8
+1831,14
@@
c Removing the velocity of the center of mass
if(me.eq.king.or..not.out1file)then
write (iout,*) "vcm right after adjustment:"
write (iout,*) (vcm(j),j=1,3)
if(me.eq.king.or..not.out1file)then
write (iout,*) "vcm right after adjustment:"
write (iout,*) (vcm(j),j=1,3)
+ write (iout,*) "Initial velocities after adjustment"
+ do i=0,nres
+ write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),
+ & (d_t(j,i+nres),j=1,3)
+ enddo
+ call flush(iout)
+ endif
endif
endif
- call flush(iout)
write (iout,*) "init_MD before initial structure REST ",rest
if (.not.rest) then
122 continue
write (iout,*) "init_MD before initial structure REST ",rest
if (.not.rest) then
122 continue
@@
-1957,12
+1965,12
@@
c 8/22/17 AL Loop to produce a low-energy random conformation
cycle
endif
endif
cycle
endif
endif
-#ifdef SEARCHSC
if (me.eq.king.or..not.out1file) then
write (iout,*) "Energies after removing overlaps"
call etotal(energia(0))
call enerprint(energia(0))
endif
if (me.eq.king.or..not.out1file) then
write (iout,*) "Energies after removing overlaps"
call etotal(energia(0))
call enerprint(energia(0))
endif
+#ifdef SEARCHSC
! Search for better SC rotamers if requested
if (searchsc) then
call sc_move(2,nres-1,10,1d10,nft_sc,etot)
! Search for better SC rotamers if requested
if (searchsc) then
call sc_move(2,nres-1,10,1d10,nft_sc,etot)
@@
-1979,6
+1987,21
@@
c 8/22/17 AL Loop to produce a low-energy random conformation
iranconf=1
goto 122
endif
iranconf=1
goto 122
endif
+ else
+! Remove SC overlaps if requested
+ if (overlapsc) then
+ write (iout,*) 'Calling OVERLAP_SC'
+ call overlap_sc(fail)
+ if (fail) then
+ write (iout,*)
+ & "Failed to remove overlap"
+ endif
+ endif
+ if (me.eq.king.or..not.out1file) then
+ write (iout,*) "Energies after removing overlaps"
+ call etotal(energia(0))
+ call enerprint(energia(0))
+ endif
endif
C 8/22/17 AL Minimize initial structure
if (dccart) then
endif
C 8/22/17 AL Minimize initial structure
if (dccart) then
@@
-2050,6
+2073,7
@@
c write(iout,*) (potEcomp(i),i=0,n_ene)
c write (iout,*) "PotE-homology",potE
totE=EK+potE
itime=0
c write (iout,*) "PotE-homology",potE
totE=EK+potE
itime=0
+ itime_mat=itime
if (ntwe.ne.0) call statout(itime)
if(me.eq.king.or..not.out1file)
& write (iout,'(/a/3(a25,1pe14.5/))') "Initial:",
if (ntwe.ne.0) call statout(itime)
if(me.eq.king.or..not.out1file)
& write (iout,'(/a/3(a25,1pe14.5/))') "Initial:",
@@
-2187,7
+2211,7
@@
c-----------------------------------------------------------
double precision xv,sigv,lowb,highb,vec_afm(3),Ek1,Ek2,Ek3,aux
integer i,ii,j,k,l,ind
double precision anorm_distr
double precision xv,sigv,lowb,highb,vec_afm(3),Ek1,Ek2,Ek3,aux
integer i,ii,j,k,l,ind
double precision anorm_distr
- logical lprn /.true./
+ logical lprn /.false./
#ifdef FIVEDIAG
integer ichain,n,innt,inct,ibeg,ierr
double precision work(8*maxres6)
#ifdef FIVEDIAG
integer ichain,n,innt,inct,ibeg,ierr
double precision work(8*maxres6)
@@
-2351,6
+2375,9
@@
c write (iout,*) "ichain",ichain," innt",innt," inct",inct
!
#define WLOS
#ifdef WLOS
!
#define WLOS
#ifdef WLOS
+ if (nnt.eq.1) then
+ d_t(:,0)=d_t(:,1)
+ endif
do i=1,nres
if (itype(i).eq.10 .or. itype(i).eq.ntyp1) then
do j=1,3
do i=1,nres
if (itype(i).eq.10 .or. itype(i).eq.ntyp1) then
do j=1,3
@@
-2363,11
+2390,17
@@
c write (iout,*) "ichain",ichain," innt",innt," inct",inct
enddo
end if
enddo
enddo
end if
enddo
+ d_t(:,nres)=0.0d0
d_t(:,nct)=0.0d0
d_t(:,nct)=0.0d0
+ d_t(:,2*nres)=0.0d0
+ if (nnt.gt.1) then
+ d_t(:,0)=d_t(:,1)
+ d_t(:,1)=0.0d0
+ endif
c d_a(:,0)=d_a(:,1)
c d_a(:,1)=0.0d0
c write (iout,*) "Shifting accelerations"
c d_a(:,0)=d_a(:,1)
c d_a(:,1)=0.0d0
c write (iout,*) "Shifting accelerations"
- do ichain=1,nchain
+ do ichain=2,nchain
c write (iout,*) "ichain",chain_border1(1,ichain)-1,
c & chain_border1(1,ichain)
d_t(:,chain_border1(1,ichain)-1)=d_t(:,chain_border1(1,ichain))
c write (iout,*) "ichain",chain_border1(1,ichain)-1,
c & chain_border1(1,ichain)
d_t(:,chain_border1(1,ichain)-1)=d_t(:,chain_border1(1,ichain))
@@
-2797,8
+2830,8
@@
c enddo
dc(j,0)=dc_work(j)
d_t(j,0)=d_t_work(j)
enddo
dc(j,0)=dc_work(j)
d_t(j,0)=d_t_work(j)
enddo
- ind=3
- do i=nnt,nct-1
+ ind=3
+ do i=nnt,nct-1
do j=1,3
dc(j,i)=dc_work(ind+j)
d_t(j,i)=d_t_work(ind+j)
do j=1,3
dc(j,i)=dc_work(ind+j)
d_t(j,i)=d_t_work(ind+j)