[PyMOL] Finding parameter settings in old PyMol session
Hi all, I need to make a set of figures with a protein having different ligands bound to the active site. I already have a few of them finished and now I want to make the rest in a similar (identical) way. Unfortunately, I have forgotten how I set sphere_scale, stick_radius and the like for a few of the things I am showing, and I have varied these settings for different parts of the plot - is there a way to get these parameters listed from the old session file (which I kept)? Thanks in advance, Wulf
Re: [PyMOL] Finding parameter settings in old PyMol session
Hey Wulf, after firing up your old session, you should be able to extract any setting by typing 'get setting', e.g. 'get stick_radius' or 'get sphere_scale'. Also, think about saving important PyMOL work as pml scripts. I find them much easier to handle. Andreas Wulf Blankenfeldt wrote: Hi all, I need to make a set of figures with a protein having different ligands bound to the active site. I already have a few of them finished and now I want to make the rest in a similar (identical) way. Unfortunately, I have forgotten how I set sphere_scale, stick_radius and the like for a few of the things I am showing, and I have varied these settings for different parts of the plot - is there a way to get these parameters listed from the old session file (which I kept)? Thanks in advance, Wulf -- ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Andreas Förster, Research Associate Paul Freemont Xiaodong Zhang Labs Department of Biochemistry, Imperial College London http://www.msf.bio.ic.ac.uk
[PyMOL] Exporting a selection to file
Hello, is it possible to generate a list of all residues within 5A of another (or whatever you need) and then save this list to a file/clipboard? Thanks a lot for the help, Luca begin:vcard fn:Luca Varani n:Varani;Luca org:Institute for Research in Biomedicine adr:;;Via Vela 6;Bellinzona;;6500;Switzerland email;internet:luca.var...@irb.unisi.ch tel;fax:+41 91 820 0321 x-mozilla-html:TRUE url:http://www.irb.unisi.ch/main.asp?page=staff_homeid=195 version:2.1 end:vcard
Re: [PyMOL] Exporting a selection to file
Hi! Try with: select selection name, name of the object to which the selection belongs w. 5 of other object select other selection name, br. selection name save name.pdb, other selection name The first command select the atoms at 5 Angstroms from other object; the second select the whole residues to which the atoms selected belong; the third saves the complete selection. Hope it helps! Annalisa Annalisa Bordogna PhD. Student DISAT - Università degli Studi di Milano Bicocca Milano Italy 2009/3/31 Luca Varani luca.var...@irb.unisi.ch Hello, is it possible to generate a list of all residues within 5A of another (or whatever you need) and then save this list to a file/clipboard? Thanks a lot for the help, Luca -- ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
[PyMOL] how to resolve the error
Friends, Someone please write to me how to resolve the following error. OpenGL graphics engine: GL_VENDOR: Mesa Project GL_RENDERER: Software Rasterizer GL_VERSION: 1.4 (2.1 Mesa 7.3-devel) Traceback (most recent call last): File /usr/lib/python2.5/site-packages/pymol/__init__.py, line 400, in launch_gui __import__(self.invocation.options.gui) File /usr/lib/python2.5/site-packages/pmg_tk/__init__.py, line 22, in module from PMGApp import * File /usr/lib/python2.5/site-packages/pmg_tk/PMGApp.py, line 28, in module from Tkinter import * File /usr/lib/python2.5/lib-tk/Tkinter.py, line 38, in module import _tkinter # If this fails your Python may not be configured for Tk ImportError: /usr/local/chimera/lib/libtk8.5.so: cannot restore segment prot after reloc: Permission denied Detected 2 CPU cores. Enabled multithreaded rendering. thanks bala
[PyMOL] special bond in pymol
Hi, Can anyone help thierry ? http://rosettadesigngroup.com/blog/10/pymol-scripts/#comment-3149 I would like to ask to make a special bond in pymol. Actually in my protein I have a real covalent bond between an Asn and a Lys.. Obviously, Pymol doesn’t know how to draw it. Can you help me ? Thanks. thierry Nir London. Rosetta Design Group. http://rosettadesigngroup.com/blog/
Re: [PyMOL] special bond in pymol
Hi Nir, Pymol just draws bonds based on distances, not based on topological information. If atoms are within contact distance, a bond will be drawn, whatever the atoms are. If one feels need for an additional bond, it is possible to add them using: bond selection1, selection2 This will draw bonds between all atoms of selection1 and all atoms of selection2. In Thierry's case it would be something like: bond resi X and resn asp and name CD, resi Y and resn lys and name NZ assuming this is about a side chain - side chain amide bond. Hope it helps, Tsjerk On Tue, Mar 31, 2009 at 9:14 PM, Nir London n...@rosettadesigngroup.com wrote: Hi, Can anyone help thierry ? http://rosettadesigngroup.com/blog/10/pymol-scripts/#comment-3149 I would like to ask to make a special bond in pymol. Actually in my protein I have a real covalent bond between an Asn and a Lys.. Obviously, Pymol doesn’t know how to draw it. Can you help me ? Thanks. thierry Nir London. Rosetta Design Group. http://rosettadesigngroup.com/blog/ -- ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623
Re: [PyMOL] special bond in pymol
Obviously that should read 'resn asn' in stead of 'resn asp'. Sorry for that. Tsjerk On Tue, Mar 31, 2009 at 9:56 PM, Tsjerk Wassenaar tsje...@gmail.com wrote: Hi Nir, Pymol just draws bonds based on distances, not based on topological information. If atoms are within contact distance, a bond will be drawn, whatever the atoms are. If one feels need for an additional bond, it is possible to add them using: bond selection1, selection2 This will draw bonds between all atoms of selection1 and all atoms of selection2. In Thierry's case it would be something like: bond resi X and resn asp and name CD, resi Y and resn lys and name NZ assuming this is about a side chain - side chain amide bond. Hope it helps, Tsjerk On Tue, Mar 31, 2009 at 9:14 PM, Nir London n...@rosettadesigngroup.com wrote: Hi, Can anyone help thierry ? http://rosettadesigngroup.com/blog/10/pymol-scripts/#comment-3149 I would like to ask to make a special bond in pymol. Actually in my protein I have a real covalent bond between an Asn and a Lys.. Obviously, Pymol doesn’t know how to draw it. Can you help me ? Thanks. thierry Nir London. Rosetta Design Group. http://rosettadesigngroup.com/blog/ -- ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623 -- Tsjerk A. Wassenaar, Ph.D. Junior UD (post-doc) Biomolecular NMR, Bijvoet Center Utrecht University Padualaan 8 3584 CH Utrecht The Netherlands P: +31-30-2539931 F: +31-30-2537623
[PyMOL] get_dihedral bottleneck
Hi PyMol-Community, I have been looking for a PyMOL command to calculate the ribose sugar pucker information (in DNA) but have not found anything. Thus, I began writing a simple Python script that is supposed to take a selection, determine whether or not it contains a ribose sugar ring, and then calculate the phase, amplitude, and pucker orientation for each nucleotide residue within the selection. The completed script works just fine (see the script below) but it slows down significantly in performance when calling cmd.get_dihedral (at least, my crude debugging method using print statements has identified the culprit to be the get_dihedral command) with a LARGE protein-DNA complex (160,000 atoms) loaded. However, if I only load the DNA (with no protein), the performance is lightning fast. Can anybody help me improve the overall performance or suggest an alternative? Thanks in advance! Sean = from pymol.cgo import *# get constants from math import * from pymol import cmd def pucker(selection): # Author: Sean Law # Institute: Michigan State University # E-mail: s...@msu.edu obj_name = selection objects = cmd.get_names(selection) for obj in objects: if (obj == selection): obj_name=obj sel=cmd.get_model(selection) first=1 old= oldchain= residue={} count=0 for atom in sel.atom: new=atom.chain+ +str(atom.resi) newchain=atom.chain+ +atom.segi if (not (oldchain == newchain) and first): print #Blank line to separate chain output print %6s %6s %8s Residue % (Phase, Amp, Pucker) if (not(new == old) and (not first)): #Check that all 5 atoms exist if(len(residue) == 5): #Calculate pucker info = pseudo(residue) print info+ +old else: print There is no sugar in this residue if (not (oldchain == newchain)): print #Blank line to separate chain output print %6s %6s %8s Residue % (Phase, Amp, Pucker) #Clear values residue={} #Store new value store_atom(atom,residue,obj_name) else: store_atom(atom,residue,obj_name) first=0 old=new oldchain=newchain #Final Residue #Calculate dihedrals for final residue if (len(residue) == 5): #Calculate pucker for final residue info = pseudo(residue) print info+ +old else: print There is no sugar in this residue return def sele_exists(sele): return sele in cmd.get_names(selections); def pseudo(residue): other=2*(sin(math.radians(36.0))+sin(math.radians(72.0))) theta0=cmd.get_dihedral(residue['C4*'],residue['O4*'],residue['C1*'],residue['C2*']) theta1=cmd.get_dihedral(residue['O4*'],residue['C1*'],residue['C2*'],residue['C3*']) theta2=cmd.get_dihedral(residue['C1*'],residue['C2*'],residue['C3*'],residue['C4*']) theta3=cmd.get_dihedral(residue['C2*'],residue['C3*'],residue['C4*'],residue['O4*']) theta4=cmd.get_dihedral(residue['C3*'],residue['C4*'],residue['O4*'],residue['C1*']) #phase=atan2((theta4+theta1)-(theta3+theta0),2*theta2*(sin(math.radians(36.0))+sin(math.radians(72.0 phase=atan2((theta4+theta1)-(theta3+theta0),theta2*other) amplitude=theta2/cos(phase) phase=math.degrees(phase) if (phase 0): phase=phase+360 # 0 = Phase 360 #Determine pucker if (phase 36): pucker = C3'-endo elif (phase 72): pucker = C4'-exo elif (phase 108): pucker = O4'-endo elif (phase 144): pucker = C1'-exo elif (phase 180): pucker = C2'-endo elif (phase 216): pucker = C3'-exo elif (phase 252): pucker = C4'-endo elif (phase 288): pucker = O4'-exo elif (phase 324): pucker = C1'-endo elif (phase 360): pucker = C2'-exo else: pucker = Phase is out of range info = %6.2f %6.2f %8s % (phase, amplitude, pucker) return info def store_atom(atom,residue,obj_name): if (atom.name == O4' or atom.name == O4*): residue['O4*'] = str(atom_sele(atom,obj_name)) elif (atom.name == C1' or atom.name == C1*): residue['C1*'] = str(atom_sele(atom,obj_name)) elif (atom.name == C2' or atom.name == C2*): residue['C2*'] = str(atom_sele(atom,obj_name)) elif (atom.name == C3' or atom.name == C3*): residue['C3*'] = str(atom_sele(atom,obj_name)) elif (atom.name == C4' or atom.name == C4*): residue['C4*'] = str(atom_sele(atom,obj_name)) return def atom_sele(atom,obj_name): atom_sele = if (not (obj_name == )): atom_sele = atom_sele+obj_name+ if (not (atom.segi == )): atom_sele = atom_sele+segi +atom.segi+