code: private static String[] readSMARTSPattern(String filename) throws Exception {
          InputStream ins = StandardSubstructureSets.class.getClassLoader().getResourceAsStream(filename);
          BufferedReader reader = new BufferedReader(new InputStreamReader(ins));
  
          List<String> tmp = new ArrayList<String>();
          String line;
          while ((line = reader.readLine()) != null) {
              if (line.startsWith("#") || line.trim().length() == 0) continue;
              String[] toks = line.split(":");
              StringBuffer s = new StringBuffer();
              for (int i = 1; i < toks.length - 1; i++)
                  s.append(toks[i] + ":");
              s.append(toks[toks.length - 1]);
              tmp.add(s.toString().trim());
          }
          return tmp.toArray(new String[]{});
      }
docs: Load a list of SMARTS patterns from the specified file.
  
  Each line in the file corresponds to a pattern with the following structure:
  PATTERN_DESCRIPTION: SMARTS_PATTERN, <i>e.g., Thioketone: [#6][CX3](=[SX1])[#6]</i>
  
  Empty lines and lines starting with a "#" are skipped.
  
  @param filename list of the SMARTS pattern to be loaded
  @return list of strings containing the loaded SMARTS pattern
  @throws Exception if there is an error parsing SMILES patterns