########################################################################################################################
###                                                                                                                  ###
###       Two-component design - Stage IV resfile based design                                                       ###
###       ( Compatible with the Rosetta SVN code repository Revision 52869 )                                         ###
###                                                                                                                  ###
###       Accurate design of coassembling multi-component protein nanomaterials                                      ###
###       King NP, Bale JB, Sheffler W, McNamara DE, Gonen S, Gonen T, Yeates TO, Baker D                            ###
###       Nature 2014, Supplementary Data                                                                            ###
###                                                                                                                  ###
###       Run the command line below for an example of the stage IV design protocol used for the T32 designs.        ###
###       -The input rotational and translational rigid body degrees of freedom (a1a2 and r1r2), as well as the      ###
###        input resfiles, are from the stage III output.                                                            ###
###       -The ../input.pdb file contains a single subunit from PDB ID 3N79 biounit 1 and a single subunit from      ###
###        PDB ID 3GFA biounit 1 prepared as described in the Supplementary Information.                             ###
###       -This same protocol can be executed on other input scaffolds and with different symmetries by changing     ###
###        the ../input.pdb, ../input.sym, design.resfile, and input_ALLAA.resifle files, along with the script_vars:###
###         -symdef is the path to the symmetry definition file.                                                     ###
###         -symdof1 and symdof2 are the names of the tags used to define the symmetric degrees of freedom (DOFs)    ###
###          for each of the components in the symmetry definition file (see set_dof in ../input.sym).               ###
###         -a1a2 and r1r2 are comma-separated lists of the values for the initial rotational and translation        ### 
###          rigid body DOFs for each component.                                                                     ###
###         -The flip_axis variable can be used to rotate the input subunits 180 degrees about the specified axes    ###
###          before applying the initial rotations and displacements specified by the a1a2 and r1r2 variables. This  ###
###          is useful in combination with the tcdock::reverse option for two-component docking.                     ###
###       -Differences between the xml files used for the T32 and T33 designs in this study are noted in the         ###
###        stage_IV_resfile_design.xml file.                                                                         ###
###                                                                                                                  ###
########################################################################################################################

path_to_rosetta_scripts_executable \
	-database path_to_rosetta_database \
	-s ../input.pdb \
	-in::file::native ../input.pdb \
	-parser:protocol stage_IV_resfile_design.xml \
	-parser:script_vars symdef="../input.sym" symdof1="JTP1" symdof2="JDP1" a1a2="168.561,93.3816" r1r2="-60.9023,-63.775" flip_axis="0,0" refine_resfile="design.resfile" allaa_resfile="input_ALLAA.resfile" \
	-nstruct 1 \
	-ex1 \
	-ex2 \
	-mute core.conformation.symmetry.SymmData core.conformation.SymmetryInfo \
	-holes::dalphaball path_to_DAlphaBall_executable \
	-correct \
	-no_his_his_pairE \
	-score::hbond_params correct_params \
	-lj_hbond_hdis 1.75 \
	-lj_hbond_OH_donor_dis 2.6 \
	-use_incorrect_hbond_deriv false \
	-out::suffix  _design
