epam / Indigo

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

Serialize molecule loaded from SMARTS #2016

Open giorgigagnidze16 opened 1 week ago

giorgigagnidze16 commented 1 week 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 1 week ago

Serialization doesn't work for query features