Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
82688f0
shape argument added
Feb 17, 2026
cc6ac17
shape test added
rversin Feb 19, 2026
46ecf2a
shape handling added
rversin Feb 19, 2026
9f1d8f3
capri shape fix
rversin Feb 20, 2026
d9a5a78
Merge branch 'CG-HADDOCK' of https://github.com/haddocking/haddock3 i…
amjjbonvin Apr 13, 2026
692d0c5
Fixed shape issue in cgtoaa and added shape docking example
amjjbonvin Apr 13, 2026
1222085
Updated config files
amjjbonvin Apr 13, 2026
5dad2f8
Updated protein-protein-shape docking example
amjjbonvin Apr 13, 2026
cb1e962
Updated config files, added end-to-end test
amjjbonvin Apr 13, 2026
e6c6d47
Added mol_fix_origin=true for shape
amjjbonvin Apr 14, 2026
25b705d
missing dockstring and definition added
rversin Apr 14, 2026
c5d7130
corrected code
rversin Apr 14, 2026
5cb554d
usage of Path instead of splicing
rversin Apr 14, 2026
c57dae4
test fixed
rversin Apr 15, 2026
8e7b003
Add check for shape before reading cg-to-aa restraints
amjjbonvin Apr 15, 2026
f0fb788
Merge branch 'CG-HADDOCK-shape' of https://github.com/haddocking/hadd…
amjjbonvin Apr 15, 2026
59c38fd
shape removed from martinize
rversin Apr 15, 2026
9dcb648
shape check added
rversin Apr 15, 2026
1840ab7
shape checking function added
rversin Apr 15, 2026
2475f40
shape removed from martinize
rversin Apr 15, 2026
b9b0a54
shape checks updated
rversin Apr 15, 2026
92d2de3
test for generate_topology fixed
rversin Apr 15, 2026
7d6c75a
Avoid reading of cg-to-aa restraints for shape
amjjbonvin Apr 15, 2026
b2024ef
Merge branch 'CG-HADDOCK-shape' of https://github.com/haddocking/hadd…
amjjbonvin Apr 15, 2026
88fc754
Correction
amjjbonvin Apr 15, 2026
1a93483
add helper function in CG file generation
VGPReys Apr 16, 2026
a924dd0
.psf to .Format.TOPOLOGY
VGPReys Apr 16, 2026
f62f615
fix origin name
VGPReys Apr 16, 2026
b98db55
fix aa psf filepath
VGPReys Apr 16, 2026
267100e
full path usage
rversin Apr 16, 2026
df61242
shape added to PDBFile
rversin Apr 16, 2026
3fd590e
selection of spage residues
rversin Apr 16, 2026
3812fdf
Merge branch 'CG-HADDOCK-shape' into enhance-filename-generation-cg
VGPReys Apr 16, 2026
2bd6c74
Merge pull request #1521 from haddocking/enhance-filename-generation-cg
VGPReys Apr 16, 2026
b94a039
add check for backmapping file in tests
VGPReys Apr 20, 2026
9dfc8bf
path issues and remove tmp files
VGPReys Apr 20, 2026
0e0c184
fname in end2end
VGPReys Apr 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

- 2026-04-13: Fixed issue with shape in cgtoa module and added shape docking example
- 2026-03-30: Added nucleosome-PCR1 CG docking example
- 2026-03-09: Automated type casting for optional argument seed in haddock3-restraints random_removal - Issue #1485
- 2026-02-28: Switched to ilRMSD clustering from protein-ligand examples - Issue #1481
Expand Down
53 changes: 53 additions & 0 deletions end-to-end_tests/test_protein-protein-shape.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"""End-to-end test for the protein-protein-shape docking example."""

import shutil
import tempfile
import gzip
from pathlib import Path

from haddock.clis.cli import main as cli_main

import warnings
from Bio.PDB.PDBExceptions import PDBConstructionWarning


