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

@@ -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":[]}}