code: private static Map<String, String> convertAdHocMonomersIntoSMILES(Map<String, String> monomersList) throws HELM1FormatException, ChemistryException {
      Map<String, String> convert = new HashMap<String, String>();
      try {
        for (Map.Entry<String, String> element : monomersList.entrySet()) {
  
          Monomer m;
          m = MonomerFactory.getInstance().getMonomerStore().getMonomer(element.getValue().toString(), element.getKey().toString());
  
          String smiles = m.getCanSMILES();
          AbstractChemistryManipulator manipulator = Chemistry.getInstance().getManipulator();
          String canSmiles = manipulator.canonicalize(smiles);
          convert.put(element.getKey().toString(), canSmiles);
        }
        return convert;
      } catch (MonomerLoadingException | CTKException e) {
        e.printStackTrace();
        throw new HELM1FormatException("SMILES for Monomer can not be found: ");
      }
    }
docs: method to translate/convert the adhocMonomers into valid SMILES
  
  @param monomersList Map of adhocMonomers with the type and the alternate
  monomer id SMILES
  @return Map of adhocMonomers with the monomer alternate id and the
  appropriate SMILES
  @throws HELM1FormatException if the SMILES for the Monomer can not be found
  @throws ChemistryException if the Chemistry Engine can not be initialized