mutant two ore more residues
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')
On 12/01/2010 05:05 AM, Knut J Bjuland wrote: > 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?
Sure, you can mutate as many residues as you want. You just need to think about whether the mutated residues interact with each other at all, since you may want to adjust the optimization. For example, your current script optimizes the first mutated residue, and then the second mutated residue. Instead, you *might* want to optimize both residues simultaneously. You could do that by replacing:
optimize(s, sched) optimize(s1, sched)
with
optimize(s | s1, sched)
(selections are sets, so "s | s1" returns a new selection that is the union of the two selections, i.e. it contains atoms that are in s or s1.)
A similar consideration may apply to your energy() calls.
Ben Webb, Modeller Caretaker
Thanks for your reply. I have now incoprated your change into my new script. I have also made one change to the energy function.
for i in [s,s1]: i.energy() i.randomize_xyz(deviation=4.0)
Will this new change that I made cause the modeller to take into account the affect one reside have on to another if they are neighbors?
Knut J
> Date: Wed, 1 Dec 2010 10:38:17 -0800 > From: modeller-care@salilab.org > To: knutjbj@hotmail.com > CC: modeller_usage@salilab.org > Subject: Re: [modeller_usage] mutant two ore more residues > > On 12/01/2010 05:05 AM, Knut J Bjuland wrote: > > 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? > > Sure, you can mutate as many residues as you want. You just need to > think about whether the mutated residues interact with each other at > all, since you may want to adjust the optimization. For example, your > current script optimizes the first mutated residue, and then the second > mutated residue. Instead, you *might* want to optimize both residues > simultaneously. You could do that by replacing: > > optimize(s, sched) > optimize(s1, sched) > > with > > optimize(s | s1, sched) > > (selections are sets, so "s | s1" returns a new selection that is the > union of the two selections, i.e. it contains atoms that are in s or s1.) > > A similar consideration may apply to your energy() calls. > > Ben Webb, Modeller Caretaker > -- > modeller-care@salilab.org http://www.salilab.org/modeller/ > Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage > _______________________________________________ > modeller_usage mailing list > modeller_usage@salilab.org > https://salilab.org/mailman/listinfo/modeller_usage
On 12/01/2010 11:56 PM, Knut J Bjuland wrote: > Thanks for your reply. I have now incoprated your change into my new > script.
There is no guarantee that my suggested change gives better results than your original script. I suggest you try both and see.
> I have also made one change to the energy function. > > for i in [s,s1]: > i.energy() > i.randomize_xyz(deviation=4.0) > > > Will this new change that I made cause the modeller to take into > account the affect one reside have on to another if they are neighbors?
That won't actually change anything at all. You are still calculating the energy for each residue individually. If you wanted to calculate the energy of the pair of residues simultaneously, use something like (s|s1).energy() The same disclaimer from above applies.
randomize_xyz simply randomizes the coordinates, with no consideration of steric clash etc., so it will make no difference whether you randomize both residues simultaneously or one at a time.
Ben Webb, Modeller Caretaker
participants (2)
-
Knut J Bjuland
-
Modeller Caretaker