Re: [PyMOL] How to obtain a PyMOL selection within Python

2024-05-28 Thread Zhou, Yingyao via PyMOL-users
") out=[] def f(chain, resi): out.append((chain,resi)) myspace={'f':f} x.cmd.iterate("mysel and name CA", "f(chain, resi)", space=myspace) print(out) From: Zhou, Yingyao Sent: Tuesday, May 28, 2024 3:57 PM To: pymol-users@lists.sourceforge.net Subject: How to ob

[PyMOL] How to obtain a PyMOL selection within Python

2024-05-28 Thread Zhou, Yingyao via PyMOL-users
Hi, In the example code below, there is a selection object "myself" within PyMOL, I try to obtain the selected residues within Python. The "out=x.cmd.do" prints the selection to stdout, but the variable out remains None. What would be a good way to get the selection without going through disk

Re: [PyMOL] Selection of elements in object

2020-03-20 Thread Marko Hyvonen
Hello Henrik, your syntax is not correct: select name_for_selection, selected_parts https://pymolwiki.org/index.php/Select eg. select my_carbons, elem C & obj will select atoms that are element C AND in obj and calls this

[PyMOL] Selection of elements in object

2020-03-20 Thread Henrik Gotfredsen
Dear Pymol users Would anyone be able to help with the correct syntax used for selecting specific elements within an object? For example, I would like to be able to select only carbon or hydrogen. select elem c (works but selects all the carbons in my project) select elem c, obj (this selects

Re: [PyMOL] Selection algebra

2019-08-05 Thread Pedro Lacerda
Thank you, it was really what I asked! Em seg, 5 de ago de 2019 15:50, Christian "Cole" French < christian.fre...@schrodinger.com> escreveu: > select_with_filter allows you to make a selection as you would with the > select command, so it supports all selection algebra including byres, >

Re: [PyMOL] Selection algebra

2019-08-05 Thread Christian "Cole" French
select_with_filter allows you to make a selection as you would with the select command, so it supports all selection algebra including byres, chain, organic, etc. Here's a modified example from the wiki: # Select all residues within 5 Ang. of any organic small molecules whose x-coordinate is at

Re: [PyMOL] Selection algebra

2019-08-05 Thread Pedro Lacerda
Yes, one more question. How to use all other "functions", like byres, "chain A" or "organic"? Em seg, 5 de ago de 2019 12:36, Christian "Cole" French < christian.fre...@schrodinger.com> escreveu: > I see now. I updated the code at the link in my previous email to provide > behavior which should

Re: [PyMOL] Selection algebra

2019-08-05 Thread Christian "Cole" French
I see now. I updated the code at the link in my previous email to provide behavior which should allow you to do what you want. Here are your examples written using the command: select_with_filter sele, flag 8, lambda s: len(cmd.get_chains(s)) < 2 select_with_filter sele, flag 8, lambda s:

Re: [PyMOL] Selection algebra

2019-08-05 Thread Pedro Lacerda
I expressed myself wrong, I'm looking something like: select peplength < 15 and chain A Where peplength is an user defined function like: def peplength(atom): return compute_peplength(atom) I'm looking for the availability of user defined functions on selection expressions. How to? Em

Re: [PyMOL] Selection algebra

2019-08-02 Thread Christian "Cole" French
Edit: remove the cmd. part when running select_with_filter. (Since it's a custom command, it doesn't belong to the cmd module.) On Fri, Aug 2, 2019 at 2:41 PM Christian "Cole" French < christian.fre...@schrodinger.com> wrote: > Hi Pedro Lacerda, > > Here is a link to a script I wrote which adds

Re: [PyMOL] Selection algebra

2019-08-02 Thread Christian "Cole" French
Hi Pedro Lacerda, Here is a link to a script I wrote which adds a command which does what you ask: https://gist.github.com/ColeFrench/6f68fa5f04a67bb6234f10c25debb865. To use it, download the file to the directory where you run PyMOL from, then open PyMOL and run run select_with_filter.py. For

[PyMOL] `selection` argument in load_traj

2019-06-27 Thread brisvag
Hi Thomas, I see! Is it supposed to work with other formats too? Or at least, is it planned to be expanded? I'm trying to switch to PyMOL to view GROMACS `.xtc` trajectories, and this feature would be a great addition. Cheers, Lorenzo ___ PyMOL-users

Re: [PyMOL] `selection` argument in load_traj

2019-06-26 Thread Thomas Holder
Hi Lorenzo, You are correct, it's doing nothing for most trajectory formats. Only the implementation for AMBER .trj files uses it. It looks like it allows selecting a subset of atoms. Cheers, Thomas > On Jun 25, 2019, at 4:05 PM, Lorenzo Gaifas wrote: > > Dear pymol users, > > What is

Re: [PyMOL] selection of residues in protein using plane perpendicular to Z-axis

2019-04-23 Thread Divya Kaur Matta
: [PyMOL] selection of residues in protein using plane perpendicular to Z-axis Hi Divya - It's not entirely clear what you're trying to do from your description. Are you looking to select residues near the plane, or perhaps use the plane to divide residues into "of interest" and "

Re: [PyMOL] selection of residues in protein using plane perpendicular to Z-axis

2019-04-23 Thread Jared Sampson
Hi Divya -  It's not entirely clear what you're trying to do from your description.  Are you looking to select residues near the plane, or perhaps use the plane to divide residues into "of interest" and "not of interest"?  I think PyMOL can be useful here, but the approach will likely be

[PyMOL] selection of residues in protein using plane perpendicular to Z-axis

2019-04-23 Thread Divya Kaur Matta
Hi all, I wanted to ask how to select a plane (perpendicular to zaxis) so that I can select all residues of interest in a protein. Any help is greatly appreciated. Best Regards, Divya ___ PyMOL-users mailing list Archives:

Re: [PyMOL] Selection markers not shown

2017-07-04 Thread András Ferenc WACHA
Dear PyMOL Users, I have solved the problem by setting use_shaders to False. The problem is probably caused by the incomplete/outdated OpenGL implementation of the graphics driver/device. Best regards, Andras Wacha On 07/03/2017 11:08 AM, András Ferenc WACHA wrote: > Dear PyMOL Users, > > I'm

[PyMOL] Selection markers not shown

2017-07-03 Thread András Ferenc WACHA
Dear PyMOL Users, I'm using a Lenovo Thinkpad T410 notebook with the integrated intel video card. I found that when I select something, the little purple boxes are not shown. The operating system is Arch Linux, and I use the most recent packages available. Pymol v1.8.6.0 prints the following at

Re: [PyMOL] Selection of chains based on PDB header

2017-06-15 Thread John Berrisford
Dear Julian You can also try the PDB plugin which places each chain into a selection automatically for you. https://pymolwiki.org/index.php/PDB_plugin Regards John PDBe On 12/06/2017 17:10, Thomas Holder wrote: Hi Julian, A one-liner to create chain selections looks like this: for c

Re: [PyMOL] Selection of chains based on PDB header

2017-06-12 Thread Thomas Holder
Hi Julian, A one-liner to create chain selections looks like this: for c in cmd.get_chains(): cmd.select("chain_" + c, "chain " + c) PyMOL doesn't provide access to the PDB header fields. In principle PyMOL provides a way to access everything inside mmCIF files, see:

[PyMOL] Selection of chains based on PDB header

2017-06-12 Thread Julian Reitz
Dear all, I have a pdb-file with multiple chains (5N61). Is there an easy way to create selections for all the chains that are defined in the pdb-header (A to U) without doing it manually for every chain (select A, chain A)? Is it also possible to use the MOLECULE information from the header to

Re: [PyMOL] selection of residues

2017-03-22 Thread Thomas Holder
ly=1),chain,resi,resn) > > Thanks, > Abhinav > > -Original Message- > From: Thomas Holder [mailto:thomas.hol...@schrodinger.com] > Sent: Wednesday, March 22, 2017 1:15 PM > To: Kumar, Abhinav > Cc: pymol-users@lists.sourceforge.net > Subject: Re: [PyMOL] select

