Re: [PyMOL] create bonds between selections within cutoff radius

2015-06-01 Thread Thomas Holder
inger.com] > Sent: Thursday, May 28, 2015 9:17 AM > To: Osvaldo Martin > Cc: Tobias Martin; pymol-users@lists.sourceforge.net > Subject: Re: [PyMOL] create bonds between selections within cutoff radius > > Hi Osvaldo, > > your solution can be simplified if you use cmd.find_p

Re: [PyMOL] create bonds between selections within cutoff radius

2015-06-01 Thread Schubert, Carsten [JRDUS]
mas Holder [mailto:thomas.hol...@schrodinger.com] Sent: Thursday, May 28, 2015 9:17 AM To: Osvaldo Martin Cc: Tobias Martin; pymol-users@lists.sourceforge.net Subject: Re: [PyMOL] create bonds between selections within cutoff radius Hi Osvaldo, your solution can be simplified if you use cmd.find_pa

Re: [PyMOL] create bonds between selections within cutoff radius

2015-05-28 Thread Osvaldo Martin
Hi Thomas, You're absolutely right. I had completely forgotten the find_pairs function! Thanks for the clarification. Cheers, Osvaldo. On Thu, May 28, 2015 at 10:17 AM, Thomas Holder < thomas.hol...@schrodinger.com> wrote: > Hi Osvaldo, > > your solution can be simplified if you use cmd.fin

Re: [PyMOL] create bonds between selections within cutoff radius

2015-05-28 Thread Thomas Holder
Hi Osvaldo, your solution can be simplified if you use cmd.find_pairs: http://pymolwiki.org/index.php/find_pairs Cheers, Thomas On 28 May 2015, at 09:06, Osvaldo Martin wrote: > Hi Tobias, > > One possible solution will be to run the following code. > > import pymol > from pymol import cm

Re: [PyMOL] create bonds between selections within cutoff radius

2015-05-28 Thread Osvaldo Martin
Hi Tobias, One possible solution will be to run the following code. import pymol from pymol import cmd, stored stored.pd = [] stored.pairs = [] cmd.iterate('name pd', 'stored.pd.append(index)') for i in stored.pd: cmd.iterate('name si within 2.5 of index %s' % i, 'stored.pairs.append((%s,

[PyMOL] create bonds between selections within cutoff radius

2015-05-28 Thread Tobias Martin
I want to create bonds between e.g. all Pd atoms and all Si atoms, but only within a specified cutoff radius. bond (n. pd), (n. si) within 2.5 of (n. pd) creates all possible bonds between all Pd atoms and all Si atoms near enough to any Pd atom. This yields a weired structure with very l