[PyMOL] Structural Allignment in PyMol

2013-10-04 Thread Syeda Hira Batool
Hello  I want to know how PyMol does Structural allignment. I am writing a 
python script to allign protein structures(from MD simulations) and 
eventually calculate RMSD. Please can anyone provide me a source code or a 
helping material.Thanx in advance.


Hira Batool
Student of BS-Bioinformatics
Biosciences Department
COMSATS Institute of Information Technology
Islamabad, PAKISTAN--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&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

Re: [PyMOL] unable to change phi angle of proline

2013-10-04 Thread Thomas Holder
Hi Osvaldo,

unfortunately PyMOL doesn't handle to set dihedrals in rings, so you have to 
break the ring first. Consider this:

def set_phi(resi, phi, state=1, quiet=1):
x = cmd.index('(first (resi %s and guide)) extend 2 and name C+N+CA' % resi)
try:
a = cmd.get_model(x[2], state).atom[0]
if a.name != "CA":
raise IndexError
except IndexError:
print " missing atoms"
return
if a.resn == "PRO":
bondargs = (x[1], "resi %s and name CD" % resi)
cmd.unbond(*bondargs)
cmd.set_dihedral(x[0], x[1], x[2], x[3], phi, state, quiet)
if a.resn == "PRO":
cmd.bond(*bondargs)

Hope that helps.

Cheers,
  Thomas

On Oct 2, 2013, at 8:28 PM, Osvaldo Martin  wrote:
> Hi everybody,
> 
> I can´t change the phi angle of proline using the function below. It works 
> for all other amino acids. If quiet = 0, it prints the value of the variable 
> "phi" (i.e. the value that the phi_angle should adopt). The phi angle of 
> proline is always around ~11.0
> 
> def set_phi(res_num, phi):
> if res_num != 0:
> cmd.set_dihedral('resi %s and name C' % (res_num-1), 'resi %s and 
> name N' % res_num, 'resi %s and name CA' % res_num, 'resi %s and name C' % 
> res_num, phi, state=1, quiet=1)
> 
> Thanks in advance.


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&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


Re: [PyMOL] Structural Allignment in PyMol

2013-10-04 Thread Thomas Holder
Hi Syeda,

