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

computational chemtool #11

Open
faustina-beep opened this issue Nov 4, 2019 · 121 comments
Open

computational chemtool #11

faustina-beep opened this issue Nov 4, 2019 · 121 comments
Labels
CompChem Modelling, docking, QSAR help wanted Extra attention is needed question Further information is requested

Comments

@faustina-beep
Copy link

Hello everyone, I am Faustina. I am an Mpharm student researching on the design of fragments for Open source antibiotics. I have looked at the current poses that have been done on the Mur D and Mur E receptors and will like to begin to build fragments based on the current hits that have been displayed. My main problem is how to use the computational chem tool to help me dock what I have currently thought of. I have downloaded anaconda and gone through the paper that was posted on the chemtool but it did not help with my ability to use these software. Is there anything else I can do, please.

@drc007
Copy link
Contributor

drc007 commented Nov 4, 2019

@faustina-beep Let's start from the beginning. You say you have installed Anaconda, have you installed all the conda packages?

In a terminal window type

conda install jupyter
conda install -c rdkit rdkit
conda install numpy
conda install scipy
conda install scikit-learn
conda install pandas
conda install matplotlib
conda install seaborn

@drc007
Copy link
Contributor

drc007 commented Nov 4, 2019

Have you also download and installed SMINA https://sourceforge.net/projects/smina/

@drc007
Copy link
Contributor

drc007 commented Nov 4, 2019

You then need to download the Jupyter Notebook https://opensourceantibiotics.github.io/murligase/CompChemTools/UsingSmina.zip

@faustina-beep
Copy link
Author

faustina-beep commented Nov 4, 2019 via email

@faustina-beep
Copy link
Author

@drc007 I have been able to install Anaconda and used conda to install the mentioned packages and Jupyter Notebook however, I am finding difficulty in opening SMINA after installing it. It keeps giving me messages that it cannot be opened. Please find the image link below.
Screen Shot 2019-11-05 at 14 20 17

@drc007
Copy link
Contributor

drc007 commented Nov 5, 2019

@faustina-beep Smina is a command line program that can be accessed using the Terminal
In a Terminal window type (assuming smina is installed in usr/local/bin/)

/usr/local/bin/smina.osx --help

and you should get a list of the command line options.

If you are not sure where it was installed in the Terminal type

which smina.osx

and it will display the path

@faustina-beep
Copy link
Author

@drc007 I have tried it in the terminal but it gave me a message that there is no such file. checking on my downloads I could see the files but it tells me there is no application to open it.
Screen Shot 2019-11-06 at 12 30 32
Screen Shot 2019-11-06 at 12 30 32

@faustina-beep
Copy link
Author

@drc007 please see the message displayed
chris
in the download window

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep is the smina.osx file in /usr/local/bin/ ?

In the Terminal type

which smina.osx

What is the path returned?

The file you have highlighted above is the Jupyter notebook not Smina

@faustina-beep
Copy link
Author

@drc007 yes it is. Please find attached image.
Screen Shot 2019-11-06 at 16 06 45

@faustina-beep
Copy link
Author

@drc007 But could it be that I deleted it several times yesterday? Also, I have downloaded it a couple of times today to see if it will work

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep That is great,

Now what do you get if you type this in a terminal window?

which smina.osx

Just want to check the path to the executable.

@faustina-beep
Copy link
Author

@drc007 it comes up with this message.
Screen Shot 2019-11-06 at 16 29 43

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

That looks like you have done the search in the Finder rather than the Terminal.

Terminal is an application you should find in Applications:Utilities

Screenshot 2019-11-06 at 16 37 34

@faustina-beep
Copy link
Author

It does not give any response.
Screen Shot 2019-11-06 at 16 44 42

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

Hmmm.

Try typing into a Terminal window

/usr/local/bin/smina.osx --H

@faustina-beep
Copy link
Author

@drc007 This is what it gave
Screen Shot 2019-11-06 at 17 10 20

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep Is there a space between .osx and --H?

/usr/local/bin/smina.osx --H

@faustina-beep
Copy link
Author

@drc007 now it tells me its permission denied
Screen Shot 2019-11-06 at 17 20 23

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep OK looks like need to alter file permission to allow application to run

In Terminal type (it might ask for your password)

chmod +x /usr/local/bin/smina.osx

Then try

/usr/local/bin/smina.osx --H

@faustina-beep
Copy link
Author

