hdiff output

r31421/io1.f 2017-01-21 10:35:48.698250000 +0000 r31420/io1.f 2017-01-21 10:35:49.246250000 +0000
708:          IF (DJWRBID.EQ.1) THEN708:          IF (DJWRBID.EQ.1) THEN
709:             WRITE(MYUNIT,'(3(I4,A))') NATOMS,' sites for ',NRIGIDBODY,' rigid bodies - DJW potential ',DJWRBID709:             WRITE(MYUNIT,'(3(I4,A))') NATOMS,' sites for ',NRIGIDBODY,' rigid bodies - DJW potential ',DJWRBID
710:             WRITE(MYUNIT,'(2(I4,A))') NRIGIDBODY-NHEXAMERS,' pentamers and ',NHEXAMERS,' hexamers'710:             WRITE(MYUNIT,'(2(I4,A))') NRIGIDBODY-NHEXAMERS,' pentamers and ',NHEXAMERS,' hexamers'
711:             WRITE(MYUNIT,'(A,4G20.10)') 'rho, eps, sigma and pentamer radius=',CAPSIDRHO,CAPSIDEPS,SIGMAPENT,RADPENT711:             WRITE(MYUNIT,'(A,4G20.10)') 'rho, eps, sigma and pentamer radius=',CAPSIDRHO,CAPSIDEPS,SIGMAPENT,RADPENT
712:             WRITE(MYUNIT,'(A,4G20.10)') 'hexamer sigma, radius and hex/pent sigma=',SIGMAHEX,RADHEX,SIGMAPH712:             WRITE(MYUNIT,'(A,4G20.10)') 'hexamer sigma, radius and hex/pent sigma=',SIGMAHEX,RADHEX,SIGMAPH
713:          ENDIF713:          ENDIF
714:       ELSEIF (MLP3T) THEN714:       ELSEIF (MLP3T) THEN
715:          WRITE(MYUNIT,'(I4,A)') NATOMS,' link weights for MLP3'715:          WRITE(MYUNIT,'(I4,A)') NATOMS,' link weights for MLP3'
716:       ELSEIF (MLQT) THEN716:       ELSEIF (MLQT) THEN
717:          WRITE(MYUNIT,'(I4,A)') NATOMS,' variables for ML quadratic'717:          WRITE(MYUNIT,'(I4,A)') NATOMS,' variables for ML quadratic'
718:       ELSEIF  (LJADDT) THEN 
719:          IF (SORTT) THEN 
720:             WRITE(MYUNIT,'(A)') 'Turning off SORT option for LJADD' 
721:             SORTT=.FALSE. 
722:          ENDIF 
723:          WRITE(MYUNIT,'(I4,A)') NATOMS,' LJ addressable atoms' 
724:       ELSE718:       ELSE
725:          WRITE(MYUNIT,'(I4,A)') NATOMS,' LJ atoms'719:          WRITE(MYUNIT,'(I4,A)') NATOMS,' LJ atoms'
726:       ENDIF720:       ENDIF
727:       IF (PYGPERIODICT.OR.PYBINARYT) CALL INITIALISEPYGPERIODIC721:       IF (PYGPERIODICT.OR.PYBINARYT) CALL INITIALISEPYGPERIODIC
728:       IF (LJCAPSIDT) CALL INITIALISELJCAPSIDMODEL722:       IF (LJCAPSIDT) CALL INITIALISELJCAPSIDMODEL
729:       IF (PYT) call py_input723:       IF (PYT) call py_input
730:       IF (INTMINT)  WRITE(MYUNIT,'(A)') 'Internal coordinate transformation will be used'724:       IF (INTMINT)  WRITE(MYUNIT,'(A)') 'Internal coordinate transformation will be used'
731:       IF (STAR) THEN725:       IF (STAR) THEN
732:          WRITE(MYUNIT,'(A)') 'Excited state'726:          WRITE(MYUNIT,'(A)') 'Excited state'
733:       ELSE IF (PLUS) THEN727:       ELSE IF (PLUS) THEN


