! module file: ensrepart ! ! CNS MODULE ! ********** ! ! Authors: Gregory L. Warren and Axel T. Brunger ! ! copyright Yale University ! ! version 05/01/98 ! ! Function: ! This is a module which repartitions the ! noe, jcoup, and cdih data for multi-conformer ! multiple cross validation refinements ! ! Requirements: ! See the top level script file for the ! defined parameter(s). ! ! module { ensrepart } ( &cv=cv; {INPUT/OUTPUT: cross validation values} &flag=flag; {INPUT: flags for cv } &nmr=nmr; {INPUT: all the &nmr. defined paramters} &output=output; {INPUT/OUTPUT: &output symbols } ) checkversion 1.3 set message ? end evaluate ($message_old=$result) set echo ? end evaluate ($echo_old=$result) if ( $log_level = verbose ) then set echo=on message=normal end else set echo=off message=off end end if evaluate ($rstr_num=20000*&output.copies^2) noe reset nrestraints = $rstr_num end {- read in loop NOE restraint files -} evaluate ($class_count = 0) if (&nmr.ens.loop.flag=true) then evaluate ($count = 1) evaluate ($class_count = 1) while (&exist%nmr.noe.loop.file.$count=true) loop nloop evaluate ($clsname = "N"+encode($class_count)) if (&nmr.noe.loop.file.$count # "" ) then @CNS_NMRMODULE:readnoe ( classname=$$clsname; filename=&&nmr.noe.loop.file.$count; avemode=&&nmr.noe.loop.ave.mode.$count; ) end if evaluate ($count = $count + 1) evaluate ($class_count = $class_count + 1) end loop nloop evaluate ($class_count = $class_count - 1) if (&flag.cv.flag=true) then if (&flag.cv.noe=true) then noe part=&nmr.cv.numpart end end if end if end if {- read in non-loop NOE restraint files -} evaluate ($count = 1) evaluate ($class_count = $class_count + 1) while (&exist%nmr.noe.file.$count=true) loop nloop evaluate ($clsname = "N"+encode($class_count)) if (&nmr.noe.file.$count # "" ) then @CNS_NMRMODULE:readnoe ( classname=$$clsname; filename=&&nmr.noe.file.$count; avemode=&&nmr.noe.ave.mode.$count; ) end if evaluate ($count = $count + 1) evaluate ($class_count = $class_count + 1) end loop nloop if (&nmr.ens.loop.flag=false) then if (&flag.cv.flag=true) then if (&flag.cv.noe=true) then noe part=&nmr.cv.numpart end end if end if end if if (&nmr.noe.hbnd.file # "" ) then evaluate ($temp_file_name=&nmr.noe.hbnd.file+encode(&output.copies)+".tbl") evaluate ($clsname = "hbnd") @CNS_NMRMODULE:readnoe ( classname=$clsname; filename=$temp_file_name; avemode=&&nmr.noe.ave.mode.hbnd; ) end if noe cv = &cv.part.num ceiling=1000 potential * soft sqoffset * 0.0 sqconstant * 1.0 sqexponent * 2 soexponent * 1 asymptote * 1.0 rswitch * 0.5 ensemble reset on end if (&output.ens.dimer.flag=true) then evaluate ($count = 0) while ($count < &output.copies) loop DIM evaluate ($count = $count + 1) if (&nmr.ens.multi.flag=true) then evaluate ($chainname1=&nmr.ens.multi.segid.1+encode($count)) evaluate ($chainname2=&nmr.ens.multi.segid.2+encode($count)) elseif (&nmr.ens.loop.flag=true) then evaluate ($chainname1="C0") evaluate ($chainname2="C"+encode($count)) end if ensemble on dimer $chainname1 $chainname1 dimer $chainname1 $chainname2 dimer $chainname2 $chainname2 end end loop DIM end if end if (&flag.cv.coup=true) then coup part = &nmr.cv.numpart cv = &cv.part.num end end if if (&flag.cv.cdih=true) then restraints dihed part = &nmr.cv.numpart cv = &cv.part.num end end if evaluate (&cv.part.num=&cv.part.num+1) {- define a distance restraints for each disulfide bond, i.e., treat it as if it were an NOE. -} for $ss_rm_id_1 in id ( name SG ) loop STRM for $ss_rm_id_2 in id ( name SG and bondedto ( id $ss_rm_id_1 ) ) loop STR2 if ($ss_rm_id_1 > $ss_rm_id_2) then pick bond ( id $ss_rm_id_1 ) ( id $ss_rm_id_2 ) equil evaluate ($ss_bond=$result) noe assign ( id $ss_rm_id_1 ) ( id $ss_rm_id_2 ) $ss_bond 0.1 0.1 end end if end loop STR2 end loop STRM set message=$message_old echo=$echo_old end