From fcca55291c89539ddf1692ed36edbfe7524ee8df Mon Sep 17 00:00:00 2001 From: Alia Lescoulie Date: Mon, 10 Jun 2024 23:42:41 -0700 Subject: [PATCH 1/6] add more detailed descriptions to input file fields --- mdsapt/data/docking_template.yaml | 51 ++++++++++++++++++++-------- mdsapt/data/trajectory_template.yaml | 41 +++++++++++----------- 2 files changed, 57 insertions(+), 35 deletions(-) diff --git a/mdsapt/data/docking_template.yaml b/mdsapt/data/docking_template.yaml index c3dce05..6d93679 100644 --- a/mdsapt/data/docking_template.yaml +++ b/mdsapt/data/docking_template.yaml @@ -1,18 +1,39 @@ -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 settings: reference: 'rhf' - save_psi4_output: true \ No newline at end of file + +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: + diff --git a/mdsapt/data/trajectory_template.yaml b/mdsapt/data/trajectory_template.yaml index ddc1889..6d9a3d7 100644 --- a/mdsapt/data/trajectory_template.yaml +++ b/mdsapt/data/trajectory_template.yaml @@ -1,18 +1,29 @@ 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 settings: 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' @@ -25,29 +36,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' From 08e682a46d5fca9bcba49a967e2f95e610f877d8 Mon Sep 17 00:00:00 2001 From: Alia Lescoulie Date: Tue, 11 Jun 2024 11:40:42 -0700 Subject: [PATCH 2/6] add more psi4 reference infomation --- mdsapt/data/docking_template.yaml | 3 +++ mdsapt/data/trajectory_template.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/mdsapt/data/docking_template.yaml b/mdsapt/data/docking_template.yaml index 6d93679..81de1c9 100644 --- a/mdsapt/data/docking_template.yaml +++ b/mdsapt/data/docking_template.yaml @@ -7,7 +7,10 @@ psi4: 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: diff --git a/mdsapt/data/trajectory_template.yaml b/mdsapt/data/trajectory_template.yaml index 6d9a3d7..fd85792 100644 --- a/mdsapt/data/trajectory_template.yaml +++ b/mdsapt/data/trajectory_template.yaml @@ -7,7 +7,10 @@ psi4: 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: From 1b77806faf525f359b6e4ca41de181b8bdf384ec Mon Sep 17 00:00:00 2001 From: Alia Lescoulie Date: Thu, 13 Jun 2024 02:15:08 -0700 Subject: [PATCH 3/6] update docs version and update toctree names --- docs/api.rst | 5 ----- docs/conf.py | 13 +++++++------ docs/getting_started.rst | 4 ---- docs/index.rst | 9 ++++----- docs/viewer.rst | 1 - 5 files changed, 11 insertions(+), 21 deletions(-) delete mode 100644 docs/api.rst delete mode 100644 docs/getting_started.rst delete mode 100644 docs/viewer.rst diff --git a/docs/api.rst b/docs/api.rst deleted file mode 100644 index 0ac86e5..0000000 --- a/docs/api.rst +++ /dev/null @@ -1,5 +0,0 @@ -API Documentation -================= - -.. autosummary:: - :toctree: autosummary diff --git a/docs/conf.py b/docs/conf.py index d6b0bca..ba07d95 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 --------------------------------------------------- @@ -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. diff --git a/docs/getting_started.rst b/docs/getting_started.rst deleted file mode 100644 index eaf02a8..0000000 --- a/docs/getting_started.rst +++ /dev/null @@ -1,4 +0,0 @@ -Getting Started -=============== - -This page details how to get started with MDSAPT. diff --git a/docs/index.rst b/docs/index.rst index 9ddb991..04ec588 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,13 +14,12 @@ For the poster we presented at ACS Spring 2022, `click here <./_static/mdsapt_po .. toctree:: - :maxdepth: 4 - :numbered: + :maxdepth: 6 :hidden: install quick + config sapt - optimizer - reader - viewer + repair + diff --git a/docs/viewer.rst b/docs/viewer.rst deleted file mode 100644 index d62cc6e..0000000 --- a/docs/viewer.rst +++ /dev/null @@ -1 +0,0 @@ -.. automodule:: mdsapt.viewer \ No newline at end of file From 91bd0cb6ed868978da58e65012c76dde38ca7f00 Mon Sep 17 00:00:00 2001 From: Alia Lescoulie Date: Thu, 13 Jun 2024 02:25:37 -0700 Subject: [PATCH 4/6] fix strange toctree in docs --- docs/index.rst | 4 ++-- docs/install.rst | 3 ++- docs/quick.rst | 2 ++ docs/repair.rst | 2 ++ docs/sapt.rst | 2 +- mdsapt/config.py | 9 +++++++++ mdsapt/repair.py | 2 +- mdsapt/sapt.py | 2 +- 8 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 docs/repair.rst diff --git a/docs/index.rst b/docs/index.rst index 04ec588..57ff5da 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,5 @@ MD-SAPT Documentation -========================================================= +===================== **MD-SAPT** is a Python package and `MDAnalysis `_ Kit for preforming Symmetry Adapted Perturbation Theory (SAPT) calculations on molecular dynamics (MD) simulation @@ -14,7 +14,7 @@ For the poster we presented at ACS Spring 2022, `click here <./_static/mdsapt_po .. toctree:: - :maxdepth: 6 + :maxdepth: 2 :hidden: install diff --git a/docs/install.rst b/docs/install.rst index b26ec42..ec72504 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -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 diff --git a/docs/quick.rst b/docs/quick.rst index f5ce313..f6e0471 100644 --- a/docs/quick.rst +++ b/docs/quick.rst @@ -32,6 +32,7 @@ The following steps describe how to set up the input YAML file. Here is an example of a filled-out YAML file: .. code-block:: yaml + psi4: method: "sapt0" basis: "jun-cc-pvdz" @@ -81,6 +82,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. diff --git a/docs/repair.rst b/docs/repair.rst new file mode 100644 index 0000000..1e21608 --- /dev/null +++ b/docs/repair.rst @@ -0,0 +1,2 @@ +.. automodule:: mdsapt.repair + diff --git a/docs/sapt.rst b/docs/sapt.rst index 9d49791..4c8e81b 100644 --- a/docs/sapt.rst +++ b/docs/sapt.rst @@ -1 +1 @@ -.. automodule:: mdsapt.sapt \ No newline at end of file +.. automodule:: mdsapt.sapt diff --git a/mdsapt/config.py b/mdsapt/config.py index 08d7542..ea6acfa 100644 --- a/mdsapt/config.py +++ b/mdsapt/config.py @@ -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. diff --git a/mdsapt/repair.py b/mdsapt/repair.py index f8a834a..be7fa7e 100644 --- a/mdsapt/repair.py +++ b/mdsapt/repair.py @@ -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 diff --git a/mdsapt/sapt.py b/mdsapt/sapt.py index f0678fb..39b220e 100644 --- a/mdsapt/sapt.py +++ b/mdsapt/sapt.py @@ -5,7 +5,7 @@ Sets up and runs `SAPT `_ calculations between the residues selected in the input file. -.. autofunction:: build_psi4_imput_str +.. autofunction:: build_psi4_input_str .. autofunction:: calc_sapt From 9e0663e3217411eb5f59fc9945ed27f7645aab4a Mon Sep 17 00:00:00 2001 From: Alia Lescoulie Date: Thu, 13 Jun 2024 02:49:21 -0700 Subject: [PATCH 5/6] add install info to readme --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e290dfb..4892732 100644 --- a/README.md +++ b/README.md @@ -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. From 151b1d833811e500f5689babf44a4eae32e4d837 Mon Sep 17 00:00:00 2001 From: Alia Lescoulie Date: Thu, 13 Jun 2024 02:49:57 -0700 Subject: [PATCH 6/6] add install info to docs --- docs/install.rst | 2 +- docs/quick.rst | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/install.rst b/docs/install.rst index ec72504..bc977dd 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -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 diff --git a/docs/quick.rst b/docs/quick.rst index f6e0471..c73b425 100644 --- a/docs/quick.rst +++ b/docs/quick.rst @@ -27,7 +27,8 @@ 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 `_, `basis set `_ , and Psi4 settings (see `psi4 documentation `_ for more information) + Here is an example of a filled-out YAML file: @@ -39,13 +40,16 @@ Here is an example of a filled-out YAML file: 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"