Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
protocols.py
Go to the documentation of this file.
1 #!/usr/bin/python
2 
3 # (c) Copyright Rosetta Commons Member Institutions.
4 # (c) This file is part of the Rosetta software suite and is made available under license.
5 # (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
6 # (c) For more information, see http://www.rosettacommons.org. Questions about this can be
7 # (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
8 
9 ## @file /GUIs/pyrosetta_toolkit/modules/tools/protocols.py
10 ## @brief basic protocol functions
11 ## @author Jared Adolf-Bryfogle (jadolfbr@gmail.com)
12 
13 
14 from rosetta import *
15 import tkFileDialog
16 import tkMessageBox
17 import tkSimpleDialog
18 from Tkinter import Listbox
19 import os
20 import re
21 
22 
23 
24 def toCen(p):
25  print "Switching to Centroid"
26  to_cen = SwitchResidueTypeSetMover('centroid')
27  to_cen.apply(p)
28  return p
29 
30 def toFA(start, p):
31  print "Switching to Full Atom"
32  recover_sidechains = ReturnSidechainMover(start)
33  #task_pack = TaskFactory.create_packer_task(start)
34  #task_pack.restrict_to_repacking()
35  #task_pack.or_include_current( True )
36  #score = create_score_function_ws_patch('standard', 'score12')
37  #pack = PackRotamersMover(score, task_pack )
38  to_FA = SwitchResidueTypeSetMover('fa_standard')
39  to_FA.apply(p)
40  recover_sidechains.apply(p)
41  #pack.apply(p)
42 
43  return p
44 
45 
46 def bbMover(p, res, chain, phi, psi, omega, score):
47  """
48  Moves individual Phi and Psi angles
49  """
50 
51  res = p.pdb_info().pdb2pose(chain, res)
52  p.set_phi(res, phi)
53  print score(p)
54  p.set_psi(res, psi)
55  print score(p)
56  p.set_omega(res, omega)
57  print score(p)
58 
59  return p
60 
61 
62 
63 
64