-
Notifications
You must be signed in to change notification settings - Fork 128
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
random selfies to valid smiles #123
Comments
|
They should still be valid. If not, i guess there is a problem somewhere. Can you share cases which fail? (Note: We regard an empty string as valid, maybe thats the difference to RDKit's output?) |
Do you mean that after passing selfies through a decoder, the resulting smiles may be an empty string? If so, then I think I'm encountering that situation. The error message I'm getting is “rdkit.Chem.rdmolfiles.MolToSmiles(NoneType)”.So is this situation considered valid in selfies and it's just that RDKit doesn't accept empty strings? |
Sorry for interrupting again. I am facing a situation where selfies is represented as '[C][C][Sn][Branch1][Ring1][C][C][Branch1][#Branch2][C][=C][C][=C][C][=C][Ring1][=Branch1][C][Ring1][#Branch1][C][Ring1][=Branch1][C]', but after passing it through selfies.decoder, the generated SMILES is 'C1C[Sn]1(CC)(C2=CC3=CC=C2C)C3C'. However, it seems to be invalid for RDKit, as Chem.MolFromSmiles returns None when using RDKit. Could you please tell me what the reason for this is? |
Are you using the default SELFIES constraints? If yes, the problem is that in the default constraints, Sn does not have specific constraints. That means that the default behavior is allowing for 8 valences, which is not meaningful for Sn. What this means is that you need to create your custom SELFIES constraints that constrain Sn to a meaningful number of valences, say 4 for instance, and then use SELFIES with these custom constraints. |
Small addition, info to customizing selfies is here, and in chapter 4.3. "Customization functions" of our software-paper. |
Hi!Can this convert any combination of selfies into valid smiles? I converted random selfies into smiles, and then used rdkit's Chem.MolFromSmiles method to convert the smiles, but the result was empty. Does this mean that the smiles converted from selfies are invalid?
Thank you!
The text was updated successfully, but these errors were encountered: