Add conformer generation workflow (#30) - #75
Merged
Merged
Conversation
Resolves #30: a conformer generation workflow for screening. - thermo/conformers.py: RDKit is the conformer backend. `generate(smiles, ...)` embeds conformers with ETKDG, optionally MMFF-optimises + energy-window/RMSD prunes them, and returns energy-sorted ASE Atoms. `write_conformers` writes them as .xyz so a directory can be fed straight to `screen`. - Public API: `generate_conformers` / `write_conformers` exported from `ThermoScreening.thermo`. - CLI: `thermo conformers <SMILES>` writes the ensemble, then `thermo screen <dir>` screens it (verified end-to-end with xtb-cli). RDKit is already a declared dependency; the import is guarded with a clear message if absent. Closes #30
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
+ Coverage 96.73% 96.80% +0.06%
==========================================
Files 24 25 +1
Lines 1564 1629 +65
==========================================
+ Hits 1513 1577 +64
- Misses 51 52 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- conformers module docstring: say MMFF (there is no UFF fallback). - run_conformers: catch ValueError/ImportError and print a clean stderr message + exit 1, instead of surfacing a raw traceback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #30 — a conformer generation workflow for molecule screening, per the issue's two notes (decide RDKit as backend; expose a small public API before wiring into screening).
What changed
thermo/conformers.py(new) — RDKit is the conformer backend.generate(smiles, max_conformers=, optimize=, prune_rms_thresh=, energy_window=, random_seed=)embeds conformers with ETKDGv3, optionally MMFF-optimises and sorts by energy, and prunes by RMSD + an optional energy window. Returns energy-sorted ASEAtoms.write_conformers(...)writes them as.xyzso a directory feeds straight intoscreen.generate_conformers/write_conformersexported fromThermoScreening.thermo.thermo conformers "<SMILES>" --max-conformers N [--energy-window K] [--no-optimize]writes the ensemble; thenthermo screen <dir>screens it.Verified end-to-end
thermo conformers "CCCC"→ 2 conformers →thermo screen butane_confs --engine xtb-cli→ 2 results, 0 failed.Tests
tests/thermo/test_conformers.py(embed, max-count, energy-window, no-optimize, bad-SMILES, write→read, public export) + CLI parse/run +main()dispatch. RDKit is a declared dependency so these run in CI; the RDKit import is guarded with a clear message if absent (# pragma: no cover).Closes #30. Full suite: 268 passed / 11 skipped; patch fully covered.