morgancthomas / molscore Goto Github PK
View Code? Open in Web Editor NEWAn automated scoring function to facilitate and standardize the evaluation of goal-directed generative models for de novo molecular design
License: MIT License
An automated scoring function to facilitate and standardize the evaluation of goal-directed generative models for de novo molecular design
License: MIT License
Thank you for your repo. Your opinion is highly appreciated.
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.0.25:8501
2021-08-31 15:32:27.169 Traceback (most recent call last):
File "/home/xzhang/miniconda3/envs/molscore/lib/python3.6/site-packages/streamlit/script_runner.py", line 350, in _run_script
exec(code, module.dict)
File "/home/xzhang/projects/MolScore/molscore/config_generator.py", line 344, in
config['scoring']['metrics'] = [getspconfig(options=smetric_options, key_i=i) for i in range(ss.n_sp)]
File "/home/xzhang/projects/MolScore/molscore/config_generator.py", line 344, in
config['scoring']['metrics'] = [getspconfig(options=smetric_options, key_i=i) for i in range(ss.n_sp)]
File "/home/xzhang/projects/MolScore/molscore/config_generator.py", line 193, in getspconfig
key=f'{key_i}: sp_name')
File "/home/xzhang/miniconda3/envs/molscore/lib/python3.6/site-packages/streamlit/elements/selectbox.py", line 129, in selectbox
serializer=serialize_select_box,
File "/home/xzhang/miniconda3/envs/molscore/lib/python3.6/site-packages/streamlit/state/widgets.py", line 149, in register_widget
user_key,
streamlit.errors.DuplicateWidgetID: There are multiple identical st.selectbox
widgets with
key='0: sp_name'
.
To fix this, please make sure that the key
argument is unique for
each st.selectbox
you create.
Hi everyone,
So, I have been taking this error:
Exception: You need to install rdkit and its dependencies.
When I go to the source of the problem:
\MolScore\molscore\utils\gypsum_dl\Steps\IO\Web2DOutput
Line 25-31:
try:
from rdkit.Chem import rdDepictor
from rdkit.Chem.Draw import rdMolDraw2D
from rdkit.Chem.Draw import PrepareMolForDrawing
from rdkit import Chem
except:
Utils.exception("You need to install rdkit and its dependencies.")
So, I tried to import modules one by one. Problem was about rdkit.Chem.Draw giving this error:
>>> from rdkit.Chem.Draw import rdMolDraw2D
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/envs/molscore/lib/python3.9/site-packages/rdkit/Chem/Draw/__init__.py", line 21, in <module>
from rdkit.Chem.Draw import rdMolDraw2D
ImportError: libXau.so.6: cannot open shared object file: No such file or directory
Dear authors,
I'm trying to replicate your results with Glide. However, I find something strange here.
The loss during agent training is very small, and can even be ignored. Does it really updates the GRU model?
Also I find the score for all the smiles generated are almost zero, that means the Augmented likelihood is the same as the Prior likelihood in the REINVENT model. So based on my understanding, in the training process, the GRU model is rarely updated. That would explain that Glide-agent achieves a better diversity as it is seldomly updated towards the goal comparing to SVM-agent.
Final loss = 0.28316137194633484
Step 1 Fraction valid SMILES: 94.0 Time elapsed: 0.35h Time left: 519.37h
Agent Prior Target Score SMILES
-22.14 -22.11 -22.11 0.00 CCCNc1ccc(C(=O)Nc2ccc(S(C)=O)cc2)cc1
-17.82 -17.28 -17.28 0.00 CC(C)OCc1c(C(=O)O)cnn1-c1ccccc1
-21.45 -21.30 -21.30 0.00 COc1ccccc1NC(=O)c1cc(=O)c(OC)c(OC)[nH]1
-22.65 -23.19 -23.19 0.00 Cc1c(N)ccc2nnc(CN3CCOc4ccccc4C3)n12
-20.10 -21.72 -21.72 0.00 Cc1cccc2nc(CN(CC(F)(F)F)C(C)C)c(=O)n(C)c12
-18.49 -18.68 -18.68 0.00 CC(=O)NC(Nc1ccc(F)c(Cl)c1)C(=O)O
-23.05 -23.22 -23.22 0.00 CC(C)CCC(=O)N1CC(O)c2ccccc2C1(C)C
-15.84 -15.53 -15.53 0.00 COc1ccc(CNC(=O)CC2OC(=O)c3ccccc32)cc1
-17.34 -16.60 -16.60 0.00 CN(C)CCN(Cc1ccccc1)C(=O)NCC1CC1
-18.51 -19.00 -19.00 0.00 COc1ccc(CN2CCCC(NC(=O)c3ccccc3)C2)c(OC)c1
Am I miss something here? Currently the program is running all good and no error pops up.
Hi,
Apologies for my ignorance, but it is not entirely clear to me how to actually start MolScore to generate new molecules. Installation was successful, I can run the Streamlit GUIs and generate a JSON configuration file, but then what? In your description it says:
Implementing molscore is as simple as importing it, instantiating it (pointing to the configuration file) and then scoring molecules. This should easily fit into most generative model pipelines.
from molscore.manager import MolScore
# Instantiate MolScore, assign the model name and point to configuration file describing the objective ms = MolScore(model_name='test', task_config='molscore/configs/QED.json')
# Calling it simply scores a list of smiles (SMILES) - to be integrated into a for loop during model optimization scores = ms.score(SMILES)
# When the program exits, all recorded smiles will be saved and the monitor app (if selected) will be closed
I presume this needs to be run from within Python. Do I need to provide a list of SMILES?
Could you maybe provide a stepwise 'tutorial' showing the commands issued for the Albuterol_similarity example? If I can get that to work I can move to more complicated tasks. My ambition is to use MolScore in conjunction with Glide docking to do de novo structure-based design.
Many thanks/Evert
git clone
https://github.com/MorganCThomas/MolScore.git`
Cloning into 'MolScore'...
remote: Enumerating objects: 637004, done.
remote: Counting objects: 100% (2452/2452), done.
remote: Compressing objects: 100% (1016/1016), done.
remote: Total 637004 (delta 1488), reused 2323 (delta 1421), pack-reused 634552
Receiving objects: 100% (637004/637004), 209.83 MiB | 11.87 MiB/s, done.
Resolving deltas: 100% (1662/1662), done.
cd MolScore
ls
Datasets environment.yml generative_models LICENSE moleval molscore README.md setup.py
conda env create -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
- smina=2017.11.9
Please advise on how to resolve this.
Kind regards/Evert
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.