[PyMOL] Putting a protein molecule into a grid and traversing through the grid
how do i put a protein molecule inside a cube with x-axis spanning till the largest x-coordinate, y-axis spanning till the largest y-coordinate, and z-axis spanning till the largest z-coordinate? Once i do this, can i divide the larger cube(i.e. the one holding the entire protein) into smaller ones of lesser dimensions? Say, 5A x 5A x 5A? Once i generate these smaller cubes, is there a way via pymol, by which i can navigate through the protein molecule, (smaller)cube by (smaller)cube? As in, can pymol be used to tell me which residues are lying in which (smaller) cube and so on? Can all this be done in a single pymol window/script? please let me know. Thanks -Anasuya -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Pymol: Cartoon representation for .pdb file with multible entries
Hi Robert, this solves exactly my problem and gives me the pictures I wanted. Thank you very much for the quick answer! Cheers, Alexander Am Mittwoch, den 26.10.2011, 09:48 -0400 schrieb Robert Campbell: > Hi Alexander, > > On Wed, 2011-10-26 12:53 EDT, Alexander Schulz > wrote: > > > Hi Thomas, > > > > thank you very much for the answer, I'm beginning to understand the > > actual problem now. > > > > dss state=1 > > helps, but it changes the problem: I would like to see the secondary > > structure that corresponds to the single snapshot. When I use dss > > state=1, I just see the secondary structure of the first snapshot in all > > snapshots. > > > > Is there a way to calculate the secondary structure for each individual > > snapshot stored in this single .pdb file? > > Yes, simply load the pdb file with the "discrete=1" flag: > > load md_file.pdb, discrete=1 > dss md_file > > Setting the "discrete" flag causes PyMOL to store more information > (B-factors, secondary structure) with each atom of each state -- so it can > also be noticeably slower to load and uses more memory. > > Cheers, > Rob > -- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Putting a protein molecule into a grid and traversing through the grid
Hi Anasuya, > how do i put a protein molecule inside a cube with x-axis spanning till the > largest x-coordinate, y-axis spanning till the largest y-coordinate, and > z-axis > spanning till the largest z-coordinate? > > Once i do this, can i divide the larger cube(i.e. the one holding the entire > protein) into smaller ones of lesser dimensions? Say, 5A x 5A x 5A? I'm not aware of any straightforward solution for this. You could write a python script that creates selections for each (sub)cube, but I guess it will be a quite complex script. Have a look at http://pymolwiki.org/index.php/SelInside which should cover all necessary API functions. > Once i generate these smaller cubes, is there a way via pymol, by which i can > navigate through the protein molecule, (smaller)cube by (smaller)cube? > As in, can pymol be used to tell me which residues are lying in which > (smaller) > cube and so on? If you have selections for each cube, try this to lookup cubes that contain atoms of residue number 10: print cmd.get_names('public_selections', 0, 'resi 10') > Can all this be done in a single pymol window/script? > please let me know. > > Thanks > -Anasuya Cheers, Thomas -- Thomas Holder MPI for Developmental Biology -- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Putting a protein molecule into a grid and traversing through the grid
Hey :) Does the script pasted below do what you want? It does not move the molecule(s), but it returns a list of occupied bins with the ids, names and chains of residues in it. Hope it helps, Tsjerk ### from pymol import cmd def _bin(x,d): d = float(d) a,b,n = min(x),(1-1e-16)/(max(x)-min(x)),int((max(x)-min(x))/d+0.5) return [ int(b*(i-a)*n)*d for i in x ] def bin(sele="all",d=5): m = cmd.get_model(sele) b = zip(*[ _bin(i,5) for i in zip(*m.get_coord_list()) ]) print b d = dict() for i,j in zip(b,m.atom): d[i] = d.get(i,[]) + [(j.resi, j.resn, j.chain)] return d.items() On Thu, Oct 27, 2011 at 4:25 PM, Thomas Holder wrote: > Hi Anasuya, > >> how do i put a protein molecule inside a cube with x-axis spanning till the >> largest x-coordinate, y-axis spanning till the largest y-coordinate, and >> z-axis >> spanning till the largest z-coordinate? >> >> Once i do this, can i divide the larger cube(i.e. the one holding the entire >> protein) into smaller ones of lesser dimensions? Say, 5A x 5A x 5A? > > I'm not aware of any straightforward solution for this. You could write > a python script that creates selections for each (sub)cube, but I guess > it will be a quite complex script. Have a look at > http://pymolwiki.org/index.php/SelInside which should cover all > necessary API functions. > >> Once i generate these smaller cubes, is there a way via pymol, by which i can >> navigate through the protein molecule, (smaller)cube by (smaller)cube? >> As in, can pymol be used to tell me which residues are lying in which >> (smaller) >> cube and so on? > > If you have selections for each cube, try this to lookup cubes that > contain atoms of residue number 10: > > print cmd.get_names('public_selections', 0, 'resi 10') > >> Can all this be done in a single pymol window/script? >> please let me know. >> >> Thanks >> -Anasuya > > Cheers, > Thomas > > -- > Thomas Holder > MPI for Developmental Biology > > -- > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > ___ > PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net > -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group * Groningen Institute for Biomolecular Research and Biotechnology * Zernike Institute for Advanced Materials University of Groningen The Netherlands -- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Re: [PyMOL] Putting a protein molecule into a grid and traversing through the grid
Right, forgot to mention that the bin is given as the coordinates of the lower corner, relative to the minimal coordinates. Cheers, Tsjerk On Thu, Oct 27, 2011 at 6:02 PM, Tsjerk Wassenaar wrote: > Hey :) > > Does the script pasted below do what you want? It does not move the > molecule(s), but it returns a list of occupied bins with the ids, > names and chains of residues in it. > > Hope it helps, > > Tsjerk > > ### > > from pymol import cmd > > def _bin(x,d): > d = float(d) > a,b,n = min(x),(1-1e-16)/(max(x)-min(x)),int((max(x)-min(x))/d+0.5) > return [ int(b*(i-a)*n)*d for i in x ] > > def bin(sele="all",d=5): > m = cmd.get_model(sele) > b = zip(*[ _bin(i,5) for i in zip(*m.get_coord_list()) ]) > print b > d = dict() > for i,j in zip(b,m.atom): > d[i] = d.get(i,[]) + [(j.resi, j.resn, j.chain)] > return d.items() > > > > > On Thu, Oct 27, 2011 at 4:25 PM, Thomas Holder > wrote: >> Hi Anasuya, >> >>> how do i put a protein molecule inside a cube with x-axis spanning till the >>> largest x-coordinate, y-axis spanning till the largest y-coordinate, and >>> z-axis >>> spanning till the largest z-coordinate? >>> >>> Once i do this, can i divide the larger cube(i.e. the one holding the entire >>> protein) into smaller ones of lesser dimensions? Say, 5A x 5A x 5A? >> >> I'm not aware of any straightforward solution for this. You could write >> a python script that creates selections for each (sub)cube, but I guess >> it will be a quite complex script. Have a look at >> http://pymolwiki.org/index.php/SelInside which should cover all >> necessary API functions. >> >>> Once i generate these smaller cubes, is there a way via pymol, by which i >>> can >>> navigate through the protein molecule, (smaller)cube by (smaller)cube? >>> As in, can pymol be used to tell me which residues are lying in which >>> (smaller) >>> cube and so on? >> >> If you have selections for each cube, try this to lookup cubes that >> contain atoms of residue number 10: >> >> print cmd.get_names('public_selections', 0, 'resi 10') >> >>> Can all this be done in a single pymol window/script? >>> please let me know. >>> >>> Thanks >>> -Anasuya >> >> Cheers, >> Thomas >> >> -- >> Thomas Holder >> MPI for Developmental Biology >> >> -- >> The demand for IT networking professionals continues to grow, and the >> demand for specialized networking skills is growing even more rapidly. >> Take a complimentary Learning@Cisco Self-Assessment and learn >> about Cisco certifications, training, and career opportunities. >> http://p.sf.net/sfu/cisco-dev2dev >> ___ >> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) >> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net >> > > > > -- > Tsjerk A. Wassenaar, Ph.D. > > post-doctoral researcher > Molecular Dynamics Group > * Groningen Institute for Biomolecular Research and Biotechnology > * Zernike Institute for Advanced Materials > University of Groningen > The Netherlands > -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group * Groningen Institute for Biomolecular Research and Biotechnology * Zernike Institute for Advanced Materials University of Groningen The Netherlands -- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev ___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
[PyMOL] Possible lighting bug
I have a problem with lighting (I think) CGO lines, e.g., lineSet = [ >LINEWIDTH, 0.30, >BEGIN, LINES, >VECTOR, 0.0, 0.0, 0.0, >VECTOR, 1.0, 1.0, 1.0, >END, >] > cmd.load_cgo( lineSet, 'LineSet' ) > For some reason, lines appear crisp from one angle, and strangely distorted from another angle (it's about 180deg for both -- think dark vs. light side of the moon: there is a crossover point). Here are links to two screen shots that show the problem: http://dl.dropbox.com/u/1209050/Screenshot-1.png http://dl.dropbox.com/u/1209050/Screenshot-2.png I have tried respositioning the lights (in the screenshot they're at the 6 faces of the box, marked by blue balls), but it doesn't change the viewing angle at all, only the shade of the lines. I have tried messing with the specular and spec_direct settings, but that only caused the lines to disappear completely (or rather, turn completely white). I also tried changing the ambiance settings, but that only changed the hue of the lines. I would really appreciate some help if anyone knows how to fix this. Thanks! Oh, and for reference, here's my system information: This Executable Build integrates and extends Open-Source PyMOL 1.3. > OpenGL graphics engine: > GL_VENDOR: NVIDIA Corporation > GL_RENDERER: GeForce 9500 GT/PCI/SSE2 > GL_VERSION: 3.2.0 NVIDIA 195.36.24 > Detected 8 CPU cores. Enabled multithreaded rendering. > I recently went pack to 1.3 as I was getting __very__ slow load times with 1.4. Cheers, Stephen - Stephen J. Bush sjb...@unc.edu PhD. Candidate | Bioinformatics & Computational Biology Tropsha Lab | UNC Chapel Hill -- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev___ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net