Difference between revisions of "Installation instructions"

From AutoMeKin
Jump to navigation Jump to search
(Auto installer)
(Singularity container)
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Auto installer==
 
==Auto installer==
This is the easiest way to use AutoMeKin. The auto installer script installs singularity in your computer and downloads the container from sylabs. Note that this is done only the first time you use it. Then, the script will detect singularity and the image (that must be located in your <code>$HOME</code>) and will only launch the container.
+
This is the easiest way to use AutoMeKin. The auto installer script installs singularity in your computer and downloads the last release container image from sylabs (https://cloud.sylabs.io/library/emartineznunez) as <code>$HOME/automekin2020_<revision number>.sif</code>. Note that this is done only the first time you use it. Then, the script will detect singularity and the image (that must be located in your <code>$HOME</code>) and will only launch the container.
  
 
1) From your <code>$HOME</code> download AutoMeKin's auto installer script [[Media:automekin.sh| automekin.sh ]]<br />
 
1) From your <code>$HOME</code> download AutoMeKin's auto installer script [[Media:automekin.sh| automekin.sh ]]<br />
Line 12: Line 12:
 
<code>./automekin.sh</code>
 
<code>./automekin.sh</code>
  
Note that depending on your Linux configuration, before running the autoinstaller you might need to change some parameters which will require admin or root privilege. If that is the case and once you changed the parameters with your admin or root accounts, no further admin or root privilege will not be needed.
+
Note that depending on your Linux configuration, before running the autoinstaller you might need to change some parameters which will require admin or root privilege. If that is the case and once you changed the parameters with your admin or root accounts, no further admin or root privilege will be needed.
 
Return to your user account and run the auto installer again.
 
Return to your user account and run the auto installer again.
  
4) Once you finish the process, you will be inside the container. The container comes with all tools of AutoMeKin plus vim, gnuplot and molden which can be run from the container. AutoMeKin is installed in <code>$AMK</code>. Note that you can open new sessions and access AutoMeKin's output files from your Linux environment and use your own tools as well.
+
4) Once the above steps are completed, you will be inside the container. The container comes with all AutoMeKin's tools plus vim, gnuplot and molden which can be run from the container. AutoMeKin is installed in <code>$AMK</code>. Note that you can open new sessions and access AutoMeKin's output files from your Linux environment and use your own tools as well.
  
 
5) To exit the container just type:
 
5) To exit the container just type:
Line 23: Line 23:
 
==Singularity container==
 
==Singularity container==
  
