code: private void loadTemplates() throws CDKException {
          try (InputStream gin = getClass().getResourceAsStream(TEMPLATE_PATH);
               InputStream in = new GZIPInputStream(gin);
               IteratingSDFReader sdfr = new IteratingSDFReader(in, builder)) {
              while (sdfr.hasNext()) {
                  final IAtomContainer mol = sdfr.next();
                  addTemplateMol(mol);
              }
          } catch (IOException e) {
              throw new CDKException("Could not load ring templates", e);
          }
      }
docs: Load ring template
  
  @throws CDKException The template file cannot be loaded