Setting up WSL and installing solvers

 1. About Windows Subsystem for Linux (WSL)

WSL is available instead of cygwin for using Gromacs etc for Winmostar .
You can use it with Windows 10 only.
This page explains the setup procedure using Ubuntu with Windows 10 build number 16215 or later.
To use the WSL environment on Winmostar, you need to switch from cygwin to WSL on Winmostar's preference window.

 2. Activate Windows Subsystem for Linux (WSL)

(1) Check "Windows Subsystem for Linux" in [Control Panel]-[Programs]-[Programs and Features]-[Turn Windows features and on or off] and press OK and reboot.
(2) Install Ubuntu from the Microsoft Store. There are also Ubuntu 16.04 LTS and Ubuntu 18.04 LTS, but here we select Ubuntu.
(3) Start Ubuntu and enter user name and password.

$ sudo apt update
$ sudo apt upgrade

 3. Installation of packages

 3-1. When apt packages are put together

$ sudo apt install cmake g++ csh gfortran python2.7 flex zlib1g-dev libbz2-dev subversion python libnetcdf-dev liblapack-dev python-numpy openbabel grace imagemagick gnuplot bc dos2unix libopenmpi-dev python-dev libopenblas-dev openmpi-bin tcsh libfftw3-dev autoconf

 3-2. When editing configuration files at once

$ sudo vi /etc/profile.d/
source /usr/local/gromacs/bin/GMXRC
source /usr/local/amber14/
export PATH=$PATH:/usr/local/acpype
export PerlChemistry=/usr/local/MATCH_RELEASE/PerlChemistry
export PATH=$PATH:/usr/local/MATCH_RELEASE/MATCH/scripts
export PATH=$PATH:/usr/local/MODYLAS_1.0.4/bin
export PATH=$PATH:/usr/local/NWChem/bin
export NWCHEM_BASIS_LIBRARY=/usr/local/NWChem/data/libraries/
export PATH=$PATH:/usr/local/espresso-5.2.1/bin
export ESPRESSO_PSEUDO=/usr/local/espresso-5.2.1/pseudo
export PATH=$PATH:/usr/local/lammps-30Jul16/src
export LAMMPS_POTENTIALS=/usr/local/lammps-30Jul16/potentials

 3-3. Gromacs

$ sudo apt install cmake g++

Download gromacs-5.0.7.tar.gz from

$ wget
$ tar xvfz gromacs-5.0.7.tar.gz
$ cd gromacs-5.0.7
$ mkdir build
$ cd build
$ make
$ sudo make install
$ cd ..
$ mkdir build_d
$ cd build_d
$ make
$ sudo make install

$ sudo vi /etc/profile.d/
source /usr/local/gromacs/bin/GMXRC

 3-4. AmberTools18[1]

Download AmberTools18.tar.bz2 from

$ sudo apt install csh gfortran python2.7 flex zlib1g-dev libbz2-dev

$ tar xvfj AmberTools18.tar.bz2
$ sudo mv amber18 /usr/local/
$ export AMBERHOME=/usr/local/amber18
$ sudo (echo y | ./configure -noX11 --skip-python gnu)
$ source
$ sudo make install

$ sudo vi /etc/profile.d/
source /usr/local/amber14/

 3-4. Acpype[2]

$ sudo apt install subversion python

$ svn checkout acpype -r 10101

Add option "-dr no" to antechamber.

$ vi acpype/
if not os.path.exists(self.acExe):
 self.printError("no 'antechamber' executable!")
 return None
self.tleapExe = _getoutput('which tleap') or ''
self.sleapExe = _getoutput('which sleap') or ''

if not os.path.exists(self.acExe):
 self.printError("no 'antechamber' executable!")
 return None
self.acExe += ' -dr no '
self.tleapExe = _getoutput('which tleap') or ''
self.sleapExe = _getoutput('which sleap') or ''

$ sudo mv acpype /usr/local

$ sudo vi /etc/profile.d/
export PATH=$PATH:/usr/local/acpype

 3-5. ERmod

$ sudo apt install libnetcdf-dev liblapack-dev python-numpy libfftw3-dev

Download ermod-0.3.4.tar.gz from

Compile as follows.

$ tar zxvf ermod-0.3.4.tar.gz
$ cd ermod-0.3.4/vmdplugins
$ make
$ cd ..
$ ./configure --prefix=/usr/local/ermod --disable-mpi --enable-openmp
$ make
$ sudo make install


$ sudo apt install libopenmpi-dev autoconf

Obtain MODYLAS_1.0.4.tar_1.gz from
Compile as follows.

$ tar -zxvf MODYLAS_1.0.4.tar_1.gz
$ cd MODYLAS_1.0.4/source
$ ./configure --with-kind-fortran-compiler=INTEL --prefix=/usr/local/MODYLAS_1.0.4
$ cd src

$ vi parse_f.f
on line 363
9000 format(‘ERROR:…’, i)

9000 format(‘ERROR:…’, i8)

$ make
$ sudo make install
$ sudo vi /etc/profile.d/
export PATH=$PATH:/usr/local/MODYLAS_1.0.4/bin

 3-7. NWChem

It is not included in cygwin_wm.
In general, please use Windows native installer.

Since information such as NWCHEM_LIBRARY_PATH remains in the binary, work with /tmp or so.

