rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
kb = 45e6/len**2+len*1.3-475 | kb = min(45e6/len**2+len*1.3-475, 2000) | def bondrec(n1,n2, ks, r0, de, b): #print r0, pertab[n1].rcovalent+pertab[n2].rcovalent #print ks, 200*de*b**2 #print r0,de, b,0.4+125/(r0*de) #print r0, de, 1-r0*0.0025 bontab[pertab[n1].symbol+pertab[n2].symbol] = (n1,n2, ks, r0, de, b) |
mmk_height = 0 buildmode_dashboard_height = 0 status_bar_height = 0 else: | def get_location(self, firstShow): '''Returns the best x, y screen coordinate for positioning the MMKit. If <firstShow> is True, the Model Tree width is set to 200 pixels. Should only be called MMKit has been created. ''' | |
x = max(0,self.w.geometry().x()) | x = max(4,self.w.geometry().x()) | def get_location(self, firstShow): '''Returns the best x, y screen coordinate for positioning the MMKit. If <firstShow> is True, the Model Tree width is set to 200 pixels. Should only be called MMKit has been created. ''' |
if "developing": | if platform.atom_debug: print "atom_debug: fyi: importing or reloading ops_copy from itself" | def copy_sel(self, use_selatoms = True): #bruce 050505 added use_selatoms = True option, so MT ops can pass False (bugfix) #bruce 050419 renamed this from copy #bruce 050523 new code # 1. what objects is user asking to copy? cmd = greenmsg ("Copy: ") part = self history = part.assy.w.history sel = selection_from_part... |
QToolTip.add(self.textLabel1_3_2,self.__tr("Bond thickness (in pixels) for Lines Display Mode")) QWhatsThis.add(self.textLabel1_3_2,self.__tr("Bond thickness (in pixels) for Lines Display Mode")) | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Compass and Axes")) self.display_compass_checkbox.setText(self.__tr("Display Compass")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) self.display_p... | |
QToolTip.add(self.textLabel3_2_2,self.__tr("The gamess executable file. Usually it's called gamess.??.x or ??gamess.exe.")) | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Compass and Axes")) self.display_compass_checkbox.setText(self.__tr("Display Compass")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) self.display_p... | |
QToolTip.add(self.textLabel1_3,self.__tr("Bond thickness (in pixels) for Lines Display Mode")) QWhatsThis.add(self.textLabel1_3,self.__tr("Bond thickness (in pixels) for Lines Display Mode")) | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Compass and Axes")) self.display_compass_checkbox.setText(self.__tr("Display Compass")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) self.display_p... | |
QToolTip.add(self.gamess_lbl,self.__tr("The gamess executable file. Usually it's called gamess.??.x or ??gamess.exe.")) | QToolTip.add(self.gamess_lbl,self.__tr("Enable GAMESS.")) QWhatsThis.add(self.gamess_lbl,self.__tr("Enable GAMESS.")) | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Compass and Axes")) self.display_compass_checkbox.setText(self.__tr("Display Compass")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) self.display_p... |
QToolTip.add(self.nanohive_lbl,self.__tr("The gamess executable file. Usually it's called gamess.??.x or ??gamess.exe.")) | QToolTip.add(self.nanohive_lbl,self.__tr("Enable Nano-Hive.")) QWhatsThis.add(self.nanohive_lbl,self.__tr("Enable Nano-Hive.")) | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Compass and Axes")) self.display_compass_checkbox.setText(self.__tr("Display Compass")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) self.display_p... |
self.members_label = QLabel(self.parameters_grpbox,"members_label") self.members_label.setAlignment(QLabel.AlignVCenter | QLabel.AlignRight) nt_parameters_body_layout.addWidget(self.members_label,nextrow,0) hidethese.append(self.members_label) | label = QLabel(self.parameters_grpbox,"members_label") label.setAlignment(QLabel.AlignVCenter | QLabel.AlignRight) nt_parameters_body_layout.addWidget(label,nextrow,0) hidethese.append(label) | def __init__(self, parent = None, desc = None, name = None, modal = 0, fl = 0, env = None, type = "QDialog"): if env is None: import env # this is a little weird... probably it'll be ok, and logically it seems correct. self.desc = desc |
self.members_label.setText(self.__tr(paramlabel)) | label.setText(self.__tr(paramlabel)) | def __init__(self, parent = None, desc = None, name = None, modal = 0, fl = 0, env = None, type = "QDialog"): if env is None: import env # this is a little weird... probably it'll be ok, and logically it seems correct. self.desc = desc |
tooltip = param.options.get('tooltip', '') if tooltip: QToolTip.add(self.chirality_N_spinbox,self.__tr(tooltip)) QToolTip.add(self.members_label,self.__tr(tooltip)) | def __init__(self, parent = None, desc = None, name = None, modal = 0, fl = 0, env = None, type = "QDialog"): if env is None: import env # this is a little weird... probably it'll be ok, and logically it seems correct. self.desc = desc | |
self.file_locations_grp.setGeometry(QRect(11,11,581,210)) self.povray_checkbox = QCheckBox(self.file_locations_grp,"povray_checkbox") self.povray_checkbox.setGeometry(QRect(11,67,16,16)) self.povray_lbl = QLabel(self.file_locations_grp,"povray_lbl") self.povray_lbl.setGeometry(QRect(30,59,77,30)) self.povray_lbl.setS... | self.file_locations_grp.setColumnLayout(0,Qt.Vertical) self.file_locations_grp.layout().setSpacing(6) self.file_locations_grp.layout().setMargin(11) file_locations_grpLayout = QGridLayout(self.file_locations_grp.layout()) file_locations_grpLayout.setAlignment(Qt.AlignTop) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.povray_path_linedit.setGeometry(QRect(113,62,350,24)) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | |
self.nanohive_path_linedit.setGeometry(QRect(113,26,350,24)) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | |
self.gamess_lbl = QLabel(self.file_locations_grp,"gamess_lbl") self.gamess_lbl.setGeometry(QRect(30,167,77,30)) self.gamess_lbl.setSizePolicy(QSizePolicy(QSizePolicy.Minimum,QSizePolicy.Preferred,0,0,self.gamess_lbl.sizePolicy().hasHeightForWidth())) self.gamess_lbl.setMinimumSize(QSize(60,0)) self.gamess_lbl.setAlignm... | file_locations_grpLayout.addMultiCellWidget(self.nanohive_path_linedit,0,0,1,2) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.megapov_path_linedit.setGeometry(QRect(113,98,350,24)) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | |
self.megapov_checkbox = QCheckBox(self.file_locations_grp,"megapov_checkbox") self.megapov_checkbox.setGeometry(QRect(11,103,16,16)) | file_locations_grpLayout.addMultiCellWidget(self.megapov_path_linedit,2,2,1,2) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.gamess_path_linedit.setGeometry(QRect(113,170,350,24)) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | |
self.gamess_checkbox = QCheckBox(self.file_locations_grp,"gamess_checkbox") self.gamess_checkbox.setGeometry(QRect(11,175,16,16)) | file_locations_grpLayout.addMultiCellWidget(self.gamess_path_linedit,4,4,1,2) self.povray_choose_btn = QPushButton(self.file_locations_grp,"povray_choose_btn") self.povray_choose_btn.setEnabled(0) self.povray_choose_btn.setAutoDefault(0) file_locations_grpLayout.addWidget(self.povray_choose_btn,1,3) self.megapov_cho... | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.povdir_linedit.setGeometry(QRect(169,134,294,24)) | file_locations_grpLayout.addWidget(self.povdir_linedit,3,2) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.nanohive_choose_btn.setGeometry(QRect(475,23,95,30)) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | |
self.povray_choose_btn = QPushButton(self.file_locations_grp,"povray_choose_btn") self.povray_choose_btn.setEnabled(0) self.povray_choose_btn.setGeometry(QRect(475,59,95,30)) self.povray_choose_btn.setAutoDefault(0) self.megapov_choose_btn = QPushButton(self.file_locations_grp,"megapov_choose_btn") self.megapov_choose... | file_locations_grpLayout.addWidget(self.nanohive_choose_btn,0,3) layout71_2 = QHBoxLayout(None,0,6,"layout71_2") self.nanohive_checkbox = QCheckBox(self.file_locations_grp,"nanohive_checkbox") self.nanohive_checkbox.setEnabled(1) layout71_2.addWidget(self.nanohive_checkbox) self.nanohive_lbl = QLabel(self.file_locat... | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.megapov_lbl.setGeometry(QRect(30,95,77,30)) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | |
self.povdir_checkbox.setEnabled(1) self.povdir_checkbox.setGeometry(QRect(30,139,16,16)) | self.povdir_checkbox.setEnabled(0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.povdir_lbl.setGeometry(QRect(54,134,110,30)) | self.povdir_lbl.setEnabled(0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_5 = QGridLayout(self.TabPage_6,1,1,11,6,"TabPageLayout_5") | TabPageLayout_6 = QGridLayout(self.TabPage_6,1,1,11,6,"TabPageLayout_6") | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_5.addItem(spacer10,2,0) | TabPageLayout_6.addItem(spacer10,2,0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_5.addLayout(layout68_3,1,0) | TabPageLayout_6.addLayout(layout68_3,1,0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_5.addLayout(layout70_2,0,0) | TabPageLayout_6.addLayout(layout70_2,0,0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_6 = QGridLayout(self.TabPage_7,1,1,11,6,"TabPageLayout_6") | TabPageLayout_7 = QGridLayout(self.TabPage_7,1,1,11,6,"TabPageLayout_7") | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_6.addItem(spacer94,2,0) | TabPageLayout_7.addItem(spacer94,2,0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_6.addMultiCellLayout(layout15,1,1,0,1) | TabPageLayout_7.addMultiCellLayout(layout15,1,1,0,1) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_6.addItem(spacer47,0,1) | TabPageLayout_7.addItem(spacer47,0,1) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
TabPageLayout_6.addWidget(self.groupBox10,0,0) | TabPageLayout_7.addWidget(self.groupBox10,0,0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.resize(QSize(627,513).expandedTo(self.minimumSizeHint())) | self.resize(QSize(595,481).expandedTo(self.minimumSizeHint())) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) |
self.povray_checkbox.setText(QString.null) QToolTip.add(self.povray_checkbox,self.__tr("Enable POV-Ray")) self.povray_lbl.setText(self.__tr("POV-Ray :")) QToolTip.add(self.povray_lbl,self.__tr("Enable POV-Ray")) self.nanohive_lbl.setText(self.__tr("Nano-Hive :")) QToolTip.add(self.nanohive_lbl,self.__tr("Enable Nano-Hi... | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Axes")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) QToolTip.add(self.display_origin_axis_checkbox,self.__tr("Show/Hide Origin Axis")) self.displa... | |
self.gamess_lbl.setText(self.__tr("GAMESS :")) QToolTip.add(self.gamess_lbl,self.__tr("Enable GAMESS.")) | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Axes")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) QToolTip.add(self.display_origin_axis_checkbox,self.__tr("Show/Hide Origin Axis")) self.displa... | |
self.megapov_checkbox.setText(QString.null) QToolTip.add(self.megapov_checkbox,self.__tr("Enable MegaPOV")) | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Axes")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) QToolTip.add(self.display_origin_axis_checkbox,self.__tr("Show/Hide Origin Axis")) self.displa... | |
self.gamess_checkbox.setText(QString.null) QToolTip.add(self.gamess_checkbox,self.__tr("Enable GAMESS.")) QToolTip.add(self.povdir_linedit,self.__tr("Select custom POV include directory")) self.nanohive_choose_btn.setText(self.__tr("Choose...")) QToolTip.add(self.nanohive_choose_btn,self.__tr("Choose location of Nano-H... | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Axes")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) QToolTip.add(self.display_origin_axis_checkbox,self.__tr("Show/Hide Origin Axis")) self.displa... | |
self.povdir_lbl.setText(self.__tr("POV include dir :")) | self.povdir_lbl.setText(self.__tr("POV-Ray include dir :")) self.gamess_checkbox.setText(QString.null) QToolTip.add(self.gamess_checkbox,self.__tr("Enable GAMESS.")) self.gamess_lbl.setText(self.__tr("GAMESS :")) QToolTip.add(self.gamess_lbl,self.__tr("Enable GAMESS.")) | def languageChange(self): self.setCaption(self.__tr("Preferences")) self.ok_btn.setText(self.__tr("OK")) self.groupBox7_2.setTitle(self.__tr("Axes")) self.display_origin_axis_checkbox.setText(self.__tr("Display Origin Axis")) QToolTip.add(self.display_origin_axis_checkbox,self.__tr("Show/Hide Origin Axis")) self.displa... |
if moviefile[-4:] not in ['.dpb', '.xyz']: print "writeMovie: Cannot make movie. Movie name [" + moviefile + "] invalid." | if ext not in ['.dpb', '.xyz']: msg = redmsg("Movie [" + moviefile + "] has unsupported extension.") assy.w.history.message(msg) print "writeMovie: " + msg | def writemovie(assy, mflag = False): """Creates a moviefile. The name of the moviefile it creates is found in assy.m.filename. The moviefile is either a DPB file or an XYZ trajectory file. DPB = Differential Position Bytes (binary file) XYZ = XYZ trajectory file (text file) mflag: 0 = default, runs a full simulation ... |
program = os.path.normpath(filePath + '/../bin/simulator') | if sys.platform == 'win32': program = os.path.normpath(filePath + '/../bin/simulator.exe') else: program = os.path.normpath(filePath + '/../bin/simulator') if not os.path.exists(program): msg = redmsg("Simulator [" + program + "] does not exit. Simluation aborted.") assy.w.history.message(msg) return -1 | def writemovie(assy, mflag = False): """Creates a moviefile. The name of the moviefile it creates is found in assy.m.filename. The moviefile is either a DPB file or an XYZ trajectory file. DPB = Differential Position Bytes (binary file) XYZ = XYZ trajectory file (text file) mflag: 0 = default, runs a full simulation ... |
if mflag: filesize = (max(100, int(sqrt(natoms))) * natoms * 3) + 4 else: filesize = (assy.m.totalFrames * natoms * 3) + 4 | if mflag: filesize = (max(100, int(sqrt(natoms))) * natoms * 3) + 4 pbarCaption = "Minimize" else: filesize = (assy.m.totalFrames * natoms * 3) + 4 pbarCaption = "Simulator" pbarMsg = "Creating movie file " + os.path.basename(moviefile) + "..." msg = "Simulation started: Total Frames: " + str(assy.m.totalFrames)\ + ",... | def writemovie(assy, mflag = False): """Creates a moviefile. The name of the moviefile it creates is found in assy.m.filename. The moviefile is either a DPB file or an XYZ trajectory file. DPB = Differential Position Bytes (binary file) XYZ = XYZ trajectory file (text file) mflag: 0 = default, runs a full simulation ... |
"Simulate", "Writing movie file " + os.path.basename(moviefile) + "...", | pbarCaption, pbarMsg, | def writemovie(assy, mflag = False): """Creates a moviefile. The name of the moviefile it creates is found in assy.m.filename. The moviefile is either a DPB file or an XYZ trajectory file. DPB = Differential Position Bytes (binary file) XYZ = XYZ trajectory file (text file) mflag: 0 = default, runs a full simulation ... |
A DPB file is a binary trajectory file. An XYZ file is a text file. mflag - if True, create a minimize moviefile | DPB = Differential Position Bytes (binary file) XYZ = XYZ trajectory file (text file) mflag - if True, creates a minimize dpb moviefile | def writemovie(assy, moviefile, mflag = False): """Creates a moviefile. moviefile - name of either a DPB file or an XYZ trajectory file. A DPB file is a binary trajectory file. An XYZ file is a text file. mflag - if True, create a minimize moviefile """ # Make sure some chunks are in the part. if not assy.molecules: # ... |
outfile = '"-o%s"' % moviefile infile = '"%s"' % mmpfile | if sys.platform == 'win32': outfile = '"-o%s"' % moviefile infile = '"%s"' % mmpfile else: outfile = "-o"+moviefile infile = infile | def writemovie(assy, moviefile, mflag = False): """Creates a moviefile. moviefile - name of either a DPB file or an XYZ trajectory file. A DPB file is a binary trajectory file. An XYZ file is a text file. mflag - if True, create a minimize moviefile """ # Make sure some chunks are in the part. if not assy.molecules: # ... |
self.warning("%s refused: %r" % (self.msg_modename, whynot,)) | from HistoryWidget import redmsg env.history.message(redmsg("%s refused: %r" % (self.msg_modename, whynot,))) | def refuseEnter(self, warn): "if we'd refuse to enter this mode, then (iff warn) tell user why, and (always) return true." ok, mol = assy_extrude_unit(self.o.assy, really_make_mol = 0) if not ok: whynot = mol if warn: self.warning("%s refused: %r" % (self.msg_modename, whynot,)) ###k format, in self.warning too ###@@@ ... |
return False, "don't know what to extrude: nothing selected, and not exactly one chunk in all" | return False, "Nothing selected to extrude." | def new_old(new, old): # new = fragment of selected atoms, old = rest of their mol assert new.atoms res.append(new) #e someday we might use old too, eg for undo or for heuristics to help deal with neighbor-atoms... |
self.jig.length = self.original_jig.force self.jig.length = self.original_jig.stiffness | self.jig.name = self.original_jig.name self.jig.force = self.original_jig.force self.jig.stiffness = self.original_jig.stiffness | def reject(self): '''Slot for the 'Cancel' button ''' #self.jig.color = self.jig.normcolor = self.original_normcolor self.jig.color = self.jig.normcolor = self.original_jig.normcolor self.jig.length = self.original_jig.force self.jig.length = self.original_jig.stiffness self.jig.length = self.original_jig.length self.j... |
self.jigsLinearMotorAction.setText(self.__tr("&Linear Motor")) | self.jigsLinearMotorAction.setText(self.__tr("Linear Motor")) | def languageChange(self): self.setCaption(self.__tr("nanoENGINEER-1")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpenAction.setAccel(self.__tr("Ctrl+O")) self.fileSaveAction.setText(self.__tr("Save")) self.fileSaveAction.setMenuText(self.__tr("&Save")... |
print "There were import problems in the test subprocess (bug 1724?); try to warn the user with a dialog..." | print "There were import problems in the test subprocess (bug 1724? 1882?); try to warn the user with a dialog..." | def __import__(*args, **kws): global not_these arg = args[0] if arg not in not_these and not os.path.exists(arg + ".py"): not_these.append(arg) print "import " + arg return _old_import(*args, **kws) |
"nanoENGINEER-1 can't run on this machine as it's currently configured.\n\n"\ "Please contact support@nanorex.com for help." | "this might be caused by a bug in the nanoENGINEER-1 installer, "\ "or by this version of nE-1 not working properly on Intel Macs.\n"\ "\n"\ "Please contact support@nanorex.com for help and more information." | def __import__(*args, **kws): global not_these arg = args[0] if arg not in not_these and not os.path.exists(arg + ".py"): not_these.append(arg) print "import " + arg return _old_import(*args, **kws) |
"Internal error during startup; "\ "nanoENGINEER-1 can't run on this machine as it's currently configured.\n\n"\ "Please contact support@nanorex.com for help." | "Internal error during startup; "\ "nanoENGINEER-1 can't run on this machine as it's currently configured.\n"\ "\n"\ "(The known causes of this problem have a simple solution, "\ "but one which the nE-1 installer can't perform automatically.)\n"\ "\n"\ "Please contact support@nanorex.com for help and more information." | def __import__(*args, **kws): global not_these arg = args[0] if arg not in not_these and not os.path.exists(arg + ".py"): not_these.append(arg) print "import " + arg return _old_import(*args, **kws) |
self.default_display_btngrp.setButton(self.glpane.display) | prefs = preferences.prefs_context() self.default_display_btngrp.setButton(prefs.get(defaultDisplayMode_prefs_key, diVDW)) | def _setup_atoms_page(self): ''' Setup widgets to initial (default or defined) values on the display page. ''' # Set colors for atom color swatches self.atom_hilite_color_frame.setPaletteBackgroundColor(RGBf_to_QColor(orange)) self.free_valence_color_frame.setPaletteBackgroundColor(RGBf_to_QColor(red)) self.default_di... |
if 1: from debug_prefs import debug_pref, Choice TEST_PYREX_OPENGL = debug_pref("TEST_PYREX_OPENGL", Choice([0,1,2]), non_debug = True) | def Draw(self): # wware 060124 Embed Pyrex/OpenGL unit tests into the cad code if TEST_PYREX_OPENGL: try: #self.w.win_update() sys.path.append("./experimental/pyrex-opengl") import quux # quux.test() quux.shapeRendererInit() quux.shapeRendererSetUseLOD(0) if TEST_PYREX_OPENGL == 1: center = Numeric.array((Numeric.arra... | |
self.axis = chunk.getaxis() | newAxis = chunk.getaxis() newAxis = sign(dot(self.axis,newAxis))*newAxis self.axis = newAxis | def __CM_Align_to_chunk(self): '''Rotary or Linear Motor context menu command: "Align to chunk" This uses the chunk connected to the first atom of the motor. ''' # I needed this when attempting to simulate the rotation of a long, skinny # chunk. The axis computed from the attached atoms was not close to the axis # of ... |
print key | def keyPressEvent(self, event): ####@@@@ Delete might need revision, and belongs in the subclass key = event.key() import platform key = platform.filter_key(key) #bruce 041220 (needed for bug 93) ####@@@@ as of 050126 this delete binding doesn't seem to work: if key == Qt.Key_Delete: ####@@@@ belongs in the subclass # ... | |
f = f.split("/") | def cString(name, s, prefix=""): import string retval = "char " + name + "[] = \"\\\n" + prefix # replace double-quote with escaped-double-quote s = string.replace(s, "\"", "\\\"") # replace line terminations with end-of-last-line plus start-of-next-line s = string.replace(s, "\n", ("\\n\\\n") + prefix) return retval +... | |
if self.assy.filename != safile: if os.path.exists(safile): | if os.path.exists(safile): | def saveFilePressed(self): if self.assy: if self.assy.filename: dir, fil, ext = fileparse(self.assy.filename) sdir = self.assy.filename else: dir, fil = "./", self.assy.name sdir = globalParms['WorkingDirectory'] |
filesize = (self.nframes * natoms * 3) + 4 | filesize = self.nframes * ((natoms * 32) + 25) | def saveFilePressed(self): if self.assy: if self.assy.filename: dir, fil, ext = fileparse(self.assy.filename) sdir = self.assy.filename else: dir, fil = "./", self.assy.name sdir = globalParms['WorkingDirectory'] |
self.assy.w.statusBar.message("<span style=\"color: | msg = "<span style=\"color: self.assy.w.statusBar.message(msg) | def saveMovie(self, moviefile, filesize): filePath = os.path.dirname(os.path.abspath(sys.argv[0])) program = filePath + '/../bin/simulator' args = [program, '-f' + str(self.nframes), '-t' + str(self.temp), '-i' + str(self.stepsper), str(self.fileform), '-o' + moviefile, self.assy.filename] basename = os.path.basenam... |
now = self.__last_3dupdate_time if now >= self.__last_progress_update_time + 1.0 or update_3dview and now >= self.__last_progress_update_time + 0.2: self.need_process_events = True self.__last_progress_update_time = now from platform import hhmmss_str | def sim_frame_callback(self): #bruce 060102 "Per-frame callback function for simulator object." # Note: this was called 3550 times for minimizing a small C3 sp3 hydrocarbon... better check the elapsed time quickly. #e Maybe we should make this into a lambda, or even code it in C, to optimize it. if self.PREPARE_TO_CLOS... | |
self.mt.setGeometry(0,0,200,560) if y < 0: y = 0 x = self.geometry().x() | self.mt.setGeometry(0,0,200,560) y = max(0, y) x = max(0,self.geometry().x()) | def _findGoodLocation(self, firstShow): '''Find ideal location for the MMKit. Should only be called after history, and MMKit has been created.''' global MMKitWin if sys.platform == 'linux2': #hist_height = 70 # not needed with new layout. mark 060222. mmk_height = 559 toolbar_height = 25 status_bar_height = 29 else: h... |
('print self', self._debug_printself), | def debug_menu_items(self): "[subclasses can in theory override this, but probably needn't and shouldn't]" import debug res = [ ('(debugging menu)', noop, 'disabled'), ('print self', self._debug_printself), # None, # separator ] if debug.exec_allowed(): #bruce 041217 made this item conditional on whether it will work r... | |
if self._debug_win: res.extend( [ ('save window layout', self._debug_save_window_layout ), ('load window layout', self._debug_load_window_layout ), ] ) | def debug_menu_items(self): "[subclasses can in theory override this, but probably needn't and shouldn't]" import debug res = [ ('(debugging menu)', noop, 'disabled'), ('print self', self._debug_printself), # None, # separator ] if debug.exec_allowed(): #bruce 041217 made this item conditional on whether it will work r... | |
self.image0 = QPixmap() self.image0.loadFromData(image0_data,"PNG") | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.image142 = QPixmap(image142_data) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.fileToolbar.setGeometry(QRect(0,0,71,29)) | self.fileToolbar.setGeometry(QRect(0,0,70,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.editToolbar.setGeometry(QRect(71,0,183,29)) | self.editToolbar.setGeometry(QRect(70,0,182,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.viewToolbar.setGeometry(QRect(254,0,363,29)) | self.viewToolbar.setGeometry(QRect(252,0,362,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.molecularDispToolbar.setGeometry(QRect(617,0,183,29)) | self.molecularDispToolbar.setGeometry(QRect(614,0,182,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.selectToolbar.setGeometry(QRect(800,0,211,29)) | self.selectToolbar.setGeometry(QRect(796,0,210,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.helpToolbar.setGeometry(QRect(1011,0,43,29)) | self.helpToolbar.setGeometry(QRect(1006,0,42,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.selectAtomsDashboard.setGeometry(QRect(0,0,85,16)) | self.selectAtomsDashboard.setGeometry(QRect(0,0,94,19)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.cookieCutterDashboard.setGeometry(QRect(85,0,89,16)) | self.cookieCutterDashboard.setGeometry(QRect(94,0,95,19)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveChunksDashboard.setGeometry(QRect(174,0,88,16)) | self.moveChunksDashboard.setGeometry(QRect(189,0,96,19)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moviePlayerDashboard.setGeometry(QRect(0,16,983,29)) | self.moviePlayerDashboard.setGeometry(QRect(0,19,1075,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.selectMolDashboard.setGeometry(QRect(0,45,148,29)) | self.selectMolDashboard.setGeometry(QRect(0,48,156,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.zoomDashboard.setGeometry(QRect(148,45,108,29)) | self.zoomDashboard.setGeometry(QRect(156,48,115,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.panDashboard.setGeometry(QRect(256,45,96,29)) | self.panDashboard.setGeometry(QRect(271,48,104,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.rotateDashboard.setGeometry(QRect(352,45,110,29)) | self.rotateDashboard.setGeometry(QRect(375,48,120,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.fuseChunksDashboard.setGeometry(QRect(462,45,84,29)) | self.fuseChunksDashboard.setGeometry(QRect(495,48,92,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.depositAtomDashboard.setGeometry(QRect(546,45,20,29)) | self.depositAtomDashboard.setGeometry(QRect(587,48,19,29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.cookieSelectDashboard.setGeometry(QRect(0,0,30,258)) | self.cookieSelectDashboard.setGeometry(QRect(0,0,30,257)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.modifyToolbar.setGeometry(QRect(0,258,30,312)) | self.modifyToolbar.setGeometry(QRect(0,257,30,311)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsToolbar.setGeometry(QRect(0,570,30,216)) | self.toolsToolbar.setGeometry(QRect(0,568,30,215)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.datumDispDashboard.setGeometry(QRect(0,786,30,69)) | self.datumDispDashboard.setGeometry(QRect(0,783,30,68)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.simToolbar.setGeometry(QRect(0,855,30,96)) | self.simToolbar.setGeometry(QRect(0,851,30,95)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.MenuBar.setGeometry(QRect(0,0,1115,22)) | self.MenuBar.setGeometry(QRect(0,0,1115,33)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.connect(self.fileExitAction,SIGNAL("activated()"),self,SLOT("close()")) | self.connect(self.fileExitAction,SIGNAL("activated()"),self.close) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
"""Like our superclass, but has __set__ and __del__ methods so as to be a data descriptor. | """Like our superclass, but has __set__ and __delete__ methods so as to be a data descriptor. | def copy_for_subclass(self, cls): copy = self.__class__(cls, self.attr, *self.args, **self.kws) copy.__copycount = self.__copycount + 1 if copy.__copycount > 1: if not seen_before("ClassAttrSpecific_NonDataDescriptor copied again"): print "once-per-session developer warning: this copy got copied again:", self return co... |
def __del__(self, *args): print "ClassAttrSpecific_DataDescriptor.__del__ is about to assert 0 -- could this be causing those weird exceptions?" assert 0, "__del__ is not yet supported in this abstract class" | def __delete__(self, *args): print "note: ClassAttrSpecific_DataDescriptor.__delete__ is about to assert 0" assert 0, "__delete__ is not yet supported in this abstract class" | def __del__(self, *args): ### I bet this should be __delete__ or something ###@@@@ print "ClassAttrSpecific_DataDescriptor.__del__ is about to assert 0 -- could this be causing those weird exceptions?" ####@@@@ did i name the method correctly? guess: no. assert 0, "__del__ is not yet supported in this abstract class" |
drawddhh(red,self.ddhh) | def draw(self, o, level): """draw all the atoms, using the atom's, molecule's, or GLPane's display mode in that order of preference Use the hash table drawn to draw each bond only once, as each one will be referenced from two atoms If the molecule itself is selected, draw its bounding box as a wireframe o is a GLPane "... | |
def setViewFitSelectionToWindow(self, fast = False): """Change the view so that only selected chunks fit in the GLPane. If <fast> is True, then snap to the view It is NIY for jig selection - ninad060731""" chunks = self.assy.selmols bbox = BBox() for mol in chunks: if mol.hidden or mol.display == diINVISIBLE: conti... | def setViewFitToWindow(self, fast=False): "Change view so that the entire model fits in the glpane. If <fast> is True, then snap to the view (i.e. don't animate)" # Recalculate center and bounding box for all the visible chunks in the current part. # The way a 3d bounding box is used to calculate the fit is not adequat... | |
ainfo += (". Distance between %s-%s is %.3f." % \ (self, self.molecule.assy.ppa2, vlen(self.posn()-self.molecule.assy.ppa2.posn()))) | ainfo += (". Distance between %s-%s is %.3f Angstroms." % \ (self, self.molecule.assy.ppa2, vlen(self.posn()-self.molecule.assy.ppa2.posn()))) | def getinfo(self): # Return information about the selected atom for the msgbar # [mark 2004-10-14] # bruce 041217 revised XYZ format to %.2f, added bad-valence info # (for the same atoms as self.bad(), but in case conditions are added to # that, using independent code). # bruce 050218 changing XYZ format to %.3f (afte... |
w.elemChangeComboBox.insertItem("Astatine") | w.elemChangeComboBox.insertItem("Arsenic") | def do_what_MainWindowUI_should_do(w): w.depositAtomDashboard.clear() |
if key == Qt.Key_F1: import webbrowser webbrowser.open(self.__WikiHelpPrefix + self.__class__.__name__) | def keyPress(self,key): # several modes extend this method, some might replace it if key == Qt.Key_Delete: self.w.killDo() # Zoom in (Ctrl/Cmd+.) & out (Ctrl/Cmd+,) for Eric. Right now, this will work with or without # the Ctrl/Cmd key pressed. We'll fix this later, at the same time we address the issue of # more tha... | |
print "draw: bond 1---2: ", self.a1pos, self.a2pos | via dispdef from the calling molecule -- this might cause bugs if some | |
print "draw: bond c1--c2: ", self.c1, self.c2 | via dispdef from the calling molecule -- this might cause bugs if some |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.