Re: [PyMOL] selection of residues

2017-03-22 Thread Kumar, Abhinav
(enabled_only=1),chain,resi,resn) Thanks, Abhinav -Original Message- From: Thomas Holder [mailto:thomas.hol...@schrodinger.com] Sent: Wednesday, March 22, 2017 1:15 PM To: Kumar, Abhinav Cc: pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] selection of residues Hi Abhinav, You can

Re: [PyMOL] selection of residues

2017-03-22 Thread Thomas Holder
Hi Abhinav, You can select by representation, e.g.: iterate rep sticks, print(chain, resi) or directly add labels on CA atoms: label byca rep sticks, resi Hope that helps. Cheers, Thomas On 22 Mar 2017, at 15:43, Kumar, Abhinav wrote: > Hi, > Is there a way of

[PyMOL] selection of residues

2017-03-22 Thread Kumar, Abhinav
Hi, Is there a way of extracting residue information from a session file in which a few residues are shown in sticks representation? I am interested in changing representation/adding labels to only those residues with stick representation. Thanks, Abhinav Abhinav Kumar, PhD Senior Scientist,

Re: [PyMOL] selection coloring in ribbon

2016-11-24 Thread Thomas Holder
Hi Yuxing, We have released Incentive PyMOL 1.8.4.1, which fixes the ribbon coloring issue. Cheers, Thomas On 21 Nov 2016, at 15:57, Thomas Holder wrote: > Hi Yuxing, > > Thanks for reporting this. Yes it's a bug, luckily with a simple fix. We will > provide

