
Hi Ben, Here's a Python script to help you make a filament in Chimera. You first have to orient two monomers relative to each other in Chimera, for example by moving one with the mouse by hand. Then opening this script (use File / Open) will add a third monomer using the position of the 2nd monomer relative to the 1st. You can edit the last line of the script to add more than one monomer. Tom # ----------------------------------------------------------------------------- # Script to make a filament from monomers. # # Open two copies of the monomer and position them relative to one another # by hand or other means. Then open this script to create a 3rd copy # having the same relative position to the 2nd copy as the 2nd has relative # to the first. The two copies used are the molecules with the highest two # model id numbers. # # To add multiple monomers edit the last line of the script. # def extend_filament(copies): from chimera import openModels, Molecule mlist = openModels.list(modelTypes = [Molecule]) mlist.sort(lambda m1,m2: cmp(m1.id, m2.id)) m1 = mlist[-2] m2 = mlist[-1] for c in range(copies): m3 = add_monomer(m1, m2) m1 = m2 m2 = m3 # ----------------------------------------------------------------------------- # def add_monomer(m1, m2): path, filetype = m2.openedAs[:2] from chimera import openModels m3 = openModels.open(path, filetype)[0] xf = m2.openState.xform xf.premultiply(m1.openState.xform.inverse()) xf.premultiply(m2.openState.xform) m3.openState.xform = xf return m3 # ----------------------------------------------------------------------------- # Change copies values to add more than one monomer if desired. # extend_filament(copies = 1)