To set up sequential assignment by ASAP program, pls put script ASAP_fix.py in the same folder with the following files:
1. The protein sequence file(.txt) that specifies your protein sequence, in upper-cased single letter abbr. 
   This is specified in ASAP_fix.py by "protein_seq" at line 16. Pls make sure you have it right.
2. The file containing the residue type assignment from well-resolved ncacx spectrum as described in manuscript. 
   This is specified in ASAP_fix.py by "ncacx_filename"" at line 15. Pls make sure you have it right.
3. The file containing the peak list from poorly resolved ncocx spectrum as described in manuscript.
   This is specified in ASAP_fix.py by "ncocx_filename"" at line 17. Pls make sure you have it right.

Open ASAP_fix.py with you preferred compiler, update the following parameters to your desire:

1. Line 18: run_num. The number of parallel runs ASAP is to undertake. 
   Change it to what you like. For large proteins with overlapping resonances, we would suggest it to be 10 or more, so you can see consistently allocated 
   assignments and identify those likely reaching their global minima.
2. Line 20: nstep. The number of annealing steps. We would advise users to set this value and that of scale (line 38) following Eqs. 20 and 21 in manuscript.
   Or more accurately, users should run a single short ASAP simulation, check the results by script Plot_occupancy_sum to determine the optimized nstep and scale.
   You can find the instruction how to use Plot_occupancy_sum in folder "PlottingScripts".
3. Line 38: scale. It is the parameter scalar described in manuscript that controls the slope of annealing. Users need to follow Eqs. 20 and 21 in manuscript 
   to set it correctly, or use script Plot_occupancy_sum to do so, as described above.
4. Line 63: nattempt. This is the parameter N_a in the manuscript, the number of Monte Carlo attempts at each annealing step. Users need to follow Eqs. 13, 20 and 21 in manuscript 
   to set it correctly, or use script Plot_occupancy_sum to do so, as described above.
5. Line 40: nfreq_nca. This is the number of frequencies in your ncacx_filename that is mandate to find a match in unassigned peak list of ncacx_filename.
   It should be a number smaller than the second number at the first row in ncacx_filename(which is the maximum number of CSs you use to make residue type 
   assignment in ncacx_filename). The larger nfreq_nca it is, the better distinction between different residue type assignments you have, but it may lead to
   false negative report by ARTIST that you dont have a match for the input. The smaller nfreq_nca it is, the more likely you will find a coincidental match.
   You need to adjust this value to find at least one match for most of the residue type assignments in ncacx_filename, and hopefully, a majority of the identified
   match are a unique match, so you will have a smooth convergence towards global minima for subsequent ASAP sequential assignment. 
6. Line 41 and 47 are the global control for CS uncertainties that can impact the ARTIST match pairing. Users can use them to adjust those and check the match pairing
   results.

#################################################################################################################################
The following are parameters that can be left as they are:
1. w1f, w2f, w3f and w4f at Line 54, 56, 58 and 60. We would advise users to leave them as 20, 50, 5 and 10. They work well for the 237-residue Rous sarcoma 
   virus capsid protein tubular assembly. Of course, you have the freedom to try whatever you like. Maybe you will find something better.
2. Line 64: probzero_i. This is the probability to make a null assignment at each Monte Carlo attempt.
##################################################################################################################################
Those parameters not introduced in manuscript(such as line 26 rigor, line 28 penalty, etc) pls dont change them. They are for future development purpose.

###################################################################################################################################
The following are specification of output files:
Line 68: match_filename. It specifies the summary of ARTIST match pairing.
Line 69: matchdetail_filename. It specifies the details of ARTIST match pairing.
Line 71: overlap_filename. It specifies the number of residue type assignments in ncacx_filename with overlapping amide nitrogen frequencies and sufficiently different
         secondary chemical shifts to incur type 2 local minima, listed in the order of each residue type assignments in ncacx_filename.
Line 72: consistency_filename. It specifies the residue positions that are occupied by the same residue type assignments in ncacx_filename in all parallel ASAP runs (value as 1). Those 
         positions occupied by different assignments are assigned value 0.
Line 73: consistencynca_filename. It specifies the residue type assignments in ncacx_filename that are allocated to the same residue positions in all parallel ASAP runs (value as 1).Those 
         positions occupied by different assignments are assigned value 0.
Line 74: neighbor_filename. It stores the 3D matrix described in manuscript to track assignments allocated to the neighboring positions of each residue type assignment in ncacx_filename at each annealing step. 
         It is the input file for plotting script "Plot_neighbor". 
Line 75: Instigator_filename. It stores the total counts of allocations for each residue type assignment in ncacx_filename as a function of annealing steps.
         It is the input file for plotting script "Plot_Instigator". 
Line 76: occypancysum_filename. It stores the total counts of allocations for each residue position as a function of annealing steps.
         It is the input file for plotting script "Plot_occupancy_sum". 
Line 77: occypancystep_filename. It stores the total counts of allocations for each residue type assignment at each residue position as a function of annealing steps.
         It is the input file for plotting script "Plot_occupancy_step". 
Line 78: knamtch_filename. It stores the number of matched pairs in ncocx for each residue type assignment in ncacx identified by ARTIST.
         It is the input file for plotting script "Plot_nmatch".
Line 79: runrecord_filename. It stores the report of the n_g, n_b, n_e, and n_used along with other parameters during sequential assignment.
Line 81 and 82: ncacx/ncocx4nextrd_filename. They record the residue type assignments and individual resonances with updated last column (residue type assignment column)
         that registers the allocated positions by those consistently assigned signals. They can be used as input for next iterations.
Line 87: numberrecord_filename. It stores the average of n_g, n_b, n_e, and n_used along annealing process of all parallel ASAP runs.
         It is the input file for plotting script "Plot_numbers".
Line 90: runsummary_filename. It records the total number of n_g, n_b, n_e, and n_used of each parallel ASAP run.
Line 92: asgn_basename. It specifies the base file name that stores the details of Monte Carlo attempts during sequential assignments. For debug use only.
Line 94 and 95: ncacx/ncocx4bk_filename. They store the residue type assignments and individual resonances with updated last column (residue type assignment column)
         that registers the allocated positions for each signal, for each of parallel ASAP run.
######################################################################################################################################  




 