This is a read-only mirror of pymolwiki.org
Difference between revisions of "Propka"
Line 116: | Line 116: | ||
</source> | </source> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
#------------------------------------------------------------------------------- | #------------------------------------------------------------------------------- | ||
Line 1,048: | Line 1,042: | ||
raise UserWarning('\nThe author has updated the pymol propka script.\nPresent:v%s > Script:v%s \nThe new script is available at "http://pymolwiki.org/index.php/Propka" or "http://tinyurl.com/pymolpropka"'%(Web_Version,Script_Version)) | raise UserWarning('\nThe author has updated the pymol propka script.\nPresent:v%s > Script:v%s \nThe new script is available at "http://pymolwiki.org/index.php/Propka" or "http://tinyurl.com/pymolpropka"'%(Web_Version,Script_Version)) | ||
return(Web_Version, Script_Version) | return(Web_Version, Script_Version) | ||
− | |||
== ScriptVersion == | == ScriptVersion == |
Revision as of 15:57, 16 August 2011
Acknowledgement
The PROPKA method is developed by the Jensen Research Group , Department of Chemistry, University of Copenhagen.
propka.py contact and relies on the result from the propka server
Introduction
This script can fetch the pka values for a protein from the propka server. The "propka" function downloads the results and processes them.
It also automatically writes a pymol command file and let pymol execute it. This command file make pka atoms, rename them, label them and color them according to the pka value.
If is not possible to get the mechanize module to work, one can go to the propka server, upload a .pdb file, and download the .pka file.
By setting: "method=file" and point to the .pka file "file_name=.\Results_propka\4ins_.pka", one can process the .pka result file and get the pymol command file.
The last possibility, is just to ask for the pka values of a recognized PDB id. This is done with the "getpropka" function.
Dependency of python module: mechanize
The script needs mechanize to run.
- On windows, it is not easy to make additional modules available for pymol. So put in into your working folder.
- The easy manual way:
- Go to: http://wwwsearch.sourceforge.net/mechanize/download.html
- Download mechanize-0.2.5.zip. http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.zip
- Extract to .\mechanize-0.2.5 then move the in-side folder "mechanize" to your folder with propka.py. The rest of .\mechanize-0.2.5 you don't need.
- You can also see other places where you could put the "mechanize" folder. Write this in pymol to see the paths where pymol is searching for "mechanize"
- import sys; print(sys.path)
Examples
### Point to your directory with the script.
#cd /homes/linnet/Documents/Speciale/5NT-project/Mutant-construct/predict_reactivity/propka
cd C:\Users\tlinnet\Documents\My Dropbox\Speciale\5NT-project\Mutant-construct\predict_reactivity\propka
run ./propka.py
fetch 4ins, async=0
propka OR
propka 4ins OR
propka molecule=4ins, chain=*, resi=19.20, resn=ASP.TYR, logtime=_, verbose=yes, showresult=no
fetch 1hp1, async=0
propka molecule=1hp1, chain=A, resi=308.513, resn=CYS, logtime=_, verbose=no, showresult=no
getpropka source=ID, PDBID=4ins, logtime=_, server_wait=3.0, verbose=yes, showresult=no
pka atoms are created and renamed for their pka value. That makes it easy to "click" the atom in pymol and instantly see the pka value.
The atoms b value are also altered to the pka value, and the atoms are then spectrum colored from pka=0-14.
The pka value of 99.9 represent a di-sulphide bond, and is colored gold and the sphere size is set a little bigger.
If one wants to see the specified result, the logfile ./Results_propka/_Results.log saves the link to the propka server. Here one can see in an interactive Jmol appp, the interactions to the pka residues.
Example Pymol Script
### Point to your directory with the script.
#cd /homes/linnet/Documents/Speciale/5NT-project/Mutant-construct/predict_reactivity/propka
cd C:\Users\tlinnet\Documents\My Dropbox\Speciale\5NT-project\Mutant-construct\predict_reactivity\propka
### If you have the script in your working directory the
run ./propka.py
### You can also make the script general available. Put it into your python path. Ex: C:\Program Files (x86)\PyMOL\PyMOL\modules Then do instead:
#import propka
### The fastest method is just to write propka. Then the pymol "all" molecule is assumed and send to server. But best to write molecule name
fetch 4ins, async=0
propka
propka 4ins
### Fetch 4ins from web. async make sure, we wait to have completed
#fetch 4ins, async=0
#propka molecule=4ins, chain=*, resi=19.20, resn=ASP.TYR, logtime=_, verbose=yes, showresult=no
### If there is problems to get the mechanize module working, get the result .pka file at the propka webpage manually.
### Then run with method=file and point to .pka file.
#fetch 4ins, async=0
#hide everything, 4ins
#show cartoon, 4ins
#propka method=file, molecule=4ins, resi=18.25-30, resn=cys, file_name=.\Results_propka\4ins_.pka
### Some more examples. This molecule has 550 residues, so takes a longer time.
#fetch 1hp1, async=0
#propka molecule=1hp1, chain=A, resi=308.513, resn=CYS, logtime=_, verbose=no, showresult=no
### One can also just make a lookup for a protein. Use function: getpropka
### Note. This does only print the result to the pymol command line
#getpropka source=ID, PDBID=4ake, logtime=_, server_wait=3.0, verbose=no, showresult=yes
#getpropka source=ID, PDBID=4ins, logtime=_, server_wait=3.0, verbose=yes, showresult=no
Input paramaters
# method : method=upload is default. This sends .pdb file and request result from propka server.
## method=file will only process a manual .pka file, and write a pymol command file. No use of mechanize.
# molecule : name of the molecule. Ending of file is assumed to be .pdb
# chain : which chains are saved to file, before molecule file is send to server. Separate with "." Ex: chain=A.b
# resi : Select by residue number, which residues should be printed to screen and saved to the log file: \Results_propka\_Results.log.
## Separate with "." or make ranges with "-". Ex: resi=35.40-50
# resn : Select by residue name, which residues should be printed to screen and saved to the log file: \Results_propka\_Results.log.
## Separate with "." Ex: resn=cys.tyr
# logtime : Each execution give a set of files with the job id=logtime. If logtime is not provided, the current time is used.
## Normal it usefull to set it empty. Ex: logtime=_
# verbose : Verbose is switch, to turn on messages for the mechanize section. This is handsome to see how mechanize works, and for error searching.
# showresult : Switch, to turn on all results in pymol command window. Ex: showresult=yes
# file_name: only used for: propka method=file . Write the path to .pka file
# server_wait=10.0 is default. This defines how long time between asking the server for a result. Set no lower than 3 seconds.
# version=v3.1 is default. This is what version of propka which would be used.
## Possible: 'v3.1','v3.0','v2.0'. If a newer version is available than the current v3.1, a error message is raised to make user update the script.
# source : source=upload is default and is set at the propka webpage. Can only be used for in the function "getpropka".
# getpropka source=ID, PDBID=4ake , one can print to the command line, the pka value for any official pdb ID. No files are displayed in pymol.
- -------------------------------------------------------------------------------
- Name: propka for pymol
- Purpose: To fetch and display the pka values for protein of intetest
- Author: Troels E. Linnet
- Created: 14/08/2011
- Copyright: (c) Troels E. Linnet 2011
- Contact: tlinnet snabela gmail dot com
- Licence: Free for all
- Download: http://tinyurl.com/pymolpropka
- -------------------------------------------------------------------------------
"""
The PROPKA method is developed by the
Jensen Research Group
Department of Chemistry
University of Copenhagen
Please cite these references in publications:
Hui Li, Andrew D. Robertson, and Jan H. Jensen
"Very Fast Empirical Prediction and Interpretation of Protein pKa Values"
Proteins, 2005, 61, 704-721.
Delphine C. Bas, David M. Rogers, and Jan H. Jensen
"Very Fast Prediction and Rationalization of pKa Values for Protein-Ligand Complexes"
Proteins, 2008, 73, 765-783.
Mats H.M. Olsson, Chresten R. Soendergard, Michal Rostkowski, and Jan H. Jensen
"PROPKA3: Consistent Treatment of Internal and Surface Residues in Empirical pKa predictions"
Journal of Chemical Theory and Computation, 2011 7 (2), 525-537
Chresten R. Soendergaard, Mats H.M. Olsson, Michaz Rostkowski, and Jan H. Jensen
"Improved Treatment of Ligands and Coupling Effects in Empirical Calculation and Rationalization of pKa Values"
Journal of Chemical Theory and Computation, 2011 in press
"""
- -------------------------------------------------------------------------------
- The script needs mechanize to run.
- On windows, it is not easy to make additional modules available for pymol. So put in into your working folder.
- 1)The easy manual way:
- b)Download mechanize-0.2.5.zip. http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.zip
- c)Extract to .\mechanize-0.2.5 then move the in-side folder "mechanize" to your folder with propka.py. The rest of .\mechanize-0.2.5 you don't need.
- You can also see other places where you could put the "mechanize" folder. Write this in pymol to see the paths where pymol is searching for "mechanize"
- import sys; print(sys.path)
- -------------------------------------------------------------------------------
"""
Example for pymol script to start the functions. For example: trypropka.pml
Execute with pymol or start pymol and: File->Run->trypropka.pml