24 from Tkinter
import Listbox
32 Loads a Folder through the tk File Dialog. Uses and Sets current directory.
35 dir_name = tkFileDialog.askdirectory(initialdir=global_variables.current_directory, title=
'Pick a directory')
40 global_variables.current_directory = dir_name
45 Loads a File through the tk File Dialog. Uses and Sets current directory.
47 filename = tkFileDialog.askopenfilename(initialdir=global_variables.current_directory, title=
'Pick a file')
50 filename = self.fixFilename(filename)
51 global_variables.current_directory = os.path.dirname(filename)
57 Rosetta cannot use spaces in the filename...
63 for i
in range (1,
len(x)):
64 newFile = newFile +
"\ " + x[i]
72 Returns a list of PDB files within a directory.
73 check_button_ck if it returns the full path..
76 directorylist =os.listdir(dir)
77 directorylist = list(directorylist)
78 for Files
in directorylist:
79 if re.search(
".pdb", Files):
82 directorylist.remove(Files)
87 Adds constraint from file to pose and score. Sets all constraint_types to 1.0.
88 Can pass an array of constraint_types.
90 if pose.total_residue()==0:
91 print "Please load a pose."
93 if not constraint_types:
94 constraint_types = [atom_pair_constraint, angle_constraint, dihedral_constraint, coordinate_constraint, constant_constraint]
96 if not constraint_file:
97 constraint_file = tkFileDialog.askopenfilename(initialdir=global_variables.current_directory, title =
"Open Constraint File")
98 if not constraint_file:
return
99 global_variables.current_directory = os.path.dirname(constraint_file)
100 print "Setting constraints to pose and scorefunction at default weight of 1.0 if not already set. "
101 setup = ConstraintSetMover()
102 setup.constraint_file(constraint_file)
105 for constraint
in constraint_types:
106 if score.get_weight(constraint)==0:
107 score.set_weight(constraint, default_weight)
108 return constraint_file
112 Returns ResidueTypeSet from an array of paths.
117 for p
in param_path_array:
120 ind = loaded_path_array.index(p)
123 loaded_path_array.append(p)
124 if not params:
return
125 params_paths = utility.vector1_string()
126 params_paths.extend(list(params.keys()))
128 print "Nonstandard residue type set loaded."
129 return residuetypeset, loaded_path_array
Fstring::size_type len(Fstring const &s)
Length.
def generate_nonstandard_residue_set