Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .black.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
target-version = [
"py312",
"py313",
]
line-length = 88
color = true
Expand Down
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[run]
branch = true
source = tests
source = "tests"

[paths]
source = metalflare
source = "simlify"

[report]
show_missing = true
2 changes: 1 addition & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = "3.12"
python_version = "3.13"
pretty = true
show_traceback = true
color_output = true
Expand Down
31 changes: 0 additions & 31 deletions .pre-commit-config.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
target-version = "py312"
target-version = "py313"
line-length = 88
indent-width = 4
exclude = [
Expand Down
24 changes: 22 additions & 2 deletions docs/.nav.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
# More information:
# https://lukasgeiter.github.io/mkdocs-awesome-nav/

nav:
- Home: index.md
- Concepts: concepts
- Case studies: case-studies
- Concepts:
- concepts/index.md
- Case studies:
- ./case-studies/index.md
- HIV protease:
- ./case-studies/hiv-protease/index.md
- Background: ./case-studies/hiv-protease/background.md
- Protein preparation:
- ./case-studies/hiv-protease/protein/index.md
- Structure selection: ./case-studies/hiv-protease/protein/selection.md
- PDB cleaning: ./case-studies/hiv-protease/protein/clean.md
- System preparation:
- ./case-studies/hiv-protease/system/index.md
- CLI:
- ./cli/index.md
- PDB:
- ./cli/pdb/index.md
- "filter": ./cli/pdb/filter/index.md
- API: api

sort:
Expand All @@ -10,3 +29,4 @@ sort:
by: title
direction: asc
flatten_single_child_sections: true
preserve_directory_name: false
3 changes: 0 additions & 3 deletions docs/case-studies/.nav.yml

This file was deleted.

2 changes: 0 additions & 2 deletions docs/case-studies/hiv-protease/.nav.yml

This file was deleted.

26 changes: 26 additions & 0 deletions docs/case-studies/hiv-protease/background.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Background

HIV-1 protease plays a critical role in the maturation of HIV particles, making it an essential component in the virus's replication process.
HIV-1 protease enables the formation of infectious viral particles by cleaving viral polyproteins into functional proteins.
Understanding this enzyme's structure, dynamics, and function is paramount for developing effective inhibitors and advancing HIV treatment strategies.

The significance of HIV-1 protease extends beyond its immediate role in viral replication:

1. **Public health impact:** HIV/AIDS remains a global health challenge, affecting millions of people worldwide. Insights gained from studying HIV-1 protease contribute to the ongoing efforts to combat this pandemic.
2. **Drug design:** As a prime target for antiretroviral drugs, detailed knowledge of HIV-1 protease's structure and dynamics is crucial for rational drug design and developing new therapeutic strategies.
3. **Resistance mechanisms:** HIV's rapid mutation rate often leads to drug resistance. MD simulations can help elucidate the molecular basis of these resistance mechanisms, informing the design of more robust inhibitors.

From a biophysical perspective, HIV-1 protease presents several exciting characteristics that make it an excellent subject for MD simulations:

1. **Structural flexibility:** The enzyme exhibits significant conformational changes during its catalytic cycle, particularly in the "flap" regions that control access to the active site.
MD simulations can capture these dynamic processes, providing insights into the enzyme's mechanism.
2. **Homodimeric nature:** HIV-1 protease functions as a homodimer, with the active site formed at the interface between two identical subunits.
This symmetry adds an interesting dimension to the simulation setup and analysis.
3. **Substrate specificity:** The enzyme recognizes and cleaves specific sequences in viral polyproteins.
MD simulations can help elucidate the molecular basis of this specificity and how mutations might affect it.
4. **Water-Mediated Interactions:** Water molecules play a crucial role in the enzyme's catalytic mechanism and mediating protein-ligand interactions.
Explicit solvent MD simulations are particularly valuable for studying these effects.
5. **Allosteric effects:** Recent studies have suggested the presence of allosteric sites in HIV-1 protease, opening new avenues for drug design.
MD simulations can help identify and characterize these sites.


175 changes: 0 additions & 175 deletions docs/case-studies/hiv-protease/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,178 +3,3 @@
This guide focuses on using Amber to simulate HIV-1 protease, a crucial enzyme in the life cycle of the human immunodeficiency virus (HIV) and a prime target for antiretroviral therapy.
The following sections will cover the practical aspects of using Amber for HIV-1 protease simulations, including system preparation, force field selection, simulation protocols, and data analysis techniques.

## Background

HIV-1 protease plays a critical role in the maturation of HIV particles, making it an essential component in the virus's replication process.
HIV-1 protease enables the formation of infectious viral particles by cleaving viral polyproteins into functional proteins.
Understanding this enzyme's structure, dynamics, and function is paramount for developing effective inhibitors and advancing HIV treatment strategies.

The significance of HIV-1 protease extends beyond its immediate role in viral replication:

1. **Public health impact:** HIV/AIDS remains a global health challenge, affecting millions of people worldwide. Insights gained from studying HIV-1 protease contribute to the ongoing efforts to combat this pandemic.
2. **Drug design:** As a prime target for antiretroviral drugs, detailed knowledge of HIV-1 protease's structure and dynamics is crucial for rational drug design and developing new therapeutic strategies.
3. **Resistance mechanisms:** HIV's rapid mutation rate often leads to drug resistance. MD simulations can help elucidate the molecular basis of these resistance mechanisms, informing the design of more robust inhibitors.

From a biophysical perspective, HIV-1 protease presents several exciting characteristics that make it an excellent subject for MD simulations:

1. **Structural flexibility:** The enzyme exhibits significant conformational changes during its catalytic cycle, particularly in the "flap" regions that control access to the active site.
MD simulations can capture these dynamic processes, providing insights into the enzyme's mechanism.
2. **Homodimeric nature:** HIV-1 protease functions as a homodimer, with the active site formed at the interface between two identical subunits.
This symmetry adds an interesting dimension to the simulation setup and analysis.
3. **Substrate specificity:** The enzyme recognizes and cleaves specific sequences in viral polyproteins.
MD simulations can help elucidate the molecular basis of this specificity and how mutations might affect it.
4. **Water-Mediated Interactions:** Water molecules play a crucial role in the enzyme's catalytic mechanism and mediating protein-ligand interactions.
Explicit solvent MD simulations are particularly valuable for studying these effects.
5. **Allosteric effects:** Recent studies have suggested the presence of allosteric sites in HIV-1 protease, opening new avenues for drug design.
MD simulations can help identify and characterize these sites.

## Protein preparation

System preparation is a crucial step in molecular dynamics (MD) simulations that significantly impacts the quality and reliability of results.
This process involves selecting an appropriate starting structure and setting up the system to accurately represent physiological conditions.
Proper preparation minimizes artifacts and ensures that simulations reflect the true behavior of the protein in its biological context.

### Protein selection

By meticulously selecting a starting structure based on these criteria, we establish a strong foundation for our MD simulations of HIV-1 protease.
This careful selection process increases the likelihood of obtaining biologically relevant and computationally robust results, which are crucial for understanding the protein's behavior and for applications such as drug design and the study of resistance mechanisms.
Remember that the chosen structure will serve as the basis for all subsequent steps in the simulation process, including system setup, energy minimization, and production runs.
Therefore, the time invested in selecting an appropriate structure is well spent and can save considerable effort and computational resources in the long run.

We will use the Protein Data Bank (PDB) as our primary source of structural data.
When selecting a structure, consider the following criteria:

1. **Resolution:** Prioritize high-resolution structures (typically < 2.0 Å) for more accurate atomic positions.
Lower resolution (i.e., > 2.0 Å) structures may lead to simulation inaccuracies due to less precise atomic coordinates.
2. **Validation Scores:** Use the PDB validation reports to assess structure quality.
Key metrics include:
- Clashscore: Lower values indicate fewer steric clashes between atoms.
- Ramachandran outliers: Fewer outliers suggest better backbone geometry.
- Rotamer outliers: Fewer outliers indicate more reliable side-chain conformations.
- Overall quality at a glance: Provides a quick assessment of the structure's quality.
3. **Completeness:** Choose structures with minimal missing atoms or residues to reduce uncertainties in the simulation.
4. **Apo structure:** Use a ligand-free (apo) structure to study the intrinsic dynamics of HIV-1 protease without bias from bound ligands or inhibitors.
5. **HIV variant:** Select a structure representing the most common HIV variant, such as HIV-1 subtype B, which is prevalent in North America, Western Europe, and Australia.
6. **Experimental method:** While X-ray crystallography is common, consider high-quality structures from other methods like cryo-electron microscopy (cryo-EM) or NMR spectroscopy if they offer advantages in physiological relevance or completeness.
7. **Publication date and citations:** Balance recent structures benefiting from improved techniques with well-established, highly cited structures that allow comparison with previous studies.
8. **Physiological relevance:** Prefer structures determined under conditions mimicking physiological environments, such as appropriate pH and temperature.
9. **Authors and laboratory reputation:** Structures from laboratories with expertise in HIV protease can provide additional confidence in data quality.

To begin the search, we used the following parameters in the PDB:

- **Full Text**: `HIV Protease`
- **Polymer Entity Type** is `Protein`
- **Refinement Resolution** is between `0.5` to `2` (upper included).
- **Enzyme Classification Name** is `Hydrolases`.
- **Scientific Name of the Source Organism** is `Human immunodeficiency virus 1`.

!!! note

It's worth noting that while we aim for an apo structure to avoid bias, in some cases, the highest quality available structures may be ligand-bound.
If this is the case, we'll need to carefully remove the ligand and consider running a short equilibration simulation to allow the protein to relax into its unbound state.

[You can go here to view the search results.][hiv-search].
At the time of writing there were 302 results, but there are only a few that do not have any drug-like ligands: [`1TW7`](https://www.rcsb.org/structure/1TW7), [`2PC0`](https://www.rcsb.org/structure/2PC0), and [`2G69`](https://www.rcsb.org/structure/2G69).
Both [`1TW7`](https://www.rcsb.org/structure/1TW7) and [`2G69`](https://www.rcsb.org/structure/2G69) have one or more mutations studying drug resistance mechanism, so we will ignore these for now.
This leaves [`2PC0`](https://www.rcsb.org/structure/2PC0) as our protein.

<div id="hiv-protease-view" class="mol-container"></div>

<script>
document.addEventListener('DOMContentLoaded', (event) => {
const viewer = molstar.Viewer.create('hiv-protease-view', {
layoutIsExpanded: false,
layoutShowControls: false,
layoutShowRemoteState: false,
layoutShowSequence: true,
layoutShowLog: false,
layoutShowLeftPanel: false,
viewportShowExpand: true,
viewportShowSelectionMode: true,
viewportShowAnimation: false,
pdbProvider: 'rcsb',
}).then(viewer => {
viewer.loadSnapshotFromUrl("/case-studies/hiv-protease/files/molstar/2pc0-initial.molx", "molx");
});
});
</script>

### Trimming PDB file

???+ note "Prelude"

```text
--8<-- "docs/case-studies/hiv-protease/files/structures/2PC0.pdb::53"
```

???+ note "Temperature factors"

```text
--8<-- "docs/case-studies/hiv-protease/files/structures/2PC0.pdb:55:58"
```

### Removing water molecules

```text
--8<-- "docs/case-studies/hiv-protease/files/structures/2PC0.pdb:1735:1738"
```

```bash
--8<-- "docs/case-studies/hiv-protease/scripts/01-clean-pdb.sh:27:27"
```

### Removing non-protein molecules

```bash
--8<-- "docs/case-studies/hiv-protease/scripts/01-clean-pdb.sh:28:29"
```

### Removing duplicate atom lines

```bash
--8<-- "docs/case-studies/hiv-protease/scripts/01-clean-pdb.sh:32:52"
```

### Turning models into chains

```bash
--8<-- "docs/case-studies/hiv-protease/scripts/01-clean-pdb.sh:55:56"
```

### Renumber

```bash
--8<-- "docs/case-studies/hiv-protease/scripts/01-clean-pdb.sh:58:58"
```

### Result

<div id="hiv-protease-clean-view" class="mol-container"></div>

<script>
document.addEventListener('DOMContentLoaded', (event) => {
const viewer = molstar.Viewer.create('hiv-protease-clean-view', {
layoutIsExpanded: false,
layoutShowControls: false,
layoutShowRemoteState: false,
layoutShowSequence: true,
layoutShowLog: false,
layoutShowLeftPanel: false,
viewportShowExpand: true,
viewportShowSelectionMode: true,
viewportShowAnimation: false,
pdbProvider: 'rcsb',
}).then(viewer => {
// viewer.loadStructureFromUrl('./files/structures/2PC0-cleaned.pdb', format='pdb');
viewer.loadSnapshotFromUrl("/case-studies/hiv-protease/files/molstar/2pc0-stripped.molx", "molx");
});
});
</script>

## System preparation

TODO: Introduce tleap and amber

<!-- LINKS -->

[hiv-search]: https://www.rcsb.org/search?request=%7B%22query%22%3A%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22terminal%22%2C%22service%22%3A%22full_text%22%2C%22parameters%22%3A%7B%22value%22%3A%22HIV%20Protease%22%7D%7D%5D%2C%22logical_operator%22%3A%22and%22%7D%5D%2C%22logical_operator%22%3A%22and%22%2C%22label%22%3A%22full_text%22%7D%2C%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22terminal%22%2C%22service%22%3A%22text%22%2C%22parameters%22%3A%7B%22attribute%22%3A%22entity_poly.rcsb_entity_polymer_type%22%2C%22value%22%3A%22Protein%22%2C%22operator%22%3A%22exact_match%22%7D%7D%5D%2C%22logical_operator%22%3A%22or%22%2C%22label%22%3A%22entity_poly.rcsb_entity_polymer_type%22%7D%2C%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22terminal%22%2C%22service%22%3A%22text%22%2C%22parameters%22%3A%7B%22attribute%22%3A%22rcsb_entry_info.resolution_combined%22%2C%22value%22%3A%7B%22from%22%3A0.5%2C%22to%22%3A2%2C%22include_lower%22%3Atrue%2C%22include_upper%22%3Atrue%7D%2C%22operator%22%3A%22range%22%7D%7D%5D%2C%22logical_operator%22%3A%22or%22%2C%22label%22%3A%22rcsb_entry_info.resolution_combined%22%7D%2C%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22terminal%22%2C%22service%22%3A%22text%22%2C%22parameters%22%3A%7B%22attribute%22%3A%22rcsb_polymer_entity.rcsb_ec_lineage.name%22%2C%22value%22%3A%22Hydrolases%22%2C%22operator%22%3A%22exact_match%22%7D%7D%5D%2C%22logical_operator%22%3A%22and%22%7D%5D%2C%22logical_operator%22%3A%22or%22%2C%22label%22%3A%22rcsb_polymer_entity.rcsb_ec_lineage.name%22%7D%5D%2C%22logical_operator%22%3A%22and%22%7D%2C%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22group%22%2C%22nodes%22%3A%5B%7B%22type%22%3A%22terminal%22%2C%22service%22%3A%22text%22%2C%22parameters%22%3A%7B%22attribute%22%3A%22rcsb_entity_source_organism.ncbi_scientific_name%22%2C%22value%22%3A%22Human%20immunodeficiency%20virus%201%22%2C%22operator%22%3A%22exact_match%22%7D%7D%5D%2C%22logical_operator%22%3A%22or%22%2C%22label%22%3A%22rcsb_entity_source_organism.ncbi_scientific_name%22%7D%5D%2C%22logical_operator%22%3A%22and%22%7D%5D%2C%22logical_operator%22%3A%22and%22%2C%22label%22%3A%22text%22%7D%5D%2C%22logical_operator%22%3A%22and%22%7D%2C%22return_type%22%3A%22entry%22%2C%22request_options%22%3A%7B%22paginate%22%3A%7B%22start%22%3A0%2C%22rows%22%3A25%7D%2C%22results_content_type%22%3A%5B%22experimental%22%5D%2C%22sort%22%3A%5B%7B%22sort_by%22%3A%22score%22%2C%22direction%22%3A%22desc%22%7D%5D%2C%22scoring_strategy%22%3A%22combined%22%7D%2C%22request_info%22%3A%7B%22query_id%22%3A%229bf9fe45638e11d563f8a0807116b29a%22%7D%7D
Loading