Install and Run Molywood in Windows Subsystem for Linux

Windows Subsystem for Linux installation with Conda

Important!

The molywood tool has been developed in Python version 3 and therefore it must be run over a Python 3 installation or environment.

As some of the conda dependencies of our packages are not fully compatible with Windows, here we will explain how to install and run Molywood in Windows 10 using the Windows Subsystem for Linux feature.

Install Ubuntu

First off, we will install Ubuntu in Windows 10. If you have it already installed you can skip this step.

Enable Windows Subsystem for Linux

Before installing Ubuntu, we should enable Windows Subsystem for Linux:

  1. Open Start Menu
  2. Click on Settings
  3. Click on Apps
  4. Scroll down and click on Related settings > Programs and Features
  5. Go to the left menu and click on Turn Windows features on or off
  6. Scroll down and enable Windows Subsystem for Linux clicking on the left checkbox

Install Ubuntu terminal

Several Linux distributions can be installed, although we recommend to install Ubuntu 16.04 or 18.04. In the next link the installation instructions can be found:

https://docs.microsoft.com/en-us/windows/wsl/install-manual

Basic steps:

  1. Open Power Shell
  2. Download distribution:

    curl.exe -L -o ubuntu-1604.appx https://aka.ms/wsl-ubuntu-1604
  3. Install distribution:

    Add-AppxPackage .\ubuntu-1604.appx

Once the installation is finished, Ubuntu terminal is available in the Start Menu:

Install Anaconda

  1. Go to the official Anaconda website:

    https://www.anaconda.com/distribution/#linux
  2. Be sure that the Linux tab is selected, because as we are accessing the site from Windows, probably the Windows tab will be selected by default. Then copy the Download Python 3.x version link.

  3. Open Ubuntu terminal and download the link copied in the step above:

    wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh .
  4. Now we have the file downloaded but we need to give it execution permissions:

    chmod +x Anaconda3-2019.10-Linux-x86_64.sh

  5. Once we have execution permissions, let's execute the file and follow the installation instructions:

    sh ./Anaconda3-2019.10-Linux-x86_64.sh
  6. When the execution is finished, try to execute conda in the terminal window. If it doesn't work, the path must be exported:

    export PATH=/home/USER/anaconda3/bin:$PATH

Download environment.yml file

For creating a new conda environment, we need to download a YAML file with all the dependencies that must be installed into our environment. The structure of this file is as follows:

name: molywood
channels:
  - conda-forge
dependencies:
  - python
  - vmd
  - ffmpeg
  - imagemagick
  - conda

Download the YAML file environment.yml to your computer clicking the button below:

Download environment.yml

Create conda environment

Open your Ubuntu terminal and go to the folder where your environment.yml file has been downloaded and follow the next steps:

  1. Create the molywood conda environment:

    conda env create -f environment.yml
  2. Once the molywood conda environment is created, activate it:

    conda activate molywood
  3. Run the Python Package Installer to install manually the last dependency:

    pip install molywood

Run molywood

Now you can run molywood just typing molywood in your Ubuntu terminal.

(molywood) $ molywood

 Warning: no input data was provided. 

 To run Molywood, provide the name of the input file, e.g. 'molywood script.txt'. 

 To run a sample visualization, type 'y'. 

 To generate a sample input, type 'i'. 

 Pressing 'Enter' (or entering any other command) will terminate the script.
 >>> y
 Do you want to render the movie ('r'), or display only ('d')?
 >>> d
 Sample movie with pdb 1w0t, render mode off
Now rendering scene: scene