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

How to implement SA_score calculation? #4

Open
chengthefang opened this issue Apr 1, 2018 · 6 comments
Open

How to implement SA_score calculation? #4

chengthefang opened this issue Apr 1, 2018 · 6 comments

Comments

@chengthefang
Copy link

Hi Connor,

I checked your paper, and the SI table, where you compared the SCScore and SA_score for a library of SMILES-format molecules. I would like to compare those two as well for my library of molecules. However, I have no idea how to implement SA_score calculation using your provided script i.e. "sascorer.py". Would you mind provide a simple example (e.g a SMILES formated molecule) about how to use that for SA_score calculation? Thank you much!

Cheng

@connorcoley
Copy link
Owner

Cheng,

The sascorer.py is reproduced directly from the RDKit implementation. As an example, see the following:

import utils.SA_Score.sascorer as sascorer # depending on your path
import rdkit.Chem as Chem
m = Chem.MolFromSmiles('CCCN')
sco = sascorer.calculateScore(m)
print(sco)

The first time you call sascorer.calculateScore(), it will probably take a few seconds, since it needs to load some fragment contribution data. Subsequent calls are much faster.

@chengthefang
Copy link
Author

@connorcoley Hi Connor, appreciated much for your pretty helpful response. It works well on my end now! Thanks! Cheng

@ghost
Copy link

ghost commented Jun 21, 2023

Hi @connorcoley I am having some issues testing SAScore on a subset of compounds I am testing.
I am not a python coder and hence would need some basic guidance from the team.
I have reached this far with the installation.
step 1 conda create --name sccsore python=3.8
conda activate sccsore
conda install numpy
conda install -c rdkit rdkit
git clone https://github.com/connorcoley/scscore.git
now I do cd scscore
Then I have created a test directory here with a txt file containing compound SMILES
HOW DO I know use the scscore script to test it on those compounds?
Do I copy the snippet you shared in the thread and just do python sascorer.py ??
Thanks

@ghost
Copy link

ghost commented Jun 21, 2023

I went inside cd scripts
Then did this:
image

@connorcoley
Copy link
Owner

The SA Score is a contribution in RDKit, which is a simpler and more direct way to use it: https://github.com/rdkit/rdkit/blob/master/Contrib/SA_Score/sascorer.py

@ghost
Copy link

ghost commented Jun 21, 2023 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

2 participants