diff --git a/bnglparser.py b/bnglparser.py new file mode 100644 index 00000000..8eade333 --- /dev/null +++ b/bnglparser.py @@ -0,0 +1,47 @@ +""" +*made to turn parameters into free parameters +*very rudimentary "parser" +""" +def parse(s): + nocomment = s.split("#") + plist = nocomment[0].split(" ") + return(plist) + +def load(path, path2, vlist): + try: + infile = open(path, 'r') + except FileNotFoundError: + raise PybnfError('Configuration file %s not found' % path) + ploop(infile.readlines(), path2, vlist) + infile.close() + +def ploop(path, path2, vlist): + lol = [] + for i, line in enumerate(path): + l = parse(line) + for n, i in enumerate(l): + if i.strip() != "": + for j in vlist: + h = j.replace('__FREE', '') + if i.strip() == h: + try: + val = l[n+1] + except: + val = "" + l[n+1] = str(h + "__FREE") + l.append(str("#" + h + "=" + val)) + #make sure the new lines aren't deleted + if l[-1].strip() != "\n": + l.append("\n") + #append to list of lists + lol.append(l) + #write list of lists to file + pwrite(path2, lol) + +def pwrite(path, lisp): + file = open(path, 'w') + for n in lisp: + string = ' '.join(n) + file.write(string) + +#load("/Users/alex/Desktop/PyBNF/examples/demo/parabola.bngl", "/Users/alex/Desktop/tarabola.bngl", ['v1__FREE', 'v2__FREE', 'v3__FREE']) \ No newline at end of file diff --git a/gui.py b/gui.py new file mode 100644 index 00000000..3077491c --- /dev/null +++ b/gui.py @@ -0,0 +1,1529 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'gui2.ui' +# +# Created by: PyQt5 UI code generator 5.6 +# +# WARNING! All changes made in this file will be lost! + +from PyQt5 import QtCore, QtGui, QtWidgets + +class Ui_mainWindow(object): + def setupUi(self, mainWindow): + mainWindow.setObjectName("mainWindow") + mainWindow.resize(994, 644) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(mainWindow.sizePolicy().hasHeightForWidth()) + mainWindow.setSizePolicy(sizePolicy) + mainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215)) + self.centralwidget = QtWidgets.QWidget(mainWindow) + self.centralwidget.setObjectName("centralwidget") + self.verticalLayoutWidget = QtWidgets.QWidget(self.centralwidget) + self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 80, 991, 511)) + self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") + self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) + self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SetNoConstraint) + self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.verticalLayout.setObjectName("verticalLayout") + self.tabWidget = QtWidgets.QTabWidget(self.verticalLayoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) + self.tabWidget.setSizePolicy(sizePolicy) + self.tabWidget.setMinimumSize(QtCore.QSize(799, 0)) + self.tabWidget.setMaximumSize(QtCore.QSize(16777215, 506)) + self.tabWidget.setObjectName("tabWidget") + self.input_files = QtWidgets.QWidget() + self.input_files.setObjectName("input_files") + self.toolBox = QtWidgets.QToolBox(self.input_files) + self.toolBox.setGeometry(QtCore.QRect(10, 10, 961, 461)) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.toolBox.sizePolicy().hasHeightForWidth()) + self.toolBox.setSizePolicy(sizePolicy) + self.toolBox.setFrameShape(QtWidgets.QFrame.NoFrame) + self.toolBox.setObjectName("toolBox") + self.page_9 = QtWidgets.QWidget() + self.page_9.setGeometry(QtCore.QRect(0, 0, 961, 291)) + self.page_9.setObjectName("page_9") + self.modelList = QtWidgets.QListWidget(self.page_9) + self.modelList.setGeometry(QtCore.QRect(0, 30, 450, 141)) + self.modelList.setEditTriggers(QtWidgets.QAbstractItemView.AllEditTriggers) + self.modelList.setObjectName("modelList") + self.expList = QtWidgets.QListWidget(self.page_9) + self.expList.setGeometry(QtCore.QRect(490, 30, 450, 141)) + self.expList.setObjectName("expList") + self.modelpBtn = QtWidgets.QPushButton(self.page_9) + self.modelpBtn.setGeometry(QtCore.QRect(360, 0, 51, 32)) + self.modelpBtn.setObjectName("modelpBtn") + self.modelmBtn = QtWidgets.QPushButton(self.page_9) + self.modelmBtn.setGeometry(QtCore.QRect(400, 0, 51, 32)) + self.modelmBtn.setObjectName("modelmBtn") + self.label_8 = QtWidgets.QLabel(self.page_9) + self.label_8.setGeometry(QtCore.QRect(490, 0, 121, 31)) + self.label_8.setObjectName("label_8") + self.label_2 = QtWidgets.QLabel(self.page_9) + self.label_2.setGeometry(QtCore.QRect(0, 0, 61, 31)) + self.label_2.setObjectName("label_2") + self.exppBtn = QtWidgets.QPushButton(self.page_9) + self.exppBtn.setGeometry(QtCore.QRect(850, 0, 51, 32)) + self.exppBtn.setObjectName("exppBtn") + self.expmBtn = QtWidgets.QPushButton(self.page_9) + self.expmBtn.setGeometry(QtCore.QRect(890, 0, 51, 32)) + self.expmBtn.setObjectName("expmBtn") + self.model_txt = QtWidgets.QTextEdit(self.page_9) + self.model_txt.setGeometry(QtCore.QRect(0, 220, 941, 61)) + self.model_txt.setObjectName("model_txt") + self.toolBox.addItem(self.page_9, "") + self.page_10 = QtWidgets.QWidget() + self.page_10.setGeometry(QtCore.QRect(0, 0, 961, 291)) + self.page_10.setObjectName("page_10") + self.textEdit_15 = QtWidgets.QTextEdit(self.page_10) + self.textEdit_15.setGeometry(QtCore.QRect(0, 200, 941, 111)) + self.textEdit_15.setObjectName("textEdit_15") + self.mutantList = QtWidgets.QListWidget(self.page_10) + self.mutantList.setGeometry(QtCore.QRect(180, 20, 250, 171)) + self.mutantList.setEditTriggers(QtWidgets.QAbstractItemView.AllEditTriggers) + self.mutantList.setObjectName("mutantList") + self.label_40 = QtWidgets.QLabel(self.page_10) + self.label_40.setGeometry(QtCore.QRect(180, 0, 60, 16)) + self.label_40.setObjectName("label_40") + self.statementList = QtWidgets.QListWidget(self.page_10) + self.statementList.setGeometry(QtCore.QRect(450, 20, 210, 171)) + self.statementList.setEditTriggers(QtWidgets.QAbstractItemView.AllEditTriggers) + self.statementList.setObjectName("statementList") + self.label_41 = QtWidgets.QLabel(self.page_10) + self.label_41.setGeometry(QtCore.QRect(450, 0, 81, 16)) + self.label_41.setObjectName("label_41") + self.mexpList = QtWidgets.QListWidget(self.page_10) + self.mexpList.setGeometry(QtCore.QRect(679, 20, 261, 171)) + self.mexpList.setEditTriggers(QtWidgets.QAbstractItemView.AllEditTriggers) + self.mexpList.setObjectName("mexpList") + self.label_42 = QtWidgets.QLabel(self.page_10) + self.label_42.setGeometry(QtCore.QRect(680, 0, 121, 16)) + self.label_42.setObjectName("label_42") + self.nameList = QtWidgets.QListWidget(self.page_10) + self.nameList.setGeometry(QtCore.QRect(10, 20, 150, 171)) + self.nameList.setEditTriggers(QtWidgets.QAbstractItemView.AllEditTriggers) + self.nameList.setObjectName("nameList") + self.label_44 = QtWidgets.QLabel(self.page_10) + self.label_44.setGeometry(QtCore.QRect(10, 0, 60, 16)) + self.label_44.setObjectName("label_44") + self.maddBtn = QtWidgets.QPushButton(self.page_10) + self.maddBtn.setGeometry(QtCore.QRect(400, 0, 31, 21)) + self.maddBtn.setObjectName("maddBtn") + self.remnameBtn = QtWidgets.QPushButton(self.page_10) + self.remnameBtn.setGeometry(QtCore.QRect(130, 0, 31, 21)) + self.remnameBtn.setObjectName("remnameBtn") + self.addnameBtn = QtWidgets.QPushButton(self.page_10) + self.addnameBtn.setGeometry(QtCore.QRect(100, 0, 31, 21)) + self.addnameBtn.setObjectName("addnameBtn") + self.addStatementBtn = QtWidgets.QPushButton(self.page_10) + self.addStatementBtn.setGeometry(QtCore.QRect(600, 0, 31, 21)) + self.addStatementBtn.setObjectName("addStatementBtn") + self.remStatementBtn = QtWidgets.QPushButton(self.page_10) + self.remStatementBtn.setGeometry(QtCore.QRect(630, 0, 31, 21)) + self.remStatementBtn.setObjectName("remStatementBtn") + self.addmexpBtn = QtWidgets.QPushButton(self.page_10) + self.addmexpBtn.setGeometry(QtCore.QRect(880, 0, 31, 21)) + self.addmexpBtn.setObjectName("addmexpBtn") + self.remmexpBtn = QtWidgets.QPushButton(self.page_10) + self.remmexpBtn.setGeometry(QtCore.QRect(910, 0, 31, 21)) + self.remmexpBtn.setObjectName("remmexpBtn") + self.toolBox.addItem(self.page_10, "") + self.page_13 = QtWidgets.QWidget() + self.page_13.setGeometry(QtCore.QRect(0, 0, 961, 291)) + self.page_13.setObjectName("page_13") + self.typeList = QtWidgets.QListWidget(self.page_13) + self.typeList.setGeometry(QtCore.QRect(0, 30, 450, 141)) + self.typeList.setObjectName("typeList") + self.expList2 = QtWidgets.QListWidget(self.page_13) + self.expList2.setGeometry(QtCore.QRect(490, 30, 450, 141)) + self.expList2.setObjectName("expList2") + self.typeaddBtn = QtWidgets.QPushButton(self.page_13) + self.typeaddBtn.setGeometry(QtCore.QRect(360, 0, 51, 32)) + self.typeaddBtn.setObjectName("typeaddBtn") + self.typeremBtn = QtWidgets.QPushButton(self.page_13) + self.typeremBtn.setGeometry(QtCore.QRect(400, 0, 51, 32)) + self.typeremBtn.setObjectName("typeremBtn") + self.label_49 = QtWidgets.QLabel(self.page_13) + self.label_49.setGeometry(QtCore.QRect(0, 10, 41, 16)) + self.label_49.setObjectName("label_49") + self.label_50 = QtWidgets.QLabel(self.page_13) + self.label_50.setGeometry(QtCore.QRect(490, 10, 141, 16)) + self.label_50.setObjectName("label_50") + self.expaddBtn = QtWidgets.QPushButton(self.page_13) + self.expaddBtn.setGeometry(QtCore.QRect(850, 0, 51, 32)) + self.expaddBtn.setObjectName("expaddBtn") + self.expremBtn = QtWidgets.QPushButton(self.page_13) + self.expremBtn.setGeometry(QtCore.QRect(890, 0, 51, 32)) + self.expremBtn.setObjectName("expremBtn") + self.textBrowser = QtWidgets.QTextBrowser(self.page_13) + self.textBrowser.setGeometry(QtCore.QRect(0, 190, 941, 91)) + self.textBrowser.setObjectName("textBrowser") + self.toolBox.addItem(self.page_13, "") + self.page_11 = QtWidgets.QWidget() + self.page_11.setGeometry(QtCore.QRect(0, 0, 961, 291)) + self.page_11.setObjectName("page_11") + self.timeArea = QtWidgets.QScrollArea(self.page_11) + self.timeArea.setGeometry(QtCore.QRect(0, 30, 941, 191)) + self.timeArea.setWidgetResizable(True) + self.timeArea.setObjectName("timeArea") + self.scrollAreaWidgetContents_4 = QtWidgets.QWidget() + self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 939, 189)) + self.scrollAreaWidgetContents_4.setObjectName("scrollAreaWidgetContents_4") + self.timeArea.setWidget(self.scrollAreaWidgetContents_4) + self.addCourseBtn = QtWidgets.QPushButton(self.page_11) + self.addCourseBtn.setGeometry(QtCore.QRect(890, 0, 51, 32)) + self.addCourseBtn.setObjectName("addCourseBtn") + self.textEdit_16 = QtWidgets.QTextEdit(self.page_11) + self.textEdit_16.setGeometry(QtCore.QRect(0, 230, 941, 61)) + self.textEdit_16.setObjectName("textEdit_16") + self.toolBox.addItem(self.page_11, "") + self.page_12 = QtWidgets.QWidget() + self.page_12.setGeometry(QtCore.QRect(0, 0, 961, 291)) + self.page_12.setObjectName("page_12") + self.scanArea = QtWidgets.QScrollArea(self.page_12) + self.scanArea.setGeometry(QtCore.QRect(0, 30, 941, 191)) + self.scanArea.setWidgetResizable(True) + self.scanArea.setObjectName("scanArea") + self.scrollAreaWidgetContents_5 = QtWidgets.QWidget() + self.scrollAreaWidgetContents_5.setGeometry(QtCore.QRect(0, 0, 939, 189)) + self.scrollAreaWidgetContents_5.setObjectName("scrollAreaWidgetContents_5") + self.scanArea.setWidget(self.scrollAreaWidgetContents_5) + self.addScanBtn = QtWidgets.QPushButton(self.page_12) + self.addScanBtn.setGeometry(QtCore.QRect(890, 0, 51, 32)) + self.addScanBtn.setObjectName("addScanBtn") + self.textEdit_17 = QtWidgets.QTextEdit(self.page_12) + self.textEdit_17.setGeometry(QtCore.QRect(0, 230, 941, 81)) + self.textEdit_17.setObjectName("textEdit_17") + self.toolBox.addItem(self.page_12, "") + self.tabWidget.addTab(self.input_files, "") + self.free_params = QtWidgets.QWidget() + self.free_params.setObjectName("free_params") + self.addBtn = QtWidgets.QPushButton(self.free_params) + self.addBtn.setGeometry(QtCore.QRect(440, 0, 51, 32)) + self.addBtn.setObjectName("addBtn") + self.scrollArea = QtWidgets.QScrollArea(self.free_params) + self.scrollArea.setGeometry(QtCore.QRect(10, 30, 481, 441)) + self.scrollArea.setWidgetResizable(True) + self.scrollArea.setObjectName("scrollArea") + self.scrollAreaWidgetContents = QtWidgets.QWidget() + self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 479, 439)) + self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") + self.scrollArea.setWidget(self.scrollAreaWidgetContents) + self.gridLayoutWidget_13 = QtWidgets.QWidget(self.free_params) + self.gridLayoutWidget_13.setGeometry(QtCore.QRect(20, 0, 181, 31)) + self.gridLayoutWidget_13.setObjectName("gridLayoutWidget_13") + self.gridLayout_2 = QtWidgets.QGridLayout(self.gridLayoutWidget_13) + self.gridLayout_2.setContentsMargins(0, 0, 0, 0) + self.gridLayout_2.setObjectName("gridLayout_2") + self.label_3 = QtWidgets.QLabel(self.gridLayoutWidget_13) + self.label_3.setTextFormat(QtCore.Qt.RichText) + self.label_3.setObjectName("label_3") + self.gridLayout_2.addWidget(self.label_3, 0, 0, 1, 1) + self.label_7 = QtWidgets.QLabel(self.gridLayoutWidget_13) + self.label_7.setObjectName("label_7") + self.gridLayout_2.addWidget(self.label_7, 0, 1, 1, 1) + self.textEdit_11 = QtWidgets.QTextEdit(self.free_params) + self.textEdit_11.setGeometry(QtCore.QRect(490, 30, 301, 441)) + self.textEdit_11.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_11.setObjectName("textEdit_11") + self.tabWidget.addTab(self.free_params, "") + self.paths = QtWidgets.QWidget() + self.paths.setObjectName("paths") + self.gridLayoutWidget_10 = QtWidgets.QWidget(self.paths) + self.gridLayoutWidget_10.setGeometry(QtCore.QRect(30, 0, 505, 226)) + self.gridLayoutWidget_10.setObjectName("gridLayoutWidget_10") + self.path_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_10) + self.path_layout.setContentsMargins(0, 0, 0, 0) + self.path_layout.setObjectName("path_layout") + self.label_16 = QtWidgets.QLabel(self.gridLayoutWidget_10) + self.label_16.setObjectName("label_16") + self.path_layout.addWidget(self.label_16, 0, 0, 1, 1) + self.output_dir = QtWidgets.QTextEdit(self.gridLayoutWidget_10) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.output_dir.sizePolicy().hasHeightForWidth()) + self.output_dir.setSizePolicy(sizePolicy) + self.output_dir.setMaximumSize(QtCore.QSize(16777215, 100)) + self.output_dir.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored) + self.output_dir.setObjectName("output_dir") + self.path_layout.addWidget(self.output_dir, 0, 2, 1, 1) + self.bngBtn = QtWidgets.QPushButton(self.gridLayoutWidget_10) + self.bngBtn.setObjectName("bngBtn") + self.path_layout.addWidget(self.bngBtn, 1, 1, 1, 1) + self.bng_command = QtWidgets.QTextEdit(self.gridLayoutWidget_10) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.bng_command.sizePolicy().hasHeightForWidth()) + self.bng_command.setSizePolicy(sizePolicy) + self.bng_command.setMaximumSize(QtCore.QSize(16777215, 100)) + self.bng_command.setObjectName("bng_command") + self.path_layout.addWidget(self.bng_command, 1, 2, 1, 1) + self.outputBtn = QtWidgets.QPushButton(self.gridLayoutWidget_10) + self.outputBtn.setObjectName("outputBtn") + self.path_layout.addWidget(self.outputBtn, 0, 1, 1, 1) + self.label_24 = QtWidgets.QLabel(self.gridLayoutWidget_10) + self.label_24.setObjectName("label_24") + self.path_layout.addWidget(self.label_24, 1, 0, 1, 1) + self.tabWidget.addTab(self.paths, "") + self.general_options = QtWidgets.QWidget() + self.general_options.setObjectName("general_options") + self.gridLayoutWidget_9 = QtWidgets.QWidget(self.general_options) + self.gridLayoutWidget_9.setGeometry(QtCore.QRect(30, 0, 221, 461)) + self.gridLayoutWidget_9.setObjectName("gridLayoutWidget_9") + self.go_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_9) + self.go_layout.setContentsMargins(0, 0, 0, 0) + self.go_layout.setObjectName("go_layout") + self.wall_time_sim = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.wall_time_sim.setText("") + self.wall_time_sim.setObjectName("wall_time_sim") + self.go_layout.addWidget(self.wall_time_sim, 5, 1, 1, 1) + self.delete_old_files = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.delete_old_files.setText("") + self.delete_old_files.setObjectName("delete_old_files") + self.go_layout.addWidget(self.delete_old_files, 2, 1, 1, 1) + self.label_10 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_10.setObjectName("label_10") + self.go_layout.addWidget(self.label_10, 1, 0, 1, 1) + self.refine = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.refine.setText("") + self.refine.setObjectName("refine") + self.go_layout.addWidget(self.refine, 1, 1, 1, 1) + self.verbosity = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.verbosity.setObjectName("verbosity") + self.go_layout.addWidget(self.verbosity, 7, 1, 1, 1) + self.label_6 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_6.setObjectName("label_6") + self.go_layout.addWidget(self.label_6, 0, 0, 1, 1) + self.local_objective_eval = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.local_objective_eval.setObjectName("local_objective_eval") + self.go_layout.addWidget(self.local_objective_eval, 11, 1, 1, 1) + self.label_11 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_11.setObjectName("label_11") + self.go_layout.addWidget(self.label_11, 5, 0, 1, 1) + self.label_25 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_25.setObjectName("label_25") + self.go_layout.addWidget(self.label_25, 2, 0, 1, 1) + self.ind_var_rounding = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.ind_var_rounding.setObjectName("ind_var_rounding") + self.go_layout.addWidget(self.ind_var_rounding, 10, 1, 1, 1) + self.bootstrap = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.bootstrap.setObjectName("bootstrap") + self.go_layout.addWidget(self.bootstrap, 12, 1, 1, 1) + self.label_13 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_13.setObjectName("label_13") + self.go_layout.addWidget(self.label_13, 7, 0, 1, 1) + self.label_20 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_20.setObjectName("label_20") + self.go_layout.addWidget(self.label_20, 10, 0, 1, 1) + self.label_28 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_28.setObjectName("label_28") + self.go_layout.addWidget(self.label_28, 11, 0, 1, 1) + self.label_18 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_18.setObjectName("label_18") + self.go_layout.addWidget(self.label_18, 9, 0, 1, 1) + self.parallel_count = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.parallel_count.setObjectName("parallel_count") + self.go_layout.addWidget(self.parallel_count, 0, 1, 1, 1) + self.min_objective = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.min_objective.setObjectName("min_objective") + self.go_layout.addWidget(self.min_objective, 9, 1, 1, 1) + self.label_14 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_14.setObjectName("label_14") + self.go_layout.addWidget(self.label_14, 8, 0, 1, 1) + self.smoothing = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.smoothing.setObjectName("smoothing") + self.go_layout.addWidget(self.smoothing, 8, 1, 1, 1) + self.bootstrap_max_obj = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.bootstrap_max_obj.setObjectName("bootstrap_max_obj") + self.go_layout.addWidget(self.bootstrap_max_obj, 13, 1, 1, 1) + self.label_30 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_30.setObjectName("label_30") + self.go_layout.addWidget(self.label_30, 13, 0, 1, 1) + self.label_26 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_26.setObjectName("label_26") + self.go_layout.addWidget(self.label_26, 3, 0, 1, 1) + self.label_27 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_27.setObjectName("label_27") + self.go_layout.addWidget(self.label_27, 4, 0, 1, 1) + self.num_to_output = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.num_to_output.setText("") + self.num_to_output.setObjectName("num_to_output") + self.go_layout.addWidget(self.num_to_output, 3, 1, 1, 1) + self.output_every = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.output_every.setText("") + self.output_every.setObjectName("output_every") + self.go_layout.addWidget(self.output_every, 4, 1, 1, 1) + self.wall_time_gen = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.wall_time_gen.setText("") + self.wall_time_gen.setObjectName("wall_time_gen") + self.go_layout.addWidget(self.wall_time_gen, 6, 1, 1, 1) + self.label_12 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_12.setObjectName("label_12") + self.go_layout.addWidget(self.label_12, 6, 0, 1, 1) + self.label_29 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_29.setObjectName("label_29") + self.go_layout.addWidget(self.label_29, 12, 0, 1, 1) + self.constraint_scale = QtWidgets.QLineEdit(self.gridLayoutWidget_9) + self.constraint_scale.setObjectName("constraint_scale") + self.go_layout.addWidget(self.constraint_scale, 14, 1, 1, 1) + self.label_43 = QtWidgets.QLabel(self.gridLayoutWidget_9) + self.label_43.setObjectName("label_43") + self.go_layout.addWidget(self.label_43, 14, 0, 1, 1) + self.textEdit = QtWidgets.QTextEdit(self.general_options) + self.textEdit.setGeometry(QtCore.QRect(270, 0, 521, 471)) + self.textEdit.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit.setObjectName("textEdit") + self.tabWidget.addTab(self.general_options, "") + self.alg_params = QtWidgets.QWidget() + self.alg_params.setObjectName("alg_params") + self.gridLayoutWidget = QtWidgets.QWidget(self.alg_params) + self.gridLayoutWidget.setGeometry(QtCore.QRect(70, 100, 330, 41)) + self.gridLayoutWidget.setObjectName("gridLayoutWidget") + self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget) + self.gridLayout.setContentsMargins(0, 0, 0, 0) + self.gridLayout.setObjectName("gridLayout") + self.fitCb = QtWidgets.QComboBox(self.gridLayoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.fitCb.sizePolicy().hasHeightForWidth()) + self.fitCb.setSizePolicy(sizePolicy) + self.fitCb.setObjectName("fitCb") + self.fitCb.addItem("") + self.fitCb.addItem("") + self.fitCb.addItem("") + self.fitCb.addItem("") + self.fitCb.addItem("") + self.fitCb.addItem("") + self.fitCb.addItem("") + self.fitCb.addItem("") + self.fitCb.addItem("") + self.gridLayout.addWidget(self.fitCb, 0, 2, 1, 1) + self.label_15 = QtWidgets.QLabel(self.gridLayoutWidget) + self.label_15.setObjectName("label_15") + self.gridLayout.addWidget(self.label_15, 0, 1, 1, 1) + self.formLayoutWidget_3 = QtWidgets.QWidget(self.alg_params) + self.formLayoutWidget_3.setGeometry(QtCore.QRect(-1, 0, 361, 101)) + self.formLayoutWidget_3.setObjectName("formLayoutWidget_3") + self.mult_layout = QtWidgets.QFormLayout(self.formLayoutWidget_3) + self.mult_layout.setContentsMargins(0, 0, 0, 0) + self.mult_layout.setObjectName("mult_layout") + self.label_17 = QtWidgets.QLabel(self.formLayoutWidget_3) + self.label_17.setObjectName("label_17") + self.mult_layout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_17) + self.population_size = QtWidgets.QLineEdit(self.formLayoutWidget_3) + self.population_size.setObjectName("population_size") + self.mult_layout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.population_size) + self.label_19 = QtWidgets.QLabel(self.formLayoutWidget_3) + self.label_19.setObjectName("label_19") + self.mult_layout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_19) + self.max_iterations = QtWidgets.QLineEdit(self.formLayoutWidget_3) + self.max_iterations.setObjectName("max_iterations") + self.mult_layout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.max_iterations) + self.label_9 = QtWidgets.QLabel(self.formLayoutWidget_3) + self.label_9.setObjectName("label_9") + self.mult_layout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_9) + self.initCb = QtWidgets.QComboBox(self.formLayoutWidget_3) + self.initCb.setObjectName("initCb") + self.initCb.addItem("") + self.initCb.addItem("") + self.mult_layout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.initCb) + self.fitStack = QtWidgets.QStackedWidget(self.alg_params) + self.fitStack.setGeometry(QtCore.QRect(130, 110, 661, 361)) + self.fitStack.setObjectName("fitStack") + self.page = QtWidgets.QWidget() + self.page.setObjectName("page") + self.gridLayoutWidget_2 = QtWidgets.QWidget(self.page) + self.gridLayoutWidget_2.setGeometry(QtCore.QRect(0, 30, 241, 249)) + self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2") + self.de_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_2) + self.de_layout.setContentsMargins(0, 0, 0, 0) + self.de_layout.setObjectName("de_layout") + self.de_strategy = QtWidgets.QComboBox(self.gridLayoutWidget_2) + self.de_strategy.setObjectName("de_strategy") + self.de_strategy.addItem("") + self.de_strategy.addItem("") + self.de_strategy.addItem("") + self.de_strategy.addItem("") + self.de_strategy.addItem("") + self.de_strategy.addItem("") + self.de_layout.addWidget(self.de_strategy, 3, 1, 1, 1) + self.line_2 = QtWidgets.QFrame(self.gridLayoutWidget_2) + self.line_2.setFrameShape(QtWidgets.QFrame.HLine) + self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_2.setObjectName("line_2") + self.de_layout.addWidget(self.line_2, 4, 1, 1, 1) + self.line = QtWidgets.QFrame(self.gridLayoutWidget_2) + self.line.setFrameShape(QtWidgets.QFrame.HLine) + self.line.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line.setObjectName("line") + self.de_layout.addWidget(self.line, 4, 0, 1, 1) + self.stop_tolerance = QtWidgets.QLineEdit(self.gridLayoutWidget_2) + self.stop_tolerance.setText("") + self.stop_tolerance.setObjectName("stop_tolerance") + self.de_layout.addWidget(self.stop_tolerance, 2, 1, 1, 1) + self.migrate_every = QtWidgets.QLineEdit(self.gridLayoutWidget_2) + self.migrate_every.setText("") + self.migrate_every.setObjectName("migrate_every") + self.de_layout.addWidget(self.migrate_every, 7, 1, 1, 1) + self.ntmlabel = QtWidgets.QLabel(self.gridLayoutWidget_2) + self.ntmlabel.setObjectName("ntmlabel") + self.de_layout.addWidget(self.ntmlabel, 8, 0, 1, 1) + self.islands = QtWidgets.QLineEdit(self.gridLayoutWidget_2) + self.islands.setText("") + self.islands.setObjectName("islands") + self.de_layout.addWidget(self.islands, 6, 1, 1, 1) + self.mutation_rate = QtWidgets.QLineEdit(self.gridLayoutWidget_2) + self.mutation_rate.setText("") + self.mutation_rate.setObjectName("mutation_rate") + self.de_layout.addWidget(self.mutation_rate, 0, 1, 1, 1) + self.ilabel = QtWidgets.QLabel(self.gridLayoutWidget_2) + self.ilabel.setObjectName("ilabel") + self.de_layout.addWidget(self.ilabel, 6, 0, 1, 1) + self.melabel = QtWidgets.QLabel(self.gridLayoutWidget_2) + self.melabel.setObjectName("melabel") + self.de_layout.addWidget(self.melabel, 7, 0, 1, 1) + self.mflabel = QtWidgets.QLabel(self.gridLayoutWidget_2) + self.mflabel.setObjectName("mflabel") + self.de_layout.addWidget(self.mflabel, 1, 0, 1, 1) + self.mutation_factor = QtWidgets.QLineEdit(self.gridLayoutWidget_2) + self.mutation_factor.setText("") + self.mutation_factor.setObjectName("mutation_factor") + self.de_layout.addWidget(self.mutation_factor, 1, 1, 1, 1) + self.mrlabel = QtWidgets.QLabel(self.gridLayoutWidget_2) + self.mrlabel.setObjectName("mrlabel") + self.de_layout.addWidget(self.mrlabel, 0, 0, 1, 1) + self.num_to_migrate = QtWidgets.QLineEdit(self.gridLayoutWidget_2) + self.num_to_migrate.setText("") + self.num_to_migrate.setObjectName("num_to_migrate") + self.de_layout.addWidget(self.num_to_migrate, 8, 1, 1, 1) + self.label_34 = QtWidgets.QLabel(self.gridLayoutWidget_2) + self.label_34.setObjectName("label_34") + self.de_layout.addWidget(self.label_34, 5, 0, 1, 1) + self.label_33 = QtWidgets.QLabel(self.gridLayoutWidget_2) + self.label_33.setObjectName("label_33") + self.de_layout.addWidget(self.label_33, 3, 0, 1, 1) + self.stlabel = QtWidgets.QLabel(self.gridLayoutWidget_2) + self.stlabel.setObjectName("stlabel") + self.de_layout.addWidget(self.stlabel, 2, 0, 1, 1) + self.textEdit_2 = QtWidgets.QTextEdit(self.page) + self.textEdit_2.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_2.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_2.setObjectName("textEdit_2") + self.fitStack.addWidget(self.page) + self.page_14 = QtWidgets.QWidget() + self.page_14.setObjectName("page_14") + self.gridLayoutWidget_16 = QtWidgets.QWidget(self.page_14) + self.gridLayoutWidget_16.setGeometry(QtCore.QRect(0, 30, 241, 211)) + self.gridLayoutWidget_16.setObjectName("gridLayoutWidget_16") + self.ade_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_16) + self.ade_layout.setContentsMargins(0, 0, 0, 0) + self.ade_layout.setObjectName("ade_layout") + self.stop_tolerance2 = QtWidgets.QLineEdit(self.gridLayoutWidget_16) + self.stop_tolerance2.setText("") + self.stop_tolerance2.setObjectName("stop_tolerance2") + self.ade_layout.addWidget(self.stop_tolerance2, 2, 1, 1, 1) + self.mutation_rate2 = QtWidgets.QLineEdit(self.gridLayoutWidget_16) + self.mutation_rate2.setText("") + self.mutation_rate2.setObjectName("mutation_rate2") + self.ade_layout.addWidget(self.mutation_rate2, 0, 1, 1, 1) + self.de_strategy2 = QtWidgets.QComboBox(self.gridLayoutWidget_16) + self.de_strategy2.setObjectName("de_strategy2") + self.de_strategy2.addItem("") + self.de_strategy2.addItem("") + self.de_strategy2.addItem("") + self.de_strategy2.addItem("") + self.de_strategy2.addItem("") + self.de_strategy2.addItem("") + self.ade_layout.addWidget(self.de_strategy2, 3, 1, 1, 1) + self.stlabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_16) + self.stlabel_2.setObjectName("stlabel_2") + self.ade_layout.addWidget(self.stlabel_2, 2, 0, 1, 1) + self.mflabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_16) + self.mflabel_2.setObjectName("mflabel_2") + self.ade_layout.addWidget(self.mflabel_2, 1, 0, 1, 1) + self.mrlabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_16) + self.mrlabel_2.setObjectName("mrlabel_2") + self.ade_layout.addWidget(self.mrlabel_2, 0, 0, 1, 1) + self.label_51 = QtWidgets.QLabel(self.gridLayoutWidget_16) + self.label_51.setObjectName("label_51") + self.ade_layout.addWidget(self.label_51, 3, 0, 1, 1) + self.mutation_factor2 = QtWidgets.QLineEdit(self.gridLayoutWidget_16) + self.mutation_factor2.setText("") + self.mutation_factor2.setObjectName("mutation_factor2") + self.ade_layout.addWidget(self.mutation_factor2, 1, 1, 1, 1) + self.textEdit_12 = QtWidgets.QTextEdit(self.page_14) + self.textEdit_12.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_12.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_12.setObjectName("textEdit_12") + self.fitStack.addWidget(self.page_14) + self.page_2 = QtWidgets.QWidget() + self.page_2.setObjectName("page_2") + self.gridLayoutWidget_3 = QtWidgets.QWidget(self.page_2) + self.gridLayoutWidget_3.setGeometry(QtCore.QRect(0, 30, 241, 312)) + self.gridLayoutWidget_3.setObjectName("gridLayoutWidget_3") + self.pso_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_3) + self.pso_layout.setContentsMargins(0, 0, 0, 0) + self.pso_layout.setObjectName("pso_layout") + self.social = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.social.setObjectName("social") + self.pso_layout.addWidget(self.social, 1, 1, 1, 1) + self.soclabel = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.soclabel.setObjectName("soclabel") + self.pso_layout.addWidget(self.soclabel, 1, 0, 1, 1) + self.coglabel = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.coglabel.setObjectName("coglabel") + self.pso_layout.addWidget(self.coglabel, 0, 0, 1, 1) + self.cognitive = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.cognitive.setMouseTracking(True) + self.cognitive.setObjectName("cognitive") + self.pso_layout.addWidget(self.cognitive, 0, 1, 1, 1) + self.particle_weight = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.particle_weight.setText("") + self.particle_weight.setObjectName("particle_weight") + self.pso_layout.addWidget(self.particle_weight, 2, 1, 1, 1) + self.pawlabel = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.pawlabel.setObjectName("pawlabel") + self.pso_layout.addWidget(self.pawlabel, 2, 0, 1, 1) + self.adaptnslabel = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.adaptnslabel.setObjectName("adaptnslabel") + self.pso_layout.addWidget(self.adaptnslabel, 8, 0, 1, 1) + self.adaptive_n_max = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.adaptive_n_max.setText("") + self.adaptive_n_max.setObjectName("adaptive_n_max") + self.pso_layout.addWidget(self.adaptive_n_max, 7, 1, 1, 1) + self.adaptive_n_stop = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.adaptive_n_stop.setText("") + self.adaptive_n_stop.setObjectName("adaptive_n_stop") + self.pso_layout.addWidget(self.adaptive_n_stop, 8, 1, 1, 1) + self.adaptive_rel_tol = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.adaptive_rel_tol.setText("") + self.adaptive_rel_tol.setObjectName("adaptive_rel_tol") + self.pso_layout.addWidget(self.adaptive_rel_tol, 10, 1, 1, 1) + self.adaptive_abs_tol = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.adaptive_abs_tol.setText("") + self.adaptive_abs_tol.setObjectName("adaptive_abs_tol") + self.pso_layout.addWidget(self.adaptive_abs_tol, 9, 1, 1, 1) + self.adaptatlabel = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.adaptatlabel.setObjectName("adaptatlabel") + self.pso_layout.addWidget(self.adaptatlabel, 9, 0, 1, 1) + self.adaptnmlabel = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.adaptnmlabel.setObjectName("adaptnmlabel") + self.pso_layout.addWidget(self.adaptnmlabel, 7, 0, 1, 1) + self.adaptrtlabel = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.adaptrtlabel.setObjectName("adaptrtlabel") + self.pso_layout.addWidget(self.adaptrtlabel, 10, 0, 1, 1) + self.pawflabel = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.pawflabel.setObjectName("pawflabel") + self.pso_layout.addWidget(self.pawflabel, 6, 0, 1, 1) + self.particle_weight_final = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.particle_weight_final.setText("") + self.particle_weight_final.setObjectName("particle_weight_final") + self.pso_layout.addWidget(self.particle_weight_final, 6, 1, 1, 1) + self.line_3 = QtWidgets.QFrame(self.gridLayoutWidget_3) + self.line_3.setFrameShape(QtWidgets.QFrame.HLine) + self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_3.setObjectName("line_3") + self.pso_layout.addWidget(self.line_3, 4, 0, 1, 1) + self.line_4 = QtWidgets.QFrame(self.gridLayoutWidget_3) + self.line_4.setFrameShape(QtWidgets.QFrame.HLine) + self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken) + self.line_4.setObjectName("line_4") + self.pso_layout.addWidget(self.line_4, 4, 1, 1, 1) + self.label_46 = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.label_46.setObjectName("label_46") + self.pso_layout.addWidget(self.label_46, 5, 0, 1, 1) + self.label_47 = QtWidgets.QLabel(self.gridLayoutWidget_3) + self.label_47.setObjectName("label_47") + self.pso_layout.addWidget(self.label_47, 3, 0, 1, 1) + self.v_stop = QtWidgets.QLineEdit(self.gridLayoutWidget_3) + self.v_stop.setObjectName("v_stop") + self.pso_layout.addWidget(self.v_stop, 3, 1, 1, 1) + self.textEdit_3 = QtWidgets.QTextEdit(self.page_2) + self.textEdit_3.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_3.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_3.setObjectName("textEdit_3") + self.fitStack.addWidget(self.page_2) + self.page_3 = QtWidgets.QWidget() + self.page_3.setObjectName("page_3") + self.gridLayoutWidget_6 = QtWidgets.QWidget(self.page_3) + self.gridLayoutWidget_6.setGeometry(QtCore.QRect(0, 30, 241, 111)) + self.gridLayoutWidget_6.setObjectName("gridLayoutWidget_6") + self.ss_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_6) + self.ss_layout.setContentsMargins(0, 0, 0, 0) + self.ss_layout.setObjectName("ss_layout") + self.init_size = QtWidgets.QLineEdit(self.gridLayoutWidget_6) + self.init_size.setObjectName("init_size") + self.ss_layout.addWidget(self.init_size, 0, 1, 1, 1) + self.rslabel = QtWidgets.QLabel(self.gridLayoutWidget_6) + self.rslabel.setObjectName("rslabel") + self.ss_layout.addWidget(self.rslabel, 2, 0, 1, 1) + self.reserve_size = QtWidgets.QLineEdit(self.gridLayoutWidget_6) + self.reserve_size.setObjectName("reserve_size") + self.ss_layout.addWidget(self.reserve_size, 2, 1, 1, 1) + self.intslabel = QtWidgets.QLabel(self.gridLayoutWidget_6) + self.intslabel.setObjectName("intslabel") + self.ss_layout.addWidget(self.intslabel, 0, 0, 1, 1) + self.local_min_limit = QtWidgets.QLineEdit(self.gridLayoutWidget_6) + self.local_min_limit.setText("") + self.local_min_limit.setObjectName("local_min_limit") + self.ss_layout.addWidget(self.local_min_limit, 1, 1, 1, 1) + self.lmllabel = QtWidgets.QLabel(self.gridLayoutWidget_6) + self.lmllabel.setObjectName("lmllabel") + self.ss_layout.addWidget(self.lmllabel, 1, 0, 1, 1) + self.textEdit_4 = QtWidgets.QTextEdit(self.page_3) + self.textEdit_4.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_4.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_4.setObjectName("textEdit_4") + self.fitStack.addWidget(self.page_3) + self.page_4 = QtWidgets.QWidget() + self.page_4.setObjectName("page_4") + self.gridLayoutWidget_4 = QtWidgets.QWidget(self.page_4) + self.gridLayoutWidget_4.setGeometry(QtCore.QRect(0, 30, 241, 240)) + self.gridLayoutWidget_4.setObjectName("gridLayoutWidget_4") + self.bmc_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_4) + self.bmc_layout.setContentsMargins(0, 0, 0, 0) + self.bmc_layout.setObjectName("bmc_layout") + self.sample_every = QtWidgets.QLineEdit(self.gridLayoutWidget_4) + self.sample_every.setText("") + self.sample_every.setObjectName("sample_every") + self.bmc_layout.addWidget(self.sample_every, 2, 1, 1, 1) + self.histbinlabel = QtWidgets.QLabel(self.gridLayoutWidget_4) + self.histbinlabel.setObjectName("histbinlabel") + self.bmc_layout.addWidget(self.histbinlabel, 4, 0, 1, 1) + self.credible_intervals = QtWidgets.QLineEdit(self.gridLayoutWidget_4) + self.credible_intervals.setText("") + self.credible_intervals.setObjectName("credible_intervals") + self.bmc_layout.addWidget(self.credible_intervals, 5, 1, 1, 1) + self.step_size = QtWidgets.QLineEdit(self.gridLayoutWidget_4) + self.step_size.setText("") + self.step_size.setObjectName("step_size") + self.bmc_layout.addWidget(self.step_size, 0, 1, 1, 1) + self.sample_everylabel = QtWidgets.QLabel(self.gridLayoutWidget_4) + self.sample_everylabel.setObjectName("sample_everylabel") + self.bmc_layout.addWidget(self.sample_everylabel, 2, 0, 1, 1) + self.itelabel = QtWidgets.QLabel(self.gridLayoutWidget_4) + self.itelabel.setObjectName("itelabel") + self.bmc_layout.addWidget(self.itelabel, 1, 0, 1, 1) + self.histlabel = QtWidgets.QLabel(self.gridLayoutWidget_4) + self.histlabel.setObjectName("histlabel") + self.bmc_layout.addWidget(self.histlabel, 3, 0, 1, 1) + self.burn_in = QtWidgets.QLineEdit(self.gridLayoutWidget_4) + self.burn_in.setText("") + self.burn_in.setObjectName("burn_in") + self.bmc_layout.addWidget(self.burn_in, 1, 1, 1, 1) + self.output_hist_every = QtWidgets.QLineEdit(self.gridLayoutWidget_4) + self.output_hist_every.setText("") + self.output_hist_every.setObjectName("output_hist_every") + self.bmc_layout.addWidget(self.output_hist_every, 3, 1, 1, 1) + self.hist_bins = QtWidgets.QLineEdit(self.gridLayoutWidget_4) + self.hist_bins.setText("") + self.hist_bins.setObjectName("hist_bins") + self.bmc_layout.addWidget(self.hist_bins, 4, 1, 1, 1) + self.step_sizelabel = QtWidgets.QLabel(self.gridLayoutWidget_4) + self.step_sizelabel.setObjectName("step_sizelabel") + self.bmc_layout.addWidget(self.step_sizelabel, 0, 0, 1, 1) + self.cintlabel = QtWidgets.QLabel(self.gridLayoutWidget_4) + self.cintlabel.setObjectName("cintlabel") + self.bmc_layout.addWidget(self.cintlabel, 5, 0, 1, 1) + self.label_4 = QtWidgets.QLabel(self.gridLayoutWidget_4) + self.label_4.setObjectName("label_4") + self.bmc_layout.addWidget(self.label_4, 6, 0, 1, 1) + self.beta = QtWidgets.QLineEdit(self.gridLayoutWidget_4) + self.beta.setObjectName("beta") + self.bmc_layout.addWidget(self.beta, 6, 1, 1, 1) + self.textEdit_5 = QtWidgets.QTextEdit(self.page_4) + self.textEdit_5.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_5.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_5.setObjectName("textEdit_5") + self.fitStack.addWidget(self.page_4) + self.page_5 = QtWidgets.QWidget() + self.page_5.setObjectName("page_5") + self.gridLayoutWidget_11 = QtWidgets.QWidget(self.page_5) + self.gridLayoutWidget_11.setGeometry(QtCore.QRect(0, 30, 241, 291)) + self.gridLayoutWidget_11.setObjectName("gridLayoutWidget_11") + self.sim_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_11) + self.sim_layout.setContentsMargins(0, 0, 0, 0) + self.sim_layout.setObjectName("sim_layout") + self.simplex_stop_tol = QtWidgets.QLineEdit(self.gridLayoutWidget_11) + self.simplex_stop_tol.setObjectName("simplex_stop_tol") + self.sim_layout.addWidget(self.simplex_stop_tol, 7, 1, 1, 1) + self.histbinlabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_11) + self.histbinlabel_2.setObjectName("histbinlabel_2") + self.sim_layout.addWidget(self.histbinlabel_2, 4, 0, 1, 1) + self.step_sizelabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_11) + self.step_sizelabel_2.setObjectName("step_sizelabel_2") + self.sim_layout.addWidget(self.step_sizelabel_2, 0, 0, 1, 1) + self.simplex_reflection = QtWidgets.QLineEdit(self.gridLayoutWidget_11) + self.simplex_reflection.setText("") + self.simplex_reflection.setObjectName("simplex_reflection") + self.sim_layout.addWidget(self.simplex_reflection, 2, 1, 1, 1) + self.itelabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_11) + self.itelabel_2.setObjectName("itelabel_2") + self.sim_layout.addWidget(self.itelabel_2, 1, 0, 1, 1) + self.simplex_max_iterations = QtWidgets.QLineEdit(self.gridLayoutWidget_11) + self.simplex_max_iterations.setObjectName("simplex_max_iterations") + self.sim_layout.addWidget(self.simplex_max_iterations, 6, 1, 1, 1) + self.cintlabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_11) + self.cintlabel_2.setObjectName("cintlabel_2") + self.sim_layout.addWidget(self.cintlabel_2, 5, 0, 1, 1) + self.simplex_expansion = QtWidgets.QLineEdit(self.gridLayoutWidget_11) + self.simplex_expansion.setText("") + self.simplex_expansion.setObjectName("simplex_expansion") + self.sim_layout.addWidget(self.simplex_expansion, 3, 1, 1, 1) + self.label_31 = QtWidgets.QLabel(self.gridLayoutWidget_11) + self.label_31.setObjectName("label_31") + self.sim_layout.addWidget(self.label_31, 7, 0, 1, 1) + self.simplex_shrink = QtWidgets.QLineEdit(self.gridLayoutWidget_11) + self.simplex_shrink.setText("") + self.simplex_shrink.setObjectName("simplex_shrink") + self.sim_layout.addWidget(self.simplex_shrink, 5, 1, 1, 1) + self.histlabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_11) + self.histlabel_2.setObjectName("histlabel_2") + self.sim_layout.addWidget(self.histlabel_2, 3, 0, 1, 1) + self.simplex_step = QtWidgets.QLineEdit(self.gridLayoutWidget_11) + self.simplex_step.setText("") + self.simplex_step.setObjectName("simplex_step") + self.sim_layout.addWidget(self.simplex_step, 0, 1, 1, 1) + self.sample_everylabel_2 = QtWidgets.QLabel(self.gridLayoutWidget_11) + self.sample_everylabel_2.setObjectName("sample_everylabel_2") + self.sim_layout.addWidget(self.sample_everylabel_2, 2, 0, 1, 1) + self.simplex_log_step = QtWidgets.QLineEdit(self.gridLayoutWidget_11) + self.simplex_log_step.setText("") + self.simplex_log_step.setObjectName("simplex_log_step") + self.sim_layout.addWidget(self.simplex_log_step, 1, 1, 1, 1) + self.simplex_contraction = QtWidgets.QLineEdit(self.gridLayoutWidget_11) + self.simplex_contraction.setText("") + self.simplex_contraction.setObjectName("simplex_contraction") + self.sim_layout.addWidget(self.simplex_contraction, 4, 1, 1, 1) + self.label = QtWidgets.QLabel(self.gridLayoutWidget_11) + self.label.setObjectName("label") + self.sim_layout.addWidget(self.label, 6, 0, 1, 1) + self.textEdit_6 = QtWidgets.QTextEdit(self.page_5) + self.textEdit_6.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_6.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_6.setObjectName("textEdit_6") + self.fitStack.addWidget(self.page_5) + self.page_6 = QtWidgets.QWidget() + self.page_6.setObjectName("page_6") + self.gridLayoutWidget_5 = QtWidgets.QWidget(self.page_6) + self.gridLayoutWidget_5.setGeometry(QtCore.QRect(0, 30, 241, 181)) + self.gridLayoutWidget_5.setObjectName("gridLayoutWidget_5") + self.sa_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_5) + self.sa_layout.setContentsMargins(0, 0, 0, 0) + self.sa_layout.setObjectName("sa_layout") + self.sample_everylabel_3 = QtWidgets.QLabel(self.gridLayoutWidget_5) + self.sample_everylabel_3.setObjectName("sample_everylabel_3") + self.sa_layout.addWidget(self.sample_everylabel_3, 2, 0, 1, 1) + self.label_32 = QtWidgets.QLabel(self.gridLayoutWidget_5) + self.label_32.setObjectName("label_32") + self.sa_layout.addWidget(self.label_32, 1, 0, 1, 1) + self.step_sizelabel_5 = QtWidgets.QLabel(self.gridLayoutWidget_5) + self.step_sizelabel_5.setObjectName("step_sizelabel_5") + self.sa_layout.addWidget(self.step_sizelabel_5, 0, 0, 1, 1) + self.step_size2 = QtWidgets.QLineEdit(self.gridLayoutWidget_5) + self.step_size2.setText("") + self.step_size2.setObjectName("step_size2") + self.sa_layout.addWidget(self.step_size2, 0, 1, 1, 1) + self.beta2 = QtWidgets.QLineEdit(self.gridLayoutWidget_5) + self.beta2.setObjectName("beta2") + self.sa_layout.addWidget(self.beta2, 1, 1, 1, 1) + self.beta_max = QtWidgets.QLineEdit(self.gridLayoutWidget_5) + self.beta_max.setText("") + self.beta_max.setObjectName("beta_max") + self.sa_layout.addWidget(self.beta_max, 2, 1, 1, 1) + self.histlabel_3 = QtWidgets.QLabel(self.gridLayoutWidget_5) + self.histlabel_3.setObjectName("histlabel_3") + self.sa_layout.addWidget(self.histlabel_3, 3, 0, 1, 1) + self.cooling = QtWidgets.QLineEdit(self.gridLayoutWidget_5) + self.cooling.setText("") + self.cooling.setObjectName("cooling") + self.sa_layout.addWidget(self.cooling, 3, 1, 1, 1) + self.textEdit_7 = QtWidgets.QTextEdit(self.page_6) + self.textEdit_7.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_7.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_7.setObjectName("textEdit_7") + self.fitStack.addWidget(self.page_6) + self.page_7 = QtWidgets.QWidget() + self.page_7.setObjectName("page_7") + self.textEdit_8 = QtWidgets.QTextEdit(self.page_7) + self.textEdit_8.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_8.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_8.setObjectName("textEdit_8") + self.gridLayoutWidget_7 = QtWidgets.QWidget(self.page_7) + self.gridLayoutWidget_7.setGeometry(QtCore.QRect(0, 30, 241, 302)) + self.gridLayoutWidget_7.setObjectName("gridLayoutWidget_7") + self.pt_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_7) + self.pt_layout.setContentsMargins(0, 0, 0, 0) + self.pt_layout.setObjectName("pt_layout") + self.histlabel_6 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.histlabel_6.setObjectName("histlabel_6") + self.pt_layout.addWidget(self.histlabel_6, 3, 0, 1, 1) + self.histbinlabel_5 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.histbinlabel_5.setObjectName("histbinlabel_5") + self.pt_layout.addWidget(self.histbinlabel_5, 4, 0, 1, 1) + self.itelabel_6 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.itelabel_6.setObjectName("itelabel_6") + self.pt_layout.addWidget(self.itelabel_6, 1, 0, 1, 1) + self.cintlabel_5 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.cintlabel_5.setObjectName("cintlabel_5") + self.pt_layout.addWidget(self.cintlabel_5, 5, 0, 1, 1) + self.hist_bins3 = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.hist_bins3.setText("") + self.hist_bins3.setObjectName("hist_bins3") + self.pt_layout.addWidget(self.hist_bins3, 4, 1, 1, 1) + self.output_hist_every3 = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.output_hist_every3.setText("") + self.output_hist_every3.setObjectName("output_hist_every3") + self.pt_layout.addWidget(self.output_hist_every3, 3, 1, 1, 1) + self.sample_everylabel_4 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.sample_everylabel_4.setObjectName("sample_everylabel_4") + self.pt_layout.addWidget(self.sample_everylabel_4, 7, 0, 1, 1) + self.label_35 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.label_35.setObjectName("label_35") + self.pt_layout.addWidget(self.label_35, 6, 0, 1, 1) + self.sample_every3 = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.sample_every3.setText("") + self.sample_every3.setObjectName("sample_every3") + self.pt_layout.addWidget(self.sample_every3, 2, 1, 1, 1) + self.sample_everylabel_6 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.sample_everylabel_6.setObjectName("sample_everylabel_6") + self.pt_layout.addWidget(self.sample_everylabel_6, 2, 0, 1, 1) + self.histlabel_4 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.histlabel_4.setObjectName("histlabel_4") + self.pt_layout.addWidget(self.histlabel_4, 8, 0, 1, 1) + self.step_size3 = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.step_size3.setText("") + self.step_size3.setObjectName("step_size3") + self.pt_layout.addWidget(self.step_size3, 0, 1, 1, 1) + self.credible_intervals3 = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.credible_intervals3.setText("") + self.credible_intervals3.setObjectName("credible_intervals3") + self.pt_layout.addWidget(self.credible_intervals3, 5, 1, 1, 1) + self.exchange_every = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.exchange_every.setText("") + self.exchange_every.setObjectName("exchange_every") + self.pt_layout.addWidget(self.exchange_every, 8, 1, 1, 1) + self.beta3 = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.beta3.setObjectName("beta3") + self.pt_layout.addWidget(self.beta3, 6, 1, 1, 1) + self.step_sizelabel_6 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.step_sizelabel_6.setObjectName("step_sizelabel_6") + self.pt_layout.addWidget(self.step_sizelabel_6, 0, 0, 1, 1) + self.beta_range = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.beta_range.setText("") + self.beta_range.setObjectName("beta_range") + self.pt_layout.addWidget(self.beta_range, 7, 1, 1, 1) + self.burn_in3 = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.burn_in3.setText("") + self.burn_in3.setObjectName("burn_in3") + self.pt_layout.addWidget(self.burn_in3, 1, 1, 1, 1) + self.label_5 = QtWidgets.QLabel(self.gridLayoutWidget_7) + self.label_5.setObjectName("label_5") + self.pt_layout.addWidget(self.label_5, 9, 0, 1, 1) + self.reps_per_beta = QtWidgets.QLineEdit(self.gridLayoutWidget_7) + self.reps_per_beta.setObjectName("reps_per_beta") + self.pt_layout.addWidget(self.reps_per_beta, 9, 1, 1, 1) + self.fitStack.addWidget(self.page_7) + self.page_8 = QtWidgets.QWidget() + self.page_8.setObjectName("page_8") + self.gridLayoutWidget_8 = QtWidgets.QWidget(self.page_8) + self.gridLayoutWidget_8.setGeometry(QtCore.QRect(0, 30, 241, 333)) + self.gridLayoutWidget_8.setObjectName("gridLayoutWidget_8") + self.dream_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_8) + self.dream_layout.setContentsMargins(0, 0, 0, 0) + self.dream_layout.setObjectName("dream_layout") + self.label_36 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.label_36.setObjectName("label_36") + self.dream_layout.addWidget(self.label_36, 6, 0, 1, 1) + self.step_sizelabel_7 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.step_sizelabel_7.setObjectName("step_sizelabel_7") + self.dream_layout.addWidget(self.step_sizelabel_7, 0, 0, 1, 1) + self.zeta = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.zeta.setText("") + self.zeta.setObjectName("zeta") + self.dream_layout.addWidget(self.zeta, 8, 1, 1, 1) + self.sample_everylabel_7 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.sample_everylabel_7.setObjectName("sample_everylabel_7") + self.dream_layout.addWidget(self.sample_everylabel_7, 7, 0, 1, 1) + self.histlabel_8 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.histlabel_8.setObjectName("histlabel_8") + self.dream_layout.addWidget(self.histlabel_8, 8, 0, 1, 1) + self.burn_in4 = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.burn_in4.setText("") + self.burn_in4.setObjectName("burn_in4") + self.dream_layout.addWidget(self.burn_in4, 1, 1, 1, 1) + self.itelabel_7 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.itelabel_7.setObjectName("itelabel_7") + self.dream_layout.addWidget(self.itelabel_7, 1, 0, 1, 1) + self.lambda1 = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.lambda1.setObjectName("lambda1") + self.dream_layout.addWidget(self.lambda1, 9, 1, 1, 1) + self.beta4 = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.beta4.setObjectName("beta4") + self.dream_layout.addWidget(self.beta4, 6, 1, 1, 1) + self.label_21 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.label_21.setObjectName("label_21") + self.dream_layout.addWidget(self.label_21, 9, 0, 1, 1) + self.credible_intervals4 = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.credible_intervals4.setText("") + self.credible_intervals4.setObjectName("credible_intervals4") + self.dream_layout.addWidget(self.credible_intervals4, 5, 1, 1, 1) + self.sample_everylabel_8 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.sample_everylabel_8.setObjectName("sample_everylabel_8") + self.dream_layout.addWidget(self.sample_everylabel_8, 2, 0, 1, 1) + self.histbinlabel_6 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.histbinlabel_6.setObjectName("histbinlabel_6") + self.dream_layout.addWidget(self.histbinlabel_6, 4, 0, 1, 1) + self.sample_every4 = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.sample_every4.setText("") + self.sample_every4.setObjectName("sample_every4") + self.dream_layout.addWidget(self.sample_every4, 2, 1, 1, 1) + self.cintlabel_6 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.cintlabel_6.setObjectName("cintlabel_6") + self.dream_layout.addWidget(self.cintlabel_6, 5, 0, 1, 1) + self.step_size4 = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.step_size4.setText("") + self.step_size4.setObjectName("step_size4") + self.dream_layout.addWidget(self.step_size4, 0, 1, 1, 1) + self.histlabel_7 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.histlabel_7.setObjectName("histlabel_7") + self.dream_layout.addWidget(self.histlabel_7, 3, 0, 1, 1) + self.hist_bins4 = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.hist_bins4.setText("") + self.hist_bins4.setObjectName("hist_bins4") + self.dream_layout.addWidget(self.hist_bins4, 4, 1, 1, 1) + self.crossover_number = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.crossover_number.setText("") + self.crossover_number.setObjectName("crossover_number") + self.dream_layout.addWidget(self.crossover_number, 7, 1, 1, 1) + self.output_hist_every4 = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.output_hist_every4.setText("") + self.output_hist_every4.setObjectName("output_hist_every4") + self.dream_layout.addWidget(self.output_hist_every4, 3, 1, 1, 1) + self.label_22 = QtWidgets.QLabel(self.gridLayoutWidget_8) + self.label_22.setObjectName("label_22") + self.dream_layout.addWidget(self.label_22, 10, 0, 1, 1) + self.gamma_prob = QtWidgets.QLineEdit(self.gridLayoutWidget_8) + self.gamma_prob.setObjectName("gamma_prob") + self.dream_layout.addWidget(self.gamma_prob, 10, 1, 1, 1) + self.textEdit_9 = QtWidgets.QTextEdit(self.page_8) + self.textEdit_9.setGeometry(QtCore.QRect(250, 30, 401, 321)) + self.textEdit_9.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_9.setObjectName("textEdit_9") + self.fitStack.addWidget(self.page_8) + self.formLayoutWidget_5 = QtWidgets.QWidget(self.alg_params) + self.formLayoutWidget_5.setGeometry(QtCore.QRect(360, 0, 421, 31)) + self.formLayoutWidget_5.setObjectName("formLayoutWidget_5") + self.formLayout_4 = QtWidgets.QFormLayout(self.formLayoutWidget_5) + self.formLayout_4.setSizeConstraint(QtWidgets.QLayout.SetFixedSize) + self.formLayout_4.setContentsMargins(5, 5, 5, 5) + self.formLayout_4.setObjectName("formLayout_4") + self.label_23 = QtWidgets.QLabel(self.formLayoutWidget_5) + self.label_23.setObjectName("label_23") + self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_23) + self.objCb = QtWidgets.QComboBox(self.formLayoutWidget_5) + self.objCb.setObjectName("objCb") + self.objCb.addItem("") + self.objCb.addItem("") + self.objCb.addItem("") + self.objCb.addItem("") + self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.objCb) + self.textEdit_13 = QtWidgets.QTextEdit(self.alg_params) + self.textEdit_13.setGeometry(QtCore.QRect(360, 30, 421, 71)) + self.textEdit_13.setObjectName("textEdit_13") + self.fitStack.raise_() + self.gridLayoutWidget.raise_() + self.formLayoutWidget_3.raise_() + self.formLayoutWidget_5.raise_() + self.textEdit_13.raise_() + self.tabWidget.addTab(self.alg_params, "") + self.tab = QtWidgets.QWidget() + self.tab.setObjectName("tab") + self.gridLayoutWidget_12 = QtWidgets.QWidget(self.tab) + self.gridLayoutWidget_12.setGeometry(QtCore.QRect(30, 10, 341, 161)) + self.gridLayoutWidget_12.setObjectName("gridLayoutWidget_12") + self.cluster_layout = QtWidgets.QGridLayout(self.gridLayoutWidget_12) + self.cluster_layout.setContentsMargins(0, 0, 0, 0) + self.cluster_layout.setObjectName("cluster_layout") + self.label_39 = QtWidgets.QLabel(self.gridLayoutWidget_12) + self.label_39.setObjectName("label_39") + self.cluster_layout.addWidget(self.label_39, 2, 0, 1, 1) + self.label_37 = QtWidgets.QLabel(self.gridLayoutWidget_12) + self.label_37.setObjectName("label_37") + self.cluster_layout.addWidget(self.label_37, 0, 0, 1, 1) + self.label_38 = QtWidgets.QLabel(self.gridLayoutWidget_12) + self.label_38.setObjectName("label_38") + self.cluster_layout.addWidget(self.label_38, 1, 0, 1, 1) + self.cluster_type = QtWidgets.QComboBox(self.gridLayoutWidget_12) + self.cluster_type.setObjectName("cluster_type") + self.cluster_type.addItem("") + self.cluster_type.addItem("") + self.cluster_type.addItem("") + self.cluster_type.addItem("") + self.cluster_layout.addWidget(self.cluster_type, 0, 1, 1, 1) + self.scheduler_node = QtWidgets.QLineEdit(self.gridLayoutWidget_12) + self.scheduler_node.setObjectName("scheduler_node") + self.cluster_layout.addWidget(self.scheduler_node, 1, 1, 1, 1) + self.worker_nodes = QtWidgets.QLineEdit(self.gridLayoutWidget_12) + self.worker_nodes.setObjectName("worker_nodes") + self.cluster_layout.addWidget(self.worker_nodes, 2, 1, 1, 1) + self.textEdit_10 = QtWidgets.QTextEdit(self.tab) + self.textEdit_10.setGeometry(QtCore.QRect(370, 10, 401, 161)) + self.textEdit_10.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse) + self.textEdit_10.setObjectName("textEdit_10") + self.tabWidget.addTab(self.tab, "") + self.verticalLayout.addWidget(self.tabWidget) + self.gridLayoutWidget_15 = QtWidgets.QWidget(self.centralwidget) + self.gridLayoutWidget_15.setGeometry(QtCore.QRect(0, 0, 991, 81)) + self.gridLayoutWidget_15.setObjectName("gridLayoutWidget_15") + self.gridLayout_3 = QtWidgets.QGridLayout(self.gridLayoutWidget_15) + self.gridLayout_3.setContentsMargins(0, 0, 0, 0) + self.gridLayout_3.setObjectName("gridLayout_3") + self.saveAsBtn = QtWidgets.QPushButton(self.gridLayoutWidget_15) + self.saveAsBtn.setObjectName("saveAsBtn") + self.gridLayout_3.addWidget(self.saveAsBtn, 0, 3, 1, 1) + self.openBtn = QtWidgets.QPushButton(self.gridLayoutWidget_15) + self.openBtn.setObjectName("openBtn") + self.gridLayout_3.addWidget(self.openBtn, 0, 0, 1, 1) + self.bnfBtn = QtWidgets.QPushButton(self.gridLayoutWidget_15) + self.bnfBtn.setObjectName("bnfBtn") + self.gridLayout_3.addWidget(self.bnfBtn, 0, 5, 1, 1) + self.saveprojBtn = QtWidgets.QPushButton(self.gridLayoutWidget_15) + self.saveprojBtn.setObjectName("saveprojBtn") + self.gridLayout_3.addWidget(self.saveprojBtn, 0, 4, 1, 1) + self.saveBtn = QtWidgets.QPushButton(self.gridLayoutWidget_15) + self.saveBtn.setObjectName("saveBtn") + self.gridLayout_3.addWidget(self.saveBtn, 0, 2, 1, 1) + self.savelabel = QtWidgets.QLabel(self.gridLayoutWidget_15) + self.savelabel.setText("") + self.savelabel.setObjectName("savelabel") + self.gridLayout_3.addWidget(self.savelabel, 1, 0, 1, 1) + self.label_45 = QtWidgets.QLabel(self.gridLayoutWidget_15) + self.label_45.setObjectName("label_45") + self.gridLayout_3.addWidget(self.label_45, 1, 2, 1, 1) + self.current_file = QtWidgets.QLabel(self.gridLayoutWidget_15) + self.current_file.setText("") + self.current_file.setObjectName("current_file") + self.gridLayout_3.addWidget(self.current_file, 1, 3, 1, 3) + mainWindow.setCentralWidget(self.centralwidget) + self.menubar = QtWidgets.QMenuBar(mainWindow) + self.menubar.setGeometry(QtCore.QRect(0, 0, 994, 22)) + self.menubar.setObjectName("menubar") + self.menuSave_File = QtWidgets.QMenu(self.menubar) + self.menuSave_File.setObjectName("menuSave_File") + mainWindow.setMenuBar(self.menubar) + self.statusbar = QtWidgets.QStatusBar(mainWindow) + self.statusbar.setObjectName("statusbar") + mainWindow.setStatusBar(self.statusbar) + self.toolBar = QtWidgets.QToolBar(mainWindow) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.toolBar.sizePolicy().hasHeightForWidth()) + self.toolBar.setSizePolicy(sizePolicy) + self.toolBar.setObjectName("toolBar") + mainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar) + self.actionSaveAs_file = QtWidgets.QAction(mainWindow) + self.actionSaveAs_file.setEnabled(True) + self.actionSaveAs_file.setObjectName("actionSaveAs_file") + self.actionOpen_file = QtWidgets.QAction(mainWindow) + self.actionOpen_file.setObjectName("actionOpen_file") + self.actionSave_and_run = QtWidgets.QAction(mainWindow) + self.actionSave_and_run.setObjectName("actionSave_and_run") + self.actionExport_Project = QtWidgets.QAction(mainWindow) + self.actionExport_Project.setObjectName("actionExport_Project") + self.actionSave = QtWidgets.QAction(mainWindow) + self.actionSave.setObjectName("actionSave") + self.menuSave_File.addAction(self.actionOpen_file) + self.menuSave_File.addSeparator() + self.menuSave_File.addAction(self.actionSave) + self.menuSave_File.addAction(self.actionSaveAs_file) + self.menuSave_File.addAction(self.actionExport_Project) + self.menuSave_File.addSeparator() + self.menuSave_File.addAction(self.actionSave_and_run) + self.menubar.addAction(self.menuSave_File.menuAction()) + + self.retranslateUi(mainWindow) + self.tabWidget.setCurrentIndex(0) + self.toolBox.setCurrentIndex(0) + self.fitStack.setCurrentIndex(1) + QtCore.QMetaObject.connectSlotsByName(mainWindow) + + def retranslateUi(self, mainWindow): + _translate = QtCore.QCoreApplication.translate + mainWindow.setWindowTitle(_translate("mainWindow", "BNFC")) + self.tabWidget.setToolTip(_translate("mainWindow", "

