Skip to content

RxnRover/plugin_sqsnobfit

Repository files navigation

SQSnobFit Plugin

This plugin allows Rxn Rover to connect with an instance of SQSnobFit, a Python reimplementation of the SNOBFIT blackbox optimization algorithm. A Python program is provided with the plugin to launch an instance of SQSnobFit for use with this plugin. This program uses a modified objective function with built-in communication capabilities. The SQSnobFit algorithm, along with other aspects of the program, can be configured by specifying a configuration file (example files are provided).

Installation

Prerequisites

This plugin requires the following to be installed beforehand:

Getting the Plugin

Download this plugin by clicking the "Code" button in the top right of its GitHub repository and selecting "Download ZIP". Extract the ZIP file into your <documents>/Plugins/Optimizers directory. Inside the plugin directory you just extracted, there is a plugin directory, where the plugin code is stored, and an empty sqsnobfit_remote_optimizer directory. Download the SQSnobfit remote optimization code from https://github.com/RxnRover/snobfit_remote_optimization and extract that ZIP file into the sqsnobfit_remote_optimizer subdirectory

Setting up SQSnobFit Optimizer

Inside <documents>/Plugins/Optimizers/SQSnobFit there are two folders, plugin, where the Rxn Rover plugin resides, and sqsnobfit_remote_optimizer, where the necessary code to launch an instance of SQSnobFit that can communicate with the plugin. If you are using Linux or Mac, simply type make install in the sqsnobfit_remote_optimizer directory to download and install dependencies into a virtual environment.

If using Windows, open a terminal in the sqsnobfit_remote_optimizer directory and type the following commands:

python -m venv venv             # Creates a virtual environment (venv)
.\venv\Scripts\activate         # Activates the venv
pip install -r requirements.txt # Installs dependencies in venv
deactivate                      # Deactivates the venv

Configurations

The SQSnobFit optimization can be configured by editing or creating a new config file in the sqsnobfit_remote_optimizer/config directory. An example configuration file with default values is provided as default-config.json.

Plugin Scripts

Scripts used by the plugin are located in the sqsnobfit_remote_optimizer/scripts subdirectory. When creating a new script, ensure that it activates the venv, runs src/main.py with the correct config file as a command line argument, and deactivates the venv when complete. An example start script file should be present in the scripts directory.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •