From f3d51e2bfede9c7a76c50293833fecd5f5fc85f7 Mon Sep 17 00:00:00 2001 From: MarieTJ Date: Thu, 6 Aug 2026 16:26:02 +0100 Subject: [PATCH] feat: add conda installation --- .github/workflows/pre-commit.yml | 16 +++++ .gitignore | 4 ++ .pre-commit-config.yaml | 28 ++++++++ README.md | 112 ++++++++++++++++++------------- conda-environment-bespokefit.yml | 8 +++ conda-environment-mm-decomp.yml | 13 ++++ conda-environment-qm-scans.yml | 23 +++++++ 7 files changed, 156 insertions(+), 48 deletions(-) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 conda-environment-bespokefit.yml create mode 100644 conda-environment-mm-decomp.yml create mode 100644 conda-environment-qm-scans.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..f135648 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,16 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + - uses: pre-commit/action@v3.0.1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b63d8e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.venv/ +__pycache__/ +*.pyc +.DS_Store diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..5abb092 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,28 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + exclude: >- + (?x)^( + force_field_library/.*| + molecular_dynamics/.*| + parameterisation_scripts/.*\.(mol2|frcmod|pdb|csv) + )$ + - id: end-of-file-fixer + exclude: >- + (?x)^( + force_field_library/.*| + molecular_dynamics/.*| + parameterisation_scripts/.*\.(mol2|frcmod|pdb|csv) + )$ + - id: check-yaml + - id: check-merge-conflict + - id: check-added-large-files + args: ["--maxkb=5000"] + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.14.4 + hooks: + - id: ruff + args: ["--select=E9,F", "--fix"] diff --git a/README.md b/README.md index b856144..88e0c81 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,21 @@ # Stapline -## A pipeline for the parameterisation of stapled peptide residues and for the analysis of their secondary structure preferences via molecular dynamics simulations +A pipeline for the parameterisation of stapled peptide residues and for the +analysis of their secondary structure preferences via molecular dynamics +simulations. -### Requirements +## Requirements -We recommend creating separate conda environments for the residue fragmentation, QM torsion scans and MM energy decomposition. For details on how to create and work with conda environments, refer to: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html +We recommend creating separate conda environments for the residue +fragmentation, QM torsion scans and MM energy decomposition. For details on +how to create and work with conda environments, refer to the +[conda user guide](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html). -**1. Residue Fragmentation** +### 1. Residue Fragmentation -Refer to https://docs.openforcefield.org/projects/bespokefit/en/stable/getting-started/installation.html for instructions for bespokefit. +Refer to the [bespokefit installation guide](https://docs.openforcefield.org/projects/bespokefit/en/stable/getting-started/installation.html). -``` +```bash conda create -n bespokefit-env conda activate bespokefit-env conda install mamba @@ -19,50 +24,54 @@ mamba install -c conda-forge ambertools mamba install -c conda-forge nglview ``` -**2. QM Scans** - -Execute the commands below in the specified order: +Or, equivalently: -``` -conda create -n qm_scans python=3.8 -conda activate qm_scans +```bash +conda env create -f conda-environment-bespokefit.yml ``` -[ambertools](https://ambermd.org/GetAmber.php#ambertools) 18.0 +### 2. QM Scans -``conda install -c omnia ambertools=18.0`` - -[rdkit](https://github.com/rdkit/rdkit) 2022.09.5 - -``conda install -c conda-forge rdkit=2022.09.5`` - -``conda install mamba`` +```bash +conda create -n qm_scans python=3.8 +conda activate qm_scans -[psi4](https://github.com/psi4/psi4) 1.6.1 +# ambertools 18.0 - https://ambermd.org/GetAmber.php#ambertools +conda install -c omnia ambertools=18.0 -``mamba install -c psi4 psi4=1.6.1`` +# rdkit 2022.09.5 - https://github.com/rdkit/rdkit +conda install -c conda-forge rdkit=2022.09.5 -[psiresp](https://github.com/lilyminium/psiresp) 0.4.2 +conda install mamba -``mamba install -c conda-forge psiresp=0.4.2`` +# psi4 1.6.1 - https://github.com/psi4/psi4 +mamba install -c psi4 psi4=1.6.1 -[papermill](https://github.com/nteract/papermill) 2.5.0 +# psiresp 0.4.2 - https://github.com/lilyminium/psiresp +mamba install -c conda-forge psiresp=0.4.2 -``pip install papermill`` +# papermill 2.5.0 - https://github.com/nteract/papermill +pip install papermill -[parmed](https://github.com/ParmEd/ParmEd) +# parmed - https://github.com/ParmEd/ParmEd +pip install parmed -``pip install parmed`` +# downgrade pydantic last, since the packages above pull in a newer version +conda install -c conda-forge pydantic=1.10.8 +``` -After installing the above packages, pydantic will need to be downgraded to 1.10.8 +Or, equivalently: -``conda install -c conda-forge pydantic=1.10.8`` +```bash +conda env create -f conda-environment-qm-scans.yml +``` -**3. MM Energy Decomposition** +### 3. MM Energy Decomposition -Refer to https://sire.openbiosim.org/install.html for instructions for Sire. The version of Sire used in this work is 2023.5.1 +Refer to the [Sire installation guide](https://sire.openbiosim.org/install.html). +The version of Sire used in this work is 2023.5.1. -``` +```bash conda create -n openbiosim "python<3.13" conda activate openbiosim conda install -n openbiosim -c conda-forge -c openbiosim sire @@ -71,25 +80,32 @@ conda install rdkit conda install scikit-learn ``` -**4. MD Simulations** - -Refer to https://ambermd.org/AmberMD.php for installing the latest version of AMBER. +Or, equivalently: -### Contents - -**Force Field Library** - -Contains the force field parameters for the stapled residues in this work, along with peptide PDB templates and tleap scripts to generate MD simulation inputs. - -**Parameterisation Scripts** +```bash +conda env create -f conda-environment-mm-decomp.yml +``` -Contains code to prepare force field parameters for other stapled residues and/or non-proteinogenic amino acids. +### 4. MD Simulations -**Molecular Dynamics** +Refer to [AMBER](https://ambermd.org/AmberMD.php) for installing the latest +version of AMBER. -Contains the SAH-p53 peptide PDB input files and scripts to prepare, run and analyse MD simulations, as well MD trajectories and output from helicity analyses. +## Contents +- **Force Field Library** — force field parameters for the stapled residues + in this work, along with peptide PDB templates and tleap scripts to + generate MD simulation inputs. +- **Parameterisation Scripts** — code to prepare force field parameters for + other stapled residues and/or non-proteinogenic amino acids. +- **Molecular Dynamics** — SAH-p53 peptide PDB input files and scripts to + prepare, run and analyse MD simulations, as well as MD trajectories and + output from helicity analyses. Also available on the + [`molecular-dynamics-only`](../../tree/molecular-dynamics-only) branch as a + standalone snapshot. -### Citation +## Citation -Notari E, Bluntzer MTJ, Michel J, Hulme AN. Stapline: Development of a Force Field Library for Stapled Peptide Residues. ChemRxiv. 2025; [doi:10.26434/chemrxiv-2025-xfcnm](https://chemrxiv.org/engage/chemrxiv/article-details/68c3511c23be8e43d6760a9c) \ No newline at end of file +Notari E, Bluntzer MTJ, Michel J, Hulme AN. Stapline: Development of a Force +Field Library for Stapled Peptide Residues. ChemRxiv. 2025; +[doi:10.26434/chemrxiv-2025-xfcnm](https://chemrxiv.org/engage/chemrxiv/article-details/68c3511c23be8e43d6760a9c) diff --git a/conda-environment-bespokefit.yml b/conda-environment-bespokefit.yml new file mode 100644 index 0000000..6f72435 --- /dev/null +++ b/conda-environment-bespokefit.yml @@ -0,0 +1,8 @@ +name: bespokefit-env +channels: + - conda-forge +dependencies: + - mamba + - openff-bespokefit + - ambertools + - nglview diff --git a/conda-environment-mm-decomp.yml b/conda-environment-mm-decomp.yml new file mode 100644 index 0000000..ce2e0e1 --- /dev/null +++ b/conda-environment-mm-decomp.yml @@ -0,0 +1,13 @@ +# sire=2023.5.1 is currently only published for linux-64; on macOS the +# closest available builds are 2023.4.2/2023.5.2 (osx-64) or 2024.1.0+ +# (osx-arm64). +name: openbiosim +channels: + - conda-forge + - openbiosim +dependencies: + - python<3.13 + - sire=2023.5.1 + - matplotlib + - rdkit + - scikit-learn diff --git a/conda-environment-qm-scans.yml b/conda-environment-qm-scans.yml new file mode 100644 index 0000000..0fc4236 --- /dev/null +++ b/conda-environment-qm-scans.yml @@ -0,0 +1,23 @@ +# Tested by solving against linux-64: ambertools=18.0 is linux-64/osx-64 +# only (no osx-arm64 build), and psi4=1.6.1 has since been pruned from the +# psi4 channel entirely (only 1.9+ remains) - on Apple Silicon, run this +# under an x86_64 subdir (`CONDA_SUBDIR=osx-64 conda env create -f ...`) +# and expect to substitute a still-available psi4 version. +name: qm_scans +channels: + - omnia + - psi4 + - conda-forge +dependencies: + - python=3.8 + - ambertools=18.0 + - rdkit=2022.09.5 + - mamba + - psi4=1.6.1 + - psiresp=0.4.2 + - pip + - pip: + - papermill==2.5.0 + - parmed + # installed last: downgrades pydantic pulled in by the packages above + - pydantic=1.10.8