Variables

")) + self.tabWidget.setWhatsThis(_translate("mainWindow", "

Variables

")) + self.modelpBtn.setText(_translate("mainWindow", "+")) + self.modelmBtn.setText(_translate("mainWindow", "-")) + self.label_8.setText(_translate("mainWindow", "Experimental Files:")) + self.label_2.setText(_translate("mainWindow", "Models:")) + self.exppBtn.setText(_translate("mainWindow", "+")) + self.expmBtn.setText(_translate("mainWindow", "-")) + self.model_txt.setHtml(_translate("mainWindow", "\n" +"\n" +"

model - specifies the mapping between .bngl model files and .exp files. This has a unique syntax, model = model.bngl : data1.exp, data2.exp . It is possible to include both .exp and .con (constraint) files in the list. If no experimental files are associated with the model, write "none".

")) + self.toolBox.setItemText(self.toolBox.indexOf(self.page_9), _translate("mainWindow", "Model:")) + self.textEdit_15.setHtml(_translate("mainWindow", "\n" +"\n" +"

mutant = basemodel name statement1 statement2: data1name.exp, data2name.exp - Declares a model that does not contain its own model file, but instead is defined based on another model basemodel. "name" is the name of the mutant model; this name is appended to the suffixes of the base model, i.e. if the base model has data files data1.exp and data2.exp, a corresponding mutant file with the name "m1" should use the files data1m1.exp and data2m1.exp. statement1, statement2,... have the format [variable][operator][value] ; for example a__FREE__=0 or b__FREE__*2.

