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 ) ; } }
Load ring template