Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
5565495
rename proaffinity test
yingyue2030699 Dec 15, 2025
9d83df5
create a pipeline from System object to ode
yingyue2030699 Dec 15, 2025
5dfdd83
Create a file for configuring system to ode pipeline
yingyue2030699 Dec 15, 2025
3bfe009
add init to ode_solver
yingyue2030699 Dec 15, 2025
bea5d14
Update ADFR installation and ProAffinity to the newer version and tut…
yingyue2030699 Dec 15, 2025
8a4ff28
Update main and hyperparameter with proaffinity support
yingyue2030699 Dec 15, 2025
62a82e2
Add ode examples
yingyue2030699 Dec 15, 2025
955c201
Fixed parser issues for fetching pdb since `Bio` names the downloaded…
sangmk Dec 15, 2025
1028b41
Turned off ProAffnity-GNN for fast test;
sangmk Dec 15, 2025
8550f66
Add new hyperparameters for transition matrices;
sangmk Dec 15, 2025
d6a8854
Update ionerdss_tutorial_6bno.ipynb
yingyue2030699 Dec 16, 2025
9f62425
reduce console handler verbosity
yingyue2030699 Dec 16, 2025
cd5a01d
disable verbose output and change tutorial title
yingyue2030699 Dec 16, 2025
c0f3c17
Update .gitignore
yingyue2030699 Dec 17, 2025
0135842
Update .gitignore
yingyue2030699 Dec 17, 2025
7328dee
Update .gitignore
yingyue2030699 Dec 17, 2025
0ff9d7f
Fix verbosity by moving commandline prints to log file
yingyue2030699 Dec 17, 2025
2185292
Delete tutorials/6bno_dir directory
yingyue2030699 Dec 17, 2025
72974dd
Avoid duplicate rate name with indexing
yingyue2030699 Dec 17, 2025
1a6e0f1
Add a section explaining cif fetching logic in 6bno tutorial
yingyue2030699 Dec 17, 2025
fc00e9e
Merge branch 'dev' of https://github.com/JohnsonBiophysicsLab/ionerds…
yingyue2030699 Dec 17, 2025
4b84bf3
Update workflow for hyperparameters.
sangmk Dec 17, 2025
bba1adf
upload doc files for 1) how to use the new hyperparameter api and 2) …
sangmk Dec 17, 2025
6567aba
fix upper/lower-case issue of molecule naming
yingyue2030699 Dec 18, 2025
4940a82
Merge branch 'dev' of https://github.com/JohnsonBiophysicsLab/ionerds…
yingyue2030699 Dec 18, 2025
e68c8c0
Add function to detect naming conflict when ignoring case
yingyue2030699 Dec 18, 2025
6f2a193
Change parser to be forced uppercase
yingyue2030699 Dec 18, 2025
97e7991
Update .gitignore
yingyue2030699 Dec 18, 2025
4c384e9
Add a public API build_system_from_pdb
yingyue2030699 Dec 18, 2025
4235c20
Change tutorials to use the new public API
yingyue2030699 Dec 18, 2025
6f07fd6
set bioassembly1 as default pdb to fetch
yingyue2030699 Dec 18, 2025
bbffd5a
delete stale pdb model test
yingyue2030699 Dec 18, 2025
93f29ab
fix bug in parser
yingyue2030699 Dec 18, 2025
b9359ce
Update test_hyperparameters.py
yingyue2030699 Dec 18, 2025
31beea3
delete stale proaffinity tests
yingyue2030699 Dec 18, 2025
0c497c3
update chain group naming scheme in tests
yingyue2030699 Dec 18, 2025
c398c0a
add frames concatenation to parser tests
yingyue2030699 Dec 18, 2025
ccf7c24
move analysis tests to under unit
yingyue2030699 Dec 18, 2025
82899f4
modify and move the analysis tests to units
yingyue2030699 Dec 18, 2025
8b75e0f
Fix test files
yingyue2030699 Jan 12, 2026
63d0de7
Extend ODE Module for Non-Linear Systems - Walkthrough
yingyue2030699 Jan 13, 2026
0196b9d
Fix 8y7s not generating reactions
yingyue2030699 Jan 14, 2026
c7fd2fd
Fix case of 8ixa where certain heterotypic reactions
yingyue2030699 Jan 14, 2026
a3108d9
fix breaking unittests
yingyue2030699 Jan 15, 2026
4d33748
Update API in module __init__.py
PhysFoley Jan 15, 2026
00d459b
fix angles calculation and failing tests in cg model generation
yingyue2030699 Jan 15, 2026
b738bbe
Merge branch 'dev' of https://github.com/JohnsonBiophysicsLab/ionerds…
yingyue2030699 Jan 15, 2026
ef34546
Delete obsolete artefacts
yingyue2030699 Jan 15, 2026
828ae81
fixed __init__.py
PhysFoley Jan 15, 2026
036c42a
LLM refactor platonic solid
yingyue2030699 Jan 15, 2026
5bb3808
remove unnecessary platonic __init__
PhysFoley Jan 15, 2026
756f4c9
Update platonic solid with NERDSS exporter
yingyue2030699 Jan 15, 2026
1f99bed
Mute trivial warnings in platonic solids pipeline
yingyue2030699 Jan 20, 2026
c277748
Change default ka to 120 and set it in hyperparameters
yingyue2030699 Jan 20, 2026
efe2b09
Add direct import of platonic solids into ionerdss.model
yingyue2030699 Jan 20, 2026
e903463
fix normal vector and bonding geometry for platonic solids
PhysFoley Jan 20, 2026
d9bff95
Fix failing test due to __init__ change
yingyue2030699 Jan 20, 2026
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
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ test_simularium.ipynb
# pdb local test cases
/6bno*
/8erq*
/8y7s*
/1dlh*
/5l93*
/8ixa*

