Skip to content

hybrid: treat random_seed=0 as a seed - #20

Open
rpinho wants to merge 1 commit into
rowansci:masterfrom
rpinho:fix-seed-zero
Open

rpinho wants to merge 1 commit into
rowansci:masterfrom
rpinho:fix-seed-zero

Conversation

@rpinho

@rpinho rpinho commented Nov 16, 2026

Copy link
Copy Markdown

There's a bug in HybridProposer.generate_seeds: random_seed or -1 turns random_seed=0 into -1, RDKit's "no seed" value. So two runs with seed 0 give different conformers and energies, on both generation paths. Seed 1 reproduces as expected.

This uses an explicit is not None check, so 0 is passed through and None still means unseeded.

Test: tests/test_seed_zero.py (butane and 1-octanol, two runs each with seed 0) fails on main and passes here. ruff format --check, ruff check, ty check, prek run --all-files and uv build pass; pytest --cov: 175 passed, 1 xfailed (the existing C12 xfail).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKxc9GKLwnyeV2jaZBxH9N

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant