Hi Om,
asides from the usual list of suspects like access permissions try double
backslashes or a raw string in your path-filenames. Python on Windows is a bit
peculiar in that respect. Read up on raw strings in the Python docs.
Try
wt_file = "D:\\STUDY\\STRUCTURE_PPT\\RMSD\\Pymol\\Original\\1APS.pdb"
or
wt_file = r"D:\STUDY\STRUCTURE_PPT\RMSD\Pymol\Original\1APS.pdb"
note the 'r' at the beginning of the string indicating a raw string.
HTH
Carsten
From: Om Shiv [mailto:harhaalmekhu...@gmail.com]
Sent: Thursday, January 09, 2014 6:26 AM
To: Sampson, Jared
Cc: <pymol-users@lists.sourceforge.net>
Subject: Re: [PyMOL] How to automate RMSD calculation for large no of structures
Hello
I am using the following script file:
### begin script ###
from pymol import cmd
from glob import glob
# Edit these two variables with the paths to your files
wt_file = "D:\STUDY\STRUCTURE_PPT\RMSD\Pymol\Original\1APS.pdb"
mut_glob = "D:\STUDY\STRUCTURE_PPT\RMSD\Pymol\models\1APS\1APS_*.pdb"
# load the wild-type pdb
cmd.load(wt_file,"wt")
# loop through the mutants
for file in glob(mut_glob):
print file
cmd.load(file,"mut")
rms = cmd.align("wt","mut")[0]
print " %s rmsd: %s" % (file,rms)
cmd.delete("mut")
### end script ###
I ran the above script using Pymol. But I am receiving the following error:
PyMOL>run D:/STUDY/STRUCTURE_PPT/RMSD/Pymol/mut_rmsd.py
ExecutiveProcessPDBFile-Error: Unable to open file
'D:\STUDY\STRUCTURE_PPT\RMSD\Pymol\OriginalAPS.pdb'.
Traceback (most recent call last):
File "C:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\parsing.py", line 455,
in run_file
execfile(file,global_ns,local_ns)
File "D:/STUDY/STRUCTURE_PPT/RMSD/Pymol/mut_rmsd.py", line 11, in <module>
cmd.load(wt_file,"wt")
File "C:\Program Files (x86)\PyMOL\PyMOL/modules\pymol\importing.py", line 878,
in load
if _self._raising(r,_self): raise pymol.CmdException
CmdException: <pymol.CmdException instance at 0x06FF1580>
Can anyone help please.
On Thu, Jan 9, 2014 at 4:48 PM, Om Shiv
<harhaalmekhu...@gmail.com<mailto:harhaalmekhu...@gmail.com>> wrote:
Thanks Jared
On Thu, Jan 9, 2014 at 12:03 AM, Sampson, Jared
<jared.samp...@nyumc.org<mailto:jared.samp...@nyumc.org>> wrote:
Hi Om -
I hope you don't mind me posting your questions back to the list. (When
replying to this list, you have to use Reply All, otherwise it just goes to the
sender.)
Also, a quick disclaimer: I haven't used PyMOL on Windows in over 5 years, so
what I'm saying may not be entirely accurate. (Others, please correct me if
there's anything incorrect here.)
Hi I have installed Pymol in windows 7 platform. Why does it not allow me to
save the script in the Pymol folder ?
Is there any way to save it in Pymol working directory ?
I don't think you really want to save it to the folder where PyMOL is installed
(if that's what you mean by "the Pymol folder"). The working directory is the
directory from which PyMOL is launched. You can see where this is by typing
`pwd` at the PyMOL command prompt. Some other shell commands work as well,
such as `cd` and `ls`.
Thanks for your guidance.
I have modified your script as follows:
### begin script ###
from pymol import cmd
from glob import glob
# Edit these two variables with the paths to your files
wt_file = "D:\STUDY\STRUCTURE_PPT\RMSD\Pymol\Original\1APS.pdb"
mut_glob = "D:\STUDY\STRUCTURE_PPT\RMSD\Pymol\models\1APS\1APS_*.pdb"
# load the wild-type pdb
cmd.load(wt_file,"wt")
# loop through the mutants
for file in glob(mut_glob):
print file
cmd.load(file,"mut")
rms = cmd.align("wt","mut")[0]
print " %s rmsd: %s" % (file,rms)
cmd.delete("mut")
### end script ###
Used the following command from the command line: run
D:\STUDY\STRUCTURE_PPT\RMSD\mut-rmsd.py
But I am receiving the following error:
IOError: [Errno 2] No such file or directory:
'D:\\STUDY\\STRUCTURE_PPT\\RMSD\\mut-rmsd.py'
Please help.
thanks
Maybe try using the GUI:
1. File > Log... - create a log file (I usually call mine "log.pml"), which
will be useful later.
2. File > Run... - navigate to your mut-rmsd.py file and run it.
3. Go back and open your log file to see what the command looked like when you
ran the script.
PyMOL log files are very widely useful for finding out how to translate GUI
actions into scriptable commands.
Hope that helps!
Cheers,
Jared
On Wed, Jan 8, 2014 at 1:13 AM, Sampson, Jared
<jared.samp...@nyumc.org<mailto:jared.samp...@nyumc.org>> wrote:
Hi Om -
Here is another option that loads only one mutant at a time. You can save the
following as a Python script (e.g., "mut-rmsd.py") and run it from the PyMOL
command line by typing `run mut-rmsd.py` (with a full or relative path if it's
not in PyMOL's working directory).
For more information about these functions, you can also check out a few things
on the PyMOL Wiki:
http://pymolwiki.org/index.php/Process_All_Files_In_Directory
http://pymolwiki.org/index.php/Align
### begin script ###
from pymol import cmd
from glob import glob
# Edit these two variables with the paths to your files
wt_file = "wt.pdb"
mut_glob = "mut/*.pdb"
# load the wild-type pdb
cmd.load(wt_file,"wt")
# loop through the mutants
for file in glob(mut_glob):
print file
cmd.load(file,"mut")
rms = cmd.align("wt","mut")[0]
print " %s rmsd: %s" % (file,rms)
cmd.delete("mut")
### end script ###
Hope that helps.
Cheers,
Jared
--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
550 First Avenue
New York, NY 10016
212-263-7898
http://kong.med.nyu.edu/
On Jan 7, 2014, at 11:58 AM, Om Shiv
<harhaalmekhu...@gmail.com<mailto:harhaalmekhu...@gmail.com>> wrote:
Hello All
I am a new user to Pymol and Python.
I have a PDB Structure with single chain (A) and I have modeled 500 single
point mutants of this wild structure.
Now for each such 500 modeled structures, I would like to calculate RMSD (ALL
ATOMS) with the wild type PDB structure.
Can anybody help me with the script to automate calculation of 500 RMSD
calculations using PYMOL ?
Secondly, what threshold value of RMSD can be considered above which we can say
that the mutant structure is considerably different than the wild type ?
Thanks in advance.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
PyMOL-users mailing list
(PyMOL-users@lists.sourceforge.net<mailto:PyMOL-users@lists.sourceforge.net>)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
------------------------------------------------------------
This email message, including any attachments, is for the sole use of the
intended recipient(s) and may contain information that is proprietary,
confidential, and exempt from disclosure under applicable law. Any unauthorized
review, use, disclosure, or distribution is prohibited. If you have received
this email in error please notify the sender by return email and delete the
original message. Please note, the recipient should check this email and any
attachments for the presence of viruses. The organization accepts no liability
for any damage caused by any virus transmitted by this email.
=================================
------------------------------------------------------------
This email message, including any attachments, is for the sole use of the
intended recipient(s) and may contain information that is proprietary,
confidential, and exempt from disclosure under applicable law. Any unauthorized
review, use, disclosure, or distribution is prohibited. If you have received
this email in error please notify the sender by return email and delete the
original message. Please note, the recipient should check this email and any
attachments for the presence of viruses. The organization accepts no liability
for any damage caused by any virus transmitted by this email.
=================================
On Wed, Jan 8, 2014 at 1:13 AM, Sampson, Jared
<jared.samp...@nyumc.org<mailto:jared.samp...@nyumc.org>> wrote:
Hi Om -
Here is another option that loads only one mutant at a time. You can save the
following as a Python script (e.g., "mut-rmsd.py") and run it from the PyMOL
command line by typing `run mut-rmsd.py` (with a full or relative path if it's
not in PyMOL's working directory).
For more information about these functions, you can also check out a few things
on the PyMOL Wiki:
http://pymolwiki.org/index.php/Process_All_Files_In_Directory
http://pymolwiki.org/index.php/Align
### begin script ###
from pymol import cmd
from glob import glob
# Edit these two variables with the paths to your files
wt_file = "wt.pdb"
mut_glob = "mut/*.pdb"
# load the wild-type pdb
cmd.load(wt_file,"wt")
# loop through the mutants
for file in glob(mut_glob):
print file
cmd.load(file,"mut")
rms = cmd.align("wt","mut")[0]
print " %s rmsd: %s" % (file,rms)
cmd.delete("mut")
### end script ###
Hope that helps.
Cheers,
Jared
--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
550 First Avenue
New York, NY 10016
212-263-7898
http://kong.med.nyu.edu/
On Jan 7, 2014, at 11:58 AM, Om Shiv
<harhaalmekhu...@gmail.com<mailto:harhaalmekhu...@gmail.com>> wrote:
Hello All
I am a new user to Pymol and Python.
I have a PDB Structure with single chain (A) and I have modeled 500 single
point mutants of this wild structure.
Now for each such 500 modeled structures, I would like to calculate RMSD (ALL
ATOMS) with the wild type PDB structure.
Can anybody help me with the script to automate calculation of 500 RMSD
calculations using PYMOL ?
Secondly, what threshold value of RMSD can be considered above which we can say
that the mutant structure is considerably different than the wild type ?
Thanks in advance.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
PyMOL-users mailing list
(PyMOL-users@lists.sourceforge.net<mailto:PyMOL-users@lists.sourceforge.net>)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
------------------------------------------------------------
This email message, including any attachments, is for the sole use of the
intended recipient(s) and may contain information that is proprietary,
confidential, and exempt from disclosure under applicable law. Any unauthorized
review, use, disclosure, or distribution is prohibited. If you have received
this email in error please notify the sender by return email and delete the
original message. Please note, the recipient should check this email and any
attachments for the presence of viruses. The organization accepts no liability
for any damage caused by any virus transmitted by this email.
=================================
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net