Thanks a tonne David and Nathaniel,
The script in that post is exactly what I was looking for.

I may also give cctbx.python a try , If I remember right phenix, cns and xplor use a similar kind of selection syntax which as Nat said is not too different from pymol given its roots.

Thanks again
Hari


On Tue, Mar 23, 2010 at 4:03 PM, David Hall <lists@cowsandmilk.net> wrote:
>
> PyMol doesn't provide programmatic access to actual bond objects.
> Instead, you have to do what was suggested 5 days ago:
>
> http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg07745.html
>
> -David
>
> On Tue, Mar 23, 2010 at 3:48 PM, hari jayaram <harijay@gmail.com> wrote:
> > Hi
> > I want to write a python/pymol  script that will give me residue -residue
> > distances within a pdb file programmatically
> > I know that within pymol I can get a distance object using
> > select r55 , chain A and resi 55
> > select r 22 , chain A and resi 22
> > distance (r55) ,(r22)
> > This creates the dist01 object . If I wanted to do this using a python
> > script and get a pretty print of all the distances in the distance object ,
> > how do I do that?
> > Also pointers to other python toolkits that can allow me to make such
> > measurements outside pymol will be greatly appreciated.
> > Thanks for your help
> > Hari
> >
> >
> > ------------------------------------------------------------------------------
> > Download Intel&#174; Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > 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
> >