1- #
1+ #
22# AutoDock | Raccoon2
33#
44# Copyright 2013, Stefano Forli
55# Molecular Graphics Lab
6- #
7- # The Scripps Research Institute
8- # _
6+ #
7+ # The Scripps Research Institute
8+ # _
99# (,) T h e
1010# _/
1111# (.) S c r i p p s
1212# \_
1313# (,) R e s e a r c h
14- # ./
14+ # ./
1515# ( ) I n s t i t u t e
1616# '
1717#
@@ -60,8 +60,8 @@ def __init__(self, app, parent, debug=False):
6060 self .resource = self .app .resource
6161 self .dockengine = self .app .dockengine
6262 #self.app.eventManager.registerListener(RaccoonEvents.SetResourceEvent, self.handleResource)
63- self .initIcons ()
64- self .makeInterface ()
63+ self .initIcons ()
64+ self .makeInterface ()
6565
6666
6767 def initIcons (self ):
@@ -88,40 +88,46 @@ def initIcons(self):
8888
8989 def makeInterface (self , resource = None ):
9090 """ """
91- self .makeInterfaceSsh ()
9291 if resource == 'local' :
9392 self .makeInterfaceLocal ()
9493 elif resource == 'ssh' :
9594 self .makeInterfaceSsh ()
9695 elif resource == 'opal' :
97- self .makeInterfaceOpal ()
96+ self .makeInterfaceOpal ()
97+ elif resource == 'boinc' :
98+ self .makeInterfaceBoinc ()
99+ else :
100+ self .makeInterfaceSsh ()
98101
99102
100103 def makeInterfaceLocal (self ):
101104 self .makeInterfaceSsh ()
102105 """ """
103106 pass
104107
108+ def makeInterfaceBoinc (self ):
109+ self .makeInterfaceSsh ()
110+
105111 def openfiles (self , event = None , files = [], quiet = False ):
106112 """ ask for one or more rec files"""
107- title = 'Select receptor file(s), flex res...'
113+ title = 'Select receptor file(s), flex res...'
108114 filetypes = [("Supported ligand formats" , ("*.pdbqt" ,"*.PDBQT" )),
109- ("PDBQT" , ("*.pdbqt" , "*.PDBQT" )), ("Any file type..." , "*" )]
115+ ("PDBQT" , ("*.pdbqt" , "*.PDBQT" )), ("Any file type..." , "*" )]
110116 if not files :
111117 files = tfd .askopenfilename (parent = self .frame , title = title , filetypes = filetypes , multiple = 1 )
112118 files = self ._listfixer (files )
113119 if len (files ):
114- self ._file_checker (flist = files , quiet = quiet )
120+ self ._file_checker (flist = files , quiet = quiet )
115121
116122 def opendir (self , event = None , recursive = False ):
117123 """ scan dir(s) optionally recursively"""
118124 title = 'Select a directory to scan'
119125 if recursive :
120126 title += ' recursively'
121127 # add a GUI feedback:
122- # - GUIvar
128+ # - GUIvar
123129 # - progress bar
124- # progress = tk.StringVar('Processing
130+ # progress = tk.StringVar('Processing
125131 #
126132 dirname = tfd .askdirectory (parent = self .frame , title = title , mustexist = True )
127133 if dirname :
@@ -154,7 +160,7 @@ def addfiles(self, accepted):
154160 #print "ISFLEXI"
155161 flex_res = " " .join (rec_data ['flex_res' ])
156162 chains = " " .join (rec_data ['chains' ])
157- self .recFileManager .listbox .insert ('end' ,rec_data ['name' ], chains ,
163+ self .recFileManager .listbox .insert ('end' ,rec_data ['name' ], chains ,
158164 len (rec_data ['residues' ]), flex_res , types , unk , rec_data ['filename' ])
159165 # EVENT
160166 # XXX TEMPORARY
@@ -164,12 +170,12 @@ def addfiles(self, accepted):
164170 # find the index!
165171 #self.tab1.ligContainer.listbox.delete(0,END)
166172 # XXX Obsolete
167- # pass
173+ # pass
168174 e = RaccoonEvents .UserInputRequirementUpdate ('rec' )
169175 self .app .eventManager .dispatchEvent (e )
170176 self .updatereccount ()
171177
172- ###
178+ ###
173179 def deletefiles (self , nuke = False , event = None ):
174180 if nuke == True :
175181 # EVENT UPDATES
@@ -204,7 +210,7 @@ def deleteallfiles(self):
204210 def updatereccount (self ):
205211 """update labels and list in the config panel in the """
206212 # update the count of accepted receptors
207- msg = 'Accepted structures [ %s ]' % len (self .app .engine .RecBook )
213+ msg = 'Accepted structures [ %s ]' % len (self .app .engine .RecBook )
208214 self .recGroup .configure (tag_text = msg )
209215 ## XXX THIS IS THE CONFIG PANEL ENTRY
210216 ## self.GUI_rec_list_container.insert('end', rec_data['name'])
@@ -233,8 +239,8 @@ def _file_checker(self, flist, quiet=False):
233239 if not quiet :
234240 def close (event = None ):
235241 win .destroy ()
236-
237- win = Pmw .Dialog (self .frame , title = 'Report' ,
242+
243+ win = Pmw .Dialog (self .frame , title = 'Report' ,
238244 buttons = ('Close' ,), command = close )
239245 # XXX
240246 bbox = win .component ('buttonbox' )
@@ -307,15 +313,15 @@ def makeInterfaceSsh(self):
307313 ]
308314 # make menu
309315 menu = rb .RacMenu (b , addrec_items , toolbar = toolb )
310- #
311- #tk.Button(toolb, text='Settings\n&\nAlignment...', compound='top', image = self._ICON_sys, width=32,
316+ #
317+ #tk.Button(toolb, text='Settings\n&\nAlignment...', compound='top', image = self._ICON_sys, width=32,
312318 # font=self.FONTbold, **bset ).pack(anchor='n', side='top',pady=1)
313319 toolb .pack (side = 'left' , anchor = 'w' , expand = 0 , fill = 'y' ,pady = 0 )
314320
315321 # files manager
316322 self .recFileManager = TkTreectrl .ScrolledMultiListbox (self .recGroup .interior (), bd = 2 )
317323 self .recFileManager .listbox .config (bg = 'white' , fg = 'black' , font = self .FONT ,
318- columns = ('name' , 'chains' , 'res.' , 'flex_res' ,
324+ columns = ('name' , 'chains' , 'res.' , 'flex_res' ,
319325 'atom types' , 'unk.types' , 'filename' ),
320326 selectmode = 'extended' ,
321327 )
0 commit comments