-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Valid CXSMILES rejected #2716
Comments
We use CXSMILES available specification from Chemaxon. Inside the aliases/pseudo atom description, it provides ";" as atom separator (to map the atom number) and there are no statements or examples where |
There is no issue, the position in the There are all valid an mean different things:
This is just Indigo being too fussy and requiring the equivalent:
Since Indigo has already extended CXSMILES with Since Indigo indigo = new Indigo();
IndigoObject mol1 = indigo.loadMolecule("*Cl |$_AV:;3$,$R1;$|");
IndigoObject mol2 = indigo.loadMolecule("*Br |$_AV:;4$,$R2;$|");
IndigoObject rxn = indigo.createReaction();
rxn.addReactant(mol1);
rxn.addProduct(mol2);
System.err.println(rxn.smiles()); // *Cl>>*Br |$R1;3;R2;4$| WRONG! Indigo indigo = new Indigo();
IndigoObject mol1 = indigo.loadMolecule("*Cl |$_AV:;3$$|");
IndigoObject mol2 = indigo.loadMolecule("*Br |$_AV:;4$$|");
IndigoObject rxn = indigo.createReaction();
rxn.addReactant(mol1);
rxn.addProduct(mol2);
System.err.println(rxn.smiles()); // *Cl>>*Br |$_AV:;3;_AV:;4$| WRONG! Invalid! It's fine if you don't want to fixing these as I want to migrate away from Indigo anyways so any incorrectness is just more motivation :-). |
Thank you for the reported bug for the reaction SMILES, we already found that the CXSMILES does not work correctly for reactions (unfortunately, the specification is not provided for reactions at all, but from the Marvin output and generic sense it is clear that absolute atom numbering should be through all the reactants/agents/products) |
Summary
Indigo requires all pseudo atoms are specified in a CXSMILES pseudo block
$...$
. This is overly restrictive and you very in MarvinJS (https://marvinjs-demo.chemaxon.com/latest/demo.html) that you should be able to truncate the block.*CC |$R1$| (rejected but should be accepted)
*CC |$R1;;$| (accepted)
Here is the error message:
The text was updated successfully, but these errors were encountered: