code: private static String setStandardHELMFirstSection(HELM2Notation helm2notation) throws HELM1ConverterException, MonomerLoadingException, NotationException, CTKException, HELM1FormatException,
        ValidationException, ChemistryException, org.helm.notation2.parser.exceptionparser.NotationException {
      StringBuilder notation = new StringBuilder();
  
      for (PolymerNotation polymer : helm2notation.getListOfPolymers()) {
        String id = polymer.getPolymerID().getId();
        String elementsToHELM = polymer.getPolymerElements().toHELM();
        Map<String, String> adHocList = findAdHocMonomers(elementsToHELM, polymer.getPolymerID().getType());
        Map<String, String> convert = convertAdHocMonomersIntoSMILES(adHocList);
        for (Map.Entry<String, String> e : convert.entrySet()) {
          elementsToHELM = elementsToHELM.replaceAll(e.getKey(), e.getValue());
        }
        notation.append(id + "{" + elementsToHELM + "}" + "|");
      }
  
      notation.setLength(notation.length() - 1);
      return notation.toString();
    }
docs: method to transform the first section (polymer section) to HELM1 - Format
  
  @param helm2notation HELM2Notation
  @return first section of standard HELM
  @throws HELM1ConverterException if HELM2 features were there
  @throws MonomerLoadingException
  @throws NotationException
  @throws CTKException
  @throws ValidationException
  @throws HELM1FormatException
  @throws ChemistryException if the Chemistry Engine can not be initialized
  @throws org.helm.notation2.parser.exceptionparser.NotationException