Run and install

MLatom calculations can be either run on the MLatom@XACS cloud computing without any installation or MLatom’s code and binary can be downloaded and installed locally, both options are free.

Python wrapper and precompiled binary of MLatom for Linux are distributed free of charge for non-commercial and non-profit uses, such as academic research and education. By downloading and using MLatom you accept the terms and conditions of the License Agreement. Please also see this website’s Privacy Statement and Contact and Legal Notice. You must properly cite MLatom and the corresponding literature for the underlying methodology used by this program package in your publications arising from using MLatom as described in How to cite MLatom? See Support for further information on how to receive updates (you can also subscribe via email on the right of this page) and get help.

Run

Run on the cloud

XACS cloud computing page embedded below works on some browsers. Click here to go directly to the XACS webpage shown below.

Run locally

After installation (see below), MLatom can be used by either running command with command line options:

mlatom [options]

or by providing an input file:

MLatom can be run by providing it with the input file. Example:

mlatom [input file]

Install

Install via pip

python3 -m pip install -U MLatom

To download a specific version of MLatom, e.g., 2.0.3:
python3 -m pip install MLatom==2.0.3

Install from a zipped package

Alternatively, you can download a zipped package with MLatomPy (requires Python 3.7+) and a statically compiled binary of MLatomF and cs.so for Linux systems. These files can be unpacked in any directory and used directly without any modifications to the environment variables etc. You may need to make files executable by using command line option chmod +x MLatom.py MLatomF cs.so.

You can also add your MLatom path into the $PATH variable with the command (in bash):

export PATH=$PATH:/path/to/MLatom

It is convenient to add this line to .bashrc file.

Installation instructions for enabling interfaced third-party programs, see below.

To run MLatom provide a path to MLatom.py and the necessary command-line options (see in the next section), i.e. in your terminal type:

$pathToMLatom/MLatom.py [command-line options or the name of an input file with options]

It is recommended to set alias mlatom to $pathToMLatom/MLatom.py.

Installation of third-party packages

MLatom provides interfaces to many third-party software packages, but they are (usually) not provided with MLatom. The third-party packages below are optional and can be installed separately to enable specific features. MLatom does require some common Python libraries, like Numpy and PyTorch.

Newton-X

Newton-X is required for ML-NEA calculations.

  1. Install Newton-X (NX, preferably version==2.2 for which our implementations were tested)
  2. use export NX=/path/to/Newton-X to define the $NX

TorchANI

TorchANI is required for calculations with AIQM1 and ANI family of potentials.

1. install Numpy and nightly version of PyTorch (if you do not have them already):

pip install numpy tensorboard
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu100/torch_nightly.html

2. install TorchANI:

pip install torchani

Visit https://aiqm.github.io/torchani/ for more info. The latest version of TorchANI used for testing was v2.2, you can install this version by pip install torchani==2.2 if there are any problems when running with the newest version of TorchANI. The CUDA extension for AEV calculation is not supported for the NN part of AIQM1 and ANI-1ccx now.

DeePMD-kit

Required for DPMD and DeepPot-SE potentials.

1. download installer for DeePMD-kit from GitHub https://github.com/deepmodeling/deepmd-kit/releases (tested v1.2.2)

2. run installer

3. add environmetal variable $DeePMDkit that point to the where dp binary is located (bin/ in your installation directory)

e.g. export DeePMDkit=/export/home/fcge/deepmd-kit-1.2/bin

GAP and QUIP

Required for GAP-SOAP potentials.

1. compile QUIP and GAP from source

1.1 install prerequisites

sudo apt-get install gcc gfortran python python-pip libblas-dev liblapack-dev (for system uses apt, do equivalent for your OS)
pip install numpy ase f90wrap

1.2 get source code of QUIP and GAP

git clone --recursive https://github.com/libAtoms/QUIP.git

Get source code of GAP from http://www.libatoms.org/gap/gap_download.html (form-filling required).
Then put source code in QUIP/src/.