")) + self.label_40.setText(_translate("mainWindow", "Model:")) + self.label_41.setText(_translate("mainWindow", "Statements:")) + self.label_42.setText(_translate("mainWindow", "Experimental Files:")) + self.label_44.setText(_translate("mainWindow", "Names:")) + self.maddBtn.setText(_translate("mainWindow", "+")) + self.remnameBtn.setText(_translate("mainWindow", "-")) + self.addnameBtn.setText(_translate("mainWindow", "+")) + self.addStatementBtn.setText(_translate("mainWindow", "+")) + self.remStatementBtn.setText(_translate("mainWindow", "-")) + self.addmexpBtn.setText(_translate("mainWindow", "+")) + self.remmexpBtn.setText(_translate("mainWindow", "-")) + self.toolBox.setItemText(self.toolBox.indexOf(self.page_10), _translate("mainWindow", "Mutant:")) + self.typeaddBtn.setText(_translate("mainWindow", "+")) + self.typeremBtn.setText(_translate("mainWindow", "-")) + self.label_49.setText(_translate("mainWindow", "Type:")) + self.label_50.setText(_translate("mainWindow", "Experimental Files:")) + self.expaddBtn.setText(_translate("mainWindow", "+")) + self.expremBtn.setText(_translate("mainWindow", "-")) + self.textBrowser.setHtml(_translate("mainWindow", "\n" +"\n" +"

