C C $Id: submove.F,v 1.3 1998/07/16 16:40:47 jjv5 Exp arjan $ C C------------------------------------------------------------------------ subroutine submove(ires,picked,npicked,movedres,subpicked, & nsubpicked,subpicked1) implicit double precision (a-h,o-z) #include "divcon.dim" #include "divcon.h" C does the mc move for the residues C arguments: dimension ires(maxres) logical picked(maxres), subpicked(maxsub), & subpicked1(maxsub) C subpicked contains all the subsystems that have been C picked during the entire MC-cycle C subpicked1 contains all the subsystems that will be C picked in this particular MC-step (needed for smarmc) CCC-------------------------------------------------------------CCC if (frozenmc.and.(.not.stand)) then do i=1,nsub notfroz(i) = subpicked1(i) subpicked1(i) = .false. enddo endif if ((nsubpicked + nsubmv) .gt. nsub) then movedsub = nsub - nsubpicked else movedsub = nsubmv endif nsubpicked = nsubpicked + movedsub movedres = 0 do i=1,3 ndangle(i) = 0 ndrmc(i) = 0 enddo do isub=1,movedsub C . take a random subsystem 10 is = irandom(iseed,nsub) if (subpicked(is)) goto 10 subpicked(is) = .true. subpicked1(is) = .true. C . see what atoms are in that subsystem ib = iatom1(is) ie = iatom1(is+1)-1 irr = 2 ir = 1 do 700 j=ib,ie C . move only core atoms if (iabuff(j).ne.0) goto 700 C . see what residues are in the core iat = iatoms(j) 44 if (iat.ge.irpnt(irr)) then irr = irr + 1 ir = ir + 1 goto 44 endif C . move only residues that haven't moved yet if (picked(ir)) goto 700 picked(ir) = .true. npicked = npicked + 1 movedres = movedres + 1 ires(movedres) = ir if (frozenmc.and.(.not.stand)) notfroz(is) = .true. call rottr(ir) 700 continue enddo C calculate xyzmin in case of PME-calculation if (pme.or.gridsub) then do i=1,3 xyzmin(i) = xyz(i,1) xyzmax(i) = xyz(i,1) enddo do 2010 iat=2,natoms do i=1,3 xyzmin(i) = min(xyzmin(i),xyz(i,iat)) xyzmax(i) = max(xyzmax(i),xyz(i,iat)) enddo 2010 continue do i=1,3 dxyz(i) = xyzmax(i)-xyzmin(i) enddo endif end