$ cd /tmp
$ wget -O Nwchem-6.6.revision27746-src.2015-10-20.tar.gz
$ tar xvfz Nwchem-6.6.revision27746-src.2015-10-20.tar.gz
$ cd nwchem-6.6

Download patch too
$ for f in Tddft_mxvec20 Tools_lib64 Config_libs66 Cosmo_meminit Sym_abelian Xccvs98 Dplot_tolrho Driver_smalleig Ga_argv Raman_displ Ga_defs Zgesvd Cosmo_dftprint Txs_gcc6 Gcc6_optfix Util_gnumakefile Util_getppn Gcc6_macs_optfix Notdir_fc Xatom_vdw Hfmke; do wget${f}.patch.gz; done
$ for f in *.patch.gz; do gunzip $f; done
$ for f in *.patch; do patch -p0 < $f; done

$ sudo apt install python-dev gfortran libopenblas-dev libopenmpi-dev openmpi-bin tcsh make

$ vi
export NWCHEM_TOP=/tmp/nwchem-6.6
export USE_MPI=y
export PYTHONHOME=/usr
export BLASOPT="-lopenblas -lpthread -lrt"
export BLAS_SIZE=4
export USE_64TO32=y

$ .
$ cd src

$ make nwchem_config NWCHEM_MODULES="all python"
$ make 64_to_32
$ make

$ sudo mkdir /usr/local/NWChem
$ sudo mkdir /usr/local/NWChem/bin
$ sudo mkdir /usr/local/NWChem/data

$ sudo cp $NWCHEM_TOP/bin/${NWCHEM_TARGET}/nwchem /usr/local/NWChem/bin
$ sudo chmod 755 /usr/local/NWChem/bin/nwchem

$ sudo cp -r $NWCHEM_TOP/src/basis/libraries /usr/local/NWChem/data
$ sudo cp -r $NWCHEM_TOP/src/data /usr/local/NWChem
$ sudo cp -r $NWCHEM_TOP/src/nwpw/libraryps /usr/local/NWChem/data

$ sudo vi /usr/local/NWChem/data/default.nwchemrc
nwchem_basis_library /usr/local/NWChem/data/libraries/
nwchem_nwpw_library /usr/local/NWChem/data/libraryps/
ffield amber
amber_1 /usr/local/NWChem/data/amber_s/
amber_2 /usr/local/NWChem/data/amber_q/
amber_3 /usr/local/NWChem/data/amber_x/
amber_4 /usr/local/NWChem/data/amber_u/
spce /usr/local/NWChem/data/solvents/spce.rst
charmm_s /usr/local/NWChem/data/charmm_s/
charmm_x /usr/local/NWChem/data/charmm_x/

$ ln -s /usr/local/NWChem/data/default.nwchemrc $HOME/.nwchemrc

$ sudo vi /etc/profile.d/
export PATH=$PATH:/usr/local/NWChem/bin
export NWCHEM_BASIS_LIBRARY=/usr/local/NWChem/data/libraries/

 3-8. LAMMPS

Go to by web browser and download lammps-30Jul16.tar.gz.

$ tar xvfz lammps-30Jul16.tar.gz
$ cd lammps-30Jul16/src
$ make yes-misc
$ make yes-rigid
$ make yes-user-reaxc
$ make serial
$ make mpi
$ cd ../..
$ sudo mv lammps-30Jul16 /usr/local/

$ sudo vi /etc/profile.d/
export PATH=$PATH:/usr/local/lammps-30Jul16/src
export LAMMPS_POTENTIALS=/usr/local/lammps-30Jul16/potentials

 3-9. BoltzTraP

Go to by web browser and download BoltzTraP.tar.bz2(v1.2.5).

$ tar xvfj BoltzTraP.tar.bz2
$ cd boltztrap-1.2.5/src/
$ vi x_trans
set log = :log

set log = log
$ rm BoltzTraP
$ make
$ cd ../..
$ mv boltztrap-1.2.5/ /usr/local/

$ sudo vi /etc/profile.d/
export PATH=$PATH:/usr/local/boltztrap-1.2.5/src
export PATH=$PATH:/usr/local/boltztrap-1.2.5/util

$ sudo vi /etc/ImageMagick-6/policy.xml
<policy domain="coder" rights="none" pattern="PS" />

<policy domain="coder" rights="read|write" pattern="PS" />

 3-10. Other packages

$ sudo apt-get install openbabel grace imagemagick gnuplot bc dos2unix

This completes the installation and configuration.

 4. Citation

1. Antechamber
J. Wang, W. Wang, P.A. Kollman and D.A. Case. "Automatic atom type and bond type perception in molecular mechanical calculations".
Journal of Molecular Graphics and Modelling, 25, 247-260 (2006).
J. Wang, R.M. Wolf, J.W. Caldwell, P.A. Kollman and D.A. Case. "Development and testing of a general AMBER force field".
Journal of Computational Chemistry, 25, 1157-1174 (2004).

2. SOUSA DA SILVA, A. W. & VRANKEN, W. F. ACPYPE - AnteChamber PYthon Parser interfacE.
BMC Research Notes 2012, 5:367 doi:10.1186/1756-0500-5-367

Copyright 2008-2019 X-Ability Co., Ltd. All Rights Reserved.