Posts Tagged prerequisites

Building and Installing OpenMD on Windows

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: , , ,

Installing OpenMD prerequisites

To get OpenMD up and running, there are some required (and optional) software packages you should have to create a functioning build environment:

On a Mac (OS X 10.5 or greater)

  1. Install Xcode
  2. Install MacPorts
  3. Open a Terminal window, and update your MacPorts installation to the latest portfiles:
    sudo port -v selfupdate
    sudo port -d sync

    (Note that the port command is usually located in /opt/local/bin)

  4. Install the relevant prerequisite packages:
    sudo port install cmake openbabel qhull zlib fftw-3 openmpi py37-numpy py37-scipy

    You can go have lunch or coffee while these are being built and installed.

  5. Select python3 as the default python variant, and openmpi as a default:
    sudo port select --set python python37
    sudo port select --set python3 python37
    sudo port select --set mpi openmpi-mp
  6. Install some optional software if you want to use and interact with the data produced by OpenMD:
    sudo port install jmol xmgr grace 
  7. Install some optional software if you want to develop or add to OpenMD:
    sudo port install antlr gengetopt doxygen

On Linux

  1. Use yum, apt-get, or the package manager in your favorite distribution to install the following packages and all of their prerequisites. Package names depend on the Linux variant, so in Fedora (and Red Hat) the package names are:
    fftw
    fftw-devel
    cmake
    openbabel
    openbabel-devel
    openmpi3
    openmpi3-devel
    perl
    python3-numpy
    python3-scipy qhull qhull-devel zlib zlib-devel

    In Ubuntu (and probably other Debian-based versions), the packages are:

    libfftw3-3
    libfftw3-dev
    cmake
    openbabel
    libopenbabel-dev
    openmpi-bin
    libopenmpi-dev
    perl
    python3-numpy
    python3-scipy qhull-bin libqhull-dev minizip zlib1g-dev
  2. Install some optional packages if you want to use and interact with the data produced by OpenMD:
    jmol
    grace
    
  3. Install some optional software if you want to develop or add to OpenMD:
    antlr
    gengetopt
    doxygen

On Windows

Building and installing OpenMD on Windows is now quite straightforward. All it takes is the installation of an Ubuntu subsystem on your Windows Machine. Once you have this, all the commands for the Linux build are exactly the same. Alternatively, CMake will generate a (mostly) working build of OpenMD 2.6 in Windows with the Visual Studio 2019 C++ compiler, but we don’t routinely test the code in this configuration. 

  1. Follow the steps to building and installing OpenMD on Windows. (Note that if you’re planning on using visualization software that relies on an X Server, you’ll need to follow the Windows-specific instructions for that as well.)
  2. Refer to the list of packages for linux above to get the correct packages installed.

Building from source

If you are building all of the prerequisites from source, you’ll need (in addition to a C++ compiler):

  1. CMake – This cross-platform build system is required for building OpenMD.  You need to install CMake 2.8.11 or newer. This is available as a binary package from the KitWare website; alternatively, it may be available through your package manager (on Linux). If necessary, you can also compile it yourself from the source code.
  2. perl and python – interpreted scripting languages that some of the OpenMD utilities use to parse and process data files.
    You probably already have these.
  3. Open MPI – A very good implementation of the MPI-2 specification for parallel computing.
  4. qhull – A computational geometry toolbox for computing convex hulls and Delaunay triangulations. qhull is required for the LangevinHull integrator and for any of the tools that compute the Hull atoms or hull volumes of nanoparticles and clusters.
  5. openbabel – a chemical toolbox for converting between different data formats.  This is required for building the atom2omd program which helps prepare initial “metadata” or omd files for simulations.
  6. fftw – a library for computing discrete Fourier transforms. This is required for surface undulation spectra (Hxy in staticProps). Get version 3.
  7. zlib – required to support reading compressed trajectory files.

You’ll also likely want to download and compile the following useful tools for interacting with the data:

  1. Jmol
  2. xmgr
  3. grace
  4. NumPy
  5. SciPy
  6. vmd

If you are going to be extending or developing OpenMD, you’ll need the following tool:

  1. antlr – our tool for parsing meta-data files.  You’ll want version 2.7, not 3.
  2. gengetopt – a tool to generate C code to parse the command line arguments argc and argv that are part of every C or C++ program

Tags: , , ,