src/main/java/org/helm/notation2/parser/notation/HELM2Notation.java
public String polymerToHELM2() {
    StringBuilder notation = new StringBuilder();
    for (int i = 0; i < listOfPolymers.size(); i++) {
      if (listOfPolymers.get(i).isAnnotationHere()) {
        notation.append(listOfPolymers.get(i).getPolymerID() + "{" + listOfPolymers.get(i).toHELM2() + "}\""
            + listOfPolymers.get(i).getAnnotation() + "\"|");
      } else {
        notation.append(listOfPolymers.get(i).getPolymerID() + "{" + listOfPolymers.get(i).toHELM2() + "}" + "|");
      }
    }

    notation.setLength(notation.length() - 1);
    return notation.toString();
  }
public String polymerToHELM2() {
    StringBuilder notation = new StringBuilder();
    for (int i = 0; i < listOfPolymers.size(); i++) {
      if (listOfPolymers.get(i).isAnnotationHere()) {
        notation.append(listOfPolymers.get(i).getPolymerID() + "{" + listOfPolymers.get(i).toHELM2() + "}\""
            + listOfPolymers.get(i).getAnnotation() + "\"|");
      } else {
        notation.append(listOfPolymers.get(i).getPolymerID() + "{" + listOfPolymers.get(i).toHELM2() + "}" + "|");
      }
    }

    notation.setLength(notation.length() - 1);
    return notation.toString();
  }
method to generate a valid HELM2 string for the first section

@return valid HELM2 string