Currently It is not possible to serialize molecules loaded from SMARTS. It would be good if the feature was present, since serialization works for SMILES as well.
This peace of code here, SMARTS example taken from Indigo API docs throws an exception:
com.epam.indigo.IndigoException: core: <query molecule> is not a molecule
var smarts = "[N,n,O;!H0]";
Indigo indigo = new Indigo();
var obj = indigo.loadSmarts(smarts);
System.out.println(Arrays.toString(obj.serialize()));
Currently It is not possible to serialize molecules loaded from SMARTS. It would be good if the feature was present, since serialization works for SMILES as well.
This peace of code here, SMARTS example taken from Indigo API docs throws an exception:
com.epam.indigo.IndigoException: core: <query molecule> is not a molecule