###       Computational Design of Self-Assembling Cyclic Protein Homo-oligomers 
###       Fallas, JA, Ueda G, Sheffler W, Nguyen V, MvNamara DE, Sankaran B, Pereira JH, Parmeggiani F, Brunette T, 
###       Cascio D, Yeates T, Zwart P, Baker D
###       Nature Chemistry 2017                                                                            

#####################################################################################################################
###                                                                                                                  
###       Cyclic docking protocol                                                                             	     
###       The version of the cyclic docking executable ("sicdock") used in this example is available upon request.                   
###                                                                                                                  
###       Run the command lines below for an example of the docking protocol used to generate Cn (n-fold) configurations.                    
###       -The input.pdb file contains a single subunit from PDB ID 1NA0
###       -This same protocol can be executed on other input scaffolds and with different symmetries by changing     
###        the input PDB files and the corresponding -nfold
###       -The motif database folder xs_bb_ss_AILMV_sf5_std contains precompiled motifs and scores. While this is 
###        denoted in the dock.flags file, the identity of database can be altered (e.g. compiled with different amino 
###        acid types or bin scoring schemes).

#####################################################################################################################

path_to_sicdock_executable -database path_to_rosetta_database -s input.pdb @dock.flags


#####################################################################################################################
###                                                                                                                  
###       Cyclic design protocol                                                                              
###                                                                                                                  
###       Run the command line below for an example of the design protocol used to design cyclic homooligomers.         
###       -The docked_input.pdb file should contain a single subunit of a docked configuration (output from cyclic docking step,
###        aligned to vector [0,0,1])
###       -This same protocol can be executed on other input scaffolds and with different symmetries by changing     
###        the input.pdb and input.sym files ("symmfile"), respectively.  
###       -"symmfile" is the path to the symmetry definition file (e.g. C3_Z.sym, C2-C6 are included in this folder).                                
###	  -"nstruct" can be modified to desired number of trajectories, but will impact total computational time.                     
###        Due to the stochastic nature of the rigid body perturbations (Symmetrizer) and the Rosetta interface design calculations,
###        output will vary as only a subset of design trajectories are expected to pass all of the enforced filters. 
###	  -"resfile" is a file output from the docking stage using the sicdock program. This contains a Rosetta-readable list of 
###	   allowed amino acid types at core interface positions during interface design with the designCx.xml file.  
###
#####################################################################################################################

path_to_rosetta_scripts_executable -database path_to_rosetta_database -s docked_input.pdb -nstruct 1000 -in::file::native input.pdb -parser:protocol designCx.xml -parser:script_vars resfile=dock_output.resfile symmfile=C3_Z.sym @design.flags -out:path:all path_to_output_dir
