diff --git a/CHANGELOG.md b/CHANGELOG.md index 803f7a1..8eb93c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -102,3 +102,22 @@ It is a minor change in the sense of [spec/00](spec/00-introduction.md): a new b - `fixtures/records/traces/` is a second layer, on the Typst draft, with a model's confirmed trace to the main example's abstract and its receipt, a rejected candidate, a person's trace to Table 1 and a reply that disputes the first, and `vectors/traces.jsonl` has 29 cases that correct either paper and show every outcome and both rules. `paperspec check` runs both layers through the record checks and the store. The example project holds the new layer, which changes `project.json`; no other fixture changes. + +One more, asked for by paperchem and a sequence tool to come, which tie molecules and sequences to the words of a paper. +It is a minor change in the sense of [spec/00](spec/00-introduction.md): two new body kinds, optional properties and seven rules, with no valid file made invalid and no computed value changed; the example layers, the traces and every receipt are as they were. + +- Chemical structures ([spec/18 §18.6](spec/18-layers.md#186-chemical-structures), `annotation.schema.json`): a `structure` body ties a SMILES or SMARTS to a span, with a `role` (`names`, `depicts`, `parametrizes` or `uses`), an `identity` that finds the same structure however it was written (the InChIKey of a SMILES, else `smiles:` or `smarts:` and twelve hex digits of the SHA-256 of the value), the paper's own `written` notation, a `label`, outside `accessions` and `terms`: the bonds, angles, torsions and impropers a paper gives constants for. + A group, a fragment with open positions (`R-OH` is `[*:1]-[OX2H]`) and a pattern of atom types are SMARTS, and SMILES text a toolkit would refuse is kept as one rather than dropped. + A term cites atoms by number, from 0 in the order the value writes them and with no number for a hydrogen that is not written, so the numbers are a rule of the text and a producer needs no toolkit to check them. +- Sequences ([spec/18 §18.7](spec/18-layers.md#187-sequences), `annotation.schema.json`): a `sequence` body ties protein, DNA or RNA residues to a span, with an `alphabet`, a `role` (`names`, `depicts`, `uses` or `reports`), an `identity` (the alphabet and sixteen hex digits of the SHA-256 of the residues without gaps), a `start` so a fragment is numbered as the whole molecule is, a `label`, an `organism`, `accessions`, `regions` and `variants`. + The schema holds each alphabet's letters; a stop (`*`) belongs to protein only. +- `paperspec.structures` and `paperspec.sequences` and the rules `layer.structure.value`, `layer.structure.identity`, `layer.structure.term`, `layer.sequence.value`, `layer.sequence.identity`, `layer.sequence.region` and `layer.sequence.variant` ([spec/22 §22.4](spec/22-conformance.md#224-rules)). + `structures.scan` reads the atoms and bonds of a SMILES or SMARTS with the standard library, so a term's atoms are checked to exist and to be joined as the kind needs (a chain for a bond, angle or torsion, a star for an improper); it gave RDKit's atom count and bonds for a corpus of fifty-five SMILES and SMARTS and for three thousand random SMILES, and refused the malformed texts RDKit refuses. + Valence, aromaticity and the InChIKey need a toolkit, which a producer SHOULD use for them. +- `body_kind` of the store's `annotations` table takes `structure` and `sequence` ([sql/store.sql](sql/store.sql)). + A store made before this change has the old CHECK, so a consumer migrates it by rebuilding the table; the table's columns do not change. +- The JSON-LD context gains nine terms: `identity`, `written`, `alphabet`, `organism`, `start`, and `accessions`, `terms` (as `sct:structureTerms`), `regions` and `variants` as JSON literals. +- `fixtures/records/chemistry/`, on the main example, and `fixtures/records/biology/`, on the draft, with `vectors/structures.jsonl` (64 cases) and `vectors/sequences.jsonl` (31): scans, identities, annotations that break no rule and one that breaks each. + The example project holds the two layers, which changes `project.json`. + The draft gains a last sentence, which the biology layer is about, so the draft package, its draft IDs and the one traces vector that anchors its paragraph change; the traces layer's anchors, its receipt and every other vector are as they were. +- The prose check's UK spelling pattern no longer takes `organism` for a form of `organise`. diff --git a/context/README.md b/context/README.md index 7c2f837..b5d538e 100644 --- a/context/README.md +++ b/context/README.md @@ -57,14 +57,14 @@ This context defines `kind`, `status`, `audience`, `AnchorSelector` and `anchor` ## What it defines -The file defines 27 terms. -Twenty-six map to IRIs under `https://paperspec.scient.ing/vocab#`: `format`, `kind`, `status`, `receipt`, `layer`, `audience`, `visibility`, `purpose`, `project`, `docs`, `pin`, `role`, `symbol`, `key`, `verdict`, `reason`, `reference`, `note`, `proposer`, `for`, `category`, `generator`, `exercise`, `anchor`, `rights_use` and the class `AnchorSelector`. -Five are renamed: `key`, the key of a `symbol` body's symbol, is `sct:symbolKey`, `for` is `sct:questionFor`, `generator` is `sct:generatedBy`, `proposer`, the tool that found a trace, is `sct:proposedBy`, and `rights_use` is `sct:rightsUse`. -The twenty-seventh, `total`, maps to `totalItems` in the ActivityStreams namespace. +The file defines 36 terms. +Thirty-five map to IRIs under `https://paperspec.scient.ing/vocab#`: `format`, `kind`, `status`, `receipt`, `layer`, `audience`, `visibility`, `purpose`, `project`, `docs`, `pin`, `role`, `symbol`, `key`, `verdict`, `reason`, `reference`, `note`, `proposer`, `identity`, `written`, `alphabet`, `organism`, `start`, `accessions`, `terms`, `regions`, `variants`, `for`, `category`, `generator`, `exercise`, `anchor`, `rights_use` and the class `AnchorSelector`. +Six are renamed: `key`, the key of a `symbol` body's symbol, is `sct:symbolKey`, `for` is `sct:questionFor`, `generator` is `sct:generatedBy`, `proposer`, the tool that found a trace, is `sct:proposedBy`, `terms`, the force-field terms of a structure, is `sct:structureTerms`, and `rights_use` is `sct:rightsUse`. +The thirty-sixth, `total`, maps to `totalItems` in the ActivityStreams namespace. Two terms carry a type rule. A processor reads `layer` as an IRI, and it always reads `docs` as a set, so a one-element list stays a list. -The file declares `anchor`, `exercise` and `proposer` as JSON literals (`"@type": "@json"`, a JSON-LD 1.1 feature, which is why the file sets `"@version": 1.1`). +The file declares `anchor`, `exercise`, `proposer`, `accessions`, `terms`, `regions` and `variants` as JSON literals (`"@type": "@json"`, a JSON-LD 1.1 feature, which is why the file sets `"@version": 1.1`). A JSON-LD processor then keeps a `scienting-anchor/1` record intact instead of expanding it. An anchor holds hashes (fixed-length fingerprints of text) and a `span`, a pair of character offsets whose order carries meaning. Expansion would drop the anchor's unmapped field names ([JSON-LD 1.1 API, expansion step 13.3](https://www.w3.org/TR/json-ld11-api/#alg-expand-each-key-value)) and would give its arrays no order ([JSON-LD 1.1 §4.3](https://www.w3.org/TR/json-ld11/#sets-and-lists)). @@ -97,6 +97,14 @@ A `trace` body ([spec/18 §18.5](../spec/18-layers.md#185-traced-citations)) fol The Web Annotation context defines `source` and `selector` for a body as it does for a target, so a trace's selector list puts the `AnchorSelector` first and the `TextQuoteSelector` after it, as a target's does. This context adds the rest of the body: `reference`, the reference of the draft that the sentence cites, `note`, `verdict` and `proposer`, which a processor keeps whole, as it keeps an anchor, because its model's hashes and its score are values and not terms. +## Bodies that hold a structure or a sequence + +A `structure` body ([spec/18 §18.6](../spec/18-layers.md#186-chemical-structures)) ties a molecule, a group or a pattern to a span, and a `sequence` body ([§18.7](../spec/18-layers.md#187-sequences)) ties a protein, DNA or RNA sequence to one. +Both are text bodies, so the Web Annotation context supplies `value` and this one adds the rest: `identity`, the key that finds the same structure or sequence however it was written, `written`, `alphabet`, `organism` and `start`. +`accessions`, `terms`, `regions` and `variants` are lists of objects whose field names mean nothing outside their body, so the context declares them JSON literals, as it does an anchor, and a processor keeps them whole. +`terms` maps to `sct:structureTerms`, because the word alone is too general for a vocabulary that other kinds of body may join. +[`fixtures/records/chemistry/annotations.jsonl`](../fixtures/records/chemistry/annotations.jsonl) and [`fixtures/records/biology/annotations.jsonl`](../fixtures/records/biology/annotations.jsonl) hold four structures on the example paper and three sequences on the draft. + ## Using the context - Writer: Put both URLs (web addresses), in the order shown, in `@context` of `layer.json` and of every line of `annotations.jsonl`. [Chapter 18](../spec/18-layers.md) defines layers (§18.2), annotations (§18.3) and bodies (§18.4). @@ -104,7 +112,7 @@ This context adds the rest of the body: `reference`, the reference of the draft The file `vectors/resolve.jsonl` resolves seventeen anchors against `fixtures/packages/hale2026harmonic-damb` and gives every outcome. - JSON-LD processor: Use a JSON-LD 1.1 processor; the context relies on `@json` and `@version` 1.1. - Checker: `schemas/annotation.schema.json` and `schemas/layer.schema.json` validate the files. - `paperspec check` also checks that each annotation's ID derives from its content and that the receipt of its layer, at `fixtures/records/layer/receipt.json` or `fixtures/records/traces/receipt.json`, covers each `confirmed` annotation. + `paperspec check` also checks that each annotation's ID derives from its content and that the receipt of its layer, in the `receipt.json` beside `fixtures/records/layer/`, `traces/`, `chemistry/` or `biology/`, covers each `confirmed` annotation. The traps: diff --git a/context/scienting-1.jsonld b/context/scienting-1.jsonld index 7a40043..ff973ee 100644 --- a/context/scienting-1.jsonld +++ b/context/scienting-1.jsonld @@ -30,6 +30,27 @@ "@id": "sct:proposedBy", "@type": "@json" }, + "identity": "sct:identity", + "written": "sct:written", + "alphabet": "sct:alphabet", + "organism": "sct:organism", + "start": "sct:start", + "accessions": { + "@id": "sct:accessions", + "@type": "@json" + }, + "terms": { + "@id": "sct:structureTerms", + "@type": "@json" + }, + "regions": { + "@id": "sct:regions", + "@type": "@json" + }, + "variants": { + "@id": "sct:variants", + "@type": "@json" + }, "for": "sct:questionFor", "category": "sct:category", "generator": "sct:generatedBy", diff --git a/docs/comparison.md b/docs/comparison.md index 3516258..94bb301 100644 --- a/docs/comparison.md +++ b/docs/comparison.md @@ -428,7 +428,7 @@ Keep using it as a reading and distribution format. *Status.* The specification is version 0.1.0. `registry/formats.json` lists 32 formats: 19 are `candidate` (complete, with vectors and fixtures, ready to implement) and 13 are `provisional` (complete; expected to change as implementations gain experience): project, bundle, dataset, digitization, view, snapshot, draft-ids, exercise, submission, grade, checklist, log-entry and checkpoint ([spec/00 §0.4](../spec/00-introduction.md#04-status)). -The repository holds 24 chapters, 43 JSON Schemas, 26 vector files, five valid fixture packages, one of them also zipped, and 31 invalid ones, each naming the rule it breaks, and a reference checker, `paperspec check`. +The repository holds 24 chapters, 43 JSON Schemas, 28 vector files, five valid fixture packages, one of them also zipped, and 31 invalid ones, each naming the rule it breaks, and a reference checker, `paperspec check`. Licenses: prose CC BY 4.0; schemas, SQL, the JSON-LD context, registries, vectors and fixtures CC0 1.0; the code in `src/` Apache-2.0 ([README.md](../README.md#licenses)). *No adoption claim.* diff --git a/docs/concepts.md b/docs/concepts.md index 4f53650..9aaf18f 100644 --- a/docs/concepts.md +++ b/docs/concepts.md @@ -378,8 +378,13 @@ Model-written text is always a `generated` annotation, never source, and a model Whether a generic Web Annotation client displays an `AnchorSelector` has not been tested; the fallback exists so that it can still use the quote. A `trace` annotation follows a citation to the passage it rests on: it targets the citing sentence and its body names the reference, the cited paper and the passage in it. Whether a trace still leads there is computed from both papers rather than stored: `current`, `changed`, `stale`, `unlinked` or `misresolved`. +A `structure` annotation ties a chemical structure to the words that name it, and a `sequence` annotation does the same for a protein, DNA or RNA sequence. +Nothing finds a molecule in free text, so a person ties each one by hand and the words stay the paper's. +A structure is a SMILES for a molecule or a SMARTS for a group, a fragment with open positions (`R-OH`) or a pattern of atom types, and it may carry the bonds, angles and torsions the paper gives force-field constants for, citing atoms by their numbers in the text. +A sequence has an alphabet, an optional numbering that starts where the fragment does, regions and variants checked against the residues. +Both carry an `identity` that finds the same structure or sequence however it was written. Layers are `candidate`. -Pinned by the layer records in `fixtures/records/layer/` and `fixtures/records/traces/`, and by [vectors/traces.jsonl](../vectors/traces.jsonl). +Pinned by the layer records in `fixtures/records/layer/`, `traces/`, `chemistry/` and `biology/`, and by [vectors/traces.jsonl](../vectors/traces.jsonl), [vectors/structures.jsonl](../vectors/structures.jsonl) and [vectors/sequences.jsonl](../vectors/sequences.jsonl). See [chapter 18](../spec/18-layers.md). ## Exercises diff --git a/docs/examples.md b/docs/examples.md index ad94637..862f243 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -244,6 +244,42 @@ The first trace is disputed by a reply that says the table is the better passage The outcomes here are all `current`; [vectors/traces.jsonl](../vectors/traces.jsonl) corrects the draft or the paper and shows the others: `changed` when the passage was reworded but is still found, `stale` when it is gone, `unlinked` when the sentence no longer cites the reference, and `misresolved` when the reference now resolves to another paper. Resolving a trace also lists the citations inside the passage, so a chain of "as previously reported" is followed one trace at a time. +## Read the structures and sequences tied to a paper's words + +This shows how a molecule or a sequence is tied to the words that name it, and how the layer checks what it holds. +Nothing finds a molecule in free text, so a person ties each one: a `structure` annotation holds a SMILES or SMARTS, a `sequence` annotation holds residues, and the span is the annotation's target ([chapter 18](../spec/18-layers.md#186-chemical-structures)). +The main example has a layer of four structures and the draft a layer of three sequences, and `paperspec.structures` and `paperspec.sequences` check each against the rules, with the standard library alone: + +```python +import json +from paperspec import sequences, structures + +for name, module in (("chemistry", structures), ("biology", sequences)): + for line in open(f"fixtures/records/{name}/annotations.jsonl", encoding="utf-8"): + a = json.loads(line) + quote = a["target"]["selector"][1]["exact"] + print(a["status"], a["body"]["role"], a["body"]["identity"], repr(quote), module.problems(a)) + +atoms, bonds = structures.scan("O([H])[H]") +print(atoms, sorted(bonds)) +``` + +```text +confirmed names OTMSDBZUPAUEDD-UHFFFAOYSA-N 'ethane' [] +proposed names XLYOFNOQVPJJNP-UHFFFAOYSA-N 'Water' [] +confirmed parametrizes smarts:2e2a923f840c 'CT–CT' [] +confirmed parametrizes XLYOFNOQVPJJNP-UHFFFAOYSA-N 'OW–HW' [] +confirmed names protein:5807fcbf6d5567ca 'villin headpiece subdomain HP35' [] +confirmed depicts protein:5807fcbf6d5567ca 'LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF' [] +proposed reports protein:5807fcbf6d5567ca 'N68H' [] +3 [(0, 1), (0, 2)] +``` + +Each line gives the annotation's status, what its span does with the structure, the identity, the words, and the rules it breaks, none here. +The identity finds the same thing however it was written: the name a model proposed for water, `O`, and the `O([H])[H]` that Table 1's OW–HW constants are given on are one molecule, and all three annotations of the peptide share one identity. +The last line is the rule that lets a term cite atoms without a chemistry toolkit: `O([H])[H]` writes three atoms, numbered from 0 as it writes them, and the oxygen (0) is bonded to each hydrogen (1 and 2) and the hydrogens are not bonded to each other, so a bond term on atoms 1 and 2, or an angle on atoms 0, 1 and 2, is refused. +[vectors/structures.jsonl](../vectors/structures.jsonl) and [vectors/sequences.jsonl](../vectors/sequences.jsonl) show every rule broken. + ## Test your implementation against a vector A test vector is a recorded input together with the output every correct implementation must produce. diff --git a/docs/faq.md b/docs/faq.md index 7489177..9de0027 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -107,7 +107,7 @@ A `candidate` format is complete, with vectors and fixtures, and ready to implem A `provisional` one is complete and expected to change as implementations gain experience. The provisional formats are dataset, digitization, view, project, bundle, snapshot, draft-ids, exercise, submission, grade, checklist, log-entry and checkpoint. -The repository holds a reference checker (`paperspec check`), 26 vector files, five valid packages, one of them also as a zip, and 31 deliberately broken packages ([spec/00 §0.4](../spec/00-introduction.md#04-status), [spec/22](../spec/22-conformance.md)). +The repository holds a reference checker (`paperspec check`), 28 vector files, five valid packages, one of them also as a zip, and 31 deliberately broken packages ([spec/00 §0.4](../spec/00-introduction.md#04-status), [spec/22](../spec/22-conformance.md)). ## What does it not do? diff --git a/docs/glossary.md b/docs/glossary.md index 748afc9..4d3a204 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -165,6 +165,10 @@ In the W3C Web Annotation Data Model, the part of an annotation's target that sa The model defines `TextQuoteSelector` (exact text, with optional prefix and suffix) and `TextPositionSelector` (offsets, which the model calls very brittle), among others ([the W3C model](https://www.w3.org/TR/annotation-model/)). Layers use a custom `AnchorSelector`, which carries an anchor, followed by a `TextQuoteSelector` for tools that do not know it; they use neither `TextPositionSelector` nor `FragmentSelector`. ([18.3](../spec/18-layers.md#183-the-annotation)) +Sequence +: The residues of a protein, DNA or RNA, tied to the words that name, show or report a variant of them by a `sequence` annotation. +Its identity is a hash of the residues with the gaps taken out, and its residues are numbered from the `start` the body gives, so a fragment is numbered as the whole molecule is. ([18.7](../spec/18-layers.md#187-sequences)) + Spot-check : A second reviewer's check of a sample of a receipt's nodes, drawn from a seed nobody can steer: the checker's deterministic signature over the receipt's record hash. ([8.8](../spec/08-fidelity.md#88-spot-checks)) @@ -174,6 +178,10 @@ Stamp rule Strict projection : A node's text with notation folded to one canonical form and structure kept; used for certifying agreement. ([5.3](../spec/05-hashes.md#53-the-strict-projection)) +Structure +: A chemical structure tied to the words that name, draw, parametrize or use it by a `structure` annotation: a SMILES for a molecule, or a SMARTS for a group, a fragment with open positions or a pattern of atom types. +Atoms are numbered from 0 in the order the text writes them, and the bonds, angles and torsions a paper gives constants for cite them by number. ([18.6](../spec/18-layers.md#186-chemical-structures)) + Suspect : A doubtful reading raised for a person or a review session to answer. ([5.7](../spec/05-hashes.md#57-suspects)) diff --git a/docs/overview.md b/docs/overview.md index a7747ea..509371f 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -56,7 +56,7 @@ It appears inside hashed data and test vectors, and it is separate from the repo | [registry/](../registry/README.md) | The list of formats, the rule IDs a checker reports, download-stamp rules, and default rights requirements. | | [tools/](../tools/README.md) | How to run the reference commands: `paperspec check` checks everything, `paperspec build` rebuilds the fixtures and vectors, and `paperspec load` loads packages into SQLite. | | [src/paperspec/](../src/paperspec/) | The oracle, a compact implementation of every rule, which the other repositories of the project install as the Python package `paperspec`. | -| [vectors/](../vectors/README.md) | 26 files of test vectors: inputs and the exact outputs every implementation must compute. | +| [vectors/](../vectors/README.md) | 28 files of test vectors: inputs and the exact outputs every implementation must compute. | | [fixtures/](../fixtures/README.md) | Five valid example packages, one of them also as a zip, 31 deliberately broken ones that each break one named rule, example records, and the test keys that signed them. All text is synthetic. | | [sql/](../sql/README.md) | Tables for SQLite, Dolt and PostgreSQL, and a SQLite bundle with full-text search. | | [context/](../context/README.md) | The JSON-LD context that makes annotation layers W3C Web Annotations. | diff --git a/fixtures/README.md b/fixtures/README.md index d1d492b..cd49c67 100644 --- a/fixtures/README.md +++ b/fixtures/README.md @@ -49,6 +49,8 @@ Each record is a single file, or a folder where a format needs several files. | `roster.json` | The keys that may sign, the role of each key's holder in the team, and what each key may sign. Ana is the owner, so she may revoke anyone's receipt. | | `layer/` | A layer of annotations on the main example (`layer.json`, `annotations.jsonl`) and the receipt that confirms them (`receipt.json`). Its claim link and its symbol name the claim `amber/k-bond` of paperclaim's example store as paperclaim references it, `claim:272XTX7C`, pinned at `claim:272XTX7C@02f47b`; the symbol names `K_r` by its key, `K_{r}`. | | `traces/` | A layer of traced citations on the Typst draft, which cites the main example (`layer.json`, `annotations.jsonl`, `receipt.json`): a trace a model proposed from the draft's citation of "a two-step fit" to the abstract of the main example and a person confirmed, with its receipt; a second candidate, the introduction's sentence, that a person rejected; a person's trace of the same sentence to Table 1; and a person's reply that disputes the first ([spec/18 §18.5](../spec/18-layers.md#185-traced-citations)). `vectors/traces.jsonl` resolves them after corrections. | +| `chemistry/` | A layer of chemical structures on the main example (`layer.json`, `annotations.jsonl`, `receipt.json`): ethane, named in the methods and confirmed; water, named by a model and still `proposed`; the CT–CT pattern of Table 1, a SMARTS with the bond constants of both parameter sets as terms; and water again as a SMILES that writes its hydrogens, with the OW–HW bond constants. The two writings of water share an InChIKey ([spec/18 §18.6](../spec/18-layers.md#186-chemical-structures)). `vectors/structures.jsonl` pins the rules. | +| `biology/` | A layer of sequences on the Typst draft (`layer.json`, `annotations.jsonl`, `receipt.json`): the villin headpiece subdomain HP35, named by the words that name it, shown by the sequence the sentence prints, with its three helices as regions, and its N68H variant as a variant a model proposed ([spec/18 §18.7](../spec/18-layers.md#187-sequences)). The residues are numbered 42 to 76, as the headpiece is. `vectors/sequences.jsonl` pins the rules. | | `submissions/`, `grades/` | A student's answers to exercises in the layer, and the grader's result for each. | | `suspect.json` | A doubtful reading raised for review: the converter's reading of an exponent in the main example, before the first correction answered it. | | `qa-report.json` | Reviewer error bounds for a delivery that covers two of the main example's receipts, signed by the team's owner key. | diff --git a/fixtures/packages/writer2027fixed-ynr7.v3/MANIFEST.json b/fixtures/packages/writer2027fixed-ynr7.v3/MANIFEST.json index 7d03879..cb54d38 100644 --- a/fixtures/packages/writer2027fixed-ynr7.v3/MANIFEST.json +++ b/fixtures/packages/writer2027fixed-ynr7.v3/MANIFEST.json @@ -1 +1 @@ -{"doc":"scienting-doc/1","files":[{"path":"document.json","sha256":"882e41e87ffbaa617e55b13fe5f9c1bdfd2e6c53159a57ab17c0b6a8b12e8b7e","size":802},{"path":"nodes.jsonl","sha256":"3845502f83168047e51719c45fd8732b3e6b37741fb8944771cb9d18bc791518","size":8295},{"path":"provenance.json","sha256":"4bc7649bf6d3113f6c72b4016713654f57c8f03069632eabd1e6025c05cb9dac","size":226},{"path":"references.jsonl","sha256":"a854aa7fa3f337bd2641fe1986882b3d43acf2e83a65671cd4cfae6465103933","size":344},{"path":"witnesses.json","sha256":"badd17f82e6cc4aa8d116d2056d10b868fbf6978fa47947d89404c458b6a532c","size":766}],"format":"scienting-package/1","key":"writer2027fixed-ynr7.v3"} +{"doc":"scienting-doc/1","files":[{"path":"document.json","sha256":"900a33206b1f44f62e3600a8484cfefe2dedcfb93be7c71050a69b89e3389609","size":802},{"path":"nodes.jsonl","sha256":"12109f6b7f2e76391ab2e417f0245142d7319c64ed3e11d079c0eeb2bdd490e9","size":9000},{"path":"provenance.json","sha256":"4bc7649bf6d3113f6c72b4016713654f57c8f03069632eabd1e6025c05cb9dac","size":226},{"path":"references.jsonl","sha256":"a854aa7fa3f337bd2641fe1986882b3d43acf2e83a65671cd4cfae6465103933","size":344},{"path":"witnesses.json","sha256":"badd17f82e6cc4aa8d116d2056d10b868fbf6978fa47947d89404c458b6a532c","size":766}],"format":"scienting-package/1","key":"writer2027fixed-ynr7.v3"} diff --git a/fixtures/packages/writer2027fixed-ynr7.v3/document.json b/fixtures/packages/writer2027fixed-ynr7.v3/document.json index dd31228..d7c7fb2 100644 --- a/fixtures/packages/writer2027fixed-ynr7.v3/document.json +++ b/fixtures/packages/writer2027fixed-ynr7.v3/document.json @@ -1 +1 @@ -{"counts":{"leaves":7,"nodes":15},"fidelity":{"counts":{"F0":0,"F1":0,"F2":7,"F3":0},"lowest":"F2"},"format":"scienting-doc/1","hashing":{"algorithm":"sha-256","scheme":"plain"},"history":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","key":"writer2027fixed-ynr7.v3","kind":"draft","language":"en","license":{"spdx":"CC-BY-4.0"},"meta":{"author":[{"family":"Writer","given":"A."}],"issued":{"date-parts":[[2027]]},"title":"Fixed charges in biomolecular force fields","type":"report"},"meta_hash":"6a844957c7f8e582c6f30d836e702f6fa816a1bea5d5c0e157b2cfbbacba0ec3","policy":"full","relations":[],"rev":0,"root":"5e9137c41b5832b63c299ce20732fe7afc91bc8de1c67496ff09f0272880c011","store":"smithlab","version":{"seq":3,"type":"draft"},"work":{"key":"writer2027fixed-ynr7","same_as":[]}} +{"counts":{"leaves":8,"nodes":16},"fidelity":{"counts":{"F0":0,"F1":0,"F2":8,"F3":0},"lowest":"F2"},"format":"scienting-doc/1","hashing":{"algorithm":"sha-256","scheme":"plain"},"history":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","key":"writer2027fixed-ynr7.v3","kind":"draft","language":"en","license":{"spdx":"CC-BY-4.0"},"meta":{"author":[{"family":"Writer","given":"A."}],"issued":{"date-parts":[[2027]]},"title":"Fixed charges in biomolecular force fields","type":"report"},"meta_hash":"6a844957c7f8e582c6f30d836e702f6fa816a1bea5d5c0e157b2cfbbacba0ec3","policy":"full","relations":[],"rev":0,"root":"4db38d21c978dcb5be1aa3a46af4d0682181ac5ca5621508534b0c856cf0d586","store":"smithlab","version":{"seq":3,"type":"draft"},"work":{"key":"writer2027fixed-ynr7","same_as":[]}} diff --git a/fixtures/packages/writer2027fixed-ynr7.v3/nodes.jsonl b/fixtures/packages/writer2027fixed-ynr7.v3/nodes.jsonl index d4d7d84..77f348f 100644 --- a/fixtures/packages/writer2027fixed-ynr7.v3/nodes.jsonl +++ b/fixtures/packages/writer2027fixed-ynr7.v3/nodes.jsonl @@ -1,15 +1,16 @@ -{"align_key":"1a2bb9eac1e4dc9f227cf4559731b2057dc2a9a2b9d6b54889a56d91cd87a782","id":"eaaw8zs","kind":"document","match_hash":"20454adf8e339b779917cfcb20d652557204568101ce947616928ef833350e2b","node_hash":"5e9137c41b5832b63c299ce20732fe7afc91bc8de1c67496ff09f0272880c011","ord":0,"own_hash":"34444fe0e6bdbf3927a579fe3286859d204ea0882a381b7769ffd4905551d24f","parent":null,"text_hash":"beece988a027b059e0ff0a0097337b6fe347e680acdfe8e72e43452554fac195"} -{"align_key":"37108c46d3691a0fcb4a378eda3fe2cd7ab3843f22cfcc34d486d069123ea9a7","id":"nedkmhw","kind":"front","match_hash":"3d4535506043f6f04de395aeb16ea50f7f26f2ab341023fe1883f97c2749d406","node_hash":"e06b854f1015214643f375533f258b90470f06a08ac60a13b66b12dc7736bb39","ord":0,"own_hash":"0167516d70e0a89263e33c0f9be5ca4443113347814530257a60d43910af71b6","parent":"eaaw8zs","text_hash":"3d4535506043f6f04de395aeb16ea50f7f26f2ab341023fe1883f97c2749d406"} +{"align_key":"dbdc4c68fc8b3f2691befec850e48fac1c30723c809353a9ee99f2b52c45fada","id":"x632xpk","kind":"document","match_hash":"a55c5c85adebb4afc46d8acf9a58639b972824c71af26a9a450b52398fde1589","node_hash":"4db38d21c978dcb5be1aa3a46af4d0682181ac5ca5621508534b0c856cf0d586","ord":0,"own_hash":"34444fe0e6bdbf3927a579fe3286859d204ea0882a381b7769ffd4905551d24f","parent":null,"text_hash":"a579520f61ab893092f6c72df2e4cfa1635d1bdf4997799cde36c2f62aa797cb"} +{"align_key":"37108c46d3691a0fcb4a378eda3fe2cd7ab3843f22cfcc34d486d069123ea9a7","id":"nedkmhw","kind":"front","match_hash":"3d4535506043f6f04de395aeb16ea50f7f26f2ab341023fe1883f97c2749d406","node_hash":"e06b854f1015214643f375533f258b90470f06a08ac60a13b66b12dc7736bb39","ord":0,"own_hash":"0167516d70e0a89263e33c0f9be5ca4443113347814530257a60d43910af71b6","parent":"x632xpk","text_hash":"3d4535506043f6f04de395aeb16ea50f7f26f2ab341023fe1883f97c2749d406"} {"align_key":"1c346b0b6df77616e3db9eebcff5d56ccc123715374eb60a0df1a6cbe1e059ec","id":"w7dabwn","kind":"title","match_hash":"d3c3de666d0290878de3949bc0e0ffcaef965c66d2b61e81a5e615e26a2997df","node_hash":"25cb59151aa6bb80d785263e14ffb762938f1a0991ff3a069a1fc6dc6fd42fc8","ord":0,"own_hash":"c22e4fc822618a3a2c774cc9ea6fc5fc5b34463724257cfa4fd33022d4e35165","parent":"nedkmhw","text_hash":"d3c3de666d0290878de3949bc0e0ffcaef965c66d2b61e81a5e615e26a2997df"} {"align_key":"1c346b0b6df77616e3db9eebcff5d56ccc123715374eb60a0df1a6cbe1e059ec","content":[{"kind":"text","text":"Fixed charges in biomolecular force fields"}],"fidelity":"F2","id":"csgs20p","kind":"sentence","match_hash":"d3c3de666d0290878de3949bc0e0ffcaef965c66d2b61e81a5e615e26a2997df","node_hash":"a859025788a7d67363ba278fd6d67e4349ccb9bccb4c215f60271b3b70b0d549","ord":0,"own_hash":"102b7f337262638415717e077a41d3a4ae579b32a37c837c4ab404a075bf347f","parent":"w7dabwn","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"d3c3de666d0290878de3949bc0e0ffcaef965c66d2b61e81a5e615e26a2997df"} {"align_key":"6bb0f8a42947682adacb47add8ac5d59c3d49f02ee275e8d390acab500b441e1","content":[{"kind":"text","text":"A. Writer"}],"fidelity":"F2","id":"t5xv7jz","kind":"authors","match_hash":"cb38b0c8294dc57d6923a5aab72e1093289f2efbb69293d1f6f5702536a54720","node_hash":"282f0d59e22716e1c28ed5de02bf0729c309bec17bb2ab59c7cb2937c2dad1c0","ord":1,"own_hash":"f1fc7a0ac9b744d5f99583296e8a980e52f80a2a398f240803d457d68a124973","parent":"nedkmhw","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"cb38b0c8294dc57d6923a5aab72e1093289f2efbb69293d1f6f5702536a54720"} -{"align_key":"2ae14f38f7c9c72752502a2766e9ac856f477479fe1456b47d2ef880f17e8eb4","attrs":{"level":1},"id":"tqcsy8w","kind":"section","label":"1","match_hash":"34e0c5261e9055e0fa15b1e1c95e2c6cf8f55f6a9fa0177f6dd36f09410864ea","node_hash":"818f509bcf5783450604a80a5bd200232a3ce88e446c8eca5feeb7e6d15f9c6a","ord":1,"own_hash":"78563e96f51db1954d3fabe08f3748956b564c87ba4c8f7954bf747545a37fcd","parent":"eaaw8zs","text_hash":"86a59f6424a18898cc62dc1413ad12a0cc2c8dfbd84d218c43316bc8659fddf2"} -{"align_key":"d3db5338aae140c5cc04ac37690aa4f98041e14a042bc6473d54ecda8d95f93e","id":"wxsngqp","kind":"heading","match_hash":"b605350bc00209520b7cd8f546322663356ba630708f71bbf30aead6b3dd608e","node_hash":"c7288f33d2cb2ac9b9c146dabd403d2e64e793418bd31ac14802349543ac84c8","ord":0,"own_hash":"e813ff86a8920cef741e548eb5df545774b520d2fadbdda6e2b872a6729b9d26","parent":"tqcsy8w","text_hash":"b605350bc00209520b7cd8f546322663356ba630708f71bbf30aead6b3dd608e"} +{"align_key":"2c0677fd2f58c8bde302d6c44ef1e588b5b460dfc338accc08ec98ff1ffcd375","attrs":{"level":1},"id":"gmzn0mf","kind":"section","label":"1","match_hash":"18b16ea1daa5fa8371000fcde7cccb22940b2e2c94c7dd691f5b822e7c9b4fad","node_hash":"b9dd1c100f1e4b5af2ba32aab3c471a802825a826440b900000a6ce594a54774","ord":1,"own_hash":"78563e96f51db1954d3fabe08f3748956b564c87ba4c8f7954bf747545a37fcd","parent":"x632xpk","text_hash":"91bd6528549b451f8be7cca2e31c075e382992fadec65ef4b4f1c2196f1760c5"} +{"align_key":"d3db5338aae140c5cc04ac37690aa4f98041e14a042bc6473d54ecda8d95f93e","id":"wxsngqp","kind":"heading","match_hash":"b605350bc00209520b7cd8f546322663356ba630708f71bbf30aead6b3dd608e","node_hash":"c7288f33d2cb2ac9b9c146dabd403d2e64e793418bd31ac14802349543ac84c8","ord":0,"own_hash":"e813ff86a8920cef741e548eb5df545774b520d2fadbdda6e2b872a6729b9d26","parent":"gmzn0mf","text_hash":"b605350bc00209520b7cd8f546322663356ba630708f71bbf30aead6b3dd608e"} {"align_key":"d3db5338aae140c5cc04ac37690aa4f98041e14a042bc6473d54ecda8d95f93e","content":[{"kind":"text","text":"Introduction"}],"fidelity":"F2","id":"zvt571v","kind":"sentence","match_hash":"b605350bc00209520b7cd8f546322663356ba630708f71bbf30aead6b3dd608e","node_hash":"8a2293448ea48f2d3e279e609965f34443fae62b24b6fa13524f14a324749285","ord":0,"own_hash":"7c40e5ddd02d461a4ee50cde05532932e1d737ab3bc74b722cecf16cc6ffe59b","parent":"wxsngqp","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"b605350bc00209520b7cd8f546322663356ba630708f71bbf30aead6b3dd608e"} -{"align_key":"e9f8aaa4f05b10a153d268295a96c6adb2c39164a98b93eb1927e00838afe1fc","id":"x9ryw92","kind":"paragraph","match_hash":"e506663279fb3bebf3612dc69a36f5e090228abc0197f5228d4f0bd4abd47812","node_hash":"b17dff0cff3ce730e52efca92b9fe585ffc956cc9f76e52a8b37721cbbec442f","ord":1,"own_hash":"494e069be36a18ecaabf5a63be7c31617ade7a5460218ca83a2de3d8d8f964e0","parent":"tqcsy8w","text_hash":"844954fa39d218228b947367bc95f21c449b4d70d1521a7f016e308643e6cf48"} -{"align_key":"7dc562c54f1b1cc46e472838c4b2d7c97b3e1b4d39172628d6607b0f2d313c3e","content":[{"kind":"text","text":"The bond term is harmonic in the bond length."}],"fidelity":"F2","id":"kda5wym","kind":"sentence","match_hash":"8f22f3f58beb618723a14dd8fee8caaeb5cef6b26f43d88a5ddb4ff42f86d63e","node_hash":"dd438a68616e63fd1cd5050d308779af58dfed2b4d43cc5a4bbab3fc8d4f2bcb","ord":0,"own_hash":"46dfbddc0e456a2b7f4105b8d3636220ff9145acccf3bdf81a206f0b84f95b63","parent":"x9ryw92","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"8f22f3f58beb618723a14dd8fee8caaeb5cef6b26f43d88a5ddb4ff42f86d63e"} -{"align_key":"81422dae1385acfea463f7b7c75962de0bf92671d970a6ae9643763a8f87cd7f","content":[{"kind":"text","text":"Its constants come from a two-step fit "},{"kind":"xref","target":"hale2026harmonic-damb#a4jrz2t","text":"(Hale and Osei, Table 1)"},{"kind":"text","text":"."},{"kind":"cite","refs":["ebcq5cy"],"text":"1"}],"fidelity":"F2","id":"qgh1k31","kind":"sentence","match_hash":"fe82fa8560942e052e31d9b18cc8d3a9ba54ce01d91b66538ded6ff682a4e885","node_hash":"93a39490870e694299e88e6f475d42c38078d1442959e555bdbdf58488dcf187","ord":1,"own_hash":"e004436e7b28ff3dc41e0056f231ba707d9be985694e68acb911345a547842ed","parent":"x9ryw92","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"0d5b27a20da22922ba0c5b65e06581a09d60b899e6daddc63b0e9c1dd3819055"} -{"align_key":"fae2fe63ef00f3826f525b2fd7f5c29824c06c1461b0a648927598f1efc84bc0","content":[{"kind":"text","text":"In that fit the energy is "},{"kind":"math","notation":"typst","source":"E = K_r (r - r_\"eq\")^2"},{"kind":"text","text":", up to a constant factor."}],"fidelity":"F2","id":"wbntyy4","kind":"sentence","match_hash":"9b297e00b7348c2df4c6b12f67b2f879217a0d71e1be382fc8a4f6bd7439ddd0","node_hash":"18b4b664473aeccb797c3c52b0d3fc3c37a33593d3aca32640acdb40161fa3e2","ord":2,"own_hash":"7ae59942b690f78ed24570ba25764a8b13239067437c6546622ebe701d55aee1","parent":"x9ryw92","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"3873ff52fe20b52be605c10c11e78b24bcabb05c8f725aeb4820c23428631509"} -{"align_key":"a7226a2c68503d064f16cae87f6e01d25e5c75664bc8dee2d68ee2dc8c9f0c65","id":"hbb210j","kind":"back","match_hash":"5333f67a9eca4bf08b7c5bd643168084dddf40c175d8620dad293ff976a0ca31","node_hash":"a42481d70d840a9e15c3a5c31b9bfe503a78633c6b6431d3dc84dcd21b2f3019","ord":2,"own_hash":"bbb972bdc024231b505f4d8ce5e711fbb75c8b5ffd1b5d42ee3fb8586b85f867","parent":"eaaw8zs","text_hash":"b652c2e642345a7363119a8e2b95154e29eee21a3dacefc147a9cc6cd1731316"} +{"align_key":"a70d3e5d1405673a9dd12a4e4fcaf31ca716be14d97ba7e9c8dc31007f05f672","id":"y4z5j53","kind":"paragraph","match_hash":"3bf084f108d315e4e1295d55e4fc139499da566a6d8090722668f587742f7bfc","node_hash":"86cd27353ae55ba760c0f033028c42ebf9f2d31b25598f70b94dd6ff79abfbec","ord":1,"own_hash":"494e069be36a18ecaabf5a63be7c31617ade7a5460218ca83a2de3d8d8f964e0","parent":"gmzn0mf","text_hash":"57f258843880d625007bbce10ace271b01d3fef066818beb84487e1d16f815eb"} +{"align_key":"7dc562c54f1b1cc46e472838c4b2d7c97b3e1b4d39172628d6607b0f2d313c3e","content":[{"kind":"text","text":"The bond term is harmonic in the bond length."}],"fidelity":"F2","id":"kda5wym","kind":"sentence","match_hash":"8f22f3f58beb618723a14dd8fee8caaeb5cef6b26f43d88a5ddb4ff42f86d63e","node_hash":"dd438a68616e63fd1cd5050d308779af58dfed2b4d43cc5a4bbab3fc8d4f2bcb","ord":0,"own_hash":"46dfbddc0e456a2b7f4105b8d3636220ff9145acccf3bdf81a206f0b84f95b63","parent":"y4z5j53","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"8f22f3f58beb618723a14dd8fee8caaeb5cef6b26f43d88a5ddb4ff42f86d63e"} +{"align_key":"81422dae1385acfea463f7b7c75962de0bf92671d970a6ae9643763a8f87cd7f","content":[{"kind":"text","text":"Its constants come from a two-step fit "},{"kind":"xref","target":"hale2026harmonic-damb#a4jrz2t","text":"(Hale and Osei, Table 1)"},{"kind":"text","text":"."},{"kind":"cite","refs":["ebcq5cy"],"text":"1"}],"fidelity":"F2","id":"qgh1k31","kind":"sentence","match_hash":"fe82fa8560942e052e31d9b18cc8d3a9ba54ce01d91b66538ded6ff682a4e885","node_hash":"93a39490870e694299e88e6f475d42c38078d1442959e555bdbdf58488dcf187","ord":1,"own_hash":"e004436e7b28ff3dc41e0056f231ba707d9be985694e68acb911345a547842ed","parent":"y4z5j53","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"0d5b27a20da22922ba0c5b65e06581a09d60b899e6daddc63b0e9c1dd3819055"} +{"align_key":"fae2fe63ef00f3826f525b2fd7f5c29824c06c1461b0a648927598f1efc84bc0","content":[{"kind":"text","text":"In that fit the energy is "},{"kind":"math","notation":"typst","source":"E = K_r (r - r_\"eq\")^2"},{"kind":"text","text":", up to a constant factor."}],"fidelity":"F2","id":"wbntyy4","kind":"sentence","match_hash":"9b297e00b7348c2df4c6b12f67b2f879217a0d71e1be382fc8a4f6bd7439ddd0","node_hash":"18b4b664473aeccb797c3c52b0d3fc3c37a33593d3aca32640acdb40161fa3e2","ord":2,"own_hash":"7ae59942b690f78ed24570ba25764a8b13239067437c6546622ebe701d55aee1","parent":"y4z5j53","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"3873ff52fe20b52be605c10c11e78b24bcabb05c8f725aeb4820c23428631509"} +{"align_key":"50034267db628bc04f130e0f1289f8db0e54500d9d8d98e9c6556d5fc5733ca9","content":[{"kind":"text","text":"We test the charges on the villin headpiece subdomain HP35, LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF, and on its N68H variant."}],"fidelity":"F2","id":"rh0yjt9","kind":"sentence","match_hash":"0d2c4ad8fc643245b3c0d6680110754f04ebca185a6c5ad9d0c2ddc1c473ea6b","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","ord":3,"own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","parent":"y4z5j53","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"0d2c4ad8fc643245b3c0d6680110754f04ebca185a6c5ad9d0c2ddc1c473ea6b"} +{"align_key":"a7226a2c68503d064f16cae87f6e01d25e5c75664bc8dee2d68ee2dc8c9f0c65","id":"hbb210j","kind":"back","match_hash":"5333f67a9eca4bf08b7c5bd643168084dddf40c175d8620dad293ff976a0ca31","node_hash":"a42481d70d840a9e15c3a5c31b9bfe503a78633c6b6431d3dc84dcd21b2f3019","ord":2,"own_hash":"bbb972bdc024231b505f4d8ce5e711fbb75c8b5ffd1b5d42ee3fb8586b85f867","parent":"x632xpk","text_hash":"b652c2e642345a7363119a8e2b95154e29eee21a3dacefc147a9cc6cd1731316"} {"align_key":"a7226a2c68503d064f16cae87f6e01d25e5c75664bc8dee2d68ee2dc8c9f0c65","id":"t728ktw","kind":"references","match_hash":"5333f67a9eca4bf08b7c5bd643168084dddf40c175d8620dad293ff976a0ca31","node_hash":"f25fb824a77ea0b61566aa32083103f6045473eeea053361f16d15127143e7e4","ord":0,"own_hash":"2a5302e2041d0e59458fea212dd51b89299901318bfceeeff227c1a07d3f5d1a","parent":"hbb210j","text_hash":"b652c2e642345a7363119a8e2b95154e29eee21a3dacefc147a9cc6cd1731316"} {"align_key":"a7226a2c68503d064f16cae87f6e01d25e5c75664bc8dee2d68ee2dc8c9f0c65","content":[{"kind":"text","text":"1. R. Hale and M. Osei, J. Example Chem. 2026, 14, 101–109."}],"fidelity":"F2","id":"ebcq5cy","kind":"reference","label":"1","match_hash":"5333f67a9eca4bf08b7c5bd643168084dddf40c175d8620dad293ff976a0ca31","node_hash":"88c4043a1c30e4bec8f9fdbdd98922289d3f4224168da680d1582b96743ac053","ord":0,"own_hash":"6dc3f27fb4a4d7176f24c9de291095202c357030c173f1f9f2d9295929ae5f84","parent":"t728ktw","prov":{"backend":"typst reader (illustrative)","witnesses":["tszzg52"]},"text_hash":"b652c2e642345a7363119a8e2b95154e29eee21a3dacefc147a9cc6cd1731316"} diff --git a/fixtures/records/biology/annotations.jsonl b/fixtures/records/biology/annotations.jsonl new file mode 100644 index 0000000..593b86a --- /dev/null +++ b/fixtures/records/biology/annotations.jsonl @@ -0,0 +1,3 @@ +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","organism":"Gallus gallus","role":"names","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s05a5q9qa4bhj","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"villin headpiece subdomain HP35","prefix":"We test the charges on the ","suffix":", LSDEDFKAVFGMTRSAFANLPLWKQQNLKK"},"rev":0,"span":[27,58],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"villin headpiece subdomain HP35","prefix":"We test the charges on the ","suffix":", LSDEDFKAVFGMTRSAFANLPLWKQQNLKK","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"} +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","regions":[{"end":51,"label":"helix 1","start":44},{"end":59,"label":"helix 2","start":55},{"end":74,"label":"helix 3","start":63}],"role":"depicts","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"} +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35 N68H","role":"reports","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","variants":[{"alt":"H","position":68,"ref":"N"}]},"created":"2026-10-14T09:10:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/n8pvfne6pkb9z","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","status":"proposed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"N68H","prefix":"FANLPLWKQQNLKKEKGLF, and on its ","suffix":" variant."},"rev":0,"span":[108,112],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"N68H","prefix":"FANLPLWKQQNLKKEKGLF, and on its ","suffix":" variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"} diff --git a/fixtures/records/biology/layer.json b/fixtures/records/biology/layer.json new file mode 100644 index 0000000..8bf046d --- /dev/null +++ b/fixtures/records/biology/layer.json @@ -0,0 +1 @@ +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"audience":"expert","created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"docs":["smithlab/writer2027fixed-ynr7.v3"],"format":"scienting-layer/1","id":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","label":"Sequences in the draft","license":{"spdx":"CC-BY-4.0"},"project":"smithlab-charges","purpose":"The peptide the draft tests its charges on, its helices and its variant.","total":3,"type":"AnnotationCollection","visibility":"team"} diff --git a/fixtures/records/biology/receipt.json b/fixtures/records/biology/receipt.json new file mode 100644 index 0000000..1b80d7f --- /dev/null +++ b/fixtures/records/biology/receipt.json @@ -0,0 +1 @@ +{"at":"2026-10-14T09:30:00Z","by":"ana","doc":"writer2027fixed-ynr7.v3","evidence":[],"format":"scienting-receipt/1","id":"b09z8grf3mrs4","level":"F3","nodes":[],"records":[["annotation","s04e0n9y6wger","bff8ef0d11e39c9aaffd0434a5f648d60ab05e876f5ff4c5ad31dff861196e8f"],["annotation","s05a5q9qa4bhj","81373fb287b77a6f523085bdc9647cc2d3c72f0d1fcbfa541ed074019f821db5"]],"rev":0,"root":"df2012c1d4da1f09d001e7595e7ff466aba7c915fc5e203624d274bafb83183e","scope":"targeted:sequences","signature":{"key":"ana","scheme":"ed25519","value":"TA4GpuntRYraJ/q3WdfPNWQfy5SlAxSrsTv+Wb1lH0TeH/QNSFWLU3FatOhhSYpgkbgkYTHBuCduODIr3dGPCQ=="}} diff --git a/fixtures/records/chemistry/annotations.jsonl b/fixtures/records/chemistry/annotations.jsonl new file mode 100644 index 0000000..c5215c8 --- /dev/null +++ b/fixtures/records/chemistry/annotations.jsonl @@ -0,0 +1,4 @@ +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"6324"}],"format":"chemical/x-daylight-smiles","identity":"OTMSDBZUPAUEDD-UHFFFAOYSA-N","kind":"structure","label":"ethane","role":"names","type":"TextualBody","value":"CC"},"created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0539sf2trjdn","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"qwgfg51","node_hash":"4a3be03766323b3c88d5b43591b0f573823b89fe582f2c3a6f0b43474685a30d","own_hash":"04bd6d16a9310fa00dbf5d0930f4dbaca52b6bb58e76bb3cdd348bec73a27737","quote":{"exact":"ethane","prefix":"ws the scan for the C–C bond of ","suffix":".a"},"rev":12,"span":[44,50],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"ethane","prefix":"ws the scan for the C–C bond of ","suffix":".a","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"} +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"names","type":"TextualBody","value":"O"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/fdkfpz98yw4ae","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","status":"proposed","target":{"selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"hca6dc5","node_hash":"8cfed5a34aab28517e89e8a164f0f96c14361de83ebc800439116e83ef479f34","own_hash":"c270571517825ceed31ca912b80ac76203effe47f1c84f8ee8962800d0afc92f","quote":{"exact":"Water","suffix":", H$_2$O, served as the first te"},"rev":12,"span":[0,5],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"Water","prefix":"","suffix":", H$_2$O, served as the first te","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"} +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smarts","identity":"smarts:2e2a923f840c","kind":"structure","label":"CT–CT","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["CT","CT"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"310.0","r_eq":"1.526"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["CT","CT"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"305.2","r_eq":"1.5260"}}],"type":"TextualBody","value":"[CX4][CX4]","written":"CT–CT"},"created":"2026-10-14T09:10:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/p9kaa8djhezd2","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","CT–CT"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"vd76637","node_hash":"33810e4da42f8e65a224b5369c06fe8db254890294b7b6760808fe6e039da21a","own_hash":"2ef085ec0ae741d540d9ace389393d02c30523a66f55648470404733c73ecde3","quote":{"exact":"CT–CT"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"CT–CT","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"} +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"} diff --git a/fixtures/records/chemistry/layer.json b/fixtures/records/chemistry/layer.json new file mode 100644 index 0000000..b367f41 --- /dev/null +++ b/fixtures/records/chemistry/layer.json @@ -0,0 +1 @@ +{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"audience":"expert","created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"docs":["smithlab/hale2026harmonic-damb"],"format":"scienting-layer/1","id":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","label":"Structures in Hale and Osei","license":{"spdx":"CC-BY-4.0"},"project":"smithlab-charges","purpose":"The molecules the paper names and the force-field constants it gives for them.","total":4,"type":"AnnotationCollection","visibility":"team"} diff --git a/fixtures/records/chemistry/receipt.json b/fixtures/records/chemistry/receipt.json new file mode 100644 index 0000000..26f4eae --- /dev/null +++ b/fixtures/records/chemistry/receipt.json @@ -0,0 +1 @@ +{"at":"2026-10-14T09:30:00Z","by":"ana","doc":"hale2026harmonic-damb","evidence":[],"format":"scienting-receipt/1","id":"q9z9fee99g3cg","level":"F3","nodes":[],"records":[["annotation","n0539sf2trjdn","9a7b0badfa3bd023d24b6de3509523cbc6566bc82e8a17953ea4297987e0c560"],["annotation","n0xj47295v5p3","17ce7549a4c24f8e20b3b539b942436ecbde0e09f40c336ff5830f692226cbfc"],["annotation","p9kaa8djhezd2","239247de4906cabbf0da105ce026567646d15e2ca5988ad05d829f9378934a95"]],"rev":12,"root":"cf1d025838f64c48e2ae4260753735b9cb2a6e276fc7139d2ba5780a3067fa03","scope":"targeted:structures","signature":{"key":"ana","scheme":"ed25519","value":"PajQPzelH/egWsv4O8yja4acSnrwmWAHCwRRGxOEKHSkYamxaqORnLiKqSb5RFZf1V+x7Jzrk3ZGzHqEK4euCg=="}} diff --git a/fixtures/records/draft-ids.jsonl b/fixtures/records/draft-ids.jsonl index 9218f7f..38b9cdc 100644 --- a/fixtures/records/draft-ids.jsonl +++ b/fixtures/records/draft-ids.jsonl @@ -1,5 +1,6 @@ {"id":"csgs20p","ord":0,"section":null,"text_hash":"d3c3de666d0290878de3949bc0e0ffcaef965c66d2b61e81a5e615e26a2997df"} -{"id":"zvt571v","ord":0,"section":"tqcsy8w","text_hash":"b605350bc00209520b7cd8f546322663356ba630708f71bbf30aead6b3dd608e"} -{"id":"kda5wym","ord":0,"section":"tqcsy8w","text_hash":"8f22f3f58beb618723a14dd8fee8caaeb5cef6b26f43d88a5ddb4ff42f86d63e"} -{"id":"qgh1k31","ord":1,"section":"tqcsy8w","text_hash":"0d5b27a20da22922ba0c5b65e06581a09d60b899e6daddc63b0e9c1dd3819055"} -{"id":"wbntyy4","ord":2,"pinned":"energy-sentence","section":"tqcsy8w","text_hash":"3873ff52fe20b52be605c10c11e78b24bcabb05c8f725aeb4820c23428631509"} +{"id":"zvt571v","ord":0,"section":"gmzn0mf","text_hash":"b605350bc00209520b7cd8f546322663356ba630708f71bbf30aead6b3dd608e"} +{"id":"kda5wym","ord":0,"section":"gmzn0mf","text_hash":"8f22f3f58beb618723a14dd8fee8caaeb5cef6b26f43d88a5ddb4ff42f86d63e"} +{"id":"qgh1k31","ord":1,"section":"gmzn0mf","text_hash":"0d5b27a20da22922ba0c5b65e06581a09d60b899e6daddc63b0e9c1dd3819055"} +{"id":"wbntyy4","ord":2,"section":"gmzn0mf","text_hash":"3873ff52fe20b52be605c10c11e78b24bcabb05c8f725aeb4820c23428631509"} +{"id":"rh0yjt9","ord":3,"pinned":"energy-sentence","section":"gmzn0mf","text_hash":"0d2c4ad8fc643245b3c0d6680110754f04ebca185a6c5ad9d0c2ddc1c473ea6b"} diff --git a/fixtures/records/project.json b/fixtures/records/project.json index 0f80ad3..7d7860f 100644 --- a/fixtures/records/project.json +++ b/fixtures/records/project.json @@ -1 +1 @@ -{"claims":{"paperclaim":"amber"},"datasets":["ds-hale-bond-params","ds-hale-ctct-scan"],"documents":[{"doc":"smithlab/hale2026harmonic-damb","reason":"The bond constants we start from.","status":{"Ben Example":"read","Cara Example":"reading"},"tags":["parameters"]},{"doc":"okafor2025solvent-acth","reason":"Solvent shifts for the validation set.","tags":["spectra"]}],"drafts":["smithlab/writer2027fixed-ynr7.v3"],"format":"scienting-project/1","key":"smithlab-charges","layers":["tag:scient.ing,2026:layer:smithlab/kp4m2x7q","tag:scient.ing,2026:layer:smithlab/tr6c3q8m"],"members":[{"keys":["ana"],"person":"Ana Example","role":"owner"},{"keys":["ben","ben-spot"],"person":"Ben Example","role":"editor"},{"keys":["cara"],"person":"Cara Example","role":"reader"}],"name":"Charges and bonds","paths":[{"id":"onboarding","steps":[{"note":"Read the introduction.","ref":"smithlab/hale2026harmonic-damb","type":"document"},{"note":"Then the table.","ref":"smithlab/hale2026harmonic-damb#hj4s7pb","type":"node"},{"note":"The bond force constant, amber/k-bond.","ref":"claim:272XTX7C","type":"claim"}],"title":"First week"}],"settings":{"digit_rule":"anchored-sections","drift_threshold":"0.25","log":{"origin":"scient.ing/log/smithlab","threshold":1,"witnesses":["wit"]},"rights_unknown":"refuse","spot_check":{"minimum":10,"rate":"0.05"},"stages":"scienting-stages-default"},"store":"smithlab","views":["ctct-scan"]} +{"claims":{"paperclaim":"amber"},"datasets":["ds-hale-bond-params","ds-hale-ctct-scan"],"documents":[{"doc":"smithlab/hale2026harmonic-damb","reason":"The bond constants we start from.","status":{"Ben Example":"read","Cara Example":"reading"},"tags":["parameters"]},{"doc":"okafor2025solvent-acth","reason":"Solvent shifts for the validation set.","tags":["spectra"]}],"drafts":["smithlab/writer2027fixed-ynr7.v3"],"format":"scienting-project/1","key":"smithlab-charges","layers":["tag:scient.ing,2026:layer:smithlab/kp4m2x7q","tag:scient.ing,2026:layer:smithlab/tr6c3q8m","tag:scient.ing,2026:layer:smithlab/cm7h4p2x","tag:scient.ing,2026:layer:smithlab/bq5k8r3w"],"members":[{"keys":["ana"],"person":"Ana Example","role":"owner"},{"keys":["ben","ben-spot"],"person":"Ben Example","role":"editor"},{"keys":["cara"],"person":"Cara Example","role":"reader"}],"name":"Charges and bonds","paths":[{"id":"onboarding","steps":[{"note":"Read the introduction.","ref":"smithlab/hale2026harmonic-damb","type":"document"},{"note":"Then the table.","ref":"smithlab/hale2026harmonic-damb#hj4s7pb","type":"node"},{"note":"The bond force constant, amber/k-bond.","ref":"claim:272XTX7C","type":"claim"}],"title":"First week"}],"settings":{"digit_rule":"anchored-sections","drift_threshold":"0.25","log":{"origin":"scient.ing/log/smithlab","threshold":1,"witnesses":["wit"]},"rights_unknown":"refuse","spot_check":{"minimum":10,"rate":"0.05"},"stages":"scienting-stages-default"},"store":"smithlab","views":["ctct-scan"]} diff --git a/fixtures/src/smithlab2027charges.json b/fixtures/src/smithlab2027charges.json index 56ad690..ae905db 100644 --- a/fixtures/src/smithlab2027charges.json +++ b/fixtures/src/smithlab2027charges.json @@ -20,7 +20,8 @@ {"p": [ {"name": "@d1", "s": ["The bond term is harmonic in the bond length."], "fidelity": "F2"}, {"name": "@d2", "s": ["Its constants come from a two-step fit ", {"xref": "ext:hale2026harmonic:@s5", "text": "(Hale and Osei, Table 1)"}, ".", {"cite": ["@dr1"], "text": "1"}], "fidelity": "F2"}, - {"name": "@d3", "s": ["In that fit the energy is ", {"t": "E = K_r (r - r_\"eq\")^2"}, ", up to a constant factor."], "fidelity": "F2"} + {"name": "@d3", "s": ["In that fit the energy is ", {"t": "E = K_r (r - r_\"eq\")^2"}, ", up to a constant factor."], "fidelity": "F2"}, + {"name": "@d4", "s": ["We test the charges on the villin headpiece subdomain HP35, LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF, and on its N68H variant."], "fidelity": "F2"} ]} ]}, {"kind": "back", "children": [ diff --git a/registry/rules.json b/registry/rules.json index c6c95f5..0b89752 100644 --- a/registry/rules.json +++ b/registry/rules.json @@ -448,6 +448,41 @@ "description": "The exercise kind is unknown.", "chapter": "spec/22-conformance.md" }, + { + "id": "layer.sequence.identity", + "description": "A sequence body's identity is not its alphabet, a colon and the first sixteen hex digits of the SHA-256 of its residues with the gaps taken out.", + "chapter": "spec/18-layers.md" + }, + { + "id": "layer.sequence.region", + "description": "A sequence body's region starts after it ends, or reaches outside the residues the value numbers from its start.", + "chapter": "spec/18-layers.md" + }, + { + "id": "layer.sequence.value", + "description": "A sequence body's alphabet is unknown, its value holds a letter its alphabet does not allow, or it holds only gaps.", + "chapter": "spec/18-layers.md" + }, + { + "id": "layer.sequence.variant", + "description": "A sequence body's variant is outside the residues, names a reference residue the value does not have there, changes a residue to itself, or has an alternative its alphabet does not allow.", + "chapter": "spec/18-layers.md" + }, + { + "id": "layer.structure.identity", + "description": "A structure body's identity is not the InChIKey of a SMILES or smiles: or smarts: and the first twelve hex digits of the SHA-256 of its value, or is of the other format than the value.", + "chapter": "spec/18-layers.md" + }, + { + "id": "layer.structure.term", + "description": "A structure body's term cites an atom its value does not write, an atom twice, atoms not joined as its kind needs, a number of atoms or types its kind does not take, or units for values it does not give.", + "chapter": "spec/18-layers.md" + }, + { + "id": "layer.structure.value", + "description": "A structure body's value is not a SMILES or SMARTS as its format says: an unclosed bracket, branch or ring, a stray character, a bond with no atom, or a query in a SMILES.", + "chapter": "spec/18-layers.md" + }, { "id": "layer.trace.source", "description": "A trace's passage is not in the document its source names, its source is the citing document, its selector has no AnchorSelector, or its TextQuoteSelector does not repeat the anchor's plain quote.", diff --git a/schemas/annotation.schema.json b/schemas/annotation.schema.json index 21f9eab..e8af507 100644 --- a/schemas/annotation.schema.json +++ b/schemas/annotation.schema.json @@ -59,6 +59,218 @@ "additionalProperties": false } ] + }, + "accession": { + "description": "An entry of an outside database that a structure or a sequence is: `db` names the database in lower case (pubchem, chebi, cas, uniprot, genbank, refseq, ensembl, pdb) and `id` is the entry's identifier there (spec/18 §18.6).", + "type": "object", + "properties": { + "db": { + "type": "string", + "pattern": "^[a-z][a-z0-9-]*$", + "maxLength": 32 + }, + "id": { + "type": "string", + "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$", + "maxLength": 128 + } + }, + "required": [ + "db", + "id" + ], + "additionalProperties": false + }, + "structureTerm": { + "description": "A bond, angle, torsion or improper that a paper gives values for, citing the structure's atoms by number (spec/18 §18.6).", + "type": "object", + "properties": { + "kind": { + "enum": [ + "bond", + "angle", + "torsion", + "improper" + ] + }, + "atoms": { + "description": "Atom numbers, from 0 in the order the value writes its atoms. An improper lists its central atom first.", + "type": "array", + "items": { + "type": "integer", + "minimum": 0 + }, + "minItems": 2, + "maxItems": 4, + "uniqueItems": true + }, + "types": { + "description": "The force field's atom types, one for each atom.", + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 16 + }, + "minItems": 2, + "maxItems": 4 + }, + "values": { + "description": "The parameters the paper gives, by the name it uses (k_r, r_eq, theta_0).", + "type": "object", + "additionalProperties": { + "$ref": "common.schema.json#/$defs/decimal" + }, + "minProperties": 1 + }, + "units": { + "description": "The unit of each value, by the same names.", + "type": "object", + "additionalProperties": { + "type": "string", + "minLength": 1 + } + }, + "source": { + "description": "Where in the paper the values are given.", + "type": "string", + "minLength": 1 + } + }, + "required": [ + "kind", + "atoms" + ], + "additionalProperties": false, + "allOf": [ + { + "if": { + "properties": { + "kind": { + "const": "bond" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "properties": { + "atoms": { + "minItems": 2, + "maxItems": 2 + } + } + } + }, + { + "if": { + "properties": { + "kind": { + "const": "angle" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "properties": { + "atoms": { + "minItems": 3, + "maxItems": 3 + } + } + } + }, + { + "if": { + "properties": { + "kind": { + "const": "torsion" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "properties": { + "atoms": { + "minItems": 4, + "maxItems": 4 + } + } + } + }, + { + "if": { + "properties": { + "kind": { + "const": "improper" + } + }, + "required": [ + "kind" + ] + }, + "then": { + "properties": { + "atoms": { + "minItems": 4, + "maxItems": 4 + } + } + } + } + ] + }, + "region": { + "description": "A stretch of a sequence, by residue number, both ends included (spec/18 §18.7).", + "type": "object", + "properties": { + "start": { + "type": "integer", + "minimum": 1 + }, + "end": { + "type": "integer", + "minimum": 1 + }, + "label": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "start", + "end" + ], + "additionalProperties": false + }, + "variant": { + "description": "A substitution, stop or deletion at one residue: `ref` is the residue the value has there, `alt` what the variant has (`*` a stop, `-` a deletion) (spec/18 §18.7).", + "type": "object", + "properties": { + "position": { + "type": "integer", + "minimum": 1 + }, + "ref": { + "type": "string", + "pattern": "^[A-Z*]$" + }, + "alt": { + "type": "string", + "pattern": "^[A-Z*-]$" + } + }, + "required": [ + "position", + "ref", + "alt" + ], + "additionalProperties": false } }, "type": "object", @@ -540,6 +752,215 @@ ], "additionalProperties": false }, + { + "type": "object", + "properties": { + "type": { + "const": "TextualBody" + }, + "kind": { + "const": "structure" + }, + "value": { + "description": "The structure as a SMILES or a SMARTS, whichever `format` says (spec/18 §18.6).", + "type": "string", + "minLength": 1, + "maxLength": 20000 + }, + "format": { + "enum": [ + "chemical/x-daylight-smiles", + "chemical/x-daylight-smarts" + ] + }, + "role": { + "enum": [ + "names", + "depicts", + "parametrizes", + "uses" + ] + }, + "identity": { + "description": "The InChIKey of a SMILES that has one; otherwise `smiles:` or `smarts:` and the first twelve hex digits of the SHA-256 of the value.", + "type": "string", + "pattern": "^([A-Z]{14}-[A-Z]{10}-[A-Z]|(smiles|smarts):[0-9a-f]{12})$" + }, + "written": { + "description": "The structure as the paper writes it, when that is not SMILES or SMARTS: R-OH, CT-CT.", + "type": "string", + "minLength": 1 + }, + "label": { + "type": "string", + "minLength": 1 + }, + "accessions": { + "type": "array", + "items": { + "$ref": "#/$defs/accession" + }, + "minItems": 1, + "uniqueItems": true + }, + "terms": { + "type": "array", + "items": { + "$ref": "#/$defs/structureTerm" + }, + "minItems": 1 + } + }, + "required": [ + "type", + "kind", + "value", + "format", + "role", + "identity" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { + "const": "TextualBody" + }, + "kind": { + "const": "sequence" + }, + "value": { + "description": "The residues in capital letters, a gap as `-` (spec/18 §18.7).", + "type": "string", + "minLength": 1, + "maxLength": 100000 + }, + "alphabet": { + "enum": [ + "protein", + "dna", + "rna" + ] + }, + "role": { + "enum": [ + "names", + "depicts", + "uses", + "reports" + ] + }, + "identity": { + "description": "The alphabet, a colon and the first sixteen hex digits of the SHA-256 of the residues with the gaps taken out.", + "type": "string", + "pattern": "^(protein|dna|rna):[0-9a-f]{16}$" + }, + "start": { + "description": "The number of the first residue of the value in the molecule's own numbering; 1 when omitted.", + "type": "integer", + "minimum": 1 + }, + "label": { + "type": "string", + "minLength": 1 + }, + "organism": { + "type": "string", + "minLength": 1 + }, + "accessions": { + "type": "array", + "items": { + "$ref": "#/$defs/accession" + }, + "minItems": 1, + "uniqueItems": true + }, + "regions": { + "type": "array", + "items": { + "$ref": "#/$defs/region" + }, + "minItems": 1 + }, + "variants": { + "type": "array", + "items": { + "$ref": "#/$defs/variant" + }, + "minItems": 1 + } + }, + "required": [ + "type", + "kind", + "value", + "alphabet", + "role", + "identity" + ], + "additionalProperties": false, + "allOf": [ + { + "if": { + "properties": { + "alphabet": { + "const": "protein" + } + }, + "required": [ + "alphabet" + ] + }, + "then": { + "properties": { + "value": { + "pattern": "^[ACDEFGHIKLMNPQRSTVWYBXZJUO*-]+$" + } + } + } + }, + { + "if": { + "properties": { + "alphabet": { + "const": "dna" + } + }, + "required": [ + "alphabet" + ] + }, + "then": { + "properties": { + "value": { + "pattern": "^[ACGTRYKMSWBDHVN-]+$" + } + } + } + }, + { + "if": { + "properties": { + "alphabet": { + "const": "rna" + } + }, + "required": [ + "alphabet" + ] + }, + "then": { + "properties": { + "value": { + "pattern": "^[ACGURYKMSWBDHVN-]+$" + } + } + } + } + ] + }, { "type": "object", "properties": { diff --git a/spec/18-layers.md b/spec/18-layers.md index 7a81d5b..d2738d7 100644 --- a/spec/18-layers.md +++ b/spec/18-layers.md @@ -53,6 +53,8 @@ Replies are annotations that target annotations, so discussions are threads anch | `prerequisite` | `SpecificResource` | `source` | What to read or know first. | | `crosslink` | `SpecificResource` | `source`, `selector` | That the span corresponds to a span in another document. | | `trace` | `SpecificResource` | `source`, `selector`, `reference`, `note`, `verdict`, `proposer` | That the target's sentence cites `reference` on the strength of a passage of the cited document ([18.5](#185-traced-citations)). | +| `structure` | `TextualBody` | `format`, `role`, `identity`, `written`, `label`, `accessions`, `terms` | That the span names, draws, gives parameters for or uses a chemical structure ([18.6](#186-chemical-structures)). | +| `sequence` | `TextualBody` | `alphabet`, `role`, `identity`, `start`, `label`, `organism`, `accessions`, `regions`, `variants` | That the span names, shows, uses or reports a variant of a protein, DNA or RNA sequence ([18.7](#187-sequences)). | | `translation` | `TextualBody` | `language` | The span in another language. | | `description` | `TextualBody` | `role` | A description of a figure, panel or table for readers who cannot see it: `alt`, a short text equivalent, or `long`, a full description. | | `generated` | `TextualBody` | `generator` | Text a model wrote about the span; never mistaken for source. `generator` is `{model, run}` as a correction's model author is ([11.2](11-corrections.md#112-every-correction-records)). | @@ -132,3 +134,67 @@ A chain of "as previously reported" is then followed one trace at a time: the re A trace breaks `layer.trace.source` when its selector has no `AnchorSelector`, an anchor is in another document than `source` names, `source` is the citing document, or the `TextQuoteSelector` does not repeat the anchor's plain quote. It breaks `layer.trace.target` when the target is not a leaf with runs of the citing document selected by an `AnchorSelector`, or the sentence does not cite `reference` ([22.4](22-conformance.md#224-rules)). `vectors/traces.jsonl` resolves traces against the fixture packages after corrections, with every outcome and every refusal, and `fixtures/records/traces/` holds a layer of four annotations on `writer2027fixed-ynr7.v3` that cites `hale2026harmonic-damb`: a trace a model proposed to the paper's abstract and a person confirmed with a receipt, a candidate a person rejected, a person's trace to Table 1, and a reply that disputes the first. + +## 18.6 Chemical structures + +A paper writes about a molecule in words, and nothing in a converted document finds it there. +A `structure` annotation ties one to the words: its target is the span, as for any annotation, and its body holds the structure. +The words stay the paper's, the structure is one reader's reading of them, attributed and withdrawable, and a model's tie stays `proposed` until a person confirms it. +What a paper reports about a structure, such as the force-field constants of a bond, is about reading this paper ([18.1](#181-one-rule-decides-what-is-a-claim-and-what-is-a-layer)), so it is an annotation here; a claim store holds a parameter once it is checked. + +| Property | Required | Holds | +| --- | --- | --- | +| `value` | Yes | The structure as a SMILES or a SMARTS, whichever `format` says. | +| `format` | Yes | `chemical/x-daylight-smiles` for a SMILES, `chemical/x-daylight-smarts` for a SMARTS. | +| `role` | Yes | What the span does with the structure: `names` it, `depicts` it (a figure, scheme or table draws it), `parametrizes` it (the span gives parameters for it) or `uses` it (a reagent, solvent or probe). | +| `identity` | Yes | What finds the same structure however it was written: the structure's InChIKey when it is a SMILES and the producer has one, else `smiles:` or `smarts:` and the first twelve hex digits of the SHA-256 of the value as written. | +| `written` | No | The structure as the paper writes it when that is not SMILES or SMARTS: `R-OH`, `CT-CT`. | +| `label` | No | A short name, such as `NMA`. | +| `accessions` | No | Entries of outside databases that the structure is: a list of `{db, id}`, with `db` in lower case (`pubchem`, `chebi`, `cas`). | +| `terms` | No | The bonds, angles, torsions and impropers the paper gives values for. | + +A structure that is not one molecule, such as a group, a fragment with open positions or a pattern of atom types, is a SMARTS. +An open position is an atom that matches any atom, `[*:1]`, with its label as the atom map number, so `R-C(=O)-R'` is `[*:1]-C(=O)-[*:2]` and `R-OH` is `[*:1]-[OX2H]`, and the paper's own notation goes in `written`. +SMILES text that a toolkit would refuse, because a valence rule fails, is kept as a SMARTS rather than dropped, since a paper's drawing often is not a molecule a toolkit can sanitize. + +**Atom numbers.** +Atoms are numbered from 0 in the order the value writes them, a bracket atom as one, so `CC(=O)NC` has atoms 0 to 4. +A hydrogen that is not written as an atom has no number: a term on a hydrogen needs `[H]` in the value. +The rule is of the text and not of any toolkit, which is what lets the numbers be checked without one. + +A term has a `kind` (`bond`, `angle`, `torsion` or `improper`), `atoms` (2, 3, 4 and 4 atom numbers; an improper lists its central atom first), and optionally `types` (the force field's atom types, one for each atom), `values` (the parameters by the name the paper uses, each a decimal string as [1.2](01-conventions.md#12-numbers) writes numbers that carry meaning), `units` (a unit for each value) and `source` (where in the paper). +The atoms of a bond, angle or torsion are a chain, each bonded to the next, and the atoms of an improper are each bonded to the first. + +A structure body breaks `layer.structure.value` when its value is not a SMILES or SMARTS as its format says: an unclosed bracket, branch or ring, a stray character, a bond with no atom, or a query (`,`, `;`, `&`, `!` or `$` inside a bracket, or `a` or `A`) in a SMILES. +It breaks `layer.structure.identity` when its identity is not of the form its value gives, or, for a `smiles:` or `smarts:` identity, is not the hash of the value. +It breaks `layer.structure.term` when a term cites an atom the value does not write or cites an atom twice, when its atoms are not joined as its kind needs, when `types` has another length than `atoms`, or when `units` names a value that is not given ([22.4](22-conformance.md#224-rules)). +The reference implementation, `paperspec.structures.problems`, reads atoms and bonds from the text with the standard library alone. +It does not check valence, aromaticity or the InChIKey, which need a chemistry toolkit; a producer with one SHOULD also check that the value sanitizes as a molecule when `format` says a SMILES, and that the InChIKey is the molecule's. +`vectors/structures.jsonl` reads the atoms and bonds of SMILES and SMARTS texts, mints identities, and breaks every rule, and `fixtures/records/chemistry/` holds a layer of four structures on `hale2026harmonic-damb`: ethane, named and confirmed; water, named by a model and still `proposed`; the CT–CT pattern of Table 1, a SMARTS with the bond constants of both parameter sets as terms; and water again, as a SMILES that writes its hydrogens, with the OW–HW constants. +The two writings of water share one InChIKey, which is what finds them as one. + +## 18.7 Sequences + +A `sequence` annotation ties a protein, DNA or RNA sequence to the words that name it, show it or report a variant of it, as [18.6](#186-chemical-structures) does for a structure. + +| Property | Required | Holds | +| --- | --- | --- | +| `value` | Yes | The residues in capital letters, a gap as `-`. | +| `alphabet` | Yes | `protein`, `dna` or `rna`, which says what the letters mean. | +| `role` | Yes | `names` the sequence, `depicts` it (the span shows it, as text, a figure or an alignment), `uses` it (a construct, primer or probe) or `reports` something about it (a variant, a region). | +| `identity` | Yes | The alphabet, a colon and the first sixteen hex digits of the SHA-256 of the residues with the gaps taken out, so a sequence is found whatever gaps it was shown with and whatever its numbering. | +| `start` | No | The number of the first residue of the value in the molecule's own numbering; 1 when omitted. | +| `label` | No | A short name, such as `HP35`. | +| `organism` | No | The organism the sequence is from, as the paper names it. | +| `accessions` | No | Entries of outside databases that the sequence is, as in [18.6](#186-chemical-structures) (`uniprot`, `genbank`, `refseq`, `ensembl`, `pdb`). | +| `regions` | No | Stretches of the sequence the span is about: a list of `{start, end, label?}`, both ends included. | +| `variants` | No | Changes the span reports: a list of `{position, ref, alt}`. | + +The alphabets allow the twenty amino acids, selenocysteine (`U`), pyrrolysine (`O`), the ambiguity codes `B`, `Z`, `J` and `X` and a stop (`*`) for `protein`; `A`, `C`, `G`, `T` and the IUPAC ambiguity codes for `dna`; the same with `U` for `T` for `rna`; and `-` for a gap in all three. +A residue's number is `start` plus the number of residues before it, gaps not counted, so a fragment of a protein is numbered as the whole protein is, and `regions` and `variants` use those numbers. +A variant says that the residue at `position` is `ref` in the value and `alt` in the variant; `alt` is a residue, `*` for a stop or `-` for a deletion. + +A sequence body breaks `layer.sequence.value` when its letters are not those of its alphabet or are all gaps, `layer.sequence.identity` when its identity is not the hash of its residues, `layer.sequence.region` when a region starts after it ends or reaches outside the residues, and `layer.sequence.variant` when a variant is outside the residues, names a `ref` the value does not have at that position, changes a residue to itself, or has an `alt` its alphabet does not allow ([22.4](22-conformance.md#224-rules)). +The reference implementation is `paperspec.sequences.problems`. +It needs no toolkit, since an alphabet is a set of letters; a producer that knows the molecule SHOULD also check the sequence against the `accessions` it names. +`vectors/sequences.jsonl` mints identities and breaks every rule, and `fixtures/records/biology/` holds a layer of three annotations on the draft `writer2027fixed-ynr7.v3`, whose last sentence tests its charges on the villin headpiece subdomain HP35: the words that name it, the printed sequence with its three helices as regions, and a model's proposal of the N68H variant, in the numbering 42 to 76 that the headpiece uses. diff --git a/spec/22-conformance.md b/spec/22-conformance.md index cce8627..9fa0a7d 100644 --- a/spec/22-conformance.md +++ b/spec/22-conformance.md @@ -6,7 +6,7 @@ | --- | --- | --- | | `vectors/*.jsonl` | Inputs and expected outputs, one case per line. | Computes every expected output from its input. | | `fixtures/packages/` | Valid packages: a converted chemistry paper with corrections, receipts, a multi-level-header table and a dataset; its checks-only export; an open-access paper with two witnesses; a Typst draft; a tiny document, as a folder and as the zip of [12.2](12-package.md#122-paths). | Accepts each, and recomputes every value it contains. | -| `fixtures/records/` | A valid record of every other format that is a JSON file of its own, and a second layer, of traced citations ([18.5](18-layers.md#185-traced-citations)), whose traces resolve as `vectors/traces.jsonl` says; the stage requirements and stamp rules are in `registry/`, and a bundle is built by `paperspec load --bundle`. | Accepts each. | +| `fixtures/records/` | A valid record of every other format that is a JSON file of its own, and three more layers: traced citations ([18.5](18-layers.md#185-traced-citations)), whose traces resolve as `vectors/traces.jsonl` says, chemical structures ([18.6](18-layers.md#186-chemical-structures)) and sequences ([18.7](18-layers.md#187-sequences)), whose rules `vectors/structures.jsonl` and `vectors/sequences.jsonl` pin; the stage requirements and stamp rules are in `registry/`, and a bundle is built by `paperspec load --bundle`. | Accepts each. | | `fixtures/invalid/` | Invalid packages, each with `expect.json` naming the rule it breaks. | Refuses each, and SHOULD name that rule. | | `fixtures/keys/` | The test keys that signed the fixtures and the team secret of the checks-only export. | Never uses them for anything else. | @@ -49,10 +49,10 @@ Rule IDs are stable: a rule's meaning never changes, and a retired rule's ID is | `doc.receipt.`, `doc.qa.`, `doc.fidelity.` | Receipts, spot-checks and levels. | | `doc.witness.`, `doc.page.`, `doc.location.`, `doc.reference.` | Witnesses and geometry. | | `grade.` | Grading. | -| `layer.` | Annotations that refer to documents: `layer.trace.source` and `layer.trace.target` ([18.5](18-layers.md#185-traced-citations)). | +| `layer.` | Annotations: `layer.trace.source` and `layer.trace.target`, which refer to documents ([18.5](18-layers.md#185-traced-citations)); `layer.structure.value`, `layer.structure.identity` and `layer.structure.term` ([18.6](18-layers.md#186-chemical-structures)); and `layer.sequence.value`, `layer.sequence.identity`, `layer.sequence.region` and `layer.sequence.variant` ([18.7](18-layers.md#187-sequences)). | A package is validated by [22.2](#222-validating-a-package), but a layer is not part of one. -The `layer.` rules are reported for an annotation, in the form `annotation: rule: message`, by a validator that has the annotation and the states of the documents it names; the reference implementation does so for traces in `paperspec.traces.problems`. +The `layer.` rules are reported for an annotation, in the form `annotation: rule: message`, by a validator that has the annotation and, for a trace, the states of the documents it names; the reference implementation does so in `paperspec.traces.problems`, `paperspec.structures.problems` and `paperspec.sequences.problems`. ## 22.5 Stability diff --git a/sql/store.sql b/sql/store.sql index 711ac19..d1274a9 100644 --- a/sql/store.sql +++ b/sql/store.sql @@ -68,7 +68,7 @@ CREATE TABLE layers ( CREATE TABLE annotations ( id VARCHAR(256) NOT NULL, layer VARCHAR(256) NOT NULL, - body_kind VARCHAR(24) NOT NULL CHECK (body_kind IN ('gloss', 'claim-link', 'symbol', 'comment', 'caveat', 'question', 'exercise', 'citation-context', 'prerequisite', 'crosslink', 'trace', 'translation', 'description', 'generated')), + body_kind VARCHAR(24) NOT NULL CHECK (body_kind IN ('gloss', 'claim-link', 'symbol', 'comment', 'caveat', 'question', 'exercise', 'citation-context', 'prerequisite', 'crosslink', 'trace', 'structure', 'sequence', 'translation', 'description', 'generated')), category VARCHAR(12) CHECK (category IN ('comment', 'context', 'critique', 'question', 'correction', 'feedback', 'resource')), status VARCHAR(10) NOT NULL CHECK (status IN ('proposed', 'confirmed', 'rejected', 'withdrawn')), receipt VARCHAR(32), diff --git a/src/paperspec/cli/build.py b/src/paperspec/cli/build.py index 0a8871a..b5d99d2 100644 --- a/src/paperspec/cli/build.py +++ b/src/paperspec/cli/build.py @@ -27,10 +27,11 @@ from paperspec import anchors as AN # noqa: E402 from paperspec import corrections as CO # noqa: E402 from paperspec import crypto, fingerprint as FP, grade as GR, hashing, jcs, receipts as RC, rights as RI # noqa: E402 from paperspec import keys as K, log as LG, mldsa, targets as TG, traces as TR, vrf # noqa: E402 +from paperspec import sequences as SQ, structures as ST # noqa: E402 from paperspec.model import LEAVES, MATH_KINDS, RUN_KINDS, VERBATIM_KINDS, Doc # noqa: E402 from paperspec.notation import fold_math # noqa: E402 from paperspec.package import ZIP_EXTENSION, history_items, jsonl, line, read_state, witness_id, write, write_zip # noqa: E402 -from paperspec.schema import Store # noqa: E402 +from paperspec.schema import Store, validate as schema_validate # noqa: E402 from paperspec.text import letter_first, mint_node_id, norm, record_id, sha256_hex # noqa: E402 from paperspec.tree import Refusal, _flatten, mint_ids, validate_structure # noqa: E402 @@ -1396,6 +1397,9 @@ TAG = "tag:scient.ing,2026:" CLAIM_K_BOND = "claim:272XTX7C" # The layer of traced citations on the draft (spec/18 §18.5), which the project holds beside the example layer. TRACE_LAYER = TAG + "layer:smithlab/tr6c3q8m" +# The layers of chemical structures on the main example and of sequences on the draft (spec/18 §18.6 and §18.7). +CHEMISTRY_LAYER = TAG + "layer:smithlab/cm7h4p2x" +BIOLOGY_LAYER = TAG + "layer:smithlab/bq5k8r3w" # A model's provenance: enough to name the weights and the instructions it ran with (all illustrative). MODEL = {"name": "example-model", "provider": "Example Models (illustrative)", "version": "2026-09", "weights": sha256_hex("illustrative weights"), "prompt": sha256_hex("illustrative review prompt"), @@ -1602,7 +1606,7 @@ def records(out, hale): {"type": "document", "ref": QHALE, "note": "Read the introduction."}, {"type": "node", "ref": QHALE + "#" + I["@tab1"], "note": "Then the table."}, {"type": "claim", "ref": CLAIM_K_BOND, "note": "The bond force constant, amber/k-bond."}]}], - "layers": [layer_id, TRACE_LAYER], "datasets": ["ds-hale-bond-params", "ds-hale-ctct-scan"], "views": ["ctct-scan"], + "layers": [layer_id, TRACE_LAYER, CHEMISTRY_LAYER, BIOLOGY_LAYER], "datasets": ["ds-hale-bond-params", "ds-hale-ctct-scan"], "views": ["ctct-scan"], "drafts": [STORE + "/" + DRAFT], "claims": {"paperclaim": "amber"}, "settings": {"digit_rule": "anchored-sections", "drift_threshold": "0.25", "spot_check": {"rate": "0.05", "minimum": 10}, "rights_unknown": "refuse", @@ -1956,6 +1960,277 @@ def traces(out, hale, draft): wv(out, "traces.jsonl", cases + broken_cases) +# --- chemical structures and sequences ---------------------------------------------- + +ETHANE_KEY, WATER_KEY = "OTMSDBZUPAUEDD-UHFFFAOYSA-N", "XLYOFNOQVPJJNP-UHFFFAOYSA-N" +HP35 = "LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF" + + +def structure_body(fmt, value, role, inchikey=None, **more): + b = {"type": "TextualBody", "kind": "structure", "value": value, "format": ST.MEDIA[fmt], "role": role, + "identity": ST.identity(fmt, value, inchikey)} + b.update(more) + return b + + +def sequence_body(alphabet, value, role, **more): + b = {"type": "TextualBody", "kind": "sequence", "value": value, "alphabet": alphabet, "role": role, + "identity": SQ.identity(alphabet, value)} + b.update(more) + return b + + +def term(kind, atoms, types, values, units, source): + return {"kind": kind, "atoms": atoms, "types": types, "values": values, "units": units, "source": source} + + +def entities(out, hale, draft): + """The layer of chemical structures on the main example, the layer of sequences on the draft (spec/18 §18.6 and + §18.7), and vectors/structures.jsonl and vectors/sequences.jsonl: the atoms and bonds a SMILES or SMARTS writes, + the identities, and the annotations that break each rule.""" + HALE, WRITER = hale["key"], draft["key"] + QHALE, QWRITER = STORE + "/" + HALE, STORE + "/" + WRITER + pkgs = os.path.join(out, "fixtures", "packages") + ana = {"id": TAG + "key:ana", "type": "Person", "name": "Ana Example"} + model = {"id": TAG + "software:example-model", "type": "Software", "name": "A model (illustrative)"} + + def layer(name, layer_id, state, qdoc, label, purpose, scope, items): + """Write a layer of annotations on one document, with the receipt that confirms its confirmed ones.""" + doc = state.doc() + vals = hashing.compute(doc) + texts = {n: hashing.plain(doc, n) for n in doc.order if doc.nodes[n]["kind"] in ("sentence", "cell")} + + def anchor(text_of, quote=None): + nid = next(n for n, t in texts.items() if text_of(t)) + span = None + if quote: + i = texts[nid].index(quote) + span = [i, i + len(quote)] + return AN.make_anchor(doc, vals, nid, state.rev, span=span, store=STORE) + + def target(a): + sel = [{"type": "AnchorSelector", "anchor": a}] + if "quote" in a and "exact" in a["quote"]: + sel.append({"type": "TextQuoteSelector", "exact": a["quote"]["exact"], + "prefix": a["quote"].get("prefix", ""), "suffix": a["quote"].get("suffix", "")}) + return {"type": "SpecificResource", "source": TAG + "doc:" + qdoc, "selector": sel} + + anns = [] + for body, where, who, status, created in items(anchor): + a = {"@context": CTX, "type": "Annotation", "layer": layer_id, "motivation": "identifying", "creator": who, + "created": created, "body": body, "target": target(where)} + a["id"] = TAG + "annotation:smithlab/" + record_id(H(jcs.dumpb(a))) + a["status"] = status + anns.append(a) + confirmed = [a for a in anns if a["status"] == "confirmed"] + lr = RC.seal({"format": "scienting-receipt/1", "doc": state.key, "rev": state.rev, "level": "F3", + "scope": "targeted:" + scope, "nodes": [], + "records": sorted([["annotation", a["id"].rsplit("/", 1)[1], ann_hash(a)] for a in confirmed]), + "evidence": [], "by": "ana", "at": "2026-10-14T09:30:00Z"}, secret("ana"), "ana") + for a in confirmed: + a["receipt"] = lr["id"] + wr(out, name + "/layer.json", {"@context": CTX, "format": "scienting-layer/1", "id": layer_id, + "type": "AnnotationCollection", "label": label, "purpose": purpose, + "audience": "expert", "visibility": "team", "license": {"spdx": "CC-BY-4.0"}, + "creator": ana, "created": "2026-10-14T09:00:00Z", "project": "smithlab-charges", + "docs": [qdoc], "total": len(anns)}) + wr(out, name + "/annotations.jsonl", jsonl(anns)) + wr(out, name + "/receipt.json", lr) + return anns + + en = "–" + ct, ow = "CT" + en + "CT", "OW" + en + "HW" + units = {"k_r": "kcal mol-1 A-2", "r_eq": "A"} + + def chemistry_items(anchor): + return [ + (structure_body("smiles", "CC", "names", ETHANE_KEY, label="ethane", accessions=[{"db": "pubchem", "id": "6324"}]), + anchor(lambda t: "bond of ethane" in t, "ethane"), ana, "confirmed", "2026-10-14T09:00:00Z"), + (structure_body("smiles", "O", "names", WATER_KEY, label="water"), + anchor(lambda t: t.startswith("Water, H"), "Water"), model, "proposed", "2026-10-14T09:05:00Z"), + (structure_body("smarts", "[CX4][CX4]", "parametrizes", written=ct, label=ct, terms=[ + term("bond", [0, 1], ["CT", "CT"], {"k_r": "310.0", "r_eq": "1.526"}, units, "Table 1, Set A"), + term("bond", [0, 1], ["CT", "CT"], {"k_r": "305.2", "r_eq": "1.5260"}, units, "Table 1, Set B")]), + anchor(lambda t: t == ct), ana, "confirmed", "2026-10-14T09:10:00Z"), + (structure_body("smiles", "O([H])[H]", "parametrizes", WATER_KEY, written=ow, label="water", + accessions=[{"db": "pubchem", "id": "962"}], terms=[ + term("bond", [0, 1], ["OW", "HW"], {"k_r": "553.0", "r_eq": "0.9572"}, units, "Table 1, Set A"), + term("bond", [0, 1], ["OW", "HW"], {"k_r": "548.1", "r_eq": "0.9570"}, units, "Table 1, Set B")]), + anchor(lambda t: t == ow), ana, "confirmed", "2026-10-14T09:15:00Z"), + ] + + helices = [{"start": 44, "end": 51, "label": "helix 1"}, {"start": 55, "end": 59, "label": "helix 2"}, + {"start": 63, "end": 74, "label": "helix 3"}] + + def biology_items(anchor): + sentence = lambda t: "villin headpiece" in t # noqa: E731 + return [ + (sequence_body("protein", HP35, "names", start=42, label="HP35", organism="Gallus gallus"), + anchor(sentence, "villin headpiece subdomain HP35"), ana, "confirmed", "2026-10-14T09:00:00Z"), + (sequence_body("protein", HP35, "depicts", start=42, label="HP35", regions=helices), + anchor(sentence, HP35), ana, "confirmed", "2026-10-14T09:05:00Z"), + (sequence_body("protein", HP35, "reports", start=42, label="HP35 N68H", + variants=[{"position": 68, "ref": "N", "alt": "H"}]), + anchor(sentence, "N68H"), model, "proposed", "2026-10-14T09:10:00Z"), + ] + + chem = layer("chemistry", CHEMISTRY_LAYER, read_state(os.path.join(pkgs, HALE)), QHALE, + "Structures in Hale and Osei", "The molecules the paper names and the force-field constants it gives for them.", + "structures", chemistry_items) + bio = layer("biology", BIOLOGY_LAYER, read_state(os.path.join(pkgs, WRITER)), QWRITER, + "Sequences in the draft", "The peptide the draft tests its charges on, its helices and its variant.", + "sequences", biology_items) + + def with_body(a, **edit): + """The annotation with its body changed; a key set to None is removed.""" + b = copy.deepcopy(a) + for k, v in edit.items(): + if v is None: + b["body"].pop(k, None) + else: + b["body"][k] = v + return b + + def problem_case(cid, a, module, note): + return {"id": cid, "op": "problems", "annotation": a, "schema": not schema_validate(SCHEMAS, "annotation.schema.json", a), + "expect": module.problems(a), "note": note} + + # --- structures + ethane, _water_proposed, ctct, water = chem + scan_good = [ + ("ethane", "smiles", "CC"), ("a-branch", "smiles", "CC(=O)N"), ("an-aromatic-ring", "smiles", "c1ccccc1"), + ("a-ring-with-a-substituent", "smiles", "C1CCCCC1C"), ("fused-rings", "smiles", "c1ccc2ccccc2c1"), + ("written-hydrogens", "smiles", "O([H])[H]"), ("bracket-atoms", "smiles", "C[N+](=O)[O-]"), + ("two-letter-atoms", "smiles", "ClCCBr"), ("a-salt", "smiles", "[Na+].[Cl-]"), + ("a-two-digit-ring", "smiles", "C%10CC%10"), ("stereo-bonds", "smiles", "F/C=C/F"), ("a-wildcard", "smiles", "*C"), + ("an-open-position", "smarts", "[*:1]-[OX2H]"), ("queries", "smarts", "[CX3](=O)[NX3]"), + ("a-bond-query", "smarts", "C-,=C"), ("a-recursive-query", "smarts", "[$([CX3]=O)]N"), + ("any-aromatic-atom", "smarts", "a1aaaaa1"), ("two-open-positions", "smarts", "[*:1]-C(=O)-[*:2]"), + ] + scan_bad = [ + ("empty", "smiles", ""), ("spaces-at-an-end", "smiles", " CC"), ("unclosed-bracket", "smiles", "C[NH"), + ("empty-bracket", "smiles", "C[]"), ("unmatched-close", "smiles", "CC)"), ("unclosed-branch", "smiles", "CC(C"), + ("empty-branch", "smiles", "CC()C"), ("ring-never-closed", "smiles", "C1CC"), ("bond-with-no-atom-after", "smiles", "CC="), + ("bond-with-no-atom-before", "smiles", "=CC"), ("bond-before-a-branch", "smiles", "C=(C)C"), + ("a-stray-character", "smiles", "CC?C"), ("a-space-inside", "smiles", "C C"), ("a-query-in-a-bracket", "smiles", "[C,N]"), + ("a-smarts-atom", "smiles", "aC"), ("a-smarts-bond", "smiles", "C~C"), ("percent-without-two-digits", "smiles", "C%1CC%1"), + ("a-ring-before-any-atom", "smiles", "1CC1"), ("a-branch-before-any-atom", "smiles", "(C)C"), ("only-a-bond", "smarts", "-"), + ] + cases = [] + for cid, fmt, text in scan_good + scan_bad: + try: + n, bonds = ST.scan(text, smarts=fmt == "smarts") + expect = {"atoms": n, "bonds": [list(b) for b in sorted(bonds)]} + except ValueError: + expect = None + cases.append({"id": "scan-" + cid, "op": "scan", "format": fmt, "text": text, "expect": expect}) + for cid, fmt, text, key in (("a-molecule-with-an-inchikey", "smiles", "CC", ETHANE_KEY), + ("a-molecule-without-one", "smiles", "CC", None), + ("a-smarts-never-has-one", "smarts", "[CX4][CX4]", ETHANE_KEY), + ("another-spelling-another-hash", "smarts", "C-C", None)): + cases.append({"id": "identity-" + cid, "op": "identity", "format": fmt, "text": text, "inchikey": key, + "expect": ST.identity(fmt, text, key)}) + nma = structure_body("smiles", "CC(=O)NC", "parametrizes", terms=[ + term("torsion", [0, 1, 3, 4], ["CT", "C", "N", "CT"], {"v2": "2.5"}, {"v2": "kcal mol-1"}, "Table 3")]) + nma_ann = copy.deepcopy(water) + nma_ann["body"] = nma + + def term_edit(base, i, **edit): + ts = copy.deepcopy(base["body"]["terms"]) + ts[i].update(edit) + return with_body(base, terms=ts) + + cases += [ + problem_case("valid-a-smiles-with-terms", water, ST, "The water of Table 1, a SMILES that writes its hydrogens."), + problem_case("valid-a-smarts-with-terms", ctct, ST, "The CT-CT pattern of Table 1."), + problem_case("valid-a-smiles-with-no-terms", ethane, ST, "A name and no terms."), + problem_case("valid-a-torsion", nma_ann, ST, "A torsion along a chain of four atoms."), + problem_case("valid-a-smiles-identity-without-an-inchikey", with_body(ethane, identity=ST.identity("smiles", "CC")), ST, + "No InChIKey: the hash of the value."), + problem_case("value-an-unknown-format", with_body(water, format="chemical/x-mdl-molfile"), ST, "Not a format of this body."), + problem_case("value-an-unclosed-branch", with_body(water, value="O([H]"), ST, "A branch never closed."), + problem_case("value-a-query-in-a-smiles", with_body(water, value="[O,S]([H])[H]"), ST, "A query is SMARTS."), + problem_case("identity-a-smarts-with-an-inchikey", with_body(ctct, identity=WATER_KEY), ST, "A pattern has no InChIKey."), + problem_case("identity-the-hash-of-another-value", with_body(ctct, identity=ST.identity("smarts", "[CX4]")), ST, + "The hash is of another text."), + problem_case("identity-the-other-format", with_body(ethane, identity=ST.identity("smarts", "CC")), ST, + "A smarts: identity on a SMILES."), + problem_case("term-an-atom-the-value-does-not-write", term_edit(water, 0, atoms=[0, 3]), ST, "Water has atoms 0 to 2."), + problem_case("term-an-atom-twice", term_edit(water, 0, atoms=[1, 1]), ST, "An atom cited twice."), + problem_case("term-a-bond-between-atoms-not-bonded", term_edit(water, 0, atoms=[1, 2]), ST, "The two hydrogens."), + problem_case("term-an-angle-that-is-not-a-chain", term_edit(water, 0, kind="angle", atoms=[0, 1, 2], types=["OW", "HW", "HW"]), ST, + "Hydrogen 1 is not bonded to hydrogen 2."), + problem_case("valid-an-angle-around-the-oxygen", term_edit(water, 0, kind="angle", atoms=[1, 0, 2], types=["HW", "OW", "HW"]), ST, + "Hydrogen, oxygen, hydrogen."), + problem_case("term-a-torsion-that-is-not-a-chain", with_body(nma_ann, terms=[{"kind": "torsion", "atoms": [0, 1, 2, 3]}]), ST, + "Atom 2 is not bonded to atom 3."), + problem_case("valid-an-improper", with_body(nma_ann, terms=[{"kind": "improper", "atoms": [1, 0, 2, 3]}]), ST, + "The carbonyl carbon and its three neighbors."), + problem_case("term-an-improper-that-is-not-a-star", with_body(nma_ann, terms=[{"kind": "improper", "atoms": [0, 1, 2, 3]}]), ST, + "The first atom is not bonded to the others."), + problem_case("term-types-of-another-length", term_edit(water, 0, types=["OW", "HW", "HW"]), ST, "Three types for two atoms."), + problem_case("term-units-for-a-value-not-given", term_edit(water, 0, units={"k_r": "kcal mol-1 A-2", "theta": "degree"}), ST, + "A unit for a value that is not there."), + problem_case("term-the-wrong-number-of-atoms-for-the-kind", term_edit(water, 0, kind="torsion"), ST, + "A torsion cites four atoms."), + ] + wv(out, "structures.jsonl", cases) + + # --- sequences + names, depicts, reports = bio + dna, rna = "ATGGCGTACGTT", "AUGGCGUACGUU" + gapped = sequence_body("protein", "MK-LV", "depicts", start=10, regions=[{"start": 11, "end": 13}], + variants=[{"position": 12, "ref": "L", "alt": "V"}]) + seq_ann = lambda body: dict(depicts, body=body) # noqa: E731 + cases = [] + for cid, alphabet, value in (("protein", "protein", HP35), ("the-same-with-gaps", "protein", HP35[:5] + "-" + HP35[5:]), + ("dna", "dna", dna), ("rna", "rna", rna), ("the-same-letters-in-another-alphabet", "rna", "ACGU"), + ("letters-both-alphabets-write", "dna", "ACGT"), ("protein-letters-that-are-also-dna", "protein", "ACGT")): + cases.append({"id": "identity-" + cid, "op": "identity", "alphabet": alphabet, "text": value, + "expect": SQ.identity(alphabet, value)}) + cases += [ + problem_case("valid-a-name", names, SQ, "A protein, numbered from 42."), + problem_case("valid-regions", depicts, SQ, "Three helices inside residues 42 to 76."), + problem_case("valid-a-variant", reports, SQ, "Asparagine 68 to histidine."), + problem_case("valid-gaps-are-not-numbered", seq_ann(gapped), SQ, "M10 K11 L12 V13; the gap takes no number."), + problem_case("valid-dna", seq_ann(sequence_body("dna", dna, "uses", label="a primer")), SQ, "A DNA sequence."), + problem_case("valid-rna", seq_ann(sequence_body("rna", rna, "uses")), SQ, "An RNA sequence."), + problem_case("valid-a-stop-and-a-deletion", seq_ann(sequence_body("protein", "MKLV", "reports", variants=[ + {"position": 3, "ref": "L", "alt": "*"}, {"position": 4, "ref": "V", "alt": "-"}])), SQ, "Alternatives * and -."), + problem_case("valid-accessions", seq_ann(sequence_body("dna", dna, "names", accessions=[ + {"db": "genbank", "id": "NC_000913.3"}, {"db": "refseq", "id": "NP_414542.1"}])), SQ, "Two database entries."), + problem_case("value-a-letter-the-alphabet-lacks", seq_ann(sequence_body("dna", "ATGU", "names")), SQ, "U is RNA."), + problem_case("value-t-in-rna", seq_ann(sequence_body("rna", "AUGT", "names")), SQ, "T is DNA."), + problem_case("value-lower-case", seq_ann(dict(sequence_body("protein", "MKLV", "names"), value="mklv")), SQ, + "Capital letters only."), + problem_case("value-only-gaps", seq_ann(sequence_body("protein", "---", "names")), SQ, "Nothing to number."), + problem_case("value-an-unknown-alphabet", seq_ann(dict(sequence_body("protein", "MKLV", "names"), alphabet="peptide")), SQ, + "Not an alphabet."), + problem_case("identity-another-sequence", seq_ann(dict(names["body"], identity=SQ.identity("protein", "MKLV"))), SQ, + "The hash is of other residues."), + problem_case("identity-another-alphabet", seq_ann(dict(names["body"], identity=SQ.identity("rna", HP35))), SQ, + "The alphabet in the identity differs."), + problem_case("region-ends-before-it-starts", seq_ann(dict(depicts["body"], regions=[{"start": 51, "end": 44}])), SQ, "51 to 44."), + problem_case("region-past-the-end", seq_ann(dict(depicts["body"], regions=[{"start": 70, "end": 80}])), SQ, + "The value ends at 76."), + problem_case("region-before-the-start", seq_ann(dict(depicts["body"], regions=[{"start": 40, "end": 50}])), SQ, + "The value starts at 42."), + problem_case("variant-outside-the-residues", seq_ann(dict(reports["body"], variants=[{"position": 80, "ref": "N", "alt": "H"}])), + SQ, "Position 80 is past 76."), + problem_case("variant-names-a-residue-the-value-lacks", seq_ann(dict(reports["body"], variants=[ + {"position": 68, "ref": "K", "alt": "H"}])), SQ, "The residue at 68 is N."), + problem_case("variant-changes-a-residue-to-itself", seq_ann(dict(reports["body"], variants=[ + {"position": 68, "ref": "N", "alt": "N"}])), SQ, "N to N."), + problem_case("variant-to-a-letter-the-alphabet-lacks", seq_ann(sequence_body("dna", dna, "reports", variants=[ + {"position": 1, "ref": "A", "alt": "E"}])), SQ, "E is not a nucleotide."), + problem_case("variant-numbered-from-one-by-mistake", seq_ann(dict(reports["body"], variants=[ + {"position": 27, "ref": "N", "alt": "H"}])), SQ, "Residue 27 of the fragment is not residue 68 of the protein."), + problem_case("variant-at-a-position-a-gap-would-shift", seq_ann(dict(gapped, variants=[ + {"position": 13, "ref": "L", "alt": "V"}])), SQ, "L is residue 12; counting the gap would make it 13."), + ] + wv(out, "sequences.jsonl", cases) + + def _anchors_of(body): return [s["anchor"] for s in body["selector"] if s["type"] == "AnchorSelector"] @@ -2178,6 +2453,7 @@ def main(out): write_zip(tiny_dir, tiny_dir + ZIP_EXTENSION) records(out, hale) traces(out, hale, draft) + entities(out, hale, draft) vectors(out, hale, tiny) invalid(out, tiny) diff --git a/src/paperspec/cli/check.py b/src/paperspec/cli/check.py index fe39883..9cd3ded 100644 --- a/src/paperspec/cli/check.py +++ b/src/paperspec/cli/check.py @@ -28,6 +28,7 @@ from paperspec import corrections as CO # noqa: E402 from paperspec import crypto, db, fingerprint as FP, grade as GR, hashing, jcs, receipts as RC, rights as RI # noqa: E402 from paperspec import package as PK # noqa: E402 from paperspec import keys as K, log as LG, mldsa, targets as TG, traces as TR, vrf # noqa: E402 +from paperspec import sequences as SQ, structures as ST # noqa: E402 import unicodedata # noqa: E402 from paperspec.model import Doc # noqa: E402 from paperspec.notation import fold_math # noqa: E402 @@ -195,9 +196,10 @@ def check_records(): stage_ids = {js(p("registry", "stages", f))["id"] for f in os.listdir(p("registry", "stages")) if f.endswith(".json")} stages = js(os.path.join(R, "project.json")).get("settings", {}).get("stages") ok("records", stages is None or stages in stage_ids, "project settings.stages names no stage file: %s" % stages) - # Confirmed annotations are covered by the layer receipt at their content hash, in both layers: the example - # layer on the main example and the layer of traces on the draft. - for layer in ("layer", "traces"): + # Confirmed annotations are covered by the layer receipt at their content hash, in every layer: the example + # layer on the main example, the layer of traces on the draft, the structures of the main example and the draft's + # sequences. + for layer in ("layer", "traces", "chemistry", "biology"): lj = js(os.path.join(R, layer, "layer.json")) lr = js(os.path.join(R, layer, "receipt.json")) items = {(k, i): h for k, i, h in lr["records"]} @@ -957,6 +959,141 @@ def check_traces(): "one case follows a citation inside the passage") +def check_entities(): + """Chemical structures and sequences (spec/18 §18.6 and §18.7): the two fixture layers, the bodies' schemas, the + context's terms, and the vectors, which read atoms and bonds, mint identities and break every rule.""" + R = p("fixtures", "records") + rules = {r["id"]: r for r in js(p("registry", "rules.json"))["rules"]} + mine = {"structure": ("layer.structure.value", "layer.structure.identity", "layer.structure.term"), + "sequence": ("layer.sequence.value", "layer.sequence.identity", "layer.sequence.region", "layer.sequence.variant")} + for kind, names in mine.items(): + for rule in names: + ok("entities", rule in rules and rules[rule]["chapter"] == "spec/18-layers.md", "%s is not registered" % rule) + for kind, module in (("structure", ST), ("sequence", SQ)): + try: + module.problems({"body": {"kind": "comment"}}) + raised = False + except ValueError: + raised = True + ok("entities", raised, "%s.problems accepted a body of another kind" % kind) + + # The fixture layers: the chemistry of the main example, the sequences of the draft. Each annotation breaks no rule. + chem = jl(os.path.join(R, "chemistry", "annotations.jsonl")) + bio = jl(os.path.join(R, "biology", "annotations.jsonl")) + ok("entities", all(a["body"]["kind"] == "structure" and ST.problems(a) == [] for a in chem) and len(chem) == 4, + "the chemistry layer holds four structures that break no rule") + ok("entities", all(a["body"]["kind"] == "sequence" and SQ.problems(a) == [] for a in bio) and len(bio) == 3, + "the biology layer holds three sequences that break no rule") + ok("entities", {a["status"] for a in chem} == {"confirmed", "proposed"} and {a["status"] for a in bio} == {"confirmed", "proposed"}, + "each layer holds a model's proposal beside a person's confirmed annotations") + ok("entities", all((a["creator"]["type"] == "Software") == (a["status"] == "proposed") for a in chem + bio), + "only a model's annotations are proposed") + ok("entities", {a["body"]["role"] for a in chem} == {"names", "parametrizes"} + and {a["body"]["role"] for a in bio} == {"names", "depicts", "reports"}, "the layers lack a role they are known for") + # Two writings of water have one identity: the name a model proposed and the parametrized molecule. + water = [a["body"] for a in chem if a["body"]["identity"].startswith("XLYOFNOQ")] + ok("entities", len(water) == 2 and water[0]["value"] != water[1]["value"], "two spellings of water share an identity") + ok("entities", len({a["body"]["identity"] for a in bio}) == 1, "the three annotations of the peptide share an identity") + terms = [t for a in chem for t in a["body"].get("terms", [])] + ok("entities", len(terms) == 4 and all(set(t["values"]) == {"k_r", "r_eq"} and set(t["units"]) == set(t["values"]) for t in terms), + "the layer gives four bond terms with a force constant and an equilibrium length each") + # What the span says is what the body is about: the peptide's printed sequence is the body's value. + shown = next(a for a in bio if a["body"]["role"] == "depicts") + ok("entities", shown["target"]["selector"][1]["exact"] == shown["body"]["value"], "the shown sequence is the quote") + ok("entities", ST.MEDIA == {"smiles": "chemical/x-daylight-smiles", "smarts": "chemical/x-daylight-smarts"}, + "the media types of the two formats") + + # The schema: what each body takes and refuses (spec/18 §18.4). + base = {"structure": next(a for a in chem if a["body"].get("terms") and a["body"]["format"].endswith("smarts")), + "sequence": next(a for a in bio if a["body"]["role"] == "depicts")} + + def edit(kind, **kw): + a = json.loads(json.dumps(base[kind])) + for k, v in kw.items(): + if v is None: + a["body"].pop(k, None) + else: + a["body"][k] = v + return a + + schema_cases = ( + ("a structure", base["structure"], True), ("a sequence", base["sequence"], True), + ("a structure with no identity", edit("structure", identity=None), False), + ("a structure with an unknown role", edit("structure", role="reports"), False), + ("a structure with an extra property", edit("structure", alphabet="protein"), False), + ("a structure whose value is empty", edit("structure", value=""), False), + ("a structure with an identity of no form", edit("structure", identity="ethane"), False), + ("a structure with a term value that is no decimal", edit("structure", terms=[dict(base["structure"]["body"]["terms"][0], values={"k_r": 310})]), False), + ("a structure with a term of one atom", edit("structure", terms=[{"kind": "bond", "atoms": [0]}]), False), + ("a structure with a term of an unknown kind", edit("structure", terms=[{"kind": "dihedral", "atoms": [0, 1, 2, 3]}]), False), + ("a structure with an accession of a database in capitals", edit("structure", accessions=[{"db": "PubChem", "id": "1"}]), False), + ("a structure with two equal accessions", edit("structure", accessions=[{"db": "pubchem", "id": "1"}] * 2), False), + ("a structure with an empty list of terms", edit("structure", terms=[]), False), + ("a sequence with no alphabet", edit("sequence", alphabet=None), False), + ("a sequence with an unknown role", edit("sequence", role="parametrizes"), False), + ("a sequence of lower-case letters", edit("sequence", value="mklv"), False), + ("a sequence with a protein letter in DNA", edit("sequence", alphabet="dna"), False), + ("a sequence that starts at zero", edit("sequence", start=0), False), + ("a sequence with a region of no end", edit("sequence", regions=[{"start": 44}]), False), + ("a sequence with a variant of two letters", edit("sequence", variants=[{"position": 1, "ref": "LS", "alt": "A"}]), False), + ("a sequence with an identity of no form", edit("sequence", identity="HP35"), False), + ("a sequence with an extra property", edit("sequence", format="text/plain"), False)) + for name, a, good in schema_cases: + ok("entities", (schema_errors("annotation.schema.json", a) == []) == good, "schema, %s" % name) + + # The vocabulary knows the terms (spec/18 §18.6 and §18.7, context/README.md). + ctx = js(p("context", "scienting-1.jsonld"))["@context"] + ok("entities", all(t in ctx for t in ("identity", "written", "alphabet", "organism", "start", "accessions", "terms", "regions", "variants")), + "the context lacks a term of the structure or sequence body") + ok("entities", all(isinstance(ctx[t], dict) and ctx[t]["@type"] == "@json" for t in ("accessions", "terms", "regions", "variants")), + "a list of objects is a JSON literal in the context") + # The store takes both kinds (sql/store.sql). + ok("entities", {"structure", "sequence"} <= {b["properties"]["kind"]["const"] for b in STORE.load("annotation.schema.json")["properties"]["body"]["oneOf"]}, + "the annotation schema lacks a body kind") + + # The vectors. + prefixes = {"structures.jsonl": (ST, {"value": "layer.structure.value", "identity": "layer.structure.identity", + "term": "layer.structure.term"}), + "sequences.jsonl": (SQ, {"value": "layer.sequence.value", "identity": "layer.sequence.identity", + "region": "layer.sequence.region", "variant": "layer.sequence.variant"})} + for name, (module, by_prefix) in prefixes.items(): + seen, ids = set(), set() + for c in V(name): + ids.add(c["id"]) + if c["op"] == "scan": + try: + n, bonds = module.scan(c["text"], smarts=c["format"] == "smarts") + got = {"atoms": n, "bonds": [list(b) for b in sorted(bonds)]} + except ValueError: + got = None + ok("entities", got == c["expect"], "%s %s" % (name, c["id"])) + elif c["op"] == "identity": + if module is ST: + got = ST.identity(c["format"], c["text"], c["inchikey"]) + else: + got = SQ.identity(c["alphabet"], c["text"]) + ok("entities", got == c["expect"], "%s %s" % (name, c["id"])) + else: + got = module.problems(c["annotation"]) + ok("entities", got == c["expect"], "%s %s" % (name, c["id"])) + ok("entities", (schema_errors("annotation.schema.json", c["annotation"]) == []) == c["schema"], + "%s %s: the schema flag is not what the schema says" % (name, c["id"])) + ok("entities", all(x["rule"] in rules for x in got), "%s %s: an unregistered rule" % (name, c["id"])) + seen |= {x["rule"] for x in got} + stem = c["id"].split("-", 1)[0] + if stem == "valid": + ok("entities", got == [], "%s %s: a valid case breaks a rule" % (name, c["id"])) + else: + ok("entities", by_prefix[stem] in {x["rule"] for x in got}, "%s %s: does not break %s" % (name, c["id"], by_prefix[stem])) + ok("entities", seen == set(by_prefix.values()), "%s: every rule is broken by some case: %s" % (name, sorted(seen))) + ok("entities", {"scan-an-open-position", "scan-written-hydrogens", "identity-a-molecule-with-an-inchikey", + "term-a-torsion-that-is-not-a-chain", "valid-an-improper"} <= {c["id"] for c in V("structures.jsonl")}, + "the structure vectors lack a case they are known for") + ok("entities", {"valid-gaps-are-not-numbered", "variant-at-a-position-a-gap-would-shift", "identity-the-same-with-gaps", + "valid-a-stop-and-a-deletion"} <= {c["id"] for c in V("sequences.jsonl")}, + "the sequence vectors lack a case they are known for") + + def check_determinism(): with tempfile.TemporaryDirectory() as tmp: subprocess.run([sys.executable, "-m", "paperspec", "build", "--out", tmp], check=True) @@ -1044,7 +1181,7 @@ def check_sql(): check_bundle(conn) # Store records satisfy the store tables' CHECK constraints. R = p("fixtures", "records") - for layer in ("layer", "traces"): + for layer in ("layer", "traces", "chemistry", "biology"): lay = js(os.path.join(R, layer, "layer.json")) conn.execute("INSERT INTO layers VALUES (?,?,?,?,?,?,?,?)", (lay["id"], lay.get("project"), lay["label"], lay["purpose"], lay.get("audience"), @@ -1054,7 +1191,7 @@ def check_sql(): (a["id"], a["layer"], a["body"]["kind"], a["body"].get("category"), a["status"], a.get("receipt"), a["creator"]["id"], a["created"], jcs.dumps(a))) kinds = {k for (k,) in conn.execute("SELECT DISTINCT body_kind FROM annotations")} - ok("sql", "trace" in kinds, "the store holds no trace annotation") + ok("sql", {"trace", "structure", "sequence"} <= kinds, "the store holds no trace, structure or sequence annotation") prj = js(os.path.join(R, "project.json")) conn.execute("INSERT INTO projects VALUES (?,?,?,?,?,?,?)", (prj["key"], prj.get("store"), prj["name"], prj.get("description"), jcs.dumps(prj.get("claims")), @@ -1125,7 +1262,7 @@ def _same_tree(a, b): UK = re.compile(r"\b(\w*(?:colour|behaviour|favour|honour|labour|neighbour|centre|metre|litre|fibre|analys(?:e|ed|es|ing)|" - r"catalogue|licence|defence|offence|organis\w*|normalis\w*|recognis\w*|optimis\w*|minimis\w*|" + r"catalogue|licence|defence|offence|organis(?:e|ed|es|ing|ation)|normalis\w*|recognis\w*|optimis\w*|minimis\w*|" r"maximis\w*|standardis\w*|serialis\w*|canonicalis\w*|initialis\w*|summaris\w*|prioritis\w*|" r"emphasis(?:e|ed|es|ing)|realis(?:e|ed|es|ing)|travell\w*|modell(?:ed|ing)|labell(?:ed|ing)|" r"cancell(?:ed|ing)|signall(?:ed|ing)|programme|grey|whilst|amongst|towards|judgement|ageing|" @@ -1446,6 +1583,7 @@ def run(args): check_invalid() check_vectors() check_traces() + check_entities() if not args.quick: check_determinism() check_sql() diff --git a/src/paperspec/sequences.py b/src/paperspec/sequences.py new file mode 100644 index 0000000..2537d2f --- /dev/null +++ b/src/paperspec/sequences.py @@ -0,0 +1,82 @@ +"""Biological sequences tied to words: the `sequence` body of an annotation. + +A sequence annotation's body holds the residues of a protein, DNA or RNA that a span names, shows or reports a +variant of. Non-normative; see spec/18-layers.md §18.7 for the body and spec/22-conformance.md §22.4 for the rules +`layer.sequence.value`, `layer.sequence.identity`, `layer.sequence.region` and `layer.sequence.variant`. + +Residues are written in capital letters, a gap as `-`. A residue's number is the body's `start` plus the count of +residues before it, gaps not counted, so a fragment of a protein is numbered as the whole protein is. Everything +here needs only the standard library. +""" + +from .text import sha256_hex + +ALPHABETS = { + "protein": frozenset("ACDEFGHIKLMNPQRSTVWYBXZJUO*-"), + "dna": frozenset("ACGTRYKMSWBDHVN-"), + "rna": frozenset("ACGURYKMSWBDHVN-"), +} +"""The letters each alphabet allows: the twenty amino acids, selenocysteine (U), pyrrolysine (O), the ambiguity codes +(B, Z, J, X for protein; IUPAC for nucleotides), a stop (`*`, protein only) and a gap (`-`).""" +ROLES = ("names", "depicts", "uses", "reports") + + +def residues(value): + """The residues of a value: the gaps taken out.""" + return value.replace("-", "") + + +def identity(alphabet, value): + """The identity a sequence body carries: the alphabet, a colon and the first sixteen hex digits of the SHA-256 of + the residues, so a sequence is found whatever gaps it was shown with and whatever its numbering.""" + return "%s:%s" % (alphabet, sha256_hex(residues(value))[:16]) + + +def problems(annotation): + """The rules a sequence annotation breaks, as `[{"rule", "message"}]` in the order checked. + + `layer.sequence.value` covers the letters against the alphabet, `layer.sequence.identity` the identity, + `layer.sequence.region` each region against the residues, and `layer.sequence.variant` each variant against the + residue it says is there. + """ + found = [] + + def add(rule, message): + found.append({"rule": rule, "message": message}) + + body = annotation["body"] + if body.get("kind") != "sequence": + raise ValueError("not a sequence annotation") + alphabet, value = body.get("alphabet"), body.get("value", "") + allowed = ALPHABETS.get(alphabet) + if allowed is None: + add("layer.sequence.value", "the alphabet is not one of %s" % ", ".join(sorted(ALPHABETS))) + return found + odd = sorted(set(value) - allowed) + if odd: + add("layer.sequence.value", "%s is not a %s residue" % (", ".join(repr(c) for c in odd), alphabet)) + plain = residues(value) + if not plain: + add("layer.sequence.value", "the value has no residue, only gaps") + if body.get("identity") != identity(alphabet, value): + add("layer.sequence.identity", "the identity is not %s" % identity(alphabet, value)) + first = body.get("start", 1) + last = first + len(plain) - 1 + for k, region in enumerate(body.get("regions", [])): + s, e = region.get("start", 0), region.get("end", 0) + if s > e: + add("layer.sequence.region", "region %d starts at %d, after its end %d" % (k, s, e)) + elif s < first or e > last: + add("layer.sequence.region", "region %d, %d-%d, is outside the residues %d-%d" % (k, s, e, first, last)) + for k, v in enumerate(body.get("variants", [])): + pos, ref, alt = v.get("position", 0), v.get("ref", ""), v.get("alt", "") + if not first <= pos <= last: + add("layer.sequence.variant", "variant %d is at %d, outside the residues %d-%d" % (k, pos, first, last)) + elif plain[pos - first] != ref: + add("layer.sequence.variant", "variant %d says %s is at %d, but the residue there is %s" + % (k, ref, pos, plain[pos - first])) + if alt == ref: + add("layer.sequence.variant", "variant %d changes %s at %d to itself" % (k, ref, pos)) + elif alt not in allowed: + add("layer.sequence.variant", "variant %d: %r is not a %s residue" % (k, alt, alphabet)) + return found diff --git a/src/paperspec/structures.py b/src/paperspec/structures.py new file mode 100644 index 0000000..8fa1925 --- /dev/null +++ b/src/paperspec/structures.py @@ -0,0 +1,212 @@ +"""Chemical structures tied to words: the `structure` body of an annotation. + +A structure annotation's body holds a SMILES or a SMARTS and says what the span does with it. Non-normative; see +spec/18-layers.md §18.6 for the body and spec/22-conformance.md §22.4 for the rules `layer.structure.value`, +`layer.structure.identity` and `layer.structure.term`. + +Atoms are numbered from 0 in the order the text writes them, a bracket atom as one, and a hydrogen that is not written +as an atom has no number. That is a rule of the text, not of a toolkit, so `scan` reads the atoms and the bonds +between them with the standard library alone: no valence, aromaticity or InChI, which a chemistry toolkit checks, but +enough to tell that a term cites atoms the text has and joins them as its kind requires. +""" + +from .text import sha256_hex + +FORMATS = {"chemical/x-daylight-smiles": "smiles", "chemical/x-daylight-smarts": "smarts"} +MEDIA = {name: media for media, name in FORMATS.items()} +ROLES = ("names", "depicts", "parametrizes", "uses") +KINDS = {"bond": 2, "angle": 3, "torsion": 4, "improper": 4} +"""How many atoms each kind of term cites.""" + +_ORGANIC = ("Cl", "Br", "B", "C", "N", "O", "P", "S", "F", "I", "b", "c", "n", "o", "p", "s", "*") +_SMARTS_ONLY_ATOMS = ("a", "A") +_BOND = "-=#$:/\\" +_SMARTS_BOND = "~@!&,;" +_SMARTS_ONLY_IN_BRACKET = ",;&!$" +_DIGITS = "0123456789" + + +def scan(text, smarts=False): + """Read the atoms of a SMILES or SMARTS and the bonds between them. + + Args: + text: The SMILES or SMARTS. + smarts: Whether queries are allowed (`a`, `A`, and `,;&!$` inside brackets). + + Returns: + `(count, bonds)`: how many atoms the text writes, and the set of bonded pairs `(i, j)` with `i < j`. + + Raises: + ValueError: When the text is not a SMILES or SMARTS, saying where. + """ + if not text or text != text.strip(): + raise ValueError("empty, or has spaces at its ends") + bonds = set() + count = 0 + prev = None + stack = [] + rings = {} + bond_pending = False + i, n = 0, len(text) + + def atom(): + nonlocal count, prev, bond_pending + if prev is not None: + bonds.add((prev, count)) + prev = count + count += 1 + bond_pending = False + + while i < n: + c = text[i] + if c == "[": + depth, j = 1, i + 1 + while j < n and depth: + depth += (text[j] == "[") - (text[j] == "]") + j += 1 + if depth: + raise ValueError("unclosed [ at %d" % i) + inner = text[i + 1:j - 1] + if not inner: + raise ValueError("empty bracket atom at %d" % i) + if not smarts and any(x in inner for x in _SMARTS_ONLY_IN_BRACKET): + raise ValueError("a query inside the bracket atom at %d: that is SMARTS" % i) + atom() + i = j + elif text.startswith(("Cl", "Br"), i): + atom() + i += 2 + elif c in _ORGANIC or (smarts and c in _SMARTS_ONLY_ATOMS): + atom() + i += 1 + elif c in _BOND or (smarts and c in _SMARTS_BOND): + if prev is None: + raise ValueError("a bond with no atom before it at %d" % i) + bond_pending = True + i += 1 + elif c in _DIGITS or c == "%": + if c == "%": + if text[i + 1:i + 3].isdigit() and len(text[i + 1:i + 3]) == 2: + num, i = text[i + 1:i + 3], i + 3 + else: + raise ValueError("% needs two digits at %d" % i) + else: + num, i = c, i + 1 + if prev is None: + raise ValueError("a ring closure with no atom before it at %d" % i) + if num in rings: + bonds.add(tuple(sorted((rings.pop(num), prev)))) + else: + rings[num] = prev + bond_pending = False + elif c == "(": + if prev is None: + raise ValueError("a branch with no atom before it at %d" % i) + if bond_pending: + raise ValueError("a bond before ( at %d: write it inside the branch" % i) + stack.append((prev, count)) + i += 1 + elif c == ")": + if not stack: + raise ValueError("unmatched ) at %d" % i) + if bond_pending: + raise ValueError("a bond with no atom after it at %d" % i) + prev, opened = stack.pop() + if count == opened: + raise ValueError("an empty branch before %d" % i) + i += 1 + elif c == ".": + if bond_pending: + raise ValueError("a bond with no atom after it at %d" % i) + prev = None + i += 1 + else: + raise ValueError("%r is not part of a %s at %d" % (c, "SMARTS" if smarts else "SMILES", i)) + if stack: + raise ValueError("unclosed (") + if rings: + raise ValueError("ring closure %s is never closed" % ", ".join(sorted(rings))) + if bond_pending: + raise ValueError("a bond with no atom after it") + if not count: + raise ValueError("no atoms") + return count, {tuple(sorted(b)) for b in bonds} + + +def identity(fmt, value, inchikey=None): + """The identity a structure body carries. + + Args: + fmt: `smiles` or `smarts`. + value: The text. + inchikey: The InChIKey of a molecule, when the producer has a toolkit that made one. + + Returns: + The InChIKey for a SMILES that has one; else `smiles:` or `smarts:` and the first twelve hex digits of the + SHA-256 of the text as written, which equal only for the same text. + """ + if fmt == "smiles" and inchikey: + return inchikey + return "%s:%s" % (fmt, sha256_hex(value)[:12]) + + +def _joined(term_atoms, kind, bonds): + """Whether the atoms are joined as the kind needs: a chain, or for an improper the first to each of the others.""" + pairs = ([(term_atoms[0], x) for x in term_atoms[1:]] if kind == "improper" + else list(zip(term_atoms, term_atoms[1:]))) + return all(tuple(sorted(p)) in bonds for p in pairs) + + +def problems(annotation): + """The rules a structure annotation breaks, as `[{"rule", "message"}]` in the order checked. + + `layer.structure.value` covers the text and its format, `layer.structure.identity` the identity against the text, + and `layer.structure.term` each term against the atoms and bonds the text writes. + """ + found = [] + + def add(rule, message): + found.append({"rule": rule, "message": message}) + + body = annotation["body"] + if body.get("kind") != "structure": + raise ValueError("not a structure annotation") + fmt = FORMATS.get(body.get("format")) + value = body.get("value", "") + count, bonds = 0, set() + if fmt is None: + add("layer.structure.value", "the format is not one of %s" % ", ".join(sorted(FORMATS))) + else: + try: + count, bonds = scan(value, smarts=fmt == "smarts") + except ValueError as exc: + add("layer.structure.value", "the value is not a %s: %s" % (fmt.upper(), exc)) + ident = body.get("identity", "") + if fmt == "smarts" and not ident.startswith("smarts:"): + add("layer.structure.identity", "a SMARTS has no InChIKey: its identity is smarts: and twelve hex digits") + elif ident.startswith(("smiles:", "smarts:")): + want = identity(ident.split(":", 1)[0], value) + if fmt is not None and ident.split(":", 1)[0] != fmt: + add("layer.structure.identity", "the identity is a %s one, the value a %s" % (ident.split(":", 1)[0], fmt)) + elif ident != want: + add("layer.structure.identity", "the identity is not the SHA-256 of the value: %s" % want) + elif fmt is not None and fmt != "smiles": + add("layer.structure.identity", "the identity is an InChIKey, which only a SMILES has") + for k, term in enumerate(body.get("terms", [])): + where = "term %d" % k + atoms, kind = term.get("atoms", []), term.get("kind") + if kind not in KINDS or len(atoms) != KINDS[kind]: + add("layer.structure.term", "%s: a %s cites %s atoms" % (where, kind, KINDS.get(kind, "?"))) + continue + if len(set(atoms)) != len(atoms): + add("layer.structure.term", "%s: an atom is cited twice" % where) + elif count and any(a >= count for a in atoms): + add("layer.structure.term", "%s: the value writes %d atoms, numbered from 0" % (where, count)) + elif count and not _joined(atoms, kind, bonds): + add("layer.structure.term", "%s: the atoms are not joined as a %s needs" % (where, kind)) + if "types" in term and len(term["types"]) != len(atoms): + add("layer.structure.term", "%s: %d types for %d atoms" % (where, len(term["types"]), len(atoms))) + extra = sorted(set(term.get("units", {})) - set(term.get("values", {}))) + if extra: + add("layer.structure.term", "%s: units for values that are not given: %s" % (where, ", ".join(extra))) + return found diff --git a/tools/README.md b/tools/README.md index b866957..293cb74 100644 --- a/tools/README.md +++ b/tools/README.md @@ -75,7 +75,7 @@ A node's five values depend only on its own subtree, so after a correction the o `paperspec check` compares the result after every correction with a slow computation that projects each node from its whole subtree. Other repositories of the project do not reimplement the specification: they install this repository as the Python package `paperspec`, from the Gitea package registry or as a git pin ([deploy/](../deploy/README.md#install-from-the-registry)), and import the oracle from it, so that every key, identifier, canonical JSON string, package check and database form comes from one piece of code. -The library surface they use is `keys`, `text`, `jcs`, `package`, `db`, `schema`, `rights` and `traces`, with the schemas, SQL and vectors as package data: `paperspec.resources.path("sql")` finds a folder in an installed wheel and in an editable install alike. +The library surface they use is `keys`, `text`, `jcs`, `package`, `db`, `schema`, `rights`, `traces`, `structures` and `sequences`, with the schemas, SQL and vectors as package data: `paperspec.resources.path("sql")` finds a folder in an installed wheel and in an editable install alike. The vectors travel with the package, but `resolve.jsonl`, `grading.jsonl`, `targets.jsonl` and `traces.jsonl` name a fixture package, and the fixtures stay in the repository. The package needs Python 3.14, the only version with the Unicode 16.0 character data the specification pins, and refuses to import on any other. Importing any of its modules needs only the standard library. diff --git a/vectors/README.md b/vectors/README.md index 2c4be38..4b5da77 100644 --- a/vectors/README.md +++ b/vectors/README.md @@ -52,7 +52,7 @@ The procedure is the same for every file: 3. Find the inputs and the expected outputs of the case. The table below says which fields are which, and the chapter it links defines the rule. - Only seven files, `alignment`, `corrections`, `grading`, `resolve`, `rights`, `targets` and `traces`, put the expected outputs under `expect`. + Only nine files, `alignment`, `corrections`, `grading`, `resolve`, `rights`, `sequences`, `structures`, `targets` and `traces`, put the expected outputs under `expect`. In the other nineteen the expected outputs are fields beside the inputs, such as `output`, `sha256`, `canonical` or `parsed`. 4. Compute each output from the inputs with your implementation. @@ -77,11 +77,15 @@ Some files change the procedure: - `traces.jsonl` names two packages, `citing` (the draft) and `cited` (the main example), and for a `resolve` case lists the corrections to apply to each, in order, before judging the trace, and the `same_as` identifiers of the cited work. Apply them with the gate ([11.4](../spec/11-corrections.md#114-the-gate)) to the package's state at its own revision. A `problems` case gives the packages' states as they are, and `cited` is null when the trace names no passage in the main example. +- `structures.jsonl` and `sequences.jsonl` need no package. + A `scan` case (structures) gives a SMILES or SMARTS in `text` and its `format`, and expects the number of `atoms` and the `bonds` between them as pairs of atom numbers in order, or null when the text is refused. + An `identity` case expects the identity the body carries, from `text` and `inchikey` (structures) or from `text` and `alphabet` (sequences). + A `problems` case gives a whole annotation and expects the list of rules it breaks, in the order checked; `schema` says whether `schemas/annotation.schema.json` accepts it, because some cases are refused by the schema as well as by a rule. Several files also mix more than one kind of case, told apart by their fields. `ids.jsonl` has minting cases and letter-first cases, `keyed.jsonl` and `signatures.jsonl` have a case for each derivation or record, `spotcheck.jsonl` has sample-size cases and one full sample, and `rights.jsonl` has stage checks (a `stage` field), backend checks (a `backend` field) and one combining case (neither). -The reference checker, `paperspec check` ([tools/](../tools/README.md)), runs all twenty-six files, together with the rest of the repository's checks: +The reference checker, `paperspec check` ([tools/](../tools/README.md)), runs all twenty-eight files, together with the rest of the repository's checks: ```sh paperspec check --quick @@ -124,6 +128,8 @@ The table below uses a few terms that the chapters define: | `corrections.jsonl` | Each operation and refusal on a small document: the state before, the correction, and the record and state after, or the rule broken; with the reference records for a `resolve`, and the leaf as printed for an `emend`. | [11](../spec/11-corrections.md) | | `resolve.jsonl` | Anchors made on the example paper's first reading, and how each resolves after its corrections. | [6.5](../spec/06-anchors.md#65-resolution) | | `traces.jsonl` | Traced citations: a trace on the draft's sentence that cites the main example, with the corrections that make it current, changed, stale, unlinked or misresolved, the passage's current address and the citations inside it (`op` `resolve`); and traces that break `layer.trace.source` or `layer.trace.target` (`op` `problems`). | [18.5](../spec/18-layers.md#185-traced-citations) | +| `structures.jsonl` | Chemical structures: the atoms and bonds that SMILES and SMARTS texts write, and the texts that are refused (`op` `scan`); the identity of a structure with and without an InChIKey (`op` `identity`); and annotations that are valid or break `layer.structure.value`, `layer.structure.identity` or `layer.structure.term` (`op` `problems`). | [18.6](../spec/18-layers.md#186-chemical-structures) | +| `sequences.jsonl` | Sequences: the identity of a sequence with and without gaps and in each alphabet (`op` `identity`); and annotations that are valid or break `layer.sequence.value`, `layer.sequence.identity`, `layer.sequence.region` or `layer.sequence.variant` (`op` `problems`). | [18.7](../spec/18-layers.md#187-sequences) | | `rights.jsonl` | Stage checks with policies and expiry, the combining rule, and backend conditions. | [14](../spec/14-rights.md) | | `grading.jsonl` | Exercises, submissions and the grades they earn. | [19.4](../spec/19-exercises.md#194-grading) | | `targets.jsonl` | The target set of targeted F3 for the example paper under each digit rule, given the anchored nodes. | [8.10](../spec/08-fidelity.md#810-targeted-f3) | @@ -142,7 +148,7 @@ A candidate format changes only with a recorded reason and a new or changed vect A passing run shows one thing: for these inputs, your implementation computes the same values as the reference implementation in `src/paperspec/`. That code computed the expected outputs, and `pixi run build` regenerates them ([tools/](../tools/README.md)). -The vectors hold 359 cases in all, some of them small: `hashes.jsonl` has two documents, `alignment.jsonl` two pairs of readings, `offsets.jsonl` two cases. +The vectors hold 454 cases in all, some of them small: `hashes.jsonl` has two documents, `alignment.jsonl` two pairs of readings, `offsets.jsonl` two cases. The vectors do not show the following. diff --git a/vectors/sequences.jsonl b/vectors/sequences.jsonl new file mode 100644 index 0000000..cf0ebed --- /dev/null +++ b/vectors/sequences.jsonl @@ -0,0 +1,31 @@ +{"alphabet":"protein","expect":"protein:5807fcbf6d5567ca","id":"identity-protein","op":"identity","text":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"} +{"alphabet":"protein","expect":"protein:5807fcbf6d5567ca","id":"identity-the-same-with-gaps","op":"identity","text":"LSDED-FKAVFGMTRSAFANLPLWKQQNLKKEKGLF"} +{"alphabet":"dna","expect":"dna:e8830e59e146438c","id":"identity-dna","op":"identity","text":"ATGGCGTACGTT"} +{"alphabet":"rna","expect":"rna:87456fe9e40f49de","id":"identity-rna","op":"identity","text":"AUGGCGUACGUU"} +{"alphabet":"rna","expect":"rna:a3c532aca6cd82dd","id":"identity-the-same-letters-in-another-alphabet","op":"identity","text":"ACGU"} +{"alphabet":"dna","expect":"dna:1dff3e84fe7877e0","id":"identity-letters-both-alphabets-write","op":"identity","text":"ACGT"} +{"alphabet":"protein","expect":"protein:1dff3e84fe7877e0","id":"identity-protein-letters-that-are-also-dna","op":"identity","text":"ACGT"} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","organism":"Gallus gallus","role":"names","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s05a5q9qa4bhj","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"villin headpiece subdomain HP35","prefix":"We test the charges on the ","suffix":", LSDEDFKAVFGMTRSAFANLPLWKQQNLKK"},"rev":0,"span":[27,58],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"villin headpiece subdomain HP35","prefix":"We test the charges on the ","suffix":", LSDEDFKAVFGMTRSAFANLPLWKQQNLKK","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-a-name","note":"A protein, numbered from 42.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","regions":[{"end":51,"label":"helix 1","start":44},{"end":59,"label":"helix 2","start":55},{"end":74,"label":"helix 3","start":63}],"role":"depicts","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-regions","note":"Three helices inside residues 42 to 76.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35 N68H","role":"reports","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","variants":[{"alt":"H","position":68,"ref":"N"}]},"created":"2026-10-14T09:10:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/n8pvfne6pkb9z","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","status":"proposed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"N68H","prefix":"FANLPLWKQQNLKKEKGLF, and on its ","suffix":" variant."},"rev":0,"span":[108,112],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"N68H","prefix":"FANLPLWKQQNLKKEKGLF, and on its ","suffix":" variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-a-variant","note":"Asparagine 68 to histidine.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:76610ac3abdd6d44","kind":"sequence","regions":[{"end":13,"start":11}],"role":"depicts","start":10,"type":"TextualBody","value":"MK-LV","variants":[{"alt":"V","position":12,"ref":"L"}]},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-gaps-are-not-numbered","note":"M10 K11 L12 V13; the gap takes no number.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"dna","identity":"dna:e8830e59e146438c","kind":"sequence","label":"a primer","role":"uses","type":"TextualBody","value":"ATGGCGTACGTT"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-dna","note":"A DNA sequence.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"rna","identity":"rna:87456fe9e40f49de","kind":"sequence","role":"uses","type":"TextualBody","value":"AUGGCGUACGUU"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-rna","note":"An RNA sequence.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:76610ac3abdd6d44","kind":"sequence","role":"reports","type":"TextualBody","value":"MKLV","variants":[{"alt":"*","position":3,"ref":"L"},{"alt":"-","position":4,"ref":"V"}]},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-a-stop-and-a-deletion","note":"Alternatives * and -.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"genbank","id":"NC_000913.3"},{"db":"refseq","id":"NP_414542.1"}],"alphabet":"dna","identity":"dna:e8830e59e146438c","kind":"sequence","role":"names","type":"TextualBody","value":"ATGGCGTACGTT"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-accessions","note":"Two database entries.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"dna","identity":"dna:5bfa0ce5d626d9b5","kind":"sequence","role":"names","type":"TextualBody","value":"ATGU"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"'U' is not a dna residue","rule":"layer.sequence.value"}],"id":"value-a-letter-the-alphabet-lacks","note":"U is RNA.","op":"problems","schema":false} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"rna","identity":"rna:dc08659fd223b5fb","kind":"sequence","role":"names","type":"TextualBody","value":"AUGT"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"'T' is not a rna residue","rule":"layer.sequence.value"}],"id":"value-t-in-rna","note":"T is DNA.","op":"problems","schema":false} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:76610ac3abdd6d44","kind":"sequence","role":"names","type":"TextualBody","value":"mklv"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"'k', 'l', 'm', 'v' is not a protein residue","rule":"layer.sequence.value"},{"message":"the identity is not protein:61d1d9c7ccfcb71c","rule":"layer.sequence.identity"}],"id":"value-lower-case","note":"Capital letters only.","op":"problems","schema":false} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:e3b0c44298fc1c14","kind":"sequence","role":"names","type":"TextualBody","value":"---"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the value has no residue, only gaps","rule":"layer.sequence.value"}],"id":"value-only-gaps","note":"Nothing to number.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"peptide","identity":"protein:76610ac3abdd6d44","kind":"sequence","role":"names","type":"TextualBody","value":"MKLV"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the alphabet is not one of dna, protein, rna","rule":"layer.sequence.value"}],"id":"value-an-unknown-alphabet","note":"Not an alphabet.","op":"problems","schema":false} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:76610ac3abdd6d44","kind":"sequence","label":"HP35","organism":"Gallus gallus","role":"names","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the identity is not protein:5807fcbf6d5567ca","rule":"layer.sequence.identity"}],"id":"identity-another-sequence","note":"The hash is of other residues.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"rna:5807fcbf6d5567ca","kind":"sequence","label":"HP35","organism":"Gallus gallus","role":"names","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the identity is not protein:5807fcbf6d5567ca","rule":"layer.sequence.identity"}],"id":"identity-another-alphabet","note":"The alphabet in the identity differs.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","regions":[{"end":44,"start":51}],"role":"depicts","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"region 0 starts at 51, after its end 44","rule":"layer.sequence.region"}],"id":"region-ends-before-it-starts","note":"51 to 44.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","regions":[{"end":80,"start":70}],"role":"depicts","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"region 0, 70-80, is outside the residues 42-76","rule":"layer.sequence.region"}],"id":"region-past-the-end","note":"The value ends at 76.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35","regions":[{"end":50,"start":40}],"role":"depicts","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF"},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"region 0, 40-50, is outside the residues 42-76","rule":"layer.sequence.region"}],"id":"region-before-the-start","note":"The value starts at 42.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35 N68H","role":"reports","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","variants":[{"alt":"H","position":80,"ref":"N"}]},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"variant 0 is at 80, outside the residues 42-76","rule":"layer.sequence.variant"}],"id":"variant-outside-the-residues","note":"Position 80 is past 76.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35 N68H","role":"reports","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","variants":[{"alt":"H","position":68,"ref":"K"}]},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"variant 0 says K is at 68, but the residue there is N","rule":"layer.sequence.variant"}],"id":"variant-names-a-residue-the-value-lacks","note":"The residue at 68 is N.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35 N68H","role":"reports","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","variants":[{"alt":"N","position":68,"ref":"N"}]},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"variant 0 changes N at 68 to itself","rule":"layer.sequence.variant"}],"id":"variant-changes-a-residue-to-itself","note":"N to N.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"dna","identity":"dna:e8830e59e146438c","kind":"sequence","role":"reports","type":"TextualBody","value":"ATGGCGTACGTT","variants":[{"alt":"E","position":1,"ref":"A"}]},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"variant 0: 'E' is not a dna residue","rule":"layer.sequence.variant"}],"id":"variant-to-a-letter-the-alphabet-lacks","note":"E is not a nucleotide.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:5807fcbf6d5567ca","kind":"sequence","label":"HP35 N68H","role":"reports","start":42,"type":"TextualBody","value":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","variants":[{"alt":"H","position":27,"ref":"N"}]},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"variant 0 is at 27, outside the residues 42-76","rule":"layer.sequence.variant"}],"id":"variant-numbered-from-one-by-mistake","note":"Residue 27 of the fragment is not residue 68 of the protein.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"alphabet":"protein","identity":"protein:76610ac3abdd6d44","kind":"sequence","regions":[{"end":13,"start":11}],"role":"depicts","start":10,"type":"TextualBody","value":"MK-LV","variants":[{"alt":"V","position":13,"ref":"L"}]},"created":"2026-10-14T09:05:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/s04e0n9y6wger","layer":"tag:scient.ing,2026:layer:smithlab/bq5k8r3w","motivation":"identifying","receipt":"b09z8grf3mrs4","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"rh0yjt9","node_hash":"aae718e0ec1f295e43fe41852e01196f97a12da3b64b4999e99fdbbb15d7329c","own_hash":"ab86459ace3bcd986530476ff939befdc2fd0ffdca0d6979284b3d942169d8b2","quote":{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant."},"rev":0,"span":[60,95],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"LSDEDFKAVFGMTRSAFANLPLWKQQNLKKEKGLF","prefix":"illin headpiece subdomain HP35, ","suffix":", and on its N68H variant.","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"variant 0 says L is at 13, but the residue there is V","rule":"layer.sequence.variant"}],"id":"variant-at-a-position-a-gap-would-shift","note":"L is residue 12; counting the gap would make it 13.","op":"problems","schema":true} diff --git a/vectors/structures.jsonl b/vectors/structures.jsonl new file mode 100644 index 0000000..89ddc60 --- /dev/null +++ b/vectors/structures.jsonl @@ -0,0 +1,64 @@ +{"expect":{"atoms":2,"bonds":[[0,1]]},"format":"smiles","id":"scan-ethane","op":"scan","text":"CC"} +{"expect":{"atoms":4,"bonds":[[0,1],[1,2],[1,3]]},"format":"smiles","id":"scan-a-branch","op":"scan","text":"CC(=O)N"} +{"expect":{"atoms":6,"bonds":[[0,1],[0,5],[1,2],[2,3],[3,4],[4,5]]},"format":"smiles","id":"scan-an-aromatic-ring","op":"scan","text":"c1ccccc1"} +{"expect":{"atoms":7,"bonds":[[0,1],[0,5],[1,2],[2,3],[3,4],[4,5],[5,6]]},"format":"smiles","id":"scan-a-ring-with-a-substituent","op":"scan","text":"C1CCCCC1C"} +{"expect":{"atoms":10,"bonds":[[0,1],[0,9],[1,2],[2,3],[3,4],[3,8],[4,5],[5,6],[6,7],[7,8],[8,9]]},"format":"smiles","id":"scan-fused-rings","op":"scan","text":"c1ccc2ccccc2c1"} +{"expect":{"atoms":3,"bonds":[[0,1],[0,2]]},"format":"smiles","id":"scan-written-hydrogens","op":"scan","text":"O([H])[H]"} +{"expect":{"atoms":4,"bonds":[[0,1],[1,2],[1,3]]},"format":"smiles","id":"scan-bracket-atoms","op":"scan","text":"C[N+](=O)[O-]"} +{"expect":{"atoms":4,"bonds":[[0,1],[1,2],[2,3]]},"format":"smiles","id":"scan-two-letter-atoms","op":"scan","text":"ClCCBr"} +{"expect":{"atoms":2,"bonds":[]},"format":"smiles","id":"scan-a-salt","op":"scan","text":"[Na+].[Cl-]"} +{"expect":{"atoms":3,"bonds":[[0,1],[0,2],[1,2]]},"format":"smiles","id":"scan-a-two-digit-ring","op":"scan","text":"C%10CC%10"} +{"expect":{"atoms":4,"bonds":[[0,1],[1,2],[2,3]]},"format":"smiles","id":"scan-stereo-bonds","op":"scan","text":"F/C=C/F"} +{"expect":{"atoms":2,"bonds":[[0,1]]},"format":"smiles","id":"scan-a-wildcard","op":"scan","text":"*C"} +{"expect":{"atoms":2,"bonds":[[0,1]]},"format":"smarts","id":"scan-an-open-position","op":"scan","text":"[*:1]-[OX2H]"} +{"expect":{"atoms":3,"bonds":[[0,1],[0,2]]},"format":"smarts","id":"scan-queries","op":"scan","text":"[CX3](=O)[NX3]"} +{"expect":{"atoms":2,"bonds":[[0,1]]},"format":"smarts","id":"scan-a-bond-query","op":"scan","text":"C-,=C"} +{"expect":{"atoms":2,"bonds":[[0,1]]},"format":"smarts","id":"scan-a-recursive-query","op":"scan","text":"[$([CX3]=O)]N"} +{"expect":{"atoms":6,"bonds":[[0,1],[0,5],[1,2],[2,3],[3,4],[4,5]]},"format":"smarts","id":"scan-any-aromatic-atom","op":"scan","text":"a1aaaaa1"} +{"expect":{"atoms":4,"bonds":[[0,1],[1,2],[1,3]]},"format":"smarts","id":"scan-two-open-positions","op":"scan","text":"[*:1]-C(=O)-[*:2]"} +{"expect":null,"format":"smiles","id":"scan-empty","op":"scan","text":""} +{"expect":null,"format":"smiles","id":"scan-spaces-at-an-end","op":"scan","text":" CC"} +{"expect":null,"format":"smiles","id":"scan-unclosed-bracket","op":"scan","text":"C[NH"} +{"expect":null,"format":"smiles","id":"scan-empty-bracket","op":"scan","text":"C[]"} +{"expect":null,"format":"smiles","id":"scan-unmatched-close","op":"scan","text":"CC)"} +{"expect":null,"format":"smiles","id":"scan-unclosed-branch","op":"scan","text":"CC(C"} +{"expect":null,"format":"smiles","id":"scan-empty-branch","op":"scan","text":"CC()C"} +{"expect":null,"format":"smiles","id":"scan-ring-never-closed","op":"scan","text":"C1CC"} +{"expect":null,"format":"smiles","id":"scan-bond-with-no-atom-after","op":"scan","text":"CC="} +{"expect":null,"format":"smiles","id":"scan-bond-with-no-atom-before","op":"scan","text":"=CC"} +{"expect":null,"format":"smiles","id":"scan-bond-before-a-branch","op":"scan","text":"C=(C)C"} +{"expect":null,"format":"smiles","id":"scan-a-stray-character","op":"scan","text":"CC?C"} +{"expect":null,"format":"smiles","id":"scan-a-space-inside","op":"scan","text":"C C"} +{"expect":null,"format":"smiles","id":"scan-a-query-in-a-bracket","op":"scan","text":"[C,N]"} +{"expect":null,"format":"smiles","id":"scan-a-smarts-atom","op":"scan","text":"aC"} +{"expect":null,"format":"smiles","id":"scan-a-smarts-bond","op":"scan","text":"C~C"} +{"expect":null,"format":"smiles","id":"scan-percent-without-two-digits","op":"scan","text":"C%1CC%1"} +{"expect":null,"format":"smiles","id":"scan-a-ring-before-any-atom","op":"scan","text":"1CC1"} +{"expect":null,"format":"smiles","id":"scan-a-branch-before-any-atom","op":"scan","text":"(C)C"} +{"expect":null,"format":"smarts","id":"scan-only-a-bond","op":"scan","text":"-"} +{"expect":"OTMSDBZUPAUEDD-UHFFFAOYSA-N","format":"smiles","id":"identity-a-molecule-with-an-inchikey","inchikey":"OTMSDBZUPAUEDD-UHFFFAOYSA-N","op":"identity","text":"CC"} +{"expect":"smiles:a56362a10c81","format":"smiles","id":"identity-a-molecule-without-one","inchikey":null,"op":"identity","text":"CC"} +{"expect":"smarts:2e2a923f840c","format":"smarts","id":"identity-a-smarts-never-has-one","inchikey":"OTMSDBZUPAUEDD-UHFFFAOYSA-N","op":"identity","text":"[CX4][CX4]"} +{"expect":"smarts:56a785a98e14","format":"smarts","id":"identity-another-spelling-another-hash","inchikey":null,"op":"identity","text":"C-C"} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-a-smiles-with-terms","note":"The water of Table 1, a SMILES that writes its hydrogens.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smarts","identity":"smarts:2e2a923f840c","kind":"structure","label":"CT–CT","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["CT","CT"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"310.0","r_eq":"1.526"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["CT","CT"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"305.2","r_eq":"1.5260"}}],"type":"TextualBody","value":"[CX4][CX4]","written":"CT–CT"},"created":"2026-10-14T09:10:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/p9kaa8djhezd2","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","CT–CT"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"vd76637","node_hash":"33810e4da42f8e65a224b5369c06fe8db254890294b7b6760808fe6e039da21a","own_hash":"2ef085ec0ae741d540d9ace389393d02c30523a66f55648470404733c73ecde3","quote":{"exact":"CT–CT"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"CT–CT","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-a-smarts-with-terms","note":"The CT-CT pattern of Table 1.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"6324"}],"format":"chemical/x-daylight-smiles","identity":"OTMSDBZUPAUEDD-UHFFFAOYSA-N","kind":"structure","label":"ethane","role":"names","type":"TextualBody","value":"CC"},"created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0539sf2trjdn","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"qwgfg51","node_hash":"4a3be03766323b3c88d5b43591b0f573823b89fe582f2c3a6f0b43474685a30d","own_hash":"04bd6d16a9310fa00dbf5d0930f4dbaca52b6bb58e76bb3cdd348bec73a27737","quote":{"exact":"ethane","prefix":"ws the scan for the C–C bond of ","suffix":".a"},"rev":12,"span":[44,50],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"ethane","prefix":"ws the scan for the C–C bond of ","suffix":".a","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-a-smiles-with-no-terms","note":"A name and no terms.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smiles","identity":"smiles:4fb4e68483b3","kind":"structure","role":"parametrizes","terms":[{"atoms":[0,1,3,4],"kind":"torsion","source":"Table 3","types":["CT","C","N","CT"],"units":{"v2":"kcal mol-1"},"values":{"v2":"2.5"}}],"type":"TextualBody","value":"CC(=O)NC"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-a-torsion","note":"A torsion along a chain of four atoms.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"6324"}],"format":"chemical/x-daylight-smiles","identity":"smiles:a56362a10c81","kind":"structure","label":"ethane","role":"names","type":"TextualBody","value":"CC"},"created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0539sf2trjdn","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"qwgfg51","node_hash":"4a3be03766323b3c88d5b43591b0f573823b89fe582f2c3a6f0b43474685a30d","own_hash":"04bd6d16a9310fa00dbf5d0930f4dbaca52b6bb58e76bb3cdd348bec73a27737","quote":{"exact":"ethane","prefix":"ws the scan for the C–C bond of ","suffix":".a"},"rev":12,"span":[44,50],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"ethane","prefix":"ws the scan for the C–C bond of ","suffix":".a","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-a-smiles-identity-without-an-inchikey","note":"No InChIKey: the hash of the value.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-mdl-molfile","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the format is not one of chemical/x-daylight-smarts, chemical/x-daylight-smiles","rule":"layer.structure.value"}],"id":"value-an-unknown-format","note":"Not a format of this body.","op":"problems","schema":false} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the value is not a SMILES: unclosed (","rule":"layer.structure.value"}],"id":"value-an-unclosed-branch","note":"A branch never closed.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"[O,S]([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the value is not a SMILES: a query inside the bracket atom at 0: that is SMARTS","rule":"layer.structure.value"}],"id":"value-a-query-in-a-smiles","note":"A query is SMARTS.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smarts","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"CT–CT","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["CT","CT"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"310.0","r_eq":"1.526"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["CT","CT"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"305.2","r_eq":"1.5260"}}],"type":"TextualBody","value":"[CX4][CX4]","written":"CT–CT"},"created":"2026-10-14T09:10:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/p9kaa8djhezd2","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","CT–CT"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"vd76637","node_hash":"33810e4da42f8e65a224b5369c06fe8db254890294b7b6760808fe6e039da21a","own_hash":"2ef085ec0ae741d540d9ace389393d02c30523a66f55648470404733c73ecde3","quote":{"exact":"CT–CT"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"CT–CT","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"a SMARTS has no InChIKey: its identity is smarts: and twelve hex digits","rule":"layer.structure.identity"}],"id":"identity-a-smarts-with-an-inchikey","note":"A pattern has no InChIKey.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smarts","identity":"smarts:ac8cc9209bda","kind":"structure","label":"CT–CT","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["CT","CT"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"310.0","r_eq":"1.526"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["CT","CT"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"305.2","r_eq":"1.5260"}}],"type":"TextualBody","value":"[CX4][CX4]","written":"CT–CT"},"created":"2026-10-14T09:10:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/p9kaa8djhezd2","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","CT–CT"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"vd76637","node_hash":"33810e4da42f8e65a224b5369c06fe8db254890294b7b6760808fe6e039da21a","own_hash":"2ef085ec0ae741d540d9ace389393d02c30523a66f55648470404733c73ecde3","quote":{"exact":"CT–CT"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"CT–CT","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the identity is not the SHA-256 of the value: smarts:2e2a923f840c","rule":"layer.structure.identity"}],"id":"identity-the-hash-of-another-value","note":"The hash is of another text.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"6324"}],"format":"chemical/x-daylight-smiles","identity":"smarts:a56362a10c81","kind":"structure","label":"ethane","role":"names","type":"TextualBody","value":"CC"},"created":"2026-10-14T09:00:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0539sf2trjdn","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"qwgfg51","node_hash":"4a3be03766323b3c88d5b43591b0f573823b89fe582f2c3a6f0b43474685a30d","own_hash":"04bd6d16a9310fa00dbf5d0930f4dbaca52b6bb58e76bb3cdd348bec73a27737","quote":{"exact":"ethane","prefix":"ws the scan for the C–C bond of ","suffix":".a"},"rev":12,"span":[44,50],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"ethane","prefix":"ws the scan for the C–C bond of ","suffix":".a","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"the identity is a smarts one, the value a smiles","rule":"layer.structure.identity"}],"id":"identity-the-other-format","note":"A smarts: identity on a SMILES.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,3],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: the value writes 3 atoms, numbered from 0","rule":"layer.structure.term"}],"id":"term-an-atom-the-value-does-not-write","note":"Water has atoms 0 to 2.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[1,1],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: an atom is cited twice","rule":"layer.structure.term"}],"id":"term-an-atom-twice","note":"An atom cited twice.","op":"problems","schema":false} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[1,2],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: the atoms are not joined as a bond needs","rule":"layer.structure.term"}],"id":"term-a-bond-between-atoms-not-bonded","note":"The two hydrogens.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1,2],"kind":"angle","source":"Table 1, Set A","types":["OW","HW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: the atoms are not joined as a angle needs","rule":"layer.structure.term"}],"id":"term-an-angle-that-is-not-a-chain","note":"Hydrogen 1 is not bonded to hydrogen 2.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[1,0,2],"kind":"angle","source":"Table 1, Set A","types":["HW","OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-an-angle-around-the-oxygen","note":"Hydrogen, oxygen, hydrogen.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smiles","identity":"smiles:4fb4e68483b3","kind":"structure","role":"parametrizes","terms":[{"atoms":[0,1,2,3],"kind":"torsion"}],"type":"TextualBody","value":"CC(=O)NC"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: the atoms are not joined as a torsion needs","rule":"layer.structure.term"}],"id":"term-a-torsion-that-is-not-a-chain","note":"Atom 2 is not bonded to atom 3.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smiles","identity":"smiles:4fb4e68483b3","kind":"structure","role":"parametrizes","terms":[{"atoms":[1,0,2,3],"kind":"improper"}],"type":"TextualBody","value":"CC(=O)NC"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[],"id":"valid-an-improper","note":"The carbonyl carbon and its three neighbors.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"format":"chemical/x-daylight-smiles","identity":"smiles:4fb4e68483b3","kind":"structure","role":"parametrizes","terms":[{"atoms":[0,1,2,3],"kind":"improper"}],"type":"TextualBody","value":"CC(=O)NC"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: the atoms are not joined as a improper needs","rule":"layer.structure.term"}],"id":"term-an-improper-that-is-not-a-star","note":"The first atom is not bonded to the others.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["OW","HW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: 3 types for 2 atoms","rule":"layer.structure.term"}],"id":"term-types-of-another-length","note":"Three types for two atoms.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"bond","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","theta":"degree"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: units for values that are not given: theta","rule":"layer.structure.term"}],"id":"term-units-for-a-value-not-given","note":"A unit for a value that is not there.","op":"problems","schema":true} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"accessions":[{"db":"pubchem","id":"962"}],"format":"chemical/x-daylight-smiles","identity":"XLYOFNOQVPJJNP-UHFFFAOYSA-N","kind":"structure","label":"water","role":"parametrizes","terms":[{"atoms":[0,1],"kind":"torsion","source":"Table 1, Set A","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"553.0","r_eq":"0.9572"}},{"atoms":[0,1],"kind":"bond","source":"Table 1, Set B","types":["OW","HW"],"units":{"k_r":"kcal mol-1 A-2","r_eq":"A"},"values":{"k_r":"548.1","r_eq":"0.9570"}}],"type":"TextualBody","value":"O([H])[H]","written":"OW–HW"},"created":"2026-10-14T09:15:00Z","creator":{"id":"tag:scient.ing,2026:key:ana","name":"Ana Example","type":"Person"},"id":"tag:scient.ing,2026:annotation:smithlab/n0xj47295v5p3","layer":"tag:scient.ing,2026:layer:smithlab/cm7h4p2x","motivation":"identifying","receipt":"q9z9fee99g3cg","status":"confirmed","target":{"selector":[{"anchor":{"context":{"column_path":["Bond"],"row_path":["Bond parameters","OW–HW"],"table_label":"Table 1"},"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"cell","node":"yvkd7xr","node_hash":"aab8791a24bc4067c7e37fc5f0244d2128205e0a169e65c2c0fad977aabce313","own_hash":"943ff2019857c2f6dc6d5c08bb0f4423bb31a8d2fac8951e3fa79c1e2ef9a736","quote":{"exact":"OW–HW"},"rev":12,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"OW–HW","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource"},"type":"Annotation"},"expect":[{"message":"term 0: a torsion cites 4 atoms","rule":"layer.structure.term"}],"id":"term-the-wrong-number-of-atoms-for-the-kind","note":"A torsion cites four atoms.","op":"problems","schema":false} diff --git a/vectors/traces.jsonl b/vectors/traces.jsonl index 5bc4764..b343138 100644 --- a/vectors/traces.jsonl +++ b/vectors/traces.jsonl @@ -23,7 +23,7 @@ {"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"kind":"trace","note":"The abstract states the two steps: a scan first, then vibrational frequencies.","proposer":{"model":{"name":"example-model","parameters":"998b5161e39e01c8bc43ef81ec89141e15b7ea53b2e936707920a6097dbcb2c5","processor":"local","prompt":"9cc338fba7c62db7266f530cb555a5ee36910d41a0120a3fe7fd7de1944d0931","provider":"Example Models (illustrative)","version":"2026-09","weights":"504b2d340045b92c22682b60020c21103aae7ff41172bb632fbe305eb4af9b5e"},"rank":1,"run":"illustrative-run-2","score":"0.8731"},"reference":"ebcq5cy","selector":[{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource","verdict":"supports"},"created":"2026-10-12T09:00:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/jh0e4st2c0kpt","layer":"tag:scient.ing,2026:layer:smithlab/tr6c3q8m","motivation":"linking","receipt":"qvckzaatz5d1v","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"qgh1k31","node_hash":"93a39490870e694299e88e6f475d42c38078d1442959e555bdbdf58488dcf187","own_hash":"e004436e7b28ff3dc41e0056f231ba707d9be985694e68acb911345a547842ed","quote":{"exact":"two-step fit","prefix":"Its constants come from a ","suffix":" (Hale and Osei, Table 1).1"},"rev":0,"span":[26,38],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"two-step fit","prefix":"Its constants come from a ","suffix":" (Hale and Osei, Table 1).1","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"cited":null,"citing":"fixtures/packages/writer2027fixed-ynr7.v3","expect":[{"message":"the body's selector has no AnchorSelector","rule":"layer.trace.source"}],"id":"source-without-anchor","op":"problems"} {"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"kind":"trace","note":"The abstract states the two steps: a scan first, then vibrational frequencies.","proposer":{"model":{"name":"example-model","parameters":"998b5161e39e01c8bc43ef81ec89141e15b7ea53b2e936707920a6097dbcb2c5","processor":"local","prompt":"9cc338fba7c62db7266f530cb555a5ee36910d41a0120a3fe7fd7de1944d0931","provider":"Example Models (illustrative)","version":"2026-09","weights":"504b2d340045b92c22682b60020c21103aae7ff41172bb632fbe305eb4af9b5e"},"rank":1,"run":"illustrative-run-2","score":"0.8731"},"reference":"ebcq5cy","selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"mhp0at8","node_hash":"ee42c4780724a411697e3a95daf182d37c792d4689a7172f32929785d5fd968e","own_hash":"24cc437784bf358d639755dbf59984ad2c0c7a0e7f9448b23e965039b67f759b","quote":{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi"},"rev":12,"span":[48,60],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"in three steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource","verdict":"supports"},"created":"2026-10-12T09:00:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/jh0e4st2c0kpt","layer":"tag:scient.ing,2026:layer:smithlab/tr6c3q8m","motivation":"linking","receipt":"qvckzaatz5d1v","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"qgh1k31","node_hash":"93a39490870e694299e88e6f475d42c38078d1442959e555bdbdf58488dcf187","own_hash":"e004436e7b28ff3dc41e0056f231ba707d9be985694e68acb911345a547842ed","quote":{"exact":"two-step fit","prefix":"Its constants come from a ","suffix":" (Hale and Osei, Table 1).1"},"rev":0,"span":[26,38],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"two-step fit","prefix":"Its constants come from a ","suffix":" (Hale and Osei, Table 1).1","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"cited":"fixtures/packages/hale2026harmonic-damb","citing":"fixtures/packages/writer2027fixed-ynr7.v3","expect":[{"message":"the TextQuoteSelector does not repeat the anchor's plain quote","rule":"layer.trace.source"}],"id":"source-quote-differs","op":"problems"} {"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"kind":"trace","note":"The abstract states the two steps: a scan first, then vibrational frequencies.","proposer":{"model":{"name":"example-model","parameters":"998b5161e39e01c8bc43ef81ec89141e15b7ea53b2e936707920a6097dbcb2c5","processor":"local","prompt":"9cc338fba7c62db7266f530cb555a5ee36910d41a0120a3fe7fd7de1944d0931","provider":"Example Models (illustrative)","version":"2026-09","weights":"504b2d340045b92c22682b60020c21103aae7ff41172bb632fbe305eb4af9b5e"},"rank":1,"run":"illustrative-run-2","score":"0.8731"},"reference":"ebcq5cy","selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"zzzzzzz","node_hash":"ee42c4780724a411697e3a95daf182d37c792d4689a7172f32929785d5fd968e","own_hash":"24cc437784bf358d639755dbf59984ad2c0c7a0e7f9448b23e965039b67f759b","quote":{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi"},"rev":12,"span":[48,60],"store":"smithlab"},"type":"AnchorSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource","verdict":"supports"},"created":"2026-10-12T09:00:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/jh0e4st2c0kpt","layer":"tag:scient.ing,2026:layer:smithlab/tr6c3q8m","motivation":"linking","receipt":"qvckzaatz5d1v","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"qgh1k31","node_hash":"93a39490870e694299e88e6f475d42c38078d1442959e555bdbdf58488dcf187","own_hash":"e004436e7b28ff3dc41e0056f231ba707d9be985694e68acb911345a547842ed","quote":{"exact":"two-step fit","prefix":"Its constants come from a ","suffix":" (Hale and Osei, Table 1).1"},"rev":0,"span":[26,38],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"two-step fit","prefix":"Its constants come from a ","suffix":" (Hale and Osei, Table 1).1","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"cited":"fixtures/packages/hale2026harmonic-damb","citing":"fixtures/packages/writer2027fixed-ynr7.v3","expect":[{"message":"the passage's node zzzzzzz is not in the cited document","rule":"layer.trace.source"}],"id":"source-node-unknown","op":"problems"} -{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"kind":"trace","note":"The abstract states the two steps: a scan first, then vibrational frequencies.","proposer":{"model":{"name":"example-model","parameters":"998b5161e39e01c8bc43ef81ec89141e15b7ea53b2e936707920a6097dbcb2c5","processor":"local","prompt":"9cc338fba7c62db7266f530cb555a5ee36910d41a0120a3fe7fd7de1944d0931","provider":"Example Models (illustrative)","version":"2026-09","weights":"504b2d340045b92c22682b60020c21103aae7ff41172bb632fbe305eb4af9b5e"},"rank":1,"run":"illustrative-run-2","score":"0.8731"},"reference":"ebcq5cy","selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"mhp0at8","node_hash":"ee42c4780724a411697e3a95daf182d37c792d4689a7172f32929785d5fd968e","own_hash":"24cc437784bf358d639755dbf59984ad2c0c7a0e7f9448b23e965039b67f759b","quote":{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi"},"rev":12,"span":[48,60],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource","verdict":"supports"},"created":"2026-10-12T09:00:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/jh0e4st2c0kpt","layer":"tag:scient.ing,2026:layer:smithlab/tr6c3q8m","motivation":"linking","receipt":"qvckzaatz5d1v","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"paragraph","leaves":[["kda5wym","8f22f3f58beb618723a14dd8fee8caaeb5cef6b26f43d88a5ddb4ff42f86d63e"],["qgh1k31","fe82fa8560942e052e31d9b18cc8d3a9ba54ce01d91b66538ded6ff682a4e885"],["wbntyy4","9b297e00b7348c2df4c6b12f67b2f879217a0d71e1be382fc8a4f6bd7439ddd0"]],"node":"x9ryw92","node_hash":"b17dff0cff3ce730e52efca92b9fe585ffc956cc9f76e52a8b37721cbbec442f","own_hash":"494e069be36a18ecaabf5a63be7c31617ade7a5460218ca83a2de3d8d8f964e0","rev":0,"store":"smithlab"},"type":"AnchorSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"cited":"fixtures/packages/hale2026harmonic-damb","citing":"fixtures/packages/writer2027fixed-ynr7.v3","expect":[{"message":"the target anchor is not on a leaf with runs, whole or in part","rule":"layer.trace.target"}],"id":"target-is-a-paragraph","op":"problems"} +{"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"kind":"trace","note":"The abstract states the two steps: a scan first, then vibrational frequencies.","proposer":{"model":{"name":"example-model","parameters":"998b5161e39e01c8bc43ef81ec89141e15b7ea53b2e936707920a6097dbcb2c5","processor":"local","prompt":"9cc338fba7c62db7266f530cb555a5ee36910d41a0120a3fe7fd7de1944d0931","provider":"Example Models (illustrative)","version":"2026-09","weights":"504b2d340045b92c22682b60020c21103aae7ff41172bb632fbe305eb4af9b5e"},"rank":1,"run":"illustrative-run-2","score":"0.8731"},"reference":"ebcq5cy","selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"mhp0at8","node_hash":"ee42c4780724a411697e3a95daf182d37c792d4689a7172f32929785d5fd968e","own_hash":"24cc437784bf358d639755dbf59984ad2c0c7a0e7f9448b23e965039b67f759b","quote":{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi"},"rev":12,"span":[48,60],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource","verdict":"supports"},"created":"2026-10-12T09:00:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/jh0e4st2c0kpt","layer":"tag:scient.ing,2026:layer:smithlab/tr6c3q8m","motivation":"linking","receipt":"qvckzaatz5d1v","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"paragraph","leaves":[["kda5wym","8f22f3f58beb618723a14dd8fee8caaeb5cef6b26f43d88a5ddb4ff42f86d63e"],["qgh1k31","fe82fa8560942e052e31d9b18cc8d3a9ba54ce01d91b66538ded6ff682a4e885"],["wbntyy4","9b297e00b7348c2df4c6b12f67b2f879217a0d71e1be382fc8a4f6bd7439ddd0"],["rh0yjt9","0d2c4ad8fc643245b3c0d6680110754f04ebca185a6c5ad9d0c2ddc1c473ea6b"]],"node":"y4z5j53","node_hash":"86cd27353ae55ba760c0f033028c42ebf9f2d31b25598f70b94dd6ff79abfbec","own_hash":"494e069be36a18ecaabf5a63be7c31617ade7a5460218ca83a2de3d8d8f964e0","rev":0,"store":"smithlab"},"type":"AnchorSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"cited":"fixtures/packages/hale2026harmonic-damb","citing":"fixtures/packages/writer2027fixed-ynr7.v3","expect":[{"message":"the target anchor is not on a leaf with runs, whole or in part","rule":"layer.trace.target"}],"id":"target-is-a-paragraph","op":"problems"} {"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"kind":"trace","note":"The abstract states the two steps: a scan first, then vibrational frequencies.","proposer":{"model":{"name":"example-model","parameters":"998b5161e39e01c8bc43ef81ec89141e15b7ea53b2e936707920a6097dbcb2c5","processor":"local","prompt":"9cc338fba7c62db7266f530cb555a5ee36910d41a0120a3fe7fd7de1944d0931","provider":"Example Models (illustrative)","version":"2026-09","weights":"504b2d340045b92c22682b60020c21103aae7ff41172bb632fbe305eb4af9b5e"},"rank":1,"run":"illustrative-run-2","score":"0.8731"},"reference":"ebcq5cy","selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"mhp0at8","node_hash":"ee42c4780724a411697e3a95daf182d37c792d4689a7172f32929785d5fd968e","own_hash":"24cc437784bf358d639755dbf59984ad2c0c7a0e7f9448b23e965039b67f759b","quote":{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi"},"rev":12,"span":[48,60],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource","verdict":"supports"},"created":"2026-10-12T09:00:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/jh0e4st2c0kpt","layer":"tag:scient.ing,2026:layer:smithlab/tr6c3q8m","motivation":"linking","receipt":"qvckzaatz5d1v","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"kda5wym","node_hash":"dd438a68616e63fd1cd5050d308779af58dfed2b4d43cc5a4bbab3fc8d4f2bcb","own_hash":"46dfbddc0e456a2b7f4105b8d3636220ff9145acccf3bdf81a206f0b84f95b63","quote":{"exact":"The bond term is harmonic in the bond length."},"rev":0,"store":"smithlab"},"type":"AnchorSelector"},{"exact":"The bond term is harmonic in the bond length.","prefix":"","suffix":"","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"cited":"fixtures/packages/hale2026harmonic-damb","citing":"fixtures/packages/writer2027fixed-ynr7.v3","expect":[{"message":"the sentence does not cite the reference ebcq5cy","rule":"layer.trace.target"}],"id":"target-cites-nothing","op":"problems"} {"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"kind":"trace","note":"The abstract states the two steps: a scan first, then vibrational frequencies.","proposer":{"model":{"name":"example-model","parameters":"998b5161e39e01c8bc43ef81ec89141e15b7ea53b2e936707920a6097dbcb2c5","processor":"local","prompt":"9cc338fba7c62db7266f530cb555a5ee36910d41a0120a3fe7fd7de1944d0931","provider":"Example Models (illustrative)","version":"2026-09","weights":"504b2d340045b92c22682b60020c21103aae7ff41172bb632fbe305eb4af9b5e"},"rank":1,"run":"illustrative-run-2","score":"0.8731"},"reference":"qgh1k31","selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"mhp0at8","node_hash":"ee42c4780724a411697e3a95daf182d37c792d4689a7172f32929785d5fd968e","own_hash":"24cc437784bf358d639755dbf59984ad2c0c7a0e7f9448b23e965039b67f759b","quote":{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi"},"rev":12,"span":[48,60],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource","verdict":"supports"},"created":"2026-10-12T09:00:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/jh0e4st2c0kpt","layer":"tag:scient.ing,2026:layer:smithlab/tr6c3q8m","motivation":"linking","receipt":"qvckzaatz5d1v","status":"confirmed","target":{"selector":[{"anchor":{"doc":"writer2027fixed-ynr7.v3","format":"scienting-anchor/1","kind":"sentence","node":"qgh1k31","node_hash":"93a39490870e694299e88e6f475d42c38078d1442959e555bdbdf58488dcf187","own_hash":"e004436e7b28ff3dc41e0056f231ba707d9be985694e68acb911345a547842ed","quote":{"exact":"two-step fit","prefix":"Its constants come from a ","suffix":" (Hale and Osei, Table 1).1"},"rev":0,"span":[26,38],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"two-step fit","prefix":"Its constants come from a ","suffix":" (Hale and Osei, Table 1).1","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/writer2027fixed-ynr7.v3","type":"SpecificResource"},"type":"Annotation"},"cited":"fixtures/packages/hale2026harmonic-damb","citing":"fixtures/packages/writer2027fixed-ynr7.v3","expect":[{"message":"the reference qgh1k31 is not a reference node of the citing document","rule":"layer.trace.target"}],"id":"target-reference-is-a-sentence","op":"problems"} {"annotation":{"@context":["http://www.w3.org/ns/anno.jsonld","https://paperspec.scient.ing/context/scienting-1.jsonld"],"body":{"kind":"trace","note":"The abstract states the two steps: a scan first, then vibrational frequencies.","proposer":{"model":{"name":"example-model","parameters":"998b5161e39e01c8bc43ef81ec89141e15b7ea53b2e936707920a6097dbcb2c5","processor":"local","prompt":"9cc338fba7c62db7266f530cb555a5ee36910d41a0120a3fe7fd7de1944d0931","provider":"Example Models (illustrative)","version":"2026-09","weights":"504b2d340045b92c22682b60020c21103aae7ff41172bb632fbe305eb4af9b5e"},"rank":1,"run":"illustrative-run-2","score":"0.8731"},"reference":"ebcq5cy","selector":[{"anchor":{"doc":"hale2026harmonic-damb","format":"scienting-anchor/1","kind":"sentence","node":"mhp0at8","node_hash":"ee42c4780724a411697e3a95daf182d37c792d4689a7172f32929785d5fd968e","own_hash":"24cc437784bf358d639755dbf59984ad2c0c7a0e7f9448b23e965039b67f759b","quote":{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi"},"rev":12,"span":[48,60],"store":"smithlab"},"type":"AnchorSelector"},{"exact":"in two steps","prefix":"bond constants for twelve bonds ","suffix":", first to a scan and then to vi","type":"TextQuoteSelector"}],"source":"tag:scient.ing,2026:doc:smithlab/hale2026harmonic-damb","type":"SpecificResource","verdict":"supports"},"created":"2026-10-12T09:00:00Z","creator":{"id":"tag:scient.ing,2026:software:example-model","name":"A model (illustrative)","type":"Software"},"id":"tag:scient.ing,2026:annotation:smithlab/jh0e4st2c0kpt","layer":"tag:scient.ing,2026:layer:smithlab/tr6c3q8m","motivation":"linking","receipt":"qvckzaatz5d1v","status":"confirmed","target":{"source":"tag:scient.ing,2026:annotation:smithlab/arm3zmj6be9fz","type":"SpecificResource"},"type":"Annotation"},"cited":"fixtures/packages/hale2026harmonic-damb","citing":"fixtures/packages/writer2027fixed-ynr7.v3","expect":[{"message":"the target is not a document selected by an AnchorSelector","rule":"layer.trace.target"}],"id":"target-is-a-reply","op":"problems"}