def modifyAdjustAll(self): """ Adjust all atoms. """ if debug_flags.atom_debug: print "debug: reloading sim_commandruns on each use, for development" import simulation.sim_commandruns as sim_commandruns reload_once_per_event(sim_commandruns) from simulation.sim_commandruns import Minimize_CommandRun cmdrun = Minimize_CommandRun( self, 'All', type = 'Adjust') cmdrun.run() return
def ok_btn_clicked(self): """ Slot for OK button """ QDialog.accept(self) if env.debug(): print "ok" self.gather_parameters() ### kluge: has side effect on env.prefs # (should we pass these as arg to Minimize_CommandRun rather than thru env.prefs??) if debug_flags.atom_debug: print "debug: reloading runSim & sim_commandruns on each use, for development" import simulation.runSim as runSim reload_once_per_event(runSim) # bug: only works some of the times runSim.py is modified, # don't know why; might be that sim_commandruns.py # also needs to be modified, but touching them both # doesn't seem to work consistently either. # [bruce 080520] import simulation.sim_commandruns as sim_commandruns reload_once_per_event(sim_commandruns) from simulation.sim_commandruns import Minimize_CommandRun # do this in gather? if self.minimize_all_rbtn.isChecked(): self.seltype = 'All' seltype_name = "All" else: self.seltype = 'Sel' seltype_name = "Selection" self.win.assy.current_command_info( cmdname=self.plain_cmdname + " (%s)" % seltype_name) # cmdname for Undo update_cond = self.ruc.get_update_cond_from_widgets() engine = self.minimize_engine_combobox.currentIndex() env.prefs[Minimize_minimizationEngine_prefs_key] = engine cmdrun = Minimize_CommandRun(self.win, self.seltype, type='Minimize', update_cond=update_cond, engine=engine) cmdrun.run() return
def ok_btn_clicked(self): """ Slot for OK button """ QDialog.accept(self) if env.debug(): print "ok" self.gather_parameters() ### kluge: has side effect on env.prefs # (should we pass these as arg to Minimize_CommandRun rather than thru env.prefs??) if debug_flags.atom_debug: print "debug: reloading runSim & sim_commandruns on each use, for development" import simulation.runSim as runSim reload_once_per_event(runSim) # bug: only works some of the times runSim.py is modified, # don't know why; might be that sim_commandruns.py # also needs to be modified, but touching them both # doesn't seem to work consistently either. # [bruce 080520] import simulation.sim_commandruns as sim_commandruns reload_once_per_event(sim_commandruns) from simulation.sim_commandruns import Minimize_CommandRun # do this in gather? if self.minimize_all_rbtn.isChecked(): self.seltype = 'All' seltype_name = "All" else: self.seltype = 'Sel' seltype_name = "Selection" self.win.assy.current_command_info(cmdname = self.plain_cmdname + " (%s)" % seltype_name) # cmdname for Undo update_cond = self.ruc.get_update_cond_from_widgets() engine = self.minimize_engine_combobox.currentIndex() env.prefs[Minimize_minimizationEngine_prefs_key] = engine cmdrun = Minimize_CommandRun( self.win, self.seltype, type = 'Minimize', update_cond = update_cond, engine = engine) cmdrun.run() return