Skip to content
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

Mol to SMARTS #59

Closed
c-ruttkies opened this issue May 26, 2020 · 4 comments
Closed

Mol to SMARTS #59

c-ruttkies opened this issue May 26, 2020 · 4 comments

Comments

@c-ruttkies
Copy link

Hi,

is there a way to create a SMARTS out of a MolString that contains for example atom lists? The molString could be sth. like:

MJ191900

8 8 2 0 0 0 0 0 0 0999 V2000
-3.1250 2.2089 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-3.8395 1.7964 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-3.8395 0.9713 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-3.1250 0.5589 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.4105 0.9713 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.4105 1.7964 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.6258 2.0513 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
-4.6241 0.7163 0.0000 L 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
1 6 1 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
4 5 1 0 0 0 0
5 6 1 0 0 0 0
6 7 1 0 0 0 0
3 8 1 0 0 0 0
7 F 2 7 8
8 T 2 9 17
M ALS 7 2 F N O
M ALS 8 2 T F Cl
M END

The string seems to be parsed correctly as StereoMolecule using the MolfileParser. With the SmilesCreator I can create the SMILES: C1(CC(CCC1[?])[?])

Is it also possible to get a valid SMARTS, e.g. C1CC[!F!Cl]CC[N,O]C1 ?

Best regards,
Christoph

@thsa
Copy link
Contributor

thsa commented May 26, 2020 via email

@c-ruttkies
Copy link
Author

Hi Thomas,

thanks for the quick and helpful response. You already convinced me of looking into idcodes based structure representation and matching.

Best regards,
Christoph

@maclandrol
Copy link

maclandrol commented Jul 28, 2021

Hi @thsa,

Any progress on supporting exporting a limited set of SMARTS features (aromatic/aliphatic state, ring membership, ring size membership, explicit/implicit hydrogen count, bond type, bond ring membership) ?

It would make sense to have a similar class to IsomericSmilesCreator for exporting the molecule object to SMARTS while saving the query data that matches with the SMARTS syntax.

This could be a very nice addition for many users.

Emmanuel

@thsa
Copy link
Contributor

thsa commented Aug 3, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants