Re: [PyMOL] Fetching scripts

2011-05-05 Thread gilleain torrance
Hi, With regard to sandboxing, there is PyPy: http://pypy.readthedocs.org/en/latest/sandbox.html although this would be a little complicated, as it's not just a cPython package or extension or whatever, but an alternative to cPython... Oh, and in general, there does exist some precedent for thi

Re: [PyMOL] Different color on each side of strand

2011-03-08 Thread gilleain torrance
Hi, Although most of the time the strands in a sheet have clear 'sides', this won't always be true. Keitaro already mentioned the possibility of twisted strands, but you can also get two sheets that share the 'same' long strand - well, depending on the SSE assignment algorithm, I suppose. Jellyro

Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread gilleain torrance
Hi, I might be wrong, but might it be that you need the axis through the structure that minimises the distance of all the points to it. Or, to put it another way, the least-square-plane through the structure, the normal to that plane, and a thir axis perpendicular to both. If this is the case, yo

Re: [PyMOL] get_dihedral bottleneck

2009-04-01 Thread gilleain torrance
On Tue, Mar 31, 2009 at 9:45 PM, Sean Law wrote: > the performance is lightning fast.  Can anybody help me improve the overall > performance or suggest an alternative?  Thanks in advance! A kind of alternative would be to use a custom dihedral command, that avoids evaluating selections: def tors

Re: [PyMOL] (no subject)

2009-03-24 Thread gilleain torrance
Hi, I think that it probably is possible to do this from within pymol, and probably quite convenient for single molecules. However, there are two other possible approaches, which would be helpful for multiple molecules. Firstly, there is a program called 'dang' made by the Richardson group: htt

Re: [PyMOL] Pymol and NumPy

2009-03-02 Thread gilleain torrance
Hi, I recognise that code comment :) Actually, it seems that pymol now includes numpy, I will change my script and see if it still works. In the meantime, if you just want axially-aligned bounding boxes, try this script (not by me): http://www.pymolwiki.org/index.php/DrawMinBoundingBox at le

Re: [PyMOL] Secondary structure elements

2008-11-28 Thread gilleain torrance
Hello, Possibly. I have python code that attempts to parse dssp files. Add that to a script to call dssp (not so hard) and then call the parsing code, then annotate the structure with the result... Maybe all this already exists somewhere? gilleain On Fri, Nov 28, 2008 at 1:39 PM, DimitryASupla

Re: [PyMOL] remove cartesian coordinate from w/in transparent metal ions

2008-10-29 Thread gilleain torrance
Hmmm. I'm probably over-complicating matters, but: def before_load(): cmd.delete("all") def after_load(): cmd.as("cartoon") cmd.hide("nonbonded") def wrapped_load(filename): before_load() cmd.load(filename) after_load() cmd.extend("wrapped_load", wrapped_load) gilleain

Re: [PyMOL] select ATP hetatm?

2008-09-23 Thread gilleain torrance
"select hetatm and resname atp" or "select hetatm and r. atp" see also: "help selections" gilleain On Tue, Sep 23, 2008 at 7:18 PM, Paul Shannon wrote: > What command will select a HETATM of ATP? I am looking at 1ATP.pdb, > in which the ATP molecule appears > as shown below. > > I found 'selec

Re: [PyMOL] displaying crystallographic symmetry in PyMol

2008-09-10 Thread gilleain torrance
Ah, the problem is the "def" in front of the function call. It should be either: set_symmetry 1a2p, 60, 60, 80, 90, 90, 120, P6122 (in the pymol command window or in a .pml script) or cmd.set_symmetry("1a2p", 60, 60, 80, 90, 90, 120, spacegroup="P6122") in a python script. gilleain On We

Re: [PyMOL] pdb-l: chain alignment tool

2008-07-07 Thread gilleain torrance
Hi, There are many. One way is to use PyMol (or, indeed many other viewers). So I did it like this: fetch 1a25 show cartoon create chaina, chain a create chainb, chain b delete 1a25 align chaina, chainb color red, chain a color blue, chain b I guess that this could be generalised into a script t

Re: [PyMOL] Pymol scripts are very slow doing dihedral calculations

