Hi Markus -

First, you need to run the python script from the wiki page (save it as, e.g. 
polarpairs.py).  Then, to run pure Python code within a pml file, you’ll need 
to enclose those lines in a python block 
(http://www.pymolwiki.org/index.php/Python) using ‘python’ and ‘python end’.  
For example, to list all the H bonds between chains A and B:

###

run path/to/polarpairs.py

python

# the example from http://www.pymolwiki.org/index.php/Polarpairs
pairs = polarpairs('chain A', 'chain B')
for p in pairs:
    dist = cmd.get_distance('(%s`%s)' % p[0], '(%s`%s)' % p[1])
    print p, 'Distance: %.2f' % (dist)

python end

###

Hope that helps.

Cheers,
Jared

--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
http://kong.med.nyu.edu/






On Oct 15, 2014, at 6:17 PM, Markus Heller 
<mhel...@cdrd.ca<mailto:mhel...@cdrd.ca>> wrote:

Jared,

I'm a newbie to pythom/PyMOL; how do I get this to work in a pml script?  A 
pointer to an example script would be enough .

Thanks
Markus

From: Sampson, Jared [mailto:jared.samp...@nyumc.org]
Sent: Friday, October 10, 2014 4:17 PM
To: Markus Heller
Cc: pymol-users@lists.sourceforge.net<mailto:pymol-users@lists.sourceforge.net>
Subject: Re: [PyMOL] Show all residues forming H-bonds

Actually, an even better option is Thomas' polarpairs.py script: 
http://www.pymolwiki.org/index.php/Polarpairs, which considers the H-bond angle 
as well as distance.

Apologies for the multiple emails, but I hope that is closer to what you're 
looking for.

Cheers,
Jared


On Oct 10, 2014, at 7:10 PM, Sampson, Jared 
<jared.samp...@nyumc.org<mailto:jared.samp...@nyumc.org>> wrote:


Hi Markus -

Ah, sorry, I misunderstood your request at first.

What about the "acceptors" and "donors" selectors?  
http://www.pymolwiki.org/index.php/Single-word_Selectors

e.g.
select hbond_residues, byres ((acceptors within 3.5 of donors) or (donors 
within 3.5 of acceptors))

Cheers,
Jared

--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
http://kong.med.nyu.edu/





On Oct 10, 2014, at 6:41 PM, Markus Heller <mhel...@cdrd.ca> wrote:


Hi Jared,

Thanks for the reply.

This is NOT what I'm looking for.  As you stated, distance mode 2 yields the 
*distances* as dashes, but not the actual residues.  I don't want the dashes, 
but I want the residues (i.e. the donors and acceptors) in selectable objects.

I hope it's clearer now what I'm after .

Cheers
M

From: Sampson, Jared [mailto:jared.samp...@nyumc.org]
Sent: Friday, October 10, 2014 3:33 PM
To: Markus Heller
Subject: Re: [PyMOL] Show all residues forming H-bonds

Hi Markus -

Under the GUI "action" menu A > find > polar contacts, you'll find several 
options which will create a new object with all the specified distances as 
dashes.

This is also available with `distance` command.  
http://www.pymolwiki.org/index.php/Distance

Hope that helps.

Cheers,
Jared

--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
http://kong.med.nyu.edu/






On Oct 10, 2014, at 2:45 AM, Markus Heller <mhel...@cdrd.ca> wrote:



Hello list,

subject says it all.  The 2 options I came across search the www are:

http://sourceforge.net/p/pymol/mailman/message/7562444/http://sourceforge.net/p/pymol/mailman/message/7562444/

and DistancesRH 
(http://www.pymolwiki.org/index.php/DistancesRH)http://www.pymolwiki.org/index.php/DistancesRH

Is this current state-of-the-art, true-and-tried, or is there something more 
powerful hiding out there?

Thanks
Markus
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk_______________________________________________
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

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://p.sf.net/sfu/Zoho_______________________________________________
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


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
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

Reply via email to