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

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()


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]),

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