Bringing σ-profiles into a LIMS or ELN with provenance intact
Store the whole .mfsig file as the record, index a dozen fields beside it and key on the content SHA-256. The file then answers later audit questions.
Updated November 28, 2026
Bring a σ-profile into a LIMS or an ELN by storing the whole .mfsig file unchanged as the record, indexing a dozen fields from it as columns, and using the content SHA-256 as the key that ties the two together. The file carries its own method block and provenance, so an auditor can read it years later without the pipeline that produced it. The columns exist for querying and can always be rebuilt from the file.
The file is the record, the columns are the index
Two bad patterns are common. One stores only the numbers somebody needed on the day, the variance and the gap, say, and loses the method and the segments. Two years later the recipe has changed and nobody can tell which version produced the numbers. The other stores the file as an opaque attachment with no indexed fields, so that finding every profile computed with a given recipe means opening every file.
The good pattern is both at once. The .mfsig file is stored exactly as downloaded, byte for byte. Beside it a flat table holds the fields that people query. The content SHA-256 inside the file is the key of both. If a column ever disagrees with the file, the file wins and the column is rebuilt. This is the principle the provenance record guide describes, applied to a database.
The dozen fields worth indexing
From the identity block, the SMILES as written, the number of dropped fragments and the number of unassigned stereocentres. From the method block, the recipe version and the functional, basis set and dielectric constant it implies. From the geometry block, the convergence flag. From the descriptors, the surface area, the three σ-moments, the HOMO-LUMO gap in electronvolts and the dipole norm in debye. From the end of the file, the content SHA-256 and the package versions. Check the exact key names on the anatomy page rather than typing them from memory, since they are versioned with the schema.
Add three columns of your own. Your project identifier for the molecule. The canonical SMILES from your toolkit, which may differ in string from the SMILES as written. And the ingestion record, who imported the file, when, and from which order. The per-segment data stays in the file. It is large, it is rarely queried and it is never edited.
An ingestion step that validates before it writes
import hashlib, json, datetime
REQUIRED = [IDENTITY_KEY, GEOMETRY_KEY, METHOD_KEY, SEGMENT_KEY,
MOMENTS_KEY, ENERGIES_KEY, HASH_KEY] # names: see /anatomy
def ingest(path, project_id, user):
with open(path, "rb") as fh:
raw = fh.read()
doc = json.loads(raw)
print(list(doc)) # top-level keys
missing = [k for k in REQUIRED if k not in doc]
if missing:
raise ValueError(f"{path}: missing blocks {missing}")
if not doc[GEOMETRY_KEY][CONVERGED_KEY]:
raise ValueError(f"{path}: geometry not converged")
row = {
"content_sha256": doc[HASH_KEY],
"smiles_as_written": doc[IDENTITY_KEY][SMILES_KEY],
"recipe": doc[METHOD_KEY][RECIPE_KEY],
"area": doc[AREA_FIELD_KEY],
"gap_ev": doc[ENERGIES_KEY][GAP_KEY],
"dipole_debye": doc[DIPOLE_KEY],
"project_id": project_id,
"ingested_by": user,
"ingested_at": datetime.datetime.now(datetime.timezone.utc).isoformat(),
"transport_sha256": hashlib.sha256(raw).hexdigest(),
}
return row, raw # raw goes to the attachment store, row to the tableThe transport hash of the bytes as received is kept beside the content hash from inside the file. The first proves the attachment was not altered in your store. The second is the identifier of the result. How the content hash is computed is on the anatomy page, and the content hashing guide explains the distinction. The file validation guide lists further checks, such as comparing the sum of segment areas with the surface area field, that belong in this step before anything is written.
Linking to compounds, not to lots
A σ-profile describes a molecular species, not a lot of material. Link the record to the registered compound through the canonical SMILES, and let the compound link to lots, batches and experiments as the LIMS already does. Do not link a profile to a lot directly. A lot has a counter-ion, a hydrate form and impurities, and a profile has none of these. When the ELN records a solvent-screening experiment, cite the profiles by their content hash, so that the experiment page names exactly which computed inputs informed the decision.
When the recipe changes
Recipes change. When a new recipe version ships, old files stay valid as records of what was computed under the old recipe, and new files carry the new version. Never overwrite. Add. A query by recipe version then shows which molecules have been recomputed and which have not. The 21 CFR Part 11 guide describes what a regulated environment expects of the consuming side. The combination of unchanged files, indexed recipe versions and an ingestion log with user and time is most of what an inspector asks for.
Key points
- Store the .mfsig file unchanged as the record and index about a dozen fields beside it. The file wins any disagreement.
- Key everything on the content SHA-256 and keep a transport hash of the stored bytes beside it.
- Index identity, recipe version, convergence, area, σ-moments, gap and dipole, plus your own identifier and the ingestion log.
- Link profiles to compounds, not to lots, and cite them in experiments by hash.
- When the recipe changes, add new records and never overwrite old ones.
Questions people ask
- Should I store the .mfsig file or just the numbers I need?
- Both. Store the file unchanged as an attachment, and extract the few fields you query into indexed columns. The file is the record and carries the method block and the content hash. The columns are a convenience that can be rebuilt from the file at any time.
- What should the primary key of a σ-profile record be?
- The content SHA-256 of the .mfsig file. It is unique to the content, independent of file name and location, and lets two sites recognise the same result. Keep the SMILES as written and the recipe version as indexed columns beside it.
- How does this fit 21 CFR Part 11 expectations?
- Part 11 asks for records that are accurate, attributable, retrievable and protected from undetected change. A file with a provenance record and a content hash, stored unchanged, with an ingestion log that names who imported it and when, covers the computed-data part. The LIMS supplies the access control and the audit trail.
Further reading
In practice: A .mfsig file is JSON and reads with the standard library. Ordering is done on the site or through the API described in the docs, and AI agents can read the published samples through the MCP server at /mcp.
Generate a σ-profile from your SMILES
Free converter for a profile you already have, a reference-grade DFT run with its provenance record when it has to be defensible.