1.1 Installation of GENESIS for Tutorials

Preparation of the directory

First of all, let’s create a directory for the GENESIS tutorials under the home directory by executing the following commands. We create a main directory “GENESIS_Tutorials-2019“, followed by three sub-directories “Programs“, “Data“, and “Works“. “Programs” is where we will put the main software used in this project, i.e. the GENESIS program. “Data” is where we will put important data that will be commonly used throughout this project, such as PDB files and force field parameter files. Thus, we would like to make two sub-directories “PDB” and “Parameters” under “Data” beforehand.Works” is where we will run the MD simulation of the tutorial (see Tutorial 3 and later). Here, we also make a “TRASH” directory under “Works“. The role of TRASH will be explained later.

# Move to the home directory 
$ cd
$ pwd

# Create a directory for this project
$ mkdir GENESIS_Tutorials-2019
$ cd GENESIS_Tutorials-2019

# Create main directories
$ mkdir Programs Data Works
$ ls
Data  Programs  Works

# Create sub-directories
$ mkdir Data/PDB
$ mkdir Data/Parameters
$ mkdir Works/TRASH

Download GENESIS

In this tutorial, we will use GENESIS version 1.7.1. We put the GENESIS source code in Programs. Note that the tilde (~) in the 2nd command stands for the “home directory”.

# Put the source code of GENESIS in the "Programs" directory 
$ cd Programs
$ mv ~/Downloads/genesis-1.7.1.tar.bz2 ./ 
$ bzip2 -d genesis-1.7.1.tar.bz2 
$ tar -xvf genesis-1.7.1.tar 
$ cd genesis-1.7.1
$ ls
AUTHORS         INSTALL      README      configure.ac  missing
COPYING         Makefile.am  aclocal.m4  depcomp       src
COPYING.LESSER  Makefile.in  compile     fortdep.py
ChangeLog       NEWS         configure   install-sh


Let’s run the configure command. This “configure” is a script that checks your computing environment, and automatically create a “Makefile” that includes suitable compile options. If you have some troubles, please check the GENESIS user manual or Installation page. Next, run the “make install” command, which will create a “bin” directory in the same directory and install the program there. You can find many programs in the bin directory. Here, atdyn and spdyn are the MD simulation programs, and the others are mostly trajectory analysis tools. In Tutorial 3 and later, we will run each of these programs.

# Install GENESIS
$ ./configure
$ ls
AUTHORS         Makefile     aclocal.m4     configure.ac  src
COPYING         Makefile.am  compile        depcomp
COPYING.LESSER  Makefile.in  config.log     fortdep.py
ChangeLog       NEWS         config.status  install-sh
INSTALL         README       configure      missing

$ make install
$ ls
AUTHORS         Makefile     aclocal.m4     configure     missing
COPYING         Makefile.am  bin            configure.ac  src
COPYING.LESSER  Makefile.in  compile        depcomp
ChangeLog       NEWS         config.log     fortdep.py
INSTALL         README       config.status  install-sh

# Check the contents
$ ls ./bin
atdyn               hb_analysis          qval_analysis
avecrd_analysis     hbond_analysis       qval_residcg_analysis
cg_convert          kmeans_clustering    rdf_analysis
comcrd_analysis     lipidthick_analysis  remd_convert
contact_analysis    mbar_analysis        rg_analysis
crd_convert         meanforce_analysis   ring_analysis
density_analysis    morph_generator      rmsd_analysis
diffusion_analysis  msd_analysis         rpath_generator
distmat_analysis    pathcv_analysis      rst_convert
drms_analysis       pcavec_drawer        rst_upgrade
dssp_interface      pcrd_convert         sasa_analysis
eigmat_analysis     pmf_analysis         spdyn
emmap_generator     prjcrd_analysis      tilt_analysis
flccrd_analysis     prst_setup           trj_analysis
fret_analysis       qmmm_generator       wham_analysis

Here, we did not add any options to the configure command. This simple command will install GENESIS running on a CPU. In fact, most tutorials are designed to use the CPU version. If you want to run the tutorials using CPU+GPU, please add the option for GPU. Note, however, that in this case only spdyn will be installed, and some tutorials cannot be run with spdyn alone.

Let’s clean up the directory

Now, let’s do a short exercise in organizing the files and directories. Please take a look inside the Programs directory. We have genesis-1.7.1.tar and genesis-1.7.1. In fact, we don’t need the genesis-1.7.1.tar anymore, and we can delete it with the rm command. However, instead of deleting the file, we would like to make a “Source” directory, compress the tar file, and keep it there. This is because we can quickly reinstall the program without downloading it again, and also we may install other software in the Programs directory later.

# Find unnecessary files
$ cd ../
$ ls
genesis-1.7.1  genesis-1.7.1.tar

# Clean up the directory
$ mkdir Source
$ gzip genesis-1.7.1.tar
$ mv genesis-1.7.1.tar.gz Source
$ ls
Source  genesis-1.7.1

Now, we have constructed the following directory structure for this project.

       + GENESIS_Tutorials-2019  # Project name
            + Programs           # Main software for this project
            |  + Source
            |  + genesis-1.7.1
            |     + src          # Source code of GENESIS 1.7.1
            |     + bin          # Binary code of GENESIS 1.7.1
            + Data               # Common important data in this project
            |  + PDB
            |  + Parameters
            + Works              # All simulations will be done here
               + TRASH

Many people may want to install programs in a common directory, such as /usr/local/bin. However, this can make it difficult to know However, this can make it difficult to know where the original source code is. To avoid such situation, we would like to install the core programs locally, i.e., under the project’s directory “GENESIS_Tutorials-2019“.

As demonstrated above, in our tutorial we will also show you some techniques for cleaning up directories. In computational research, many files and directories are generated or created. If you do not carefully organize the directory structure in your research, the files and directories can become cluttered or messy, causing mistakes or affecting the research efficiency, report writing, publication, and data management. We hope that our tutorial will also inspire you to get into a good habit of cleaning up directories.

Written by Takaharu Mori@RIKEN Theoretical molecular science laboratory Dec. 16, 2021