Closed alexarnimueller closed 1 year ago
Thanks, Alex. This is indeed a default part of validate_compound_identifier
and we issue a ValidationError
for a SMILES, InChI, or MolBlock that RDKit cannot load "properly".
This does seem like it is potentially too strict given that other programs may have more permissive valence rules, particularly for these kinds of complexes where SMILES is a somewhat awkward choice of representation (but a common one).
I would propose to @skearnes that we consider the following:
MolFromSmiles
cannot parse with default params, check if it can parse with sanitize=False
. If yes, issue a ValidationWarning
. Otherwise, stick to current behavior and issue a ValidationError
. This would still reject garbage/malformed SMILES strings, but allow for the example Alex provides to pass with warnings.MolFromInchi
MolFromMolBlock
but also with strictParsing=False
WDYT?
Thanks Connor, sounds like a good compromise 👍🏼
This should be all set now!
Sweet, thanks a lot!
Hi all
First: thanks for all your efforts on the ord-schema, it's well developed and very powerful! 💪🏼 🙌🏼
However, I recently ran into an issue when dealing with catalyst SMILES, that cannot be converted into valid molecules using the RDKit. I see that there is the option to disable valid reaction SMILES checks during the validation using
ValidationOptions(allow_reaction_smiles_only=False)
and passing it tovalidate_message
orvalidate_datasets
. However, this has no effect on any of my tested reactions or datasets.To reproduce, here's a simple example for a dataset with one reaction:
It also does not work for
validate_dataset
:I would expect that checking SMILES strings using RDKit is disabled when passing the option
allow_reaction_smiles_only=False
. I know that in this case I could actually get a valid SMILES for the Iridium catalyst, but its mainly for illustration purposes. As a workaround, I can just omit the SMILES for the catalysts, but I'd like to have them there if possible. Or would this become an issue to ultimately load them into the ORD?Thanks in advance for the support
Versions