2008-06-11 Thread gilleain torrance
Hi, Wouldn't it be better to use a program written especially for this purpose, like dang/dangle from the richardson group, or dssp (, or others I don't know of)? Of course, you may have a specific reason for using pymol, so this is just a suggestion! gilleain torrance On Wed, Jun 1

[PyMOL] phosphates in peptide backbone?

2008-05-07 Thread gilleain torrance
8, in this case) get put into the cartoon as 'part' of the peptide backbone, sort of. Just thought I would mention it, in case this is considered a bug... gilleain torrance

Re: [PyMOL] Scripts on Mac

2008-02-28 Thread gilleain torrance
Hmm. Running scripts has always worked for me on a mac. Could it be a tab/space problem, or just a character missing at the end from a copy/paste? gilleain torrance On Thu, Feb 28, 2008 at 2:50 PM, Sadler, Evan wrote: > I can run scripts by pasting them, but they fail when I try to read t

Re: [PyMOL] succinct secondary structure 'readout'

2007-10-09 Thread gilleain torrance
Hi everyone, Sorry for posting my replies to the list; I hope this is all generally useful. Firstly, the bug: the obvious cause is if the line "if ss == currentType:" is never true. In that case, it is making a list of one-residue sses, with, as Tsjerk correctly pointed out, the default end of -1.

Re: [PyMOL] succinct secondary structure 'readout'

2007-10-09 Thread gilleain torrance
Hi Frieda, That's odd. It seems to work okay for mulitchain proteins (I'll add some extra bits to handle chains). The "--" in the output is weird. It suggests that either the start numbers end in a dash or the end number start with a dash. It's difficult to diagnose the bug, if bug there is, with

Re: [PyMOL] succinct secondary structure 'readout'

2007-10-09 Thread gilleain torrance
rate_sses They were fun to code, anyway. gilleain torrance On 10/9/07, Tsjerk Wassenaar wrote: > > Hi Frieda, > > In addition to my previous mail, the following works for me: > > sslist=[] > iterate n. ca, sslist.append( [resn,resi,ss] ) > > /i=1, j=len(sslist)-1 > /whil

Re: [PyMOL] Anybody remember Molmol?

2007-09-25 Thread gilleain torrance
Hi, On the subject of "circular variance circle plots for dihedral angles". If we are talking about the same thing, I have implemented some of this in python if anyone wants it. That is, I had to calculate the circular means and std dev for lists of torsion angles, and used the method described i

Re: [PyMOL] python for loop with pymol command usage

2007-07-04 Thread gilleain torrance
Hmmm. With a little messing around, it seems that this works at the pymol prompt: for x in range(10): cmd.label("(name ca and resi %d)" % x, '"%s%s\" % (resi, resn)') The only difference is in the quoting. Double quotes inside single quotes. gilleain On 7/4/07, Clark, Louis wrote: Dear

Re: [PyMOL] alter_state for y coordinates (2)?

