Skip to content

Instantly share code, notes, and snippets.

@ajasja
Created January 23, 2019 00:15
Show Gist options
  • Save ajasja/031c9f8e2da4c99484d6a10c4081f287 to your computer and use it in GitHub Desktop.
Save ajasja/031c9f8e2da4c99484d6a10c4081f287 to your computer and use it in GitHub Desktop.
#Pyrosetta unsupported BuriedUnsatHbonds2 InterfaceHoles CavityVolume
pack_protocol = """<ROSETTASCRIPTS>
<SCOREFXNS>
### add Nov15 energy function with coordinate constraints
<ScoreFunction name="NOV15" weights="beta" >
<Reweight scoretype="coordinate_constraint" weight="1" />
</ScoreFunction>
<ScoreFunction name="VDW" weights="empty" >
<Reweight scoretype="fa_atr" weight="1.0" />
</ScoreFunction>
### ADDED FOR SCORING FILTERS
<ScoreFunction name="TotalHydrophobic" weights="/home/fseeger/PPI_Benchmark/Design_Scripts/total_hydrophobic_weights.wts"/>
</SCOREFXNS>
<RESIDUE_SELECTORS>
Layer name="core" select_core="true" use_sidechain_neighbors="false" core_cutoff="35" />
<Layer name="core" select_core="true" use_sidechain_neighbors="true" core_cutoff="3.6" />
### select chain A
<Chain name="chainA" chains="A"/>
### select chain B
<Chain name="chainB" chains="B"/>
### select interface of chainB close within 8.0 A of chainA
<Neighborhood name="interface_chA" selector="chainB" distance="8.0"/>
### select interface of chainA close within 8.0 A of chainB
<Neighborhood name="interface_chB" selector="chainA" distance="8.0"/>
### select intersection of chain A and Chain B interface
<And name="AB_interface" selectors="interface_chA,interface_chB" />
### select everything but the designable interface residues
<Not name="Not_interface" selector="AB_interface" />
### select the core and the interface
<And name="core_and_interface" selectors="core,AB_interface" />
<InterfaceByVector name="interface_by_vec" cb_dist_cut="11" nearby_atom_cut="5.5" vector_angle_cut="75" vector_dist_cut="9"
grp1_selector="chainA" grp2_selector="chainB"/>
<And name="core_and_interface_by_vec" selectors="interface_by_vec,core" />
</RESIDUE_SELECTORS>
<SIMPLE_METRICS>
<SelectedResiduesPyMOLMetric name="AB_interface" residue_selector="AB_interface" custom_type="AB_interface" />
<SelectedResiduesPyMOLMetric name="core_and_interface" residue_selector="core_and_interface" custom_type="core_and_interface" />
<SelectedResiduesPyMOLMetric name="interface_by_vec" residue_selector="interface_by_vec" custom_type="interface_by_vec" />
<SelectedResiduesPyMOLMetric name="core_and_interface_by_vec" residue_selector="core_and_interface_by_vec" custom_type="core_and_interface_by_vec" />
</SIMPLE_METRICS>
<TASKOPERATIONS>
</TASKOPERATIONS>
<FILTERS>
</FILTERS>
<MOVERS>
<RunSimpleMetrics name="run_metrics_selection" metrics="AB_interface,core_and_interface,interface_by_vec,core_and_interface_by_vec" prefix="" />
</MOVERS>
<PROTOCOLS>
<Add mover="run_metrics_selection" />
</PROTOCOLS>
<OUTPUT />
</ROSETTASCRIPTS>"""
task_design = rosetta_scripts.SingleoutputRosettaScriptsTask(pack_protocol)
# Syntax check via setup
logging.basicConfig(level=logging.WARN)
task_design.setup()
raw_input_pose = io.pose_from_file(filename="data/ZCON_37_N3_C1_2.pdb")
output_pose = task_design(raw_input_pose)
output_pose.scores
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment