feat: structure and sequence annotation bodies; paperspec.structures and paperspec.sequences

Chemical structures (spec/18 section 18.6) and biological sequences (18.7) tied to
the words of a paper. Minor change: two new body kinds, optional properties and
seven rules, with no valid file made invalid.

- annotation schema: structure (SMILES or SMARTS, role, identity, written, label,
  accessions, force-field terms) and sequence (alphabet, role, identity, start,
  organism, regions, variants); body_kind in sql/store.sql; nine terms in the
  JSON-LD context; rules layer.structure.{value,identity,term} and
  layer.sequence.{value,identity,region,variant}.
- paperspec.structures reads the atoms and bonds of a SMILES or SMARTS with the
  standard library, so a term's atoms are checked without a toolkit; checked against
  RDKit on a corpus and random texts. paperspec.sequences checks alphabets,
  identities, regions and variants.
- fixtures/records/chemistry (on the main example) and biology (on the draft, which
  gains a last sentence), vectors/structures.jsonl and vectors/sequences.jsonl;
  check.py runs both layers and the vectors; counts, guides and CHANGELOG updated.
- the prose check no longer takes organism for a UK spelling.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8cL4zN4XpaQF5cBtASzfq
This commit is contained in:
alexmandClaude committed 2026-10-18 15:38:31 -04:00
1 parent 7890fa1ad7
commit 3ab96d653f
36 files changed
+1488 -44

No files matched your search

+5 -4
View File
@@ -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"}