normalization = type [: d1.exp, d2.exp] - Indicates that simulation data must be normalized in order to compare with exp files. Choices are: \'init\', \'peak\', \'zero\', \'unit\'. If only the type is specified, the normalization is applied to all exp files. If one or more exp files included, it applies to only those exp files. Additionally, you may enclose an exp file in parentheses, and specify which columns of that exp file get normalized, like this (data1.exp: 1,3-5) or (data1.exp: var1,var2) Multiple lines with this key can be used. Default: No normalization

")) + self.toolBox.setItemText(self.toolBox.indexOf(self.page_13), _translate("mainWindow", "Normalization:")) + self.addCourseBtn.setText(_translate("mainWindow", "+")) + self.textEdit_16.setHtml(_translate("mainWindow", "\n" +"\n" +"

time_course = key1: value1, key2: value2,... - Run a time course with the specified attributes. The following keys are available. time: the simulation time; step: the simulation time step (default 1); model: the model to run on (default is all of the models in the fitting run); suffix: The suffix of the data file to save. You should map the model to a .exp file of the same name (default: time_course); method: the simulation method to use. Options are ode, ssa, pla, nf. pla and nf are supported only for BNGL models.

")) + self.toolBox.setItemText(self.toolBox.indexOf(self.page_11), _translate("mainWindow", "Time courses:")) + self.addScanBtn.setText(_translate("mainWindow", "+")) + self.textEdit_17.setHtml(_translate("mainWindow", "\n" +"\n" +"

param_scan = key1: value1, key2: value2,... - Run a parameter scan with the specified attributes. The following keys are available. param: name of the parameter to scan, min: minimum value of the parameter, max: maximum value of the parameter, step: change in parameter value between consecutive simulations in the scan, time: amount of time that each simulation in the scan is run, logspace: 0 or 1. If 1, scan the parameter in log space, model: the model to run on (default is all of the models in the fitting run); suffix: The suffix of the data file to save. You should map the model to a .exp file of the same name (default: param_scan); method: the simulation method to use. Options are ode, ssa, pla, nf. pla and nf are supported only for BNGL models.

")) + self.toolBox.setItemText(self.toolBox.indexOf(self.page_12), _translate("mainWindow", "Param scan:")) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.input_files), _translate("mainWindow", "Input files")) + self.addBtn.setText(_translate("mainWindow", "+")) + self.label_3.setText(_translate("mainWindow", "Name:")) + self.label_7.setText(_translate("mainWindow", "Type:")) + self.textEdit_11.setHtml(_translate("mainWindow", "\n" +"\n" +"

uniform_var = name__FREE_ min max - a uniformly distributed variable with bounds [min, max]

\n" +"

normal_var = name__FREE_ mu sigma - a normal-distributed variable in regular space with mean mu, std dev sigma. A box constraint to keep >= 0 is also assumed.

\n" +"

loguniform_var = name__FREE_ min max - a log-uniform distributed variable with bounds [min, max]. Bounds should be in regular space, eg [0.01, 100]

\n" +"

lognormal_var = name__FREE mu sigma - a log-normal distributed variable with mean mu, std dev sigma. mu, sigma are given in log base 10 space.

\n" +"

The following are to be used only with the simplex algorithm. Simplex should not use any of the other parameter specifications.If you are using another algorithm with the flag refine, you still should not use these, you must set step size with simplex_step or simplex_log_step.

\n" +"

var = name__FREE init step - a variable that starts at init with an initial step size step. step is optional; defaults to simplex_step

\n" +"

logvar = name__FREE init step - a variable that starts at init with an initial step size step, that moves in log space. init and step should be given in log base 10 space. step is optional; defaults to simplex_log_step.

")) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.free_params), _translate("mainWindow", "Free Parameters")) + self.label_16.setText(_translate("mainWindow", "Open Output Directory:")) + self.bngBtn.setText(_translate("mainWindow", "Choose")) + self.outputBtn.setText(_translate("mainWindow", "Choose")) + self.label_24.setText(_translate("mainWindow", "Path to BioNetGen:")) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.paths), _translate("mainWindow", "Paths")) + self.label_10.setText(_translate("mainWindow", "Refine:")) + self.label_6.setText(_translate("mainWindow", "Parallel count:")) + self.label_11.setText(_translate("mainWindow", "Wall time sim:")) + self.label_25.setText(_translate("mainWindow", "Delete old files:")) + self.label_13.setText(_translate("mainWindow", "Verbosity:")) + self.label_20.setText(_translate("mainWindow", "Ind var rounding:")) + self.label_28.setText(_translate("mainWindow", "Local objective eval:")) + self.label_18.setText(_translate("mainWindow", "Min objective:")) + self.label_14.setText(_translate("mainWindow", "Smoothing:")) + self.label_30.setText(_translate("mainWindow", "Bootstrap max obj:")) + self.label_26.setText(_translate("mainWindow", "Num to output:")) + self.label_27.setText(_translate("mainWindow", "Output every:")) + self.label_12.setText(_translate("mainWindow", "Wall time gen:")) + self.label_29.setText(_translate("mainWindow", "Bootstrap:")) + self.label_43.setText(_translate("mainWindow", "Constraint scale:")) + self.textEdit.setHtml(_translate("mainWindow", "\n" +"\n" +"

General options

\n" +"

parallel_count - How many jobs to run in parallel. Default: Use all available cores.

\n" +"

refine: If 1, after fitting is completed, refine the best fit parameter set by a local search with the simplex algorithm. Default: 0

\n" +"

delete_old_files: If 1 - delete simulation folders immediately after they complete. 2 - Delete both old simulation folders and old sorted_params.txt result files Default: 1

\n" +"

num_to_output: The maximum number of PSets to write when writing the trajectory. Default: 5000

\n" +"

output_every: Write the Trajectory to file every x iterations. Default: 20

\n" +"

wall_time_sim: Maximum time (in seconds) to wait for a simulation to finish. Exceeding this (either for a simulation or network generation) results in an infinite objective function value. Default: 3600

\n" +"

wall_time_gen: Same as wall_time_sim, but for the initial network generation. Will cause the program to exit if exceeded.

\n" +"

verbosity: Specifies the amount of information output to the terminal. 0 - Quiet; user prompts and errors only. 1 - Normal; Warnings and concise progress updates. 2 - Verbose; Information and detailed progress updates. Default: 1

\n" +"

smoothing: Number of replicates to run for each parameter set (useful for stochastic runs). Default: 1

\n" +"

min_objective: Stop fitting if an objective function lower than this value is reached. Default: None; always run for the maximum iterations

\n" +"

ind_var_rounding: If 1, make sure every exp row is used by rounding it to the nearest available value of the independent variable in the simulation data. (Be careful with this! Usually, it is better to set up your simulation so that all experimental points are hit exactly) Default: 0

\n" +"

local_objective_eval: If 1, evaluate the objective function locally, instead of parallelizing this calculation on the workers. This option is automatically enabled when using the \'smoothing\' feature. Default:

\n" +"

bootstrap: Whether (>0) or not (0) to estimate confidence intervals through a bootstrapping procedure. The assigned integer is the number of bootstrap replicates to perform. Default: 0

\n" +"

bootstrap_max_obj: The maximum value of a fitting run\'s objective function to be considered valid in the bootstrapping procedure. Default: None

\n" +"

constraint_scale: Scale all the weights in all constraint files by this multiplicative factor. For convenience only; the same thing could be achieved by editing the constraint files, but useful to change all with one setting for tuning the quantitative vs qualitative data constributions. Default: 1 (no scaling)

")) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.general_options), _translate("mainWindow", "General Options")) + self.fitCb.setItemText(0, _translate("mainWindow", "Differential Evolution")) + self.fitCb.setItemText(1, _translate("mainWindow", "Asynchronous Differential Evolution")) + self.fitCb.setItemText(2, _translate("mainWindow", "Particle Swarm Optimization ")) + self.fitCb.setItemText(3, _translate("mainWindow", "Scatter Search ")) + self.fitCb.setItemText(4, _translate("mainWindow", "Bayesian Markov chain Monte Carlo")) + self.fitCb.setItemText(5, _translate("mainWindow", "Simplex local search ")) + self.fitCb.setItemText(6, _translate("mainWindow", "Simulated Annealing ")) + self.fitCb.setItemText(7, _translate("mainWindow", "Parallel Tempering")) + self.fitCb.setItemText(8, _translate("mainWindow", "DREAM")) + self.label_15.setText(_translate("mainWindow", "Fit Type:")) + self.label_17.setText(_translate("mainWindow", "Population Size:")) + self.label_19.setText(_translate("mainWindow", "Max Iterations:")) + self.label_9.setText(_translate("mainWindow", "Initialization:")) + self.initCb.setItemText(0, _translate("mainWindow", "Random")) + self.initCb.setItemText(1, _translate("mainWindow", "Latin Hypercube Distribution")) + self.de_strategy.setItemText(0, _translate("mainWindow", "rand1")) + self.de_strategy.setItemText(1, _translate("mainWindow", "rand2")) + self.de_strategy.setItemText(2, _translate("mainWindow", "best1")) + self.de_strategy.setItemText(3, _translate("mainWindow", "best2")) + self.de_strategy.setItemText(4, _translate("mainWindow", "all1")) + self.de_strategy.setItemText(5, _translate("mainWindow", "all2")) + self.ntmlabel.setText(_translate("mainWindow", "Number to migrate:")) + self.ilabel.setText(_translate("mainWindow", "Islands:")) + self.melabel.setText(_translate("mainWindow", "Migrate every:")) + self.mflabel.setText(_translate("mainWindow", "Mutation Factor:")) + self.mrlabel.setText(_translate("mainWindow", "Mutation Rate:")) + self.label_34.setText(_translate("mainWindow", "Island based DE:")) + self.label_33.setText(_translate("mainWindow", "DE Strategy:")) + self.stlabel.setText(_translate("mainWindow", "Stop Tolerance:")) + self.textEdit_2.setHtml(_translate("mainWindow", "\n" +"\n" +"

Differential Evolution Settings

\n" +"

mutation_rate - When generating a new individual, mutate each parameter with this probability. Default: 0.5mutation_factor - When mutating a parameter x, change it by mutation_factor*(PS1[x] - PS2[x]) where PS1 and PS2 are random other PSets in the population. Default: 1.0

\n" +"

stop_tolerance - Stop the run if max(objective) / min(objective) 1 + this value, i.e., the entire population has converged to roughly the same objective. Default: 0.002

\n" +"

de_strategy - Specifies how new parameter sets are chosen. Options are: rand1, rand2, best1, best2, all1, all2. The parameter set we mutate is: \'rand\' - a random one, \'best\' - the one with the lowest objective value, \'all\' - the one we are proposing to replace (so all psets are mutated once per iteration). The amount of mutation is based on: \'1\' - 1 pair of other parameter sets (p1-p2), \'2\' - 2 pairs of other parameter sets (p1-p2 + p3-p4).

\n" +"


\n" +"

# These are related to "island-based" differential evolution. If all omitted, uses regular differential evolution, which is still parallelizable, but has to wait until a whole generation finishes before moving on to the next.

\n" +"

# Asynchronous differential evolution (fit_type=ade) is also available. It does not use islands, and so ignores these keys.

\n" +"

islands: Number of separate populations to evolve. Default: 1

\n" +"

migrate_every: After this number of generations, migrate some individuals between islands. Default: 20 (but Inf if islands = 1)

\n" +"

num_to_migrate: How many individuals to migrate off of each island during migration? Default: 3

")) + self.de_strategy2.setItemText(0, _translate("mainWindow", "rand1")) + self.de_strategy2.setItemText(1, _translate("mainWindow", "rand2")) + self.de_strategy2.setItemText(2, _translate("mainWindow", "best1")) + self.de_strategy2.setItemText(3, _translate("mainWindow", "best2")) + self.de_strategy2.setItemText(4, _translate("mainWindow", "all1")) + self.de_strategy2.setItemText(5, _translate("mainWindow", "all2")) + self.stlabel_2.setText(_translate("mainWindow", "Stop Tolerance:")) + self.mflabel_2.setText(_translate("mainWindow", "Mutation Factor:")) + self.mrlabel_2.setText(_translate("mainWindow", "Mutation Rate:")) + self.label_51.setText(_translate("mainWindow", "DE Strategy:")) + self.textEdit_12.setHtml(_translate("mainWindow", "\n" +"\n" +"

