Dear Rob
Thanks a lot. is really what I wanted.
As I'm a beginner of python, your script is very helpful.
Thanks again,

2008/5/6 Robert Campbell <>:
Hi Tomoko,

On Mon, 05 May 2008 18:26:17 +0900, Tomoko Niwa <>

> Thanks for kind advices.
> Whatif and PISA worked excellently, but I want to get the list within Pymol.
> By parsing the pymol modules, I found
> hb = cmd.find_pairs("((byres "+sss1+") and n;n)",
>                               "((byres "+sss1+") and n;o)",mode=1,
>                               cutoff=3.7,angle=55,
>                               state1=state,state2=state)
> in Is it possible to get a list of main-chain hydrogen bonds with
> this function?

Yes it is.  I thought this was a useful idea, so I've just scribbled together
a script to do just that and it is attached.

You can load it the usual way ("run") and then run it

  print_hb <selection>

Warning, if you have waters in your selection it will mess it up, so try:

 print_hb 1nzl &! resn hoh

I haven't fixed that part yet.  You may wish to alter the formatting of the
output, but I copied the example in your first e-mail:

 /GLY`56/N  /ASN`181/O  2.86
 /TYR`26/N  /VAL`182/O  2.92
 /ASN`54/N  /THR`183/O  2.95
 /ASN`52/N  /TRP`185/O  2.92

In my case the PDB file had no "chain" identifier.

Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Botterell Hall Rm 644
Department of Biochemistry, Queen's University,
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821            Fax: 613-533-2497

This email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.;198757673;13503038;p?
PyMOL-users mailing list