@drc007 It still denied it
Screen Shot 2019-11-06 at 17 29 07

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep Looks like you might need a space between +x and /usr/local/bin/smina.osx ?

@faustina-beep
Copy link
Author

@drc007 I think a response has been given now.
Screen Shot 2019-11-06 at 17 36 43
Screen Shot 2019-11-06 at 17 38 21

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep Success, well done!

The next step is the Jupyter notebook. This is contained in the folder you displayed earlier.

68299061-d4954900-0092-11ea-9c75-cfa1fda92757

The notebook is has the file extension .ipynb

I have a folder in my main directory called projects, and I run all the notebooks from this folder. You can have the folder anywhere but it is useful to think about organisation at this point.

You now need to type this in a Terminal window.

cd followed by the path to the folder containing the notebook.

something like

cd /Users/username/Projects/OpenSourceAntibiotics/notebooks

On a Mac the easy way to do this is to type cd in a Terminal window and then drag and drop the folder containing the notebook onto the Terminal window.

Hit return then type

ls

@faustina-beep
Copy link
Author

@drc007 this is what I got when I first click on the Jupyter notebook
Screen Shot 2019-11-06 at 18 00 17

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep In the Terminal you need to first navigate to the folder containing the notebook, then type

jupyter notebook

This should open a web browser window showing the contents of the folder. You can then select the desired Jupyter notebook.

@faustina-beep
Copy link
Author

this gave me this result and simultaneously opened Jupyter in the browser
Screen Shot 2019-11-06 at 18 22 15
Screen Shot 2019-11-06 at 18 24 45

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep Looks like you are not in the folder containing the Jupyter notebook.

In the Terminal window use control C twice to stop the notebook server then type

ls

This will give you the listing of the folder in the Terminal

@faustina-beep
Copy link
Author

@drc007 this is what it gave me
Screen Shot 2019-11-06 at 18 38 46

@drc007
Copy link
Contributor

drc007 commented Nov 6, 2019

@faustina-beep That should be a lower case "L"

@drc007
Copy link
Contributor

drc007 commented Nov 27, 2019

@faustina-beep @mattodd That's great. Perhaps you could write up the process so others could use it.

@faustina-beep
Copy link
Author

@drc007 I intend to modify the Jupyter notebook to unable use it for Mur E fragments. I have been able to download the 1e8c.pdb and have been going through the text formate to see which HETATOMS to delete to get my receptor_minus_ligand file. To get the get receptor_plus _ ligand file which of the Mur E ligand do I use. Also if I have to get the receptor from Diamond, what code do I use, please

@drc007
Copy link
Contributor

drc007 commented Dec 5, 2019

@faustina-beep You need to use the same crystal structure for both receptor_plus_ligand and receptor_minus_ligand.
You can download all from here.
https://fragalysis.diamond.ac.uk/viewer/react/preview/target/MUREECA

@faustina-beep
Copy link
Author

Ok, and which ligand you use for the ligand only, please.

@drc007
Copy link
Contributor

drc007 commented Dec 5, 2019

I chose a crystal structure that contained one of the fragments and used it to generate receptor_plus_ligand and receptor_minus_ligand, and use the fragment from the X-ray structure as the ligand.

@faustina-beep
Copy link
Author

so assuming I chose to use MUREECA-x0244_2.pdb to use, how do I create the ligand 244_only.pdb file.

@drc007
Copy link
Contributor

drc007 commented Dec 6, 2019

