MD-SAPT simplifies the calculation of SAPT interaction energies between selected residue pairs in MD trajectories. Running it just requires MD simulation files.
Ensure that you have the following things set up:
- You have existing MD trajectory and topology files in any form that MDAnalysis <https://mdanalysis.readthedocs.io/en/latest/ supports
- You have already installed MDSAPT, following the :installation guide:install
The following steps describe how to set up the input YAML file.
- 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.
- Specify the MD file locations in the input file
- Specify the residue numbers you wish to analyze
- Specify the pairs of residues from the numbers in step 3
- Specify trajectory, optimization, and SAPT settings
Here is an example of a filled-out YAML file:
topology: testtop.psf
trajectories:
- testtraj.dcd
pairs:
# Place pair of selections defined above in a list of lists
- [109, 196]
- [197, 199]
- [208, 200]
- [156, 44]
- [84, 13]
frames:
start: 78
stop: 97
step: 1
output: "output.csv"
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.
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.