anchor.diff:  WRITE(6,*) " KIRKWOOD"
   WRITE(6,*)
   WRITE(6,"(A,F9.4,E12.4)") " FRICTIONAL COEFFICIENT = ", F1, FR1
  +WRITE(6,*)
   WRITE(6,*) " BLOOMFIELD "
   WRITE(6,*)
   WRITE(6,"(A,F9.4,E12.4)") " FRICTIONAL COEFFICIENT = ", F2, FR2
  -WRITE(6,"(A, I5)") " TOTAL SPHERES = ", NATOM
  +WRITE(6,*)
  +WRITE(6,"(A, I5)") " TOTAL SPHERES = ", NSPHERE
   
   ! ITERATIONS START HERE
   
  -DO I = 1, NATOM
  -    DO J = 1, NATOM
  +DO I = 1, NSPHERE
  +    DO J = 1, NSPHERE
           IF (I .NE. J) THEN
               DO K = 1, IP
                   T(I,J,K) = T(I,J,K) * E(J)
  
positive.code: 
  ! Fortran 90 version by David W. Wright November 2013
  
  INTEGER NOSPH
  PARAMETER (NOSPH = 2000)
  DOUBLE PRECISION R(NOSPH,3),G(NOSPH),T(NOSPH,NOSPH,3)
  DOUBLE PRECISION E(NOSPH)
  DOUBLE PRECISION DIS(3),EIG(3)
  DOUBLE PRECISION PI, EI, ER, EPS, S1, S2, S3, S4, S5, E2, E3
  DOUBLE PRECISION EL2, D2, DISTAN, EE, FACT, A, B, F1, FR1, FR2
  DOUBLE PRECISION V, F2, EA, F, FRT
  INTEGER IND, NMAX, IP, NEPS, NSTOP, N, J, NATOM, K
  INTEGER L, I, IT, IERR
  
  PI = 3.1415926536
  IND = 1
  
negative.code:     E3 = E2 * E(K)
      S4 = S4 + E3
  
      DO L = 1, NSPHERE
          EL2 = E(L)**2
          IF (K .LT. L) THEN
              D2 = 0.0
  