hdiff output

r30537/ljadd.f 2016-05-31 11:30:05.564233541 +0100 r30536/ljadd.f 2016-05-31 11:30:05.760236160 +0100
 18: C 18: C
 19: C 19: C
 20: C************************************************************************* 20: C*************************************************************************
 21: C 21: C
 22: C  Subroutine LJADD calculates the cartesian gradient and second 22: C  Subroutine LJADD calculates the cartesian gradient and second
 23: C  derivative matrix analytically for LJ with addressable epsilon values. Reduced units. 23: C  derivative matrix analytically for LJ with addressable epsilon values. Reduced units.
 24: C 24: C
 25: C************************************************************************* 25: C*************************************************************************
 26: C 26: C
 27:       SUBROUTINE LJADD(N, X, V, ENERGY, GTEST, STEST) 27:       SUBROUTINE LJADD(N, X, V, ENERGY, GTEST, STEST)
 28:       USE COMMONS, ONLY : LJADDEPS, VT 28:       USE COMMONS, ONLY : LJADDEPS
 29:       IMPLICIT NONE 29:       IMPLICIT NONE
 30:       INTEGER N, J1, J2, J3, J4 30:       INTEGER N, J1, J2, J3, J4
 31:       LOGICAL GTEST, STEST 31:       LOGICAL GTEST, STEST
 32:       DOUBLE PRECISION X(3*N), ENERGY, R6, 32:       DOUBLE PRECISION X(3*N), ENERGY, R6,
 33:      1                 V(3*N), R2(N,N), R2T, 33:      1                 V(3*N), R2(N,N), R2T,
 34:      2                 R8(N,N), G(N,N), XG(N,N), 34:      2                 R8(N,N), G(N,N), XG(N,N),
 35:      3                 R14(N,N), F(N,N), DUMMY, DUMMYX, DUMMYY, DUMMYZ, DIST, XMUL2 35:      3                 R14(N,N), F(N,N), DUMMY, DUMMYX, DUMMYY, DUMMYZ, DIST, XMUL2
 36: C  36: C 
 37: C  Store distance matrices. 37: C  Store distance matrices.
 38: C 38: C
 39:       ENERGY=0.0D0 39:       ENERGY=0.0D0
 40:       DO J1=1,N 
 41:          VT(J1)=0.0D0 
 42:       ENDDO 
 43:       IF (GTEST.AND.(.NOT.STEST)) THEN 40:       IF (GTEST.AND.(.NOT.STEST)) THEN
 44:          DO J1=1,N 41:          DO J1=1,N
 45:             J3=3*J1 42:             J3=3*J1
 46:             XG(J1,J1)=0.0D0 43:             XG(J1,J1)=0.0D0
 47:             DO J2=J1+1,N 44:             DO J2=J1+1,N
 48:                J4=3*J2 45:                J4=3*J2
 49:                DIST=(X(J3-2)-X(J4-2))**2+(X(J3-1)-X(J4-1))**2+(X(J3)-X(J4))**2 46:                DIST=(X(J3-2)-X(J4-2))**2+(X(J3-1)-X(J4-1))**2+(X(J3)-X(J4))**2
 50:                DIST=1.0D0/DIST 47:                DIST=1.0D0/DIST
 51:                R6=DIST**3 48:                R6=DIST**3
 52:                DUMMY=LJADDEPS(J2,J1)*R6*(R6-1.0D0) 49:                DUMMY=LJADDEPS(J2,J1)*R6*(R6-1.0D0)
 53:                VT(J1)=VT(J1)+DUMMY 
 54:                VT(J2)=VT(J2)+DUMMY 
 55:                ENERGY=ENERGY+DUMMY 50:                ENERGY=ENERGY+DUMMY
 56:                DIST=DIST*R6 51:                DIST=DIST*R6
 57:                XG(J2,J1)=-LJADDEPS(J2,J1)*24.0D0*(2.0D0*R6-1.0D0)*DIST 52:                XG(J2,J1)=-LJADDEPS(J2,J1)*24.0D0*(2.0D0*R6-1.0D0)*DIST
 58:                XG(J1,J2)=XG(J2,J1) 53:                XG(J1,J2)=XG(J2,J1)
 59:             ENDDO 54:             ENDDO
 60:          ENDDO 55:          ENDDO
 61:       ELSEIF (GTEST) THEN 56:       ELSEIF (GTEST) THEN
 62:          DO J1=1,N 57:          DO J1=1,N
 63:             XG(J1,J1)=0.0D0 58:             XG(J1,J1)=0.0D0
 64:             R2(J1,J1)=0.0D0 59:             R2(J1,J1)=0.0D0
 65:             R8(J1,J1)=0.0D0 60:             R8(J1,J1)=0.0D0
 66:             R14(J1,J1)=0.0D0 61:             R14(J1,J1)=0.0D0
 67:             DO J2=J1+1,N 62:             DO J2=J1+1,N
 68:                R2(J2,J1)=(X(3*(J1-1)+1)-X(3*(J2-1)+1))**2 63:                R2(J2,J1)=(X(3*(J1-1)+1)-X(3*(J2-1)+1))**2
 69:      1                  +(X(3*(J1-1)+2)-X(3*(J2-1)+2))**2 64:      1                  +(X(3*(J1-1)+2)-X(3*(J2-1)+2))**2
 70:      2                  +(X(3*(J1-1)+3)-X(3*(J2-1)+3))**2 65:      2                  +(X(3*(J1-1)+3)-X(3*(J2-1)+3))**2
 71:                R2(J2,J1)=1.0D0/R2(J2,J1) 66:                R2(J2,J1)=1.0D0/R2(J2,J1)
 72:                R6=R2(J2,J1)**3 67:                R6=R2(J2,J1)**3
 73:                DUMMY=LJADDEPS(J2,J1)*R6*(R6-1.0D0) 68:                ENERGY=ENERGY+LJADDEPS(J2,J1)*R6*(R6-1.0D0)
 74:                VT(J1)=VT(J1)+DUMMY 
 75:                VT(J2)=VT(J2)+DUMMY 
 76:                ENERGY=ENERGY+DUMMY 
 77:                R8(J2,J1)=R2(J2,J1)**4 69:                R8(J2,J1)=R2(J2,J1)**4
 78:                R14(J2,J1)=R8(J2,J1)*R8(J2,J1)/R2(J2,J1) 70:                R14(J2,J1)=R8(J2,J1)*R8(J2,J1)/R2(J2,J1)
 79:                R2(J1,J2)=R2(J2,J1) 71:                R2(J1,J2)=R2(J2,J1)
 80:                XG(J2,J1)=-LJADDEPS(J2,J1)*24.0D0*(2.0D0*R6-1.0D0)*R2(J1,J2)*R6 72:                XG(J2,J1)=-LJADDEPS(J2,J1)*24.0D0*(2.0D0*R6-1.0D0)*R2(J1,J2)*R6
 81:                XG(J1,J2)=XG(J2,J1) 73:                XG(J1,J2)=XG(J2,J1)
 82:             ENDDO 74:             ENDDO
 83:          ENDDO  75:          ENDDO 
 84:       ELSE 76:       ELSE
 85:          DO J1=1,N 77:          DO J1=1,N
 86:             J3=3*(J1-1) 78:             J3=3*(J1-1)


legend
Lines Added 
Lines changed
 Lines Removed

hdiff - version: 2.1.0