Ejemplo n.º 1
0
    def __init__(self, parent=None, system=None, app=None):
        QtGui.QMainWindow.__init__(self, parent=parent)

        self.ui = UI()
        self.ui.setupUi(self)

        self.system = system
        self.app = app
        self.mdi = QtGui.QMdiArea(self)
        self.setCentralWidget(self.mdi)

        self.nebrunner = NEBRunner(app, system)
        self.nebrunner.on_update_gui.connect(self.update)

        self.nebrunner.on_run_started.connect(self.run_started)
        self.nebrunner.on_run_finished.connect(self.run_finished)

        #        from dlg_params import EditParamsWidget
        #        w = QtGui.QDockWidget("NEB parameters", self)
        #        w.setWidget(EditParamsWidget(self,
        #                         self.system.params.double_ended_connect.local_connect_params.NEBparams))
        #        self.addDockWidget(QtCore.Qt.RightDockWidgetArea, w)
        #
        #        self.editparams = w
        #

        self.energies = NEBEnergyWidget()
        self.view_energies = self.new_view("Energies", self.energies,
                                           QtCore.Qt.TopDockWidgetArea)
        self.view_distances = self.new_view("Distances", NEBDistanceWidget(),
                                            QtCore.Qt.TopDockWidgetArea)
        self.view_k = self.new_view("k", NEBTimeseries(attrname="k"),
                                    QtCore.Qt.BottomDockWidgetArea)
        self.view_nimages = self.new_view("nimages",
                                          NEBTimeseries(attrname="nimages"),
                                          QtCore.Qt.BottomDockWidgetArea)
        self.view_rms = self.new_view(
            "rms", NEBTimeseries(attrname="rms", yscale='log'),
            QtCore.Qt.BottomDockWidgetArea)

        self.show3d = Show3DWithSlider()
        self.view_3d = QtGui.QDockWidget("NEB parameters", self)
        self.view_3d.setWidget(self.show3d)
        self.addDockWidget(QtCore.Qt.TopDockWidgetArea, self.view_3d)

        #        self.view_3d.setFloating(True)
        self.view_3d.hide()
        self.show3d.setSystem(self.system)
        self.show3d.on_frame_updated.connect(self.set_current_frame)
        self.centralWidget().hide()
