From: Streiff, John H. (Streiff.John_at_mayo.edu)
Date: Tue Feb 17 2004 - 14:20:24 CST

I am preparing a fusion protein from two pdb files. I created a pdb/psf file of the two proteins correctly oriented in space, but as unconnected segments. I tried to use 'setbonds' to connect the two, but the command does not want to work for me when the two atoms are in different segments. (I can use setbonds to make a bons between atoms in the same segment). Any suggestion?

This is the script I used (borrowed from an earlier posting):

set sel [atomselect top "index 2000 2310"]
set bonds [$sel getbonds]
set ids [$sel get index]
lassign $bonds atom1bonds atom2bonds
lassign $ids atom1id atom2id
lappend atom1bonds $atom2id
lappend atom2bonds $atom1id
$sel setbonds [list $atom1bonds $atom2bonds]

- John