If singularity is already installed in your computer, you can obtain the image running (from your $HOME):<br />
+
If singularity is already installed in your computer, you can obtain the container from sylabs. First check what the latest revision number is in: (https://cloud.sylabs.io/library/emartineznunez) and replace <code><revision number></code> below with its current value. Then, from your $HOME type:<br />
  
<code>singularity pull library://emartineznunez/default/automekin2020:872</code><br />
+
<code>singularity pull library://emartineznunez/default/automekin2020:<revision number></code><br />
  
 
The container is launched by just typing the name of the image you have just downloaded from sylabs:
 
The container is launched by just typing the name of the image you have just downloaded from sylabs:
  
<code>automekin2020_872.sif</code>
+
<code>automekin2020_<revision number>.sif</code>
  
 
which will allow you to run low-level scripts.
 
which will allow you to run low-level scripts.
  
Note, however, that if you want to use <code>g09</code> you must bind it the container and the container should be launched using this script:
+
Note, however, that if you want to use <code>g09</code> you must bind it the container, which should be launched using this script with the value of <code>revision number</code> as argument:
  
 
  <nowiki>
 
  <nowiki>
 +
revisionnumber=$1
 
if G09DIR=$(dirname $(which g09 2> /dev/null) 2> /dev/null)
 
if G09DIR=$(dirname $(which g09 2> /dev/null) 2> /dev/null)
 
then
 
then
 
   if [ -d $GAUSS_SCRDIR ]
 
   if [ -d $GAUSS_SCRDIR ]
 
   then
 
   then
       SINGULARITYENV_GAUSS_SCRDIR=/scratch SINGULARITYENV_PREPEND_PATH=/opt/g09 singularity run --bind $G09DIR:/opt/g09 --bind $GAUSS_SCRDIR:/scratch $HOME/automekin2020_872.sif
+
       SINGULARITYENV_GAUSS_SCRDIR=/scratch SINGULARITYENV_PREPEND_PATH=/opt/g09 singularity run --bind $G09DIR:/opt/g09 --bind $GAUSS_SCRDIR:/scratch $HOME/automekin2020_${revisionnumber}.sif
 
   else
 
   else
       SINGULARITYENV_PREPEND_PATH=/opt/g09 singularity run --bind $G09DIR:/opt/g09 $HOME/automekin2020_872.sif
+
       SINGULARITYENV_PREPEND_PATH=/opt/g09 singularity run --bind $G09DIR:/opt/g09 $HOME/automekin2020_${revisionnumber}.sif
 
   fi
 
   fi
 
else
 
else
 
   echo "Gaussian 09 not available, only low-level calculations available"
 
   echo "Gaussian 09 not available, only low-level calculations available"
   singularity run $HOME/automekin2020_872.sif
+
   singularity run $HOME/automekin2020_${revisionnumber}.sif
 
fi</nowiki>
 
fi</nowiki>
  
 
==Tarball==
 
==Tarball==
 +
 +
If you do not want to use singularity, you can install the code following the steps indicated in this section.<br />
  
 
Download the tarball from [[Media:amk-SOURCE-2020.tar.gz| here ]]<br />
 
Download the tarball from [[Media:amk-SOURCE-2020.tar.gz| here ]]<br />
Line 113: Line 116:
 
'''Installation'''
 
'''Installation'''
  
Once the above packages are installed, either:
+
Once the above packages are installed:
 
 
Go to AutoMeKin if you cloned it from github
 
 
 
<code>cd AutoMeKin</code>
 
  
or go to the amk-SOURCE-20XX folder, if you downloaded the tarball.
+
go to the amk-SOURCE-20XX folder.
  
 
<code>cd amk-SOURCE-20XX</code>
 
<code>cd amk-SOURCE-20XX</code>
  
In both cases, the process continues the same way. Now type:
+
Now type:
  
 
<code>./configure</code>
 
<code>./configure</code>
Line 147: Line 146:
 
==Running the test==
 
==Running the test==
  
To run the formic acid test example (explained in the [[Media:amk_tutorial.pdf| tutorial ]]) for a few trajectories follow these steps:
+
To run the tests follow these steps:
  
1) Load the module:
+
1) Load the module (only if you do not use singularity):
  
 
<code>module load amk/20XX</code>
 
<code>module load amk/20XX</code>
Line 161: Line 160:
 
<code>run_test.sh --prefix=path_to_program</code>
 
<code>run_test.sh --prefix=path_to_program</code>
  
otherwise. For instance, if you use Singularity, AutoMeKin is installed in $AMK and therefore you should use:<br/>
+
otherwise. For instance, if you use singularity, AutoMeKin is installed in <code>$AMK</code> and therefore you should use:<br/>
  
 
<code>run_test.sh --prefix=$AMK</code>
 
<code>run_test.sh --prefix=$AMK</code>

Revision as of 17:41, 10 February 2020

Auto installer

This is the easiest way to use AutoMeKin. The auto installer script installs singularity in your computer and downloads the last release container image from sylabs (https://cloud.sylabs.io/library/emartineznunez) as $HOME/automekin2020_<revision number>.sif. Note that this is done only the first time you use it. Then, the script will detect singularity and the image (that must be located in your $HOME) and will only launch the container.

1) From your $HOME download AutoMeKin's auto installer script automekin.sh

2) Make the script executable:

chmod +x automekin.sh

3) Run the script:

./automekin.sh

Note that depending on your Linux configuration, before running the autoinstaller you might need to change some parameters which will require admin or root privilege. If that is the case and once you changed the parameters with your admin or root accounts, no further admin or root privilege will be needed. Return to your user account and run the auto installer again.

4) Once the above steps are completed, you will be inside the container. The container comes with all AutoMeKin's tools plus vim, gnuplot and molden which can be run from the container. AutoMeKin is installed in $AMK. Note that you can open new sessions and access AutoMeKin's output files from your Linux environment and use your own tools as well.

5) To exit the container just type:

exit

Singularity container

