epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
314 stars 103 forks source link

Serialize molecule loaded from SMARTS #2016

Open giorgigagnidze16 opened 4 months ago

giorgigagnidze16 commented 4 months ago

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()));
AlexeyGirin commented 4 months ago

Serialization doesn't work for query features