[PyMOL] L-D amino acid conversion using pymol
Gents, I want to try to visualize a retro-enantio Conotoxin peptide (reverse sequence, all D-amino acids, sculpting) and visually compare surface charge to its normal L-amino acid counterpart using Pymol. I use Pymol 0.93 (fink compiled) on a Powerbook G4/667 with three-button mouse. Mutating residues using the mutation wizard works fine, but I get an error upon L-D conversion. Using the mouse, I understand from the reference manual the following procedure: Invert NOTE The invert function is usually bound to CTRL−E in editing mode. The default selections are (lb) and (rb), meaning that you can pick the atom to invert with CTRL−middle click and then pick the stationary atoms with CTRL−SHIFT/left−click and CTRL−SHIFT/right− click, then hit CTRL−E to invert the atom. After correctly following this mouse-procedure selecting c-alpha and nitrogen, an error-message says: invert error: couldn't find basis for inversion. The same applies when trying via command line (example for residue one): PyMOL edit 1/ca PyMOL invert 1/n, 1/ca invert error: couldn't find basis for inversion What am I doing wrong ? Kind regards Uwe Hobohm Heinz-Uwe Hobohm
[PyMOL] sorry for posting multiple times...
...Mac-mail did not propagate the message from out-folder to sent-folder for unknown reasons. Uwe
RE: [PyMOL] L-D amino acid conversion using pymol
Heinz-Uwe, For 0.95: The inversion function was changed in version 0.95 to take advantage of multiple picked atoms. To invert a center, Ctrl-middle-click to pick the center atom as pk1 and two stationary atoms as pk2 and pk3. Then type Ctrl-E to invert. For 0.93: Ctrl-middle-click to pick the center atom (pk1) Ctrl-shift-left-click to pick the first stationary atom as (lb) Ctrl-shift-right-click to pick the second stationary atom as (rb) Ctrl-E to invert It sounds to me like you're following the proper procedure for 0.93, so I am a bit puzzled as to why it isn't working... Cheers, Warren -- mailto:war...@delanoscientific.com Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -Original Message- From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Heinz-Uwe Hobohm Sent: Monday, May 10, 2004 4:09 AM To: PyMOLBB Subject: [PyMOL] L-D amino acid conversion using pymol Gents, I want to try to visualize a retro-enantio Conotoxin peptide (reverse sequence, all D-amino acids, sculpting) and visually compare surface charge to its normal L-amino acid counterpart using Pymol. I use Pymol 0.93 (fink compiled) on a Powerbook G4/667 with three-button mouse. Mutating residues using the mutation wizard works fine, but I get an error upon L-D conversion. Using the mouse, I understand from the reference manual the following procedure: Invert NOTE The invert function is usually bound to CTRL-E in editing mode. The default selections are (lb) and (rb), meaning that you can pick the atom to invert with CTRL-middle click and then pick the stationary atoms with CTRL-SHIFT/left-click and CTRL-SHIFT/right- click, then hit CTRL-E to invert the atom. After correctly following this mouse-procedure selecting c-alpha and nitrogen, an error-message says: invert error: couldn't find basis for inversion. The same applies when trying via command line (example for residue one): PyMOL edit 1/ca PyMOL invert 1/n, 1/ca invert error: couldn't find basis for inversion What am I doing wrong ? Kind regards Uwe Hobohm Heinz-Uwe Hobohm
[PyMOL] Creating cell surface
Hey Fellow PyMolers, I should be able to figure this out but I simply haven't after much fiddling and googling. I'm trying to create a cell surface for a cover figure and in Molscript I usually did this by making a PDF file with a single atom, rendering it in CPK, and then blowing its atom_radius way up to several thousand angstroms to create a slightly curved surface on which molecules could be positioned. I'm trying this in PyMol and can't figure out the command sequence. Basically, how do I alter the radius for a single atom, especially because I don't want all atoms I draw as a surface to have the same radius? Alternatively I've been trying to do this with the CGO utility using one of Gareth's scripts I found on the web: from pymol.cgo import * from pymol import cmd def cgo_sphere(x,y,z,r,name=cgo_sphere): # Create a CGO object obj = [ SPHERE, float(x), float(y), float(z), float(r) ] # Load it into PyMOL cmd.load_cgo(obj,name) # Add to PyMOL API cmd.extend(cgo_sphere,cgo_sphere) But in adding these lines sequentially to the PyMol command line, or running it as a script, it fails at: def cgo_sphere(x,y,z,r,name=cgo_sphere): and I get the following error message def cgo_sphere(x,y,z,r,name=cgo_sphere): Traceback (most recent call last): File /Users/delwarl/pymol/products/MacPyMOL.app/pymol/modules/pymol/parser.py, line 144, in parse exec(com2[nest]+\n,pymol_names,pymol_names) File string, line 1 def cgo_sphere(x,y,z,r,name=cgo_sphere): ^ SyntaxError: unexpected EOF while parsing Is there some other way the script is supposed to be used. . .I'm using MacPyMol 0.95. Thanks for any tips/help. Tony
RE: [PyMOL] Creating cell surface
Tony, In order to enter multi-line Python code on the command line, you need to use explicit end-of-line continuations. Otherwise, PyMOL won't know where your Python code stops and PyMOL commands again begin. from pymol.cgo import * from pymol import cmd set cgo_sphere_quality, 3 def cgo_sphere(x,y,z,r,name=cgo_sphere): \ # Create a CGO object \ obj = [ \ SPHERE, float(x), float(y), float(z), float(r) \ ] \ # Load it into PyMOL \ cmd.load_cgo(obj,name) # Add to PyMOL command language cmd.extend(cgo_sphere,cgo_sphere) # end Python, begin PYMOL commands cgo_sphere 0,0,0,500,test -- For example, I can paste the above directly into the PyMOL command line (on win32), in order to get a sphere on the screen. A better alternative it to simply put all of that Python code into a .py file and run it from within PyMOL. NOTE: PyMOL doesn't currently render large and small objects together very efficiently, and there's precious little that you can do about it at the present time. Increasing hash_max won't help, though decreasing it can give a modest gain in performance. Sticking exclusively to CPK can also help. Cheers, Warren -- mailto:war...@delanoscientific.com Warren L. DeLano, Ph.D. Principal Scientist DeLano Scientific LLC Voice (650)-346-1154 Fax (650)-593-4020 -Original Message- From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Tony Giannetti Sent: Monday, May 10, 2004 12:25 PM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Creating cell surface Hey Fellow PyMolers, I should be able to figure this out but I simply haven't after much fiddling and googling. I'm trying to create a cell surface for a cover figure and in Molscript I usually did this by making a PDF file with a single atom, rendering it in CPK, and then blowing its atom_radius way up to several thousand angstroms to create a slightly curved surface on which molecules could be positioned. I'm trying this in PyMol and can't figure out the command sequence. Basically, how do I alter the radius for a single atom, especially because I don't want all atoms I draw as a surface to have the same radius? Alternatively I've been trying to do this with the CGO utility using one of Gareth's scripts I found on the web: from pymol.cgo import * from pymol import cmd def cgo_sphere(x,y,z,r,name=cgo_sphere): # Create a CGO object obj = [ SPHERE, float(x), float(y), float(z), float(r) ] # Load it into PyMOL cmd.load_cgo(obj,name) # Add to PyMOL API cmd.extend(cgo_sphere,cgo_sphere) But in adding these lines sequentially to the PyMol command line, or running it as a script, it fails at: def cgo_sphere(x,y,z,r,name=cgo_sphere): and I get the following error message def cgo_sphere(x,y,z,r,name=cgo_sphere): Traceback (most recent call last): File /Users/delwarl/pymol/products/MacPyMOL.app/pymol/modules/pymo l/parser.py, line 144, in parse exec(com2[nest]+\n,pymol_names,pymol_names) File string, line 1 def cgo_sphere(x,y,z,r,name=cgo_sphere): ^ SyntaxError: unexpected EOF while parsing Is there some other way the script is supposed to be used. . .I'm using MacPyMol 0.95. Thanks for any tips/help. Tony --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users