def main(): gorgonVersion = '@Gorgon_VERSION@' app = QtGui.QApplication(sys.argv) #setting different font sizes for different OSs if (sys.platform == 'win32'): pass elif (sys.platform == 'darwin'): app.setStyleSheet("* { font-size: 10px }") else: app.setStyleSheet("* { font-size: 10px }") pixmap = QtGui.QPixmap(pathname + "/splash.png") splash = QtGui.QSplashScreen(pixmap, QtCore.Qt.WindowStaysOnTopHint) splash.setMask(pixmap.mask()) splash.show() app.processEvents() window = MainWindowForm(gorgonVersion) window.showNormal() window.raise_() # print dir(window.actions) # print window.actions.actionList window.windowManager.skeletonViewer.fileName = QtCore.QString( "skeleton-vp6-b0.4.mrc") window.windowManager.sseViewer.helixFileName = QtCore.QString( "vp6-helices.wrl") window.actions.getAction("perform_SSEFindHelixCorrespondences").trigger() window.windowManager.sseViewer.helixCorrespondanceFinder.ui.lineEditSequenceFile.setText( QtCore.QString("vp6.seq")) # window.windowManager.sseViewer.correspondenceEngine.loadSequenceGraph() window.windowManager.skeletonViewer.loadData() window.windowManager.sseViewer.loadHelixData() # self.sheetFileName = "" # window.windowManager.sseViewer.helixCorrespondanceFinder.checkOk() # window.windowManager.sseViewer.helixCorrespondanceFinder.accept() window.windowManager.sseViewer.helixCorrespondanceFinder.createBasicCorrespondence( ) window.windowManager.sseViewer.correspondenceEngine.executeQuery()
#!/usr/bin/python import sys from libpyGORGON import PDBAtom,Vector3DFloat from PyQt4 import QtGui, QtCore from window_manager import WindowManager from main_window_form import MainWindowForm app = QtGui.QApplication(sys.argv) window = MainWindowForm("2.0") window.addModule(WindowManager(window)) window.showMaximized() cAlphaViewer=window.viewers['calpha'] rawAtom=PDBAtom('AAAA', 'A', 1, 'CA') rawAtom.setPosition(Vector3DFloat(-1, 0, 0)) rawAtom = cAlphaViewer.renderer.addAtom(rawAtom) a = PDBAtom('AAAA', 'A', 2, 'CA') a.setPosition(Vector3DFloat(1, 0, 0)) print 'a:', a b = cAlphaViewer.renderer.addAtom(a) print 'b-1:', b if not cAlphaViewer.loaded: cAlphaViewer.loaded = True cAlphaViewer.emitModelLoaded() del a #This line causes a segmentation fault later on, which is weird because we never use the atom at this location in memory after this #Thus, unless there's a change, I'll have to be extremely careful about Python's garbage collection rawAtom.setColor(1, 0, 0, 1) #Red