Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Welcome to, this is a repository for running a user-friendly oxDNA webserver.

Note, you are free to run the server as-is, by cloning and running, but it is available as a packaged Vagrant virtualbox, allowing you to easily setup a proper environment with all necessary libraries and software (MySQL, Flask, Slurm, etc...). The environment can be seen here:


This project uses Python modules to separate functionality and logic. The "Jobs" module in handles the creation and management of jobs, and the "Accounts" module in handles the creation and management of accounts. Please follow this design pattern.

The main entry-point of the application, where all the routes are defined, can be found in

When interfacing with the MySQL database, ensure that you handle and close your connections properly. See the section Interfacing with the Database.below for more information.

Running as a Production Server

If you invoke "python3" you will be running the development version of the Flask webserver, but it is not suitable for production, is not stable and does not scale.

To run a proper production server, you will need to use gunicorn.

You must then comment out the "" call from, create a new file (called, and add the following code:

This functionality will soon be integrated into this repository by default

from main import app

if __name__ == "__main__":

You then start gunicorn from the command line with:

gunicorn --bind wsgi:app --workers=3

Interfacing with the Database

This application makes use of the pymysql and pymysql-pool libraries for interfacing with MySQL.

You can see how this interface is configured within the Database module. Ten connections are created for interfacing with the MySQL database, these connections are then stored in a pool and re-used throughout the lifecycle of the application.

In order to use a connection, use the following procedure:

import Database

results = None
with Database.pool.get_connection() as connection:
	with connection.cursor() as cursor:
		cursor.execute("SELECT * FROM Users")
		results = cursor.fetchall()

Please be sure to close your connection, or else the server will crash if it exhausts the connection pool.


Environment for running webserver for oxDNA/oxRNA simulation submission and analysis







No releases published


No packages published