From: Salomon Turgman Cohen (sturgman_at_gmail.com)
Date: Thu Apr 25 2013 - 17:15:20 CDT

Hmm... acceptorindices and hydrogenindices are empty. How does measure
hbonds know which atom type is hydrogen and which are the donor and
acceptor types?

Salo

On Thu, Apr 25, 2013 at 3:51 PM, Josh Vermaas <vermaas2_at_illinois.edu> wrote:

> Hi Salomon,
>
> The most coding-time efficient way of doing this is probably to write out
> all the hbond lists using "measure hbonds", and then parse the result based
> on name or type.
>
> Something like:
>
> set all [atomselect top all]
> set superlist [list [measure hbonds 3.0 30 $all]]
> set donorindices [lindex $superlist 0]
> set acceptorindices [lindex $superlist 1]
> set hydrogenindices [lindex $superlist 2]
> set typelist [$all get type]
> for { set i 0 } { $i < [llength $donorindices] } { incr i } {
> puts "[lindex $typelist [lindex $donorindices $i]] [lindex $typelist
> [lindex $hydrogenindices $i]] [lindex $typelist [lindex $acceptorindices
> $i]] "
> }
>
> Is that what you had in mind?
>
> -Josh Vermaas
>
>
> On 04/25/2013 01:13 PM, Salomon Turgman Cohen wrote:
>
> Hello,
>
> I have the need to detect hydrogen bond like interactions in a system
> consisting of amines and some ions. I was thinking the best way to do this
> is to use the salt-bridges or h-bonds extension but I cannot quite
> understand how to adapt them to my system.
>
> What I would like to do is define a set of donors, hydrogen, and
> acceptors according to their types. So I will give the program something
> like this:
>
> hbonds=((NH3,H3,OO),(NH2,H2,OO),(NH1,H1,OO),...)
>
> In this manner I will tell VMD to look for the those interactions
> according to specific distance and angular cutoffs. What would be the best
> way to implement something like this? Should I work from the current hbond
> plugin and generate my own, or would it be better to write a script from
> scratch? Could I use python scripting? Or would I need the TCL
> functionality in this case?
>
> Salomon
>
> --
> Salomon Turgman Cohen
> Postdoctoral Associate
> Cornell University
> (919) 341-9650
>
>
>

-- 
Salomon Turgman Cohen
Postdoctoral Associate
Cornell University
(919) 341-9650