# local verification files
analyze_filament.py
Expand All @@ -148,4 +152,10 @@ repro_serialization.py
ref_angles.py
reconstruction_test.py
verify_angles*
test.py
#test.py
#test*
nerdss_output/
tutorials/6bno_dir/
/tutorials/6bno_dir
/test_debug
/4v6x_dir
7 changes: 7 additions & 0 deletions docs/AFFINITY_PREDICTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ tar -xzvf ADFRsuite_x86_64Linux_1.0.tar.gz
cd ADFRsuite_x86_64Linux_1.0
./install.sh

## If you are on a mac, you can use the following command to install ADFR:

chmod +x ./examples/install_ADFR.sh
./examples/install_ADFR.sh

# Set ADFR_PATH environment variable
# A script cannot permanently modify your shell’s PATH just by echoing export PATH=... inside itself
# Because each script runs in its own subshell, and environment changes do not propagate back to your interactive terminal.
export ADFR_PATH="/path/to/ADFRsuite/bin/prepare_receptor"
```

Expand Down
128 changes: 128 additions & 0 deletions docs/DYNAMIC_DOCSTRING_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Dynamic Docstring Generation

## Overview

The `set_hyperparameters()` function now automatically generates its docstring from the field metadata in the `PDBModelHyperparameters` dataclass. This eliminates the need for manual copy-paste and ensures documentation stays in sync with the actual parameters.

## How It Works

### 1. Field Metadata in hyperparameters.py

Each field in the `PDBModelHyperparameters` dataclass now includes metadata with description and optional unit:

```python
@dataclass
class PDBModelHyperparameters:
interface_detect_distance_cutoff: float = field(
default=0.6,
metadata={
"description": "Contact search radius per atom pair for interface detection",
"unit": "nm"
}
)

ode_enabled: bool = field(
default=False,
metadata={
"description": "Enable ODE pipeline for kinetic modeling"
}
)
```

### 2. Docstring Generation in api.py

The `_generate_hyperparameters_docstring()` function extracts this metadata and builds a complete docstring:

```python
def _generate_hyperparameters_docstring() -> str:
"""Generate docstring from PDBModelHyperparameters field metadata."""
# Extract field metadata
field_metadata = {}
for field_info in fields(PDBModelHyperparameters):
field_metadata[field_info.name] = {
'type': field_info.type,
'default': field_info.default,
'metadata': field_info.metadata
}

# Build docstring with parameter descriptions, types, defaults, and units
# ...
```

### 3. Dynamic Assignment

The docstring is assigned to the function after its definition:

```python
def set_hyperparameters(builder: 'PDBModelBuilder', **kwargs) -> PDBModelHyperparameters:
# function body
...

# Dynamically set docstring from field metadata
set_hyperparameters.__doc__ = _generate_hyperparameters_docstring()
```

## Benefits

✅ **Single Source of Truth**: Parameter descriptions live only in the dataclass
✅ **No Manual Copy-Paste**: Documentation updates automatically
✅ **Type Safety**: Types and defaults are guaranteed to match
✅ **Reduced Maintenance**: Changes to parameters automatically update docs
✅ **Consistency**: Same format for all parameters

## Adding New Parameters

To add a new hyperparameter:

1. Add it to `PDBModelHyperparameters` with metadata:
```python
new_parameter: int = field(
default=42,
metadata={"description": "Description of what this does", "unit": "optional unit"}
)
```

2. Add the field name to the appropriate category in `_generate_hyperparameters_docstring()`:
```python
categories = {
"Your Category": [
"new_parameter",
],
...
}
```

3. The docstring will automatically include it!

## Example Output

The generated docstring includes:

```
**Core Detection Parameters:**
- interface_detect_distance_cutoff (float, default=0.6): Contact search radius per atom pair for interface detection [nm]
- interface_detect_n_residue_cutoff (int, default=3): Minimum number of contacting residues (on each chain) to accept an interface [residues]

**ODE Pipeline Options:**
- ode_enabled (bool, default=False): Enable ODE pipeline for kinetic modeling
- ode_time_span (tuple, default=(0.0, 10.0)): Time span for ODE solving (start, end) [seconds]
...
```

## Viewing the Documentation

Users can access the complete documentation with:

```python
from ionerdss.model import pdb

builder = pdb.PDBModelBuilder('1ABC')
help(builder.set_hyperparameters)
```

Or:

```python
from ionerdss.model.pdb import api
help(api.set_hyperparameters)
```
Loading
Loading