Re: [PyMOL] selection coloring in ribbon

2016-11-21 Thread Thomas Holder
Hi Yuxing, Thanks for reporting this. Yes it's a bug, luckily with a simple fix. We will provide a bugfix release soon. Cheers, Thomas On 21 Nov 2016, at 15:12, Yuxing Liao wrote: > Hello All, > > I just updated Pymol from 1.8.0 to the latest 1.8.4. But I

[PyMOL] selection coloring in ribbon

2016-11-21 Thread Yuxing Liao
Hello All, I just updated Pymol from 1.8.0 to the latest 1.8.4. But I noticed when the structure is rendered in ribbon and you try to color part of it, the behavior changed at the boundaries. Instead of beginning and ending at the middle of the bonds like before, now the colors start and end

Re: [PyMOL] Grammar for PyMOL selection algebra

2016-07-21 Thread Thomas Holder
Hi Lukas, All operators: https://sourceforge.net/p/pymol/code/4159/tree/trunk/pymol/layer3/Selector.cpp#l455 Operator types (e.g. number of arguments) and priority (order of operation): https://sourceforge.net/p/pymol/code/4159/tree/trunk/pymol/layer3/Selector.cpp#l365 Hope that helps. Cheers,

[PyMOL] Grammar for PyMOL selection algebra

2016-07-19 Thread Lukáš Pravda
Dear PyMOL users, I am trying to add support for pymol-like selection algebra into one of your software tools. Therefore, I was wondering, if there is any formal description of the language available in for example as context-free grammar. I was trying to find something in the source code

Re: [PyMOL] -- selection --

2016-03-02 Thread Tsjerk Wassenaar
Hi Leila, Have a look at selection syntax (help selections), in particular 'within ... of ...' Hope it helps, Tsjerk On Mar 2, 2016 06:46, "leila karami" wrote: > Dear all > > I have a complex (protein-ligand). I want to have only those residues > (from protein) with

[PyMOL] -- selection --

2016-03-01 Thread leila karami
Dear all I have a complex (protein-ligand). I want to have only those residues (from protein) with special distance relative to ligand. How to do that? Any help will highly appreciated -- Site24x7 APM Insight: Get Deep

Re: [PyMOL] selection of a set of amino acids

2014-12-15 Thread Sampson, Jared
Hi Alireza - For renumbering a chain, the program PDBSET in the CCP4 suite is my tool of choice. If your protein is chain A, the command would look something like this: pdbset xyzin my_protein.pdb xyzout my_protein_renumbered.pdb EOF renum 1 chain A EOF To remove the extraneous stuff within

[PyMOL] selection of a set of amino acids

2014-12-13 Thread Alireza Kashani
Dear All, I would like to colour different regions of a protein in different colour; say region one, amino acid number 1 to 100 and region two amino acid 101 to 150; However, when I look into a pdb file using pymol; by displaying the residuals, I see the residue number 1, does not correspond to

Re: [PyMOL] selection of a set of amino acids

2014-12-13 Thread Andreas Warnecke
Hi, There is a script available on the pymol wiki called zero_residues. This will allow you to easily renumber any AA sequence. As far as other heteroatoms are concerned you could consider removing them (remove hetatm), or extract them into a second object. Another alternative is to simply adjust

Re: [PyMOL] selection of a set of amino acids