EXAMPLE_DIR = (
Path(__file__).resolve().parents[1] / "examples" / "docking-protein-protein-shape"
)

def test_protein_protein_shape_CG(monkeypatch):
"""Test protein-protein-shape CG docking example.

Uses docking-protein-protein-shape-CG-test.cfg to run the full pipeline
(topoaa, topocg rigidbody, caprieval, seletop, flexref, caprieval, cgtoaa, emref, caprieval,
clustfcc, seletopclusts, caprieva)
"""
warnings.simplefilter('ignore', PDBConstructionWarning)

with tempfile.TemporaryDirectory() as tmpdir:
shutil.copytree(Path(EXAMPLE_DIR, "data"), Path(tmpdir, "data"))
config_fname = "docking-protein-protein-shape-CG-test.cfg"
cfg = Path(tmpdir, config_fname)
shutil.copy(Path(EXAMPLE_DIR, config_fname), cfg)

monkeypatch.chdir(tmpdir)
cli_main(cfg)

run_dir = Path("run1-CG-test")

# Verify all workflow steps produced output directories
assert Path(run_dir, "00_topoaa").exists(), f"00_topoaa not created"
assert Path(run_dir, "01_topocg").exists(), f"01_topocg not created"
assert Path(run_dir, "02_rigidbody").exists(), f"02_rigidbody not created"
assert Path(run_dir, "03_caprieval").exists(), f"03_caprieval not created"
assert Path(run_dir, "04_seletop").exists(), f"04_seletop created"
assert Path(run_dir, "05_flexref").exists(), f"05_flexref not created"
assert Path(run_dir, "06_caprieval").exists(), f"06_caprieval not created"
assert Path(run_dir, "07_cgtoaa").exists(), f"07_cgtoaa not created"
assert Path(run_dir, "08_emref").exists(), f"08_emref not created"
assert Path(run_dir, "09_caprieval").exists(), f"09_caprieval not created"
assert Path(run_dir, "10_clustfcc").exists(), f"10_clustfcc not created"
assert Path(run_dir, "11_seletopclusts").exists(), f"10_seletopclusts not created"
assert Path(run_dir, "12_caprieval").exists(), f"12_caprieval not created"
Comment thread
rvhonorato marked this conversation as resolved.
with gzip.open(Path(run_dir, "08_emref/emref_1.pdb.gz"), 'rt') as f:
assert any('SHA SHA S' in line for line in f), f"Shape atoms not found in emref PDB file"
2,034 changes: 2,034 additions & 0 deletions examples/docking-protein-protein-shape/data/2r15_A.pdb

Large diffs are not rendered by default.

2,034 changes: 2,034 additions & 0 deletions examples/docking-protein-protein-shape/data/2r15_B.pdb

Large diffs are not rendered by default.

4,023 changes: 4,023 additions & 0 deletions examples/docking-protein-protein-shape/data/2r15_reference.pdb

Large diffs are not rendered by default.

208 changes: 208 additions & 0 deletions examples/docking-protein-protein-shape/data/ambig-shape.tbl

Large diffs are not rendered by default.

418 changes: 418 additions & 0 deletions examples/docking-protein-protein-shape/data/shape.pdb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# ====================================================================
# Protein-protein docking example with shape restraints

# directory in which the scoring will be done
run_dir = "run1-CG-full"

# execution mode
mode = "local"
ncores = 50

# molecules to be docked
molecules = [
"data/2r15_A.pdb",
"data/2r15_B.pdb",
"data/shape.pdb",
]

# ====================================================================
# Parameters for each stage are defined below, prefer full paths
# ====================================================================
[topoaa]

[topocg]

[rigidbody]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

Comment thread
rversin marked this conversation as resolved.
[caprieval]
reference_fname = "data/2r15_reference.pdb"
fnat_cutoff = 7.0 # cutoff for coarse-grained structures

[seletop]