Asynchronous Differential Evolution Settings

\n" +"

mutation_rate - When generating a new individual, mutate each parameter with this probability. Default: 0.5mutation_factor - When mutating a parameter x, change it by mutation_factor*(PS1[x] - PS2[x]) where PS1 and PS2 are random other PSets in the population. Default: 1.0

\n" +"

stop_tolerance - Stop the run if max(objective) / min(objective) 1 + this value, i.e., the entire population has converged to roughly the same objective. Default: 0.002

\n" +"

de_strategy - Specifies how new parameter sets are chosen. Options are: rand1, rand2, best1, best2, all1, all2. The parameter set we mutate is: \'rand\' - a random one, \'best\' - the one with the lowest objective value, \'all\' - the one we are proposing to replace (so all psets are mutated once per iteration). The amount of mutation is based on: \'1\' - 1 pair of other parameter sets (p1-p2), \'2\' - 2 pairs of other parameter sets (p1-p2 + p3-p4).

")) + self.soclabel.setText(_translate("mainWindow", "Social:")) + self.coglabel.setText(_translate("mainWindow", "Cognitive:")) + self.pawlabel.setText(_translate("mainWindow", "Particle Weight:")) + self.adaptnslabel.setText(_translate("mainWindow", "Adaptive N Stop:")) + self.adaptatlabel.setText(_translate("mainWindow", "Adaptive Absolute Tolerance:")) + self.adaptnmlabel.setText(_translate("mainWindow", "Adaptive N Max:")) + self.adaptrtlabel.setText(_translate("mainWindow", "Adaptive Relative Tolerance:")) + self.pawflabel.setText(_translate("mainWindow", "Particle Weight Final:")) + self.label_46.setText(_translate("mainWindow", "Adaptive Weighting:")) + self.label_47.setText(_translate("mainWindow", "V Stop:")) + self.textEdit_3.setHtml(_translate("mainWindow", "\n" +"\n" +"

Particle Swarm settings

\n" +"

cognitive: Acceleration toward a particle\'s own best fit

\n" +"

social: Acceleration toward the global best fit

\n" +"

particle_weight: Inertia weight of particle. Default: 1

\n" +"