2007-06-19 Thread gilleain torrance
Hi, Firstly, I can see why there is a syntax error for the alter_state command: cmd.alter_state ("1",("1AW3 and name fe"),((x,y,z)=(x-a,y-b,z-c))") has the quotes in the wrong place. I guess it should be: cmd.alter_state("1","(1AW3 and name fe)","((x,y,z)=(x-a,y-b,z-c))") I can make eve

Re: [PyMOL] generating pdb coordinates

2007-03-15 Thread gilleain torrance
Hi, You can save the structure as a pdb file: save name.pdb, selection-name that might do what you want. Type help save for more details. gilleain torrance On 3/15/07, Juliana R Cortines wrote: Hi all- I was wondering if it is possible to generate coordinates in a .pdb file from the

Re: [PyMOL] Running scripts on MacPyMol

2007-02-28 Thread gilleain torrance
Hi Rafael, There is a lot of info on the wiki: http://www.pymolwiki.org also, there is a help system in pymol (type "help"). The run command is what you want for running scripts. gilleain torrance On 2/27/07, Rafael Fernández Leiro wrote: Hello, firstly excuse my english. I

Re: [PyMOL] Distance Label Format

2007-02-23 Thread gilleain torrance
object as a parameter. So, no, not that I can see. gilleain torrance On 2/23/07, Anthony Armstrong wrote: Hi Folks, When using the distance wizard is there a way to change the number of decimal places output to the label from 2 to 1? Thanks, Tony Anthony A. Armstrong Department of Biop

[PyMOL] image metadata plugin

2007-02-12 Thread gilleain torrance
file, structure names, comments, etc. In fact, a truly clever thing would be to store the session along with the image, and you could browse sessions by looking at thumbnail images... Anyway, just a thought. gilleain torrance

Re: [PyMOL] hydrogen_add problem

2006-12-06 Thread gilleain torrance
dding missing hydrogen atoms." - seems perfect :) gilleain torrance On 12/6/06, Stuart Endo-Streeter wrote: You should take a look at the program Reduce from the Richardson lab at Duke, it adds protons and is written in C++. It will take a pdb and without requiring modification or formating a

Re: [PyMOL] (no subject)

2006-11-07 Thread gilleain torrance
Hi, I don't know how simple you want it, but python lets you print just like: print cmd.distance(a, b) assuming that a and b are strings that are atom selections. See http://www.pymolwiki.org/index.php/Translate_And_Measure for a more complex example! :) gilleain On 11/7/06, Giacomo B

Re: [PyMOL] .pl file handling in pymol

2006-09-16 Thread gilleain torrance
ummm. PY-mol not handling perl is not really a bug... :) gilleain On 9/16/06, vijay wrote: dear pymol users, I got a bug in pymol with .pl file produced by pdbsum clefts (see this link, http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsum/GetPage.pl?pdbcod

Re: [PyMOL] Wizard modification

2006-09-10 Thread gilleain torrance
Hi, Yes, the wizards are just pymol classes in individual modules in the wizard/ subdirectory of the main pymol. So, on the mac : /Applications/MacPyMOL.app/pymol/modules/pymol/wizard/measurement.py but, I guess in a similar place in other installations. I've tried my hand briefly at wizard pr

Re: [PyMOL] secondary structure to different states

2006-07-20 Thread gilleain torrance
Hi Björn, Odd. I can't reproduce this. I load 1a2p and 1a12 into states one and two, hide, show cartoon, and bingo - I have two cartoons (in two different states). What happens if you load the first pdbfile twice? Or use another file instead of p2? Or a newer version (I'm using MacPyMol 1.0.0b03

Re: [PyMOL] MacPyMol plug-ins

2006-05-21 Thread gilleain torrance
Hi, this is a good idea, and a fairly easy one to implement. do you mean present all of the pdb files (or the like) from a chosen directory in a list, and load each molecule via a double-click? Yes. Exactly. Probably with the directory as a button/textelement at the top of the list? Whateve

Re: [PyMOL] MacPyMol plug-ins

2006-05-19 Thread gilleain torrance
2) filelist: Yes. Yes it does. Although typing "load " works too... What I should have said was that I often find myself (and others in our group have in the past) looking at a whole bunch of structures, one after the other. When you are looking at 100s of structures in a row it gets tiring to k

Re: [PyMOL] MacPyMol plug-ins

2006-05-19 Thread gilleain torrance
Hi, Some suggestions: 1) Header file display. 2) Filelist : show a directory as a list, to avoid repeated "load" commands. 3) Ramachandran plots : I keep meaning to try dynoplot on the hybrid pymol, but never do. 4) Secondary structure display. Oh the list is endless! But number one suggestion

Re: [PyMOL] Permanent change of settings

2006-05-12 Thread gilleain torrance
".pymolrc" or "pymolrc". see : http://www.pymolwiki.org/index.php/Launching_PyMOL gilleain On 5/11/06, Praedor Atrebates wrote: I would like to make some settings I use permanent and default in pymol because every time I start pymol or reinitialize and load a new pdb/pse I have to make a se

[PyMOL] Re: building peptides

2006-03-15 Thread gilleain torrance
due.lower()) cmd.set_geometry ?? cmd.save(aa.pdb, "all") Unfortunately, I'm not sure the set_geometry command is right. gilleain torrance On 3/14/06, Alan wrote: > Hello List, > > I would like to have any help. > > I want to build several 3-peptides, like AAA, FFF,

