Skip to content

Benchmark reconstruction from SMILES

The runner uses RDKit to generate coordinates from a list of SMILES and checks whether each method reconstructs the original graph. Use a short list for regression checks. 简体中文

Run the example

From the repository root, activate the benchmark environment and run the first ten entries in the example file.

source .venv-benchmark/bin/activate
python -m benchmarks.smiles_xyz_benchmark.run \
  --input tests/test_cases.csv --limit 10 \
  --out benchmarks/_runs/smiles-demo

Open results.csv in the output directory. Seven methods and ten inputs give 70 records. The file summary.csv gives match counts and timings for each method. CSV fields and denominators

Use your own SMILES

Set --input to a UTF-8 text file with one SMILES per nonempty line. For example, the runner accepts the following single column.

smiles
CCO
c1ccccc1

The optional header can be smiles, canonicalsmiles, or canonicalsmi. A first line of general can precede any of these headers. The runner skips headers and empty lines before applying --limit. Example input

Coordinates and reference graph

  1. RDKit reads the SMILES, retains the original molecule as the reference, and generates canonical SMILES for the results table.
  2. It adds explicit hydrogens, embeds a 3D conformer with a fixed random seed, and optimizes the coordinates with the universal force field (UFF).
  3. The runner derives total formal charge and radical-electron count from the hydrogen-complete graph and supplies XYZ to the methods. If preparation fails, each method receives a skipped record. Input preparation
Compare runs or measure MolGR C++ batch throughput

Use the same inputs, entry limit, registry, and dependency lockfile. Record the Git commit and write each run to a separate output directory. By default, cases run serially while MolGR C++ can parallelize within a molecule. Add --jobs N with N greater than one to schedule cases through native batching. Benchmark lockfile