@faustina-beep If you want to use an application then either Pymol (https://pymol.org/2/) or Chimera (http://www.cgl.ucsf.edu/chimera/) are free and will allow you to do this. There is a detailed account here http://dock.compbio.ucsf.edu/DOCK_6/tutorials/struct_prep/prepping_molecules.htm.

Or if you prefer using the command line try https://pypi.org/project/pdb-tools/

@faustina-beep
Copy link
Author

@drc007. I have been able to generate the file and used it for the Mur E receptor but I realised it gave me a warning halfway through even though it gave me a docking result. hence I am wondering if those results are right. please see the message it gave. is there any way of fixing it, please. As I have checked online and nothing is coming up.
Screen Shot 2019-12-09 at 11 44 50

@drc007
Copy link
Contributor

drc007 commented Dec 9, 2019

@faustina-beep What file format did you use for the ligand?

@faustina-beep
Copy link
Author

pdb file, please.
Screen Shot 2019-12-09 at 19 41 41

@faustina-beep
Copy link
Author

@drc007 sorry, I sent the wrong screenshot.
Screen Shot 2019-12-09 at 19 46 11

@drc007
Copy link
Contributor

drc007 commented Dec 9, 2019

@faustina-beep I'm not sure why open babel is needed. Post the question here. https://sourceforge.net/p/smina/discussion/

David Koes is usually very good about responding.

@KatoLeonard
Copy link

Hi, I'm Kato an Erasmus student Drug Development who joined prof Todd's lab at UCL. I'm sorry to re-open this old issue, but I'm finding myself in a similar situation. I'm trying to dock 8 ligands (based on the fragment screen) against murD using the Jupyter Notebook. Everything seemed fine until I got to the conformation generation:
Screenshot 2021-10-25 at 15 00 30
This is what's indicated in the terminal when I try to generate the conformations:
Screenshot 2021-10-25 at 15 03 41
I have no experience with docking and have difficulties figuring out how to solve this. All help is welcome!

@drc007
Copy link
Contributor

drc007 commented Oct 25, 2021 via email

@KatoLeonard
Copy link

Apparently I can't upload the file itself, but I designed the fragments in ChemDraw, saved it as a .sdf file, then converted the 2D structures to 3D structures and finally changed the name of the compounds in TextEdit. Maybe I missed a step somewhere.
Docking_Ligands1_3D.txt
Docking_Ligands1_3D.pdf

@drc007
Copy link
Contributor

drc007 commented Oct 25, 2021

OK they ran fine for me so the input file is OK.

Did the previous cells that count the number of structures run OK?

@KatoLeonard
Copy link

Yes it counted 8 structures. It does generate an output file as well but it's always empty.
I do get a RDKit warning, not sure what that means...
Screenshot 2021-10-25 at 16 29 19
Screenshot 2021-10-25 at 16 29 38

@drc007
Copy link
Contributor

drc007 commented Oct 25, 2021

Looks like you have an old version of RDKit installed. I don't think this is the problem but probably worth updating.

@drc007
Copy link
Contributor

drc007 commented Oct 25, 2021

In the mean time here are the conformations. Just change the file extension from .txt to .sdf
Docking_Ligands1_3DForDocking.txt

@drc007
Copy link
Contributor

drc007 commented Oct 25, 2021

You can copy this file into the folder containing the Jupyter notebook and if you edit the file name you can use it in the docking.

@KatoLeonard
Copy link

Thanks for the file! It's converted and in my Jupyter notebook folder. So then I just need to change the name of the output file here right?
Screenshot 2021-10-26 at 10 54 16
If I then try to dock I'm getting an error message saying that the LigandFromProtein cannot be openend for reading
Screenshot 2021-10-26 at 11 27 52
Can I do something about that? I already tried extracting the ligand from the original pdb file again, but that doesn't seem to work.

@drc007
Copy link
Contributor

drc007 commented Oct 26, 2021

Can you send me the file.

@KatoLeonard
Copy link

373ligand_only.pdb.zip
This is the compressed pdb file. I don't think I changed anything, just the download from the Jupyter notebook.

@drc007
Copy link
Contributor

drc007 commented Oct 26, 2021

I think the problem is that you still need to define '{ConfoutputFilePath}'

add
ConfoutputFilePath = Docking_Ligands1_3DForDocking.sdf

@KatoLeonard
Copy link

Yes that's it, docking is on. Thank you for the clarifications!

@KatoLeonard
Copy link

Sorry cheered to early I guess. I'm stuck with the rescoring:
Screenshot 2021-10-27 at 15 40 57
I'm quite sure that I have installed Pandas and don't really know what to do from here.

@KatoLeonard
Copy link

Seems that this problem is solved by inserting 'import pandas' in the cell above. However, I'm not getting an output 'out [17]' with the structures and minimised affinity. And getting another error message as well.
Screenshot 2021-10-27 at 16 05 46
Screenshot 2021-10-27 at 16 06 02

@drc007
Copy link
Contributor

drc007 commented Oct 27, 2021

I suspect you need to run the first cell

import sys
from collections import defaultdict
import numpy as np
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import PandasTools
import pandas as pd
IPythonConsole.ipython_3d=True
%pylab inline

import py3Dmol

To ensure everything has been imported.

@KatoLeonard
Copy link

Apparently there was a problem with the pandas version I had installed. See this issue: rdkit/rdkit#3701. I installed an earlier version and ultimately got the alldata.sdf.gz file. Thanks for helping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CompChem Modelling, docking, QSAR help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants