code: public static void removeAcidicOxygen(IAminoAcid acid) throws CDKException {
          if (acid.getCTerminus() == null) throw new CDKException("Cannot remove oxygen: C-terminus is not defined!");
  
          java.util.List<IBond> bonds = acid.getConnectedBondsList(acid.getCTerminus());
          // ok, look for the oxygen which is singly bonded
          for (IBond bond : bonds) {
              if (bond.getOrder() == Order.SINGLE) {
                  for (int j = 0; j < bond.getAtomCount(); j++) {
                      if (bond.getAtom(j).getSymbol().equals("O")) {
                          // yes, we found a singly bonded oxygen!
                          acid.removeAtom(bond.getAtom(j));
                      }
                  }
              }
          }
      }
docs: Removes the singly bonded oxygen from the acid group of the AminoAcid.
  
  @param acid AminoAcid from which to remove the oxygen
  @throws CDKException when the C-terminus is not defined for the given AminoAcid