34 tot=pose.total_residue()
35 print "Residue - Phi - Psi"
36 for i
in range(1, tot+1):
37 print repr(pose.pdb_info().number(i))+
" "+repr(pose.phi(i))+
" "+repr(pose.psi(i))
40 for i
in range(0, pose.total_residue()):
41 pose.energies().
show(i)
43 def rmsd(native, p, loops_as_strings, ca_only = False, all_atom=False):
45 Prints + Returns RMSD for Full Protein, as well as any loops in loops_as_strings.
49 rms = CA_rmsd(native, p)
53 rms = all_atom_rmsd(native, p)
57 rms = bb_rmsd(native, p)
70 if all_atom:bb_only =
False
72 loop_rmsd_map = dict();
74 all_rosetta_loops = Loops()
75 for loop_string
in loops_as_strings:
76 rosetta_loop = loop_tools.return_rosetta_Loop(p, loop_string)
77 single_loops = Loops()
79 single_loops.add_loop(rosetta_loop)
80 all_rosetta_loops.add_loop(rosetta_loop)
82 lrms = loop_rmsd(p, native, single_loops, ca_only, bb_only)
83 print "Region "+loop_string
84 print "%.3f RMSD"%lrms
85 loop_rmsd_map[loop_string]=lrms
86 lrms = loop_rmsd(p, native, all_rosetta_loops, ca_only, bb_only)
87 loop_rmsd_map[
"total"]=lrms
88 print "Regions Average: "
89 print "%.3f RMSD"%lrms
91 return rms, loop_rmsd_map
94 File =
open(fileName,
'r')
97 lineSplit = line.split()
98 if lineSplit[0]!=
"pdb":
100 for i
in range(3, (
len(lineSplit)/2)+2):
101 if not fascData.has_key(lineSplit[1]):
102 fascData[lineSplit[1]]=dict()
103 fascData[lineSplit[1]][lineSplit[x-1]]=lineSplit[x]
110 pack_mover = PackStatMover()
111 print "\nSee the paper on RosettaHoles to find out more about this statistic (Protein Sci. 2009 Jan;18(1):229-39.)"
115 print "Analyzing Interface. "
116 print "\nNo references are directly associated with this protocol. It was used with Documentation for AnchoredDesign application (see that app's documentation) and CAPRI21 interface descrimination. (Steven Lewis)"
117 print "The Mover will seperate chains defined in the interface to calculate energy differences. Repacking is recommended."
119 if (p.conformation().num_chains()==2):
122 chains = tkSimpleDialog.askstring(title =
"-fixedchains", prompt =
"Please input chains to keep fixed - seperated by a space")
125 chains = chains.split()
128 pack_together = tkMessageBox.askyesno(message=
"rePack before separation")
129 pack_separated = tkMessageBox.askyesno(message=
"rePack after separation (Recommended)")
131 if (p.conformation().num_chains()==2):
132 interface_mover = InterfaceAnalyzerMover(1,
True, scorefxn,
False, pack_together, pack_separated,
False)
133 interface_mover.apply(p)
139 for i
in range(1, p.total_residue()+1):
140 if (p.pdb_info().
chain( i ) == chain):
141 chain_ids.append( p.chain(i))
145 print "Fixedchains: "+repr(chains)
146 interface_mover = InterfaceAnalyzerMover(rosetta.Set(chain_ids),
True, scorefxn,
False, pack_together, pack_separated,
False )
147 interface_mover.use_tracer(
True)
148 interface_mover.apply(p)
149 print "Interface Analyzer complete."
153 Uses AnalyzeLoopMover to print loop information.
154 To accurately use this, add cutpoint variants using the FullControl Window.
157 if not loops_as_strings:
return
158 loops_object = loop_tools.InitializeLoops(p, loops_as_strings)
159 loop_mover = LoopAnalyzerMover(loops_object,
True)
164 Uses VIP mover to get Mutational information.
165 Should be threaded, which will be added soon.
167 vip_mover = VIP_Mover()
168 vip_mover.set_initial_pose(p)
170 print "\nThis is going to take some time...."
171 print "This code uses the RosettaHoles approach to identify problematic buried cavities, and suggests a set of mutations that are predicted to improve stability as determined by improvements to the RosettaHoles and Rosetta fullatom energy scores."
172 print "NOTE: For full options, please see the Rosetta application."
173 print "Please see Borgo, B., Havranek, J.J. (2012), 'Automated selection of stabilizing mutations in designed and natural proteins', Proc. Natl. Acad. Sci. USA, v.109(5) pp.1494-99."
175 if (tkMessageBox.askyesno(message=
"Continue?")):
179 cycles = tkSimpleDialog.askinteger(title =
"Cycles", prompt=
"Please enter max cycles", initialvalue=rosetta.basic.options.get_integer_option(
'cp:ncycles'))
185 while (not_finished):
188 out = vip_mover.get_final_pose()
189 print "Comparing new energy " + repr(
scorefxn(out)) +
" with old energy " + repr(old_energy)
196 for j
in range(1, p.total_residue()+1):
197 if( out.residue(j).
name() != p.residue(j).
name() ):
198 position = out.pdb_info().number(j)
199 pdb_chain = out.pdb_info().
chain(j)
200 print "Accepting mutation at position "+repr(pdb_position)+
" chain "+pdb_chain +
" from " +p.residue(j).
name() +
" to " +out.residue(j).
name()
205 Used in full control window to get energy and probability of the rotamer.
210 Returns the energy of the rotamer/scoretype by talaris2013.
214 res = p.pdb_info().pdb2pose(chain,
int(res))
215 score = create_score_function(
"talaris2013")
216 emap = core.scoring.EMapVector()
217 score.eval_ci_1b(p.residue(res), p, emap)
223 Returns probability of rotamer based on -ln(p)=E -> p = e^-E
StringOptionKey const chain
BooleanOptionKey const range
Fstring::size_type len(Fstring const &s)
Length.
void show(utility::vector1< T_ > vector)
bool open(utility::io::izstream &db_stream, std::string const &db_file, bool warn)
Open a database file on a provided stream.
rule< Scanner, string_closure::context_t > name