# YASARA MACRO # TOPIC: 5. Structure Determination # TITLE: Solve an NMR structure with fixed quality # REQUIRES: YASARA Structure and NMR Structure Determination Module # AUTHOR: Elmar Krieger, Sander Nabuurs, Chris Spronk # LICENSE: GPL # DESCRIPTION: This macro solves an NMR structure based on a protein sequence and a restraint file in XPLOR format. Contrary to the normal nmr_solve macro, it refines only those structures in water, that match a quality criterion, and performs an unlimited number of folding runs until the ensemble has the requested size # To solve a structure with fixed quality, you need: # - The protein sequence, in FASTA or PDB format, # default filenames are 'sequence.pdb' or 'sequence.fasta' # - A file with distance and dihedral angle restraints, # default filename is 'restraints.tbl' # # You can either set the target by clicking on Options > Macro > Set target, # or by uncommenting the line below and specifying it directly. #macrotarget = 'c:\MyProject\1crn' # If you want to change the defaults, do it here # (look in nmr_setdefaults to see what you can change) # Number of structures in the ensemble ensemblesize=20 # Continue indefinitely until we have enough structures try=1 current=001 while current<=ensemblesize # Fold only one structure at a time structures=1 # To avoid infinite loops, we slightly increase the scaling factors with every try # (and most importantly, this also makes sure that every structure is different) defaultpar='Average=Sum, Ceil=100, ScaleDis=(25.0+0.1*try), ScaleDih=(5.00+0.01*try)' # Fold the structure from the stretched out conformation include nmr_fold # Create something that looks like a real protein by in vacuo refinement include nmr_refinevacuo # Load the best structure from in vacuo refinement Clear LoadPDB (ensemblefile)(current) LoadTbl (restrainfile),1 # See if it's acceptable, insert your condition here dissum,dismax,dihsum,dihmax=RestViol if dismax<0.5 and dihmax<20 # Structure is acceptable, maximum distance violation<0.5 A, dihedral violation<20 degrees LogAs (logfile),append=yes,print 'Try (try): Quality conditions satisfied, accepted as structure (current) in the ensemble.' current=current+1 else LogAs (logfile),append=yes,print 'Try (try): Quality conditions violated, dismax=(0.0+dismax), dihmax=(0.0+dihmax), folding a new structure.' try=try+1 structures=ensemblesize # Use everything we got to arrive at an accurate structure by water refinement include nmr_refinewater # Analyze the quality and create the final bundle include nmr_analyze