Skip to content

Commit

Permalink
Merge pull request #49 from calpolyccg/docs-updates
Browse files Browse the repository at this point in the history
Docs updates
  • Loading branch information
ALescoulie authored Jun 13, 2024
2 parents 2d684e1 + 151b1d8 commit eb423d8
Show file tree
Hide file tree
Showing 15 changed files with 125 additions and 64 deletions.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,36 @@ SAPT Calculations for MDAnalysis

An MDAnalysis-kit for calculating SAPT of molecular dynamics trajectories in psi4. [Click here for a demo!](https://mybinder.org/v2/gh/calpolyccg/MDSAPT_demo/master?labpath=MD-SAPT_demo.ipynb)

### Installation

Installing with Conda on Python version 3.9 to 3.11 using the command:

``` bash
conda install -c conda-forge mdsapt
```

MD-SAPT can also be installed from source:

``` bash
git clone https://github.com/calpolyccg/MDSAPT.git
pip install ./MDSAPT
```

A development environment can also be created using nix:

``` bash
git clone https://github.com/calpolyccg/MDSAPT.git

cd MDSAPT

nix develop
```

### Copyright

Copyright (c) 2021-2024, Alia Lescoulie

#### Acknowledgements
#### Acknowledgments

This work was supported by the Bill and Linda Frost Fund at Cal Poly San Luis Obispo.

Expand Down
5 changes: 0 additions & 5 deletions docs/api.rst

This file was deleted.

13 changes: 7 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
# -- Project information -----------------------------------------------------

project = 'MD-SAPT'
copyright = ("2021, Alia Lescoulie, Astrid Yu, and Ashley Ringer McDonald. Cal Poly Computational Chemistry Group. Project structure based on the "
copyright = ("2021-2024, Alia Lescoulie, Astrid Yu, and Ashley Ringer McDonald. Cal Poly Computational Chemistry Group. Project structure based on the "
"Computational Molecular Science Python Cookiecutter version 1.6")
author = 'Alia Lescoulie'

# The short X.Y version
version = '1.1'
# The full version, including alpha/beta/rc tags
release = '1.1.0'

# The version under title on sidebar
version = "2.0"

# The full version, including alpha/beta/rc tags
release = "2.0.4"

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -71,7 +72,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
4 changes: 0 additions & 4 deletions docs/getting_started.rst

This file was deleted.

11 changes: 5 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MD-SAPT Documentation
=========================================================
=====================

**MD-SAPT** is a Python package and `MDAnalysis <https://www.mdanalysis.org>`_ Kit for preforming
Symmetry Adapted Perturbation Theory (SAPT) calculations on molecular dynamics (MD) simulation
Expand All @@ -14,13 +14,12 @@ For the poster we presented at ACS Spring 2022, `click here <./_static/mdsapt_po


.. toctree::
:maxdepth: 4
:numbered:
:maxdepth: 2
:hidden:

install
quick
config
sapt
optimizer
reader
viewer
repair

5 changes: 3 additions & 2 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Installation
============

MD-SAPT can be installed from the psi4 Conda repo like so:
MD-SAPT can be installed using Conda with the following:

.. code-block:: bash
Expand All @@ -16,7 +16,8 @@ Alternatively, it can be installed by cloning the GitHub repository.
To ensure it's been installed correctly, run `mdsapt` or `python3 -m mdsapt`.

.. code-block::
.. code-block:: bash
Warning: importing 'simtk.openmm' is deprecated. Import 'openmm' instead.
2022-03-30 09:32:50,071 mdsapt INFO MDSAPT 1.2.0 starting
2022-03-30 09:32:50,071 mdsapt INFO Copyright (c) 2021 Alia Lescoulie, Astrid Yu, and Ashley Ringer McDonald
Expand Down
8 changes: 7 additions & 1 deletion docs/quick.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,29 @@ The following steps describe how to set up the input YAML file.

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

5. Specify trajectory, optimization, and SAPT settings
5. Specify trajectory, optimization, `SAPT method <https://psicode.org/psi4manual/master/sapt.html#sapt-level>`_, `basis set <https://psicode.org/psi4manual/master/basissets_byelement.html#apdx-basiselement>`_ , and Psi4 settings (see `psi4 documentation <https://psicode.org/psi4manual/master/index.html>`_ for more information)


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

.. code-block:: yaml
psi4:
method: "sapt0"
basis: "jun-cc-pvdz"
settings:
reference: "rhf"
save_output: true
simulation:
ph: 7.0
charge_guesser: "standard"
# charge_guesser: 'rdkit' # to use rdkit. Make sure it is installed first.
system_limits:
ncpus: 32
memory: "80GB"
analysis:
### This section is for running TrajectorySAPT. To run other types of analyses, see below.
type: "trajectory"
Expand Down Expand Up @@ -81,6 +86,7 @@ This mode is suited for:
With the input done MD-SAPT is ready to be run. Simply execute

.. code-block:: bash
mdsapt run [filename] [output]
and it will run SAPT on your trajectory using the parameters specified in your input file.
Expand Down
2 changes: 2 additions & 0 deletions docs/repair.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. automodule:: mdsapt.repair

2 changes: 1 addition & 1 deletion docs/sapt.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.. automodule:: mdsapt.sapt
.. automodule:: mdsapt.sapt
1 change: 0 additions & 1 deletion docs/viewer.rst

This file was deleted.

9 changes: 9 additions & 0 deletions mdsapt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
:mod:`mdsapt.config` -- Reads input file and saves configuration
================================================================
.. autoclass:: Config
:members:
:inherited-members:
.. autoclass:: DockingAnalysisConfig
:members:
:inherited-members:
"""

# There's lots of implicit class methods because pydantic decorators are stupid.
Expand Down
54 changes: 39 additions & 15 deletions mdsapt/data/docking_template.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
topology_directory: ''
selection_resid_num:
-
int_pairs:
# Place pair names defined above in list in a list
- []
system_settings:
ncpus:
memory:
time:
opt_settings:
pH: 7.0
sapt_settings:
method: 'sapt'
psi4:
# The sapt theory level eg: SAPT0, SAPT2, SAPT2+, SAPT2+3
# See https://psicode.org/psi4manual/master/sapt.html#sapt-level for more information
method: 'sapt0'
# Basis set for Psi4 SAPT calculation
# See https://psicode.org/psi4manual/master/basissets_byelement.html#apdx-basiselement for complete list
basis: 'jun-cc-pvdz'
# set to true to save Psi4 output files
save_output: true
# Additional Psi4 settings see https://psicode.org for more psi4 specific documentation
settings:
# The reference wave function type eg: RHF, ROHF, UHF, CUHF, RKS, UKS
# See https://psicode.org/psi4manual/master/autodir_options_c/scf__reference.html for more information
reference: 'rhf'
save_psi4_output: true

simulation:
ph: 7.0
# pH of simulated system, it informs how protons are replaced when ballencing spin state before Psi4 calculations
charge_guesser: 'standard'
# charge_guesser: 'rdkit' # to use rdkit. Make sure it is installed first.

system_limits:
# Integer number of cpu cores to use in Psi4 calculation
ncpus:
# Given memory form `"{number_of_gigabytes}GB"`
memory:

analysis:
type: 'docking'
# MD-SAPT analysis type (in this case docking)
topology_directory: 'mek/docking'
# The set of topology files for docking analysis
pairs:
# Place pair names defined above in list in a list
- [15, 132]

system_limits:
# Integer number of cpu cores to use in Psi4 calculation
ncpus:
# Given memory form `"{number_of_gigabytes}GB"`
memory:

44 changes: 24 additions & 20 deletions mdsapt/data/trajectory_template.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
psi4:
method: 'sapt'
# The sapt theory level eg: SAPT0, SAPT2, SAPT2+, SAPT2+3
# See https://psicode.org/psi4manual/master/sapt.html#sapt-level for more information
method: 'sapt0'
# Basis set for Psi4 SAPT calculation
# See https://psicode.org/psi4manual/master/basissets_byelement.html#apdx-basiselement for complete list
basis: 'jun-cc-pvdz'
# set to true to save Psi4 output files
save_output: true
# Additional Psi4 settings see https://psicode.org for more psi4 specific documentation
settings:
# The reference wave function type eg: RHF, ROHF, UHF, CUHF, RKS, UKS
# See https://psicode.org/psi4manual/master/autodir_options_c/scf__reference.html for more information
reference: 'rhf'

simulation:
ph: 7.0
# pH of simulated system, it informs how protons are replaced when ballencing spin state before Psi4 calculations
charge_guesser: 'standard'
# charge_guesser: 'rdkit' # to use rdkit. Make sure it is installed first.

system_limits:
# Integer number of cpu cores to use in Psi4 calculation
ncpus:
# Given memory form `"{number_of_gigabytes}GB"`
memory:

analysis:
### This section is for running TrajectorySAPT. To run other types of analyses, see below.
# This section is for running TrajectorySAPT. To run other types of analyses, see below.
type: 'trajectory'

topology: 'your/file/path.pdb'
Expand All @@ -25,29 +39,19 @@ analysis:
trajectories:
- 'your/trajectory/path.dcd'
pairs:
# List the pairs of residues to calculate interaction energy between based on residue ids in topology file
- [132, 152]
- [34, 152]
frames:
# Starting frame
start: 10

# Stop frame
stop: 30
#step: 2

# frames per calculation step
step: 1

# Name of outputed csv file
output: 'output.csv'

# ### For running DockingSAPT
# type: 'docking'
# mode: 'protein-ligand'
# topologies:
# - 'one/topology.pdb'
# - 'another/topology.pdb'
# - 'a/glob/of/topologies/*.pdb'
# - 'a/directory/full/of/topologies'
# - path: 'one/specific/topology/with/weird/charges.pdb'
# charge_overrides:
# 145: -4
#
# pairs:
# - [132, 152]
# - [34, 152]
#
# output: 'output.csv'
2 changes: 1 addition & 1 deletion mdsapt/repair.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r"""
:mod:`mdsapt.optimizer` -- Prepare residues for SAPT calculations
:mod:`mdsapt.repair` -- Prepare residues for SAPT calculations
=================================================================
Prepares residues for SAPT calculations by adding protons and replacing missing atoms
Expand Down
2 changes: 1 addition & 1 deletion mdsapt/sapt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Sets up and runs `SAPT <https://psicode.org/psi4manual/master/sapt.html>`_
calculations between the residues selected in the input file.
.. autofunction:: build_psi4_imput_str
.. autofunction:: build_psi4_input_str
.. autofunction:: calc_sapt
Expand Down

0 comments on commit eb423d8

Please sign in to comment.