Setup

MLatom is a software platform that enables AI-enhanced computational chemistry in a user-friendly manner as it was written by computational chemists for computational chemists. MLatom allows to perform a wide range of simulation tasks with a variety of machine learning and quantum mechanical models and their combinations, through simple and intuitive input files, command line options, and Python API. The platform can be used both as a ready-to-use tool for common computational chemistry simulations and as a Python library for developing custom workflows. More information about MLatom and its developers is on MLatom.com.

Here we demonstrate the installation and use of MLatom, including training and using models, estimating models, molecular dynamics simulation, and spectral simulations.

First, download the zip package with the tutorial files:

wget http://mlatom.com/wp-content/uploads/2023/12/2023_workshop_Torun.zip -O 2023_workshop_Torun.zip
unzip 2023_workshop_Torun.zip

On Google colab (click here to access the notebook):

!wget http://mlatom.com/wp-content/uploads/2023/12/2023_workshop_Torun.zip -O 2023_workshop_Torun.zip
!unzip 2023_workshop_Torun.zip

If you use XACS cloud, you do not need to setup anything else.

Otherwise, before use, you need to prepare necessary files:

pip install ase
pip install torchani
pip install pyscf

On Google colab:

!pip install ase
!pip install torchani
!pip install pyscf

Note

You can try “Edit” > “Clear all outputs” after it’s been done.

Run this tutorial on XACS cloud

You can also run this tutorial on XACS cloud (https://xacs.xmu.edu.cn/newcloud/), where some extra programs are already install to enable features like AIQM1 method.

Necessary files can be found in /export/home/xacscloud/workshop2023/2023_workshop_Torun/ once you enter the terminal on XACS cloud.

You can copy the folder to your directory:

cp -r /export/home/xacscloud/workshop2023/2023_workshop_Torun/ .

Then set up the environment:

cd 2023_workshop_Torun && . env.sh

You can submit command-line jobs with:

xacs submit xxx.inp

or

srun -c4 mlatom xxx.inp

Python jobs with:

srun -c4 xxx.py

or run Python interactively:

srun -c4 --pty python