Conversation
Remove the float32 cast in convert_traj_energy_npz_to_hf; the published energy tables were computed with float64 rMD17 energies. Add detect_quantized_energies/check_energy_precision to flag float32-cast absolute energies (few distinct values or float32-representable values with a coarse step). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- --window-scheme {legacy,shared}, default legacy: per-molecule
default_rng(seed) reseeding with starts in [0, 100000 - window), as in
run_trajectory_benchmark; bitwise-identical to the legacy runner.
- --metric-version {paper,v2}: paper = published implementation; v2 =
appendix definitions (RMS EJS sigma, separate CKA bandwidths, isoR2
dE ~ f(Delta), scale-free KS, TS/Smoothness only for time-ordered
frames, float32 distances).
- --n-jobs (order-preserving process pool, one BLAS thread per worker),
--molecules, --energy-precision-check, --time-ordered.
- E3FP pickles (lists of RDKit bit vectors) load from directories and
use Tanimoto distance; dense bit arrays can use --metric-embed tanimoto.
- Vectorise the pair-index helpers in traj/evaluation.py (values unchanged).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…versions Includes a bitwise equivalence test between the CLI protocol and the legacy runner (serial and parallel). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…nput validation - distance switch for continuous embeddings (euclidean default = published Table 2; cosine with an exact-zero diagonal); fingerprints keep Tanimoto - best-k silhouette scans k up to n-1 by default (the published run); the hard-coded min(10, n-1) of release 0.1.0 is available as --unsup-kmax 10 - metric_version paper (default, published code path) and v2 (tie-aware NN@1 over points with a same-class partner, centroid DBI, Hopkins on the supervised population, best-k silhouette on the selected distance) - per-molecule evaluation shared by both entry points; optional process pool (results independent of n_jobs) - clear errors for embedding rows != sum(n_conformers), non-finite values, inconsistent dataset offsets, duplicate keys and ambiguous pickle keys - no import-time dependency on utils.paths or sklearn_extra; legacy driver paths resolved lazily; config.json with options, coverage and versions Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…tion Fast synthetic tests for --distance (euclidean/cosine, fingerprints use Tanimoto), the unbounded best-k silhouette default, paper vs v2 definitions (NN@1 ties and structural zeros, centroid DBI vs sklearn, Hopkins population, cosine geometry), n_jobs invariance, input validation, the CLI options and the absence of import-time side effects. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
loky avoids forking a process that may already hold an OpenMP runtime and works the same on Linux and macOS. Each batch carries only its molecules' rows; workers use one BLAS/OpenMP thread. Per-molecule outputs are bit-identical to the serial path (checked on 300 molecules, UniMol and E3FP). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
run.sh downloads the chirality config of EscheWang/3dcs and the seven Table 2 embedding files of EscheWang/3dcs-embeddings (SHA-256 checked against models.csv), evaluates all models for the variants euclidean (published protocol), cosine, v2_euclidean and v2_cosine, writes results.csv and calls reproduce/compare.py when present. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Slice per-shard embeddings with row['shard'] and the per-shard offset of the published HF rotation config (offsets restart per shard; shards appear in string order). Flat arrays are aligned by the cumulative conformer count in dataset row order; converter datasets with global offsets are detected. - Add --metric-version presets (rotation/metrics.py): 'paper' reproduces the published Table 1 definitions recovered from the backup per-molecule outputs (Kendall only for >=11 conformers, CKA bandwidth of the original run, isotonic fit D=f(Delta) without guard, LIE k=10 incl. self on (1-cos)/2, AS median of (1-cos)/2 per rad incl. wrap-around); 'v2' follows the paper text (LIE k=3 excluding self, AS median ||dz|| per rad, median-heuristic CKA). - Selection options: shards, molecule list, per-shard sampler, min conformers. - Molecules whose RMSD cannot be computed are reported instead of aborting. - Optional replicate_offset_drift: recompute metrics with the embedding-cursor shift of the published full run (shards 1 and 2) in __offset_drift columns. - Parallel evaluation (fork), parquet per-key output, summary and config. - Embedding IO: skip string arrays when auto-selecting NPZ keys, accept a directory with one file, registry of the published embeddings layout. - Lazy lmdb imports; no directory creation at import time. - examples/run_rotation_from_hf.py: by-shard evaluation, flat .npy cache via numpy.lib.format.open_memmap with shard-specific cache names. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…, CI lint paths - Declare rdkit>=2023.9 and huggingface_hub; drop 'pip install rdkit-pypi' from Makefile, CONTRIBUTING and CI (no cp312 wheel; breaks with numpy 2). - scikit-learn-extra becomes the optional 'kmedoids' extra (0.3.0 fails to import with numpy 2; the default chirality path does not use it). - utils/paths: resolve data/results roots from $THREE_DBENCH_HOME or the current working directory instead of the package location. - CI: fail-fast off, lint examples/ and reproduce/, codecov fail_ci_if_error. - Authors and project URLs in pyproject; add CITATION.cff. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- python -m three_dbench download dataset --task {chirality,traj,rotation,all}
saves the EscheWang/3dcs configs to data/hf/... with save_to_disk.
- python -m three_dbench download embeddings --task ... [--models] [--results]
fetches files listed in EscheWang/3dcs-embeddings manifest.csv and verifies
their SHA-256 (cached files are not downloaded again).
- evaluate rotation: --layout by-shard, --offset-mode, --shards, --molecule-list,
--sample-ratio/--sample-seed, --min-conformers, --max-keys, --metric-version,
--lie-k, --lie-self, --as-variant, --extra-metrics, --replicate-offset-drift,
--n-jobs.
- Tests: mocked downloads, CLI help, import side effects, path resolution.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- reproduce/compare.py: PASS/FAIL/MISSING/NO_EXPECTED per expected row, non-zero exit on failures (contract shared by all reproduce/ directories). - reproduce/table1_geometry: run.sh (download, GemNet paper and v2 runs, collect, compare; QUICK=1 for shard 1), collect.py, expected.csv (paper values and means of the original per-molecule outputs for five models), expected_quick.csv, and the 146,389 molecule keys of the original 10 % run. - splits/rmd17: the official rMD17 train/test index files (splits 01-05) with checksums; Tables 8/9 inputs correspond to split 01. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- README: installation without rdkit-pypi, download helper, evaluation of published embeddings, per-table reproduction scripts and status table, links to datasets, embeddings and metric docs, BibTeX. - docs/METRICS.md index; docs/metrics/geometry.md (paper/v2/legacy definitions, provenance of Table 1, per-molecule agreement, embedding offset shift of the original full run, runtime). - docs/USAGE.md and docs/EMBEDDINGS.md for the new CLI options and the EscheWang/3dcs-embeddings layout (with integrator TODOs for the chirality and trajectory options). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…xpected warning Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…on fix - reproduce/table2_chirality/expected.csv: 136 rows (7 models x 4 variants x 5 metrics, E3FP Hopkins omitted) computed on the box with run.sh on the published embeddings; euclidean rows carry the printed paper values and notes (rounding rule, GemNet SCI sign, comparison with the Sep-2025 en_sep_results) - docs/metrics/chirality.md: distance switch, paper vs v2 definitions with code pointers, measured rationale, populations, expected values - make_results.py: pandas writes NaN as an empty field - v2: Hopkins is also NaN in the opt-in unsupervised_only branch Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Recomputed on the A100 box with the new CLI (legacy windows, float64 HF energies, 7 models x 1000 windows). The paper variant is bitwise equal to the legacy runner output used for the published tables. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Keep a single --metric-version / --n-jobs on 'evaluate' (both branches added them); chirality contributes --distance and --unsup-kmax. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Keep one --metric-version / --n-jobs on 'evaluate' (all three branches added them) and make their help task-agnostic. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ble in tests - docs/USAGE.md: chirality and trajectory option tables checked against the merged CLI; add --do-unsup-when-single-en, --time-ordered, --legacy-traj-len and --block-size. - pyproject: declare joblib (imported directly by the chirality --n-jobs path; previously only a transitive scikit-learn dependency). - tests/conftest.py: put the checkout root on sys.path so tests/test_demo.py can import examples.demo when pytest is started outside the repository (non-editable installs). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
RDKit's Tanimoto similarity of two all-zero fingerprints changed from 1.0 (<= 2025.09) to 0.0 (>= 2026.03), which made the dense-vs-RDKit comparison fail on Python 3.9 with the older wheel. The comparison now skips pairs of two all-zero fingerprints and the dense convention is asserted separately. The published E3FP fingerprints contain no all-zero vector (checked for all 999,988 trajectory frames and all 52,391 chirality conformers), so the reproduced tables do not depend on this; noted in docs/metrics/energy.md. Also: README status for Table 1 (full 16-shard GemNet run still pending, the published LIE@k / AS include the embedding-cursor shift) and for the fine-tuning tables. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…runner) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 2 medium |
| Security | 9 medium 3 minor 57 high |
| CodeStyle | 12 minor |
| Complexity | 17 medium |
🟢 Metrics 796 complexity · -4 duplication
Metric Results Complexity 796 Duplication -4
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
ComDec
marked this pull request as ready for review
September 18, 2026 03:14
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
This PR collects the reproducibility work for the ICLR 2026 paper on one branch: the released
Hugging Face data, evaluators whose defaults reproduce the published numbers, per-table
reproduction scripts with reference values, and documentation of what is and is not reproducible.
It merges three topic branches (
fix/rotation-infra,fix/chirality,fix/energy) plusintegration fixes. Draft: the Table 1 full recompute and the errata wording are still open.
Released data (already on the Hub, nothing to merge here)
EscheWang/3dcschirality,rotation,traj_frames,traj_energies, soload_dataset("EscheWang/3dcs", name=..., split="train")worksEscheWang/3dcs-embeddingsmanifest.csv(path, size, SHA-256, keys, shape, provenance), plus the original per-molecule metric outputs and the rMD17 split filestraj_energies(both inEscheWang/3dcsandEscheWang/3dcs-traj-energies).npz); the previous revision is named in each card's changelogEscheWang/3dcs-rotationcc-by-sa-4.0and the citationCode
Energy (Tables 3, 6, 7). Dropped the
float32cast of the rMD17 energies; added a quantizationcheck (
--energy-precision-check, defaulterror), the published window protocol(
--window-scheme legacy, the default), automatic Tanimoto for fingerprint pickles,--moleculesand
--n-jobs. The CLI now reproduces the legacy runner bit for bit (301,000 per-window values and7 × 43 summary cells).
Chirality (Table 2). Added
--distance {euclidean,cosine}. The default stays Euclidean,which is what produced the published Table 2; the paper text says cosine, and both variants are
published in
expected.csv. Added--unsup-kmax(defaultn-1, the published setting),--n-jobs, strict input validation (row counts, offsets, NaN/Inf, ambiguous keys) and support forthe E3FP pickle via
--embedding-key e3fp.Geometry (Table 1). The rotation
offsetcolumn is per shard, so embeddings are now slicedshard by shard (
--layout by-shard,--offset-mode auto). The previous flat slicing picked thewrong conformers for every shard but shard 0. The paper's metric definitions were recovered from
the backed-up per-molecule outputs (Kendall only for molecules with ≥ 11 conformers, the CKA
bandwidth, the isotonic-R² direction, LIE@k with k=10 including the conformer itself, AS as a
median per radian).
Dual-track metrics. Every evaluator takes
--metric-version {paper,v2}.paper(the default)reproduces the published numbers;
v2implements the corrected definitions, each documented withits rationale in
docs/METRICS.mdanddocs/metrics/{geometry,chirality,energy}.md.Infrastructure. New
python -m three_dbench download {dataset,embeddings}with SHA-256verification against the manifest;
rdkitdeclared correctly (rdkit-pypiremoved),scikit-learn-extramade optional,joblibdeclared; no import-time side effects;CITATION.cff;the official rMD17 split files under
splits/rmd17/; rewrittenREADME.md,docs/USAGE.md,docs/EMBEDDINGS.md,docs/METRICS.md.Reproduction scripts.
reproduce/{table1_geometry,table2_chirality,energy_tables_3_6_7}/eachhave a
run.sh(download → evaluate →results.csv) and anexpected.csvwith the printed value,the recomputed value at 6 decimals, a tolerance and notes;
reproduce/compare.pyprints PASS/FAIL.Findings recorded in the documentation
processed and the embedding cursor was not advanced, so the molecules after them in shards 1 and 2
(91,093 of 1,464,493, 6.2 %) were scored with embeddings shifted by 3 and 7 rows. This affects the
LIE@k and AS columns.
--replicate-offset-driftreproduces it; the regular columns use alignedembeddings. Estimated effect on LIE@k: about 0.012–0.024 too high; the model ranking is unchanged.
of Table 6 are only partially reproducible from the backed-up embeddings. Every case is listed in
the
notescolumn ofexpected.csv.MolSpectra, MACE and FMG (
docs/EMBEDDINGS.md).Verification
All checks were run on a 128-core Linux box with the merge commit of this branch.
Tests and lint
PYTHONPATH=srcpytest131 passedpip install .(non-editable)pytest131 passedpip install ".[dev]"pytest131 passedruff checkandruff format --checkonsrc/ tests/ examples/ reproduce/cleanpython examples/demo.py allruns end to end against the Hub without a token.Table 2 (chirality), end to end from the Hub, anonymously
bash reproduce/table2_chirality/run.shdownloaded thechiralityconfig and all 7 embeddingfiles (SHA-256 verified against
models.csv), ran 28 evaluations (7 models x{euclidean, cosine, v2_euclidean, v2_cosine}, ~55 s each with 22 workers) and
reproduce/compare.pyreported 136 PASS, 0 FAIL (largest deviation 5e-7).Tables 3, 6, 7 (energy)
expected.csv: 413 PASS, 0 FAIL.each,
--metric-version paper, 331 s and 302 s with 22 workers): 78 PASS, 0 FAIL. Thisexercises
run.sh, the float64 energies from the re-uploadedtraj_energies, and thetraj/<model>/embeddings from the new repository.Data access
python -m three_dbench download {dataset,embeddings}was run against the live repositories withouta token, including the SHA-256 verification against
manifest.csv.Not re-run here: the full 16-shard Table 1 GemNet run, and the 5 energy models other than GemNet
and E3FP in the end-to-end script (their values come from the full run above).
Still open
fine-tuning are being prepared for a later release; none are planned for the rMD17 tables.
run;
expected.csvcarries the reference values from the backed-up per-molecule outputs, and thepaper_aligned/v2cells stay empty until that run.published.
🤖 Generated with Claude Code