Now that Microsoft is embracing open source software, and making the Ubuntu subsystem available, it is very easy to install OpenMD on your Windows computer.

Installing Ubuntu for Windows 10

  1. Make sure your Windows 10 system is up-to-date. You must have a 64-bit Windows 10 Operating System version 16237.0 or higher, which you can see in Settings→System→About.
  2. Run the following code as an administrator in PowerShell:
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

    (Note that if you do not run the command as an administrator you will get an error trying to run this.)

  3. Restart your computer when prompted.
  4. Download the Ubuntu app from the Windows Store.
  5. Open the Ubuntu app and create your new UNIX username and password. (Note that it does not have to match your Windows username and/or password.)
  6. Update Ubuntu with the following commands:
    sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y
  7. From here you can proceed with installing the OpenMD prerequisites for a Linux machine. After these prerequisites are installed, you can build and install OpenMD normally.

Running Graphical Applications with X Server on Ubuntu for Windows 10

If you want to use a graphical application like jmol or xmgrace to interact with the data, you’re going to need a X Server. Without it, when you call one of these programs you will get the following error:

Can't open display
Failed initializing GUI, exiting

To run these graphical applications we need to install the X server and configure bash to use it.

  1. The X server we recommend and have tested is VcXsrv – a fully open source and up-to-date native X server.
  2. Download this application and proceed with the installation.
  3. Once this is installed, open the application and proceed with the default selections for the display settings. (Note that other settings may work well too, but the default settings are the only ones we’ve tested)
  4. The X icon will show up on the bottom of your screen in the system tray.
  5. To configure bash run the following command:
    echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
  6. Either restart the Ubuntu app or source the file with the following:
    . ~/.bashrc
  7. If you want to verify it worked download the x11 apps and run xeyes:
    sudo apt-get install x11-apps
    xeyes

Tags: , , ,