Intentionally Corrupt Molfile — Counts Line Disagrees With the Atom Block (.mol)
An intentionally corrupt molfile whose counts line declares twelve atoms while the atom block contains nine, so a parser reading by count consumes three bond lines as atoms. Everything else about the file is well formed, which is what makes the failure quiet.
intentionally corrupt ethanol
NovusEx 3D synthetic idealised geometry
Counts line deliberately disagrees with the atom block.
12 8 0 0 0 0 0 0 0 0999 V2000
-1.2456 0.2436 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 -0.5876 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.1636 0.2296 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
-2.1345 -0.3861 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
-1.2734 0.8797 0.8837 H 0 0 0 0 0 0 0 0 0 0 0 0
-1.2734 0.8797 -0.8837 H 0 0 0 0 0 0 0 0 0 0 0 0
0.0384 -1.2270 0.8850 H 0 0 0 0 0 0 0 0 0 0 0 0
0.0384 -1.2270 -0.8850 H 0 0 0 0 0 0 0 0 0 0 0 0
1.9524 -0.3175 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
2 3 1 0
1 4 1 0
1 5 1 0
1 6 1 0
2 7 1 0
2 8 1 0
3 9 1 0
M END
Specifications
- Intentionally Corrupt
- true
- Declared Atoms
- 12
- Actual Atoms
- 9
- Declared Bonds
- 8
- Actual Bonds
- 8
- Damage
- counts line claims three atoms that are not present
- Everything Else Valid
- true
Testing contract
Expected to fail- Scenario
- Parse the file by trusting the counts line, then validate the atom block length against it.
- Expected result
- A count-trusting parser misreads three bond lines as atoms and produces nonsense elements, while a validating parser reports that the counts line declares 12 atoms and only 9 exist.
What is a .mol file?
An MDL Molfile (.mol) is a plain-text chemical structure format describing a single molecule: a counts line, an atom block with element symbols and 2D or 3D coordinates, and a bond block listing connections and orders. It is a core part of the SDF format and is read by nearly every cheminformatics tool.
How to use this file
Use an example .mol file to test molecule parsers and viewers (RDKit, Open Babel, Jmol), structure-format converters (MOL to SMILES, SDF, or PDB), and cheminformatics pipelines.
How to use this file for testing
“Intentionally Corrupt Molfile — Counts Line Disagrees With the Atom Block (.mol)” is a deterministic Novus Examples fixture for Scientific data, Error handling, Editor testing. Citation catalogs (BibTeX, RIS), chemistry structures (MDL Molfile, PDB), and gridded binary data (NetCDF, FITS) — for testing reference managers, molecule viewers, and scientific-data loaders.
Documented properties for this file: damage: counts line claims three atoms that are not present · intentionally corrupt. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Scientific fixtures are small, valid, and fully synthetic — no real organism, patient, sample, or observation. Point your parser or loader at the file and check it reads the documented records, variables, or headers; binary formats ship a readable twin or metadata listing for comparison.
Related files
- cifCIF Parser Edge Cases — Quotes, Text Fields and Wrapped Loops (.cif)A CIF built entirely out of the constructs that break naive parsers: quoted values containing apostrophes and hashes, a semicolon-delimited multi-line text field, the distinct '?' and '.' markers, a standard uncertainty written as 1.2345(7), and a loop whose rows wrap across lines. Every one of them is legal CIF.

- csvCensored Values and Detection Limits — Non-Numeric Results (.csv)Nine laboratory results where only four are plain numbers: two are below the detection limit, one is above range, two are missing in different spellings, and one is a legitimate small negative near the blank. Coercing the censored strings to numbers or to NaN both bias the summary, and the file distinguishes every case explicitly.

- jsonIEEE-754 float64 Boundary Values — JSON With No NaN Literal (.json)The same boundary values as strict RFC 8259 JSON, where non-finite numbers are null in the numeric field and text in the string field because the standard has no NaN or Infinity literal. It is the fixture for the encoder that emits bare NaN and produces JSON nothing else will parse.

- jsonIntegers Beyond 2^53 in JSON — Silent Identifier Corruption (.json)Six large integers written both as JSON numbers and as strings, including the 2^53 boundary where consecutive integers stop being distinguishable in a double. A parser backed by doubles turns 9007199254740993 into 9007199254740992 and reports no error at all.

- mtxMatrix Market — Zero Stored Entries, Still Valid (.mtx)A valid Matrix Market file describing a 6x6 matrix with no stored entries, which is an all-zero matrix rather than an error. It separates readers that model an empty result from readers that treat a missing entry block as truncation.

- fastaProtein FASTA — Ambiguity Codes X, B and Z (.fasta)Three synthetic protein sequences that begin with methionine and include the X, B and Z ambiguity codes, which are legal IUPAC residues rather than errors. A validator restricted to the twenty standard amino acids rejects all three files.

Generated by generation/scientific.py. Free for any use, no attribution required — license.