! ! pre_oops.omac - gj kleywegt @ 19940308 / 20020730 ! ! creates some datablocks needed for oops ! does 3 types of RSFIT, as well as PEPFLIP and RSC ! $ echo "... pre_oops.omac started at " `date` > q1 ! bell print ... # Type "save" if you want to save your database now ... # ! symbol rsrmap # Which map file ? # ! symbol mymol # Name of the molecule ? # ! symbol first # Name of first protein residue ? # ! symbol last # Name of last protein residue ? # ! bell print ... print ... the values of A0 and C depend on print ... the resolution of your map print ... res ~ 1.7 - 1.9 - A0 = 0.90 - C = 1.04 print ... res ~ 2.0 - 2.3 - A0 = 0.90 - C = 0.91 print ... res ~ 2.4 ------- A0 = 0.90 - C = 0.82 print ... res ~ 3.2 - 3.5 - A0 = 0.85 - C = 0.55 print ... for other resolutions, optimise the print ... values of A0 and C (see question Q.030 of the FAQ) print ... ! symbol mya0 # Value for A0 ? # ! symbol myc # Value for C ? # ! ! first write out the molecule and read it in again ! as molecule JUNKY ! print ... copying $mymol to a temporary molecule JUNKY sam_atom_out q.pdb $mymol ;;;;; pdb_read q.pdb junky y n $ /bin/rm q.pdb ! ! draw a Ca trace and centre on it ! print ... drawing and centering on JUNKY mol junky obj junky ca ; end centre_zone junky $first $last ! ! set parameters for rsfit ! print ... setting RSFIT parameters rsr_map $rsrmap ; ! db_kill .rsr* db_set_dat .rsr_real 7 7 $myc db_set_dat .rsr_real 8 8 $mya0 db_set_dat .rsr_real 11 11 1.0 ! ! do ALL ATOMS rs-fit ! print ... RSFIT all atoms read odat/rsfit_all.o rs_fit junky $first $last copy_db junky_residue_all_rsfit junky_residue_rsfit ! ! do MC ATOMS rs-fit ! print ... RSFIT main chain atoms read odat/rsfit_mc.o rs_fit junky $first $last copy_db junky_residue_mc_rsfit junky_residue_rsfit ! ! do SC ATOMS rs-fit ! print ... RSFIT side chain atoms read odat/rsfit_sc.o rs_fit junky $first $last copy_db junky_residue_sc_rsfit junky_residue_rsfit ! ! do pep-flip ! print ... PEPFLIP pep_flip junky $first $last ! ! do rsc ! lego_setup on ; odat/dgnl.o odat/dgnl_rna.o odat/ odat/rsc.o ! print ... RSC rsc junky $first $last ! ! print RS-fit statistics ! print ... print ... statistics for RSFIT ALL atoms ... db_stat junky_residue_all_rsfit print ... statistics for RSFIT MC atoms ... db_stat junky_residue_mc_rsfit print ... statistics for RSFIT SC atoms ... db_stat junky_residue_sc_rsfit print ... statistics for PEPFLIP ... db_stat junky_residue_pepflip print ... statistics for RSC ... db_stat junky_residue_rsc ! ! write datablocks for OOPS ! print ... print ... writing datablocks for OOPS ... write junky_residue_name resnam.o ; write junky_residue_type restyp.o ; ! write junky_residue_all_rsfit rsfit_all.o (10f7.3) write junky_residue_mc_rsfit rsfit_mc.o (10f7.3) write junky_residue_sc_rsfit rsfit_sc.o (10f7.3) ! write junky_residue_pepflip pepflip.o (10f5.3) write junky_residue_rsc rsc.o (10f5.3) ! ! sometimes O prints "*****" in a PEPFLIP or RSC datablock; ! replace such entries by "9.999" ! NOTE: FIVE times [*] since the format was F5.3 !!! ! $ sed -e s/[*][*][*][*][*]/9\.999/g pepflip.o > q2 $ sed -e s/[*][*][*][*][*]/9\.999/g rsc.o > q3 $ mv q2 pepflip.o ; mv q3 rsc.o ! ! and now the big trick: the datablocks must have ! the same name as our actual molecule ! this requires some shell programming ... ! ! - write the symbols to a file ! write .symbols q2 ; ! ! - our real molecule name is symbol MYMOL; extract it ! and put it in a file (in uppercase) ! $ grep MYMOL q2 | cut -d" " -f2 | tr '[a-z]' '[A-Z]' > q3 ! ! - generate an input file for the stream editor ! $ echo "s/JUNKY/"`cat q3`"/" > q4 ! ! - now change the datablock names ! $ sed -f q4 resnam.o > q5 ; mv q5 resnam.o $ sed -f q4 restyp.o > q5 ; mv q5 restyp.o $ sed -f q4 rsfit_all.o > q5 ; mv q5 rsfit_all.o $ sed -f q4 rsfit_mc.o > q5 ; mv q5 rsfit_mc.o $ sed -f q4 rsfit_sc.o > q5 ; mv q5 rsfit_sc.o $ sed -f q4 pepflip.o > q5 ; mv q5 pepflip.o $ sed -f q4 rsc.o > q5 ; mv q5 rsc.o ! print ... datablocks written ! ! list datablock files and remove temporary files ! $ \ls -al resnam.o restyp.o rsfit_*.o pepflip.o rsc.o $ /bin/rm q[2-5] ! ! read the datablocks for our real molecule ! print ... reading datablocks for $mymol read rsfit_all.o read rsfit_mc.o read rsfit_sc.o read pepflip.o read rsc.o ! ! delete our temporary molecule JUNKY ! print ... deleting molecule JUNKY del_obj junky ; db_kill junky_* ! bell print ... # Type "save" if you want to save your database now ... # ! $ echo "... pre_oops.omac stopped at " `date` >> q1 $ cat q1 $ /bin/rm q1 ! bell message Done