{+ file: rmsd.inp +} {+ directory: general +} {+ description: Calculate RMS coordinate difference between 2 structures +} {+ comment: calculates overall RMS coordinate difference between the structures and also lists average difference for mainchain, sidechain and all atoms as a function of residue number +} {+ authors: Axel T. Brunger, and Paul D. Adams +} {+ copyright: Yale University +} {- Guidelines for using this file: - all strings must be quoted by double-quotes - logical variables (true/false) are not quoted - do not remove any evaluate statements from the file -} {- begin block parameter definition -} define( {======================= molecular structure =========================} {* structure file *} {===>} structure_infile="amy.mtf"; {* reference coordinate file *} {===>} comp_coordinate_infile="amy.pdb"; {* coordinate file *} {===>} main_coordinate_infile="amy_anneal.pdb"; {========================== atom selection ===========================} {* select atoms to be included in calculation *} {===>} atom_select=(known and not hydrogen); {* select main chain atoms *} {* note: atoms outside this selection will be considered to be side chain atoms *} {===>} atom_main=(name ca or name n or name c or name o or name ot+); {============================== options ==============================} {* find best fit between structures prior to calculating RMS deviations *} {+ choice: true false +} {===>} coord_fit=false; {=========================== output files ============================} {* output listing file *} {===>} list_outfile="rmsd.list"; {===========================================================================} { things below this line do not normally need to be changed } {===========================================================================} ) {- end block parameter definition -} checkversion 1.2 evaluate ($log_level=quiet) structure @&structure_infile end coordinates disp=comp @&comp_coordinate_infile coordinates @&main_coordinate_infile if ( &coord_fit = true ) then coord fit sele=&atom_select end end if coord rms sele=&atom_select end evaluate ($overall_rmsd=$result) set display=&list_outfile end display >>>> RMS coordinate deviation calculated between 2 structures: display >>>> structure file= &STRIP%structure_infile display >>>> main coordinate set= &STRIP%main_coordinate_infile display >>>> reference coordinate set= &STRIP%comp_coordinate_infile display display >>>> overall RMS deviation= $overall_rmsd[f8.4] Angstroms display display segid resid RMSD RMSD-main RMSD-side display set display=OUTPUT end for $id in id ( byres(&atom_select) and tag ) loop rmsd show (segid) (id $id) evaluate ($segid=$result) show (resid) (id $id) evaluate ($resid=$result) show norm(rmsd) ( &atom_select and segid $segid and resid $resid ) evaluate ($all=$result) show norm(rmsd) ( &atom_select and segid $segid and resid $resid and &atom_main ) evaluate ($main=$result) show norm(rmsd) ( &atom_select and segid $segid and resid $resid and not ( &atom_main ) ) evaluate ($side=$result) set display=&list_outfile end display $segid[a4] $resid[a4] $all[f8.4] $main[f8.4] $side[f8.4] set display=OUTPUT end end loop rmsd stop