Skip to content

Instantly share code, notes, and snippets.

@grant-roy
Last active January 30, 2018 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grant-roy/2ac5bd53c318863f65ee to your computer and use it in GitHub Desktop.
Save grant-roy/2ac5bd53c318863f65ee to your computer and use it in GitHub Desktop.

NUPACK Windows Guide

The following has been validated against windows 7/Server 2008 & Windows 8

NUPACK Source Code can be downloaded here. Note, for compilation on Windows an older version(3.0.2) will be required.

Installation of Cygwin

You will need to download and install Cygwin. Choose the appropriate version for your machine(32/64 bit).

You will be prompted to install Cygwin off of the C: directory

cygwin-devel

During installation of Cygwin, it is important to select the Development options by double clicking Default next to Devel, switching it to Install.

cygwin-devel

Installation of Cygwin can take awhile, as many packages are being installed and configured.

After installation, you may encounter a LibUSB warning, and post install script errors, which you can safely ignore. Click OK at the prompt.

Compiling NUPACK

Go to wherever you have downloaded the nupack3.0.2 zip file, right click, and then select Extract All.

Press Browse to select Cygwin home directory, which is where we want the extracted contents of nupack3.0.2 to go.

cygwin-devel

On Windows, NUPACK must be compiled with special command line arguments.

At this point you will need to double click and open Cygwin terminal, where you will be in the home directory. It is important to note that Cygwin is a Unix emulator, and so the following commands will be UNIX commands.

We will first need to switch into the nupack3.0.2 directory

$ cd nupack3.0.2

Now that we are inside the nupack3.0.2 folder, we can compile NUPACK using the following command

$ make NUPACK_CFLAGS=-DUSE_DOUBLE

Please note that because this sets any variable that would be a long double in normal compilation to a double, large analysis jobs producing large-exponent partition functions may fail. Alleviating this will require compilation on a Unix-based platform.

We now need to set an environment variable NUPACKHOME so that other programs(like Multistrand) will be able to find and run the executables. In order to do this we will edit a hidden file, .profile, adding in a line of text. This ensures that the environment variable will be set every time we open Cygwin.

#ensure that you are using >> rather than >, as > will overwrite .profile
$ echo "export NUPACKHOME=~/nupack3.0.2" >> .profile

#reload the profile for the current session
$ source .profile

At this point the NUPACK executables are runnable on your computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment