Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help
Special pages
SBGrid Resources
SBGrid Consortium
SBGrid Data Bank
Software Webinars
PyMOL Webinar
PyMOL Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
MakeVinaCommand
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Overview = [http://vina.scripps.edu/ Vina] is a new, very fast, molecular docking program, written by Oleg Trott. In order to run Vina, you should have [http://mgltools.scripps.edu/downloads MGLTools1.5.4] installed (you need prepare_receptor4.py and prepare_ligand4.py). But, you don't need MGLTools for this script to run. To run Vina it needs to know the center of the protein and also its extents (size in XYZ directions). We can easily do this with PyMOL. Requirements: * [[COM]] -- simple script to get the center of mass of a selection Todo: * Commandline options * Robustness to vagaries of input * Usage & Help = Usage = <source lang="bash"> pymol -cq ./makeVinaCommandFromProtein.py proteinFile ligandFile </source> For high-throughput screening, where we compare each ligand to each protein, I typically wrap the script in a for-loop like: <source lang="bash"> # foreach protein in my proteins directory for protein in proteinsDir/*; do # foreach ligand in my ligands directory for ligand in ligandsDir/*; do; # make a Vina command to run the protein vs the ligand. # note the backticks to run the output `pymol -cq ./makeVinaCommandFromProtein.py $protein $ligand | grep vina`; done; done; </source> = The Code = <source lang="python"> # -*- coding: utf-8 -*- # # makeVinaCommandFromProtein.py -- automatically make a valid Vina command from a PDB file and a ligand (name) # # Author: Jason Vertrees # Date : 2/2009 # from pymol import cmd from sys import argv from os import path # try to keep PyMOL quiet cmd.feedback("disable","all","actions") cmd.feedback("disable","all","results") # prepare some output names protName= path.basename(argv[-2]) ligName = path.basename(argv[-1]) outName = protName.split(".")[0] + "." + ligName.split(".")[0] + ".docked.pdbqt" logName = protName.split(".")[0] + "." + ligName.split(".")[0] + ".log" # very unsafe commandline checking; needs updating cmd.load(argv[-2], protName) cmd.load(argv[-1], ligName) # remove the ligand before calculating the center of mass cmd.delete(ligName) # load center of mass script cmd.do("run /home/path/to/COM.py") # calculate the center of mass and extents (comX, comY, comZ) = COM(protName) ((maxX, maxY, maxZ), (minX, minY, minZ)) = cmd.get_extent(protName) # print the command line print "vina --receptor "+protName"qt --ligand "+ligName+"qt --center_x ", str(comX), " --center_y ", str(comY),\ " --center_z ", str(comZ), " --size_x ", str(abs(maxX-minX)), " --size_y ", str(abs(maxY-minY)), " --size_z ", \ str(abs(maxZ-minZ)), " --all ", outName , " --exhaustiveness 200 --log ", logName, " \n" </source> = Example = <source lang="bash"> # execute the script > pymol -cq ./makeVinaCommandFromProtein.py 1ia6_gh09.pdb glucose.pdb | grep vina # the output vina --receptor 1ia6_gh09.pdbqt --ligand glucose_dimer.pdbqt --center_x 1.86797851457 --center_y 17.7951449088 --center_z 65.2250072289 --size_x 55.9499988556 --size_y 49.7459993362 --size_z 58.1769981384 --all 1ia6_gh09.glucose_dimer.docked.pdbqt --exhaustiveness 100 --log 1ia6_gh09.glucose_dimer.log </source> = See Also = * [[COM]] -- you need this script * [http://vina.scripps.edu/ Vina] -- the docking software [[Category:Script_Library|MakeVinaCommandFromProtein]]
Summary:
Please note that all contributions to PyMOL Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
PyMOL Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
MakeVinaCommand
Add topic