<p>I am using the following code to generate a tetramer from a monomer using a tetramer template in Modeller. </p>

<p>Template tetramer = 2jgs.pdb
Monomer = 2c4i.pdb</p>

<p>But my code only produces a monomer and not a tetramer.</p>

<pre><code>env = environ()

#read pdb1 and pdb2 and creat and alignment between their sequences
aln = alignment(env)
mdl  = model(env, file='2jgs.pdb')
aln.append_model(mdl=mdl, align_codes='2jgs', atom_files='2jgs')
mdl2 = model(env, file='2c4i.pdb')

aln.append_model(mdl=mdl2, align_codes='model1', atom_files='model1')
aln.write(file='2jgs_2jgs.ali')


z = (mdl.chains)
for i in z:
    print i.name
    print len(i.residues)

# Genereate and save structure=structure alignment
    atmsel = selection(mdl.chains[i.name]).only_atom_types('CA')
    r = atmsel.superpose(mdl2, aln,)
    rms = r.rms
    drms = r.drms  

    mdl2.write(file='model1_fit22.pdb')
</code></pre>

<p>I found the solution to be very simple. The mdl2.write() method actually overwrites the previous structures, so all I had to do was change the variable name of the output and join the files together</p>