Re: [PyMOL] manipulate standard error ?

2006-03-09 Thread gilleain torrance
Hello, yes. maybe. if you are talking about printing to standard error, then : import sys sys.stderr.write("hello, stderr!") will do it. if, on the other hand, you mean something more complicated to do with manipulating the shell ("redirection"...?) than I don'

Re: [PyMOL] Arrows Too Short?

2006-03-06 Thread gilleain torrance
Hello, This is only my opinion right... But it seems to me that converting hbonds into secondary structure elements (helices, strands, paperclips...) can be tricky at the boundaries when bonds are just too short or just the other side of the correct angle. To illustrate this with 1m6q (which is

Re: [PyMOL] (no subject)

2006-03-06 Thread gilleain torrance
Hi, I found out how to do ... something ... like this the other day.

[PyMOL] Re: using 1 button mouse with MacPyMol

2006-02-07 Thread gilleain torrance
I too have had this problem. Even if you switch to 2-button selecting, I can't seem to zoom, no matter what finger-twisting combinations I try! I do have a usb mouse, but I wonder if this is now vital, or merely still convenient? gilleain torrance On 2/7/06, andr...@biochem.utah.edu

Re: [PyMOL] Bfactor

2006-01-17 Thread gilleain torrance
"...get at..."? "...display..."? To access the B-factors, you can use "iterate" - as in "iterate resi 1, print round(b, 2)". That will print out the b-factor for each atom in the first residue. gilleain torrance On 1/16/06, Bingding Huang wrote: >

Re: [PyMOL] Python scripting for Pymol

2006-01-06 Thread gilleain torrance
Hi, I tried a similar, but simpler, example : def mol2png(name): cmd.png(name) cmd.delete(name) called as 'mol2png("1a2pA")', given that I have an object called "1a2pA" loaded. It works just fine on my laptop (mac). Odd. gilleain torrance On 1/6/06,

Re: [PyMOL] MacPyMOL command entry

2005-12-22 Thread gilleain torrance
Hi, I've noticed this too, it can be quite frustrating. Oddly, the histories for the two windows (main, and command) seem to be different. I have never managed to work out what the problem is, but I sometimes wonder if it is to do with whether a function returns a result or not? (Wild guess! :)

Re: [PyMOL] MacPyMOL 0.99beta29

2005-11-08 Thread Gilleain Torrance
Hi, The link to the beta99: http://delsci.com/beta/macpymol-0_99beta29.tar.gz says "Page not found". I wouldn't normally worry, but since using recent betas, my screen goes odd when waking from sleep. Which isn't much to worry about either (assuming it is caused by pymol, which I don't kno

Re: [PyMOL] Question about custom CGO objects

2005-11-08 Thread Gilleain Torrance
Matrix() rx, ry, rz = 1, 2, 3 cmd.load_callback(Cone(), 'cone') Gilleain Torrance On 8 Nov 2005, at 06:44, Andrew Wollacott wrote: Hey all, I recently made a cone class that will display cones using pymol cgo's. I built the cones using triangles as suggested by Warren Now I nee

[PyMOL] Re: new MacPyMOL on Tiger : _opengl

2005-10-25 Thread Gilleain Torrance
ol/opengl/gl/ __init__.py", line 21, in ? import _opengl ImportError: No module named _opengl Not sure why, as there is a: /System/Library/Frameworks/Python.Framework/Versions/Current/lib/ python2.3/site-packages/pymol/opengl/gl/_opengl.so in existance. gilleain torrance On 14 Oct 2005,

Re: [PyMOL] very slow script for distance calculation

2005-10-25 Thread Gilleain Torrance
't need to be opening the files "out" or "full" inside the loop, or re-reading the data from "amb". Hth. gilleain torrance On 25 Oct 2005, at 10:45, andrea spitaleri wrote: Hi again, reading my post I found the bottleneckshame on me :) here it is:

Re: [PyMOL] Need testers for new MacPyMOL on Tiger

2005-10-14 Thread Gilleain Torrance
Hi, Works great for me! Very nice to have access to the system python. gilleain torrance On 14 Oct 2005, at 16:50, Warren DeLano wrote: For cutting-edge Mac users, there is a new MacPyMOL for Tiger that integrates into a single window and links to the system Python instead of bringing its

Re: [PyMOL] Missing parts in cartoon mode

2005-10-14 Thread Gilleain Torrance
Which parts are missing? Looks fine to me... Although the pdb file has some horrible features. Some residues are multiply defined (eg 170 in chain H) and there is some kind of poly- calcium binding tail in chain L. gilleain torrance On 14 Oct 2005, at 10:43, wrote: Hi everybody I am

Re: [PyMOL] Small problem or inconsistency in showing cgo objects?

2005-10-10 Thread Gilleain Torrance
disable('two')" at the end instead of 'hide', then it seems to do what you wanted it to do... gilleain torrance On 10 Oct 2005, at 22:12, Terry Jones wrote: Hi. I've run into a slight pymol UI problem with cgo objects and I'm wondering if I should be doing somet

Re: [PyMOL] Using the Pymol Run command

2005-10-03 Thread Gilleain Torrance
interpreting. gilleain torrance On 3 Oct 2005, at 12:20, Terry Jones wrote: Hi all I've written some python code that I want to run from inside pymol using the File/Run command. After some playing around looking at error messages and the pymol source, I saw that pymol is reading my f

Re: [PyMOL] using a variable name within a selection

2005-09-14 Thread Gilleain Torrance
the 'model' variable correctly to whatever it was set to at the top of the loop. gilleain torrance On 15 Sep 2005, at 01:50, Xavier Deupi wrote: Hi, I'm trying to write a script to load a series of model peptides and superimpose them to a template structure. The part that

Re: [PyMOL] movies in MacOSX

2005-07-20 Thread Gilleain Torrance
Of course, this assumes you have purchased a QuickTime Pro (tm) key for £20 ($25)... gilleain On 20/7/05 23:44, "Reinhold Penner" wrote: > Xavier, > > since you're on a Mac, it's easy enough to just fire up QuickTime > Player and select File->Open Image Sequence. This will prompt you to > sel

Re: [PyMOL] Generating a 3D Object in any position

2005-07-11 Thread Gilleain Torrance
probably a bit inefficient (could use the Numeric module) and b) you can't ray-trace callback objects. Hope this is helpful! gilleain torrance On 11/7/05 10:27, "tanri...@stud.uni-frankfurt.de" wrote: > Hi everybody, > > I want to vizualize 3D-ellipsoids around molecule

