From: Sonja M. Schwarzl (sonja.schwarzl_at_IWR.Uni-Heidelberg.De)
Date: Fri Mar 22 2002 - 09:36:46 CST

Hello,

I want to draw a bond that is not automatically shown when loading the
molecule into vmd. To do this, I make use of the vmd/python interface.
The code to connect the atoms indexes 7887 and 7888 is:

sel = AtomSel.AtomSel(selection='index 7887 7888', molid=mol_id, frame=frame_number)
bonds = sel.getbonds()
if 7888 not in bonds[0]:
    bonds[0].append(7888)
    bonds[1].append(7887)
    sel.setbonds(bonds)

The source of my structures is a CHARMM trajectory. If
the atoms to be connected belong to the same CHARMM segment, I do not have
any problems. However, if they belong to different segments, the bond will
not be shown. How can I overcome this problem?

Sonja

-- 
_______________________________________________________________________
Sonja M. Schwarzl                  sonja.schwarzl_at_iwr.uni-heidelberg.de 
IWR - Biocomputing
Im Neuenheimer Feld 368                          Tel.: +49/6221/54-8801 
69120 Heidelberg                                 Fax:  +49/6221/54-8868
Germany 
_______________________________________________________________________