{+ file : morph_multi.inp +} {+ Multiple-chain morphing script for CNS +} {+ Nat Echols , 8-04-05 +} {+ Based on Werner Krebs' original X-PLOR script +} {+ Tested with CNS 1.1 (no patching required) +} {+ +} {+ IMPORTANT: This is the multiple chain version. It requires +} {+ input structures that are already homogenous, and the script +} {+ that invokes CNS will accomplish this. However, missing +} {+ atoms will not be filled in. See the original file +} {+ morph.inp for details on some of the actions below. +} {+ +} {+ Part of the Macromolecular Morphing Server. +} {+ Use & Distribution of this file is restricted by the same +} {+ terms as the Macromolecular Morphing Server +} {+ +} {+ CNS is a separate program subject to its own licensing +} {+ restrictions. +} {+ ============================================================ +} {+ Basic parameters. The values of 'nframes' and 'outframes' +} {+ are normally automatically replaced by the script talign.pl +} {+ before this is invoked. Note that 'nframes' is actually the +} {+ number of input frames MINUS ONE. +} define ( nframes=1; outframes=10; morph_nsteps=60; morph_drop=10; homog1_nsteps=1000; homog2_nsteps=300; ) {+ This is just the part that records individual frame energies. +} procedure frame_eng (myframe; eng;) set echo=off message=off display="stats.tmp" end evaluate ($estat = "energy_frame" + encode(&myframe + 1)) display $estat &eng set echo=on message=all display=OUTPUT end endprocedure topology @@CNS_TOPPAR:protein.top @@CNS_TOPPAR:dna-rna.top @@CNS_TOPPAR:ion.top @@CNS_TOPPAR:water.top @@CNS_TOPPAR:carbohydrate.top end parameter @@CNS_TOPPAR:protein.param @@CNS_TOPPAR:dna-rna.param @@CNS_TOPPAR:ion.param @@CNS_TOPPAR:water.param @@CNS_TOPPAR:carbohydrate.param end structure @rf0.mtf end do (name="O") ( name OT1 ) do (name="OT") ( name OT2 ) do (name="CD1") ( name CD and resname ile ) do (name="OXT") ( name OT ) evaluate ($frame = 1) evaluate ($inframe = 0) {+ **** load first frame **** +} coordinates @rf0.pdb end delete selection=( name = OT* ) end delete selection=( hydrogen ) end delete selection=( not known ) end write coordinates output=if0.pdb end call frame_eng (myframe=1; eng=$ener;) {+ Done processing first frame (now in final state) +} coor swap end evaluate ($infile = "rf1.pdb") coordinates @$infile end delete selection=( name = OT* ) end delete selection=( hydrogen ) end delete selection=( not known ) end coor swap end evaluate ($adv = &outframes - 1) {+ ================= ADIABATIC MAPPING STEP =================== +} {+ This is the loop that actually morphs the two files. This +} {+ used to be done via a modification to corman.f, but I've +} {+ moved it entirely into this script. All that's going on +} {+ here is linear interpolation plus energy minimization. +} {+ ============================================================ +} while ($adv > 0) loop morph evaluate ($outfile = "if" + encode($frame) + ".pdb") if ($adv = 1) then coor swap end else set echo=off message=off end {+ Linear interpolation step +} for $atm in id (known) loop advance do ( x = x + ((xcomp - x) / $adv) ) (id $atm) do ( y = y + ((ycomp - y) / $adv) ) (id $atm) do ( z = z + ((zcomp - z) / $adv) ) (id $atm) end loop advance minimize powell nstep = &morph_nsteps drop = &morph_drop end set echo=on message=on end call frame_eng (myframe=$frame; eng=$ener;) end if write coordinates output=$outfile end evaluate ($adv = $adv - 1) evaluate ($frame = $frame + 1) end loop morph {+ Bye! +} stop