2014-12-13 Thread Alireza Kashani
Thanks for your prompt answer, numbers resets in every chain - and there is a lot of nucleobases in the beginning (A,C,U,G) and MG at the end and these atoms mess up the residues number additionally ! can I remove them via pymol ? Thank you http://en.wikipedia.org/wiki/Nucleobase On Sat, Dec 13,

[PyMOL] Selection algebra issue

2013-12-13 Thread Katherine Sippel
Hi all, I'm trying to write a script to data mine the pdb. I'm want to look at the ligands in a pdb file and fish out those that meet a certain criteria. I've got a script that can look at the ligands all at once but I need to assess each ligand individually. Since I'm looking at 40,000+ pdbs I

Re: [PyMOL] Selection algebra issue

2013-12-13 Thread Schubert, Carsten [JRDUS]
constituents, by either chain Id and resid. Hope this helps a bit. Carsten From: Katherine Sippel [mailto:katherine.sip...@gmail.com] Sent: Friday, December 13, 2013 10:28 AM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Selection algebra issue Hi all, I'm trying to write a script to data

Re: [PyMOL] Selection algebra issue

2013-12-13 Thread Katherine Sippel
Id and resid. Hope this helps a bit. Carsten *From:* Katherine Sippel [mailto:katherine.sip...@gmail.com] *Sent:* Friday, December 13, 2013 10:28 AM *To:* pymol-users@lists.sourceforge.net *Subject:* [PyMOL] Selection algebra issue Hi all, I'm trying to write a script to data

Re: [PyMOL] Selection algebra issue

2013-12-13 Thread Jason Vertrees
this helps a bit. Carsten From: Katherine Sippel [mailto:katherine.sip...@gmail.com] Sent: Friday, December 13, 2013 10:28 AM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Selection algebra issue Hi all, I'm trying to write a script to data mine the pdb. I'm want to look

[PyMOL] selection residues with an exact b-factor value

2013-10-10 Thread Osborne Michael
Hello Pymolers I think this is an easy one, but I can't seem to get this to work. I'd like to select residues with a bfactor equal to a certain value, say 0. However something like: select aa, b = 0 does not work although select aa, b 0.5 does work. Cam someone show me how to do this? Cheers

Re: [PyMOL] selection residues with an exact b-factor value

2013-10-10 Thread Jason Vertrees
Hi Mike, We didn't implement the equals operator, but the less than and greater than operators are strict comparisons so you can do the following: select my_exact_b, not (b0.5 or b0.5) Cheers, -- Jason On Thu, Oct 10, 2013 at 9:34 PM, Osborne Michael michael.osbo...@umontreal.ca wrote:

Re: [PyMOL] selection within object

2012-01-02 Thread Corey Fugate
select chain A and ss s worked great. I didn't know to put the 'and' there. Thanks! On Sat, Dec 31, 2011 at 7:53 PM, Takanori Nakane t.nak...@mail.mfour.med.kyoto-u.ac.jp wrote: Happy new year,        I have a structure of a protein composed of two

Re: [PyMOL] selection within object

2012-01-02 Thread Jason Vertrees
Corey, PyMOL's ability to create precise atom selections can be very useful. Please see the 'select' command (http://pymolwiki.org/index.php/Select). On that page, please be sure to see the two topics under the See Also heading. Those will illustrate how powerful 'select' can really be. Let me

[PyMOL] selection within object

2011-12-31 Thread Corey Fugate
I have a structure of a protein composed of two monomers A and B. I want to select the beta sheets in monomer A only. I know I can select all beta sheets with, select ss s, but I haven't been able to find a simple way to make a selection within a selection.

Re: [PyMOL] selection within object

2011-12-31 Thread Takanori Nakane
Happy new year, I have a structure of a protein composed of two monomers A and B. I want to select the beta sheets in monomer A only. I know I can select all beta sheets with, select ss s, but I haven't been able to find a simple way to make a selection within a selection. select

[PyMOL] Selection/remove bug?

2009-06-02 Thread Jim Remington
Dear All: One of our crystals contains a dimer in the asymmetric unit, with chains labeled A and B. If I want to display chain b, I can first select chain a and remove the atoms, using the commands: select a, chain a ( (a) action menu: remove atoms) Result: atoms removed However, if after

Re: [PyMOL] Selection/remove bug?