r31421/ljadd.f 2017-01-21 10:35:48.922250000 +0000 r31420/ljadd.f 2017-01-21 10:35:49.478250000 +0000
242: C  Store distance matrices.242: C  Store distance matrices.
243: C243: C
244: !     WRITE(MYUNIT,'(A)') 'coords in LJADD2:'244: !     WRITE(MYUNIT,'(A)') 'coords in LJADD2:'
245: !     WRITE(MYUNIT,'(3G20.10)') X(1:3*N)245: !     WRITE(MYUNIT,'(3G20.10)') X(1:3*N)
246:       ENERGY=0.0D0246:       ENERGY=0.0D0
247:       DO J1=1,N247:       DO J1=1,N
248:          VT(J1)=0.0D0248:          VT(J1)=0.0D0
249:       ENDDO249:       ENDDO
250:       IF (GTEST.AND.(.NOT.STEST)) THEN250:       IF (GTEST.AND.(.NOT.STEST)) THEN
251:          DO J1=1,N251:          DO J1=1,N
252:             MJ1=MOD(J1-1,NADDTARGET)+1252:             MJ1=MOD(J1,NADDTARGET)+1
253:             J3=3*J1253:             J3=3*J1
254:             XG(J1,J1)=0.0D0254:             XG(J1,J1)=0.0D0
255:             DO J2=J1+1,N255:             DO J2=J1+1,N
256:                MJ2=MOD(J2-1,NADDTARGET)+1256:                MJ2=MOD(J2,NADDTARGET)+1
257:                J4=3*J2257:                J4=3*J2
258:                DIST=(X(J3-2)-X(J4-2))**2+(X(J3-1)-X(J4-1))**2+(X(J3)-X(J4))**2258:                DIST=(X(J3-2)-X(J4-2))**2+(X(J3-1)-X(J4-1))**2+(X(J3)-X(J4))**2
259:                DIST=1.0D0/DIST259:                DIST=1.0D0/DIST
260:                R6=DIST**3260:                R6=DIST**3
261:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only261:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only
262:                   DUMMY=LJADDEPS(MJ2,MJ1)*R6*R6262:                   DUMMY=LJADDEPS(MJ2,MJ1)*R6*R6
263:                ELSE263:                ELSE
264:                   DUMMY=LJADDEPS(MJ2,MJ1)*R6*(R6-1.0D0)264:                   DUMMY=LJADDEPS(MJ2,MJ1)*R6*(R6-1.0D0)
265:                ENDIF265:                ENDIF
266:                VT(J1)=VT(J1)+DUMMY266:                VT(J1)=VT(J1)+DUMMY
267:                VT(J2)=VT(J2)+DUMMY267:                VT(J2)=VT(J2)+DUMMY
268:                ENERGY=ENERGY+DUMMY268:                ENERGY=ENERGY+DUMMY
269: !              WRITE(MYUNIT,'(A,4I8,3G20.10)') 'J1,J2,MJ1,MJ2,EPS,DUMMY,ENERGY=',J1,J2,MJ1,MJ2,LJADDEPS(MJ2,MJ1),DUMMY,ENERGY269: !              WRITE(MYUNIT,'(A,2I8,2G20.10)') 'J1,J2,DUMMY,ENERGY=',J1,J2,DUMMY,ENERGY
270:                DIST=DIST*R6270:                DIST=DIST*R6
271:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only271:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only
272:                   XG(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*2.0D0*R6*DIST272:                   XG(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*2.0D0*R6*DIST
273:                ELSE273:                ELSE
274:                   XG(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*(2.0D0*R6-1.0D0)*DIST274:                   XG(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*(2.0D0*R6-1.0D0)*DIST
275:                ENDIF275:                ENDIF
276:                XG(J1,J2)=XG(J2,J1)276:                XG(J1,J2)=XG(J2,J1)
277:             ENDDO277:             ENDDO
278:          ENDDO278:          ENDDO
279:       ELSEIF (GTEST) THEN279:       ELSEIF (GTEST) THEN
280:          DO J1=1,N280:          DO J1=1,N
281:             MJ1=MOD(J1-1,NADDTARGET)+1281:             MJ1=MOD(J1,NADDTARGET)+1
282:             XG(J1,J1)=0.0D0282:             XG(J1,J1)=0.0D0
283:             R2(J1,J1)=0.0D0283:             R2(J1,J1)=0.0D0
284:             R8(J1,J1)=0.0D0284:             R8(J1,J1)=0.0D0
285:             R14(J1,J1)=0.0D0285:             R14(J1,J1)=0.0D0
286:             DO J2=J1+1,N286:             DO J2=J1+1,N
287:                MJ2=MOD(J2-1,NADDTARGET)+1287:                MJ2=MOD(J2,NADDTARGET)+1
288:                R2(J2,J1)=(X(3*(J1-1)+1)-X(3*(J2-1)+1))**2288:                R2(J2,J1)=(X(3*(J1-1)+1)-X(3*(J2-1)+1))**2
289:      1                  +(X(3*(J1-1)+2)-X(3*(J2-1)+2))**2289:      1                  +(X(3*(J1-1)+2)-X(3*(J2-1)+2))**2
290:      2                  +(X(3*(J1-1)+3)-X(3*(J2-1)+3))**2290:      2                  +(X(3*(J1-1)+3)-X(3*(J2-1)+3))**2
291:                R2(J2,J1)=1.0D0/R2(J2,J1)291:                R2(J2,J1)=1.0D0/R2(J2,J1)
292:                R6=R2(J2,J1)**3292:                R6=R2(J2,J1)**3
293:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only293:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only
294:                   DUMMY=LJADDEPS(MJ2,MJ1)*R6*R6294:                   DUMMY=LJADDEPS(MJ2,MJ1)*R6*R6
295:                ELSE295:                ELSE
296:                   DUMMY=LJADDEPS(MJ2,MJ1)*R6*(R6-1.0D0)296:                   DUMMY=LJADDEPS(MJ2,MJ1)*R6*(R6-1.0D0)
297:                ENDIF297:                ENDIF
304:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only304:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only
305:                   XG(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*2.0D0*R6*R2(J1,J2)*R6305:                   XG(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*2.0D0*R6*R2(J1,J2)*R6
306:                ELSE306:                ELSE
307:                   XG(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*(2.0D0*R6-1.0D0)*R2(J1,J2)*R6307:                   XG(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*(2.0D0*R6-1.0D0)*R2(J1,J2)*R6
308:                ENDIF308:                ENDIF
309:                XG(J1,J2)=XG(J2,J1)309:                XG(J1,J2)=XG(J2,J1)
310:             ENDDO310:             ENDDO
311:          ENDDO 311:          ENDDO 
312:       ELSE312:       ELSE
313:          DO J1=1,N313:          DO J1=1,N
314:             MJ1=MOD(J1-1,NADDTARGET)+1314:             MJ1=MOD(J1,NADDTARGET)+1
315:             J3=3*(J1-1)315:             J3=3*(J1-1)
316:             DO J2=J1+1,N316:             DO J2=J1+1,N
317:                MJ2=MOD(J2-1,NADDTARGET)+1317:                MJ2=MOD(J2,NADDTARGET)+1
318:                J4=3*(J2-1)318:                J4=3*(J2-1)
319:                R2T=(X(J3+1)-X(J4+1))**2+(X(J3+2)-X(J4+2))**2+(X(J3+3)-X(J4+3))**2319:                R2T=(X(J3+1)-X(J4+1))**2+(X(J3+2)-X(J4+2))**2+(X(J3+3)-X(J4+3))**2
320:                R2T=1.0D0/R2T320:                R2T=1.0D0/R2T
321:                R6=R2T**3321:                R6=R2T**3
322:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only322:                IF (MJ1.EQ.MJ2) THEN ! repulsive part only
323:                   ENERGY=ENERGY+LJADDEPS(MJ2,MJ1)*R6*R6323:                   ENERGY=ENERGY+LJADDEPS(MJ2,MJ1)*R6*R6
324:                ELSE324:                ELSE
325:                   ENERGY=ENERGY+LJADDEPS(MJ2,MJ1)*R6*(R6-1.0D0)325:                   ENERGY=ENERGY+LJADDEPS(MJ2,MJ1)*R6*(R6-1.0D0)
326:                ENDIF326:                ENDIF
327:             ENDDO327:             ENDDO
362:       IMPLICIT NONE362:       IMPLICIT NONE
363:       INTEGER N, J1, J2, J3, J4, J5, J6, MJ1, MJ2363:       INTEGER N, J1, J2, J3, J4, J5, J6, MJ1, MJ2
364:       DOUBLE PRECISION G(N,N), R14(N,N), R8(N,N),364:       DOUBLE PRECISION G(N,N), R14(N,N), R8(N,N),
365:      1                 R2(N,N), F(N,N), 365:      1                 R2(N,N), F(N,N), 
366:      2                 X(3*N),DUMMY366:      2                 X(3*N),DUMMY
367: 367: 
368: C368: C
369: C  Calculate the g tensor.369: C  Calculate the g tensor.
370: C370: C
371:       DO J1=1,N371:       DO J1=1,N
372:          MJ1=MOD(J1-1,NADDTARGET)+1372:          MJ1=MOD(J1,NADDTARGET)+1
373:          G(J1,J1)=0.0D0373:          G(J1,J1)=0.0D0
374:          DO J2=J1+1,N374:          DO J2=J1+1,N
375:             MJ2=MOD(J2-1,NADDTARGET)+1375:             MJ2=MOD(J2,NADDTARGET)+1
376:             IF (MJ1.EQ.MJ2) THEN ! repulsive part only376:             IF (MJ1.EQ.MJ2) THEN ! repulsive part only
377:                G(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*2.0D0*R14(J2,J1)377:                G(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*2.0D0*R14(J2,J1)
378:             ELSE378:             ELSE
379:                G(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*(2.0D0*R14(J2,J1)-R8(J2,J1))379:                G(J2,J1)=-LJADDEPS(MJ2,MJ1)*24.0D0*(2.0D0*R14(J2,J1)-R8(J2,J1))
380:             ENDIF380:             ENDIF
381:             G(J1,J2)=G(J2,J1)381:             G(J1,J2)=G(J2,J1)
382:          ENDDO382:          ENDDO
383:       ENDDO383:       ENDDO
384: 384: 
385:       DO J1=1,N385:       DO J1=1,N
386:          MJ1=MOD(J1-1,NADDTARGET)+1386:          MJ1=MOD(J1,NADDTARGET)+1
387:          F(J1,J1)=0.0D0387:          F(J1,J1)=0.0D0
388:          DO J2=J1+1,N 388:          DO J2=J1+1,N 
389:             MJ2=MOD(J2-1,NADDTARGET)+1389:             MJ2=MOD(J2,NADDTARGET)+1
390:             IF (MJ1.EQ.MJ2) THEN ! repulsive part only390:             IF (MJ1.EQ.MJ2) THEN ! repulsive part only
391:                F(J2,J1)=LJADDEPS(MJ2,MJ1)*672.0D0*R14(J2,J1)391:                F(J2,J1)=LJADDEPS(MJ2,MJ1)*672.0D0*R14(J2,J1)
392:             ELSE392:             ELSE
393:                F(J2,J1)=LJADDEPS(MJ2,MJ1)*672.0D0*R14(J2,J1)-LJADDEPS(MJ2,MJ1)*192.0D0*R8(J2,J1)393:                F(J2,J1)=LJADDEPS(MJ2,MJ1)*672.0D0*R14(J2,J1)-LJADDEPS(MJ2,MJ1)*192.0D0*R8(J2,J1)
394:             ENDIF394:             ENDIF
395:             F(J1,J2)=F(J2,J1)395:             F(J1,J2)=F(J2,J1)
396:          ENDDO396:          ENDDO
397:       ENDDO397:       ENDDO
398: C398: C
399: C  Now do the hessian. First are the entirely diagonal terms.399: C  Now do the hessian. First are the entirely diagonal terms.


legend
Lines Added 
Lines changed
 Lines Removed

hdiff - version: 2.1.0