From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Dec 15 2009 - 06:17:46 CST

On Tue, 2009-12-15 at 12:25 +0100, Nicola Giacche' wrote:
> Hi,
>
> I'm trying to use the hbonds.tcl script, I would calculate
> protein-ligand hbonds along the trajectory.
> I have loaded the pdb and the trr files, then I have wrote "source
> path/hbonds" in the command-line windows and then I have wrote "hbonds
> -sel1 protein -sel2 "resname UNK" ...options", but I have received:
> "invalid command name "protein"".
> While with "hbonds -sel1 -sel2 "resname UNK" the result was "error: odd
> number of arguments -sel1 -sel2 {resname UNK}".
> I have tried every kind of syntax of the selection but always with the
> same result.

please have a look at the atomselect command in the VMD user's guide.

> I don't understand where is the error, it seems that there is a problem
> with "-sel1" selection.
> In the web i have not found any answer for this case, it is possible
> that the command-line script has a bug?

no. the script obviously expects an atom selection
_function_ as created by the atomselect command and not
the selection text like you provided. try:

set sel1 [atomselect top protein]
set sel2 [atomselect top {resname UNK}]

and then:

hbonds -sel1 $sel1 -sel2 $sel2

cheers,
   axel.

> thank you for the attention
>
> Nicola
>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com 
Institute for Computational Molecular Science
College of Science and Technology
Temple University, Philadelphia PA, USA.