you have a lot of options in PyMOL to do this. For full-atom RMSD fit on 
topologically identical molecules (since it's MD, I guess this is the case), 
use the "fit" command:

PyMOL> fit mobile, target

Otherwise, use "align" or "super":

PyMOL> align mobile, target, cycles=0

>From a python script, syntax looks like this:

from pymol import cmd
cmd.fit("mobile", "target")
cmd.align("mobile", "target", cycles=0)

http://pymolwiki.org/index.php/Fit
http://pymolwiki.org/index.php/Rms
http://pymolwiki.org/index.php/Align
http://pymolwiki.org/index.php/Super

Cheers,
  Thomas

On Oct 4, 2013, at 5:29 AM, Syeda Hira Batool  wrote:
> Hello  I want to know how PyMol does Structural allignment. I am writing a 
> python script to allign protein structures(from MD simulations) and 
> eventually calculate RMSD. Please can anyone provide me a source code or  a 
> helping material.Thanx in advance.
> 
> Hira Batool
> Student of BS-Bioinformatics
> Biosciences Department
> COMSATS Institute of Information Technology
> Islamabad, PAKISTAN

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&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


[PyMOL] saving

2013-10-04 Thread Oganesyan, Vaheh
Dear PyMOL users,

After upgrading my notebook to Win7 from XP 'save' function started to function 
differently. Before PyMOL would save everything in the directory where I'd 
launch it from. Now, by default, it goes to Win32. In some cases I can use 
'save as' option and after few clicks get to the desired destination. But for, 
say, 'save whatever.fasta' it doesn't work.
My current PyMOL version is 1.5.0.5 32-bit, though the notebook is 64-bit. 
Unfortunately 64-bit version doesn't work at all on my machine.

If you wonder why I'm not using 1.6.0.0 version is because it has issues with 
APBS.

Hope to get some help on the "save" command.

Thank you.

Vaheh Oganesyan, PhD
Antibody development and protein engineering
1 MedImmune Way, Gaithersburg, MD 20878
www.medimmune.com



To the extent this electronic communication or any of its attachments contain 
information that is not in the public domain, such information is considered by 
MedImmune to be confidential and proprietary. This communication is expected to 
be read and/or used only by the individual(s) for whom it is intended. If you 
have received this electronic communication in error, please reply to the 
sender advising of the error in transmission and delete the original message 
and any accompanying documents from your system immediately, without copying, 
reviewing or otherwise using them for any purpose. Thank you for your 
cooperation.

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&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


Re: [PyMOL] unable to change phi angle of proline

2013-10-04 Thread Osvaldo Martin
Thanks Thomas,

I tried your solution (adapted to my code) and now everything is working.


def set_phi(res_num, res_name, phi):
if res_num != 0 and res_name != 'PRO':
cmd.set_dihedral('resi %s and name C' % (res_num-1), 'resi %s and
name N' % res_num, 'resi %s and name CA' % res_num, 'resi %s and name C' %
res_num, phi, state=1, quiet=1)
if res_num != 0 and res_name == 'PRO':
cmd.unbond('resi %s and name N' % res_num, 'resi %s and name CD' %
res_num)
cmd.set_dihedral('resi %s and name C' % (res_num-1), 'resi %s and
name N' % res_num, 'resi %s and name CA' % res_num, 'resi %s and name C' %
res_num, phi, state=1, quiet=1)
cmd.bond('resi %s and name N' % res_num, 'resi %s and name CD' %
res_num


Cheers,

Osvaldo.

On Fri, Oct 4, 2013 at 9:50 AM, Thomas Holder  wrote:

> Hi Osvaldo,
>
> unfortunately PyMOL doesn't handle to set dihedrals in rings, so you have
> to break the ring first. Consider this:
>
> def set_phi(resi, phi, state=1, quiet=1):
> x = cmd.index('(first (resi %s and guide)) extend 2 and name C+N+CA' %
> resi)
> try:
> a = cmd.get_model(x[2], state).atom[0]
> if a.name != "CA":
> raise IndexError
> except IndexError:
> print " missing atoms"
> return
> if a.resn == "PRO":
> bondargs = (x[1], "resi %s and name CD" % resi)
> cmd.unbond(*bondargs)
> cmd.set_dihedral(x[0], x[1], x[2], x[3], phi, state, quiet)
> if a.resn == "PRO":
> cmd.bond(*bondargs)
>
> Hope that helps.
>
> Cheers,
>   Thomas
>
> On Oct 2, 2013, at 8:28 PM, Osvaldo Martin  wrote:
> > Hi everybody,
> >
> > I can´t change the phi angle of proline using the function below. It
> works for all other amino acids. If quiet = 0, it prints the value of the
> variable "phi" (i.e. the value that the phi_angle should adopt). The phi
> angle of proline is always around ~11.0
> >
> > def set_phi(res_num, phi):
> > if res_num != 0:
> > cmd.set_dihedral('resi %s and name C' % (res_num-1), 'resi %s
> and name N' % res_num, 'resi %s and name CA' % res_num, 'resi %s and name
> C' % res_num, phi, state=1, quiet=1)
> >
> > Thanks in advance.
>
>
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&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

[PyMOL] Can not compile r4044

2013-10-04 Thread QT
Dear all,

I'm getting this error when typing "python setup.py"

Traceback (most recent call last):
  File "setup.py", line 327, in 
pyogl_extension("pymol.opengl.gl.openglutil_num",
["contrib/pyopengl/openglutil_num.c"]),
  File "/usr/lib64/python2.7/distutils/core.py", line 105, in setup
attrs['script_name'] = os.path.basename(sys.argv[0])
IndexError: list index out of range

How can I resolve this problem?

Best,
Quyen
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&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

Re: [PyMOL] Can not compile r4044

2013-10-04 Thread Thomas Holder
Hi Quyen,

this was an error in setup.py, sorry. Fixed in r4045.

Cheers,
  Thomas

On Oct 4, 2013, at 8:43 PM, QT  wrote:
> Dear all,
> 
> I'm getting this error when typing "python setup.py"
> 
> Traceback (most recent call last):
>   File "setup.py", line 327, in 
> pyogl_extension("pymol.opengl.gl.openglutil_num", 
> ["contrib/pyopengl/openglutil_num.c"]),
>   File "/usr/lib64/python2.7/distutils/core.py", line 105, in setup
> attrs['script_name'] = os.path.basename(sys.argv[0])
> IndexError: list index out of range
> 
> How can I resolve this problem?
> 
> Best,
> Quyen

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&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