From: Marx Gomes Van der Linden (marxgomes_at_gmail.com)
Date: Mon Jun 16 2008 - 17:10:12 CDT

Hello,
I was wondering what would be the easiest way to draw a line between
two atoms in a molecule, using a script.

I tried this (in Python):

mol = Molecule()

mol.load('somepdb.pdb')
load('graphics','test')

sel1 = AtomSel('resid 12 and (type H)')
sel2 = AtomSel('resid 20 and (type H)')

line(1, (sel1.get('x')[0],sel1.get('y')[0],sel1.get('z')[0]),
(sel2.get('x')[0],sel2.get('y')[0],sel2.get('z')[0]))

But it is not working: the line is drawn very far away from the molecule.
Any thoughts on this?
Thanks a lot for your help
Marx