Re: [PyMOL] script to write down distances ligand-protein: need feedback

2005-07-05 Thread Gilleain Torrance
e of a question for Mr DeLano :) Calculating pairwise like this is always going to be computationally expensive, but I don't know ways to speed this up. gilleain torrance On 5/7/05 15:17, "Andrea Spitaleri" wrote: >> HBA = cmd.distance('HBA', '(lig and acc)&#

Re: [PyMOL] script to write down distances ligand-protein: need feedback

2005-07-05 Thread Gilleain Torrance
_distance in a loop: for donor in atoms_Don: for acceptor in atoms_Acc: DistOut.write("%s" % cmd.get_distance(donor, acceptor)) or something. gilleain torrance On 5/7/05 11:50, "Andrea Spitaleri" wrote: > Hi guys, > I am trying to make a script to

[PyMOL] Re: pdb-l: protein visualization/interaction tools?

2005-06-12 Thread Gilleain Torrance
stance objects (using cmd.distance) to show them. Also, it is entirely possible that there is a way to do this more easily in pymol that I missed :) gilleain torrance On 12/6/05 20:00, "Marty Taylor" wrote: > Hello, > > I am looking for a tool to help me build structural

[PyMOL] using package Scientific from within pymol on OS X-X11 hybrid

2004-10-13 Thread gilleain torrance
glitch is the change from Numeric to numarray. This can be 'fixed' ('hacked') by using *cough*perl*cough*: perl -i -p -e 's/Numeric/numarray/g' *.py */*.py which should substitiute all instances of 'Numeric' with 'numarray'. gilleain torrance