rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
self.dispDatumPlanesAction.setIconSet(QIconSet(self.image39))
self.dispDatumPlanesAction.setIconSet(QIconSet(self.image33))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispCsysAction.setIconSet(QIconSet(self.image40))
self.dispCsysAction.setIconSet(QIconSet(self.image34))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispDatumLinesAction.setIconSet(QIconSet(self.image41))
self.dispDatumLinesAction.setIconSet(QIconSet(self.image35))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.dispGridAction.setIconSet(QIconSet(self.image42))
self.dispGridAction.setIconSet(QIconSet(self.image36))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.selectConnectedAction.setIconSet(QIconSet(self.image43))
self.selectConnectedAction.setIconSet(QIconSet(self.image37))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.selectDoublyAction.setIconSet(QIconSet(self.image44))
self.selectDoublyAction.setIconSet(QIconSet(self.image38))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.jigsBearingAction.setIconSet(QIconSet(self.image45))
self.jigsBearingAction.setIconSet(QIconSet(self.image39))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.jigsHeatsinkAction.setIconSet(QIconSet(self.image46))
self.jigsHeatsinkAction.setIconSet(QIconSet(self.image42))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewOrthoAction.setIconSet(QIconSet(self.image47))
self.setViewOrthoAction.setIconSet(QIconSet(self.image43))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewPerspecAction.setIconSet(QIconSet(self.image48))
self.setViewPerspecAction.setIconSet(QIconSet(self.image44))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.jigsGroundAction.setIconSet(QIconSet(self.image49))
self.jigsGroundAction.setIconSet(QIconSet(self.image45))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.jigsHandleAction.setIconSet(QIconSet(self.image50))
self.jigsHandleAction.setIconSet(QIconSet(self.image46))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifySeparateAction.setIconSet(QIconSet(self.image51))
self.modifySeparateAction.setIconSet(QIconSet(self.image47))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsSketchAtomAction.setIconSet(QIconSet(self.image52))
self.toolsSketchAtomAction.setIconSet(QIconSet(self.image48))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.ccGraphiteAction.setIconSet(QIconSet(self.image53))
self.ccGraphiteAction.setIconSet(QIconSet(self.image49))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.orient100Action.setIconSet(QIconSet(self.image54))
self.orient100Action.setIconSet(QIconSet(self.image50))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.orient110Action.setIconSet(QIconSet(self.image55))
self.orient110Action.setIconSet(QIconSet(self.image51))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.orient111Action.setIconSet(QIconSet(self.image56))
self.orient111Action.setIconSet(QIconSet(self.image52))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewFrontAction.setIconSet(QIconSet(self.image57))
self.setViewFrontAction.setIconSet(QIconSet(self.image53))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewBackAction.setIconSet(QIconSet(self.image58))
self.setViewBackAction.setIconSet(QIconSet(self.image54))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewTopAction.setIconSet(QIconSet(self.image59))
self.setViewTopAction.setIconSet(QIconSet(self.image55))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewBottomAction.setIconSet(QIconSet(self.image60))
self.setViewBottomAction.setIconSet(QIconSet(self.image56))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewRightAction.setIconSet(QIconSet(self.image61))
self.setViewRightAction.setIconSet(QIconSet(self.image57))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewLeftAction.setIconSet(QIconSet(self.image62))
self.setViewLeftAction.setIconSet(QIconSet(self.image58))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewHomeAction.setIconSet(QIconSet(self.image63))
self.setViewHomeAction.setIconSet(QIconSet(self.image59))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.setViewRecenterAction.setIconSet(QIconSet(self.image64))
self.setViewRecenterAction.setIconSet(QIconSet(self.image60))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.jigsLinearMotorAction.setIconSet(QIconSet(self.image65))
self.jigsLinearMotorAction.setIconSet(QIconSet(self.image61))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsStartOverAction.setIconSet(QIconSet(self.image66))
self.toolsStartOverAction.setIconSet(QIconSet(self.image62))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsBackUpAction.setIconSet(QIconSet(self.image67))
self.toolsBackUpAction.setIconSet(QIconSet(self.image63))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyDeleteBondAction.setIconSet(QIconSet(self.image68))
self.modifyDeleteBondAction.setIconSet(QIconSet(self.image64))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyCopyBondAction.setIconSet(QIconSet(self.image69))
self.modifyCopyBondAction.setIconSet(QIconSet(self.image65))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyEdgeBondAction.setIconSet(QIconSet(self.image70))
self.modifyEdgeBondAction.setIconSet(QIconSet(self.image66))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyAddBondAction.setIconSet(QIconSet(self.image71))
self.modifyAddBondAction.setIconSet(QIconSet(self.image67))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyWeldMoleculeAction.setIconSet(QIconSet(self.image72))
self.modifyWeldMoleculeAction.setIconSet(QIconSet(self.image68))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifySetElementAction.setIconSet(QIconSet(self.image36))
self.modifySetElementAction.setIconSet(QIconSet(self.image30))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyDehydrogenateAction.setIconSet(QIconSet(self.image73))
self.modifyDehydrogenateAction.setIconSet(QIconSet(self.image69))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.selectAtomsAction.setIconSet(QIconSet(self.image74))
self.selectAtomsAction.setIconSet(QIconSet(self.image70))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.selectPartsAction.setIconSet(QIconSet(self.image75))
self.selectPartsAction.setIconSet(QIconSet(self.image71)) self.dispCPKAction = QAction(self,"dispCPKAction") self.dispCPKAction.setIconSet(QIconSet(self.image72)) self.dispDefaultAction = QAction(self,"dispDefaultAction") self.dispDefaultAction.setIconSet(QIconSet(self.image73)) self.dispInvisAction = QAction(self,"dis...
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.viewToolbar.setGeometry(QRect(277,0,211,29))
self.viewToolbar.setGeometry(QRect(284,0,217,29))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.gridsToolbar.setGeometry(QRect(488,0,99,29))
self.gridsToolbar.setGeometry(QRect(501,0,101,29))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.molecularDispToolbar.setGeometry(QRect(587,0,183,29))
self.molecularDispToolbar.setGeometry(QRect(602,0,188,29))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.cookieCutterToolbar.setGeometry(QRect(0,0,563,29))
self.cookieCutterToolbar.setGeometry(QRect(0,0,532,29))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.modifyToolbar.setGeometry(QRect(0,0,30,312))
self.modifyToolbar.setGeometry(QRect(0,0,30,322))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.toolsToolbar.setGeometry(QRect(0,312,30,183))
self.toolsToolbar.setGeometry(QRect(0,322,30,189))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.datumDispToolbar.setGeometry(QRect(0,495,30,177))
self.datumDispToolbar.setGeometry(QRect(0,511,30,182))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.MenuBar.setGeometry(QRect(0,0,1062,25))
self.MenuBar.setGeometry(QRect(0,0,1062,33))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.unnamed.insertSeparator() self.setViewOrthoAction.addTo(self.unnamed) self.setViewPerspecAction.addTo(self.unnamed)
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.resize(QSize(1062,826).expandedTo(self.minimumSizeHint()))
self.resize(QSize(1062,835).expandedTo(self.minimumSizeHint()))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.connect(self.dispCPKAction,SIGNAL("activated()"),self.dispCPK)
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.connect(self.dispDefaultAction,SIGNAL("activated()"),self.dispDefault)
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.connect(self.dispInvisAction,SIGNAL("activated()"),self.dispInvis) self.connect(self.dispLinesAction,SIGNAL("activated()"),self.dispLines)
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.connect(self.dispTubesAction,SIGNAL("activated()"),self.dispTubes) self.connect(self.dispVdWAction,SIGNAL("activated()"),self.dispVdW)
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
self.displayActionGroup.setText(self.__tr("ActionGroup")) self.displayActionGroup.setMenuText(self.__tr("ActionGroup")) self.dispLinesAction.setText(self.__tr("Lines")) self.dispLinesAction.setMenuText(self.__tr("&Lines")) self.dispLinesAction.setToolTip(self.__tr("Display Lines")) self.dispTubesAction.setText(self.__t...
def languageChange(self): self.setCaption(self.__tr("Atom")) self.fileNewAction.setText(self.__tr("New")) self.fileNewAction.setMenuText(self.__tr("&New")) self.fileNewAction.setAccel(self.__tr("Ctrl+N")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpen...
self.unnamed.changeItem(self.unnamed.idAt(4),self.__tr("&Default Views"))
self.unnamed.changeItem(self.unnamed.idAt(7),self.__tr("&Default Views"))
def languageChange(self): self.setCaption(self.__tr("Atom")) self.fileNewAction.setText(self.__tr("New")) self.fileNewAction.setMenuText(self.__tr("&New")) self.fileNewAction.setAccel(self.__tr("Ctrl+N")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpen...
self.m._setup()
if self.m._setup(): return
def makeMinMovie(self): r = self.writemovie(1) # Minimization worked. Start the movie. if not r: self.m.currentFrame = 0 self.m._setup() self.m._play() self.m._close()
return
def makeMinMovie(self): r = self.writemovie(1) # Minimization worked. Start the movie. if not r: self.m.currentFrame = 0 self.m._setup() self.m._play() self.m._close()
if not atpos:
if atpos == None:
def setatomposn(self, ind, pos, element): #bruce 041108-10 """(private method for our atoms to call:) Set position in self, of the atom with index ind, to pos. Invalidate or incrementally update whatever is required in this molecule (but not bonds or jigs, invalled by the atom); presently [041110] we incrementally upda...
origin = self.basecenter glTranslatef(origin[0], origin[1], origin[2]) q = self.quat glRotatef(q.angle*180.0/pi, q.x, q.y, q.z) if self.picked: drawlinelist(PickedColor,self.polyhedron) disp = self.get_dispdef(glpane) if self.havelist: glCallList(self.displist) else: glNewList(self.displist, GL_COMPILE_AND_...
try: origin = self.basecenter glTranslatef(origin[0], origin[1], origin[2]) q = self.quat glRotatef(q.angle*180.0/pi, q.x, q.y, q.z) if self.picked: try: drawlinelist(PickedColor,self.polyhedron or []) except: print_compact_traceback("exception in drawlinelist: ") print "(self.polyhedron is %r)" % self.polyhedron ...
(Note that our dispdef argument is not used at all.)
assert `should_not_change` == `( + self.basecenter, + self.quat )`, \ "%r != %r, what's up?" % (should_not_change , ( + self.basecenter, + self.quat))
(Note that our dispdef argument is not used at all.)
if not self.basepos:
if not len(self.basepos):
def stretch(self, factor, point = None): """Public method: expand the molecule by the given factor (keeping point fixed, by default its center). Do all necessary invalidations, optimized as convenient given the nature of this operation. """ self.basepos # make sure it's up to date # (this might recompute basepos using ...
if not self.basepos:
if not len(self.basepos):
def changed_basecenter_or_quat_to_move_atoms(self): #bruce 041104-041112 """Private method: Call this whenever you have just changed self.basecenter and/or self.quat (and/or self.basepos if you call changed_attr on it yourself), and you want to move the molecule by changing curpos to match, assuming that basepos is sti...
if not basepos: return None, None, None, V(1,0,0)
if not len(basepos): return [], [], [], V(1,0,0)
def shakedown_poly_eval_evec_axis(basepos): """Given basepos (an array of atom positions), compute and return (as the elements of a tuple) the bounding polyhedron we should draw around these atoms to designate that their molecule is selected, the eigenvalues and eigenvectors of the inertia tensor (computed as if all at...
print "Button pressed: ", but
def mousePressEvent(self, event): """Dispatches mouse press events depending on shift and control key state. """ ## Huaicai 2/25/05. This is to fix item 2 of bug 400: make this rendering context ## as current, otherwise, the first event will get wrong coordinates self.makeCurrent() if self.debug_event(event, 'mousePre...
self.win.dispbarLabel.setText( "Default Display: " + dispLabel[disp] )
if self.mode.modename == 'COOKIE': self.win.dispbarLabel.setText(" ") else: self.win.dispbarLabel.setText( "Default Display: " + dispLabel[disp] )
def setDisplay(self, disp): if disp == diDEFAULT: disp = default_display_mode #bruce 041129 to fix bug 21 #e someday: if self.display == disp, no actual change needed?? # not sure if that holds for all init code, so being safe for now. self.display = disp self.win.dispbarLabel.setText( "Default Display: " + dispLabel[d...
deposited_obj = self.deposit_from_MMKit(s1) if deposited_obj: self.set_cmdname('Deposit ' + deposited_obj)
if self.mouse_within_stickiness_limit(event, DRAG_STICKINESS_LIMIT): deposited_obj = self.deposit_from_MMKit(s1) if deposited_obj: self.set_cmdname('Deposit ' + deposited_obj)
def singletLeftUp(self, s1, event): '''Finish operation on singlet <s1> based on where the cursor is when the LMB was released: - If the cursor is still on <s1>, deposit an object from the MMKit on it - If the cursor is over a different singlet, bond <s1> to it. - If the cursor is over empty space, do nothing. <event> ...
def fusechunks_lambda_tol_nbonds(tol, nbonds): if nbonds == -1:
def fusechunks_lambda_tol_nbonds(tol, nbonds, mbonds): if nbonds < 0:
def fusechunks_lambda_tol_nbonds(tol, nbonds): if nbonds == -1: nbonds_str = "?" else: nbonds_str = "%d" % (nbonds,) tol_str = (" %d" % int(tol*100.0))[-3:] # fixed-width (3 digits) but using initial spaces # (doesn't have all of desired effect, due to non-fixed-width font) tol_str = tol_str + "%" return "%s => %s...
return "%s => %s bonds" % (tol_str,nbonds_str)
return "%s => %s/%s bonds" % (tol_str,nbonds_str,mbonds_str)
def fusechunks_lambda_tol_nbonds(tol, nbonds): if nbonds == -1: nbonds_str = "?" else: nbonds_str = "%d" % (nbonds,) tol_str = (" %d" % int(tol*100.0))[-3:] # fixed-width (3 digits) but using initial spaces # (doesn't have all of desired effect, due to non-fixed-width font) tol_str = tol_str + "%" return "%s => %s...
selected_chunk = None
something_was_picked = False
def fusechunks_lambda_tol_nbonds(tol, nbonds): if nbonds == -1: nbonds_str = "?" else: nbonds_str = "%d" % (nbonds,) tol_str = (" %d" % int(tol*100.0))[-3:] # fixed-width (3 digits) but using initial spaces # (doesn't have all of desired effect, due to non-fixed-width font) tol_str = tol_str + "%" return "%s => %s...
tol_str = fusechunks_lambda_tol_nbonds(self.tol, 0)
tol_str = fusechunks_lambda_tol_nbonds(self.tol, 0, self.multibonds())
def tolerance_changed(self, val): self.tol = val * .01 if self.o.assy.selmols: self.find_bondable_pairs() # This will update the slider tolerance label self.o.gl_update() else: # Since no chunk is select, there are no bonds, but the slider tolerance label still needs updating. # This fixed bug 502-14. Mark 050407 tol...
tol_str = fusechunks_lambda_tol_nbonds(self.tol, nbonds)
tol_str = fusechunks_lambda_tol_nbonds(self.tol, nbonds,self.multibonds())
def find_bondable_pairs(self): '''Checks the open bonds of the selected chunk to see if they are close enough to bond with any other open bonds in the part. Hidden chunks are skipped. ''' self.bondable_pairs = [] self.ways_of_bonding = {} for chunk in self.o.assy.selmols: # Get center and sphere of the selected chun...
if not_bonded == 1: msg = "%d open bond had multiple bonds. It was not bonded." % (not_bonded,)
singlets_not_bonded = self.multibonds() if singlets_not_bonded == 1: msg = "%d open bond had multiple bonds. It was not bonded." % (singlets_not_bonded,)
def make_bonds(self): "Make bonds between all bondable pairs of singlets" self.bondable_pairs_atoms = [] self.merged_chunks = [] not_bonded = 0 # Bondable pairs not bonded counter
msg = "%d open bonds had multiple bonds. They were not bonded." % (not_bonded,)
msg = "%d open bonds had multiple bonds. They were not bonded." % (singlets_not_bonded,)
def make_bonds(self): "Make bonds between all bondable pairs of singlets" self.bondable_pairs_atoms = [] self.merged_chunks = [] not_bonded = 0 # Bondable pairs not bonded counter
tol_str = fusechunks_lambda_tol_nbonds(self.tol, 0)
tol_str = fusechunks_lambda_tol_nbonds(self.tol, 0, 0)
def make_bonds(self): "Make bonds between all bondable pairs of singlets" self.bondable_pairs_atoms = [] self.merged_chunks = [] not_bonded = 0 # Bondable pairs not bonded counter
self.ideal_wd = self.ideal_ht = debug_pref("image size", Choice([256,128,64,32,512,1024]))
self.ideal_wd = self.ideal_ht = debug_pref("image size", Choice([256,128,64,32,512,1024]), prefs_key = 'A8 devel/image size' )
def __init__(self, imageName): self.imageName = imageName self.img = Image.open(imageName) if 1: #bruce 060213 from debug_prefs import debug_pref, Choice self.ideal_wd = self.ideal_ht = debug_pref("image size", Choice([256,128,64,32,512,1024])) # not persistent # these are not used until client code calls getTextureDat...
if len(self.o.assy.selatoms_list()) == 1:
if len(self.o.assy.selatoms_list()) == 1 and self.dragatom_clicked:
def leftDouble(self, event): # mark 060126. '''Selects all atoms connected to the double-clicked atom. ''' # If the selection behavior is set to Non-standard mode, more than one atom may # be selected. In that case, double-clicking an atom does nothing. # This is a bug if we intend to support non-standard selection be...
x = y = 1.5 * self.o.scale
x = y = 4.0 * self.o.scale
def surface(self): """The water's surface
self.w.history.message(cmd + msg)
self.history.message(cmd + msg)
def setup(self): """Setup the Plot Tool dialog, including populating the combobox with plotting options. """ # To setup the Plot Tool, we need to do the following: # 1. Make sure there is a valid DPB file. This is temporary since the Plot Tool will # soon allow the user to open and plot any trace file. # 2. From th...
return
basicMode.keyPress(self,key) return def update_cursor_for_no_MB(self): '''Update the cursor for 'Movie Player' mode. ''' self.o.setCursor(QCursor(Qt.ArrowCursor))
def keyPress(self,key): # Disable delete key if key == Qt.Key_Delete: return movie = self.o.assy.current_movie if not movie: return # Left or Down arrow keys - advance back one frame if key == Qt.Key_Left or key == Qt.Key_Down: movie._playToFrame(movie.currentFrame - 1) # Right or Up arrow keys - advance forward on...
if m and isinstance(m[1], QPopupMenu): menu.insertItem( win.trUtf8(m[0]), m[1] )
if m and isinstance(m[1], QPopupMenu): submenu = m[1] menu.insertItem( win.trUtf8(m[0]), submenu ) elif m and isinstance(m[1], type([])): submenu = self.makemenu(m[1]) menu.insertItem( win.trUtf8(m[0]), submenu )
def makemenu(self, lis):
xyzstr = self.posn() ainfo = ("Atom "] [X = " + str(xyzstr[0]) + "] [Y = " + str(xyzstr[1]) + "] [Z = " + str(xyzstr[2]) + "]")
xyz = self.posn() ainfo = ("Atom ( self.key, self.element.name, xyz[0], xyz[1], xyz[2] )) if len(self.bonds) != self.element.numbonds: ainfo += platform.fix_plurals(" (has %d bond(s), should have %d)" % \ (len(self.bonds), self.element.numbonds))
def getinfo(self): # Return information about the selected atom for the msgbar # [mark 2004-10-14] xyzstr = self.posn() ainfo = ("Atom #" + str (self.key ) + " [" + self.element.name + "] [X = " + str(xyzstr[0]) + "] [Y = " + str(xyzstr[1]) + "] [Z = " + str(xyzstr[2]) + "]") return ainfo
if sys.platform == 'darwin': dflt_icon_tabs = False else: dflt_icon_tabs = True from debug_prefs import debug_pref, Choice_boolean_False, Choice_boolean_True if dflt_icon_tabs: choice = Choice_boolean_True else: choice = Choice_boolean_False self.icon_tabs = debug_pref("use icons in MMKit tabs?", choice, prefs_key ...
atoms_pm = imagename_to_pixmap("atoms.png") self.mmkit_tab.setTabIconSet ( self.atomsPage, QIconSet(atoms_pm)) clipboard_pm = imagename_to_pixmap("clipboard-empty.png") self.mmkit_tab.setTabIconSet ( self.clipboardPage, QIconSet(clipboard_pm)) library_pm = imagename_to_pixmap("library.png") self.mmkit_tab.setTabIconS...
def __init__(self, win): MMKitDialog.__init__(self, win, fl=Qt.WType_Dialog)# Qt.WStyle_Customize | Qt.WStyle_Tool | Qt.WStyle_Title | Qt.WStyle_NoBorder) self.w = win self.elemTable = PeriodicTable self.displayMode = diTUBES self.elm = None self.newModel = None ## used to save the selected lib part self.flayout = N...
if not self.icon_tabs: return
def update_clipboard_page_icon(self): '''Updates the Clipboard page (tab) icon with a full or empty clipboard icon. ''' if not self.icon_tabs: # Work around for bug 1659. mark 060310 [revised by bruce 060313] return if self.w.assy.shelf.get_pastable_chunks(): clipboard_pm = imagename_to_pixmap("clipboard-full.png") el...
f.write(' <description>nanoENGINEER-1</description>\n') f.write(' <parameter name="timeQuantumLength" value="%e" />\n' % spf) f.write(' <parameter name="environmentTemperature" value="%d" />\n' % temp) f.write(' <parameter name="startIteration" value="0" />\n') f.write(' <parameter name="iterations" valu...
f.write(' <description>nanoENGINEER-1</description>\n') f.write(' <parameter name="timeQuantumLength" value="%e" />\n' % spf) f.write(' <parameter name="environmentTemperature" value="%d" />\n' % temp) f.write(' <parameter name="startIteration" value="0" />\n') f.write(' <parameter name="iterations" value="%d" />\...
def write_simspec_file(self, filename, simflow_filename, mmp_filename, outdir, partname): '''Writes the Nano-Hive Sim Spec file, which is an XML file that describes the simulation environment, plugin selection and plugin parameters. ''' # The Nano-Hive Sim Spec file has 4 different sections that must be written in the...
f.write(' <calculator name="qmCalculator" plugin="MPQC_SClib">\n') f.write(' <parameter name="logDirectory" value="%s/log" />\n' % nh_home) f.write(' <parameter name="dataDirectory" value="%s/data/MQPC_SClib" />\n' % nh_home) f.write(' <parameter name="basis" value="STO-3G" />\n') f....
f.write('\n') f.write(' <calculator name="qmCalculator" plugin="MPQC_SClib">\n') f.write(' <parameter name="logDirectory" value="%s/log" />\n' % nh_home) f.write(' <parameter name="dataDirectory" value="%s/data/MQPC_SClib" />\n' % nh_home) f.write(' <parameter name="basis" value="STO-3G" />\n') f.writ...
def write_simspec_file(self, filename, simflow_filename, mmp_filename, outdir, partname): '''Writes the Nano-Hive Sim Spec file, which is an XML file that describes the simulation environment, plugin selection and plugin parameters. ''' # The Nano-Hive Sim Spec file has 4 different sections that must be written in the...
f.write(' <calculator name="qmDynamicsInteraction" plugin="MPQC_SClib">\n') f.write(' <parameter name="logDirectory" value="%s/log" />\n' % nh_home) f.write(' <parameter name="dataDirectory" value="%s/data/MQPC_SClib" />\n' % nh_home) f.write(' <parameter name="basis" value="STO-3G" ...
f.write('\n') f.write(' <calculator name="qmDynamicsInteraction" plugin="MPQC_SClib">\n') f.write(' <parameter name="logDirectory" value="%s/log" />\n' % nh_home) f.write(' <parameter name="dataDirectory" value="%s/data/MQPC_SClib" />\n' % nh_home) f.write(' <parameter name="basis" value="STO-3G" />\n...
def write_simspec_file(self, filename, simflow_filename, mmp_filename, outdir, partname): '''Writes the Nano-Hive Sim Spec file, which is an XML file that describes the simulation environment, plugin selection and plugin parameters. ''' # The Nano-Hive Sim Spec file has 4 different sections that must be written in the...
f.write(' <calculator name="physicalInteraction" plugin="REBO_MBM">\n') f.write(' <parameter name="dataDirectory" value="%s/data/REBO_MBM" />\n' % nh_home) f.write(' </calculator>\n')
f.write('\n') f.write(' <calculator name="physicalInteraction" plugin="REBO_MBM">\n') f.write(' <parameter name="dataDirectory" value="%s/data/REBO_MBM" />\n' % nh_home) f.write(' </calculator>\n')
def write_simspec_file(self, filename, simflow_filename, mmp_filename, outdir, partname): '''Writes the Nano-Hive Sim Spec file, which is an XML file that describes the simulation environment, plugin selection and plugin parameters. ''' # The Nano-Hive Sim Spec file has 4 different sections that must be written in the...
f.write(' <result name="MeasurementSetToFile" plugin="MeasurementSetToFile">\n') f.write(' <parameter name="outputInterval" value="1" />\n') f.write(' <parameter name="outputFile"\n') f.write(' value="%s/data.txt" />\n' % outdir) f.write(' <parameter name=...
f.write('\n') f.write(' <result name="MeasurementSetToFile" plugin="MeasurementSetToFile">\n') f.write(' <parameter name="outputInterval" value="1" />\n') f.write(' <parameter name="outputFile"\n') f.write(' value="%s/data.txt" />\n' % outdir) f.write(' <parameter name="datumSeparator" value="\...
def write_simspec_file(self, filename, simflow_filename, mmp_filename, outdir, partname): '''Writes the Nano-Hive Sim Spec file, which is an XML file that describes the simulation environment, plugin selection and plugin parameters. ''' # The Nano-Hive Sim Spec file has 4 different sections that must be written in the...
f.write(' <result name="POVRayVideo" plugin="POVRayVideo">\n') f.write(' <parameter name="outputInterval" value="1" />\n') f.write(' <parameter name="lengthMultiplier" value="1e10" />\n') f.write(' <parameter name="outputDirectory"\n') f.write(' value="%s/povray" />\n' % ...
f.write('\n') f.write(' <result name="POVRayVideo" plugin="POVRayVideo">\n') f.write(' <parameter name="outputInterval" value="1" />\n') f.write(' <parameter name="lengthMultiplier" value="1e10" />\n') f.write(' <parameter name="outputDirectory"\n') f.write(' value="%s/povray" />\n' % outdir) f...
def write_simspec_file(self, filename, simflow_filename, mmp_filename, outdir, partname): '''Writes the Nano-Hive Sim Spec file, which is an XML file that describes the simulation environment, plugin selection and plugin parameters. ''' # The Nano-Hive Sim Spec file has 4 different sections that must be written in the...
f.write(' <result name="simResult" plugin="NetCDF_DataSet">\n') f.write(' <parameter name="outputInterval" value="1" />\n') f.write(' <parameter name="outputDirectory"\n') f.write(' value="%s" />\n' % outdir) f.write(' <parameter name="maxDataSets" v...
f.write('\n') f.write(' <result name="simResult" plugin="NetCDF_DataSet">\n') f.write(' <parameter name="outputInterval" value="1" />\n') f.write(' <parameter name="outputDirectory"\n') f.write(' value="%s" />\n' % outdir) f.write(' <parameter name="maxDataSets" value="-1" />\n') f.write(' <...
def write_simspec_file(self, filename, simflow_filename, mmp_filename, outdir, partname): '''Writes the Nano-Hive Sim Spec file, which is an XML file that describes the simulation environment, plugin selection and plugin parameters. ''' # The Nano-Hive Sim Spec file has 4 different sections that must be written in the...
f.write(' </simulationFlow>\n')
f.write('\n') f.write(' </simulationFlow>\n')
def write_simspec_file(self, filename, simflow_filename, mmp_filename, outdir, partname): '''Writes the Nano-Hive Sim Spec file, which is an XML file that describes the simulation environment, plugin selection and plugin parameters. ''' # The Nano-Hive Sim Spec file has 4 different sections that must be written in the...
get_filename_and_save_in_prefs(parent, gmspath_prefs_key, 'Choose Nano-Hive Executable')
get_filename_and_save_in_prefs(parent, nanohive_path_prefs_key, 'Choose Nano-Hive Executable')
def _validate_nanohive_program(self): '''Private method: Checks that the Nano-Hive program path exists in the user pref database and that the file it points to exists. If the Nano-Hive path does not exist, the user will be prompted with the file chooser to select the Nano-Hive executable. This function does not check ...
self.textLabel3_2.setPaletteForegroundColor(QColor(0,0,0))
def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl)
self.default_mode_lbl.setPaletteForegroundColor(QColor(0,0,0))
def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl)
mutable_attrs = ('grid_color', ) copyable_attrs = RectGadget.copyable_attrs + ('line_type', 'grid_type', 'x_spacing', 'y_spacing') + mutable_attrs
own_mutable_attrs = ('grid_color', ) mutable_attrs = own_mutable_attrs + RectGadget.mutable_attrs copyable_attrs = RectGadget.copyable_attrs + ('line_type', 'grid_type', 'x_spacing', 'y_spacing') + own_mutable_attrs
def _copy_fixup_at_end(self): # warning [bruce 050704]: some of this code is copied in jig_Gamess.py's Gamess.cm_duplicate method. """[Private method] This runs at the end of a copy operation to copy attributes from the old jig (which could have been done at the start but might as well be done now for most of them) and...
mutable_attrs = ('fill_color', ) copyable_attrs = RectGadget.copyable_attrs + ('resolution', 'opacity', 'show_esp_bbox', 'image_offset', 'edge_offset') + mutable_attrs
own_mutable_attrs = ('fill_color', 'image_mods', ) mutable_attrs = RectGadget.mutable_attrs + own_mutable_attrs copyable_attrs = RectGadget.copyable_attrs + own_mutable_attrs + \ ('resolution', 'opacity', 'show_esp_bbox', 'image_offset', 'edge_offset', 'espimage_file', 'highlightChecked', 'xaxis_orient', 'yaxis_orient'...
def povStrVec(va): rstr = '<' for ii in range(size(va)): rstr += str(va[ii]) + ', ' return rstr
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST) glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
if debug_pref("smoother textures", Choice_boolean_False, prefs_key = True): glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR) if self.have_mipmaps: glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR) else: glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR) else...
def _initTextureEnv(self): glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP) glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP) glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT) glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT) glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTE...
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ix, iy, 0, GL_RGBA, GL_UNSIGNED_BYTE, image)
self.have_mipmaps = False if debug_pref("smoother tiny textures", Choice_boolean_False, prefs_key = True): gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, ix, iy, GL_RGBA, GL_UNSIGNED_BYTE, image) self.have_mipmaps = True else: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ix, iy, 0, GL_RGBA, GL_UNSIGNED_BYTE, image)
def _loadTexture(self): '''Load texture data from current image object ''' ix, iy, image = self.image_obj.getTextureData()
from constants import SELWHAT_ATOMS
def edit(self): '''Force into 'Select Atom' mode before open the dialog ''' from constants import SELWHAT_ATOMS self.assy.o.setMode('SELECTATOMS') Jig.edit(self)
"Portable Network Graphics (*.png);;", parent )
"Portable Network Graphics (*.png);;All Files (*.*);;", parent )
def load_espimage_file(self, choose_new_image = False, parent = None): '''Load the ESP (.png) image file pointed to by self.espimage_file. If the file does not exist, or if choose_new_image is True, the user will be prompted to choose a new image, and if the file chooser dialog is not cancelled, the new image will be l...
env.history.message("Cancelled.")
env.history.message(cmd + "Cancelled.")
def load_espimage_file(self, choose_new_image = False, parent = None): '''Load the ESP (.png) image file pointed to by self.espimage_file. If the file does not exist, or if choose_new_image is True, the user will be prompted to choose a new image, and if the file chooser dialog is not cancelled, the new image will be l...