anchor.diff:  
   END DO
   
  +
   MX = INT((XMA-XMI)/BOX) + 1
   MY = INT((YMA-YMI)/BOX) + 1
   MZ = INT((ZMA-ZMI)/BOX) + 1
  
positive.code: DO
  
      READ (PDBFIL,'(A4)', IOSTAT=IERR) ATOM(1:4)
      IF (IERR .LT. 0) THEN
          WRITE(STDERR, "(A)") "End of file reached with no ATOM records read."
          STOP
      END IF
  
      IF (ATOM .NE. "ATOM") THEN
          BACKSPACE PDBFIL
          EXIT
      END IF
  
  END DO
  
  
  ! Initialize statistics
  NATOMM = 0
  
negative.code: 
      READ (PDBFIL,'(A4)', IOSTAT=IERR) ATOM(1:4)
  
      IF (ATOM .EQ. "ATOM") THEN
          BACKSPACE PDBFIL
          EXIT
      END IF
  