Re: [PyMOL] Selections don't work on structures loaded using, 'fetch' command
Thank you for prompt response. Now I recall that I've seen the mention of it in the release notes for 1.8, but paid no attention to it as I had no intent to install 1.8 so soon anyway being wary of probable bugs. Probably earlier I just pedantically typed in the identifiers in capital letters, but yesterday was to tired to bother and got this unpleasant surprise. I see that current versions already have it returned to work the old way. Maybe it would be nice if all wiki pages with examples affected by case-sensitiveness get some kind of a note about it. 01.03.2016 03:54, pymol-users-requ...@lists.sourceforge.net пишет: > Message: 7 > Date: Mon, 29 Feb 2016 08:35:13 -0500 > From: Thomas Holder<thomas.hol...@schrodinger.com> > Subject: Re: [PyMOL] Selections don't work on structures loaded using > 'fetch' command > To: Timofey Tyugashev<tyugas...@niboch.nsc.ru> > Cc:pymol-users@lists.sourceforge.net > Message-ID:<73c4c9d6-c6b2-44b9-b508-f7c84b592...@schrodinger.com> > Content-Type: text/plain; charset=utf-8 > > Hi Timofey, > > Seehttp://pymolwiki.org/index.php/ignorea _case > > Note: The wiki page mentions 1.8.0.0 (official release), but the SVN repo had > the change since 1.7.7.1 (https://sourceforge.net/p/pymol/code/4123/ ). > > Cheers, >Thomas > > On 29 Feb 2016, at 06:23, Timofey Tyugashev<tyugas...@niboch.nsc.ru> wrote: > >> >Sorry, it's actually part false alarm and part a completely different >> >problem. >> > >> >For false alarm:Structure retrieved by 'fetch' simply lacked residue >> >numbered 10, why my own file was already repaired and had it fine. >> > >> >For different problem: For some reason it turns out that 'select' is >> >case-sensitive and it's not actually mentioned anywhere on the wiki, so >> >selectors like 'resn' and 'name' simply silently failed. >> >Is there a way to disable it? >> > >> >29.02.2016 17:10, Timofey Tyugashev ?: >>> >>If I load my own pdb file and issue a simple select command like >>> >>'select resi 10' it works fine, producing something like 'selection >>> >>"sele" defined with 6 atoms'. >>> >>However if I load the same structure using fetch command selections >>> >>stop working, 'select resi 10' results in 'selection "sele" defined >>> >>with 0 atoms'. >>> >>System is Linux. PyMOL is 1.7.7.2 version from svn. > -- Thomas Holder PyMOL Principal Developer Schr?dinger, Inc. -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ 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] Selections don't work on structures loaded using 'fetch' command
Hi Timofey, See http://pymolwiki.org/index.php/ignore_case Note: The wiki page mentions 1.8.0.0 (official release), but the SVN repo had the change since 1.7.7.1 (https://sourceforge.net/p/pymol/code/4123/ ). Cheers, Thomas On 29 Feb 2016, at 06:23, Timofey Tyugashevwrote: > Sorry, it's actually part false alarm and part a completely different > problem. > > For false alarm:Structure retrieved by 'fetch' simply lacked residue > numbered 10, why my own file was already repaired and had it fine. > > For different problem: For some reason it turns out that 'select' is > case-sensitive and it's not actually mentioned anywhere on the wiki, so > selectors like 'resn' and 'name' simply silently failed. > Is there a way to disable it? > > 29.02.2016 17:10, Timofey Tyugashev пишет: >> If I load my own pdb file and issue a simple select command like >> 'select resi 10' it works fine, producing something like 'selection >> "sele" defined with 6 atoms'. >> However if I load the same structure using fetch command selections >> stop working, 'select resi 10' results in 'selection "sele" defined >> with 0 atoms'. >> System is Linux. PyMOL is 1.7.7.2 version from svn. -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ 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] Selections don't work on structures loaded using 'fetch' command
Sorry, it's actually part false alarm and part a completely different problem. For false alarm:Structure retrieved by 'fetch' simply lacked residue numbered 10, why my own file was already repaired and had it fine. For different problem: For some reason it turns out that 'select' is case-sensitive and it's not actually mentioned anywhere on the wiki, so selectors like 'resn' and 'name' simply silently failed. Is there a way to disable it? 29.02.2016 17:10, Timofey Tyugashev пишет: > If I load my own pdb file and issue a simple select command like > 'select resi 10' it works fine, producing something like 'selection > "sele" defined with 6 atoms'. > However if I load the same structure using fetch command selections > stop working, 'select resi 10' results in 'selection "sele" defined > with 0 atoms'. > System is Linux. PyMOL is 1.7.7.2 version from svn. -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140 ___ 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] Selections
For example, I found a PDB online called 'pope.pdb' (a cool lipid bilayer; http://moose.bio.ucalgary.ca/Downloads/) and simply wanted to select all the hydrophobic tails and hydrophilic heads so that I may apply different attributes to each. If I need to select the tails, which in the PDB are labeled from C10 (or so) to C50 depending on the molecule, can I use something like c10-c50 (experience tells me no) or must I do c10+c11+c12...c50? I don't know an easy way to do this .. like almost does what you want, but not quite. You could do something like select sol, resn sol select heads, name N4+C5+C6+O7+O9+O10+O11+C12+C13+O14+C15+O16+C32+O33+C34+O35+P8+H1+H2+H3 select tails, not sol and not heads Or .. even easier .. drop this in a file called something like select_names.py --- #!/usr/bin/env python from pymol import cmd,stored def select_names(newSelectionName,selection): Makes a new selection called newSelectionName comprised of everything that has the same atom name as something in selection. stored.selected_names = [] cmd.iterate(selection,'stored.selected_names.append(name)') cmd.select(newSelectionName,'name %s'%'+'.join(stored.selected_names)) cmd.extend('select_names',select_names) --- and type run selected_names.py from within PyMOL. Now use the mouse to select one of the heads (I use shift+lb to put things into the selection (lb). Now type select_names heads, lb and you'll have a selection called heads that has all of the heads. Maybe someone who knows more about selections will know a better way, though. So, it comes down to: do you prefer the macro method or standard; and, do you have any hints or tips for more accurate or powerful selections? If you're going to be using PyMOL a lot, it's definately worth your time to learn how to write Python scripts. I'd also recommend looking through the PyMOL source itself. I don't have anything much to say about selections, though .. I've always been quite happy with simple PyMOL selections. -michael As an example, how could I select just the tails or just the heads in the aforementioned pope.pdb file? Thanks. -- Jason Vertrees BSCB Graduate Student @ UTMB, Galveston javer...@utmb.edu :: http://www.bscb.utmb.edu --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users
Re: [PyMOL] Selections
Hi Jason, * Jason Vertrees javer...@utmb.edu [2004-04-14 22:55] wrote: Master Users, I'm a bit new to PyMol and still trying to master selections. I've read the documentation and played with quite a few macromolecules now and still have some problems with selections. For example, I found a PDB online called 'pope.pdb' (a cool lipid bilayer; http://moose.bio.ucalgary.ca/Downloads/) and simply wanted to select all the hydrophobic tails and hydrophilic heads so that I may apply different attributes to each. If I need to select the tails, which in the PDB are labeled from C10 (or so) to C50 depending on the molecule, can I use something like c10-c50 (experience tells me no) or must I do c10+c11+c12...c50? The latter is correct, unfortunately. You can certainly do a selection like: select tails1, r. pop n. c17+c18+c19+c20+c21+c22+c23+c24+c25+c26+c27+c28+c29+c30+c31+ca1+ca2+c36 +c37+c38+c39+c40+c41+c42+c43+c44+c45+c46+c47+c48+c49+c50 (where I've wrapped the line) or you could do the shorter selection first: select heads, r. pop n. c5+c6+c12+c13+c15+c32+c34+n4+o7+o9+o10+o11+o14+o16+o33+o35+p8+h1+h2+h3 and then do: select tails2, r. pop ! heads If you don't want to go to the trouble of picking every atom to see its name, just select one atom in the residue (ctrl-middle-click) and show the atom name labels for the residue (use the pkresi selection in the right menu and labels are under L) So, it comes down to: do you prefer the macro method or standard; and, do you have any hints or tips for more accurate or powerful selections? As an example, how could I select just the tails or just the heads in the aforementioned pope.pdb file? I found clicking on each atom to add them to the lb selection as Michael suggests less simple, but then I type quickly! Cheers, Rob -- Robert L. Campbell, Ph.D. r...@post.queensu.ca Senior Research Associatephone: 613-533-6821 Dept. of Biochemistry, Queen's University, fax: 613-533-2497 Kingston, ON K7L 3N6 Canada http://adelie.biochem.queensu.ca/~rlc PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2
RE: [PyMOL] Selections
must I do c10+c11+c12...c50? Yes, unfortunately. However, this long selection: select tails1, r. pop n. c17+c18+c19+c20+c21+c22+c23+c24+c25+c26+c27+c28+c29+c30+c31+ca 1+ca2+c36 +c37+c38+c39+c40+c41+c42+c43+c44+c45+c46+c47+c48+c49+c50 Can be replaced with some Python code in your script: my_list = map( lambda x: c%2d%x, range(10,51) ) my_str = string.join( my_list, '+' ) cmd.select( tails1, resn pop name + my_str ) show lines, tails1 Which allows you to adjust the range manually by changing the values in the range call. FYI: print my_str gives c10+c11+c12+c13+c14+c15+c16+c17+c18+c19+c20+c21+c22+c23+c24+c25+c26+c27+c28+ c29+c30+c31+c32+c33+c34+c35+c36+c37+c38+c39+c40+c41+c42+c43+c44+c45+c46+c47+ c48+c49+c50 Cheers, warren -Original Message- From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Robert Campbell Sent: Thursday, April 15, 2004 8:39 AM To: PyMol Users List Subject: Re: [PyMOL] Selections Hi Jason, * Jason Vertrees javer...@utmb.edu [2004-04-14 22:55] wrote: Master Users, I'm a bit new to PyMol and still trying to master selections. I've read the documentation and played with quite a few macromolecules now and still have some problems with selections. For example, I found a PDB online called 'pope.pdb' (a cool lipid bilayer; http://moose.bio.ucalgary.ca/Downloads/) and simply wanted to select all the hydrophobic tails and hydrophilic heads so that I may apply different attributes to each. If I need to select the tails, which in the PDB are labeled from C10 (or so) to C50 depending on the molecule, can I use something like c10-c50 (experience tells me no) or must I do c10+c11+c12...c50? The latter is correct, unfortunately. You can certainly do a selection like: select tails1, r. pop n. c17+c18+c19+c20+c21+c22+c23+c24+c25+c26+c27+c28+c29+c30+c31+ca 1+ca2+c36 +c37+c38+c39+c40+c41+c42+c43+c44+c45+c46+c47+c48+c49+c50 (where I've wrapped the line) or you could do the shorter selection first: select heads, r. pop n. c5+c6+c12+c13+c15+c32+c34+n4+o7+o9+o10+o11+o14+o16+o33+o35+p8+h1+h2+h3 and then do: select tails2, r. pop ! heads If you don't want to go to the trouble of picking every atom to see its name, just select one atom in the residue (ctrl-middle-click) and show the atom name labels for the residue (use the pkresi selection in the right menu and labels are under L) So, it comes down to: do you prefer the macro method or standard; and, do you have any hints or tips for more accurate or powerful selections? As an example, how could I select just the tails or just the heads in the aforementioned pope.pdb file? I found clicking on each atom to add them to the lb selection as Michael suggests less simple, but then I type quickly! Cheers, Rob -- Robert L. Campbell, Ph.D. r...@post.queensu.ca Senior Research Associatephone: 613-533-6821 Dept. of Biochemistry, Queen's University, fax: 613-533-2497 Kingston, ON K7L 3N6 Canada http://adelie.biochem.queensu.ca/~rlc PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2 --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users