2009-06-02 Thread Warren DeLano
: Tue 6/2/2009 2:08 PM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Selection/remove bug? Dear All: One of our crystals contains a dimer in the asymmetric unit, with chains labeled A and B. If I want to display chain b, I can first select chain a and remove the atoms, using the commands

[PyMOL] selection partcular part of the model

2009-04-04 Thread peter hudson
Hello I would like know, how can i show the electron density map of the only selcted part along with my ligand in pymol. I donot like to show the extra density. I guess isomesh map, selction site may help, but i would be interested in detail of it. I would appreciate the suggestions. Thanks in

[PyMOL] selection print out

2007-11-21 Thread Wiktor Jurkowski
How to list residues within given selection? E.g. if I have selection: select name, resi 134 around 4.0 How to get details about atoms, residues which could be used by extrenal code or just copied to text file? Wiktor

[PyMOL] selection disordered

2006-01-19 Thread Frank Dressel
Hi there, i have the following problem: selecting all ca atoms in chain A of 1ao0 the amino acids in the selection are disordered with respect to their occurrence in the protein. After loading the protein i tried the following: numbers=[] iterate (chain a)(name

Re: [PyMOL] selection disordered

2006-01-19 Thread Matthew . Franklin
pymol-users-ad...@lists.sourceforge.net wrote on 01/19/2006 06:55:11 AM: Hi there, i have the following problem: selecting all ca atoms in chain A of 1ao0 the amino acids in the selection are disordered with respect to their occurrence in the protein. (snip) So the 56th amino acid is

RE: [PyMOL] selection disordered

2006-01-19 Thread Warren DeLano
: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Frank Dressel Sent: Thursday, January 19, 2006 7:36 AM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] selection disordered Hi there, i have the following problem: selecting

RE: [PyMOL] Selection of DNA backbone or base pairs

2005-10-31 Thread Grégori Gerebtzoff
Message- From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of James Puckett Sent: lundi, 31. octobre 2005 00:27 To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Selection of DNA backbone or base pairs I am trying to color the DNA

[PyMOL] Selection of DNA backbone or base pairs

2005-10-30 Thread James Puckett
I am trying to color the DNA backbone and DNA base pairs uniquely en masse for several crystal / NMR structures. Is there a simple way to select solely the DNA phosphate backbone or solely the DNA bases or DNA bases + sugars, etc? I know how to select atoms individually, but am wondering

Re: [PyMOL] selection help + align question

2005-01-21 Thread Jules Jacobsen
.pdb, a2 load 3.pdb, b1 load 4.pdb, b2 I wanted to create two new selections: one = a1 a2 two = b1 b2 I've tried many different combinations of PyMOL selection syntax, but I cannot get the objects to add to the same selection (using 'create' or 'select'): create one, a1 + a2

Re: [PyMOL] selection help + align question

2005-01-20 Thread Douglas Kojetin
of PyMOL selection syntax, but I cannot get the objects to add to the same selection (using 'create' or 'select'): create one, a1 + a2 create one, a1 and a2 create one, object a1 + object a2 create one, a* From what I've read in the manual, I think these commands are not working because

[PyMOL] selection around

2004-12-05 Thread kostas
Dear fellows I try to select the atoms surround a PHE ring and I use the 'around' expression. With a value of 4 selects almost the whole molecule and with a value of 1 selects considerably less atoms but with a random distribution through the molecule. What actually I'm looking for is to

[PyMOL] selection function

2004-07-28 Thread Al_Pierce
If you have the molecules mol01 and mol02 open, you can type mol_list = cmd.get_names() to get the list of molecules put into the variable mol_list: ['mol01' ,'mol02']. Now let's say you've got those two molecules open and you've made some selections within those two molecules. The GL window

[PyMOL] selection of residues with negative numbers

2004-07-15 Thread Douglas Kojetin
Hi All- I cannot make PyMOL make selections of residues with negative (sequence) numbers. Any quick way around this? ex. that works: PyMOLshow sticks, //mod1//10/ ex. that fails: PyMOLshow sticks, //mod1//-4/ Selector-Error: Invalid Range. ( s; mod1 i; :4 )-- I found this post on the

RE: [PyMOL] selection of residues with negative numbers

2004-07-15 Thread Warren DeLano
-Original Message- From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Douglas Kojetin Sent: Thursday, July 15, 2004 8:23 AM To: pymol Subject: [PyMOL] selection of residues with negative numbers Hi All- I cannot make PyMOL