If singularity is already installed in your computer, you can obtain the container from sylabs. First check what the latest revision number is in: (https://cloud.sylabs.io/library/emartineznunez) and replace <revision number> below with its current value. Then, from your $HOME type:

singularity pull library://emartineznunez/default/automekin2020:<revision number>

The container is launched by just typing the name of the image you have just downloaded from sylabs:

automekin2020_<revision number>.sif

which will allow you to run low-level scripts.

Note, however, that if you want to use g09 you must bind it the container, which should be launched using this script with the value of revision number as argument:

revisionnumber=$1
if G09DIR=$(dirname $(which g09 2> /dev/null) 2> /dev/null)
then
   if [ -d $GAUSS_SCRDIR ]
   then
      SINGULARITYENV_GAUSS_SCRDIR=/scratch SINGULARITYENV_PREPEND_PATH=/opt/g09 singularity run --bind $G09DIR:/opt/g09 --bind $GAUSS_SCRDIR:/scratch $HOME/automekin2020_${revisionnumber}.sif
   else
      SINGULARITYENV_PREPEND_PATH=/opt/g09 singularity run --bind $G09DIR:/opt/g09 $HOME/automekin2020_${revisionnumber}.sif
   fi
else
   echo "Gaussian 09 not available, only low-level calculations available"
   singularity run $HOME/automekin2020_${revisionnumber}.sif
fi

Tarball

If you do not want to use singularity, you can install the code following the steps indicated in this section.

Download the tarball from here

Untar and unzip the file:

tar xvfz Amk-SOURCE-20XX.tar.gz


Installing dependencies

Before installing amk for the first time, be aware that the following packages are needed:

- GNU Bash

- GNU bc

- environment-modules

- GNU Awk (gawk)

- GNU C Compiler (gcc)

- Gnuplot

- GNU Fortran Compiler (gfortran)

- GNU Parallel

- SQLite (version >= 3)

- Zenity

You can install the missing ones manually, or you can use the scripts located in amk-SOURCE-20XX and called install-required-packages-distro.sh (where distro=ubuntu-16.4lts, centos7 or sl7), which will do the work for you.The ubuntu-16.4lts script installs all dependencies, but for the RHEL derivatives (centos7 and sl7) you have to install parallel separately, and you have two choices:

a) install-gnu-parallel-from-source.sh. This script installs parallel latest version from source thanks to Ole Tange (the author). Also it can fallback to a user private installation into $HOME/bin if you have not administrator permisions to install it globally.

b) install-gnu-parallel-from-epel.sh. Enables the EPEL repository and installs parallel from it.

The program employs python3 and the following python3 libraries are needed (which can be easily installed with pip):

- ASE

- Matplotlib

- NetworkX

- NumPy

- SciPy

The program runs using two levels of theory: semiempirical (or Low-Level LL) and ab initio/DFT (or High-Level HL). So far, the only program interfaced with amk to perform the ab initio/DFT calculations is G09. Therefore, if you want to perform the HL calculations G09 should be installed and should run like in this example:

g09<inputfile>outputfile

These packages might also be useful to analyze the results:

- molden

- sqlitebrowser


Installation

Once the above packages are installed:

go to the amk-SOURCE-20XX folder.

cd amk-SOURCE-20XX

Now type:

./configure

This will install amk in $HOME/amk-20XX by default. If you want to install it in a different directory, type:

./configure --prefix=path_to_program

Finally, complete the installation:

make
make install
make clean

The last command (make clean) is only necessary if you want to remove from the src directory the object files and executables created in the compilation process.

For convenience, and once “Environment Modules” has been installed, you should add the following line to your .bashrc file:

module use path_to_program/modules

where path_to_program is the path where you installed amk (e.g., $HOME/amk-20XX).

Running the test

To run the tests follow these steps:

1) Load the module (only if you do not use singularity):

module load amk/20XX

2) Run the script if amk has been installed in $HOME:

run_test.sh

or

run_test.sh --prefix=path_to_program

otherwise. For instance, if you use singularity, AutoMeKin is installed in $AMK and therefore you should use:

run_test.sh --prefix=$AMK

The results of each test will be gathered in a different directory.

If you want to run a subset of tests use the following:

run_test.sh --tests=FA, FAthermo

which will run FA and FAthermo tests only. These are the tests available in this version: assoc, rdiels_alder, diels_alder, FA_biasH2, FA_biasH2O, FA_bxde, FA_singletraj, FA, FAthermo, FA_programopt and vdW.

The --prefix and --tests options can be used simultaneously.

Note that each each test takes from a few seconds to several minutes.

Older versions

Download the tarball for the 2018 version from here

And follow the instructions given above (tarball).

Github

AutoMekin is also on GitHub.
2018 version: Github2.png

2020 version: Github2.png


Return to AutoMeKin