-
Notifications
You must be signed in to change notification settings - Fork 58
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
How to get the chemical information for each rule environment with a given rule? #26
Comments
Dear Jen, If I understand you correctly, you would like to see something like a SMILES or SMARTS for a given environment. This is currently not stored in the DB, so there is no direct way to access it. A workaround could be that for a given rule_environment, you extract one sample pair and display this, together with the radius (as integer). If the from_smiles and to_smiles are known, the environment for a given radius can then be inferred from looking at the pair. Please note that the environment is grouped via the Morgan fingerprint, rooted at the attachment atom. The Morgan Fingerprint for each atom amongst others features the number of neighboring atoms. Therefore, a radius 1 Fingerprint in reality is more a kind of radius 1.5 fingerprint. For this reason, if you wanted to depict the Morgan Fingerprint environment as a SMILES, this would get be rather complicated. Does this answer your question? |
Hi Christian, Thanks for the reply. Yes, I would like to see the SMILES or SMARTS for a given environment. Good to know there is a workaround. I think it should work. I will give a try to extract one example pair/or all pairs (if possible) from a given rule_environment. Would you mind give an example of how to do that? Is there any existing functions in the package I can use? Thanks, |
Hi Jen, there is no existing function that does exactly what you ask. But if you are coding already anyway, and you know the rule_environment_id for which you want to see a pair, you could try something like this: sql = """ Disclaimer: The concept of the statement should work, but I have not tested it and my python has gotten a little rusty lately, you may need to fix some of the commas etc. Please let me know if this works. |
Hi Christians, Thank you so much for the details. I will code the query and try to grab the pair information. I will keep you posted how it works. Best, Jen |
Hi Christian, It works as expected! Thanks, Jen. |
Hi all,
I built a mmpDB using the example "test_data.smi" shown on the github page. Then, I run a query to grep all the rules from the schema as follows: (please correct me if I did something wrong with the query)
After that, I took a look at all rules. I found it is difficult to understand the rule environments for the same rule.
For example below, for the rule id 0, there are 11 environments with different rule-environment-id. But how could I get the local chemical information for each environment? That will help me understand the difference between those environments.
Thanks,
Jen
The text was updated successfully, but these errors were encountered: