2. Quickstart Guide

MD-SAPT simplifies the calculation of SAPT interaction energies between selected residue pairs in MD trajectories. Running it just requires MD simulation files.

2.1. Prerequisites

Ensure that you have the following things set up:

2.2. Generating an input file

The following steps describe how to set up the input YAML file.

  1. Run mdsapt generate [filename] to generate a blank Trajectory SAPT input file at the given filename. Don’t worry, it will not overwrite any files unless you explicitly provide the -f flag.

  2. Specify the MD file locations in the input file

  3. Specify the residue numbers you wish to analyze

  4. Specify the pairs of residues from the numbers in step 3

  5. Specify trajectory, optimization, and SAPT settings

Here is an example of a filled-out YAML file:

2.3. Running SAPT

2.3.1. Using the mdsapt CLI

This mode is suited for:

  • running on an HPC cluster

  • running a simple input file

With the input done MD-SAPT is ready to be run. Simply execute

and it will run SAPT on your trajectory using the parameters specified in your input file.

2.3.2. Using the mdsapt Python library

This mode is suited for:

  • using MD-SAPT in a notebook

  • using MD-SAPT in your own library or applications

The classes involved are as follows:

  • The settings are read using mdsapt.reader.InputReader

  • The InputReader is then passed into mdsapt.reader.Optimizer which handles preparing residues.

  • Finally, mdsapt.reader.TrajectorySAPT is used to run SAPT over the MD data.

  • The results are stored in a Pandas.DataFrame which can be accessed under the TrajectorySAPT.results property.

Here is some code demonstrating it:

import mdsapt


config = mdsapt.load_from_yaml_file('runinput.yaml')
sapt_run = mdsapt.TrajectorySAPT(config)
sapt_run.run(config.start, config.stop, config.step)
sapt_run.results.to_csv('results.csv')

See also the Binder demo for a bigger example.