code: public static float calculate(IAtomContainer query, IAtomContainer target) throws CDKException {
          float[] mom1 = generateMoments(query);
          float[] mom2 = generateMoments(target);
          float sum = 0;
          for (int i = 0; i < mom1.length; i++) {
              sum += Math.abs(mom1[i] - mom2[i]);
          }
          return (float) (1.0 / (1.0 + sum / 12.0));
      }
docs: Evaluate the 3D similarity between two molecules.
  
  The method does not remove hydrogens. If this is required, remove them from the
  molecules before passing them here.
  
  @param query  The query molecule
  @param target The target molecule
  @return The similarity between the two molecules (ranging from 0 to 1)
  @throws CDKException if either molecule does not have 3D coordinates