# Copyright (c) 2002-08 Peter Guntert. All rights reserved. ## 7MACROS: overview - CYANA macro ## ## Parameters: file=.ovw (default: ) ## structures= (default: 0) ## range= (default: ) ## reference= (default: ) ## significant= (default: -1) ## hbond= (default: -1) ## mode=sum|average|rms (default: rms) ## ang ## cor ## pdb ## mean ## details ## ## Sorts the selected structures with regard to their target function value ## and creates an overview file name.ovw for the first n of these structures. ## If the name parameter is not specified and if a variable with name name is ## defined, then its value is used as name. ## Pair-wise RMSDs are calculated for the given residue range (see command ## rmsd). The RMSD calculation can be suppressed by setting range=-. If the ## range parameter is not specified and if a variable with name rmsdrange is ## defined, then its value is used as residue range. ## Optionally, output angle (ang), DG coordinate (cor) or PDB coordinate ## (pdb) files of the structures may be written with file names "name.ang", ## "name.cor" or "name.pdb", respectively. ## The structures may be analyzed for hydrogen bonds (option hbond), or for ## violations of steric lower distance limits (option vdw). ## Note: Because the target function is re-calculated, it is important that ## all restraints used for the calculation of the structures are present and ## that the same weights are used. ## An overview file may contain four different tables: ## For each structure: the target function value, the numbers, sums and ## maxima of restraint violations (the output of the structure list ## command). ## For each violated restraint: the structures in which it is violated by ## more than the corresponding cutoff value (the output of the structure ## violate command). By default, violations are shown only if they occur in ## at least one third of the conformers. To obtain a listing of all ## violations larger than the cutoffs, the option full must be set. ## For all pairs of structures: the RMSD for the backbone and all heavy ## atoms (output of the rmsd command). By default only the average value of ## all pairwise comparisons is written. A table with the individual pairwise ## RMSD values is created only if the option full is set. var echo i n rms rmsstd rmsmin rmsmax thisrange syntax $macro:file=@f.ovw= structures=@i=0 range=*= reference=*= \ significant=@i=-1 hbond=@i=-1 mode=sum|average|rms=rms \ ang cor pdb mean details subroutine write_overview var info if (significant.lt.0) significant=max(1,n/3) structure violate $mode significant=$significant if (details) then structure secondary structures=significant mode=simple angles flip info=none angles split print angles ramachandran print if (hbond.lt.0) hbond=significant end if if (hbond.gt.0) then structure hbond structures=hbond print end if range='$range' if (range.eq.' ') then range:=$external('rmsdrange') range='$range' end if if (n.ge.2 .and. range.ne.'-') then if (range.eq.' ') then info:=none overlay unset info range=selrangeshort end if rmsd range=$range reference=$reference overlayed:=$range else if (n.eq.1 .and. range.ne.'-' .and. '$reference'.ne.' ') then rmsd range=$range reference=$reference overlayed:=$range end if end if (.not.master) return echo := off n=nstruct if (structures.gt.0) n=min(structures,nstruct) if (n.eq.0) error "No structures selected." if ('$file'.eq.' ' .and. (ang .or. cor .or. pdb)) error "Missing filename." structure sort structure select / 1..$istruct(n) info=none if ('$file'.eq.' ') then write_overview else structure list $mode write_overview >$file. print " Overview file \"$file\" written." end if if (ang) write ang $file(1:indexr('$file','.'))ang all if (cor) then write cor $file(1:indexr('$file','.'))cor all if (mean) write cor $file(1:indexr('$file','.')-1)-mean.cor end if if (pdb) then write pdb $file(1:indexr('$file','.'))pdb all if (mean) write pdb $file(1:indexr('$file','.')-1)-mean.pdb end if