[flexref]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

[caprieval]
reference_fname = "data/2r15_reference.pdb"
fnat_cutoff = 7.0 # cutoff for coarse-grained structures

[cgtoaa]
mol_shape_3 = true
log_level = 'verbose'

[emref]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

[caprieval]
reference_fname = "data/2r15_reference.pdb"

[clustfcc]
min_population = 4

[seletopclusts]
top_models = 4

[caprieval]
reference_fname = "data/2r15_reference.pdb"

# ====================================================================

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# ====================================================================
# Protein-protein docking example with shape restraints

# directory in which the scoring will be done
run_dir = "run1-CG-test"

# execution mode
mode = "local"
ncores = 10
debug = true

# molecules to be docked
molecules = [
"data/2r15_A.pdb",
"data/2r15_B.pdb",
"data/shape.pdb",
]

# ====================================================================
# Parameters for each stage are defined below, prefer full paths
# ====================================================================
[topoaa]

[topocg]

[rigidbody]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
sampling = 5
mol_shape_3 = true
mol_fix_origin_3 = true

Comment thread
rversin marked this conversation as resolved.
[caprieval]
reference_fname = "data/2r15_reference.pdb"
fnat_cutoff = 7.0 # cutoff for coarse-grained structures

[seletop]
select = 2

[flexref]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

[caprieval]
reference_fname = "data/2r15_reference.pdb"
fnat_cutoff = 7.0 # cutoff for coarse-grained structures

[cgtoaa]
mol_shape_3 = true

[emref]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

[caprieval]
reference_fname = "data/2r15_reference.pdb"

[clustfcc]
min_population = 1

[seletopclusts]
top_models = 4

[caprieval]
reference_fname = "data/2r15_reference.pdb"

# ====================================================================

Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# ====================================================================
# Protein-protein docking example with shape restraints

# directory in which the scoring will be done
run_dir = "run1-full"

# execution mode
mode = "local"
ncores = 50

# molecules to be docked
molecules = [
"data/2r15_A.pdb",
"data/2r15_B.pdb",
"data/shape.pdb",
]

# ====================================================================
# Parameters for each stage are defined below, prefer full paths
# ====================================================================
[topoaa]

[rigidbody]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

Comment thread
rversin marked this conversation as resolved.
[caprieval]
reference_fname = "data/2r15_reference.pdb"

[seletop]

[flexref]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

[caprieval]
reference_fname = "data/2r15_reference.pdb"

[emref]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

[caprieval]
reference_fname = "data/2r15_reference.pdb"

[clustfcc]
min_population = 4

[seletopclusts]
top_models = 4

[caprieval]
reference_fname = "data/2r15_reference.pdb"

# ====================================================================

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# ====================================================================
# Protein-protein docking example with shape restraints

# directory in which the scoring will be done
run_dir = "run1-test"

# execution mode
mode = "local"
ncores = 10

# molecules to be docked
molecules = [
"data/2r15_A.pdb",
"data/2r15_B.pdb",
"data/shape.pdb",
]

# ====================================================================
# Parameters for each stage are defined below, prefer full paths
# ====================================================================
[topoaa]

[rigidbody]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
sampling = 5
mol_shape_3 = true
mol_fix_origin_3 = true

Comment thread
rversin marked this conversation as resolved.
[caprieval]
reference_fname = "data/2r15_reference.pdb"

[seletop]
select = 2

[flexref]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

[caprieval]
reference_fname = "data/2r15_reference.pdb"

[emref]
tolerance = 20
ambig_fname = "data/ambig-shape.tbl"
mol_shape_3 = true
mol_fix_origin_3 = true

[caprieval]
reference_fname = "data/2r15_reference.pdb"

[clustfcc]
min_population = 1

[seletopclusts]
top_models = 4

[caprieval]
reference_fname = "data/2r15_reference.pdb"

# ====================================================================

Loading
Loading