Ejemplo n.º 2
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(764, 829)
        MainWindow.setDockNestingEnabled(False)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setEnabled(True)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 764, 25))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.view_Log = QtGui.QDockWidget(MainWindow)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.view_Log.sizePolicy().hasHeightForWidth())
        self.view_Log.setSizePolicy(sizePolicy)
        self.view_Log.setFeatures(QtGui.QDockWidget.DockWidgetFloatable
                                  | QtGui.QDockWidget.DockWidgetMovable)
        self.view_Log.setAllowedAreas(QtCore.Qt.AllDockWidgetAreas)
        self.view_Log.setObjectName(_fromUtf8("view_Log"))
        self.dockWidgetContents_5 = QtGui.QWidget()
        self.dockWidgetContents_5.setObjectName(
            _fromUtf8("dockWidgetContents_5"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.dockWidgetContents_5)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.textEdit = QtGui.QTextEdit(self.dockWidgetContents_5)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.textEdit.sizePolicy().hasHeightForWidth())
        self.textEdit.setSizePolicy(sizePolicy)
        self.textEdit.setMinimumSize(QtCore.QSize(0, 0))
        self.textEdit.setBaseSize(QtCore.QSize(0, 500))
        self.textEdit.setObjectName(_fromUtf8("textEdit"))
        self.horizontalLayout.addWidget(self.textEdit)
        self.view_Log.setWidget(self.dockWidgetContents_5)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(8), self.view_Log)
        self.view_ogl = QtGui.QDockWidget(MainWindow)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.view_ogl.sizePolicy().hasHeightForWidth())
        self.view_ogl.setSizePolicy(sizePolicy)
        self.view_ogl.setFeatures(QtGui.QDockWidget.DockWidgetFloatable
                                  | QtGui.QDockWidget.DockWidgetMovable)
        self.view_ogl.setAllowedAreas(QtCore.Qt.AllDockWidgetAreas)
        self.view_ogl.setObjectName(_fromUtf8("view_ogl"))
        self.dockWidgetContents_3 = QtGui.QWidget()
        self.dockWidgetContents_3.setObjectName(
            _fromUtf8("dockWidgetContents_3"))
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.dockWidgetContents_3)
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.ogl = Show3DWithSlider(self.dockWidgetContents_3)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ogl.sizePolicy().hasHeightForWidth())
        self.ogl.setSizePolicy(sizePolicy)
        self.ogl.setObjectName(_fromUtf8("ogl"))
        self.horizontalLayout_2.addWidget(self.ogl)
        self.view_ogl.setWidget(self.dockWidgetContents_3)
        MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(4), self.view_ogl)
        self.toolBar = QtGui.QToolBar(MainWindow)
        self.toolBar.setObjectName(_fromUtf8("toolBar"))
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.actionEnergy = QtGui.QAction(MainWindow)
        self.actionEnergy.setCheckable(True)
        self.actionEnergy.setChecked(False)
        self.actionEnergy.setObjectName(_fromUtf8("actionEnergy"))
        self.action3D = QtGui.QAction(MainWindow)
        self.action3D.setCheckable(True)
        self.action3D.setObjectName(_fromUtf8("action3D"))
        self.actionGraph = QtGui.QAction(MainWindow)
        self.actionGraph.setCheckable(True)
        self.actionGraph.setObjectName(_fromUtf8("actionGraph"))
        self.actionPause = QtGui.QAction(MainWindow)
        self.actionPause.setCheckable(True)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/pause.png")),
                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/pause.png")),
                       QtGui.QIcon.Normal, QtGui.QIcon.On)
        self.actionPause.setIcon(icon)
        self.actionPause.setObjectName(_fromUtf8("actionPause"))
        self.actionD_Graph = QtGui.QAction(MainWindow)
        self.actionD_Graph.setCheckable(True)
        self.actionD_Graph.setObjectName(_fromUtf8("actionD_Graph"))
        self.actionSummary = QtGui.QAction(MainWindow)
        self.actionSummary.setCheckable(True)
        self.actionSummary.setObjectName(_fromUtf8("actionSummary"))
        self.actionLog = QtGui.QAction(MainWindow)
        self.actionLog.setCheckable(True)
        self.actionLog.setObjectName(_fromUtf8("actionLog"))
        self.actionKill = QtGui.QAction(MainWindow)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/stop.png")),
                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionKill.setIcon(icon1)
        self.actionKill.setObjectName(_fromUtf8("actionKill"))
        self.toolBar.addAction(self.actionPause)
        self.toolBar.addAction(self.actionKill)
        self.toolBar.addAction(self.actionLog)
        self.toolBar.addAction(self.action3D)
        self.toolBar.addAction(self.actionEnergy)
        self.toolBar.addAction(self.actionGraph)
        self.toolBar.addAction(self.actionD_Graph)
        self.toolBar.addAction(self.actionSummary)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 3
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(854, 611)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setContentsMargins(5, -1, -1, -1)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.label = QtGui.QLabel(self.centralwidget)
        self.label.setText(_fromUtf8(""))
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout_2.addWidget(self.label)
        self.show3d = Show3DWithSlider(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.show3d.sizePolicy().hasHeightForWidth())
        self.show3d.setSizePolicy(sizePolicy)
        self.show3d.setObjectName(_fromUtf8("show3d"))
        self.verticalLayout_2.addWidget(self.show3d)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setContentsMargins(0, -1, -1, -1)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label_2 = QtGui.QLabel(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setMaximumSize(QtCore.QSize(200, 16777215))
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.verticalLayout.addWidget(self.label_2)
        self.listMinima = QtGui.QListWidget(self.centralwidget)
        self.listMinima.setMaximumSize(QtCore.QSize(200, 16777215))
        self.listMinima.setObjectName(_fromUtf8("listMinima"))
        self.verticalLayout.addWidget(self.listMinima)
        self.horizontalLayout.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 854, 25))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.toolBar = QtGui.QToolBar(MainWindow)
        self.toolBar.setObjectName(_fromUtf8("toolBar"))
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.actionDisplace = QtGui.QAction(MainWindow)
        self.actionDisplace.setObjectName(_fromUtf8("actionDisplace"))
        self.actionQuench = QtGui.QAction(MainWindow)
        self.actionQuench.setObjectName(_fromUtf8("actionQuench"))
        self.actionShow_path = QtGui.QAction(MainWindow)
        self.actionShow_path.setCheckable(True)
        self.actionShow_path.setChecked(False)
        self.actionShow_path.setObjectName(_fromUtf8("actionShow_path"))
        self.toolBar.addAction(self.actionDisplace)
        self.toolBar.addAction(self.actionQuench)
        self.toolBar.addAction(self.actionShow_path)

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
Ejemplo n.º 4
0
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(863, 613)
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.splitter = QtGui.QSplitter(self.centralwidget)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName(_fromUtf8("splitter"))
        self.verticalLayoutWidget_2 = QtGui.QWidget(self.splitter)
        self.verticalLayoutWidget_2.setObjectName(_fromUtf8("verticalLayoutWidget_2"))
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.verticalLayoutWidget_2)
        self.verticalLayout_2.setMargin(0)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.mplwidget = MPLWidget(self.verticalLayoutWidget_2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.mplwidget.sizePolicy().hasHeightForWidth())
        self.mplwidget.setSizePolicy(sizePolicy)
        self.mplwidget.setMinimumSize(QtCore.QSize(0, 0))
        self.mplwidget.setMaximumSize(QtCore.QSize(16777215, 300))
        self.mplwidget.setObjectName(_fromUtf8("mplwidget"))
        self.verticalLayout_2.addWidget(self.mplwidget)
        self.view3D = Show3DWithSlider(self.verticalLayoutWidget_2)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.view3D.sizePolicy().hasHeightForWidth())
        self.view3D.setSizePolicy(sizePolicy)
        self.view3D.setMinimumSize(QtCore.QSize(200, 200))
        self.view3D.setObjectName(_fromUtf8("view3D"))
        self.verticalLayout_2.addWidget(self.view3D)
        self.verticalLayoutWidget = QtGui.QWidget(self.splitter)
        self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(self.verticalLayoutWidget)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.listNormalmodes = QtGui.QListWidget(self.verticalLayoutWidget)
        self.listNormalmodes.setObjectName(_fromUtf8("listNormalmodes"))
        self.verticalLayout.addWidget(self.listNormalmodes)
        self.pushClose = QtGui.QPushButton(self.verticalLayoutWidget)
        self.pushClose.setObjectName(_fromUtf8("pushClose"))
        self.verticalLayout.addWidget(self.pushClose)
        self.horizontalLayout.addWidget(self.splitter)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 863, 25))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.toolBar = QtGui.QToolBar(MainWindow)
        self.toolBar.setObjectName(_fromUtf8("toolBar"))
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.actionRun = QtGui.QAction(MainWindow)
        self.actionRun.setCheckable(True)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/run.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/run.png")), QtGui.QIcon.Normal, QtGui.QIcon.On)
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/run.png")), QtGui.QIcon.Disabled, QtGui.QIcon.Off)
        self.actionRun.setIcon(icon)
        self.actionRun.setObjectName(_fromUtf8("actionRun"))
        self.actionSave = QtGui.QAction(MainWindow)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/save.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionSave.setIcon(icon1)
        self.actionSave.setObjectName(_fromUtf8("actionSave"))
        self.actionParameters = QtGui.QAction(MainWindow)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/icons/preferences.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.actionParameters.setIcon(icon2)
        self.actionParameters.setObjectName(_fromUtf8("actionParameters"))
        self.actionShow_energies = QtGui.QAction(MainWindow)
        self.actionShow_energies.setCheckable(True)
        self.actionShow_energies.setObjectName(_fromUtf8("actionShow_energies"))
        self.actionHessian_eigs = QtGui.QAction(MainWindow)
        self.actionHessian_eigs.setCheckable(True)
        self.actionHessian_eigs.setObjectName(_fromUtf8("actionHessian_eigs"))
        self.toolBar.addAction(self.actionRun)
        self.toolBar.addAction(self.actionSave)
        self.toolBar.addAction(self.actionParameters)
        self.toolBar.addAction(self.actionShow_energies)
        self.toolBar.addAction(self.actionHessian_eigs)

        self.retranslateUi(MainWindow)
        QtCore.QObject.connect(self.pushClose, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.close)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)