code: public static double getEAIDNumber(IAtomContainer atomContainer) throws NoSuchAtomException,
                                                                              BadMatrixFormatException, IndexOutOfBoundsException {
          GIMatrix matrix = new GIMatrix(getExtendedAdjacenyMatrix(atomContainer));
  
          GIMatrix tempMatrix = matrix;
          GIMatrix fixedMatrix = matrix;
          for (int i = 2; i < atomContainer.getAtomCount(); i++) {
              tempMatrix = tempMatrix.multiply(fixedMatrix);
              matrix = matrix.add(tempMatrix);
          }
  
          for (int i = 0; i < atomContainer.getAtomCount(); i++) {
              matrix.setValueAt(i, i, matrix.getValueAt(i, i) + 1);
          }
          double eaid = matrix.trace();
  
          logger.debug("final matrix - the sum of the powers of EA matrix: ");
          displayMatrix(matrix.getArrayValue());
          logger.debug("eaid number: " + eaid);
  
          return eaid;
      }
docs: Calculates the extended adjacency matrix index.
  An implementation of the algorithm published in {@cdk.cite HU96}.
  
  @cdk.keyword EAID number