diff --git a/doc/examples/scripts/structure/modeling/docking.py b/doc/examples/scripts/structure/modeling/docking.py index 9fb63f201..41661c786 100644 --- a/doc/examples/scripts/structure/modeling/docking.py +++ b/doc/examples/scripts/structure/modeling/docking.py @@ -65,7 +65,8 @@ # of the original ligand position app = autodock.VinaApp(ligand, receptor, ref_ligand_center, [20, 20, 20]) # For reproducibility -app.set_seed(0) +# (Vina interprets seed 0 as a request for a random seed, so use a non-zero one) +app.set_seed(42) app.set_cpu(1) # This is the maximum number: # Vina may find less interesting binding modes diff --git a/tests/application/test_autodock.py b/tests/application/test_autodock.py index fb4638b54..0d3531de0 100644 --- a/tests/application/test_autodock.py +++ b/tests/application/test_autodock.py @@ -49,7 +49,9 @@ def test_docking(flexible): [20, 20, 20], flexible=flexible_mask, ) - app.set_seed(0) + # A non-zero seed is required: Vina interprets seed 0 as a request for + # a random seed, which would make this test non-deterministic + app.set_seed(42) # Single-threaded execution is required for fully reproducible # results — even with a fixed seed, parallel Vina is not deterministic app.set_cpu(1)