v_stop: Stop the algorithm if the speeds of all parameters in all particles are less than this value. Default: 0 (don\'t use this criterion)

\n" +"

# particle swarm params related to adaptive weight changing, which may or may not be useful

\n" +"

particle_weight_final: The final particle weight after the adaptive changing. Default: the value of particle_weight, effectively disabling this feature.

\n" +"

adaptive_n_max: After n_max "unproductive" iterations, we have moved halfway from the initial weight to the final weight. Default: 30

\n" +"

adaptive_n_stop: Afer this many "unproductive" iterations, stop the simulation. Default: Inf

\n" +"

adaptive_abs_tol: Parameter for checking if an iteration was "unproductive" Default: 0

\n" +"

adaptive_rel_tol: Parameter for checking if an iteration was "unproductive" Default: 0

")) + self.rslabel.setText(_translate("mainWindow", "Reserve Size:")) + self.intslabel.setText(_translate("mainWindow", "Init Size:")) + self.lmllabel.setText(_translate("mainWindow", "Local Minimum Limit:")) + self.textEdit_4.setHtml(_translate("mainWindow", "\n" +"\n" +"

Scatter Search settings

\n" +"

init_size: Number of PSets to test to generate the initial population. Default: 10 * number of variables

\n" +"

local_min_limit: If a point is stuck for this many iterations without improvement, it is assumed to be a local min and replaced with a random parameter set. Default: 5

\n" +"

reserve_size: Scatter Search maintains a latin-hypercube-distributed "reserve" of parameter sets. When it needs to pick a random new parameter set, it takes one from here, so it\'s not similar to a previous random choice. The initial size of the reserve is this value. If the reserve becomes empty, we revert to truly random pset choices. Default: max_iterations

")) + self.histbinlabel.setText(_translate("mainWindow", "Historgam bins:")) + self.sample_everylabel.setText(_translate("mainWindow", "Sample every:")) + self.itelabel.setText(_translate("mainWindow", "Burn in:")) + self.histlabel.setText(_translate("mainWindow", "Output histogram every:")) + self.step_sizelabel.setText(_translate("mainWindow", "Step size:")) + self.cintlabel.setText(_translate("mainWindow", "Credible intervals:")) + self.label_4.setText(_translate("mainWindow", "Beta:")) + self.textEdit_5.setHtml(_translate("mainWindow", "\n" +"\n" +"

Bayesian settings

\n" +"

step_size: When proposing a Monte Carlo step, the step in n-dimensional parameter space has this length. Default: 0.2

\n" +"

burn_in: Ignore this many iterations at the start, to let the system equilibrate. Default: 10000

\n" +"

sample_every: Every x iterations, save the current PSet into the sampled population. Default: 100

\n" +"

output_hist_every: Every x samples (i.e every x*sample_every iterations), save a historgram file for each variable, and the credible interval files, based on what has been sampled so far. Default: 100

\n" +"

hist_bins: Number of bins used when writing the histogram files. Default: 10

\n" +"

credible_intervals: Specify one or more numbers here. For each n, algorithm will save a file giving bounds for each variable such that in n% of the samples the variable lies within the bounds. Default: 68 95

\n" +"

beta: 1 over the starting "temperature" for all replicates. This value increases (i.e., temperature decreases) over the course of the run.

")) + self.histbinlabel_2.setText(_translate("mainWindow", "Simplex contraction:")) + self.step_sizelabel_2.setText(_translate("mainWindow", "Simplex step:")) + self.itelabel_2.setText(_translate("mainWindow", "Simplex log step:")) + self.cintlabel_2.setText(_translate("mainWindow", "Simplex shrink:")) + self.label_31.setText(_translate("mainWindow", "Simplex stop tolerance:")) + self.histlabel_2.setText(_translate("mainWindow", "Simplex expansion:")) + self.sample_everylabel_2.setText(_translate("mainWindow", "Simplex reflection:")) + self.label.setText(_translate("mainWindow", "Simplex max iterations:")) + self.textEdit_6.setHtml(_translate("mainWindow", "\n" +"\n" +"

Simplex Settings

\n" +"

Note: You also might define these if you chose a different algorithm but set the refine flag to use Simplex to refine the final fit.

\n" +"

\n" +"

simplex_step - In initialization, we perturb each parameter by what step size? If you specify a step size for a specific variable via \'var\' or \'logvar\', it overrides this. Default: 1

\n" +"

simplex_log_step - Equivalent of simplex_step, for variables that move in log space. Default: simplex_step

\n" +"

simplex_reflection - When we reflect a point through the centroid, what is the ratio of dilation on the other side? Default: 1.0

\n" +"

simplex_expansion - If the reflected point was the global min, how far do we keep moving in that direction? (as a ratio to the initial distance to centroid) Default: 1.0

\n" +"

simplex_contraction - If the reflected point was not an improvement, we retry at what distance from the centroid? (as a ratio of the initial distance to centroid) Default: 0.5

\n" +"

simplex_shrink - If a whole iteration was unproductive, shrink the simplex by setting simplex point s[i] to x*s[i-1] + (1-x)*s[i]. This key specifies x. Default: 0.5

\n" +"

simplex_max_iterations - If specified, overrides the max_iterations setting. Useful if you are using the refine flag and want max_iterations to refer to your main algorithm.

\n" +"

simplex_stop_tol - Stop the algorithm if all parameters have converged to within this value (specifically, if all reflections in an iteration move the param by less than this) Default: 0 (don\'t use this criterion)

")) + self.sample_everylabel_3.setText(_translate("mainWindow", "Beta Max:")) + self.label_32.setText(_translate("mainWindow", "Beta:")) + self.step_sizelabel_5.setText(_translate("mainWindow", "Step size:")) + self.histlabel_3.setText(_translate("mainWindow", "Cooling:")) + self.textEdit_7.setHtml(_translate("mainWindow", "\n" +"\n" +"

Simulated Annealing settings

\n" +"

step_size: When proposing a Monte Carlo step, the step in n-dimensional parameter space has this length. Default: 0.2

\n" +"

burn_in: Ignore this many iterations at the start, to let the system equilibrate. Default: 10000

\n" +"

sample_every: Every x iterations, save the current PSet into the sampled population. Default: 100

\n" +"

output_hist_every: Every x samples (i.e every x*sample_every iterations), save a historgram file for each variable, and the credible interval files, based on what has been sampled so far. Default: 100

\n" +"

hist_bins: Number of bins used when writing the histogram files. Default: 10

\n" +"

credible_intervals: Specify one or more numbers here. For each n, algorithm will save a file giving bounds for each variable such that in n% of the samples the variable lies within the bounds. Default: 68 95

\n" +"

beta: 1 over the starting "temperature" for all replicates. This value increases (i.e., temperature decreases) over the course of the run.

\n" +"

beta_max: Stop the algorithm if all replicates reach this beta = 1/temperature value. Default: Inf

\n" +"

cooling: Each time a move to a higher energy state is accepted, increase beta = 1/temperature by this value. Default: 0.01

")) + self.textEdit_8.setHtml(_translate("mainWindow", "\n" +"\n" +"

Parallel Tempering MCMC settings

\n" +"

step_size: When proposing a Monte Carlo step, the step in n-dimensional parameter space has this length. Default: 0.2

\n" +"

burn_in: Ignore this many iterations at the start, to let the system equilibrate. Default: 10000

\n" +"

sample_every: Every x iterations, save the current PSet into the sampled population. Default: 100

\n" +"

output_hist_every: Every x samples (i.e every x*sample_every iterations), save a historgram file for each variable, and the credible interval files, based on what has been sampled so far. Default: 100

\n" +"

hist_bins: Number of bins used when writing the histogram files. Default: 10

\n" +"

credible_intervals: Specify one or more numbers here. For each n, algorithm will save a file giving bounds for each variable such that in n% of the samples the variable lies within the bounds. Default: 68 95

\n" +"

beta: Alternatively to specifying beta_range, you may specify population_size/reps_per_beta beta values here to use. Only the replicas at the maximum beta value in the list will be sampled. For the true probability distribution, this value should be 1.

\n" +"

beta_range=min max : The range of values of beta to use. The replicates will use population_size/reps_per_beta evenly spaced beta values within this range. Only the replicas at the max beta value will be sampled. For the true probability distribution, max should be 1.

\n" +"

exchange_every: Every x iterations, perform replica exchange, swapping replicas that are adjacent in temperature with a statistically correct probability

\n" +"

reps_per_beta: How many identical replicas to run at each temperature. Must be a divisor of population_size

\n" +"


")) + self.histlabel_6.setText(_translate("mainWindow", "Output histogram every:")) + self.histbinlabel_5.setText(_translate("mainWindow", "Historgam bins:")) + self.itelabel_6.setText(_translate("mainWindow", "Burn in:")) + self.cintlabel_5.setText(_translate("mainWindow", "Credible intervals:")) + self.sample_everylabel_4.setText(_translate("mainWindow", "Beta range:")) + self.label_35.setText(_translate("mainWindow", "Beta:")) + self.sample_everylabel_6.setText(_translate("mainWindow", "Sample every:")) + self.histlabel_4.setText(_translate("mainWindow", "Exchange every:")) + self.step_sizelabel_6.setText(_translate("mainWindow", "Step size:")) + self.label_5.setText(_translate("mainWindow", "Reps per beta:")) + self.label_36.setText(_translate("mainWindow", "Beta:")) + self.step_sizelabel_7.setText(_translate("mainWindow", "Step size:")) + self.sample_everylabel_7.setText(_translate("mainWindow", "Crossover number:")) + self.histlabel_8.setText(_translate("mainWindow", "Zeta:")) + self.itelabel_7.setText(_translate("mainWindow", "Burn in:")) + self.label_21.setText(_translate("mainWindow", "Lambda:")) + self.sample_everylabel_8.setText(_translate("mainWindow", "Sample every:")) + self.histbinlabel_6.setText(_translate("mainWindow", "Historgam bins:")) + self.cintlabel_6.setText(_translate("mainWindow", "Credible intervals:")) + self.histlabel_7.setText(_translate("mainWindow", "Output histogram every:")) + self.label_22.setText(_translate("mainWindow", "Gamma prob:")) + self.textEdit_9.setHtml(_translate("mainWindow", "\n" +"\n" +"

DREAM settings

\n" +"

step_size: When proposing a Monte Carlo step, the step in n-dimensional parameter space has this length. Default: 0.2

\n" +"

burn_in: Ignore this many iterations at the start, to let the system equilibrate. Default: 10000

\n" +"

sample_every: Every x iterations, save the current PSet into the sampled population. Default: 100

\n" +"

output_hist_every: Every x samples (i.e every x*sample_every iterations), save a historgram file for each variable, and the credible interval files, based on what has been sampled so far. Default: 100

\n" +"

hist_bins: Number of bins used when writing the histogram files. Default: 10

\n" +"

credible_intervals: Specify one or more numbers here. For each n, algorithm will save a file giving bounds for each variable such that in n% of the samples the variable lies within the bounds. Default: 68 95

\n" +"

beta: 1 over the starting "temperature" for all replicates. This value increases (i.e., temperature decreases) over the course of the run.

\n" +"

step_size: As in Bayesian settings, but here it can be set to \'auto\'

\n" +"

crossover_number: The number of distinct crossover probabilities for performing Gibbs sampling on the parameter set. Random numbers are generated for each parameter and if they are less than the sampled crossover probability, then a new value is calculated in the updated PSet (default: 3)

\n" +"

zeta: A (very) small number for perturbing the calculated update for a particular parameter (applies to all parameters). Default: 1e-6

\n" +"

lambda: Another small number for perturbing parameters selected by the crossover procedure. Default: 0.1

\n" +"

gamma_prob: A probability that determines how often a jump in parameter space is assigned a value of 1 instead of step_size. Helps with jumping to the mode of the distribution. Default: 0.1

")) + self.label_23.setText(_translate("mainWindow", "Objective Function")) + self.objCb.setItemText(0, _translate("mainWindow", "Chi Squared")) + self.objCb.setItemText(1, _translate("mainWindow", "Sum of squares")) + self.objCb.setItemText(2, _translate("mainWindow", "Normalized sum of squares")) + self.objCb.setItemText(3, _translate("mainWindow", "Average normalized sum of squares")) + self.textEdit_13.setHtml(_translate("mainWindow", "\n" +"\n" +"

objfunc - Which objective function to use. Options: chisq - Chi Squared, sos - Sum of squares, norm_sos - Sum of squares, normalized by the value at each point, ave_norm_sos - Sum of squares, normalized by the average value of the variable. Default: chisq

")) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.alg_params), _translate("mainWindow", "Algorithmic Parameters")) + self.label_39.setText(_translate("mainWindow", "Worker nodes:")) + self.label_37.setText(_translate("mainWindow", "Cluster type:")) + self.label_38.setText(_translate("mainWindow", "Scheduler node:")) + self.cluster_type.setItemText(0, _translate("mainWindow", "None")) + self.cluster_type.setItemText(1, _translate("mainWindow", "Slurm")) + self.cluster_type.setItemText(2, _translate("mainWindow", "TORQUE")) + self.cluster_type.setItemText(3, _translate("mainWindow", "PBS")) + self.textEdit_10.setHtml(_translate("mainWindow", "\n" +"\n" +"

cluster_type - Type of cluster used for running the fit. Defaults to None (local fitting run). Currently supports \'slurm\' and will support \'torque\'/\'pbs\'

\n" +"

scheduler_node - Node used for setting up distributed Client. Defaults to None (local fitting run); takes a string identifying a machine on a network

\n" +"

worker_nodes - Nodes used for computation. Defaults to None; takes one or more strings separated by whitespace identifying machines on a network

")) + self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("mainWindow", "Cluster Settings")) + self.saveAsBtn.setText(_translate("mainWindow", "Save as")) + self.openBtn.setText(_translate("mainWindow", "Open")) + self.bnfBtn.setText(_translate("mainWindow", "Save and run")) + self.saveprojBtn.setText(_translate("mainWindow", "Export Project")) + self.saveBtn.setText(_translate("mainWindow", "Save")) + self.label_45.setText(_translate("mainWindow", "Current file:")) + self.menuSave_File.setTitle(_translate("mainWindow", "File")) + self.toolBar.setWindowTitle(_translate("mainWindow", "toolBar")) + self.actionSaveAs_file.setText(_translate("mainWindow", "Save As")) + self.actionOpen_file.setText(_translate("mainWindow", "Open")) + self.actionSave_and_run.setText(_translate("mainWindow", "Save and run")) + self.actionExport_Project.setText(_translate("mainWindow", "Export Project")) + self.actionSave.setText(_translate("mainWindow", "Save")) + diff --git a/gui2.ui b/gui2.ui new file mode 100644 index 00000000..91c516a5 --- /dev/null +++ b/gui2.ui @@ -0,0 +1,2882 @@ + + + mainWindow + + + + 0 + 0 + 994 + 644 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + BNFC + + + + + + 0 + 80 + 991 + 511 + + + + + QLayout::SetNoConstraint + + + + + + 0 + 0 + + + + + 799 + 0 + + + + + 16777215 + 506 + + + + <html><head/><body><p>Variables</p></body></html> + + + <html><head/><body><p>Variables</p></body></html> + + + 0 + + + + Input files + + + + + 10 + 10 + 961 + 461 + + + + + 0 + 0 + + + + QFrame::NoFrame + + + 0 + + + + + 0 + 0 + 961 + 291 + + + + Model: + + + + + 0 + 30 + 450 + 141 + + + + QAbstractItemView::AllEditTriggers + + + + + + 490 + 30 + 450 + 141 + + + + + + + 360 + 0 + 51 + 32 + + + + + + + + + + + 400 + 0 + 51 + 32 + + + + - + + + + + + 490 + 0 + 121 + 31 + + + + Experimental Files: + + + + + + 0 + 0 + 61 + 31 + + + + Models: + + + + + + 850 + 0 + 51 + 32 + + + + + + + + + + + 890 + 0 + 51 + 32 + + + + - + + + + + + 0 + 220 + 941 + 61 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">model</span> - specifies the mapping between .bngl model files and .exp files. This has a unique syntax, model = model.bngl : data1.exp, data2.exp . It is possible to include both .exp and .con (constraint) files in the list. If no experimental files are associated with the model, write &quot;none&quot;.</p></body></html> + + + + + + + 0 + 0 + 961 + 291 + + + + Mutant: + + + + + 0 + 200 + 941 + 111 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">mutant = basemodel name statement1 statement2: data1name.exp, data2name.exp</span> - Declares a model that does not contain its own model file, but instead is defined based on another model basemodel. &quot;name&quot; is the name of the mutant model; this name is appended to the suffixes of the base model, i.e. if the base model has data files data1.exp and data2.exp, a corresponding mutant file with the name &quot;m1&quot; should use the files data1m1.exp and data2m1.exp. statement1, statement2,... have the format [variable][operator][value] ; for example a__FREE__=0 or b__FREE__*2.</p></body></html> + + + + + + 180 + 20 + 250 + 171 + + + + QAbstractItemView::AllEditTriggers + + + + + + 180 + 0 + 60 + 16 + + + + Model: + + + + + + 450 + 20 + 210 + 171 + + + + QAbstractItemView::AllEditTriggers + + + + + + 450 + 0 + 81 + 16 + + + + Statements: + + + + + + 679 + 20 + 261 + 171 + + + + QAbstractItemView::AllEditTriggers + + + + + + 680 + 0 + 121 + 16 + + + + Experimental Files: + + + + + + 10 + 20 + 150 + 171 + + + + QAbstractItemView::AllEditTriggers + + + + + + 10 + 0 + 60 + 16 + + + + Names: + + + + + + 400 + 0 + 31 + 21 + + + + + + + + + + + 130 + 0 + 31 + 21 + + + + - + + + + + + 100 + 0 + 31 + 21 + + + + + + + + + + + 600 + 0 + 31 + 21 + + + + + + + + + + + 630 + 0 + 31 + 21 + + + + - + + + + + + 880 + 0 + 31 + 21 + + + + + + + + + + + 910 + 0 + 31 + 21 + + + + - + + + + + + + 0 + 0 + 961 + 291 + + + + Normalization: + + + + + 0 + 30 + 450 + 141 + + + + + + + 490 + 30 + 450 + 141 + + + + + + + 360 + 0 + 51 + 32 + + + + + + + + + + + 400 + 0 + 51 + 32 + + + + - + + + + + + 0 + 10 + 41 + 16 + + + + Type: + + + + + + 490 + 10 + 141 + 16 + + + + Experimental Files: + + + + + + 850 + 0 + 51 + 32 + + + + + + + + + + + 890 + 0 + 51 + 32 + + + + - + + + + + + 0 + 190 + 941 + 91 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">normalization = type [: d1.exp, d2.exp]</span> - Indicates that simulation data must be normalized in order to compare with exp files. Choices are: 'init', 'peak', 'zero', 'unit'. If only the type is specified, the normalization is applied to all exp files. If one or more exp files included, it applies to only those exp files. Additionally, you may enclose an exp file in parentheses, and specify which columns of that exp file get normalized, like this (data1.exp: 1,3-5) or (data1.exp: var1,var2) Multiple lines with this key can be used. Default: No normalization</p></body></html> + + + + + + + 0 + 0 + 961 + 291 + + + + Time courses: + + + + + 0 + 30 + 941 + 191 + + + + true + + + + + 0 + 0 + 939 + 189 + + + + + + + + 890 + 0 + 51 + 32 + + + + + + + + + + + 0 + 230 + 941 + 61 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">time_course = key1: value1, key2: value2,...</span> - Run a time course with the specified attributes. The following keys are available. time: the simulation time; step: the simulation time step (default 1); model: the model to run on (default is all of the models in the fitting run); suffix: The suffix of the data file to save. You should map the model to a .exp file of the same name (default: time_course); method: the simulation method to use. Options are ode, ssa, pla, nf. pla and nf are supported only for BNGL models.</p></body></html> + + + + + + + 0 + 0 + 961 + 291 + + + + Param scan: + + + + + 0 + 30 + 941 + 191 + + + + true + + + + + 0 + 0 + 939 + 189 + + + + + + + + 890 + 0 + 51 + 32 + + + + + + + + + + + 0 + 230 + 941 + 81 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">param_scan = key1: value1, key2: value2</span>,... - Run a parameter scan with the specified attributes. The following keys are available. param: name of the parameter to scan, min: minimum value of the parameter, max: maximum value of the parameter, step: change in parameter value between consecutive simulations in the scan, time: amount of time that each simulation in the scan is run, logspace: 0 or 1. If 1, scan the parameter in log space, model: the model to run on (default is all of the models in the fitting run); suffix: The suffix of the data file to save. You should map the model to a .exp file of the same name (default: param_scan); method: the simulation method to use. Options are ode, ssa, pla, nf. pla and nf are supported only for BNGL models.</p></body></html> + + + + + + + + Free Parameters + + + + + 440 + 0 + 51 + 32 + + + + + + + + + + + 10 + 30 + 481 + 441 + + + + true + + + + + 0 + 0 + 479 + 439 + + + + + + + + 20 + 0 + 181 + 31 + + + + + + + <b>Name:</b> + + + Qt::RichText + + + + + + + <b>Type:</b> + + + + + + + + + 490 + 30 + 301 + 441 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">uniform_var = name__FREE_ min max</span> - a uniformly distributed variable with bounds [min, max]</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">normal_var = name__FREE_ mu sigma</span> - a normal-distributed variable in regular space with mean mu, std dev sigma. A box constraint to keep &gt;= 0 is also assumed.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">loguniform_var = name__FREE_ min max</span> - a log-uniform distributed variable with bounds [min, max]. Bounds should be in regular space, eg [0.01, 100]</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">lognormal_var = name__FREE mu sigma</span> - a log-normal distributed variable with mean mu, std dev sigma. mu, sigma are given in log base 10 space.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The following are to be used only with the simplex algorithm. Simplex should not use any of the other parameter specifications.If you are using another algorithm with the flag refine, you still should not use these, you must set step size with simplex_step or simplex_log_step.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">var = name__FREE init step</span> - a variable that starts at init with an initial step size step. step is optional; defaults to simplex_step</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">logvar = name__FREE init step</span> - a variable that starts at init with an initial step size step, that moves in log space. init and step should be given in log base 10 space. step is optional; defaults to simplex_log_step.</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + Paths + + + + + 30 + 0 + 505 + 226 + + + + + + + Open Output Directory: + + + + + + + + 0 + 0 + + + + + 16777215 + 100 + + + + QAbstractScrollArea::AdjustIgnored + + + + + + + Choose + + + + + + + + 0 + 0 + + + + + 16777215 + 100 + + + + + + + + Choose + + + + + + + Path to BioNetGen: + + + + + + + + + General Options + + + + + 30 + 0 + 221 + 461 + + + + + + + + + + + + + + + + + + + + + Refine: + + + + + + + + + + + + + + + + + Parallel count: + + + + + + + + + + Wall time sim: + + + + + + + Delete old files: + + + + + + + + + + + + + Verbosity: + + + + + + + Ind var rounding: + + + + + + + Local objective eval: + + + + + + + Min objective: + + + + + + + + + + + + + Smoothing: + + + + + + + + + + + + + Bootstrap max obj: + + + + + + + Num to output: + + + + + + + Output every: + + + + + + + + + + + + + + + + + + + + + + + + + + + + Wall time gen: + + + + + + + Bootstrap: + + + + + + + + + + Constraint scale: + + + + + + + + + 270 + 0 + 521 + 471 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">General options</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace'; font-size:12px; font-weight:600; color:#24292e; background-color:#ffffff;">parallel_count</span><span style=" font-family:'SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace'; font-size:12px; color:#24292e; background-color:#ffffff;"> - How many jobs to run in parallel. Default: Use all available cores.</span> </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">refine:</span> If 1, after fitting is completed, refine the best fit parameter set by a local search with the simplex algorithm. Default<span style=" font-weight:600;">: </span>0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">delete_old_files:</span> If 1 - delete simulation folders immediately after they complete. 2 - Delete both old simulation folders and old sorted_params.txt result files Default: 1</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">num_to_output:</span> The maximum number of PSets to write when writing the trajectory. Default: 5000</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">output_every:</span> Write the Trajectory to file every x iterations. Default: 20</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">wall_time_sim:</span> Maximum time (in seconds) to wait for a simulation to finish. Exceeding this (either for a simulation or network generation) results in an infinite objective function value. Default: 3600</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">wall_time_gen:</span> Same as wall_time_sim, but for the initial network generation. Will cause the program to exit if exceeded.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">verbosity:</span> Specifies the amount of information output to the terminal. 0 - Quiet; user prompts and errors only. 1 - Normal; Warnings and concise progress updates. 2 - Verbose; Information and detailed progress updates. Default: 1</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">smoothing:</span> Number of replicates to run for each parameter set (useful for stochastic runs). Default: 1</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">min_objective: </span>Stop fitting if an objective function lower than this value is reached. Default: None; always run for the maximum iterations</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">ind_var_rounding:</span> If 1, make sure every exp row is used by rounding it to the nearest available value of the independent variable in the simulation data. (Be careful with this! Usually, it is better to set up your simulation so that all experimental points are hit exactly) Default: 0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">local_objective_eval:</span> If 1, evaluate the objective function locally, instead of parallelizing this calculation on the workers. This option is automatically enabled when using the 'smoothing' feature. Default:</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">bootstrap:</span> Whether (&gt;0) or not (0) to estimate confidence intervals through a bootstrapping procedure. The assigned integer is the number of bootstrap replicates to perform. Default: 0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">bootstrap_max_obj:</span> The maximum value of a fitting run's objective function to be considered valid in the bootstrapping procedure. Default: None</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">constraint_scale: </span>Scale all the weights in all constraint files by this multiplicative factor. For convenience only; the same thing could be achieved by editing the constraint files, but useful to change all with one setting for tuning the quantitative vs qualitative data constributions. Default: 1 (no scaling)</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + Algorithmic Parameters + + + + + 70 + 100 + 330 + 41 + + + + + + + + 0 + 0 + + + + + Differential Evolution + + + + + Asynchronous Differential Evolution + + + + + Particle Swarm Optimization + + + + + Scatter Search + + + + + Bayesian Markov chain Monte Carlo + + + + + Simplex local search + + + + + Simulated Annealing + + + + + Parallel Tempering + + + + + DREAM + + + + + + + + Fit Type: + + + + + + + + + -1 + 0 + 361 + 101 + + + + + + + Population Size: + + + + + + + + + + Max Iterations: + + + + + + + + + + Initialization: + + + + + + + + Random + + + + + Latin Hypercube Distribution + + + + + + + + + + 130 + 110 + 661 + 361 + + + + 1 + + + + + + 0 + 30 + 241 + 249 + + + + + + + + rand1 + + + + + rand2 + + + + + best1 + + + + + best2 + + + + + all1 + + + + + all2 + + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + + + + + + + + + + + + + + + Number to migrate: + + + + + + + + + + + + + + + + + + + + + Islands: + + + + + + + Migrate every: + + + + + + + Mutation Factor: + + + + + + + + + + + + + + Mutation Rate: + + + + + + + + + + + + + + Island based DE: + + + + + + + DE Strategy: + + + + + + + Stop Tolerance: + + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">Differential Evolution Settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">mutation_rate </span>- When generating a new individual, mutate each parameter with this probability. Default: 0.5mutation_factor - When mutating a parameter x, change it by mutation_factor*(PS1[x] - PS2[x]) where PS1 and PS2 are random other PSets in the population. Default: 1.0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">stop_tolerance</span> - Stop the run if max(objective) / min(objective) 1 + this value, i.e., the entire population has converged to roughly the same objective. Default: 0.002</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">de_strategy</span> - Specifies how new parameter sets are chosen. Options are: rand1, rand2, best1, best2, all1, all2. The parameter set we mutate is: 'rand' - a random one, 'best' - the one with the lowest objective value, 'all' - the one we are proposing to replace (so all psets are mutated once per iteration). The amount of mutation is based on: '1' - 1 pair of other parameter sets (p1-p2), '2' - 2 pairs of other parameter sets (p1-p2 + p3-p4).</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"># These are related to &quot;island-based&quot; differential evolution. If all omitted, uses regular differential evolution, which is still parallelizable, but has to wait until a whole generation finishes before moving on to the next.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"># Asynchronous differential evolution (fit_type=ade) is also available. It does not use islands, and so ignores these keys.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">islands:</span> Number of separate populations to evolve. Default: 1</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">migrate_every:</span> After this number of generations, migrate some individuals between islands. Default: 20 (but Inf if islands = 1)</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">num_to_migrate:</span> How many individuals to migrate off of each island during migration? Default: 3</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 30 + 241 + 211 + + + + + + + + + + + + + + + + + + + + + + rand1 + + + + + rand2 + + + + + best1 + + + + + best2 + + + + + all1 + + + + + all2 + + + + + + + + Stop Tolerance: + + + + + + + Mutation Factor: + + + + + + + Mutation Rate: + + + + + + + DE Strategy: + + + + + + + + + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">Asynchronous Differential Evolution Settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">mutation_rate </span>- When generating a new individual, mutate each parameter with this probability. Default: 0.5mutation_factor - When mutating a parameter x, change it by mutation_factor*(PS1[x] - PS2[x]) where PS1 and PS2 are random other PSets in the population. Default: 1.0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">stop_tolerance</span> - Stop the run if max(objective) / min(objective) 1 + this value, i.e., the entire population has converged to roughly the same objective. Default: 0.002</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">de_strategy</span> - Specifies how new parameter sets are chosen. Options are: rand1, rand2, best1, best2, all1, all2. The parameter set we mutate is: 'rand' - a random one, 'best' - the one with the lowest objective value, 'all' - the one we are proposing to replace (so all psets are mutated once per iteration). The amount of mutation is based on: '1' - 1 pair of other parameter sets (p1-p2), '2' - 2 pairs of other parameter sets (p1-p2 + p3-p4).</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 30 + 241 + 312 + + + + + + + + + + Social: + + + + + + + Cognitive: + + + + + + + true + + + + + + + + + + + + + + Particle Weight: + + + + + + + Adaptive N Stop: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adaptive Absolute Tolerance: + + + + + + + Adaptive N Max: + + + + + + + Adaptive Relative Tolerance: + + + + + + + Particle Weight Final: + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + Adaptive Weighting: + + + + + + + V Stop: + + + + + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">Particle Swarm settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">cognitive:</span> Acceleration toward a particle's own best fit</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">social:</span> Acceleration toward the global best fit</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">particle_weight:</span> Inertia weight of particle. Default: 1</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">v_stop:</span> Stop the algorithm if the speeds of all parameters in all particles are less than this value. Default: 0 (don't use this criterion)</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"># particle swarm params related to adaptive weight changing, which may or may not be useful</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">particle_weight_final:</span> The final particle weight after the adaptive changing. Default: the value of particle_weight, effectively disabling this feature. </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">adaptive_n_max:</span> After n_max &quot;unproductive&quot; iterations, we have moved halfway from the initial weight to the final weight. Default: 30</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">adaptive_n_stop:</span> Afer this many &quot;unproductive&quot; iterations, stop the simulation. Default: Inf</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">adaptive_abs_tol:</span> Parameter for checking if an iteration was &quot;unproductive&quot; Default: 0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">adaptive_rel_tol:</span> Parameter for checking if an iteration was &quot;unproductive&quot; Default: 0</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 30 + 241 + 111 + + + + + + + + + + Reserve Size: + + + + + + + + + + Init Size: + + + + + + + + + + + + + + Local Minimum Limit: + + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">Scatter Search settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">init_size:</span> Number of PSets to test to generate the initial population. Default: 10 * number of variables</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">local_min_limit:</span> If a point is stuck for this many iterations without improvement, it is assumed to be a local min and replaced with a random parameter set. Default: 5</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">reserve_size:</span> Scatter Search maintains a latin-hypercube-distributed &quot;reserve&quot; of parameter sets. When it needs to pick a random new parameter set, it takes one from here, so it's not similar to a previous random choice. The initial size of the reserve is this value. If the reserve becomes empty, we revert to truly random pset choices. Default: max_iterations</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 30 + 241 + 240 + + + + + + + + + + + + + + Historgam bins: + + + + + + + + + + + + + + + + + + + + + Sample every: + + + + + + + Burn in: + + + + + + + Output histogram every: + + + + + + + + + + + + + + + + + + + + + + + + + + + + Step size: + + + + + + + Credible intervals: + + + + + + + Beta: + + + + + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">Bayesian settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">step_size:</span> When proposing a Monte Carlo step, the step in n-dimensional parameter space has this length. Default: 0.2</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">burn_in:</span> Ignore this many iterations at the start, to let the system equilibrate. Default: 10000</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">sample_every:</span> Every x iterations, save the current PSet into the sampled population. Default: 100</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">output_hist_every:</span> Every x samples (i.e every x*sample_every iterations), save a historgram file for each variable, and the credible interval files, based on what has been sampled so far. Default: 100</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">hist_bins:</span> Number of bins used when writing the histogram files. Default: 10</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">credible_intervals:</span> Specify one or more numbers here. For each n, algorithm will save a file giving bounds for each variable such that in n% of the samples the variable lies within the bounds. Default: 68 95</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">beta:</span> 1 over the starting &quot;temperature&quot; for all replicates. This value increases (i.e., temperature decreases) over the course of the run.</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 30 + 241 + 291 + + + + + + + + + + Simplex contraction: + + + + + + + Simplex step: + + + + + + + + + + + + + + Simplex log step: + + + + + + + + + + Simplex shrink: + + + + + + + + + + + + + + Simplex stop tolerance: + + + + + + + + + + + + + + Simplex expansion: + + + + + + + + + + + + + + Simplex reflection: + + + + + + + + + + + + + + + + + + + + + Simplex max iterations: + + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">Simplex Settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Note: You also might define these if you chose a different algorithm but set the refine flag to use Simplex to refine the final fit.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">simplex_step</span> - In initialization, we perturb each parameter by what step size? If you specify a step size for a specific variable via 'var' or 'logvar', it overrides this. Default: 1</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">simplex_log_step</span> - Equivalent of simplex_step, for variables that move in log space. Default: simplex_step</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">simplex_reflection</span> - When we reflect a point through the centroid, what is the ratio of dilation on the other side? Default: 1.0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">simplex_expansion</span> - If the reflected point was the global min, how far do we keep moving in that direction? (as a ratio to the initial distance to centroid) Default: 1.0</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">simplex_contraction</span> - If the reflected point was not an improvement, we retry at what distance from the centroid? (as a ratio of the initial distance to centroid) Default: 0.5</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">simplex_shrink</span> - If a whole iteration was unproductive, shrink the simplex by setting simplex point s[i] to x*s[i-1] + (1-x)*s[i]. This key specifies x. Default: 0.5</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">simplex_max_iterations</span> - If specified, overrides the max_iterations setting. Useful if you are using the refine flag and want max_iterations to refer to your main algorithm.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">simplex_stop_tol</span> - Stop the algorithm if all parameters have converged to within this value (specifically, if all reflections in an iteration move the param by less than this) Default: 0 (don't use this criterion)</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 0 + 30 + 241 + 181 + + + + + + + Beta Max: + + + + + + + Beta: + + + + + + + Step size: + + + + + + + + + + + + + + + + + + + + + + + + Cooling: + + + + + + + + + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">Simulated Annealing settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">step_size:</span> When proposing a Monte Carlo step, the step in n-dimensional parameter space has this length. Default: 0.2</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">burn_in:</span> Ignore this many iterations at the start, to let the system equilibrate. Default: 10000</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">sample_every:</span> Every x iterations, save the current PSet into the sampled population. Default: 100</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">output_hist_every:</span> Every x samples (i.e every x*sample_every iterations), save a historgram file for each variable, and the credible interval files, based on what has been sampled so far. Default: 100</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">hist_bins:</span> Number of bins used when writing the histogram files. Default: 10</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">credible_intervals:</span> Specify one or more numbers here. For each n, algorithm will save a file giving bounds for each variable such that in n% of the samples the variable lies within the bounds. Default: 68 95</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">beta:</span> 1 over the starting &quot;temperature&quot; for all replicates. This value increases (i.e., temperature decreases) over the course of the run.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">beta_max:</span> Stop the algorithm if all replicates reach this beta = 1/temperature value. Default: Inf</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">cooling:</span> Each time a move to a higher energy state is accepted, increase beta = 1/temperature by this value. Default: 0.01</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">Parallel Tempering MCMC settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">step_size:</span> When proposing a Monte Carlo step, the step in n-dimensional parameter space has this length. Default: 0.2</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">burn_in:</span> Ignore this many iterations at the start, to let the system equilibrate. Default: 10000</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">sample_every:</span> Every x iterations, save the current PSet into the sampled population. Default: 100</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">output_hist_every:</span> Every x samples (i.e every x*sample_every iterations), save a historgram file for each variable, and the credible interval files, based on what has been sampled so far. Default: 100</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">hist_bins:</span> Number of bins used when writing the histogram files. Default: 10</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">credible_intervals:</span> Specify one or more numbers here. For each n, algorithm will save a file giving bounds for each variable such that in n% of the samples the variable lies within the bounds. Default: 68 95</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">beta: </span>Alternatively to specifying beta_range, you may specify population_size/reps_per_beta beta values here to use. Only the replicas at the maximum beta value in the list will be sampled. For the true probability distribution, this value should be 1.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">beta_range=min max :</span> The range of values of beta to use. The replicates will use population_size/reps_per_beta evenly spaced beta values within this range. Only the replicas at the max beta value will be sampled. For the true probability distribution, max should be 1.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">exchange_every:</span> Every x iterations, perform replica exchange, swapping replicas that are adjacent in temperature with a statistically correct probability</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">reps_per_beta:</span> How many identical replicas to run at each temperature. Must be a divisor of population_size</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + 0 + 30 + 241 + 302 + + + + + + + Output histogram every: + + + + + + + Historgam bins: + + + + + + + Burn in: + + + + + + + Credible intervals: + + + + + + + + + + + + + + + + + + + + + Beta range: + + + + + + + Beta: + + + + + + + + + + + + + + Sample every: + + + + + + + Exchange every: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Step size: + + + + + + + + + + + + + + + + + + + + + Reps per beta: + + + + + + + + + + + + + + 0 + 30 + 241 + 333 + + + + + + + Beta: + + + + + + + Step size: + + + + + + + + + + + + + + Crossover number: + + + + + + + Zeta: + + + + + + + + + + + + + + Burn in: + + + + + + + + + + + + + Lambda: + + + + + + + + + + + + + + Sample every: + + + + + + + Historgam bins: + + + + + + + + + + + + + + Credible intervals: + + + + + + + + + + + + + + Output histogram every: + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gamma prob: + + + + + + + + + + + + 250 + 30 + 401 + 321 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; text-decoration: underline;">DREAM settings</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">step_size:</span> When proposing a Monte Carlo step, the step in n-dimensional parameter space has this length. Default: 0.2</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">burn_in:</span> Ignore this many iterations at the start, to let the system equilibrate. Default: 10000</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">sample_every:</span> Every x iterations, save the current PSet into the sampled population. Default: 100</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">output_hist_every:</span> Every x samples (i.e every x*sample_every iterations), save a historgram file for each variable, and the credible interval files, based on what has been sampled so far. Default: 100</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">hist_bins:</span> Number of bins used when writing the histogram files. Default: 10</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">credible_intervals: Specify one or more numbers here. For each n, algorithm will save a file giving bounds for each variable such that in n% of the samples the variable lies within the bounds. Default: 68 95</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">beta:</span> 1 over the starting &quot;temperature&quot; for all replicates. This value increases (i.e., temperature decreases) over the course of the run.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">step_size:</span> As in Bayesian settings, but here it can be set to 'auto'</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">crossover_number:</span> The number of distinct crossover probabilities for performing Gibbs sampling on the parameter set. Random numbers are generated for each parameter and if they are less than the sampled crossover probability, then a new value is calculated in the updated PSet (default: 3)</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">zeta:</span> A (very) small number for perturbing the calculated update for a particular parameter (applies to all parameters). Default: 1e-6</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">lambda:</span> Another small number for perturbing parameters selected by the crossover procedure. Default: 0.1</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">gamma_prob:</span> A probability that determines how often a jump in parameter space is assigned a value of 1 instead of step_size. Helps with jumping to the mode of the distribution. Default: 0.1</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 360 + 0 + 421 + 31 + + + + + QLayout::SetFixedSize + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Objective Function + + + + + + + + Chi Squared + + + + + Sum of squares + + + + + Normalized sum of squares + + + + + Average normalized sum of squares + + + + + + + + + + 360 + 30 + 421 + 71 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">objfunc</span> - Which objective function to use. Options: chisq - Chi Squared, sos - Sum of squares, norm_sos - Sum of squares, normalized by the value at each point, ave_norm_sos - Sum of squares, normalized by the average value of the variable. Default: chisq</p></body></html> + + + fitStack + gridLayoutWidget + formLayoutWidget_3 + formLayoutWidget_5 + textEdit_13 + + + + Cluster Settings + + + + + 30 + 10 + 341 + 161 + + + + + + + Worker nodes: + + + + + + + Cluster type: + + + + + + + Scheduler node: + + + + + + + + None + + + + + Slurm + + + + + TORQUE + + + + + PBS + + + + + + + + + + + + + + + + 370 + 10 + 401 + 161 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">cluster_type</span> - Type of cluster used for running the fit. Defaults to None (local fitting run). Currently supports 'slurm' and will support 'torque'/'pbs'</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">scheduler_node</span> - Node used for setting up distributed Client. Defaults to None (local fitting run); takes a string identifying a machine on a network</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">worker_nodes</span> - Nodes used for computation. Defaults to None; takes one or more strings separated by whitespace identifying machines on a network</p></body></html> + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + + + + 0 + 0 + 991 + 81 + + + + + + + Save as + + + + + + + Open + + + + + + + Save and run + + + + + + + Export Project + + + + + + + Save + + + + + + + + + + + + + + Current file: + + + + + + + + + + + + + + + + + 0 + 0 + 994 + 22 + + + + + File + + + + + + + + + + + + + + + + 0 + 0 + + + + toolBar + + + TopToolBarArea + + + false + + + + + true + + + Save As + + + + + Open + + + + + Save and run + + + + + Export Project + + + + + Save + + + + + + diff --git a/main.py b/main.py new file mode 100644 index 00000000..1ea56455 --- /dev/null +++ b/main.py @@ -0,0 +1,1150 @@ +import sys +import os +import subprocess +import ntpath +import signal +from shutil import copyfile +from pathlib import Path +from PyQt5 import QtCore, QtGui, QtWidgets +import gui +import pybnf.parse as parse +import bnglparser as bngl + +class bnfc(QtWidgets.QMainWindow, gui.Ui_mainWindow): + ''' + Connects gui elements to functions + ''' + varDict = {} + paramDict = {} + actionDict = {} + mutantDict = {} + models = {} + mutants = {} + paths = [] + varlist = [] + + constructtypes = {} + types = {} + typenum = 0 + bnfpath = "" + savepath = "" + confhead = "" + process = '' + home = str(Path.home()) + + timer = QtCore.QTimer() + modelUpdate = QtCore.QTimer() + + def layout_widgets(self, layout): + return (layout.itemAt(i).widget() for i in range(layout.count())) + #this timer updates the comboboxes for the models in time courses and param scan + def updateModels(self): + try: + for r in range(0, self.timeout.rowCount()): + it = self.timeout.itemAtPosition(r, 5) + if it is not None: + tcmodel = self.timeout.itemAtPosition(r, 3).widget() + #adds models to combobox + for i in list(self.models.keys()): + index = tcmodel.findText(i) + if index == -1: + tcmodel.addItem(i) + #removes artifacts from the combobox + for i in range(tcmodel.count()): + if not(tcmodel.itemText(i) in list(self.models.keys())): + tcmodel.removeItem(i) + for r in range(0, self.scanout.rowCount()): + it = self.scanout.itemAtPosition(r, 5) + if it is not None: + psmodel = self.scanout.itemAtPosition(r, 3).widget() + #adds models to combobox + for i in list(self.models.keys()): + index = psmodel.findText(i) + if index == -1: + psmodel.addItem(i) + #removes artifacts from the combobox + for i in range(psmodel.count()): + if not(psmodel.itemText(i) in list(self.models.keys())): + psmodel.removeItem(i) + except Exception as e: + print(e) + + + def __init__(self, parent=None): + super(bnfc, self).__init__(parent) + self.setupUi(self) + #set up timers + self.timer.timeout.connect(self.checkProcess) + self.modelUpdate.timeout.connect(self.updateModels) + #model config + self.modelpBtn.clicked.connect(self.addModel) + self.modelmBtn.clicked.connect(self.removeModel) + self.exppBtn.clicked.connect(self.addExp) + self.expmBtn.clicked.connect(self.removeExp) + self.modelList.currentItemChanged.connect(self.modelItemChanged) + #normalization + self.typeaddBtn.clicked.connect(self.addType) + self.typeremBtn.clicked.connect(self.removeType) + self.expaddBtn.clicked.connect(self.addExp2) + self.expremBtn.clicked.connect(self.removeExp2) + self.typeList.currentItemChanged.connect(self.typeItemChanged) + #file paths linked to text edits + self.outputBtn.clicked.connect(self.outputdir) + self.bngBtn.clicked.connect(self.bng_path) + #run bnf + self.bnfBtn.clicked.connect(self.runBNF) + #comboboxes + self.initCb.activated[int].connect(self.initAct) + self.fitCb.activated[int].connect(self.onActivated) + self.objCb.activated[int].connect(self.objAct) + self.cluster_type.activated[int].connect(self.clusterAct) + + self.actionOpen_file.triggered.connect(self.OpenFile) + self.actionSave.triggered.connect(self.Savebtn) + self.actionSaveAs_file.triggered.connect(self.SaveFile) + self.actionExport_Project.triggered.connect(self.SaveProject) + self.openBtn.clicked.connect(self.OpenFile) + self.saveBtn.clicked.connect(self.Savebtn) + self.saveAsBtn.clicked.connect(self.SaveFile) + self.saveprojBtn.clicked.connect(self.SaveProject) + #savelabel + self.savelabel.setStyleSheet("color: rgb(7, 158, 72);") + + #free params + self.addBtn.clicked.connect(self.addEmptyParam) + + w = QtWidgets.QWidget() + w.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + self.playout = QtWidgets.QGridLayout() + w.setLayout(self.playout) + self.scrollArea.setWidgetResizable(True) + self.scrollArea.setWidget(w) + self.addEmptyParam() + + #time courses + self.addCourseBtn.clicked.connect(self.addEmptyCourse) + + t = QtWidgets.QWidget() + t.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + self.timeout = QtWidgets.QGridLayout() + t.setLayout(self.timeout) + self.timeArea.setWidgetResizable(True) + self.timeArea.setWidget(t) + self.addEmptyCourse() + + #param scan + self.addScanBtn.clicked.connect(self.addEmptyScan) + + s = QtWidgets.QWidget() + s.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + self.scanout = QtWidgets.QGridLayout() + s.setLayout(self.scanout) + self.scanArea.setWidgetResizable(True) + self.scanArea.setWidget(s) + self.addEmptyScan() + #start update timer for time courses and param scan + self.modelUpdate.start(1000) + #mutant + self.maddBtn.clicked.connect(self.addMutantModel) + self.addnameBtn.clicked.connect(self.addMutantName) + self.remnameBtn.clicked.connect(self.remMutantName) + self.addStatementBtn.clicked.connect(self.addMutantStatement) + self.remStatementBtn.clicked.connect(self.removeMutantStatement) + self.addmexpBtn.clicked.connect(self.addMExp) + self.remmexpBtn.clicked.connect(self.removeMExp) + self.nameList.currentItemChanged.connect(self.mutantItemChanged) + + ''' + model config functions + ''' + def addModel(self): + options = QtWidgets.QFileDialog.Options() + options |= QtWidgets.QFileDialog.DontUseNativeDialog + fileName, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "QFileDialog.getOpenFileName()", "", "BioNetGen Files (*.bngl);;XML Files (*.xml);;All Files (*)", options=options) + if fileName != "": + self.models[fileName] = [] + self.modelList.addItem(fileName) + + def removeModel(self): + c = self.modelList.currentItem() + if c is not None: + self.modelList.takeItem(self.modelList.currentRow()) + self.models.pop(c.text(), None) + + def addExp(self): + c = self.modelList.currentItem() + if c is not None: + options = QtWidgets.QFileDialog.Options() + options |= QtWidgets.QFileDialog.DontUseNativeDialog + fileName, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "QFileDialog.getOpenFileName()", "", "Experimental Data Files (*.exp);;Constraint Files (*.con);;All Files (*)", options=options) + if fileName != "": + self.models[c.text()].append(fileName) + self.expList.addItem(fileName) + + def removeExp(self): + m = self.modelList.currentItem() + c = self.expList.currentItem() + if c is not None: + self.models[m.text()].remove(c.text()) + self.expList.takeItem(self.expList.currentRow()) + + def modelItemChanged(self): + c = self.modelList.currentItem() + if c is not None: + ml = self.models[c.text()] + self.expList.clear() + for i in ml: + self.expList.addItem(i) + else: + self.expList.clear() + ''' + normalization + ''' + def addType(self): + item = QtWidgets.QListWidgetItem() + self.typenum += 1 + self.types[self.typenum] = [] + + widget = QtWidgets.QWidget() + widgetBox = QtWidgets.QComboBox() + widgetBox.addItems(["init", "peak", "zero", "unit"]) + + widgetLayout = QtWidgets.QHBoxLayout() + widgetLayout.addWidget(widgetBox) + + widgetLayout.setSizeConstraint(QtWidgets.QLayout.SetFixedSize) + widget.setLayout(widgetLayout) + item.setSizeHint(widget.sizeHint()) + + self.typeList.addItem(item) + self.typeList.setItemWidget(item, widget) + self.constructtypes[self.typenum] = widgetBox + + def addOpenType(self, index, exp): + item = QtWidgets.QListWidgetItem() + self.typenum += 1 + self.types[self.typenum] = [] + + widget = QtWidgets.QWidget() + widgetBox = QtWidgets.QComboBox() + widgetBox.addItems(["init", "peak", "zero", "unit"]) + widgetBox.setCurrentIndex(index) + + widgetLayout = QtWidgets.QHBoxLayout() + widgetLayout.addWidget(widgetBox) + + widgetLayout.setSizeConstraint(QtWidgets.QLayout.SetFixedSize) + widget.setLayout(widgetLayout) + item.setSizeHint(widget.sizeHint()) + + self.typeList.addItem(item) + self.typeList.setItemWidget(item, widget) + self.constructtypes[self.typenum] = widgetBox + + self.types[self.typenum].append(exp) + + def removeType(self): + c = self.typeList.currentItem() + index = self.typeList.currentRow() + 1 + if c is not None: + self.typeList.takeItem(self.typeList.currentRow()) + self.types.pop(index, None) + + def addExp2(self): + c = self.typeList.currentItem() + index = self.typeList.currentRow() + 1 + if c is not None: + options = QtWidgets.QFileDialog.Options() + options |= QtWidgets.QFileDialog.DontUseNativeDialog + fileName, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "QFileDialog.getOpenFileName()", "", "Experimental Data Files (*.exp);;All Files (*)", options=options) + if fileName != "": + self.types[index].append(fileName) + self.expList2.addItem(fileName) + + def removeExp2(self): + m = self.typeList.currentItem() + c = self.expList2.currentItem() + index = self.typeList.currentRow() + 1 + if c is not None: + self.types[index].remove(c.text()) + self.expList2.takeItem(self.expList.currentRow()) + + def typeItemChanged(self): + c = self.typeList.currentItem() + index = self.typeList.currentRow() + 1 + if index is not None: + ml = self.types.get(list(self.types)[index]) + self.expList2.clear() + for i in ml: + self.expList2.addItem(i) + else: + self.expList2.clear() + + ''' + file path funcs + ''' + def outputdir(self): + self.varDict["output_dir"] = str( + QtWidgets.QFileDialog.getExistingDirectory(self, "Choose an output directory")) + self.output_dir.setText(self.varDict.get("output_dir")) + + def bng_path(self): + self.varDict["bng_command"] = str( + QtWidgets.QFileDialog.getOpenFileName(self, "Choose BioNetGen executable")[0]) + self.bng_command.setText(self.varDict.get("bng_command")) + ''' + run BNF + ''' + def checkProcess(self): + if self.process.poll() == None: + self.bnfBtn.setText("Terminate process") + else: + self.bnfBtn.setText("Save and run") + + + def runBNF(self): + if self.bnfBtn.text() == "Save and run": + try: + self.Savebtn() + #print(self.savepath) + command = str("cd " + str(os.getcwd()) +"; pybnf -c " + self.savepath) + QtWidgets.QMessageBox.about(self, "Alert", "Check terminal for BioNetFit subprocess") + self.process = subprocess.Popen(command, shell=True, preexec_fn=os.setsid) + self.timer.start(1000) + except Exception as e: + print(e) + else: + try: + os.killpg(os.getpgid(self.process.pid), signal.SIGTERM) + except Exception as e: + print(e) + + ''' + init combobox functions + ''' + def random(self): + self.varDict["initialization"] = "random" + + def lh(self): + self.varDict["initialization"] = "lh" + + def initAct(self, index): + init = {0: self.random, 1: self.lh} + init[index]() + ''' + obj functions + ''' + def chisq(self): + self.varDict["objfunc"] = "chi_sq" + + def sos(self): + self.varDict["objfunc"] = "sos" + + def norm_sos(self): + self.varDict["objfunc"] = "norm_sos" + + def ave_norm_sos(self): + self.varDict["objfunc"] = "ave_norm_sos" + + def objAct(self, index): + obj = {0: self.chisq, 1: self.sos, 2: self.norm_sos, 3: self.ave_norm_sos} + obj[index]() + ''' + cluster type cb + ''' + def slurm(self): + self.varDict["cluster_type"] = "slurm" + + def torque(self): + self.varDict["cluster_type"] = "torque" + + def pbs(self): + self.varDict["cluster_type"] = "pbs" + + def clusterAct(self, index): + cltypes = {0: None, 1: self.slurm, 2: self.torque, 3: self.pbs} + if index > 0: + cltypes[index]() + ''' + fit functions + ''' + def de(self): + self.varDict["fit_type"] = "de" + self.fitStack.setCurrentIndex(0) + + def ade(self): + self.varDict["fit_type"] = "ade" + self.fitStack.setCurrentIndex(1) + + def pso(self): + self.varDict["fit_type"] = "pso" + self.fitStack.setCurrentIndex(2) + + def ss(self): + self.varDict["fit_type"] = "ss" + self.fitStack.setCurrentIndex(3) + + def bmc(self): + self.varDict["fit_type"] = "bmc" + self.fitStack.setCurrentIndex(4) + + def sim(self): + self.varDict["fit_type"] = "sim" + self.fitStack.setCurrentIndex(5) + + def sa(self): + self.varDict["fit_type"] = "sa" + self.fitStack.setCurrentIndex(6) + + def pt(self): + self.varDict["fit_type"] = "pt" + self.fitStack.setCurrentIndex(7) + + def dream(self): + self.varDict["fit_type"] = "dream" + self.fitStack.setCurrentIndex(8) + + def onActivated(self, index): + fit = {0: self.de, 1: self.ade, 2: self.pso, 3: self.ss, 4: self.bmc, 5: self.sim, 6: self.sa, 7: self.pt, 8: self.dream} + + func = fit[index] + func() + + ''' + utilities + ''' + def varIterate(self, layout): + for w in self.layout_widgets(layout): + if type(w) == QtWidgets.QLineEdit: + name = ''.join([i for i in w.objectName() if not i.isdigit()]) + if str(w.text()) != "": + self.varDict[str(name)] = str(w.text()) + elif type(w) == QtWidgets.QTextEdit: + name = ''.join([i for i in w.objectName() if not i.isdigit()]) + if str(w.toPlainText()) != "": + self.varDict[str(name)] = str(w.toPlainText()) + elif type(w) == QtWidgets.QComboBox: + name = ''.join([i for i in w.objectName() if not i.isdigit()]) + if name == "de_strategy": + r = {0: "rand1", 1: "rand2", 2: "best1", 3: "best2", 4: "all1", 5: "all2"} + self.varDict[str(name)] = r[w.currentIndex()] + def clrIterate(self, layout): + for w in self.layout_widgets(layout): + if type(w) == QtWidgets.QLineEdit: + w.setText("") + elif type(w) == QtWidgets.QTextEdit: + w.setPlainText("") + + def clearGrid(self, layout): + if layout is not None: + for w in self.layout_widgets(layout): + w.deleteLater() + + ''' + free param func + ''' + def min(self, label1, label2): + label1.setText("min:") + label2.setText("max:") + + def mu(self, label1, label2): + label1.setText("mu:") + label2.setText("sigma:") + + def step(self, label1, label2): + label1.setText("init:") + label2.setText("step:") + + def typeChange(self, ptype, index): + ctype = {0: self.min, 1: self.mu, 2: self.min, 3: self.mu, 4: self.step, 5: self.step} + for r in range(0, self.playout.rowCount()): + it = self.playout.itemAtPosition(r, 1) + if it is None: + continue + + if it.widget() == ptype: + label1 = self.playout.itemAtPosition(r, 2).widget() + label2 = self.playout.itemAtPosition(r, 4).widget() + ctype[index](label1, label2) + break + + def addEmptyParam(self): + name = QtWidgets.QLineEdit() + ptype = QtWidgets.QComboBox() + ptype.addItems( + ["uniform var", "normal var", "log uniform var", "log normal var", "var -Simplex only", "log var -Simplex only"]) + + slotLambda = lambda index: self.typeChange(ptype, index) + ptype.activated[int].connect(slotLambda) + val1 = QtWidgets.QLineEdit() + val2 = QtWidgets.QLineEdit() + + gl = self.playout + row = gl.rowCount() + gl.addWidget(name, row, 0) + gl.addWidget(ptype, row, 1) + gl.addWidget(QtWidgets.QLabel("min:"), row, 2) + gl.addWidget(val1, row, 3) + gl.addWidget(QtWidgets.QLabel("max:"), row, 4) + gl.addWidget(val2, row, 5) + + def addParam(self, typ, nme, v1, v2): + name = QtWidgets.QLineEdit() + ptype = QtWidgets.QComboBox() + ptype.addItems( + ["uniform var", "normal var", "log uniform var", "log normal var", "var -Simplex only", "log var -Simplex only"]) + + slotLambda = lambda index: self.typeChange(ptype, index) + ptype.activated[int].connect(slotLambda) + val1 = QtWidgets.QLineEdit() + val2 = QtWidgets.QLineEdit() + + gl = self.playout + row = gl.rowCount() + gl.addWidget(name, row, 0) + gl.addWidget(ptype, row, 1) + gl.addWidget(QtWidgets.QLabel("min:"), row, 2) + gl.addWidget(val1, row, 3) + gl.addWidget(QtWidgets.QLabel("max:"), row, 4) + gl.addWidget(val2, row, 5) + + #assign values + name.setText(nme) + ptype.setCurrentIndex(typ) + val1.setText(v1) + val2.setText(v2) + + ''' + time courses func + ''' + def addEmptyCourse(self): + ctype = QtWidgets.QComboBox() + ctype.addItems(["time", "step", "model", "suffix", "method"]) + + models = QtWidgets.QComboBox() + models.addItems(list(self.models.keys())) + + val = QtWidgets.QLineEdit() + + gl = self.timeout + row = gl.rowCount() + gl.addWidget(QtWidgets.QLabel("key:"), row, 0) + gl.addWidget(ctype, row, 1) + gl.addWidget(QtWidgets.QLabel("model:"), row, 2) + gl.addWidget(models, row, 3) + gl.addWidget(QtWidgets.QLabel("val:"), row, 4) + gl.addWidget(val, row, 5) + + def addCourse(self, typ, v1): + ctype = QtWidgets.QComboBox() + ctype.addItems(["time", "step", "model", "suffix", "method"]) + + models = QtWidgets.QComboBox() + models.addItems(list(self.models.keys())) + + val = QtWidgets.QLineEdit() + + gl = self.timeout + row = gl.rowCount() + gl.addWidget(QtWidgets.QLabel("key:"), row, 0) + gl.addWidget(ctype, row, 1) + gl.addWidget(QtWidgets.QLabel("model:"), row, 2) + gl.addWidget(models, row, 3) + gl.addWidget(QtWidgets.QLabel("val:"), row, 4) + gl.addWidget(val, row, 5) + + #assign values + ctype.setCurrentIndex(typ) + val.setText(v1) + ''' + param scan + ''' + def addEmptyScan(self): + stype = QtWidgets.QComboBox() + stype.addItems(["param:", "max:", "step:", "time:", "logspace:", "model:", "method:"]) + + models = QtWidgets.QComboBox() + models.addItems(list(self.models.keys())) + + val = QtWidgets.QLineEdit() + + gl = self.scanout + row = gl.rowCount() + gl.addWidget(QtWidgets.QLabel("key:"), row, 0) + gl.addWidget(stype, row, 1) + gl.addWidget(QtWidgets.QLabel("model:"), row, 2) + gl.addWidget(models, row, 3) + gl.addWidget(QtWidgets.QLabel("val:"), row, 4) + gl.addWidget(val, row, 5) + + def addScan(self, typ, v1): + stype = QtWidgets.QComboBox() + stype.addItems(["param:", "max:", "step:", "time:", "logspace:", "model:", "method:"]) + + val = QtWidgets.QLineEdit() + + gl = self.scanout + row = gl.rowCount() + gl.addWidget(QtWidgets.QLabel("key:"), row, 0) + gl.addWidget(stype, row, 1) + gl.addWidget(QtWidgets.QLabel("model:"), row, 2) + gl.addWidget(models, row, 3) + gl.addWidget(QtWidgets.QLabel("val:"), row, 4) + gl.addWidget(val, row, 5) + + #assign values + stype.setCurrentIndex(typ) + val.setText(v1) + + ''' + mutant + ''' + def addMutantModel(self): + options = QtWidgets.QFileDialog.Options() + options |= QtWidgets.QFileDialog.DontUseNativeDialog + fileName, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "QFileDialog.getOpenFileName()", "", "BioNetGen Files (*.bngl);;All Files (*)", options=options) + c = self.nameList.currentItem() + if c is not None: + if fileName != "": + self.mutants[c.text()][0] = fileName + self.mutantList.clear() + self.mutantList.addItem(fileName) + #name + def addMutantName(self): + name, _ = QtWidgets.QInputDialog.getText(self, 'Name of mutant', "Enter the name of the mutant:") + if name not in self.mutants and name != "": + self.mutants[name] = ["", [], []] + self.nameList.addItem(name) + else: + error_dialog = QtWidgets.QErrorMessage() + error_dialog.showMessage('The name entered is not valid.') + + def remMutantName(self): + c = self.nameList.currentItem() + if c is not None: + self.nameList.takeItem(self.nameList.currentRow()) + self.mutants.pop(c.text(), None) + #statement + def addMutantStatement(self): + statement, _ = QtWidgets.QInputDialog.getText(self, 'Statements', "Enter the statement:") + c = self.nameList.currentItem() + if c is not None: + if statement != "": + self.mutants[c.text()][1].append(statement) + self.statementList.addItem(statement) + else: + error_dialog = QtWidgets.QErrorMessage() + error_dialog.showMessage('The statement entered is not valid.') + + def removeMutantStatement(self): + m = self.nameList.currentItem() + c = self.statementList.currentItem() + if c is not None: + self.mutants[m.text()][1].remove(c.text()) + self.statementList.takeItem(self.statementList.currentRow()) + #exps + def addMExp(self): + c = self.nameList.currentItem() + if c is not None: + options = QtWidgets.QFileDialog.Options() + options |= QtWidgets.QFileDialog.DontUseNativeDialog + fileName, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "QFileDialog.getOpenFileName()", "", "Experimental Data Files (*.exp);;Constraint Files (*.con);;All Files (*)", options=options) + if fileName != "": + self.mutants[c.text()][2].append(fileName) + self.mexpList.addItem(fileName) + + def removeMExp(self): + m = self.nameList.currentItem() + c = self.mexpList.currentItem() + if c is not None: + self.mutants[m.text()][2].remove(c.text()) + self.mexpList.takeItem(self.mexpList.currentRow()) + + def mutantItemChanged(self): + c = self.nameList.currentItem() + if c is not None: + #print("called") + ml = self.mutants[c.text()] + self.mutantList.clear() + self.statementList.clear() + self.mexpList.clear() + #set name + self.mutantList.addItem(ml[0]) + #set statements + for j in ml[1]: + self.statementList.addItem(j) + #set exps + for k in ml[2]: + self.mexpList.addItem(k) + else: + self.mutantList.clear() + self.statementList.clear() + self.mexpList.clear() + + ''' + file menu func + ''' + #copied load_config from parse.py, needed dict returned not Configuration object + def load_config(self, path): + try: + infile = open(path, 'r') + except FileNotFoundError: + raise ValueError('Configuration file %s not found' % path) + param_dict = parse.ploop(infile.readlines()) + infile.close() + return param_dict + + def OpenFile(self): + varDict = {} + quickDict = {} + + options = QtWidgets.QFileDialog.Options() + options |= QtWidgets.QFileDialog.DontUseNativeDialog + fileName, _ = QtWidgets.QFileDialog.getOpenFileName( + self, "Open File", "", "Configure Files (*.conf);;All Files (*)", options=options) + if fileName != "": + if not(fileName.endswith(".conf")): + fileName += ".conf" + self.savepath = fileName + self.confhead = os.path.dirname(self.savepath) + #print(self.confhead) + self.current_file.setText(self.savepath) + #clear everything if a file is opened while another file is in the gui + if fileName != "" and bool(self.varDict): + #init clear + self.models = {} + self.actionDict = {} + self.paramDict = {} + self.mutantDict = {} + self.varDict = {} + self.constructtypes = {} + self.types = {} + self.typenum = 0 + #model + self.modelList.clear() + self.expList.clear() + #mutant + self.mutantList.clear() + self.nameList.clear() + self.statementList.clear() + self.mexpList.clear() + #normalization + self.typeList.clear() + self.expList2.clear() + #timecourses + self.clearGrid(self.timeout) + #param scan + self.clearGrid(self.scanout) + #free param + self.clearGrid(self.playout) + #algorithmic params + self.clrIterate(self.de_layout) + self.clrIterate(self.ade_layout) + self.clrIterate(self.pso_layout) + self.clrIterate(self.ss_layout) + self.clrIterate(self.bmc_layout) + self.clrIterate(self.sim_layout) + self.clrIterate(self.sa_layout) + self.clrIterate(self.pt_layout) + self.clrIterate(self.dream_layout) + #clear layouts + self.clrIterate(self.go_layout) + self.clrIterate(self.path_layout) + self.clrIterate(self.cluster_layout) + self.clrIterate(self.mult_layout) + + try: + #set varDict to be the parsed dict that is returned + varDict = self.load_config(fileName) + #file paths + self.output_dir.setPlainText(varDict.get("output_dir", "")) + self.bng_command.setPlainText(varDict.get("bng_command", "")) + #iterate through the models key to find all the models and put them in the local models dictionary + for m in varDict["models"]: + exp = varDict[m] + self.models[m] = exp + self.modelList.addItem(m) + + #iterate through key value pairs to update gui + for key, value in varDict.items(): + #print(key, value) + if isinstance(key, tuple): + ptype = key[0] + name = key[1] + val1 = value[0] + val2 = value[1] + r = {"uniform_var": 0, "normal_var": 1, "loguniform_var": 2, "lognormal_var": 3} + self.addParam(r[ptype], name, str(val1), str(val2)) + elif key == "time_course": + quickDict = {} + for pair in value: + quickDict.update(pair) + for k, v in quickDict.items(): + r = {"time": 0, "step": 1, "model": 2, "suffix": 3, "method": 4} + self.addCourse(r[k], v) + elif key == "param_scan": + quickDict = {} + for pair in value: + quickDict.update(pair) + for k, v in quickDict.items(): + r = {"param": 0, "max": 1, "step": 2, "time": 3, "logspace": 4, "model": 5, "method": 6} + self.addScan(r[k], v) + elif key == "mutant": #test + statement = "" + statements = [] + #print(value) + for i in value: + model = i[0] + name = i[1] + for a in i[2]: + for b in a: + statement += b + " " + statements.append(statement) + statement = "" + exps = i[3] + self.mutants[name] = [model, statements, exps] + self.nameList.addItem(name) + statements = [] + elif key == "normalization": + quickDict = {} + print(value) + for k, v in value.items(): + r = {"init": 0, "peak": 1, "zero": 2, "unit": 3} + self.addOpenType(r[v], k) + elif key == "credible_intervals": + intervalstr = "" + for v in value: + intervalstr += str(v) + " " + lineEdit = self.findChild(QtWidgets.QLineEdit, key) + lineEdit.setText(intervalstr) + else: + try: + lineEdit = self.findChild(QtWidgets.QLineEdit, key) + lineEdit.setText(str(value)) + except: + pass + + #qcombobox setting + #obj func + obj = {"chi_sq": 0, "sos": 1, "norm_sos": 2, "ave_norm_sos": 3} + index = obj.get(varDict.get("objfunc")) + if index is not(None): + self.objCb.setCurrentIndex(index) + self.varDict["objfunc"] = varDict.get("objfunc") + + #init + init = {"rand": 0, "lh": 1} + index = init.get(varDict.get("initialization")) + if index is not(None): + self.initCb.setCurrentIndex(index) + self.varDict["initialization"] = varDict.get("initialization") + #fit type + fit = {"de": 0, "ade": 1, "pso": 2, "ss": 3, "bmc": 4, "sim": 5, "sa": 6, "pt": 7} + index = fit.get(varDict.get("fit_type")) + if index is not(None): + self.fitCb.setCurrentIndex(index) + self.onActivated(index) + self.varDict["fit_type"] = varDict.get("fit_type") + + except Exception as p:# parse.PybnfError as p: + QtWidgets.QMessageBox.about(self, "Error:", "%s" % p) + + def Save(self, fileName): + #store all values in varDict + #file paths + #stored in varDict in their own functions + #styling for the output file + self.savepath = fileName + def coolComment(string): + output = "" + x = len(string) + 4 + i = 0 + while i < x: + output += "#" + i += 1 + output += str("\n# " + string + " #\n") + j = 0 + while j < x: + output += "#" + j += 1 + output += "\n" + return output + #arrange variables in a pleasing manner + def popDict(Dict, listItems): + for key in listItems: + if key in Dict: + file.write('%s = %s\n'%(key, Dict.get(key))) + Dict.pop(key, Dict.get(key)) + + #general option params + self.varIterate(self.go_layout) + + #cluster options + self.varIterate(self.cluster_layout) + i = {1: "slurm", 2: "torque", 3: "pbs"} + if self.cluster_type.currentIndex() > 0: + self.varDict["cluster_type"] = i[self.cluster_type.currentIndex()] + + #file paths + self.varIterate(self.path_layout) + + #free params + for r in range(0, self.playout.rowCount()): + it = self.playout.itemAtPosition(r, 0) + if it is not None: + if str(it.widget().text()) != "": + val1 = self.playout.itemAtPosition(r, 3).widget() + val2 = self.playout.itemAtPosition(r, 5).widget() + index = self.playout.itemAtPosition(r, 1).widget().currentIndex() + r = {0: "uniform_var", 1: "normal_var", 2: "loguniform_var", 3: "lognormal_var"} + self.paramDict[str(it.widget().text())] = [r[index], val1.text(), val2.text()] + + #time courses + self.actionDict["time_course"] = [] + for r in range(0, self.timeout.rowCount()): + it = self.timeout.itemAtPosition(r, 5) + if it is not None: + if it.widget().text() != "": + val = self.timeout.itemAtPosition(r, 5).widget() + tcmodel = str(self.timeout.itemAtPosition(r, 3).widget().currentText()) + index = self.timeout.itemAtPosition(r, 1).widget().currentIndex() + r = {0: "time", 1: "step", 2: "model", 3: "suffix", 4: "method"} + l = [r[index], tcmodel, val.text()] + self.actionDict["time_course"].append(l) + + #param scan + self.actionDict["param_scan"] = [] + for r in range(0, self.scanout.rowCount()): + it = self.scanout.itemAtPosition(r, 5) + if it is not None: + if it.widget().text() != "": + val = self.scanout.itemAtPosition(r, 5).widget() + psmodel = str(self.scanout.itemAtPosition(r, 3).widget().currentText()) + index = self.scanout.itemAtPosition(r, 1).widget().currentIndex() + r = {0: "param", 1: "max", 2: "step", 3: "time", 4: "logspace", 5: "model", 6: "method"} + l = [r[index], psmodel, val.text()] + self.actionDict["param_scan"].append(l) + + #normalization + normalDict = {} + r = {0: "init", 1: "peak", 2: "zero", 3: "unit"} + for k, v in self.constructtypes.items(): + typ = r[v.currentIndex()] + normalDict.setdefault(typ, []).append(self.types.get(k)) + # print(normalDict) + + #algorithmic params + self.varIterate(self.mult_layout) + if not("initialization" in self.varDict): + self.varDict["initialization"] = "random" + + #fit type + #set default fit type to be de + if not("fit_type" in self.varDict): + self.varDict["fit_type"] = "de" + + if self.varDict.get("refine") == "1": + if self.varDict["fit_type"] == "de": + self.varIterate(self.de_layout) + elif self.varDict["fit_type"] == "ade": + self.varIterate(self.ade_layout) + elif self.varDict["fit_type"] == "pso": + self.varIterate(self.pso_layout) + elif self.varDict["fit_type"] == "ss": + self.varIterate(self.ss_layout) + elif self.varDict["fit_type"] == "bmc": + self.varIterate(self.bmc_layout) + elif self.varDict["fit_type"] == "sa": + self.varIterate(self.sa_layout) + elif self.varDict["fit_type"] == "pt": + self.varIterate(self.pt_layout) + else: + self.varIterate(self.dream_layout) + + else: + if self.varDict["fit_type"] == "de": + self.varIterate(self.de_layout) + elif self.varDict["fit_type"] == "ade": + self.varIterate(self.ade_layout) + elif self.varDict["fit_type"] == "pso": + self.varIterate(self.pso_layout) + elif self.varDict["fit_type"] == "ss": + self.varIterate(self.ss_layout) + elif self.varDict["fit_type"] == "bmc": + self.varIterate(self.bmc_layout) + elif self.varDict["fit_type"] == "sim": + self.varIterate(self.sim_layout) + elif self.varDict["fit_type"] == "sa": + self.varIterate(self.sa_layout) + elif self.varDict["fit_type"] == "pt": + self.varIterate(self.pt_layout) + else: + self.varIterate(self.dream_layout) + + #obj func + if not("objfunc" in self.varDict): + self.varDict["objfunc"] = "chi_sq" + + if fileName != "": + if not(fileName.endswith(".conf")): + fileName += ".conf" + self.savepath = fileName + self.current_file.setText(self.savepath) + #print(self.savepath) + paramAdj = {k: v for k, v in self.paramDict.items() if v is not None} + with open(fileName, 'w') as file: + #fundamental model specification + #model map + if self.models.items() != 0: + file.write(coolComment("Fundamental model specification")) + for key, value in self.models.items(): + file.write('model = %s : '%(key) + str(", ".join(self.models[key])) + '\n') + popDict(self.varDict, ["bng_command", "output_dir", "fit_type", "objfunc", "parallel_count", "cluster_type", "scheduler_node", "worker_nodes"]) + #mutant + for key, value in self.mutants.items(): + statements = "" + exps = "" + model = value[0] + for a in value[1]: + statements += a + " " + for b in value[2]: + exps += b + " " + file.write('mutant = %s %s %s : %s\n' %(model, key, statements, exps)) + #action commands + if self.actionDict.items() != 0: + file.write("\n") + for key, value in self.actionDict.items(): + strprint = "" + if value: + for k, m, v in value: #TEST FLAG + if m != "": + strprint += str("model: " + m + ", " + k + ": " + v + "\n") + else: + strprint += str(k + ": " + v + "\n") + file.write(key + " = " + strprint) + strprint = "" + #file.write("\n") + #parameter specification + if paramAdj.items() != 0: + file.write(coolComment("Parameter Specifications")) + for name, (ptype, val1, val2) in paramAdj.items(): + file.write('%s = %s %s %s\n'%(ptype, name, val1, val2)) + self.varlist.append(name) + #general options + if self.varDict.items(): + file.write(coolComment("General Options")) + for key, value in self.varDict.items(): + file.write('%s = %s\n'%(key, value)) + if normalDict.items(): + file.write("#normalization\n") + for typ, exp in normalDict.items(): + strprint = "" + file.write("normalization = " + typ + " : ") + for k in exp: + for v in k: + strprint += str(v + ",") + strprint = str(strprint[:-1]) + file.write(strprint) + file.write("\n") + self.savelabel.setText("Saved!") + QtCore.QTimer.singleShot(5000, self.hide) + + def hide(self): + self.savelabel.setText("") + + def Savebtn(self): + if self.savepath != "": + self.Save(self.savepath) + else: + self.SaveFile() + + def SaveFile(self): + options = QtWidgets.QFileDialog.Options() + options |= QtWidgets.QFileDialog.DontUseNativeDialog + fileName, _ = QtWidgets.QFileDialog.getSaveFileName( + self, "Save File","", "Configure Files (*.conf)", options=options) + + self.Save(fileName) + + def SaveProject(self): + options = QtWidgets.QFileDialog.Options() + options |= QtWidgets.QFileDialog.DontUseNativeDialog + projectdir = QtWidgets.QFileDialog.getSaveFileName( + self, "Choose an project directory", "", options=options)[0] + + if not os.path.isfile(projectdir): + modellist = [] + explist = [] + + for key, value in self.models.items(): #get the first model + modellist.append(key) + for val in value: + explist.append(val) + + if len(modellist) > 0: + model = modellist[0] + + if not os.path.isdir(projectdir): #check if dir exists; create it + os.makedirs(projectdir) + + confpath = str(projectdir + "/" + ntpath.basename(projectdir)) #conf path + self.Save(confpath) #run save function for configure file + + #copy all exp files to new dir + for exp in explist: + if not(os.path.isfile(exp)): + npath = self.confhead + "/" + ntpath.basename(exp) + if os.path.isfile(npath): + exp = npath + else: + #print("Invalid exp path: "+ npath) + QtWidgets.QMessageBox.about( + self, "Alert", "One or more experimental file paths are invalid\nInvalid path: " + npath) + break + export = projectdir+"/"+ntpath.basename(exp) + try: + copyfile(exp, export) + except Exception as e: + QtWidgets.QMessageBox.about(self, "Alert", str(e)) + break + + #copy all bngl files to new dir + for model in modellist: + if not(os.path.isfile(model)): + npath = self.confhead + "/" + ntpath.basename(model) + if os.path.isfile(npath): + model = npath + else: + QtWidgets.QMessageBox.about( + self, "Alert", "One or more model file paths are invalid") + break + #set path for each model + modelpath = projectdir +"/"+ntpath.basename(model) + try: + #replace values of params with __FREE to make them free + #remove __FREE from name to find parameter + #print(model) + #print(modelpath) + #print(self.varlist) + bngl.load(model, modelpath, self.varlist) + + except Exception as e: + QtWidgets.QMessageBox.about(self, "Alert", str(e)) + break + else: + QtWidgets.QMessageBox.about( + self, "Alert", "The path selected is not a valid directory") + + + + +if __name__ == '__main__': + app = QtWidgets.QApplication(sys.argv) + form = bnfc() + form.show() + app.exec_() diff --git a/plot.py b/plot.py new file mode 100644 index 00000000..b94a142e --- /dev/null +++ b/plot.py @@ -0,0 +1,62 @@ +""" +python script for parsing and plotting gdat files +""" + +import matplotlib.pyplot as plt +import os +import re +#x +xtitle = "" +xdata = [] +#y +ytitles = [] +ydata = [] + +title = "" + +def load(path): + try: + infile = open(path, 'r') + title = os.path.basename(path) + except FileNotFoundError: + raise PybnfError('Configuration file %s not found' % path) + plotloop(infile.readlines()) + infile.close() + +def parse(s): + plist = re.split('\s', s) + data = [] + for n, i in enumerate(plist): + cl = i.strip() + if cl != "" and cl != "#": + try: + data.append(float(cl)) + except: + data.append(cl) + print(data) + return(data) + +def plotloop(path): + for i, line in enumerate(path): + l = parse(line) + if i == 0: + xtitle = l[0] + print(xtitle) + ytitles = l[1:] + print(ytitles) + for n in range(len(ytitles)): + ydata.append([]) + else: + xdata.append(l[0]) + for n in range(len(ytitles)): + ydata[n].append(l[n+1]) + print(ydata) + for n in range(len(ytitles)): + plt.plot(xdata, ydata[n]) + plt.xlabel(xtitle) + plt.legend(ytitles, loc='upper left') + plt.title(title) + plt.show() + +load("/Users/alex/Desktop/example1/timecourse.exp") +