17 from rosetta
import Pose
18 from rosetta
import pose_from_pdb
22 pack =
True , design =
False , input_sc =
True ,
23 freeze = [] , specific = {} ):
25 Writes a resfile for <pose> named <resfilename>
26 <pack> = True allows packing by default
27 <design> = True allows design using all amino acids by default
28 <input_sc> = True allows usage of the original side chain conformation
29 <freeze> is an optional list of (pose) residue numbers to exclude
30 (preserve the side chain conformations of these residues)
31 <specific> is an optional dictionary with (pose) residue numbers as keys
32 and resfile keywords as corresponding values
33 (for setting individual residue options, it may be easier to add
34 these numbers to freeze and edit the resfile manually)
37 generate_resfile_from_pose(pose,'1YY8.resfile')
49 header +=
'ALLAA\n# ALLAA will NOT work on bridged Cysteines\n'
53 header +=
'USE_INPUT_SC\n'
54 to_write = header +
'start\n'
61 info = pose.pdb_info()
63 if info
and info.nres():
64 for i
in specific.keys():
65 num = pose.pdb_info().number(i)
66 chain = pose.pdb_info().chain(i)
67 to_write += str(num).
rjust(4) + str(chain).
rjust(3) +
' ' + specific[i] +
' \n'
69 for i
in specific.keys():
72 to_write += str(num).
rjust(4) + str(chain).
rjust(3) +
' ' + specific[i] +
' \n'
73 f =
open(resfilename,
'w')
79 pack =
True , design =
False , input_sc =
True ,
80 freeze = [] , specific = {} ):
82 Writes a resfile for the PDB file <pdbfilename> named <resfilename>
83 <pack> = True allows packing by default
84 <design> = True allows design using all amino acids by default
85 <input_sc> = True allows usage of the original side chain conformation
86 <freeze> is an optional list of (pose) residue numbers to exclude
87 (preserve the side chain conformations of these residues)
88 <specific> is an optional dictionary with (pose) residue numbers as keys
89 and resfile keywords as corresponding values
90 (for setting individual residue options, it may be easier to add
91 these numbers to freeze and edit the resfile manually)
94 generate_resfile_from_pdb('1YY8.pdb','1YY8.resfile')
96 generate_resfile_from_pose
101 p = pose_from_pdb(pdbfilename)
106 def __init__( self , pose , resfilename , pack = True , design = False , input_sc = True , freeze = [] , specific = {} ):
bool open(utility::io::izstream &db_stream, std::string const &db_file, bool warn)
Open a database file on a provided stream.
Fstring rjust(Fstring const &s)
Right-Justified Copy.