1.3 compile

cd QUIP
export QUIP_ARCH=linux_x86_64_gfortran_openmp # enable multi-threading, use 'export QUIP_ARCH=linux_x86_64_gfortran' if no OpenMP thus no MT capability
export QUIPPY_INSTALL_OPTS=--user # omit for a system-wide installation
make config 

Enter Y for gap or edit build/linux_x86_64_gfortran/Makefile.inc  with HAVE_GAP=1, then:
make

Built binaries are in QUIP/build/linux_x86_64_gfortran/quip and QUIP/build/linux_x86_64_gfortran/gap_fit.

2. add environmetal variable $quip and $gap_fit for quip and gap_fit

e.g. export quip='/export/home/fcge/GAP-SOAP/QUIP/build/linux_x86_64_gfortran_openmp/quip'
export gap_fit='/export/home/fcge/GAP-SOAP/QUIP/build/linux_x86_64_gfortran_openmp/gap_fit'

visit https://libatoms.github.io/GAP/index.html for more info.

PhysNet

Required for PhysNet models.

1. clone form PhysNet‘s GitHub page

git clone https://github.com/MMunibas/PhysNet.git

2. install TensorFlow:

pip install tensorflow

3. if you useTensorFlow v2, you need to execute the command below in PhysNet’s directory to make the scripts compatible with TFv2.

for i in `find . -name '*.py'`; do sed -i -e 's/import tensorflow as tf/import tensorflow.compat.v1 as tf\ntf.disable_v2_behavior()/g' -e 's/import tensorflow as tf/import tensorflow.compat.v1 as tf\ntf.disable_v2_behavior()/g' $i; done

4. add environmetal variable $PhysNet to the directory

e.g. export PhysNet=/export/home/fcge/PhysNet/

sGDML

Required for GDML and sGDML potentials.

1. install sGDML

pip install sgdml==0.4.4

2. add the path of sGDML binary to environmetal variable $sGDML

e.g. export sGDML=/export/home/fcge/.linuxbrew/bin/sgdml

Visit http://quantum-machine.org/gdml/doc/ for more info

Note, in our tests we found that installation is more stable with:

pip install scipy==1.7.1

MNDO

MNDO program is required to provide the ODM2* part of AIQM1. Alternatively, a (development) version of SCINE Sparrow can be used in the future (see a paper on Sparrow; note that the development version of Sparrow also implements single-point AIQM1 calculations).

The free binary and open-source code of the MNDO program is available from the official distributors of the MNDO code as described at https://mndo.kofo.mpg.de.

After the MNDO program is installed, you need to set the environmental variable pointing to the MNDO executable (typically mndo99), e.g., in bash:

export mndobin=[path to the executable]/mndo99

dftd4

dftd4 program is required to provide the D4 part of AIQM1.

The dftd4 program can be obtained as both executable and open-source code. We recommend using dftd4 v3.5.0 (dftd4 v2.5.0 for the MLatom versions earlier than 3.0.1), which can calculate Hessian needed for thermochemical calculations. To install the dftd4 program from source code, please see the README.md file on dftd4 GitHub page for more details.

After the dftd4 program is installed, you need to set the environmental variable pointing to the dftd4executable, e.g., in bash:

export dftd4bin=[path to the executable]/dftd4

Gaussian

Required for geometry optimizations, freq, TS search, IRC, thermochemistry, and ML-NEA. For some of these tasks, alternatively, ASE can be used, see below.

Our implementation work with both Gaussian 09 and Gaussian 16. It is a commercial program, which can be obtained and installed separately.

To use Gaussian interface, make sure that your environmental variable GAUSS_EXEDIR points to the right place.

ASE

Required for geometry optimizations, freq, and thermochemistry. Alternatively, Gaussian can be used, see above.

The ASE (Atomic Simulation Environment) are Python modules, which can be installed as described on ASE website, i.e.:

pip install ase

hyperopt

To enable hyperopt, please run pip install hyperopt to install the hyperopt package.