I have made some modification to the mutant script at the modeller wiki. The change may be seen as patch to the original file. I I whised to change residue 1M and 3P to 1T and E3 in 1B72 is this the way to go. Ca s.mutant be used to select two residues?


Knut J

--- mutant.py    2010-12-01 09:04:33.004206998 +0100
+++ mutant2.py    2010-12-01 13:09:02.334207000 +0100
@@ -65,7 +65,7 @@
                 spline_on_site=True)
 
 #first argument
-modelname, respos, restyp, chain, = sys.argv[1:]
+modelname, respos, restyp, chain, respos2, restyp2, chain2 = sys.argv[1:]
 
 
 log.verbose()
@@ -98,6 +98,12 @@
 
 #perform the mutate residue operation
 s.mutate(residue_type=restyp)
+
+
+s1=selection(mdl1.chains[chain2].residues[respos2])
+s1.mutate(residue_type=restyp2)
+
+
 #get two copies of the sequence.  A modeller trick to get things set up
 ali.append_model(mdl1, align_codes=modelname)
 
@@ -145,26 +151,30 @@
 #residue, in second pass, include nonbonded neighboring atoms)
 #set up the mutate residue selection segment
 s = selection(mdl1.chains[chain].residues[respos])
-
+s1=selection(mdl1.chains[chain2].residues[respos2])
 mdl1.restraints.unpick_all()
 mdl1.restraints.pick(s)
 
 s.energy()
+s1.energy()
 
 s.randomize_xyz(deviation=4.0)
+s1.randomize_xyz(deviation=4.0)
 
 mdl1.env.edat.nonbonded_sel_atoms=2
 optimize(s, sched)
+optimize(s1, sched)
 
 #feels environment (energy computed on pairs that have at least one member
 #in the selected)
 mdl1.env.edat.nonbonded_sel_atoms=1
 optimize(s, sched)
+optimize(s1, sched)
 
 s.energy()
-
+s1.energy()
 #give a proper name
-mdl1.write(file=modelname+restyp+respos+'.pdb')
+mdl1.write(file=modelname+restyp+respos+'_'+respos2+restyp2+'.pdb')
 
 #delete the temporary file
 os.remove(modelname+restyp+respos+'.tmp')