RE: [PyMOL] distance between aromatic residues
On Tue, 2005-05-24 at 11:34 +0200, Grégori Gerebtzoff wrote: > 3) define two interlaced loops and calculate the distance between all 6 > carbons of Phe1 with all 6 carbons of Phe2, either with cmd.dist or with > simple mathematical functions; sum these distances > > 4) divide the result by 36, and export the data! Or more simply, once you have selected the 12 atoms, calculate the centroids of each of the two rings. Then just compute the distance between these centroids. This is a bit more efficient than doing 36 pairwise distances. Gareth
Re: [PyMOL] still unresolved import pymol...
Andrea, I don't know the technical reason, but I seem to remember that Warren advised users who wanted to use PyMOL functions from within a Python script to simply use PyMOL as your Python interpreter. In other words, write your Python program, then do pymol -c myprog.py (the -c flag causes the program to run in batch mode i.e. not to start the GUI) Gareth On Thu, 28 Apr 2005, Andrea Spitaleri wrote: > After any answer, > I have been looking on this list and googling around (sorry if I > didn't before...) > there is: > # set path in order to use pymol modules > export PYMOL_PATH=/usr/local/pymol/ > export PYTHONPATH=/usr/local/pymol/modules/ > > then type python to enter in the shell and: > s...@darkstar:~> python > Python 2.3.3 (#1, Feb 5 2005, 16:22:10) > [GCC 3.3.3 (SuSE Linux)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import pymol > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/pymol/modules/pymol/__init__.py", line 306, in ? > import _cmd > ImportError: No module named _cmd > >>> > I found already that someone got the same error but none helps him, so > I tought that this is a pymol bug, isn't ? > > thanks again for any help > > regards > > andrea > > > --- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users > > --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
Re: [PyMOL] Problematic PQS files
Andreas, > > > >You should probably have a look at the Macromolecular Structure > >Database (msd.ebi.ac.uk) - it contains proposed biological assemblies, > >calculated using an algorithm based on that used for PQS. You can > >download PDB-format files from the website. > > > > > > > So in what respect do you think pdb files from MSD will be better than PQS? > Since they both come from the EBI, they should be more or less the > same,I assume - it would be schizofrenic to provide a good and bad > version of quaternary structures... > Well, I just discovered from your mail address, you would know! I'm no expert in the details of either MSD or PQS, but I'd say the main differences are 1. PQS files can contain the same problems that legacy PDB files do, namely inconsistent naming of atoms and residues, possible duplication of atom/residue numbers, incorrect stereochemistries etc. Compilation of the MSD includes numerous checks for these things, in order to ensure that the data is internally consistent, e.g. that all residues named 'XYZ' refer to the same chemical compound. 2. The transformations used to generate biological assemblies in PQS sometimes cause problems regarding ligands. PQS tries to assign a parent chain to each ligand molecule, so that when protein chains are duplicated and have symmetry operations applied to them, the ligand molecules get the same treatment. For whatever reason, this sometimes does not work - I have seen PQS files in which a ligand gets split in half, with some atoms being transformed to a new symmetry mate, and some staying where they are... This should not happen in the MSD due to the checks mentioned above. 3. Apparently the algorithm used to generate MSD assemblies is not *exactly* the same as that used in PQS, and I believe there is a greater degree of manual curation applied to the results. So the structures you get from MSD should agree with biological intutition more often (though there is certainly no guarantee it will be 100% correct) If you want to know more details, I'd suggest you contact the MSD team via the address on their website. Hope that helps, Gareth --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
Re: [PyMOL] Problematic PQS files
Andreas, I think you'll find that if you delete the binary nastiness at line 268 of the file REMARK 300 THE BIOMOLECULE IS A MOLECULAR SPECIES OF TYPE it will load OK. This is clearly a bug in the PQS database. You should probably have a look at the Macromolecular Structure Database (msd.ebi.ac.uk) - it contains proposed biological assemblies, calculated using an algorithm based on that used for PQS. You can download PDB-format files from the website. btw, quite an impressive structure when you do load it! Gareth On Wed, 27 Apr 2005, Andreas Henschel wrote: > Hi, > > I am using PyMOL with PQS files , which supposedly come in PDB format > but I encountered some > problems with a few entries (eg. 1m90.mmol, > ftp://ftp.ebi.ac.uk/pub/databases/msd/pqs/macmol/1m90.mmol) on opening: > > PyMOL>load 1m90.mmol > Executive: object "1m90.mmol" created. > ExecutiveWindowZoom-Error: selection doesn't specify any coordinates. > > And the display remains empty. Rasmol manages to display the file. > These problems usually occur with big complexes. Any idea? > > Many thanks > Andreas > > -- > Andreas Henschel > Bioinformatics Group > TU Dresden > Tatzberg 47-51 > 01307 Dresden, Germany > > Phone: +49 351 463 40063 > EMail: a...@biotec.tu-dresden.de > > > > > --- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users > --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
[PyMOL] Fedora 3 problem
I recently upgraded to Fedora Core 3 and have been having some strange problems with PyMOL. Molecules look fine when rendered as lines, sticks or mesh, but spheres, surfaces, and sometimes cartoons only appear for half the molecule. See the following page for examples of this. I've also posted various diagnostic information in the hope that some Linux guru out there may be able to help. The graphics card is an Intel 82865G. This is (in theory) supported out-of-the box by FC3; I have not installed anything except the distribution. The Intel homepage has some drivers for this card, but they are the same as the ones bundled with FC3. When I tried installing them after the OS, I got exactly the same problem. http://www.ebi.ac.uk/~gareth/pymol/fc3_problem Gareth -- Gareth Stockwell European Bioinformatics Institute
RE: [PyMOL] PDB parse error?
On Fri, 2005-04-08 at 17:19, Warren DeLano wrote: > However, are spaces legal within PDB field entries? Looking at the PDB documentation, I see no explicit statement that they are *not* allowed. This page http://www.rcsb.org/pdb/docs/format/pdbguide2.2/part_76.html gives the 'standard' atom naming conventions, but these seem only to apply to atoms in amino acid residues, not to ligands or other het-groups. The example I gave was from heme; here, the standard naming for the four nitrogens at the centre of the pyridoxal ring seems to be " N A", " N B", " N C" , " N D". Gareth > They > would be expected cause problems because space is almost always used to > separate tokens. > > My suggestion would be to use a Python script to replace those spaces with > underscores... > > Cheers, > Warren > > -- > Warren L. DeLano, Ph.D. > Principal Scientist > > . DeLano Scientific LLC > . 400 Oyster Point Blvd., Suite 213 > . South San Francisco, CA 94080 > . Biz:(650)-872-0942 Tech:(650)-872-0834 > . Fax:(650)-872-0273 Cell:(650)-346-1154 > . mailto:war...@delsci.com > > > > -Original Message----- > > From: pymol-users-ad...@lists.sourceforge.net > > [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of > > Gareth Stockwell > > Sent: Friday, April 08, 2005 6:25 AM > > To: pymol-users > > Subject: [PyMOL] PDB parse error? > > > > > > Warren, > > > > Using version 0.97, if I load a PDB with an atom like this: > > > > HETATM 2051 N A HEM B 400 -7.209 4.751 30.974 1.00 > > 16.78 N > > > > (e.g. in PDB 1f1c) > > > > Then Pymol loads the atom name as 'N' rather than 'N A'. Is > > there a way > > around this? > > > > Gareth > > > > -- > > Gareth Stockwell > > European Bioinformatics Institute > > > > > > > > --- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from > > real users. > > Discover which products truly live up to the hype. Start reading now. > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > ___ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > > > > > --- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] PDB parse error?
Warren, Using version 0.97, if I load a PDB with an atom like this: HETATM 2051 N A HEM B 400 -7.209 4.751 30.974 1.00 16.78 N (e.g. in PDB 1f1c) Then Pymol loads the atom name as 'N' rather than 'N A'. Is there a way around this? Gareth -- Gareth Stockwell European Bioinformatics Institute
Re: [PyMOL] How to apply state-specific colours?
Hubert, You need to use the mdo command, e.g. cmd.mclear() cmd.mset("1 x10") # Set all residues to white cmd.mdo(1, "color white") # Colour a residue cmd.mdo(2, "color red, (i;51)") # Clear colour of previous residue, and highlight a new one cmd.mdo(3, "color white, (i;51); color red, (i;184)") I tried to do this using the script language, but mdo 2, color red, (i;51) causes an error on my version (Linux 0.98beta05) - I think this is a bug. Gareth On Fri, 15 Oct 2004, Hubert Kettenberger wrote: > Dear all! > > I would like to prepare a an animation in which I would like to follow > one certain residue on its journey through an enzyme in a stepwise > manner. To do so, I would like to color a certain residue, say, red in > state one and grey in all other frames. In frame 2, the next residue > should be red, all others grey. Frame three has the third residue red, > all others grey etc. > > Is there a command like > > color red, residue 1 and state 1 > color red, residue 2 and state 2 > etc., > > i.e. is there a way to apply colours selectively to a certain state? > > Thanks in advance for your ideas! > > Hubert > > > > > > --- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users > --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
[PyMOL] Save bug
Ah, I see what was happening. I had done the following: 1. Loaded an NMR structure 2. Incremented state using VCR controls 3. Loaded a crystal structure (only one state) 4. Deleted the NMR structure object 5. Tried to save. I was still in state >1, so no coordinates were present in the remaining (crystal) structure Sorry - definitely have my Monday head on today... Gareth -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] Save bug
Using 0.98beta05 on Linux, the 'save' command does not work. Doing either of save some_filename.pdb save some_filename.pdb, an_object just produces a file containing "END". Gareth -- Gareth Stockwell European Bioinformatics Institute
Re: [PyMOL] PDB to DXF
A quick Google for "pdb dxf" suggests that there are a couple: http://www.okino.com/conv/imp_pdb.htm http://www.danforthcenter.org/smith/MolView/Writeup/file.htm ... although this article http://www.sciencemag.org/cgi/content/full/281/5384/1814a suggests that MolView's DXF output is poor. hth, Gareth On Thu, 2004-09-16 at 16:16, andRe ambrosio wrote: > Hi, > Is it possible to convert a .pdb in a .dxf (AUTOCAD) file? Does anyone > know how? > Thanks in advance, > > andre ambrosio > PhD student > cbme/ifsc/usp - brazil > > > --- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] Reconstructing selections
I'm using PyMOL as my main visualisation tool, and have a question relating to the transfer of data from my application to the viewer. Inside my programs, I typically have a number of molecule objects, and on each molecule, have made a number of selections (of atoms, of residues or of chains). Now what I want to do is to visualise this information using PyMOL. Loading the coordinates themselves is simple - I just write out a PDB file from my program for each molecule, and load that into PyMOL. However, reproducing the selections is more tricky. At the moment, I am writing out a PyMOL script which selects each atom/residue/chain by name, something like cmd.select("first_selection", "(my_protein & c;A & i;123) or (my_protein & c;A & i;136) or ... ") Clearly, however, this is inefficient. What I'd like to know is: i) Is there any guarantee that atoms are stored internally in the same order that they appear in the PDB file? ii) If so, is there any way to directly construct a selection containing e.g. atoms 1,3,8,10,11... of a given object? ... and of course any other comments or advice are most welcome! Gareth -- Gareth Stockwell European Bioinformatics Institute
Re: [PyMOL] Cavity display?
One program which can do this is SURFNET: http://www.biochem.ucl.ac.uk/~roman/surfnet/surfnet.html There are two ways in which cavities can be displayed: i) SURFNET can write out PDB format files containing the atoms/residues lining each cleft, which you can view directly ii) If linked with the CCP4 libraries when compiled, SURFNET can write CCP4 format density maps which describe the shape of each cavity. These can be loaded into PyMOL and contoured to show the location of each cleft. HTH Gareth On Thu, 2004-07-22 at 14:28, Dirk Kostrewa wrote: > Dear PyMol users, > > I'm looking for a program that can calculate and write out cavities in a > format that can be converted such that I can display it with PyMol (I'm not > satisfied with the results from VOIDOO). Could you please send me any pointer > to a program that you found useful? BTW, this would be my wish for a next > release of PyMol! > > Best regards, > > Dirk. -- Gareth Stockwell European Bioinformatics Institute
Re: [PyMOL] distance from plane
Hi Kristl, I'm not sure if PyMOL can do it, but it's not too hard to do a bit of vector algebra which gives the answer. Let the coordinates of the nitrogens be A, B, C, D, and the iron atom F. Compute the centre of your nitrogens: X = (A + B + C + D) / 4 Then you work out a normal to the plane of the nitrogens using a cross product of vectors connecting three of your nitrogens * N = (AB x AC) (NB this gives a vector pointing 'out of the page' if A,B,C,D are labelled anticlockwise) Now the distance you want is the projection of the vector XF onto the normal N. This is given by N . (F - X) --- |N| If the atoms are labelled in the order described above, this number will be +ve if the iron is 'above the page' and -ve if it is below. Hope that's of some help, Gareth * There is no way to define a plane guaranteed to contain all four nitrogen atoms - the way I described only uses three of them. If you want to do this robustly, you should really compute the best-fitting plane for all four Ns, and return the iron-plane distance along with a measure of the error of the plane fitting. On Tue, 2004-07-20 at 16:39, Kristl Adams wrote: > Hi Pymolers! > > Is there a way for me to define a plane of atoms say 4 Nitrogens in a heme > complex and then determine how far out-of-plane the Fe atom is? If so > either in Pymol or another program I'd love to know the secret. > > Thanks, > Kristl > > kri...@physics.purdue.edu -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] CGO raytracing problem
Hello, I have a problem ray-tracing some CGO objects. Basically I have a script which produces a surface, in the form of a load of CGO triangles. This is done using a command which looks like: my_cgo = [ BEGIN, TRIANGLES, COLOR, r, g, b, VERTEX x1, y1, z1, VERTEX x2, y2, z2, VERTEX x3, y3, z3, ... END ] (See attached script cgo.py for an example) This works fine, until I try to ray-trace it. What I see is that, from some angles, it ray-traces OK, but then if I rotate by 45 or 90 degrees, the ray-traced image gets darker until it disappears. I suspect that surface normals are the problem - do I need to compute and then explictly state a normal for each vertex? Gareth -- Gareth Stockwell European Bioinformatics Institute from pymol.cgo import * from pymol import cmd conservation_3_surf_cgo = [ BEGIN, TRIANGLES, COLOR, 0, 1, 0.317521, VERTEX, -8.5, -1.5, -4.00061, VERTEX, -8.50092, -1.5, -4, VERTEX, -8.5, -1.50089, -4, COLOR, 0, 1, 0.317521, VERTEX, -8, -1.5, -4.15621, VERTEX, -8.5, -1.5, -4.00061, VERTEX, -8.5, -1.50089, -4, COLOR, 0, 1, 0.317521, VERTEX, -8, -1.72804, -4, VERTEX, -8, -1.5, -4.15621, VERTEX, -8.5, -1.50089, -4, COLOR, 0, 1, 0.317521, VERTEX, -7.5, -1.5, -4.1, VERTEX, -8, -1.5, -4.15621, VERTEX, -8, -1.72804, -4, COLOR, 0, 1, 0.317521, VERTEX, -7.5, -1.6622, -4, VERTEX, -7.5, -1.5, -4.1, VERTEX, -8, -1.72804, -4, COLOR, 0, 1, 0.317521, VERTEX, -7.5, -1.5, -4.1, VERTEX, -7.5, -1.6622, -4, VERTEX, -7.26969, -1.5, -4, COLOR, 0, 1, 0.21024, VERTEX, -8.5, -1.5, -4.00061, VERTEX, -8.5, -1, -4.16771, VERTEX, -8.75208, -1, -4, COLOR, 0, 1, 0.317521, VERTEX, -8.50092, -1.5, -4, VERTEX, -8.5, -1.5, -4.00061, VERTEX, -8.75208, -1, -4, COLOR, 0, 1, 0.317521, VERTEX, -8.5, -1, -4.16771, VERTEX, -8.5, -1.5, -4.00061, VERTEX, -8, -1, -4.30467, COLOR, 0, 1, 0.317521, VERTEX, -8, -1, -4.30467, VERTEX, -8.5, -1.5, -4.00061, VERTEX, -8, -1.5, -4.15621, COLOR, 0, 1, 0.317521, VERTEX, -8, -1, -4.30467, VERTEX, -8, -1.5, -4.15621, VERTEX, -7.5, -1, -4.26497, COLOR, 0, 1, 0.317521, VERTEX, -7.5, -1, -4.26497, VERTEX, -8, -1.5, -4.15621, VERTEX, -7.5, -1.5, -4.1, COLOR, 0.904059, 1, 0, VERTEX, -7.26969, -1.5, -4, VERTEX, -7, -1.08591, -4, VERTEX, -7, -1, -4.02872, COLOR, 0.278188, 1, 0, VERTEX, -7.26969, -1.5, -4, VERTEX, -7, -1, -4.02872, VERTEX, -7.5, -1.5, -4.1, COLOR, 0.600425, 1, 0, VERTEX, -7.5, -1.5, -4.1, VERTEX, -7, -1, -4.02872, VERTEX, -7.5, -1, -4.26497, COLOR, 0.884264, 1, 0, VERTEX, -7, -1, -4.02872, VERTEX, -7, -1.08591, -4, VERTEX, -6.96462, -1, -4, COLOR, 1, 0, 0, VERTEX, -8.5, -1, -4.16771, VERTEX, -8.5, -0.5, -4.13483, VERTEX, -8.70267, -0.5, -4, COLOR, 1, 0.0515323, 0, VERTEX, -8.75208, -1, -4, VERTEX, -8.5, -1, -4.16771, VERTEX, -8.70267, -0.5, -4, COLOR, 1, 0.111453, 0, VERTEX, -8.5, -0.5, -4.13483, VERTEX, -8.5, -1, -4.16771, VERTEX, -8, -0.5, -4.27546, COLOR, 0, 1, 0.0179858, VERTEX, -8, -0.5, -4.27546, VERTEX, -8.5, -1, -4.16771, VERTEX, -8, -1, -4.30467, COLOR, 1, 0.714777, 0, VERTEX, -8, -0.5, -4.27546, VERTEX, -8, -1, -4.30467, VERTEX, -7.5, -0.5, -4.2347, COLOR, 0.413224, 1, 0, VERTEX, -7.5, -0.5, -4.2347, VERTEX, -8, -1, -4.30467, VERTEX, -7.5, -1, -4.26497, COLOR, 1, 0, 0, VERTEX, -7, -0.60533, -4, VERTEX, -7.0135, -0.5, -4, VERTEX, -7.5, -0.5, -4.2347, COLOR, 1, 0, 0, VERTEX, -7, -0.60533, -4, VERTEX, -7.5, -0.5, -4.2347, VERTEX, -7, -1, -4.02872, COLOR, 1, 0.177816, 0, VERTEX, -7, -1, -4.02872, VERTEX, -7.5, -0.5, -4.2347, VERTEX, -7.5, -1, -4.26497, COLOR, 1, 0, 0, VERTEX, -7, -0.60533, -4, VERTEX, -7, -1, -4.02872, VERTEX, -6.96462, -1, -4, COLOR, 1, 0, 0, VERTEX, -8.70267, -0.5, -4, VERTEX, -8.5, -0.5, -4.13483, VERTEX, -8.5, -0.207389, -4, COLOR, 1, 0, 0, VERTEX, -8.17336, 0, -4, VERTEX, -8.5, -0.207389, -4, VERTEX, -8.5, -0.5, -4.13483, COLOR, 1, 0, 0, VERTEX, -8.17336, 0, -4, VERTEX, -8.5, -0.5, -4.13483, VERTEX, -8, 0, -4.05397, COLOR, 1, 0, 0, VERTEX, -8, 0, -4.05397, VERTEX, -8.5, -0.5, -4.13483, VERTEX, -8, -0.5, -4.27546, COLOR, 1, 0, 0, VERTEX, -8, 0, -4.05397, VERTEX, -8, -0.5, -4.27546, VERTEX, -7.5, 0, -4.00515, COLOR, 1, 0, 0, VERTEX, -7.5, 0, -4.00515, VERTEX, -8, -0.5, -4.27546, VERTEX, -7.5, -0.5, -4.2347, COLOR, 1, 0, 0, VERTEX, -7.5, 0, -4.00515, VERTEX, -7.5, -0.5, -4.2347, VERTEX, -7.0135, -0.5, -4, COLOR, 1, 0, 0, VERTEX, -7.48932, 0, -4, VERTEX, -7.5, 0, -4.00515, VERTEX, -7.0135, -0.5, -4, COLOR, 1, 0, 0, VERTEX, -8.17336, 0, -4, VERTEX, -8, 0, -4.05397, VERTEX, -8, 0.0680252, -4, COLOR, 1, 0, 0, VERTEX, -7.5, 0.00649242, -4, VERTEX, -8, 0.0680252, -4, VERTEX, -8, 0, -4.05397, COLOR, 1, 0, 0, VERTEX, -7.5, 0, -4.00515, VERTEX, -7.5, 0.00649242, -4, VERTEX, -8, 0, -4.05397, COLOR, 1, 0, 0, VERTEX, -7.5, 0.00649242, -4, VERTEX, -7.5, 0, -4.00515, VERTEX, -7.48932, 0, -4, COLOR, 0.305259, 1, 0, VERTEX, -8.5, -2, -3.51669, VERTEX, -8.5176, -2, -3.5
Re: [PyMOL] Series of general questions
Tony, I'll answer the easy questions, and leave the tough ones to the real gurus... > 1) I would like to show certain residues and have no problem getting the > ones I want selected and displayed as sticks or whatever. The problem is > color. When I change the color of the selection, it changes the color of > the associated section of the ribbon. I would like to leave the ribbon, say > green, and show the residues in yellow. The easiest way is to use two objects. Say you already have your protein object (my_protein) and the selection of required objects (my_sel): hide everything create copy, my_protein show ribbon, my_protein color green, ribbon show sticks, my_sel color yellow, my_sel > 2) When selecting specific sidechains, it is often preferable to choose > only the sidechain atoms instead of the sidechain+backbone. In the good ol' > molscript days you would say select and not c or n or o but if you do that > in pymol it thinks you mean all carbon, nitrogen, and oxygen atoms instead > of their id in the PDB file. I'm sure this is worked out but I don't see it > in the example scripts I've found on line. PyMOL distinguished between element types and PDB atom names. For example, select all_oxygen, (e;o) select backbone_oxygen, (n;o) So to select sidechain atoms of an existing selection my_sel: select sidechain_of_my_sel, (my_sel & !n;n,c,o) Gareth -- ------- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
RE: [PyMOL] CGO shading
On Thu, 2004-03-25 at 18:38, Warren DeLano wrote: > You need to provide normal vectors too. Otherwise OpenGL & the > raytracer won't be able to light them correctly. OK, that works fine now. If anyone else is interested in making CGO 'walls', a simple script is now on my PyMOL page (it's called walls.py) http://www.ebi.ac.uk/~gareth/pymol/ Gareth > > -Original Message- > > From: pymol-users-ad...@lists.sourceforge.net > > [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of > > Gareth Stockwell > > Sent: Thursday, March 25, 2004 10:04 AM > > To: pymol-users > > Subject: [PyMOL] CGO shading > > > > > > Hi there, > > > > Does anyone know how to get CGO objects to be properly shaded? > > > > For example, if I create two triangles which lie in > > perpendicular planes... > > > > obj = [ > > > > BEGIN, TRIANGLES, > > > > COLOR, 1, 0, 0, > > VERTEX, 0, 0, 0, > > VERTEX, 1, 0, 0, > > VERTEX, 1, 1, 0, > > > > COLOR, 1, 0, 0, > > VERTEX, 0, 0, 0, > > VERTEX, 1, 0, 0, > > VERTEX, 1, 0, 1, > > > > END > > ] > > > > cmd.load_cgo(obj,'triangles') > > > > > > ... the colour of both triangles looks identical, in either > > OpenGL or ray-traced rendering. > > > > I want to use CGOs to create 'floor' and 'walls' as a > > backdrop to ray-traced images, to give better perspective. > > At the moment, I have to manually set the shade of each wall > > in order to get it to look right. > > > > Details of my setup: > > PyMOL version 0.95 beta, running on Linux > > GL_VENDOR: 2d3D, Inc > > GL_RENDERER: Mesa DRI Intel(R) 845G 20021115 > > GL_VERSION: 1.2 Mesa 4.0.4 > > > > Cheers, > > Gareth > > -- --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
RE: [PyMOL] embeding pymol in a web page
Einat, On Thu, 2004-03-25 at 18:50, Warren DeLano wrote: > For web-page embeddable molecular graphics today, look to Jmol: > http://jmol.sourceforge.net Another alternative is the AstexViewer Java applet - free, but unfortunately closed source. http://www.astex-technology.com/AstexViewer/visualisation/index.html The MSD at EBI have developed an extended version, in use here: http://www.ebi.ac.uk/msd-srv/apps/Viewer/ViewerServlet?id=1atp It has some nice features, like showing the sequence of the protein and allowing you to zoom in on a residue when clicked in the sequence. I'm not sure about the licence position on the EBI version though; if you're interested, I'm sure someone from the MSD group could help out. Gareth -- ------- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
[PyMOL] CGO shading
Hi there, Does anyone know how to get CGO objects to be properly shaded? For example, if I create two triangles which lie in perpendicular planes... obj = [ BEGIN, TRIANGLES, COLOR, 1, 0, 0, VERTEX, 0, 0, 0, VERTEX, 1, 0, 0, VERTEX, 1, 1, 0, COLOR, 1, 0, 0, VERTEX, 0, 0, 0, VERTEX, 1, 0, 0, VERTEX, 1, 0, 1, END ] cmd.load_cgo(obj,'triangles') ... the colour of both triangles looks identical, in either OpenGL or ray-traced rendering. I want to use CGOs to create 'floor' and 'walls' as a backdrop to ray-traced images, to give better perspective. At the moment, I have to manually set the shade of each wall in order to get it to look right. Details of my setup: PyMOL version 0.95 beta, running on Linux GL_VENDOR: 2d3D, Inc GL_RENDERER: Mesa DRI Intel(R) 845G 20021115 GL_VERSION: 1.2 Mesa 4.0.4 Cheers, Gareth -- ------- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
Re: [PyMOL] Density sliders script
> P.S. I tried to add a button which, when clicked, would toggle the > appropriate isosurface representation between mesh and solid ... but my > Python/Tk programming leaves a lot to be desired! Maybe there are some > gurus out there who can sort it out...? OK - I hacked a work-around which does the job for now. Hope this is useful, Gareth -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] Density sliders script
Dear PyMOL-ers, I have written a PyMOL extension which is useful when manipulating multiple density maps at once. This script creates a new window containing one slider bar for each map currently loaded into PyMOL, and creates an isomesh object for each map. By moving a slider bar, the contour level of the appropriate mesh object is changed interactively. The script is available from my PyMOL webpage, where you can also see a screenshot of it in action: http://www.ebi.ac.uk/~gareth/work/pymol To use it, try the following PyMOL commands: run density_slider.py load any_old_map.ccp4 load another_map.ccp4 density_sliders Gareth P.S. I tried to add a button which, when clicked, would toggle the appropriate isosurface representation between mesh and solid ... but my Python/Tk programming leaves a lot to be desired! Maybe there are some gurus out there who can sort it out...? -- --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
[PyMOL] Help for user-defined functions
Does anyone know if it is possible to add 'help' documentation to my own user-defined functions? What I want is to be able to define a new PyMOL command by executing the following script: #-- def some_func: ''' Some help docs here... ''' # Python code here... cmd.extend("some_func", some_func) #-- ... and then type 'help some_func'. Gareth -- Gareth Stockwell European Bioinformatics Institute
RE: [PyMOL] H-bond drawing?
Hi Claire, All you need to do is: 1) Create selections for the two atoms you want to H-bond. There are several different ways to do this in PyMOL (see the manual for details), but for example, to bond chain A, Thr 15 OG1 chain D, Asp 184 OD1 you would do select donor, A/15/OG1 select acceptor, D/184/OD1 2) Create a h-bond object between these selections. The easiest way is to use PyMOL's "distance" command which draws a dashed line between them. It also shows the distance as a label, but you can turn this off distance hbond, donor, acceptor hide labels, x 3) Play with the settings to get it to look how you want. Dashed lines sometimes look a bit odd when you ray-trace them - I find that set dash_length, 0.15 set dash_radius, 0.09 set dash_width, 3.00 looks good. You can put these commands in your .pymolrc to save typing them all the time. Hope that helps, Gareth On Sun, 2003-11-09 at 09:58, Claire Sharpe wrote: > Hi there, > > Sorry I'm going to ask probably a very basic question but could anyone > tell me how to create H-bonds in pymol? > > I used SPDB viewer to model the interface between two dimers in a > tetrameric molecule. I now need to create some good pictures of this for > my thesis as SPDB isn't really good enough. I'd like to represent H-bonds > (not bond distances just bonds) e.g between ThrOG1 of subunit A and > Asp184OD1 of subunit D. I'm presuming that pymol can do this-if so would > really appreciate it if anyone could tell me how to enter in the command > line as I'm afraid I'm not used to it and thesis deadline looms on thurs! > > Many thanks, > > Claire > *** > > Claire Sharpe > > Department of Biochemistry > University of Cambridge > 80, Tennis Court Road > Cambridge. CB2 1GA > U.K > > Tel: 01223 766045 > Fax: 01223 766002 > email: ce...@mole.bio.cam.ac.uk > > > > > > --- > This SF.Net email sponsored by: ApacheCon 2003, > 16-19 November in Las Vegas. Learn firsthand the latest > developments in Apache, PHP, Perl, XML, Java, MySQL, > WebDAV, and more! http://www.apachecon.com/ > _______ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- Gareth Stockwell European Bioinformatics Institute
Re: [PyMOL] selcting water
Einat, You're using the wrong selection criterion. 'name' selects based on the atom name (not residue name). 'resi' selects on residue number, and 'elem' on the chemical element. To specifically select water molecules (assuming their residue name in the PDB file is HOH), do select water, resn hoh Gareth > On Tue, 2003-09-02 at 09:31, Einat Sitbon wrote: > Dear PyMolers, > How do I select all water molecules in a structure? > I tried select name hoh > as well as h2o, > and also: select resi hoh, or elem. > There are water molecules in the structure and they are called HOH in the > PDB file. > > Thanks, Einat. > > _ > Tired of spam? Get advanced junk mail protection with MSN 8. > http://join.msn.com/?page=features/junkmail > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] H-bond display
Regarding the h-bond code I posted the other day, (1) The formatting got all screwed up in the e-mail. (Thanks to Cameron Mura for pointing this out) (2) Michael Lerner mailed me an improved version of the code which can automatically number the h-bond objects hbond01, hbond02 etc, if explicit names aren't supplied The new version, with correct indenting, is available for download at http://www.ebi.ac.uk/~gareth/work/pymol Gareth -- Gareth Stockwell European Bioinformatics Institute
RE: [PyMOL] H-bond display
index returns the internal indexing, which will correspond > to cmd.get_model > > help identify > help index > > 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: Gareth Stockwell [mailto:gar...@ebi.ac.uk] > > Sent: Friday, July 18, 2003 8:50 AM > > To: Warren L. DeLano > > Cc: 'pymol-users' > > Subject: RE: [PyMOL] H-bond display > > > > Warren, > > > > I started having a look at this, but I am getting stuck with atom > > indices. If I make two selections, (lb) and (rb), by clicking on > > atoms in an object called 'x', then I can get the indices and objects > > of those atoms by doing > > > > x1 = cmd.identify("lb",1) > > x2 = cmd.identify("rb",1) > > > > In my example, printing out x1 and x2 gives the following: [('x', 2)] > > [('x', 16)] > > > > As I clicked on these atoms, the GUI told me that they were, > > respectively: > > VAL: /x/1ATP/E/15/CA > > LYS: /x/1ATP/E/16/NZ > > > > But now, if I dump out the contents of the model.atom array, using > > this > > code: > > > > m = cmd.get_model("x") > > i = 1 > > for a in m.atom: > > print str(i) + " -> " + a.chain + "/" + a.resn + "." \ > > + a.resi + "/" + a.name > > i = i+1 > > > > Then I see the following > > 1 -> E/VAL.15/N > > 2 -> E/VAL.15/CA > > 3 -> E/VAL.15/CB > > 4 -> E/VAL.15/CG1 > > 5 -> E/VAL.15/CG2 > > 6 -> E/VAL.15/C > > 7 -> E/VAL.15/O > > 8 -> E/LYS.16/N > > 9 -> E/LYS.16/CA > > 10 -> E/LYS.16/CB > > 11 -> E/LYS.16/CG > > 12 -> E/LYS.16/CD > > 13 -> E/LYS.16/CE > > 14 -> E/LYS.16/NZ > > 15 -> E/LYS.16/C > > 16 -> E/LYS.16/O > > 17 -> E/GLU.17/N > > 18 -> E/GLU.17/CA > > 19 -> E/GLU.17/C > > 20 -> E/GLU.17/O > > > > So atom number 2 is correct (VAL.15/CA), but in this array, atom 16 is > > > the O, not NZ in LYS.16. I presume that ChemPy is re-ordering the > > atoms some time during the get_model call - how do I resolve this? > > > > Gareth > > > > > > On Fri, 2003-07-18 at 16:36, Warren L. DeLano wrote: > > > Gareth, > > > > > > CGO is currently the way to go... > > > > > > 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 Gareth Stockwell > > > > Sent: Friday, July 18, 2003 2:46 AM > > > > To: pymol-users > > > > Subject: [PyMOL] H-bond display > > > > > > > > > > > > I am using distance objects at the moment, to display h-bonding > > > > contacts. My question is ... is there any easy way to display the > > > > > direction of an h-bond using distances (i.e. putting a little > > > > arrow on the dashed line)? > > > > > > > > I am prepared to bash out some functions which do this using CGOs, > > > > > but of course I won't if it's already implemented! > > > > > > > > Gareth > > > > > > > > > > > > -- > > > > Gareth Stockwell > > > > European Bioinformatics Institute > > > > > > > > > > > > > > > > --- > > > > This SF.net email is sponsored by: VM Ware > > > > With VMware you can run multiple operating systems on a single > > > machine. > > > > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines > > > > at > > > the > > > > same time. Free trial click here: > > > > http://www.vmware.com/wl/offer/345/0 > > > > ___ > > > > PyMOL-users mailing list > > > > PyMOL-users@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > > > > > > > > > > --- > > > This SF.net email is sponsored by: VM Ware > > > With VMware you can run multiple operating systems on a single > > > machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual > > > machines at the same time. Free trial click here: > > > http://www.vmware.com/wl/offer/345/0 > > > ___ > > > PyMOL-users mailing list > > > PyMOL-users@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > -- > > Gareth Stockwell > > European Bioinformatics Institute > > > > --- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- Gareth Stockwell European Bioinformatics Institute
RE: [PyMOL] H-bond display
Warren, I started having a look at this, but I am getting stuck with atom indices. If I make two selections, (lb) and (rb), by clicking on atoms in an object called 'x', then I can get the indices and objects of those atoms by doing x1 = cmd.identify("lb",1) x2 = cmd.identify("rb",1) In my example, printing out x1 and x2 gives the following: [('x', 2)] [('x', 16)] As I clicked on these atoms, the GUI told me that they were, respectively: VAL: /x/1ATP/E/15/CA LYS: /x/1ATP/E/16/NZ But now, if I dump out the contents of the model.atom array, using this code: m = cmd.get_model("x") i = 1 for a in m.atom: print str(i) + " -> " + a.chain + "/" + a.resn + "." \ + a.resi + "/" + a.name i = i+1 Then I see the following 1 -> E/VAL.15/N 2 -> E/VAL.15/CA 3 -> E/VAL.15/CB 4 -> E/VAL.15/CG1 5 -> E/VAL.15/CG2 6 -> E/VAL.15/C 7 -> E/VAL.15/O 8 -> E/LYS.16/N 9 -> E/LYS.16/CA 10 -> E/LYS.16/CB 11 -> E/LYS.16/CG 12 -> E/LYS.16/CD 13 -> E/LYS.16/CE 14 -> E/LYS.16/NZ 15 -> E/LYS.16/C 16 -> E/LYS.16/O 17 -> E/GLU.17/N 18 -> E/GLU.17/CA 19 -> E/GLU.17/C 20 -> E/GLU.17/O So atom number 2 is correct (VAL.15/CA), but in this array, atom 16 is the O, not NZ in LYS.16. I presume that ChemPy is re-ordering the atoms some time during the get_model call - how do I resolve this? Gareth On Fri, 2003-07-18 at 16:36, Warren L. DeLano wrote: > Gareth, > > CGO is currently the way to go... > > 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 Gareth Stockwell > > Sent: Friday, July 18, 2003 2:46 AM > > To: pymol-users > > Subject: [PyMOL] H-bond display > > > > > > I am using distance objects at the moment, to display h-bonding > > contacts. My question is ... is there any easy way to display the > > direction of an h-bond using distances (i.e. putting a little arrow on > > the dashed line)? > > > > I am prepared to bash out some functions which do this using CGOs, but > > of course I won't if it's already implemented! > > > > Gareth > > > > > > -- > > Gareth Stockwell > > European Bioinformatics Institute > > > > > > > > --- > > This SF.net email is sponsored by: VM Ware > > With VMware you can run multiple operating systems on a single > machine. > > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at > the > > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > > ___ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > > --- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] H-bond display
I am using distance objects at the moment, to display h-bonding contacts. My question is ... is there any easy way to display the direction of an h-bond using distances (i.e. putting a little arrow on the dashed line)? I am prepared to bash out some functions which do this using CGOs, but of course I won't if it's already implemented! Gareth -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] ChemPy question
Dear PyMOL-ers, I have just started dabbling in the chempy module, and I have a couple of questions: 1. If I load in a molecule using the following code... from chempy import io from chempy import protein m = io.pdb.fromFile("/tmp/x.pdb") # Use the load_object call, specifying the type of object as a chempy # model (index 8) cmd.load_object(8,m,"protein") ...there are no bonds displayed. Is there a chempy call I can make on the model object (m) to calculate covalent bonds? 2. I can happily iterate over, or select by index, atoms in a chempy model, using either of the following # Iterate over all atoms for a in m.atom: # do something # Random access a = m.atom[10] Are there corresponding residue and atom arrays, or does chempy represent these aggregates simply by the fields of the Atom object (resn, resi, chain etc)? As far as I can see, the latter is true, but like I said, so far I am only a dabbler. I should mention why I'm doing this, in case anyone has a more elegant solution. Basically I have a C++ library which handles molecules, making selections, identifying h-bonds etc. I wanted a way to dump out a molecule object from my library, and display it in PyMOL with all of its associated selections and bonds. So basically what I do is: 1. Write out a PDB file for my molecule 2. Write out a short Python program which creates PyMOL selections corresponding to my selections, by way of atom indices. Basically this works by grabbing the 'nth' atom from the chempy model, then composing a selection string which is passed to the cmd.select function. Missing out some detail, here is the bare bones: # Function 1: get a PyMOL selection string from a ChemPy atom def atom_sel(a,obj_name): return "/" + obj_name + "//" + a.chain + "/" + a.resi + "/" + a.name # Function 2: create a PyMOL selection from an array of atom indices def make_atom_sel(sel_name,array,model,obj_name): sel_str = "" for i in range(len(array)): sel = atom_sel(model.atom[array[i]],obj_name) sel_str += sel if(i < len(array)-1): sel_str += " or " cmd.select(sel_name, sel_str) # Similar functions exist for creating an h-bond between ith and jth # atoms So to put it all together, given these two functions, the program I execute in order to reconstitute my molecule in PyMOL looks like m = io.pdb.fromFile("/tmp/x.pdb") cmd.load_object(8,m,"protein") make_atom_sel("my_sel", [0,2,5,8,18,22], m, "protein") Gareth -- Gareth Stockwell European Bioinformatics Institute
[PyMOL] PyMOL tutorial
Dear PyMOL-ers, I have made a couple of PyMOL resources available on my website which may be of interest: 1. A tutorial, aimed at beginner to intermediate users (I wrote it to advertise PyMOL to my research group). This is browsable on the web, or downloadable as a PDF file. You can also download an archive (tar-gzip for Unix, or zipped for Windows) which contains some example scripts and the data files they require. 2. (Unix users only) A shell script which generates an MPEG movie, given a set of PyMOL-generated frames (i.e. PNG files). The MPEG is built using the Berkeley MPEG encoder. You can find both of them at http://www.ebi.ac.uk/~gareth/work/pymol Gareth -- --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
Re: [PyMOL] Drawing dashed lines
Jason, I don't know Molscript, but I think the following commands will do what you want: select a, ///A/501/02 select b, ///B/229/N distance d, a, b This will give you a dashed line object d which is labelled with the distance between the two atoms 'a' and 'b' - you can get rid of the label using hide labels, d btw, if you want to ray-trace the image, I find the dashes come out a bit fat - so I tend to use set dash_gap, 0.5 set dash_radius, 0.1 before the 'ray' command. Gareth On Fri, 2003-05-09 at 02:21, jkyano wrote: > Hi All, > > I was wondering if it is possible to draw dashed lines connecting two > residues > similar to the following molscript commands: > > set linedash 5.0; > set linewidth 6; > set linecolour red; > set bonddistance 5.0; > > bonds require atom O2 and in residue A501 require atom N and in residue B229; > > > I know that you can draw hydrogen bonds, but I want show dashed lines between > two sets residues that are roughly 6.5 and 13 angstroms away from each other. > > > Thanks, > > > Jason > > *** > Jason Yano, Ph.D. > The Scripps Research Institute > 10550 N. Torrey pines Rd. > La Jolla, CA 92037 > mail 255 > Tel.: (858) 784-7919 > Fax: (858) 784-7978 > jky...@scripps.edu > *** > > > > > --- > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara > The only event dedicated to issues related to Linux enterprise solutions > www.enterpriselinuxforum.com > > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
Re: [PyMOL] coloring surfaces
Rajarshi, With a bit of work you could add such a feature to the script, by using compiled graphics objects (CGOs). The PyMOL documentation explains how to use them. Gareth On Tue, 2003-04-01 at 21:42, Rajarshi Guha wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > using the color_b.py script its possible to color the surface of a > molecule. > Is there anyway that an indicator of the spectrum (such as a colored vertical > bar showing the colors corresponding for the smallest B value to the highest > B value) > > Thanks, > > - -- > - --- > Rajarshi Guha <http://jijo.cjb.net> > GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE > - --- > A man is known by the company he organizes. > -- Ambrose Bierce > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.7 (GNU/Linux) > > iD8DBQE+ifm6G7nmNJuHVu4RAitoAJ0W/z0veZH1kFaqT4bHjUmeXZVgjgCfW/a9 > 89MzVJBPsepucUIgSSJdlXg= > =/zYa > -END PGP SIGNATURE- > > > > --- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- - Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel (+44) 01223 492548 http://www.ebi.ac.uk/~gareth
Re: [PyMOL] black shadows and wipe-outs
Denis, Are you sure this is not just an effect of the clipping planes? Try a command such as clip slab, 100 to view a slab of 100A in the Z-axis - this should make all your spheres visible. Gareth On Mon, 2003-03-10 at 06:55, Denis Shcherbakov wrote: > > Hello all, > > Has anyone else experienced "blacking out" of parts of your stereo model > as you turn it to certain angles? For me, if I have a box full of spheres > and I start rotating it about, I get a few spheres "closest" to the viewer > getting blackened out. I think it's a shadowing and/or lighting issue. I > tried using two-sided light source, and that makes the blackness go away, > but the spheres that were otherwise blackened simply disappear from view! > > Warren said this should be fixed in an upcoming release, but has anyone > devised a work-around yet? Has anyone run into this problem? If so, how > have you been dealing with it? > > Appreciated > Denis > > > > --- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- - Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel (+44) 01223 492548 http://www.ebi.ac.uk/~gareth
Re: [PyMOL] Inter-PyMOL communication?
Nice idea - the rotational code itself would be fairly easy to implement, I think - then it would just be a matter of capturing mouse events and dispatching them to *this* rotation routine instead of the standard one (with a switch to toggle this mode on/off). On Thu, 2003-02-13 at 09:55, Jules Jacobsen wrote: > Wouldn't an easier way to do this be to have a command whereby you tell > pymol to rotate/translate all seperate molecules relative to their own > centres rather than the group or last loaded molecule centre as it does > currently? That way you only need one pymol open and wouldn't need to have > a master/slave setup. > > Jules > > On 13 Feb 2003, Gareth Stockwell wrote: > > > > > Is there any way to have more than one PyMOL session respond to the same > > user input? What I would like to do is the following: > > > > Have several PyMOL windows open side-by-side, each containing a > > different molecule. Then, when I click and drag in any of these windows > > (to effect a rotation/translation), ALL of them undergo the same > > transformation. The reason I want to do this is to compare the > > structures of several related proteins, which have been superimposed and > > are therefore in the same coordinate frame. At the moment, the only way > > I can do this is by loading them all into the same PyMOL session, > > rotating the view, then toggling each object on/off using the menu at > > the right-hand side, but this is both fiddly and does not permit easy > > comparison of many structures. > > > > So, Warren, would it be very complicated to establish some kind of IPC > > commumication between PyMOL sessions, where one was designated the > > 'master', and all commands executed on that session were piped to each > > of its 'slaves'? > > > > Gareth > > > > -- > > - > > Gareth Stockwell > > EMBL - European Bioinformatics Institute > > Wellcome Trust Genome Campus > > Hinxton > > Cambridge CB10 1SD > > gar...@ebi.ac.uk > > Tel (+44) 01223 492548 > > http://www.ebi.ac.uk/~gareth > > > > > > > > --- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > ___ > > PyMOL-users mailing list > > PyMOL-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > > -- - Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel (+44) 01223 492548 http://www.ebi.ac.uk/~gareth
[PyMOL] Inter-PyMOL communication?
Is there any way to have more than one PyMOL session respond to the same user input? What I would like to do is the following: Have several PyMOL windows open side-by-side, each containing a different molecule. Then, when I click and drag in any of these windows (to effect a rotation/translation), ALL of them undergo the same transformation. The reason I want to do this is to compare the structures of several related proteins, which have been superimposed and are therefore in the same coordinate frame. At the moment, the only way I can do this is by loading them all into the same PyMOL session, rotating the view, then toggling each object on/off using the menu at the right-hand side, but this is both fiddly and does not permit easy comparison of many structures. So, Warren, would it be very complicated to establish some kind of IPC commumication between PyMOL sessions, where one was designated the 'master', and all commands executed on that session were piped to each of its 'slaves'? Gareth -- --------- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel (+44) 01223 492548 http://www.ebi.ac.uk/~gareth
Re: [PyMOL] Using DSSP output
David, Have a look at the rTools package on Kristian Rother's page http://www.rubor.de/bioinf/ (I haven't used this myself, and it appears to have some external dependencies - notably Java, but it may be what you want) Gareth On Tue, 2002-09-10 at 14:11, David Guerra Aragao wrote: > Hello to all, > > I would like to use DSSP secondary structure assignments but I don't > know how to incorporate DSSP output in pdb format for PyMOL. > > I have found plenty of information arround but none about this issue. > > Can i get some help ? > > David > > -- > David Aragao > Linux User nº 237333 on http://counter.li.org/ > "You will pay for your sins. If you have already paid, please disregard > this message." > > > > > > --- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users -- - Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548Personal homepage: http://www.ebi.ac.uk/~gareth
Re: [PyMOL] Reading CCP4 maps
One other thing - PyMOL has a flag which determines whether the density values will be normalised - if this flag is not set, then isomesh mesh_name, map_name, 1 will contour the map at 1-sigma; to contour at an absolute value, you must do set normalize_ccp4_maps=0 BEFORE loading the map. If the flag is set, the program will print some information about the calculated mean and std deviation when you load a map. Commonly-used settings like this can be put in your ~/.pymolrc file (at least on a UNIX system), so that they are executed whenever PyMOL starts up. Gareth --- Gareth Stockwell EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
[PyMOL] Transparent spheres
Dear PyMOL users, Does anybody know of a way to either i) Change the radius of a specified atom, or ii) Make a CGO sphere semi-transparent? Basically what I want is to be able to place a semi-transparent sphere of a given radius, at a given point in space. Thanks in anticipation for any suggestions, Gareth -- - Gareth Stockwell PhD student, Thornton Group EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548Personal homepage: http://www.ebi.ac.uk/~gareth
[PyMOL] Colour by object
Dear PyMOL-ers, Apologies for not thinking about this question a bit more before mailing the list - I have now written a script (attached) which does the job. > Is there a simple way to colour each object currently loaded, with a > different colour (in the same way that you can colour each chain in a > molecule differently)? This would be really useful in visualising a > set of superposed structures. The script is also available at http://www.ebi.ac.uk/~gareth/misc Gareth -- --------- Gareth Stockwell PhD student, Thornton Group EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548Personal homepage: http://www.ebi.ac.uk/~gareth # # # Colour by object # # def color_obj(rainbow=0): """ AUTHOR Gareth Stockwell USAGE color_obj(rainbow=0) This function colours each object currently in the PyMOL heirarchy with a different colour. Colours used are either the 22 named colours used by PyMOL (in which case the 23rd object, if it exists, gets the same colour as the first), or are the colours of the rainbow """ # Process arguments rainbow = int(rainbow) # Get names of all PyMOL objects obj_list = cmd.get_names('models') if rainbow: print "\nColouring objects as rainbow\n" nobj = len(obj_list) # Create colours starting at blue(240) to red(0), using intervals # of 240/(nobj-1) for j in range(nobj): hsv = (240-j*240/(nobj-1), 1, 1) # Convert to RGB rgb = hsv_to_rgb(hsv) # Define the new colour cmd.set_color("col" + str(j), rgb) print obj_list[j], rgb # Colour the object cmd.color("col" + str(j), obj_list[j]) else: print "\nColouring objects using PyMOL defined colours\n" # List of available colours colours = ['red', 'green', 'blue', 'yellow', 'violet', 'cyan',\ 'salmon', 'lime', 'pink', 'slate', 'magenta', 'orange', 'marine', \ 'olive', 'purple', 'teal', 'forest', 'firebrick', 'chocolate',\ 'wheat', 'white', 'grey' ] ncolours = len(colours) # Loop over objects i = 0 for obj in obj_list: print " ", obj, colours[i] cmd.color(colours[i], obj) i = i+1 if(i == ncolours): i = 0 # HSV to RGB routine taken from Robert L. Campbell's color_b.py script # See http://biophysics.med.jhmi.edu/rlc/work/pymol/ # Original algorithm from: http://www.cs.rit.edu/~ncs/color/t_convert.html def hsv_to_rgb(hsv): h = float(hsv[0]) s = float(hsv[1]) v = float(hsv[2]) if( s == 0 ) : #achromatic (grey) r = g = b = v else: # sector 0 to 5 h = h/60. i = int(h) f = h - i # factorial part of h #print h,i,f p = v * ( 1 - s ) q = v * ( 1 - s * f ) t = v * ( 1 - s * ( 1 - f ) ) if i == 0: (r,g,b) = (v,t,p) elif i == 1: (r,g,b) = (q,v,p) elif i == 2: (r,g,b) = (p,v,t) elif i == 3: (r,g,b) = (p,q,v) elif i == 4: (r,g,b) = (t,p,v) elif i == 5: (r,g,b) = (v,p,q) else: (r,g,b) = (v,v,v) print "error, i not equal 1-5" return [r,g,b] # Add color_obj to the PyMOL command list cmd.extend("color_obj",color_obj)
[PyMOL] Colour by object
Is there a simple way to colour each object currently loaded, with a different colour (in the same way that you can colour each chain in a molecule differently)? This would be really useful in visualising a set of superposed structures. Gareth -- - Gareth Stockwell PhD student, Thornton Group EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548Personal homepage: http://www.ebi.ac.uk/~gareth
Re: [PyMOL] Re: fitting residues
Jason, I think the solution is to create a copy of the object, then render one copy as cartoon, and the other as sticks. The colouring will then be independent. By the way, does anyone kwow if it is possible to invoke the command window after startup? I normally launch PyMOL with -x, but sometimes later need the command window, and have to restart the program. Gareth On Thu, 25 Jul 2002, Jason Maynes wrote: > Hello: > > I am trying to color residues off a cartoon loop and want to color the > sticks version of the residue down to the Ca, but not the Ca itself > (ie. the residue and the cartoon are different colors). The > problem is that if I color the Ca, then that section of the cartoon also > gets colored. If I don't color the Ca, then the cartoon loop color comes > halfway up the bond to the Cbeta. Does anybody have any suggestions, that > is if I haven't made the question so convoluted you can understand it. > > Thanks in advance. > > Cheers, > JTM > > * > Jason Thomas Maynes > MD/PhD Program > Faculty of Medicine > University of Alberta > ja...@biochem.ualberta.ca > * > > > > --- > This sf.net email is sponsored by: Jabber - The world's fastest growing > real-time communications platform! Don't just IM. Build it in! > http://www.jabber.com/osdn/xim > ___ > PyMOL-users mailing list > PyMOL-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pymol-users > --- Gareth Stockwell PhD student, Thornton Group EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
[PyMOL] Object-specific transparency
I would like to make one isosurface transparent, and leave another solid (or set different levels of transparency for each). I know object-specific transparency works for molecule objects, e.g. load molA.pdb, A load molB.pdb, B show surface, A show surface, B set transparency, 0.5, A (object B remains solidly-rendered) But if I try the same for isosurfaces, e.g. load mapA.ccp4, mapA load mapB.ccp4, mapB isosurface surfA, A, 1 isosurface surfB, B, 1 set transparency, 0.5, surfA ...the transparency of BOTH isosurfaces changes, as reflected by the messages in the console: PyMOL>set transparency, 0.5, surfA Setting: transparency set to 0.5 in object 'mapA'. Setting: transparency set to 0.5 in object 'mapB'. Setting: transparency set to 0.5 in object 'surfA'. Setting: transparency set to 0.5 in object 'surfB'. Is there a way to make isosurface objects behave in the same way as the molecule objects? Gareth -- ----- Gareth Stockwell PhD student, Thornton Group EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548Personal homepage: http://www.ebi.ac.uk/~gareth
[PyMOL] Suggestions
First let me say that PyMol is the most useful and powerful open-source software I have come across. I am running the 0.78 version, installed from RPM onto a RedHat Linux 7.3 system with an nVidia Vanta graphics card. I have a few comments: 1. There appears to be a bug in the isomesh routine (see comment submitted to the Sourceforge bugtracker). I haven't tried the latest CVS version though. 2. Some suggestions for improvements to PyMol: a) Automatic creation of sub-objects for protein structures After loading in a structure (e.g. a PDB protein file), would it be possible to have the option of automatically breaking it into an object for each chain, and one for each ligand present in the structure, so that the user could quickly click on/off the required components? (This could be extended into a heirarchical tree-structure, in which chains, residues, atoms would all be available via the object list on the control panel) b) Graphical summary of density distribution for map data A feature which popped-up a histogram of density values, which could alter an isomesh contour value by clicking on it, would be extremely useful. Also, is there a way to have a '.pymolrc' file containing commands which are run whenever PyMol starts? Please keep up the great work! Gareth
[PyMOL] Linux install problem
I am having a problem installing PyMol 0.80 on my (Redhat 7.1) Linux box. I already have Tcl, Tk, Python 2.1, zlib and libpng so I just made libglut from the ext-0.79 package. cd $PYMOL_PATH/ext ./build.com glut-linux The GL libraries are in strange places on my system, so I made the following links: ln -s /usr/lib/libGL.so.1 $PYMOL_PATH/ext/lib/libGL.so ln -s /usr/lib/libGLU.so.1 $PYMOL_PATH/ext/lib/libGLU.so ln -s /usr/X11R6/lib/modules/extensions/libGLcore.a \ $PYMOL_PATH/ext/lib/libGLcore.a Then I built the PyMol program cd $PYMOL_PATH/pymol vi Rules.make make The 'make' succeeds, but when I execute pymol.com, I get Traceback (most recent call last): File "/ebi/research/thornton/ligands/gareth/src/pymol-linux/pymol/modules/launch_pymol.py", line 19, in ? import pymol File "/ebi/research/thornton/ligands/gareth/src/pymol-linux/pymol/modules/pymol/__init__.py", line 137, in ? import _cmd ImportError: /usr/X11R6/lib/libICE.so.6: shared object not open This shared object file exists - is there any reason why this error should occur? Gareth P.S. I don't have root access on this system ------- Gareth Stockwell PhD student, Thornton Group EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth
[PyMOL] Fast rendering option?
Is there a 'fast rendering' option in PyMol, as found in other molecular graphics suites? By this I mean that, when using a 'slow-rendering' view such as spheres, is there a way to make PyMol switch to 'lines only' when the mouse button is depressed, so that rotations are fast, then re-render the spheres when motion stops? Gareth ------- Gareth Stockwell PhD student, Thornton Group EMBL - European Bioinformatics Institute Wellcome Trust Genome Campus Hinxton Cambridge CB10 1SD gar...@ebi.ac.uk Tel 01223 492548 http://www.ebi.ac.uk/~gareth