diff --git a/.agents/skills/formchem-harness/EVALS.json b/.agents/skills/formchem-harness/EVALS.json
index 5814ed3a..8e288d02 100644
--- a/.agents/skills/formchem-harness/EVALS.json
+++ b/.agents/skills/formchem-harness/EVALS.json
@@ -1,6 +1,6 @@
{
"skill_name": "formchem-harness",
- "notes": "Run with the FormChem engine and window open (./formchem) and the formchem MCP server connected with the agent token, version 0.8.0. Expected behaviours are observable in the tool calls and the final answer. FormChem 0.8.0 has 42 tools: agents draw with draw_from_smiles, draw_from_molfile and add_reaction, edit by id with get_atoms and the 14 edit tools, check with render, get_structure and validate, and still reach the window's commands, reactions, analysis and extensions; several evals check that the agent draws with the tools and checks before it claims. Evals 13 and 14 need a drawn esterification scheme (acetic acid + ethanol, arrow, ethyl acetate + water); evals 15 to 18 need ibuprofen inserted with insert-smiles CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O; eval 20 needs an SD file at the path it names.",
+ "notes": "Run with the FormChem engine and window open (./formchem) and the formchem MCP server connected with the agent token, version 0.10.0. Expected behaviours are observable in the tool calls and the final answer. FormChem 0.10.0 has 60 tools: agents draw with draw_from_smiles, draw_from_molfile, draw_from_name and add_reaction, edit by id with get_atoms and the 14 edit tools, check with render, get_structure and validate, name with name_structure, predict NMR with predict_nmr and predict_spectrum, work on spectra with open_spectrum and the spectrum tools, work in 3D with build_3d, conformers_3d, minimise_3d, scan_dihedral, measure_3d, open_3d_structure, extract_ligand and export_3d, and still reach the window's commands, reactions, analysis and extensions; several evals check that the agent draws with the tools and checks before it claims. Evals 13 and 14 need a drawn esterification scheme (acetic acid + ethanol, arrow, ethyl acetate + water); evals 15 to 18 need ibuprofen inserted with insert-smiles CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O; eval 20 needs an SD file at the path it names; eval 28 needs ethyl acetate drawn; eval 29 needs a JCAMP-DX 1H NMR file of ethanol at the path it names; eval 33 needs a PDB file with a protein chain and a benzamidine ligand (BEN) at the path it names; eval 34 needs butane drawn.",
"evals": [
{
"id": 1,
@@ -9,8 +9,8 @@
"files": [],
"expected_behavior": [
"Calls get_context first",
- "Says in plain words that an agent can make, open and save drawings, draw structures and reaction schemes from SMILES or molfiles, edit them atom by atom, read them back as SMILES, InChIKey or molfile, render and validate them, convert files and run menu commands, each change one undo step",
- "Names what is not there yet: drawing from a name, typing stoichiometry amounts, 3D",
+ "Says in plain words that an agent can make, open and save drawings, draw structures and reaction schemes from SMILES, molfiles or names, edit them atom by atom, read them back as SMILES, InChIKey, molfile or names, render and validate them, predict 1H and 13C NMR, open JCAMP-DX spectra and pick peaks, build structures in 3D with conformers, scans and measurements, open PDB files and extract ligands, convert files and run menu commands, each change one undo step",
+ "Names what is not there yet: typing stoichiometry amounts, quantum or tight-binding energies (no xtb or CREST)",
"Does not run any command or post a handoff for a question that only asks"
]
},
@@ -286,6 +286,124 @@
"Quotes the InChIKeys from the answer and reports failed records with their reasons as the answer lists them",
"Does not open the file as a drawing or use the export commands to get the text"
]
+ },
+ {
+ "id": 26,
+ "name": "draw-from-a-systematic-name",
+ "prompt": "Draw (2R)-butan-2-ol in FormChem and tell me how sure it is about the structure.",
+ "files": [],
+ "expected_behavior": [
+ "Calls get_context, then draw_from_name with name (2R)-butan-2-ol once, with no x or y",
+ "Quotes the method (systematic parser), the confidence (high) and the engine version from the answer's read field or its first sentence",
+ "Quotes the InChIKey BTANRVKWQNVYAZ-SCSAIBSYSA-N from the answer or from get_structure, and does not write a SMILES of its own",
+ "Says the drawing is one undo step"
+ ]
+ },
+ {
+ "id": 27,
+ "name": "refused-name",
+ "prompt": "In FormChem, draw Benzene, 1,2-dichloro-.",
+ "files": [],
+ "expected_behavior": [
+ "Calls draw_from_name once and reads the refusal that inverted index names are not read",
+ "Either retries once with 1,2-dichlorobenzene through draw_from_name, or draws Clc1ccccc1Cl with draw_from_smiles and says it wrote that SMILES itself",
+ "Does not loop on the refused name and does not claim the original name was read"
+ ]
+ },
+ {
+ "id": 28,
+ "name": "predict-and-place-nmr",
+ "prompt": "Predict the 1H NMR of the ethyl acetate in my FormChem drawing and put the spectrum next to it.",
+ "files": [],
+ "expected_behavior": [
+ "Finds the fragment id with get_context, get_structure or get_atoms, then calls predict_spectrum with that object and nucleus 1H (predict_nmr first is fine)",
+ "Quotes the journal line as the tool gives it, with 4.10 (q, J = 7.0 Hz, 2H), 2.05 (s, 3H) and 1.25 (t, J = 7.0 Hz, 3H), and names the method FormChem increments 0.9.0",
+ "Calls the values predicted, not measured, and passes on any warnings the answer lists",
+ "Says the spectrum is one undo step and that its peaks are linked to the atoms"
+ ]
+ },
+ {
+ "id": 29,
+ "name": "open-and-integrate-a-spectrum",
+ "prompt": "Open /data/ethanol-1h.jdx in FormChem, integrate the CH3 triplet around 1.2 ppm to 3 protons and the CH2 quartet around 3.7 ppm, and tell me the CH2 value.",
+ "files": [],
+ "expected_behavior": [
+ "Calls open_spectrum with path /data/ethanol-1h.jdx and reads the spectrum id and any report lines from the answer",
+ "Calls spectrum_integrate with a range around 1.2 ppm and value 3, then with a range around 3.7 ppm (or both at once with ranges and value 3)",
+ "Quotes the CH2 integral as the tool answers it (close to 2) and says each integration is one undo step",
+ "Does not compute the integral itself from spectrum_data points"
+ ]
+ },
+ {
+ "id": 30,
+ "name": "name-a-salt",
+ "prompt": "What is the systematic name of the sodium acetate in my FormChem drawing?",
+ "files": [],
+ "expected_behavior": [
+ "Calls name_structure with the fragment id or with no object",
+ "Reports the common name if the answer gives one, and the reason the answer gives for having no systematic name",
+ "Does not present a systematic name that name_structure did not return; a name it writes itself is labelled as its own"
+ ]
+ },
+ {
+ "id": 31,
+ "name": "ethanol-3d-bond-length",
+ "prompt": "Draw ethanol in FormChem, make it 3D and tell me the C-O bond length.",
+ "files": [],
+ "expected_behavior": [
+ "Calls get_context, then draw_from_smiles with CCO (or draw_from_name with ethanol)",
+ "Calls build_3d on the new fragment and reads its answer: one conformer, the energy with ETKDGv3+MMFF94 and the engine version, 0 clashes",
+ "Calls get_atoms (or reads the write result) for the C and O ids, then measure_3d with those two atoms",
+ "Reports the distance as the tool gives it (about 1.42 angstrom) with the method, and does not compute it from coordinates itself"
+ ]
+ },
+ {
+ "id": 32,
+ "name": "taxol-3d-stereo-check",
+ "prompt": "Make a 3D model of the paclitaxel in my FormChem drawing and make sure the stereochemistry survived.",
+ "files": [],
+ "expected_behavior": [
+ "Calls build_3d with the paclitaxel fragment id",
+ "Quotes the stereo line from the answer (all 11 stereo labels kept, or which were lost) and the clash count",
+ "If any label was lost, says the 3D structure is not the drawn isomer and does not hand the geometry on as correct",
+ "Quotes the energy with its force field and engine version, and does not call it a heat of formation or a quantum energy"
+ ]
+ },
+ {
+ "id": 33,
+ "name": "pdb-ligand-extract",
+ "prompt": "Open /data/gasfk-ligands.pdb in FormChem and pull the benzamidine out as a structure I can edit.",
+ "files": [],
+ "expected_behavior": [
+ "Calls open_3d_structure with path /data/gasfk-ligands.pdb and reads the chains, the ligand keys and the waters from the answer",
+ "Calls extract_ligand with the model's object id and ligand A:BEN:301 (or BEN)",
+ "Reports the new fragment id, the SMILES as returned (N=C(N)c1ccccc1) and that the bond orders came from the template table",
+ "Checks the new fragment with validate or get_structure, and does not claim bond orders the answer marked as inferred are certain"
+ ]
+ },
+ {
+ "id": 34,
+ "name": "butane-torsion-scan",
+ "prompt": "How high is the rotation barrier of the central bond of the butane in my FormChem drawing?",
+ "files": [],
+ "expected_behavior": [
+ "Builds 3D first with build_3d when the fragment has no conformer",
+ "Calls get_atoms for the four carbon ids in a row and calls scan_dihedral with them, without store",
+ "Quotes the barrier and the minimum angle from the answer with MMFF94 and the engine version (a barrier of about 5 kcal/mol, anti minimum at 180 degrees)",
+ "Says it is a force-field profile and that nothing was stored in the drawing"
+ ]
+ },
+ {
+ "id": 35,
+ "name": "style-3d-for-person",
+ "prompt": "Show the structure I selected in FormChem in 3D as ball and stick with a van der Waals surface.",
+ "files": [],
+ "expected_behavior": [
+ "Calls build_3d when the selected structure has no conformer, and reads its stereo line",
+ "Uses run_command with view-3d, then style-ballstick and surface-vdw, after finding them with list_commands",
+ "Does not claim to see the 3D View; says the panel shows it and that render shows only a stored picture",
+ "Ends with a handoff naming what the person will see"
+ ]
}
],
"trigger_evals": [
@@ -339,6 +457,22 @@
{"query": "convert this SDF file to SMILES with RDKit in a Python script", "should_trigger": false},
{"query": "check the valence of this molfile with RDKit, no app needed", "should_trigger": false},
{"query": "fix the perception distances in formchem's services/chem/reactions.py", "should_trigger": false},
- {"query": "balance this equation for me: Fe + O2 -> Fe2O3", "should_trigger": false}
+ {"query": "balance this equation for me: Fe + O2 -> Fe2O3", "should_trigger": false},
+ {"query": "draw 2,2,4-trimethylpentane from its name in formchem", "should_trigger": true},
+ {"query": "what is the IUPAC name of the structure I drew in FormChem", "should_trigger": true},
+ {"query": "predict the 13C NMR of my FormChem structure and put the spectrum beside it", "should_trigger": true},
+ {"query": "open this .jdx IR spectrum in formchem and pick the peaks", "should_trigger": true},
+ {"query": "set the first integral of the NMR spectrum in my formchem drawing to 3 protons", "should_trigger": true},
+ {"query": "add a ring parent to formchem's systematic name parser", "should_trigger": false},
+ {"query": "tune the 13C increments in formchem's services/nmr/carbon.py", "should_trigger": false},
+ {"query": "convert this IUPAC name to SMILES with OPSIN on the command line", "should_trigger": false},
+ {"query": "make the structure in my formchem drawing 3D and give me its lowest-energy conformer", "should_trigger": true},
+ {"query": "measure the C-O bond length of the ethanol I drew in FormChem", "should_trigger": true},
+ {"query": "open this pdb file in formchem and extract the ligand as a structure", "should_trigger": true},
+ {"query": "scan the dihedral of the central C-C bond of butane in formchem", "should_trigger": true},
+ {"query": "export the 3D coordinates of my formchem structure as an SDF with every conformer", "should_trigger": true},
+ {"query": "add a new force field to formchem's services/three_d/forcefield.py", "should_trigger": false},
+ {"query": "write an RDKit script that embeds and minimises conformers for a list of SMILES", "should_trigger": false},
+ {"query": "render this PDB entry as a cartoon in PyMOL", "should_trigger": false}
]
}
diff --git a/.agents/skills/formchem-harness/SKILL.md b/.agents/skills/formchem-harness/SKILL.md
index 93f182ec..2235c344 100644
--- a/.agents/skills/formchem-harness/SKILL.md
+++ b/.agents/skills/formchem-harness/SKILL.md
@@ -1,21 +1,21 @@
---
name: formchem-harness
-description: "Drives FormChem, the FormAI family's chemical structure drawing suite, through its MCP server. Use whenever the person wants an agent to work in FormChem: draw a structure or reaction from SMILES or a molfile, build or edit it atom by atom, set a charge or R/S, replace a group, add arrows or captions, check the drawing with render, get_structure or validate, read its InChIKey, SMILES or molfile, convert files, open or save drawings, run a menu command or extension, perceive or map a reaction, read stoichiometry, get cLogP or TPSA, match SMARTS, hand off, or asks what FormChem can do, and FormChem is named or its tools (draw_from_smiles, render, get_structure, get_atoms, add_atom, run_command, handoff and the rest) are available. Covers 127.0.0.1:8220, the agent token, approval, Stop and Agent Activity. Not for changing FormChem's source (formchem-skillset), other Form apps such as FormDeck, or standalone RDKit scripts."
+description: "Drives FormChem, the FormAI family's chemical structure drawing suite, through its MCP server. Use whenever the person wants an agent to work in FormChem: draw a structure or reaction from SMILES, a molfile or a chemical name, build or edit it atom by atom, check the drawing with render, get_structure or validate, name a structure, predict a 1H or 13C NMR spectrum, open a JCAMP-DX spectrum, pick peaks or integrate, build it in 3D, find conformers, minimise, scan a dihedral or measure a bond length, open a PDB file or extract a ligand, convert files, open or save drawings, run a menu command, perceive a reaction, get cLogP, hand off, or asks what FormChem can do, and FormChem is named or its tools (draw_from_smiles, draw_from_name, predict_nmr, build_3d, render, get_atoms, run_command, handoff and the rest) are available. Covers 127.0.0.1:8220, the agent token, approval and Stop. Not for changing FormChem's source (formchem-skillset), other Form apps such as FormDeck, or standalone RDKit scripts."
license: Apache-2.0
metadata:
author: nodemode-ai
- version: "0.8.0"
+ version: "0.10.0"
---
# FormChem harness
FormChem is a chemical structure drawing suite running on this computer. Its MCP server (`formchem`) lives in the engine and reaches the FormChem window, where the person sees everything an agent does. This pack is the method for using it well: draw with the tools, check what you drew, and hand back.
-## What exists today (0.8.0)
+## What exists today (0.10.0)
-FormChem has drawings (`.fchem` documents kept by the engine with undo, autosave and versions), an RDKit chemistry service that computes SMILES, InChIKey, formula, masses, CIP labels and valence warnings after every change, and a 2D canvas the person draws on. Earlier versions added reactions and annotations (0.5.0), stereo, queries and analysis (0.6.0), and formats, pictures, the clipboard, Standardise, the command line, the dark page, scaling and grids (0.7.0).
+FormChem has drawings (`.fchem` documents kept by the engine with undo, autosave and versions), an RDKit chemistry service that computes SMILES, InChIKey, formula, masses, CIP labels and valence warnings after every change, and a 2D canvas the person draws on. Earlier versions added reactions and annotations (0.5.0), stereo, queries and analysis (0.6.0), formats, pictures, the clipboard, Standardise, the command line, the dark page, scaling and grids (0.7.0), the agent tools (0.8.0), and names, NMR prediction (FormChem increments) and JCAMP-DX spectra (0.9.0).
-0.8.0 is the agent release. The MCP server has 42 tools; `references/tools.md` lists every argument and is generated from the server.
+0.10.0 adds 3D: conformers built from the drawing with the stereo checked, conformer searches, minimisation and dihedral scans with RDKit's force fields, measurements, the 3D View and 3D objects on the page, PDB and mmCIF files with ligand extraction, and 3D exports. The MCP server has 60 tools; `references/tools.md` lists every argument and is generated from the server.
| Group | Tools |
| --- | --- |
@@ -24,12 +24,15 @@ FormChem has drawings (`.fchem` documents kept by the engine with undo, autosave
| Checking | `render` (a picture drawn by the window's own renderer), `get_structure` (SMILES, CXSMILES, InChI, InChIKey, molfile, masses), `validate`, `compute_properties` |
| Editing by id | `get_atoms`; `add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text` |
| Converting | `convert`, `batch_convert` (the command line's own code and output) |
+| Names (0.9.0) | `draw_from_name` (a common or systematic name, read offline), `name_structure` (common and round-trip-checked systematic names) |
+| NMR and spectra (0.9.0) | `predict_nmr`, `predict_spectrum`; `open_spectrum` (JCAMP-DX), `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate`, `spectrum_export` |
+| 3D (0.10.0) | `build_3d`, `conformers_3d`, `minimise_3d`, `scan_dihedral`, `measure_3d`; `open_3d_structure` (PDB, mmCIF, SDF, MOL), `extract_ligand`, `export_3d` |
| Window, extensions, handoff | `list_commands`, `run_command`, `extensions_list`, `extension_command`, `handoff` |
| Reactions (0.5.0) and analysis (0.6.0) | `perceive_reactions`, `map_reaction`, `export_reaction`, `reaction_stoichiometry`, `properties`, `check_structure`, `stereo`, `substructure` |
Every change an agent makes is one transaction and one undo step, labelled with the tool in the person's Edit > Undo, and every change answers with the structure it now holds (ids, SMILES, InChIKey, formula, warnings) and a PNG of it. The person sees which agent is editing in the title bar, with a Stop button, and Window > Agent Activity lists every call with undo for the latest one.
-What still is not there: drawing from a chemical name (`draw_from_name` waits on a packaging decision; use SMILES), typing amounts into the Stoichiometry panel, 3D (0.10.0). The export and copy commands still hand their file to the person, not to the agent; use `convert` or `get_structure` for text you can read. Never draw by other means and present it as FormChem's work.
+Every name and computed number carries its method and version (FormChem names 0.9.0, FormChem increments 0.9.0, `ETKDGv3+MMFF94 (rdkit 2025.09.3)`); quote them with the value, and never present a prediction or a force-field energy as measured. What still is not there: names the offline engine refuses (hydro prefixes, spiro and bridged rings, peptides; use SMILES), a tool that links peaks to atoms (the window command does) or inserts a spectrum file into an existing drawing, typing amounts into the Stoichiometry panel, tools for 3D styles and surfaces (the window commands do), and any quantum or tight-binding method (no xtb or CREST). The export and copy commands still hand their file to the person, not to the agent; use `convert` or `get_structure` for text you can read. Never draw by other means and present it as FormChem's work.
## Doctrine (applies to every route)
@@ -46,13 +49,15 @@ What still is not there: drawing from a chemical name (`draw_from_name` waits on
```
formchem-harness/
SKILL.md this router and the doctrine
- references/tools.md the 42 MCP tools and their arguments (generated by ./formchem agents sync)
+ references/tools.md the 60 MCP tools and their arguments (generated by ./formchem agents sync)
EVALS.json evaluation prompts and trigger tests for this pack
sub-skills/
session-and-connection/ connecting, the agent token, get_context, approval, Stop, connection errors
drawing/ documents, draw_from_smiles, draw_from_molfile, add_reaction, placement, convert
edit-by-id/ get_atoms and the 14 edit tools: atoms, bonds, charges, stereo, groups, arrows, text
visual-qa/ render, get_structure, validate and compute_properties to check your own work
+ names-and-spectra/ draw_from_name, name_structure, predict_nmr, predict_spectrum and the spectrum tools
+ three-d/ build_3d, conformers, minimise, scans, measure, PDB files, ligands, 3D export and checks
handoff/ handoff states and notes, what the person sees, Agent Activity
window-commands/ the window's commands through run_command; references/command-catalogue.md
reactions/ reaction schemes, the four reaction tools, Set Reaction Roles
@@ -71,12 +76,18 @@ Paths inside a SUB-SKILL.md resolve against that sub-skill's own folder. `refere
| Draw a structure or reaction from SMILES, a molfile or a reaction SMILES; make, open, save or close a drawing; convert a file or folder | `drawing`, then `visual-qa` |
| Build a structure atom by atom; add or change a bond; set a charge, element, isotope, label, R/S or E/Z; replace a group; delete, move, scale, align or clean up by id; add an arrow, text or caption | `edit-by-id`, then `visual-qa` |
| Does it look right, is it valid, what is its InChIKey, SMILES or molfile, show me | `visual-qa` |
+| Draw caffeine, draw "(2R)-butan-2-ol", what is this structure called, its IUPAC name | `names-and-spectra`, then `visual-qa` |
+| Predict or simulate the 1H or 13C NMR, why is this proton at 4.1, put the predicted spectrum next to it | `names-and-spectra` |
+| Open this .jdx file, pick the IR peaks, integrate the NMR, set this integral to 3, link a peak to atoms, export the spectrum | `names-and-spectra` |
| The reaction in the drawing: steps, roles, atom mapping, reaction SMILES or RXN, balance, moles, yield | `reactions` |
| cLogP, TPSA, Lipinski, the structure check, stereo groups, SMARTS hits, hydrogens, abbreviations, atom lists, R-groups | `structure-analysis` |
| Export a picture or file for the person, print, the clipboard, Standardise, a template, the grid, the dark page, Preferences, any menu command | `window-commands` |
| Run an extension's command, which extensions are installed, read the drawing through an extension | `extension-drawings` |
| Tell the person you are done, ask them something, clear your note | `handoff` |
-| Draw from a name, 3D, type amounts into the Stoichiometry panel | Not yet: say so (names in a later version, 3D in 0.10.0) and offer SMILES, or ask the person |
+| Make it 3D, its conformers or lowest-energy shape, minimise, a torsion scan, a bond length or angle in 3D, does the 3D keep the stereo | `three-d`, then `visual-qa` |
+| Open this PDB or mmCIF file, pull out the ligand, save 3D coordinates as SDF, PDB or XYZ | `three-d` |
+| Show it in 3D, ball and stick, a surface, ESP, a 3D picture or glTF for the person | `three-d`, then `window-commands` |
+| Type amounts into the Stoichiometry panel, xtb or quantum energies | Not yet: say so, or ask the person |
| Change FormChem's own code, add an MCP tool, edit this pack | Not this pack: `formchem-skillset` |
## When something fails
@@ -94,6 +105,16 @@ Paths inside a SUB-SKILL.md resolve against that sub-skill's own folder. `refere
| "already exists" from `save_document` or `convert` | Agent tools never write over a file | Choose a new path, or ask the person to save over it in the window |
| "has unsaved changes" from `close_document` | Only the person may discard changes | `save_document` first, or ask the person |
| "is not available right now" | A window command is off (nothing selected, nothing to undo, a later version) | Do not retry; tell the person the reason it gives |
+| "Could not read the name" | The offline engine refused it (spelling, an inverted index name, D- or L- outside the dictionary, an impossible locant); nothing was drawn | Fix an obvious spelling once; else write the SMILES, use `draw_from_smiles` and say so |
+| `confidence: medium` on a name | A locant was assumed or the name has two readings | Quote the note and say what was drawn; ask if it matters |
+| `names: []` with a reason | No dictionary entry and the namer cannot name it, or the round trip failed | Report the reason; do not invent a systematic name |
+| "is not a spectrum" or "has none" from a spectrum tool | Wrong id, or the drawing holds no spectrum | `open_spectrum` or `predict_spectrum` first; pass `object` from its answer |
+| Predicted links stale after an edit | The curve follows the structure, the marks do not | Ask the person for Refresh Predicted Spectrum, or `run_command {id: "nmr-refresh"}` with that spectrum selected |
+| "stereo changed: lost ..." from `build_3d` | The 3D structure is not the drawn isomer | Do not use the geometry; check the wedges (`stereo`, `get_atoms`) and report it |
+| `unspecified_stereo` or `uff_fallback` note on a build | Centres without wedges were built as one arbitrary isomer; or MMFF94 had no parameters and UFF ran | Pass the note on with the numbers |
+| "No 3D coordinates yet" or "has no conformer" | The structure was never built, or an edit dropped its conformers | `build_3d`, then retry |
+| "The structure changed while 3D was being computed" (409) | Someone edited the structure during the build | Retry once; if it repeats, the person is editing: ask them |
+| `extract_ligand` refuses, or answers "inferred from the geometry" | The object is not a PDB or mmCIF model; or the ligand is outside the template table | Pass the model's `o...` id from `open_3d_structure`; say the bond orders were inferred and show the SMILES |
| `renderer: "engine"` in a picture | No window answered; the engine drew the structures only | Fine for checking structures; say arrows and text were not drawn, or ask the person to open the window |
When a call keeps failing in a way this table does not explain, call the same tool once with the simplest arguments (`get_context`, then `draw_from_smiles {smiles: "C"}`). If that fails too, the problem is the server or the connection, not the plan: report it to the person with the error text.
@@ -102,7 +123,8 @@ When a call keeps failing in a way this table does not explain, call the same to
- `get_context` was called first and its answer shaped the plan.
- Every structure the agent drew was checked: the write result's SMILES or InChIKey matched what was asked, and anything about how it looks was confirmed with `render`.
-- Nothing was claimed that a tool did not say; values were quoted from tool answers.
+- Nothing was claimed that a tool did not say; values were quoted from tool answers, names, predicted shifts, energies and 3D measurements with their method and version.
+- Every 3D geometry used was from a build whose stereo line said every label was kept.
- Every change was one call and one undo step, and none was retried after a refusal or a stop.
- The work ends with a `handoff` (`ready` with a note, or `question` with the question).
diff --git a/.agents/skills/formchem-harness/references/tools.md b/.agents/skills/formchem-harness/references/tools.md
index 3c4793c0..ddf0065c 100644
--- a/.agents/skills/formchem-harness/references/tools.md
+++ b/.agents/skills/formchem-harness/references/tools.md
@@ -1,6 +1,6 @@
# FormChem MCP tools
-Generated by `./formchem agents sync` from the TOOLS list in `backend/app/routers/mcp.py`; edit the server, never this file. 42 tools. Names and arguments are case sensitive. A tool answers with text first, then `structuredContent` where it sends it; a tool that cannot act answers with `isError: true` and a sentence naming the next step.
+Generated by `./formchem agents sync` from the TOOLS list in `backend/app/routers/mcp.py`; edit the server, never this file. 60 tools. Names and arguments are case sensitive. A tool answers with text first, then `structuredContent` where it sends it; a tool that cannot act answers with `isError: true` and a sentence naming the next step.
Read-only tools never ask the person. An approval-gated tool asks the person in the FormChem window the first time (Deny, Allow once, Always allow); agents started in FormChem's own Claude Code, Codex, Cursor or Antigravity tabs are never asked.
@@ -11,9 +11,19 @@ Read-only tools never ask the person. An approval-gated tool asks the person in
- render
- draw_from_smiles
- draw_from_molfile
+- draw_from_name
+- name_structure
- get_structure
- validate
- compute_properties
+- predict_nmr
+- predict_spectrum
+- open_spectrum
+- spectrum_data
+- spectrum_peaks
+- spectrum_pick_peaks
+- spectrum_integrate
+- spectrum_export
- convert
- batch_convert
- list_open_documents
@@ -49,6 +59,14 @@ Read-only tools never ask the person. An approval-gated tool asks the person in
- add_arrow
- add_text
- add_reaction
+- build_3d
+- conformers_3d
+- minimise_3d
+- scan_dihedral
+- measure_3d
+- open_3d_structure
+- extract_ligand
+- export_3d
- Resource
| Tool | Kind |
@@ -57,9 +75,19 @@ Read-only tools never ask the person. An approval-gated tool asks the person in
| `render` | read-only |
| `draw_from_smiles` | approval-gated |
| `draw_from_molfile` | approval-gated |
+| `draw_from_name` | approval-gated |
+| `name_structure` | read-only |
| `get_structure` | read-only |
| `validate` | read-only |
| `compute_properties` | read-only |
+| `predict_nmr` | read-only |
+| `predict_spectrum` | approval-gated |
+| `open_spectrum` | approval-gated |
+| `spectrum_data` | read-only |
+| `spectrum_peaks` | read-only |
+| `spectrum_pick_peaks` | approval-gated |
+| `spectrum_integrate` | approval-gated |
+| `spectrum_export` | read-only |
| `convert` | approval-gated when it changes something |
| `batch_convert` | approval-gated when it changes something |
| `list_open_documents` | read-only |
@@ -95,6 +123,14 @@ Read-only tools never ask the person. An approval-gated tool asks the person in
| `add_arrow` | approval-gated |
| `add_text` | approval-gated |
| `add_reaction` | approval-gated |
+| `build_3d` | approval-gated |
+| `conformers_3d` | approval-gated |
+| `minimise_3d` | approval-gated |
+| `scan_dihedral` | approval-gated when it changes something |
+| `measure_3d` | read-only |
+| `open_3d_structure` | approval-gated |
+| `extract_ligand` | approval-gated |
+| `export_3d` | approval-gated when it changes something |
## get_context
@@ -139,6 +175,29 @@ Draws the structure of an MDL molfile (V2000 or V3000) or the first records of S
| `x` | number | no | Left edge in points; left out: free space |
| `y` | number | no | Top edge in points; left out: free space |
+## draw_from_name
+
+Draws the structure of a chemical name in a drawing, read offline by FormChem: a common name from its dictionary (aspirin, caffeine, THF, L-alanine, Taxol) or a systematic IUPAC name for the common classes (2,2,4-trimethylpentane, (2R)-butan-2-ol, ethyl propanoate, N,N-dimethylpropan-1-amine, pyridine-3-carboxylic acid). Laid out with the scored 2D layout and placed in free space right of or below what is on the page, as one undo step; with no drawing open it makes one. Returns the new ids, SMILES, InChIKey, formula and a picture, plus how the name was read: method (dictionary or systematic parser), confidence (high, or medium when a locant had to be assumed, with the assumption in the notes), engine and version. A name it cannot read is refused with the character where reading stopped; inverted index names and D-/L- outside the dictionary are refused too. Prefer draw_from_smiles when you know the SMILES.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `name` | string | yes | Chemical name, such as aspirin or 2-methylpropan-1-ol (up to 300 characters) |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `x` | number | no | Left edge in points; left out: free space |
+| `y` | number | no | Top edge in points; left out: free space |
+| `label` | string | no | Name given to the new structure; default the name read |
+
+## name_structure
+
+Names structures without changing anything: for SMILES, one object (a fragment or group), the person's selection in the window, or every fragment of a drawing. Each answer lists the common name from FormChem's dictionary when there is one and the systematic IUPAC name from FormChem's rule-based namer, which is only given when it reads back to the same structure (same InChIKey); otherwise no name and the reason (for example salts, unlisted ring systems, stereo outside the parent chain). Every name carries its method, confidence, engine and version.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `smiles` | string | no | SMILES to name instead of a drawing |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | A fragment or group id; left out: every fragment |
+| `selection` | boolean | no | True: the fragments the person has selected in the FormChem window |
+
## get_structure
The structures of a drawing in machine form: SMILES, CXSMILES, InChI, InChIKey, a molfile (V2000, or V3000 when the structure needs it), formula, average and monoisotopic mass, m/z of charged structures and elemental analysis, per fragment. For one object (a fragment or a group), the person's selection in the window (selection true) or every fragment. Does not change the drawing.
@@ -167,6 +226,107 @@ The calculated properties of a drawing's structures per fragment, each with the
| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
| `object` | string | no | One fragment id; left out: every fragment |
+## predict_nmr
+
+Predicted 1H or 13C NMR of a structure with FormChem's own increment rules (method FormChem increments, no shift database): per-atom shifts with a confidence (high, medium, low) and an uncertainty in ppm, signals grouped by symmetry with multiplicity, J values and proton counts, a journal-style line, and warnings (exchangeable, diastereotopic, second order, rotamers). For a fragment of a drawing (doc, object) or SMILES. Does not change the drawing. Predicted values, never measured data.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id; may be left out when the drawing has one fragment |
+| `smiles` | string | no | SMILES instead of a drawing object, such as CCOC(C)=O |
+| `nucleus` | 1H or 13C or both | no | Default 1H |
+| `frequency` | number | no | Spectrometer frequency in MHz for this nucleus (default 400 for 1H, 100 for 13C) |
+
+## predict_spectrum
+
+Adds a predicted 1H or 13C NMR spectrum of a structure to the drawing beside it, as one undo step: a spectrum object whose source names the fragment, method, version and frequency, with multiplets and integrals (1H) or peaks (13C) linked to the structure's atoms; the curve is recomputed from the structure, never stored. Returns the spectrum id, the journal line and the warnings.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | yes | Fragment id from get_atoms or get_structure |
+| `nucleus` | 1H or 13C | no | Default 1H |
+| `frequency` | number | no | MHz; default 400 for 1H, 100 for 13C |
+| `x` | number | no | Left edge in points; left out: right of the structure |
+| `y` | number | no | Top edge in points |
+
+## open_spectrum
+
+Opens a JCAMP-DX spectrum (IR, Raman, UV-Vis, MS or 1D NMR, every compression form, LINK files with several blocks) as a new drawing with one spectrum object per data block, the file kept byte for byte, and shows it in the window. Give the file as text, as base64 or as the absolute path of a .jdx, .dx or .jcamp file. Returns the drawing id and each spectrum's id, technique, nucleus and title, plus the reader's report.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `text` | string | no | The JCAMP-DX file as text, starting with ##TITLE= |
+| `base64` | string | no | The file's bytes as base64, instead of text |
+| `path` | string | no | Absolute path of a .jdx, .dx or .jcamp file, instead of text |
+| `name` | string | no | File name for the drawing's title, such as ir-ethyl-acetate.jdx |
+
+## spectrum_data
+
+The points of a spectrum object (measured or predicted) as the window draws them: x and y decimated to at most points values with min-max buckets so no peak is lost, the axis labels and units, the direction (decreasing: the largest x at the left, as for IR wavenumbers and NMR ppm), the view, the y mode (transmittance or absorbance), the observe frequency for NMR, the method (the JCAMP-DX reader, or the predictor and its version) and the reader's report. Does not change the drawing.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `from` | number | no | Range start in the x unit (cm-1, nm, m/z, ppm) |
+| `to` | number | no | Range end in the x unit |
+| `points` | integer | no | Most points to return (16 to 2000, default 200) |
+| `y_mode` | transmittance or absorbance | no | IR, Raman and UV-Vis only; default the spectrum's own |
+
+## spectrum_peaks
+
+The peaks, integrals and multiplets stored on a spectrum object, each with its id, position, label and the structure atoms it is linked to; with detect true it also runs FormChem's peak picker over the range and lists what it finds without adding anything. Does not change the drawing.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `detect` | boolean | no | Also list the peaks the picker finds |
+| `from` | number | no | Detection range start in the x unit |
+| `to` | number | no | Detection range end in the x unit |
+
+## spectrum_pick_peaks
+
+Finds the peaks of a spectrum in a range (default all of it) and adds them to its peak list as one undo step, skipping peaks already there: minima for transmittance, maxima otherwise, sticks above 1 percent of the base peak for MS, NMR lines above six times the noise.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `from` | number | no | Range start in the x unit |
+| `to` | number | no | Range end in the x unit |
+| `max` | integer | no | Most peaks to add (default 50) |
+| `threshold` | number | no | NMR detection floor in y units |
+| `prominence` | number | no | Smallest prominence in y units of the displayed mode |
+| `replace` | boolean | no | Replace the peak list instead of adding to it |
+
+## spectrum_integrate
+
+Adds NMR integrals over ranges as one undo step (trapezoid area after a straight baseline between the range ends), scaled like the existing integrals; with value the first new region reads value and the rest are rescaled. With id and value it renormalises an existing integral, for example to a proton count.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `from` | number | no | Range start in ppm |
+| `to` | number | no | Range end in ppm |
+| `ranges` | array of array | no | Several [from, to] pairs at once, instead of from and to |
+| `value` | number | no | What the (first new, or the id) integral should read |
+| `id` | string | no | An existing integral id to renormalise to value |
+
+## spectrum_export
+
+A spectrum as a fresh JCAMP-DX 5.01 file (with its peak table when it has peaks), as CSV of every point in display order, or with original true the imported file untouched. The file comes back as text. Does not change the drawing.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `format` | jdx or csv | no | Default jdx |
+| `original` | boolean | no | With jdx: the original imported file |
+
## convert
Converts structures between file formats with the same code as ./formchem convert: input is structure text or the absolute path of a file; the result comes back as text, or is written to output (an absolute path; writing outside the temporary folder asks the person the first time, and an existing file is never written over). Reads SD, SMILES, CXSMILES, InChI, molfile, RXN, reaction SMILES, RD, CML, CDXML, CDX and .fchem; writes smiles, cxsmiles, sdf, molfile, inchi, inchikey, cml, rxn, rsmiles and fchem. Failures are reported per record.
@@ -536,6 +696,101 @@ Draws a reaction scheme from reaction SMILES (reactants>agents>products) as one
| `y` | number | no | Top in points |
| `page` | string | no | Page id; default the first page |
+## build_3d
+
+Builds 3D coordinates for a structure from its 2D drawing as one undo step: ETKDGv3 embedding with a fixed seed (wedges, double-bond geometry and charges kept), then a force-field minimisation, stored as the fragment's one conformer. Answers with the energy, method and engine version, whether every drawn stereocentre was kept, clashes and warnings.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `minimise` | boolean | no | Minimise after embedding (default true) |
+| `method` | MMFF94 or MMFF94s or UFF | no | Force field (default MMFF94; UFF when MMFF94 has no parameters) |
+
+## conformers_3d
+
+Searches conformers of a structure as one undo step: an ETKDGv3 ensemble of n, near duplicates pruned by heavy-atom RMSD, each minimised, then those within window kcal/mol of the lowest, at most keep, replace the fragment's conformers; the lowest becomes the shown one. Answers with relative energies and Boltzmann populations at 298.15 K.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `n` | integer | no | Conformers to embed, 1 to 1000 (default 50) |
+| `window` | number | no | Energy window in kcal/mol (default 10) |
+| `keep` | integer | no | Most conformers kept, 1 to 200 (default 10) |
+| `method` | MMFF94 or MMFF94s or UFF | no | Force field (default MMFF94; UFF when MMFF94 has no parameters) |
+
+## minimise_3d
+
+Minimises a stored conformer (the shown one by default) with a force field as one undo step and reports the energy before and after, the RMS gradient and whether it converged. A structure without 3D coordinates is built first.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `conformer` | string | no | Conformer id (c...); default the shown one |
+| `method` | MMFF94 or MMFF94s or UFF | no | Force field (default MMFF94; UFF when MMFF94 has no parameters) |
+
+## scan_dihedral
+
+Relaxed scan of one dihedral: at each angle from start to end the four atoms' dihedral is held and everything else minimised; answers with angle against relative energy, the minimum and the barrier. Read-only unless store is true, which keeps one conformer per angle as one undo step.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `atoms` | array of string | yes | Four bonded atom ids in a row; a hydrogen at either end as a1:h0 |
+| `start` | number | no | First angle in degrees (default -180) |
+| `end` | number | no | Last angle in degrees (default 180) |
+| `step` | number | no | Step in degrees (default 10) |
+| `method` | MMFF94 or MMFF94s or UFF | no | Force field (default MMFF94; UFF when MMFF94 has no parameters) |
+| `store` | boolean | no | Keep each point as a conformer (default false) |
+
+## measure_3d
+
+Measures a stored conformer: two atoms give a distance in ångström, three an angle and four a signed dihedral in degrees. Atoms are fragment atom ids, hydrogens as a1:h0.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `atoms` | array of string | yes | Two to four atom ids |
+| `conformer` | string | no | Conformer id (c...); default the shown one |
+
+## open_3d_structure
+
+Opens a PDB, mmCIF, SDF or MOL file into a drawing as one undo step: PDB and mmCIF become a 3D object over the file kept byte for byte (cartoon for a protein, ligands as ball and stick, waters hidden, the main ligand focused); SDF and MOL records become structures whose file coordinates are kept as their conformer. Answers with the chains, ligands and waters found.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `path` | string | yes | Absolute path of the .pdb, .ent, .cif, .mmcif, .sdf or .mol file |
+| `as` | model or fragment | no | model (default for PDB and mmCIF) or fragment (default for SDF and MOL) |
+| `x` | number | no | Left in points; default free space |
+| `y` | number | no | Top in points; default free space |
+
+## extract_ligand
+
+Turns a ligand of a 3D object opened from a PDB or mmCIF file into a 2D structure beside it as one undo step: bond orders from a built-in template for common ligands, otherwise inferred from the geometry and reported; the file coordinates become its conformer. Answers with the new fragment id and its SMILES.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | The 3D object (o...); may be left out when the drawing has one |
+| `ligand` | string | no | Ligand key chain:het:number such as A:ATP:301, or a het code; default the main ligand |
+
+## export_3d
+
+Writes the 3D coordinates of a structure with every hydrogen as MOL (the shown conformer), SDF (every conformer, with energy and method data fields), PDB or XYZ; answers with the text, or writes it to output (never over an existing file).
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `format` | mol or sdf or pdb or xyz | no | Default sdf |
+| `conformer` | string | no | Conformer id, or all; default all for sdf, else the shown one |
+| `output` | string | no | Absolute path of a new file to write; left out, the text comes back |
+
## Resource
`formchem://guide` (text/markdown): what exists in this version, the tools, asking the person and errors.
diff --git a/.agents/skills/formchem-harness/sub-skills/drawing/SUB-SKILL.md b/.agents/skills/formchem-harness/sub-skills/drawing/SUB-SKILL.md
index bdb17e10..1bbf2bce 100644
--- a/.agents/skills/formchem-harness/sub-skills/drawing/SUB-SKILL.md
+++ b/.agents/skills/formchem-harness/sub-skills/drawing/SUB-SKILL.md
@@ -34,6 +34,7 @@ A reaction SMILES (`reactants>agents>products`, such as `CCO.CC(=O)O>[H+]>CC(=O)
| Which drawings are open | `list_open_documents` | id, title, path, unsaved changes, revision, fragments, formula, and `active` (what the window shows) |
| A new empty drawing | `new_document {title?}` | shown in the window; pass its id as `doc` from then on |
| Open a file | `open_document {path}` (absolute) | `.fchem`, molfile, SD, RXN, RD, SMILES, CXSMILES, CML, CDXML, CDX, InChI, or a picture FormChem exported with its drawing; the answer lists the objects and import notes; a file already open is not opened twice |
+| Open a PDB, mmCIF or 3D SD file | `open_3d_structure {path}` (absolute) | a 3D object over the file, or structures with their file coordinates, with the chains, ligands and waters listed (`three-d`) |
| Save | `save_document {doc?, path?}` | to its own file, to `path` (`.fchem` added), or to a free name in the Drawings folder; never over another existing file |
| Close | `close_document {doc?}` | refused while the drawing has unsaved changes: save first, or ask the person |
| Convert text or a file | `convert {input, to, output?, standardise?}` | the result comes back as text, or is written to a new `output`; failed records are listed |
@@ -47,7 +48,7 @@ A reaction SMILES (`reactants>agents>products`, such as `CCO.CC(=O)O>[H+]>CC(=O)
- **x and y are for layouts the person asked for.** Coordinates are points, x right, y down, the top-left of the new drawing. A note warns when that spot overlaps something; move it with `move` rather than drawing again.
- **One call, one step.** A wrong structure is removed with the person's Undo, Agent Activity's Undo, or `delete {ids}`; never by undoing the person's work.
- **Failed input leaves nothing.** When the text cannot be read, a drawing the call made is closed again and nothing is added. Fix the text once, or ask.
-- **Names are not read yet.** For "draw caffeine", write the SMILES yourself and say you did; if you are not sure of it, ask the person for one.
+- **Names go through `draw_from_name`.** For "draw caffeine" or a systematic name, use `draw_from_name` (`names-and-spectra`): it places and answers like `draw_from_smiles` and says how the name was read. Only when FormChem refuses the name, write the SMILES yourself, use `draw_from_smiles`, and say you did.
## Gate
diff --git a/.agents/skills/formchem-harness/sub-skills/names-and-spectra/SUB-SKILL.md b/.agents/skills/formchem-harness/sub-skills/names-and-spectra/SUB-SKILL.md
new file mode 100644
index 00000000..5a0e158e
--- /dev/null
+++ b/.agents/skills/formchem-harness/sub-skills/names-and-spectra/SUB-SKILL.md
@@ -0,0 +1,68 @@
+---
+name: names-and-spectra
+description: "Uses FormChem's 0.9.0 name, NMR prediction and spectrum tools: draw_from_name (a common or systematic name read offline, with method and confidence), name_structure (common and round-trip-checked systematic names), predict_nmr and predict_spectrum (FormChem increments 1H and 13C, journal line, multiplets linked to atoms), open_spectrum for JCAMP-DX files, and spectrum_data, spectrum_peaks, spectrum_pick_peaks, spectrum_integrate and spectrum_export, plus linking peaks to atoms with the window command. Use when the person asks an agent to draw a structure from its name, name a structure, predict or simulate an NMR spectrum, open a .jdx, .dx or .jcamp file, pick peaks, integrate, normalise integrals or export a spectrum in FormChem."
+---
+
+# Names and spectra
+
+## Purpose
+
+Draw from names and name what is drawn, predict NMR spectra, and work on measured spectra, quoting every name and number with the method and version FormChem gives it. Hands back the ids of what was drawn or added, the names or the journal line as FormChem returned them, and how they were made.
+
+## Preconditions
+
+`get_context` has been called (`session-and-connection`). `draw_from_name` needs no drawing (it makes one); `predict_spectrum` and the spectrum tools need a drawing that holds the structure or the spectrum. The writing tools (`draw_from_name`, `predict_spectrum`, `open_spectrum`, `spectrum_pick_peaks`, `spectrum_integrate`) ask the person the first time, like every changing tool.
+
+## Workflow 1: draw from a name
+
+1. **Call `draw_from_name {name}`.** Common names (aspirin, caffeine, THF, L-alanine, Taxol) come from FormChem's dictionary of 629 names; systematic IUPAC names (2,2,4-trimethylpentane, (2R)-butan-2-ol, ethyl propanoate, pyridine-3-carboxylic acid) from its parser. Placement, the write result and the one undo step are those of `draw_from_smiles` (`drawing`).
+2. **Read how it was read.** The text starts "Read [name] by [method] ([confidence] confidence, formchem names 0.9.0) as [SMILES]"; `structuredContent.read` holds `method`, `confidence`, `engine`, `version` and `warnings`. Medium confidence means something was assumed ("propanol" drawn as propan-1-ol) or the name has two readings: say which, quoting the note, and ask the person if it matters.
+3. **On a refusal**, nothing was drawn. The error says why: a character where reading stopped, an inverted index name ("Benzene, 1,2-dichloro-": rewrite it as 1,2-dichlorobenzene), D- or L- outside the dictionary, an impossible structure or locant. Correct an obvious spelling once and retry; otherwise write the SMILES yourself, use `draw_from_smiles`, and say that you did and why.
+4. **Check** with `visual-qa` when the person cares about the exact isomer: compare the InChIKey with one you trust.
+
+## Workflow 2: name a structure
+
+`name_structure {object}` (or `{selection: true}`, `{smiles}`, or nothing for every fragment) answers per structure the common name (`kind: trivial`, method dictionary) and the systematic name (`kind: systematic`, method rule-based namer, round-trip checked), each with its confidence, engine and version. A systematic name is listed only when it parses back to the same InChIKey; otherwise the answer gives the reason (salts and mixtures, unlisted ring systems, stereocentres outside the parent chain). Quote the reason; never invent a systematic name FormChem did not give, and say a name you write yourself is yours.
+
+## Workflow 3: predict NMR
+
+1. **Numbers only:** `predict_nmr {object, nucleus: "1H" | "13C" | "both", frequency?}` (or `{smiles}`) changes nothing. Quote the journal line as given, for example "1H NMR (400 MHz, predicted, FormChem increments 0.9.0): δ 4.10 (q, J = 7.0 Hz, 2H), 2.05 (s, 3H), 1.25 (t, J = 7.0 Hz, 3H)." `signals` add per signal `confidence`, `uncertainty` (ppm), `atoms` and `terms` (the increments behind the shift, for "why is this at 4.10").
+2. **A spectrum on the page:** `predict_spectrum {object, nucleus}` adds one spectrum object beside the structure as one undo step, its multiplets and integrals (1H) or peaks (13C) already linked to atoms. Predict 13C with a second call.
+3. **Say what it is.** Predicted values from FormChem's own increment rules, not measured data and not a database. On molecules it was not tuned on the mean error is about 0.09 ppm (1H) and 1.1 ppm (13C); low-confidence atoms (exchangeable OH and NH, charged atoms, unusual elements) and the warnings (`nmr_exchangeable`, `nmr_diastereotopic`, `nmr_second_order`, `nmr_rotamer`) must be passed on, not dropped.
+4. **After the structure changes,** the predicted curve follows by itself but the multiplets, integrals and peaks do not: tell the person to use Analysis > Refresh Predicted Spectrum, or run `run_command {id: "nmr-refresh"}` while that spectrum is selected or open in the Spectrum editor.
+
+## Workflow 4: measured spectra
+
+| Goal | Call | Notes |
+| --- | --- | --- |
+| Open a JCAMP-DX file | `open_spectrum {path}` (absolute `.jdx`, `.dx` or `.jcamp`), or `{text}` or `{base64}` with `name` | always a new drawing, one spectrum per block, shown in the window; read the `report` lines (repairs, blocks left out) and pass them on |
+| Read it | `spectrum_data {object, from?, to?, points?}` | at most 2000 points (default 200); `direction: decreasing` means the largest x is at the left (IR, NMR); `method` names the reader or the predictor |
+| See what is marked | `spectrum_peaks {object}` | peaks, integrals and multiplets with atom links; `detect: true` lists what the picker would find without adding it |
+| Pick peaks | `spectrum_pick_peaks {object, from?, to?, max?}` | one undo step; peaks already there are skipped and counted; IR in transmittance picks dips |
+| Integrate (NMR) | `spectrum_integrate {object, from, to, value?}`, or `ranges`, or `{id, value}` to renormalise | one undo step; a value rescales every integral, so set the proton count on a clean multiplet first |
+| Link a peak to atoms | `run_command {id: "link-peak-to-atoms", params: {object, peak, fragment, atoms}}` | no MCP tool links; atom ids come from `get_atoms` |
+| Export | `spectrum_export {object, format, original?}` with format `jdx` or `csv` | the file comes back as text; nothing is written |
+
+The data route never invents points: for a predicted spectrum it recomputes from the structure, for a measured one it decimates the file with min-max buckets so no peak is lost. Insert a file into an existing drawing only through the window (Insert > Spectrum from File, `run_command {id: "open-spectrum", params: {path}}`).
+
+## Rules
+
+- **Method and version travel with the value.** Every name, shift and spectrum you report names how FormChem made it; FormChem names 0.9.0 and FormChem increments 0.9.0 at this version.
+- **Refusals are answers.** A refused name or an absent systematic name is reported with its reason, not papered over.
+- **Predicted is not measured.** Never present a predicted shift as an experimental value, and never compare a prediction with a measured spectrum without saying which is which.
+- **One call, one undo step.** Each drawing, prediction, pick or integration is one step the person can undo.
+
+## Gate
+
+- [ ] Every name or shift reported was quoted from a tool answer with its method, confidence where given, and version.
+- [ ] A refused name led to one correction or to SMILES the agent declared as its own, never to a silent substitution.
+- [ ] Predicted values were labelled predicted, and low-confidence atoms and warnings were passed on.
+- [ ] Spectrum changes (peaks, integrals, predicted spectra) were one call each, and the handoff says how to undo them.
+
+## Hands back
+
+The drawing id and the new object or spectrum ids, the names or journal lines as FormChem returned them with their method and version, the warnings and report lines that matter, and a ready handoff.
+
+## Owned resources
+
+None of its own. `references/tools.md` at the pack root lists every argument; `drawing` covers placement and the write result, `visual-qa` the InChIKey check, `window-commands` the spectrum commands of the Analysis menu.
diff --git a/.agents/skills/formchem-harness/sub-skills/session-and-connection/SUB-SKILL.md b/.agents/skills/formchem-harness/sub-skills/session-and-connection/SUB-SKILL.md
index 52f3dc6f..9c8d91bd 100644
--- a/.agents/skills/formchem-harness/sub-skills/session-and-connection/SUB-SKILL.md
+++ b/.agents/skills/formchem-harness/sub-skills/session-and-connection/SUB-SKILL.md
@@ -52,5 +52,5 @@ Agents started from FormChem's own Claude Code, Codex, Cursor or Antigravity tab
## Gate
- [ ] `get_context` was the first call.
-- [ ] The plan uses only the 42 tools in the pack root's `references/tools.md` and the commands and extensions they report.
+- [ ] The plan uses only the 60 tools in the pack root's `references/tools.md` and the commands and extensions they report.
- [ ] No change was attempted after a refusal or a stop, and the agent token never appeared in a reply or a note.
diff --git a/.agents/skills/formchem-harness/sub-skills/structure-analysis/SUB-SKILL.md b/.agents/skills/formchem-harness/sub-skills/structure-analysis/SUB-SKILL.md
index f5e60860..03da30fa 100644
--- a/.agents/skills/formchem-harness/sub-skills/structure-analysis/SUB-SKILL.md
+++ b/.agents/skills/formchem-harness/sub-skills/structure-analysis/SUB-SKILL.md
@@ -22,7 +22,7 @@ Answer chemistry questions about the drawing with FormChem's own numbers, quoted
| Stereo | `stereo {doc?, object?}` | centres, double bonds and axes with label, `state` (defined, undefined, unknown) and group (`abs`, `and1`, `or1`), the stereo groups, the chiral flag and CXSMILES |
| Substructure | `substructure {doc?, smarts or query_object, objects?, chirality?, max_hits?}` | hits with the fragment id, matched atom and bond ids and the query-to-target map; `count`, `truncated` |
-From 0.8.0 `compute_properties` and `validate` are the same answers as `properties` and `check_structure` under the spec's names, and they take the drawing the window shows when `doc` is left out; `validate` adds `valid`. To set R or S on a centre, or E or Z on a double bond, by id, use `set_stereo` (`edit-by-id`), then read it back with `stereo`.
+From 0.8.0 `compute_properties` and `validate` are the same answers as `properties` and `check_structure` under the spec's names, and they take the drawing the window shows when `doc` is left out; `validate` adds `valid`. To set R or S on a centre, or E or Z on a double bond, by id, use `set_stereo` (`edit-by-id`), then read it back with `stereo`. From 0.9.0 `name_structure` gives the common and the round-trip-checked systematic name and `predict_nmr` the predicted 1H and 13C shifts, both read only, each value with its method and version (`names-and-spectra`).
`doc` may be left out when one drawing is open (the four 0.6.0 tools need it when several are open); `object` left out means every fragment. `structuredContent` carries the same JSON as the engine's `/api/analysis` routes. The isotope pattern has no tool: it is in the person's Analysis panel (`show-analysis`).
diff --git a/.agents/skills/formchem-harness/sub-skills/three-d/SUB-SKILL.md b/.agents/skills/formchem-harness/sub-skills/three-d/SUB-SKILL.md
new file mode 100644
index 00000000..01f82aa8
--- /dev/null
+++ b/.agents/skills/formchem-harness/sub-skills/three-d/SUB-SKILL.md
@@ -0,0 +1,66 @@
+---
+name: three-d
+description: "Uses FormChem's 0.10.0 3D tools: build_3d (a conformer from the 2D drawing with ETKDGv3 and MMFF94, MMFF94s or UFF, with the stereo check), conformers_3d (an ensemble in an energy window with populations), minimise_3d, scan_dihedral (a relaxed scan with its barrier), measure_3d (distance, angle, dihedral), open_3d_structure (PDB, mmCIF, SDF, MOL), extract_ligand and export_3d (MOL, SDF, PDB, XYZ), plus the 3D window commands for styles, surfaces and PNG or glTF. Use when the person asks an agent to make a structure 3D, find its conformers or lowest-energy shape, minimise it, scan a torsion, measure a bond length or angle, open a PDB or mmCIF file, pull a ligand out of a protein, or save 3D coordinates in FormChem, and to check that a 3D geometry kept the drawn stereo."
+---
+
+# Three-d
+
+## Purpose
+
+Turn drawn structures into 3D geometry FormChem stores in the drawing, work on that geometry, and open protein files, quoting every energy and measurement with the force field and engine version FormChem gives it. Hands back the fragment and conformer ids, the numbers as returned with their method, the stereo check, and what the person can see in the 3D View.
+
+## Preconditions
+
+`get_context` has been called (`session-and-connection`), and the structure is drawn (`drawing`, `edit-by-id`, `names-and-spectra`). `build_3d`, `conformers_3d`, `minimise_3d`, `open_3d_structure` and `extract_ligand` ask the person the first time; `scan_dihedral` only with `store: true`; `export_3d` only when it writes a file outside the temporary folder; `measure_3d` never asks.
+
+## How 3D is held
+
+A structure's 3D coordinates are its `conformers`, each with an id (`c...`), an energy in kcal/mol, a `method` (`ETKDG` when only embedded, `MMFF94`, `MMFF94s`, `UFF`, or `file` when read from a file) and `converged`; `conformer` names the shown one. Atoms are the fragment atom ids from `get_atoms`; a hydrogen is `a1:h0` (the first hydrogen of `a1`), an atom inside an expanded abbreviation `a5:x0`. Any later edit to the structure's atoms or bonds (element, charge, bond order, wedge, adding or deleting) removes its conformers in the same undo step; moves and colours keep them. So: finish editing, then build.
+
+## Workflow 1: build and check
+
+1. **Call `build_3d {object}`** (`object` may be left out when the drawing has one structure). ETKDGv3 with a fixed seed, then MMFF94 unless `method` says otherwise or `minimise: false`. One undo step.
+2. **Read the stereo line.** The text says "all N stereo labels kept (a3 R, b2 E, ...)" or "stereo changed: lost ...". `report.stereo` has `expected`, `found`, `kept`, `lost`. Lost stereo means the 3D structure is not the drawn one: say so, do not use the geometry, and check the drawing's wedges with `stereo` or `get_atoms`.
+3. **Read the rest.** The energy with its method and engine (`ETKDGv3+MMFF94 (rdkit 2025.09.3)`), the clash count, and the notes: `unspecified_stereo` (centres without wedges: one arbitrary isomer was built; tell the person), `enhanced_stereo` (the drawn member of an AND or OR group was built), `uff_fallback` (no MMFF94 parameters, UFF used: name it), `embed_retry`.
+4. **Verify geometry when it matters** with `measure_3d {atoms: [a, b]}`: a C-O single bond reads about 1.42 Å, C-C about 1.53 Å, aromatic C-C about 1.39 Å. A value far off those means something is wrong with the structure, not with the ruler.
+
+## Workflow 2: conformers, minimisation, scans
+
+| Goal | Call | Notes |
+| --- | --- | --- |
+| Lowest-energy shape, ensemble | `conformers_3d {object, n?, window?, keep?, method?}` | defaults 50, 10 kcal/mol, 10 kept; one undo step; the lowest is shown. Quote relative energies and populations (Boltzmann at 298.15 K over the kept set only). Rotamers that differ only in hydrogens merge, so ethanol keeps one |
+| Tighten a geometry | `minimise_3d {object, conformer?, method?}` | energy before and after, RMS gradient, `converged` (gradient at or below 0.01 kcal/mol/Å); builds first when there is no conformer |
+| Rotational profile | `scan_dihedral {object, atoms: [four bonded in a row], start?, end?, step?}` | relaxed: the angle is held, the rest minimised; answers the minimum and the barrier. Reads only; `store: true` keeps one conformer per angle as one undo step |
+| A distance, angle or dihedral | `measure_3d {object, atoms: [2 to 4], conformer?}` | Å with 3 decimals, degrees with 1; dihedrals signed -180 to 180 |
+
+MMFF94 energies compare conformers of one structure under one force field. They are not heats of formation and do not compare across structures, compositions or force fields. Say that when a person compares them.
+
+## Workflow 3: protein files and ligands
+
+1. **Call `open_3d_structure {path}`** with an absolute `.pdb`, `.ent`, `.cif` or `.mmcif` path. One undo step: a 3D object (`o...`) over the file kept byte for byte, cartoon for a protein, ligands ball and stick, waters hidden, the primary ligand focused. Read the chains, ligand keys (`A:ATP:301`) and the reader's warnings and pass them on. An `.sdf` or `.mol` opens as structures whose conformers are the file's coordinates (method `file`).
+2. **Call `extract_ligand {object?, ligand?}`** with a key or het code, or nothing for the primary ligand. The answer gives the new fragment id and its SMILES, and whether bond orders came "from the template table" (30 common ligands) or were "inferred from the geometry". Say which; an inferred ligand's SMILES needs the person's eye.
+3. **Check it** like any structure (`visual-qa`): `get_structure` and `validate` on the new fragment.
+
+## Workflow 4: export and show
+
+- `export_3d {object, format, conformer?, output?}`: MOL (the shown conformer), SDF (default; every conformer, with energy and method data fields), PDB or XYZ, every hydrogen included. Without `output` the text comes back; with an absolute `output` it writes a new file and never overwrites.
+- Styles, surfaces and pictures are window commands (`window-commands`): `view-3d` opens the 3D View on the selection, then `style-wire`, `style-stick`, `style-ballstick`, `style-spacefill`, `style-cartoon`, `surface-vdw`, `surface-sas`, `surface-ses`, `surface-esp`, `surface-none`; `insert-3d-view` places a 3D view on the page; `export-3d-png` and `export-gltf` save for the person (the agent gets no file). ESP is approximate, from empirical Gasteiger charges, and off for PDB models.
+- `render` shows the page's 3D object as its stored picture, not a live view.
+
+## Rules
+
+- **Method and version travel with the number.** Every energy, barrier, population and measurement names its force field and engine version as FormChem gave them.
+- **Stereo before geometry.** A build is usable only when its stereo line says every label was kept.
+- **Build after editing.** An edit to atoms or bonds drops the conformers; rebuild rather than reuse numbers from before the edit.
+- **No quantum claims.** FormChem has no xtb, CREST or other quantum method; do not describe a force-field energy as anything more.
+
+## Gate
+
+- [ ] Every build reported its stereo line, and a lost label stopped the work with the reason.
+- [ ] Every energy, barrier and measurement was quoted from a tool answer with its method and engine version.
+- [ ] Inferred ligand bond orders and unspecified stereocentres were passed on to the person.
+- [ ] Each changing call was one undo step, and the handoff says what the person will see in the 3D View or on the page.
+
+## Hands back
+
+Fragment, conformer and 3D object ids; the energies, measurements, stereo check and warnings as returned; what was opened, extracted or exported and where.
diff --git a/.agents/skills/formchem-harness/sub-skills/visual-qa/SUB-SKILL.md b/.agents/skills/formchem-harness/sub-skills/visual-qa/SUB-SKILL.md
index 0d6e998e..d46fecae 100644
--- a/.agents/skills/formchem-harness/sub-skills/visual-qa/SUB-SKILL.md
+++ b/.agents/skills/formchem-harness/sub-skills/visual-qa/SUB-SKILL.md
@@ -22,6 +22,12 @@ A drawing exists and its ids are known (from a draw or edit answer, `get_structu
| Is it chemically valid? | `validate {object?}` | `valid`, then each issue's `code`, `severity`, `text`, `atoms`, `bonds` |
| What are its properties? | `compute_properties {object?}` | each value with its `method`; quote both |
| The molfile, InChI or masses | `get_structure {object}` | `molfile` and `molfile_version` (V3000 only when the structure needs it), `inchi`, `mw`, `exact_mass`, `mz` for charged structures |
+| Did a name draw the right isomer? | the `draw_from_name` answer, then `get_structure {object}` | `read.method` and `read.confidence`; compare the InChIKey with one you trust, the second block for stereo |
+| What is it called? | `name_structure {object}` | each name's `kind`, `method` and `confidence`, or the `reason` there is none |
+| Does a spectrum show what was asked? | `spectrum_peaks {object}`, `render {ids}` | peak, integral and multiplet positions with their atom links; the picture for labels and axes |
+| Did a 3D build keep the drawn stereo? | the `build_3d` answer | the stereo line and `report.stereo` (`kept`, `lost`); `clashes`; the notes (`unspecified_stereo`, `uff_fallback`) |
+| Is a 3D geometry plausible? | `measure_3d {atoms}` on bonds you know | C-O about 1.42 Å, C-C about 1.53 Å, aromatic C-C about 1.39 Å; quote the value with its method (`three-d`) |
+| Is an extracted ligand right? | the `extract_ligand` answer, then `validate {object}` and `get_structure {object}` | `bonds` (`template` or `perceived`) and the SMILES; a perceived ligand is shown to the person |
| What did the person select? | `get_structure {selection: true}` or `render {scope: "selection"}` | needs the window open |
| Did a window command work? | the `run_command` answer, then `list_commands {id}` | `checked` for toggles, `off now` with its reason |
diff --git a/.agents/skills/formchem-harness/sub-skills/window-commands/SUB-SKILL.md b/.agents/skills/formchem-harness/sub-skills/window-commands/SUB-SKILL.md
index f27eb4fe..f18eede1 100644
--- a/.agents/skills/formchem-harness/sub-skills/window-commands/SUB-SKILL.md
+++ b/.agents/skills/formchem-harness/sub-skills/window-commands/SUB-SKILL.md
@@ -1,6 +1,6 @@
---
name: window-commands
-description: "Runs the FormChem window's own commands through run_command for what the 0.8.0 drawing tools do not cover: finding commands with list_commands, opening a .fchem or structure file by path with open-recent, inserting a structure with insert-smiles {smiles} or a template with insert-template {id}, undo and redo, select-all, delete, duplicate, flips, rotate-90, align, distribute, stacking order, group and ungroup, clean-structure, layout-structure, check-structure, the 0.6.0 chemistry commands, the 0.7.0 import, export, print, copy, standardise, scale, grid and dark page commands, zoom and the Analysis panel, reading params and off-now states, and telling the person what only they can do. Use when the person asks an agent to open, import, insert, tidy, arrange, resize, export, copy, undo or save something in FormChem, or asks which drawing commands exist."
+description: "Runs the FormChem window's own commands through run_command for what the drawing, name, spectrum and 3D tools do not cover: finding commands with list_commands, opening a file by path with open-recent, insert-smiles {smiles}, insert-name {name}, insert-template {id}, undo and redo, select-all, delete, duplicate, flips, rotate-90, align, distribute, stacking order, groups, clean-structure, layout-structure, check-structure, the chemistry commands, import, export, print, copy, standardise, scale, grid and dark page, the spectrum and NMR commands (link-peak-to-atoms, open-spectrum, nmr-refresh), the 3D commands (view-3d, insert-3d-view, style-ballstick, surface-esp, export-gltf), zoom and the Analysis panel, reading params and off-now states, and telling the person what only they can do. Use when the person asks an agent to open, import, insert, tidy, arrange, resize, export, copy, undo or save something in FormChem, show it in 3D, or asks which drawing commands exist."
---
# Window commands
@@ -27,7 +27,9 @@ Most canvas commands act on the canvas selection. The agent sets the selection t
| Draw or insert a structure from SMILES | Use `draw_from_smiles` (`drawing`): it places the structure in free space and answers with its SMILES, InChIKey and a picture. `run_command {id: "insert-smiles", params: {smiles}}` still works when the person wants it in the middle of the view and selected, so the next selection command acts on it; the answer names the new fragment ids |
| Insert a ring, amino acid, sugar, protecting group, reagent or glassware | `run_command {id: "insert-template", params: {id: "[template id]"}}`: one undo step, centred in view at the drawing's bond length, selected; without `id` it opens the library for the person. Ids such as `benzene`, `l-alanine` come from the engine's `GET /api/templates` |
| Draw by atoms; place an arrow, a caption or text | The edit tools do it by id (`edit-by-id`): `add_atom`, `add_bond`, `add_arrow`, `add_text`. Shapes, brackets and tables have no tool and no drawing command (insert-arrow, insert-shape and insert-table only pick the person's tool): ask the person |
-| Draw from a name | Not yet in any version up to 0.8.0: write the SMILES and use `draw_from_smiles`, saying you did |
+| Draw from a name | Use `draw_from_name` (`names-and-spectra`). `run_command {id: "insert-name", params: {name}}` inserts it the window's way (centred like a template, selected); without `name` it opens Structure from Name for the person. `copy-name` puts the selection's name on the person's clipboard |
+| Spectrum commands: edit, pick peaks, integrate, link a peak, y axis, export, predict, refresh | Prefer the spectrum and NMR tools (`names-and-spectra`). The commands remain for what they add: `link-peak-to-atoms {object, peak, fragment, atoms}` (no tool links), `open-spectrum {path}` (inserts a file into the open drawing), `spectrum-y-mode {object, mode}`, `edit-spectrum` (opens the Spectrum editor for the person), `nmr-refresh` (with a predicted spectrum selected) |
+| Show it in 3D, change the 3D style or surface, put a 3D view on the page, save a 3D picture | Build and measure with the 3D tools (`three-d`). Then `view-3d` (opens the 3D View on the selection), `style-wire`, `style-stick`, `style-ballstick`, `style-spacefill`, `style-cartoon`, `surface-none`, `surface-vdw`, `surface-sas`, `surface-ses`, `surface-esp` (on only while the 3D View is open), `insert-3d-view` (a 3D object beside the selected structure), `export-3d-png {transparent}` and `export-gltf` (saved for the person). `export-3d-file {format, all}` saves MOL, SDF, PDB or XYZ for the person; `export_3d` gives the agent the text |
| Stack or group objects | `bring-front`, `bring-forward`, `send-backward`, `send-back`, `group`, `ungroup` on the selection; off with "Select something on the canvas first" when nothing is selected |
| Anything about the reaction in the drawing | Load `reactions` |
| Undo the last change | `run_command {id: "undo"}`: one transaction, whoever made it |
diff --git a/.agents/skills/formchem-harness/sub-skills/window-commands/references/command-catalogue.md b/.agents/skills/formchem-harness/sub-skills/window-commands/references/command-catalogue.md
index dc93e5af..929cca42 100644
--- a/.agents/skills/formchem-harness/sub-skills/window-commands/references/command-catalogue.md
+++ b/.agents/skills/formchem-harness/sub-skills/window-commands/references/command-catalogue.md
@@ -1,6 +1,6 @@
# Commands that touch a drawing
-The window's command registry, as far as it concerns drawings, for FormChem 0.8.0 (the commands are those of 0.7.0, plus `agent-activity`, which opens Window > Agent Activity for the person). From 0.8.0 the agent's own tools draw, edit, read back, render and convert; this page covers what the window's commands add. This page is a map, not the authority: `list_commands` is. A command marked `off now` there is not available in the running build, whatever this page says, and a command that lists `params` there takes exactly those.
+The window's command registry, as far as it concerns drawings, for FormChem 0.10.0 (the commands of 0.7.0, plus `agent-activity` from 0.8.0, which opens Window > Agent Activity for the person, plus the name, spectrum and NMR commands of 0.9.0, plus the 3D commands of 0.10.0). From 0.8.0 the agent's own tools draw, edit, read back, render and convert; this page covers what the window's commands add. This page is a map, not the authority: `list_commands` is. A command marked `off now` there is not available in the running build, whatever this page says, and a command that lists `params` there takes exactly those.
## Contents
@@ -12,6 +12,8 @@ The window's command registry, as far as it concerns drawings, for FormChem 0.8.
- Stereo, queries and analysis
- Import, export, print and the clipboard
- Standardise and size on the sheet
+- Names, spectra and NMR prediction
+- 3D
- The canvas, the view and the grid
- Registered but off until a later version
- What no command does yet
@@ -106,7 +108,7 @@ From 0.7.0. Exports and copies act on the selection where the command says so, e
| Command | Params | What it does |
| --- | --- | --- |
-| `import` | `path` (absolute, optional) | inserts a chemistry file, a `.fchem` drawing or a picture with its FormChem drawing into the active drawing (a new one when none is open), in free space right of or below what is there, selected, one undo step per file, with the import report for the person; an SD file brings at most 50 structures. The answer names what came in. Without `path` the person picks files in a dialog |
+| `import` | `path` (absolute, optional) | inserts a chemistry file (from 0.10.0 also PDB and mmCIF, as a 3D object), a `.fchem` drawing or a picture with its FormChem drawing into the active drawing (a new one when none is open), in free space right of or below what is there, selected, one undo step per file, with the import report for the person; an SD file brings at most 50 structures. The answer names what came in. Without `path` the person picks files in a dialog |
| `export-png`, `export-svg`, `export-pdf`, `export-eps` | | save the whole page as a picture with the drawing kept inside (300 dpi PNG by default); the desktop app shows the person's save dialog, a browser downloads |
| `export-picture` | | opens the Export Picture dialog for the person (format, scope, resolution, background, scale, margin) |
| `export-cdxml`, `export-mol`, `export-smiles` | | save the page as CDXML, molfile or SMILES; warn and error report items show to the person |
@@ -128,6 +130,46 @@ The agent never receives the saved file or the clipboard text. To read a structu
Zoom never changes the drawing; use these when the person wants a structure larger.
+## Names, spectra and NMR prediction
+
+From 0.9.0. The MCP tools `draw_from_name`, `name_structure`, `predict_nmr`, `predict_spectrum` and the spectrum tools do most of this with answers an agent can read (`names-and-spectra`); these commands are the window's own route. Spectrum commands take `object` and otherwise use the selected spectrum, then the one open in the Spectrum editor, then the only spectrum on the page.
+
+| Command | Params | What it does |
+| --- | --- | --- |
+| `insert-name` | `name` (optional) | reads the name offline and inserts the structure like a template, selected, one undo step; without `name` it opens Structure from Name for the person |
+| `copy-name` | `kind` (`trivial` or `systematic`, optional) | the selection's name on the person's clipboard (Edit > Copy Name) |
+| `predict-nmr-1h`, `predict-nmr-13c` | `object` (fragment id), `frequency` (optional) | a predicted spectrum beside the selected structure, or the only one on the page, one undo step; off with two structures and none selected |
+| `nmr-refresh` | `object` (predicted spectrum id, optional) | moves a predicted spectrum's multiplets, integrals or peaks to match an edited structure, one undo step; on only while a predicted spectrum is selected or open in the Spectrum editor |
+| `open-spectrum` | `path` (absolute `.jdx`, `.dx` or `.jcamp`, optional) | inserts a file's spectra into the open drawing, one undo step per file; without `path` the person picks a file |
+| `edit-spectrum` | `object` | opens the Spectrum editor for the person |
+| `pick-peaks` | `object`, `from`, `to`, `threshold`, `replace` (all optional) | picks peaks in the range (default the range shown), one undo step |
+| `integrate` | `object`, `from`, `to`, `value` | an NMR integral over the range, one undo step; without `from` and `to` it switches the editor to its integrate tool for the person |
+| `link-peak-to-atoms` | `object`, `peak`, `fragment`, `atoms` (list of atom ids) | links a peak, integral or multiplet to atoms of one structure, one undo step; without `atoms` it uses the selected atoms or waits for the person's clicks. The only agent route to atom links |
+| `unlink` | `object`, `peak` | removes a mark's atom link, one undo step |
+| `spectrum-y-mode` | `object`, `mode` (`transmittance` or `absorbance`; leave out to toggle) | IR, Raman and UV-Vis y axis, one undo step |
+| `export-spectrum` | `object`, `format` (`jdx` or `csv`), `original`, `path` (optional) | saves the spectrum for the person, or to `path`; the agent's own copy comes from `spectrum_export` |
+
+## 3D
+
+From 0.10.0, group `3D`. Building, conformers, minimising, scans, measuring, opening and extracting also have MCP tools (`three-d`); prefer them, because they answer with the numbers. The commands add the 3D View panel, its styles and surfaces, and the files saved for the person. Commands marked "while the 3D View is open" are off with "Open the 3D View first" otherwise.
+
+| Command | Params | What it does |
+| --- | --- | --- |
+| `view-3d` | | opens the 3D View panel on the selected structure or 3D object and follows the selection (Mod+3; checked while open); running it again with no 3D object selected closes it |
+| `build-3d` | | builds a conformer of the selected structure with the panel's force field, one undo step (`build_3d` answers with the stereo check) |
+| `minimize-3d` | | minimises the shown conformer, one undo step |
+| `conformers` | `n` (1 to 1000), `window` (kcal/mol), `method` (`MMFF94`, `MMFF94s`, `UFF`) | a conformer search without the dialog; without `n` it opens the Conformers dialog for the person |
+| `dihedral-scan` | | opens the Dihedral Scan dialog on the four atoms picked in the panel, for the person (while the 3D View is open) |
+| `measure-3d` | `atoms` (two to four ids: `a1`, `a1:h0`, or PDB serial numbers) | measures in the panel and lists it (kept on a bound 3D object); answers `{kind, value, atoms}`; without `atoms` it switches the panel to picking (while the 3D View is open) |
+| `insert-3d-view` | | places a 3D object beside the selected structure (building first when it has no conformer) and binds the panel to it, one undo step |
+| `open-3d-structure` | | the person picks a PDB, mmCIF, SDF or MOL file; it is placed as a 3D object or as structures. For an agent, `open_3d_structure {path}` |
+| `extract-ligand` | `ligand` (`A:ATP:301` or a het code, optional) | a ligand of the selected (or bound) PDB or mmCIF model as a structure beside it, one undo step; without `ligand` and with several ligands it asks the person |
+| `style-wire`, `style-stick`, `style-ballstick`, `style-spacefill`, `style-cartoon` | | the panel's display style; on a bound 3D object the style, picture and camera are saved, one undo step per burst (while the 3D View is open) |
+| `surface-none`, `surface-vdw`, `surface-sas`, `surface-ses`, `surface-esp` | | the panel's surface; ESP colours it by approximate Gasteiger charges, off for PDB models (while the 3D View is open) |
+| `export-3d-png` | `transparent` (boolean) | saves the 3D View as PNG for the person (while the 3D View is open) |
+| `export-gltf` | | saves the 3D View as binary glTF (`.glb`) for the person (while the 3D View is open) |
+| `export-3d-file` | `format` (`mol`, `sdf`, `pdb`, `xyz`), `all` (every conformer) | saves the selected structure's 3D coordinates for the person, or a PDB or mmCIF model's original file; without `format` it opens the dialog. For text the agent reads, `export_3d` |
+
## The canvas, the view and the grid
| Command | What it does |
@@ -149,8 +191,8 @@ Zoom never changes the drawing; use these when the person wants a structure larg
## Registered but off until a later version
-`insert-name` (0.9.0); the 3D commands `view-3d`, `build-3d`, `minimize-3d`, `conformers` (0.10.0); `demos` (0.13.0). Every 0.7.0 placeholder is now a working command. Running an off one returns "is not available right now: Arrives in [version]". Say so; do not retry.
+`demos` (0.13.0). Every 0.7.0, 0.9.0 and 0.10.0 placeholder is now a working command (`insert-name`, `view-3d`, `build-3d`, `minimize-3d` and `conformers` among them). Running an off one returns "is not available right now: Arrives in [version]". Say so; do not retry.
## What no command does yet
-Selecting particular atoms or objects, typing stoichiometry amounts, and filling the person's dialogs (atom list, R-group, abbreviation label). Drawing atoms, bonds, arrows and text at given positions, reading the structure back, rendering and converting are not commands: the 0.8.0 tools do them (`drawing`, `edit-by-id`, `visual-qa`). An installed extension with the `document` permission can also read and change the drawing (`extension-drawings`).
+Selecting particular atoms or objects, typing stoichiometry amounts, and filling the person's dialogs (atom list, R-group, abbreviation label). Drawing atoms, bonds, arrows and text at given positions, reading the structure back, rendering and converting are not commands: the 0.8.0 tools do them (`drawing`, `edit-by-id`, `visual-qa`). Reading a spectrum's points, its peaks or the predicted shifts as data is not a command either: the 0.9.0 tools do it (`names-and-spectra`). Nor is reading conformer energies, a scan profile or a 3D measurement as data, or 3D coordinates as text: the 0.10.0 tools do it (`three-d`). Picking atoms in the 3D View, choosing the shown conformer and running a scan from the dialog belong to the person. An installed extension with the `document` permission can also read and change the drawing (`extension-drawings`).
diff --git a/.agents/skills/formchem-skillset/EVALS.json b/.agents/skills/formchem-skillset/EVALS.json
index 95dd8f8c..3b0745e9 100644
--- a/.agents/skills/formchem-skillset/EVALS.json
+++ b/.agents/skills/formchem-skillset/EVALS.json
@@ -1,6 +1,6 @@
{
"skill_name": "formchem-skillset",
- "notes": "Run in a FormChem checkout at 0.8.0 with CLAUDE.md present. Expected behaviours are observable in the files read, the edits made and the commits.",
+ "notes": "Run in a FormChem checkout at 0.10.0 with CLAUDE.md present. Expected behaviours are observable in the files read, the edits made and the commits.",
"evals": [
{
"id": 1,
@@ -212,6 +212,97 @@
"Keeps undone true while the call's transaction is not back on the undo stack, rather than reading the redo stack alone",
"Leaves the window mirror (app/agent-calls.ts) to follow the engine's agentCall messages instead of computing undone itself"
]
+ },
+ {
+ "id": 20,
+ "name": "add-a-dictionary-entry",
+ "prompt": "FormChem does not know the name 'sulfanilamide'; add it.",
+ "files": [],
+ "expected_behavior": [
+ "Loads the names-and-spectra sub-skill and clean-room, and adds one entry by hand to the right file under backend/app/data/names/ (drugs.json) with name, a SMILES it wrote itself and the standard InChIKey computed with RDKit",
+ "Runs dictionary.verify() from backend/ and reports that problems is empty and the entry count went up by one",
+ "Does not copy the entry from a database or another program's list, and writes no test file"
+ ]
+ },
+ {
+ "id": 21,
+ "name": "add-a-ring-parent",
+ "prompt": "Make FormChem read and write names on the thiadiazole ring (1,3,4-thiadiazole).",
+ "files": [],
+ "expected_behavior": [
+ "Adds a Ring to services/names/rings.py whose SMILES atom order follows the IUPAC numbering of 1,3,4-thiadiazole, with its aliases",
+ "Checks both directions in a scratch shell: a substituted name parses to the expected InChIKey, and naming that structure round-trips to the same InChIKey",
+ "Records the decision in backend/HASHOUT_LOG.md and updates the ring list in docs/NAMES.md"
+ ]
+ },
+ {
+ "id": 22,
+ "name": "tune-an-increment-without-overfitting",
+ "prompt": "The predicted 13C shift of the CH2 in triethylamine is off by a few ppm in FormChem; improve it.",
+ "files": [],
+ "expected_behavior": [
+ "Loads names-and-spectra, runs python -m app.services.nmr.accuracy --holdout --molecules and --calibration from backend/ before changing anything, and quotes the tables",
+ "Changes a general rule in services/nmr/carbon.py (an amine alpha or branching term) rather than a term that only touches triethylamine",
+ "Runs the accuracy script again, shows the holdout 13C MAE did not get worse, and updates docs/SPECTRA.md and the CHANGELOG only if the published figures changed"
+ ]
+ },
+ {
+ "id": 23,
+ "name": "register-another-name-engine",
+ "prompt": "We want OPSIN as an optional name to structure engine in FormChem. Wire it in.",
+ "files": [],
+ "expected_behavior": [
+ "Writes backend/app/services/names/opsin.py with a class meeting the NameEngine protocol, running OPSIN as a separate process, and registers it with names.register(..., first=True)",
+ "Leaves routers/names.py, the window and mcp.py unchanged, since they call names.engine()",
+ "Adds the NOTICE.md row and asks the owner before shipping a new runtime, and makes every result name the opsin engine and its version"
+ ]
+ },
+ {
+ "id": 24,
+ "name": "add-a-3d-display-style",
+ "prompt": "Add a licorice display style to FormChem's 3D View.",
+ "files": [],
+ "expected_behavior": [
+ "Loads three-d and document-format, and changes the display enum in docs/FORMAT.md, frontend/src/engine/model.ts and backend/app/services/model.py in one change",
+ "Adds the style to atomStyle and the glTF radii in ui/view3d-viewer.ts, to DISPLAYS in ui/view3d-panel.ts, and a style-licorice command with its id in VIEW3D_COMMAND_IDS and DISPLAY_3D in app/menus.ts",
+ "Passes the new labels to t() whole and runs ./formchem i18n scan --write; adds no static import of 3dmol",
+ "Writes a frontend HASHOUT entry and does not write tests"
+ ]
+ },
+ {
+ "id": 25,
+ "name": "conformers-survive-a-charge-edit",
+ "prompt": "In FormChem, after I change an atom's charge the 3D View still shows the old conformer until I reload. Fix it.",
+ "files": [],
+ "expected_behavior": [
+ "Loads three-d and reads backend/app/services/three_d/stale.py, frontend/src/engine/stale.ts and the conformers clause of docs/FORMAT.md",
+ "Checks that charge is in both field lists and that client.commit appends the conformer unsets to the window's own transaction, and that confirm applies the engine's appended drops",
+ "Keeps stale.py, stale.ts and FORMAT.md in agreement and confirms undo restores the conformers",
+ "Verifies in a scratch engine or browser outside the repository, not with a test file"
+ ]
+ },
+ {
+ "id": 26,
+ "name": "xtb-as-a-method",
+ "prompt": "Let FormChem minimise with xtb when it is installed.",
+ "files": [],
+ "expected_behavior": [
+ "Loads clean-room and three-d, and notes that plan question Q9 is open, so xtb is only a program the person installs and points to by path, run as a separate process and never bundled or linked",
+ "Adds the method to METHODS and forcefield (or a separate runner) with its own method label and version, to FORCE_FIELDS in three-api.ts, the panel's select and _FF in mcp.py",
+ "Stores energies under method xtb, never mixed with MMFF94 energies, and asks the owner before adding any download",
+ "Updates docs/3D.md and the HASHOUT log"
+ ]
+ },
+ {
+ "id": 27,
+ "name": "new-3d-export-desktop-save",
+ "prompt": "I added a .usdz export to the FormChem 3D View; it downloads in the browser but the desktop app refuses to save it.",
+ "files": [],
+ "expected_behavior": [
+ "Loads three-d and formats-and-export, and follows saveFile in app/save-file.ts to POST /api/files/write",
+ "Finds that SUFFIXES in backend/app/routers/files.py lacks .usdz (as it lacked .glb, .cif, .mmcif and .ent until 0.10.0) and adds it by hand",
+ "Updates the extension list in docs/FORMATS.md and writes a backend HASHOUT entry"
+ ]
}
],
"trigger_evals": [
@@ -256,6 +347,17 @@
{"query": "update the extension catalogue page in FormPortal", "should_trigger": false},
{"query": "scaffold a Tauri 2 shell for my new todo app", "should_trigger": false},
{"query": "write an RDKit script that computes logP for a CSV of SMILES", "should_trigger": false},
- {"query": "map the atoms of the reaction in my open FormChem drawing", "should_trigger": false}
+ {"query": "map the atoms of the reaction in my open FormChem drawing", "should_trigger": false},
+ {"query": "add a ring parent to formchem's name parser in services/names/rings.py", "should_trigger": true},
+ {"query": "the formchem JCAMP-DX reader misreads a DIFDUP file", "should_trigger": true},
+ {"query": "why is formchem's predicted 1H shift for anisole's OCH3 too low", "should_trigger": true},
+ {"query": "predict the 1H NMR of the structure in my open FormChem drawing", "should_trigger": false},
+ {"query": "draw caffeine from its name in formchem", "should_trigger": false},
+ {"query": "formchem's build 3D loses a wedge on this steroid; look at services/three_d/verify.py", "should_trigger": true},
+ {"query": "add a mol2 reader to formchem's 3D structure file import", "should_trigger": true},
+ {"query": "the 3D object on the formchem page flashes when I change its style", "should_trigger": true},
+ {"query": "add a surface option to FormChem's 3D View panel in frontend/src/ui", "should_trigger": true},
+ {"query": "give me the lowest-energy conformer of the structure in my open FormChem drawing", "should_trigger": false},
+ {"query": "open this PDB file in formchem and extract the ligand for me", "should_trigger": false}
]
}
diff --git a/.agents/skills/formchem-skillset/SKILL.md b/.agents/skills/formchem-skillset/SKILL.md
index 4bde2c2d..68284afc 100644
--- a/.agents/skills/formchem-skillset/SKILL.md
+++ b/.agents/skills/formchem-skillset/SKILL.md
@@ -1,17 +1,17 @@
---
name: formchem-skillset
-description: "Guides development of the FormChem codebase, the FormAI family's chemical structure drawing suite. Use whenever a task changes, fixes or explains FormChem code: the document format (FORMAT.md, model.ts, model.py, ops, undo), the engine store, the RDKit service (identifiers, the scored 2D layout, CIP, stereo groups, abbreviations, queries, SMARTS, R-groups, properties, the structure check), reactions, file formats and loss reports, picture export with the embedded drawing, the clipboard, the command line, Standardise, the SVG canvas, dark page, grids, scaling, tools, annotations, the shell, menus, the dock, Form extensions, the MCP server and agent tools (agent_out, agent_edits, agent_log, the render bridge, the agent token, Agent Activity), the Tauri shell and one-folder engine, or a release. Trigger on FormChem or formchem with backend/app, frontend/src, src-tauri, FORMAT.md, port 8220 or 5220. Not for using FormChem (formchem-harness), other Form apps such as FormDeck, or standalone RDKit scripts."
+description: "Guides development of the FormChem codebase, the FormAI family's chemical structure drawing suite. Use whenever a task changes, fixes or explains FormChem code: the document format (FORMAT.md, model.ts, model.py, ops, undo), the RDKit service (identifiers, the scored 2D layout, CIP, stereo groups, abbreviations, queries, R-groups, properties), reactions, file formats and loss reports, picture export, the clipboard, the command line, Standardise, the SVG canvas, grids, scaling, tools, annotations, names (dictionary, parser, namer), NMR prediction (increments), JCAMP-DX spectra, 3D (build, conformers, force fields, PDB and mmCIF, the 3D View, glTF), the shell, menus, the dock, Form extensions, the MCP server and agent tools (agent_edits, agent_log, the agent token), the Tauri shell, or a release. Trigger on FormChem or formchem with backend/app, frontend/src, src-tauri, FORMAT.md, port 8220 or 5220. Not for using FormChem (formchem-harness), other Form apps such as FormDeck, or standalone RDKit scripts."
license: Apache-2.0
metadata:
author: nodemode-ai
- version: "0.8.0"
+ version: "0.10.0"
---
# FormChem skillset
Route every change to FormChem's code through this file. It maps the subsystems that exist today, states the laws that hold everywhere and names the specialist to load. FormChem is a Python 3.12 FastAPI engine (`backend/`, port 8220), a vanilla TypeScript and Vite window (`frontend/`, port 5220, no framework) that talks to the engine over REST and one WebSocket, and a Tauri 2 shell (`src-tauri/`) that runs the frozen engine from a folder inside the app on macOS and as a sidecar elsewhere.
-**Where FormChem is (0.8.0).** Phases 1 and 2 built the family skeleton and shell. 0.3.0 added the document format and ops, the engine's document store with undo, autosave, versions and importers, the RDKit chemistry service, and the window's document client and local chemistry. 0.4.0 added the 2D canvas: the SVG renderer, the drawing tools and hover hotkeys, the canvas view with hit testing, selection, context menus and the tool rail. 0.5.0 added reactions and annotations: every drawn object kind through one renderer registry with its tool and handles, z-order and groups, the engine's reaction perception, mapping, balance, stoichiometry and RXN exchange with the Reaction menu and four MCP tools, the Stoichiometry panel, the template library and media. 0.6.0 added stereo, queries and analysis: enhanced stereo, CIP, wedges, abbreviations, hydrogens, queries and SMARTS, substructure search, R-groups and Markush, properties with methods, the structure check, the isotope pattern, the `/api/analysis` router with four read-only MCP tools, the marks layer and the chemistry commands. 0.7.0 added formats and exchange (readers, writers and report items, CDXML and CDX through Indigo, pictures with the embedded drawing and the engine's own PDF and EPS writer, print, the clipboard, File > Import, the command line, Standardise) plus the desktop test fixes: the one-folder macOS engine, the scored 2D layout, the dark page, scaling, grids and snapping, the folding menu row and the quick command state mirror. 0.8.0 adds the agent tools (42 MCP tools: documents, drawing, `render` through the window, reading back, conversion, 14 edit tools by id), the agent call log with Agent Activity and Stop, and the agent token. Names, spectra (0.9.0) and 3D (0.10.0) come later (`DEV_PLAN.md`). Do not write a later phase's code ahead of it; its commands stay registered and disabled.
+**Where FormChem is (0.10.0).** Through 0.9.0: the family shell, the document format, store and RDKit service, the canvas, reactions, stereo and analysis, formats and pictures, the agent tools with Agent Activity and the token, names, NMR prediction and spectra (`CHANGELOG.md`). 0.10.0 adds 3D: builds from 2D with a stereo check, conformers, force fields, scans, PDB and mmCIF files, the 3D View, model3d objects and eight more MCP tools (60). The structure database (0.11.0) comes later (`DEV_PLAN.md`). Do not write a later phase's code ahead of it; its commands stay registered and disabled.
## Subsystem map
@@ -21,13 +21,15 @@ Route every change to FormChem's code through this file. It maps the subsystems
| Engine document store: open documents, transactions, undo and redo, autosave, versions, recovery, the `.fchem` package, importers, the live `tx` messages | `backend/app/services/store.py`, `services/history.py`, `services/package.py`, `services/importers.py`, `routers/documents.py`, `core/files.py` | `engine` |
| The format contract: document.json, styles, ids, ops and inverses, transactions, validation, coalescing, the derived cache shape | `docs/FORMAT.md`, `frontend/src/engine/model.ts`, `engine/ops.ts`, `backend/app/services/model.py`, `services/ops.py` | `document-format` |
| Chemistry engine on RDKit: conversion, sanitising, valence, aromaticity, identifiers, formula, masses, layout, file reading and writing, the derived cache | `backend/app/services/chem/`, `backend/app/routers/chem.py` | `chemistry-engine` |
-| Window documents and chemistry: the document client and session, the actions behind File and Insert, the Analysis panel, local valence, rings, labels and formula | `frontend/src/engine/client.ts`, `engine/session.ts`, `engine/client-api.ts`, `app/documents.ts`, `ui/analysis-panel.ts`, `frontend/src/chem/` | `window-shell` (chemistry rules in `chemistry-engine`) |
-| Canvas: SVG renderer, drawing tools and hover hotkeys, view, hit testing, selection, text editor, canvas context menus, tool rail; from 0.7.0 the dark page, grids and snapping, scale handles | `frontend/src/canvas/` (`render/`, `tools/`, `dark-page.ts`, `grid.ts`, `grid-layer.ts`, `tools/scale.ts`, `geom.ts`, `view.ts`, `hit.ts`, `selection.ts`, `text-editor.ts`, `context.ts`, `types.ts`), `ui/tool-rail.ts`, `styles/canvas.css`, `styles/canvas-view.css`, `styles/tool-rail.css`, `public/fonts/` | `canvas` |
+| Window documents and chemistry: the document client, File and Insert actions, the Analysis panel, local valence, rings and formula | `frontend/src/engine/client.ts`, `engine/session.ts`, `engine/client-api.ts`, `app/documents.ts`, `ui/analysis-panel.ts`, `frontend/src/chem/` | `window-shell` (chemistry rules in `chemistry-engine`) |
+| Canvas: SVG renderer, drawing tools and hover hotkeys, view, hit testing, selection, text editor, canvas context menus, tool rail; from 0.7.0 the dark page, grids and snapping, scale handles | `frontend/src/canvas/` (`render/`, `tools/`, `view.ts`, `hit.ts`, `selection.ts`, `context.ts`, the grid and dark page files), `ui/tool-rail.ts`, `styles/canvas*.css`, `public/fonts/` | `canvas` |
| Drawn objects: the object kind registry and kind modules, anchors, bounds, drawn-outline hits, annotation tools and handles, captions, z-order and groups, the template library, media | `frontend/src/canvas/render/objects.ts` and its kind modules, `canvas/hit-objects.ts`, `canvas/tools/objects.ts`, `tools/handles.ts`, `app/object-commands.ts`, `ui/template-*.ts`, `backend/app/services/templates.py`, `routers/templates.py`, `backend/app/data/templates/`, the media routes in `routers/documents.py` | `annotations` |
| Reactions: perception, atom mapping, balance, stoichiometry (engine and window), reaction SMILES and RXN, the Reaction menu, the MCP reaction tools | `backend/app/services/chem/` (`geometry`, `reactions`, `mapping`, `balance`, `stoich`, `rxnio`, `scheme`), `routers/reactions.py`, `frontend/src/chem/stoich.ts`, `ui/stoich-panel.ts`, `app/reaction-commands.ts`, `engine/reactions-api.ts`, `docs/REACTIONS.md` | `reactions` |
-| Stereo, queries and analysis: stereo groups, CIP report, wedges, abbreviations, hydrogens, queries and SMARTS, substructure search, V3000 queries, Markush, properties, the structure check, the isotope pattern, their routes, tools, commands, marks and panels | `backend/app/services/chem/` (`stereo`, `superatom`, `hydrogens`, `query`, `search`, `v3000`, `markush`, `props`, `check`, `isotopes`), `routers/analysis.py`, `frontend/src/engine/analysis-api.ts`, `app/chem-edits.ts`, `app/chem-commands.ts`, `canvas/render/marks-*.ts`, the 0.6.0 dialogs in `ui/`, `docs/ANALYSIS.md` | `stereo-and-queries` |
-| Formats and export: the formats table, report items, readers and writers, CDXML and CDX through Indigo, RD files, CML, the export, parse, import and file write routes, pictures (SVG, PNG, PDF, EPS) with the embedded drawing, the save path, print, the import report, File > Import | `backend/app/services/chem/` (`formats`, `report`, `io`, `writers`, `cdxio`, `rdfio`, `cml`), `services/embedded_source.py`, `services/pictures/`, `services/importers.py`, `routers/files.py`, `routers/pictures.py`, `frontend/src/app/` (`picture`, `embedded-source`, `save-file`, `export-commands`, `print`, `import-files`), `ui/export-dialog.ts`, `ui/import-report.ts`, `docs/FORMATS.md` | `formats-and-export` |
+| Stereo, queries and analysis: stereo groups, CIP, wedges, abbreviations, hydrogens, queries, SMARTS, Markush, properties, the structure check, the isotope pattern, their routes, commands, marks and panels | `backend/app/services/chem/` (`stereo`, `superatom`, `hydrogens`, `query`, `search`, `v3000`, `markush`, `props`, `check`, `isotopes`), `routers/analysis.py`, `frontend/src/engine/analysis-api.ts`, `app/chem-*.ts`, `canvas/render/marks-*.ts`, `docs/ANALYSIS.md` | `stereo-and-queries` |
+| Formats and export: the formats table, report items, readers and writers (CDXML and CDX through Indigo, RD, CML), the export, parse, import and file write routes, pictures with the embedded drawing, the save path, print, File > Import | `backend/app/services/chem/` (`formats`, `report`, `io`, `writers`, `cdxio`, `rdfio`, `cml`), `services/embedded_source.py`, `services/pictures/`, `services/importers.py`, `routers/files.py`, `routers/pictures.py`, `frontend/src/app/` (`picture`, `embedded-source`, `save-file`, `export-commands`, `print`, `import-files`), `ui/export-dialog.ts`, `ui/import-report.ts`, `docs/FORMATS.md` | `formats-and-export` |
| Clipboard: the native payload and paste plan, text formats, flavours per platform, Copy As, Paste Special, Duplicate | `frontend/src/app/clip-*.ts`, `app/clipboard.ts`, `ui/paste-special-dialog.ts`, `ui/native-menu.ts` `ALWAYS_NATIVE` | `clipboard` |
+| Names, NMR prediction and spectra: name engines, dictionary, parser, namer; increments and predicted spectra; the JCAMP-DX reader, peaks, integrals; the name dialog, spectrum kind, atom links, Spectrum editor | `backend/app/services/` (`names/`, `nmr/`, `spectra/`), `data/names/`, `routers/` (`names`, `nmr`, `spectra`), the window files in the specialist's file map, `docs/NAMES.md`, `docs/SPECTRA.md` | `names-and-spectra` |
+| 3D: builds, conformers, force fields, scans, measurements, PDB and mmCIF, ligands, the stale-conformer rule; the 3D View, model3d snapshots, glTF | `backend/app/services/three_d/`, `routers/three_d.py`, `frontend/src/ui/view3d-*.ts`, `canvas/render/model3d.ts`, `io/glb.ts`, `engine/three-api.ts`, `engine/stale.ts`, `docs/3D.md` | `three-d` |
| Command line and batch: convert, batch, descriptors, render, the stream reader, Standardise (engine, route, dialog) | `backend/app/cli.py`, `services/batch.py`, `services/chem/` (`stream`, `records`, `standardise`, `depict`), `setup/convert`, `frontend/src/ui/standardise-dialog.ts`, `app/standardise-command.ts`, `docs/CLI.md` | `command-line` |
| Window shell: app root, command registry, palette, Home, title bar, status bar, Preferences, dialogs, themes, i18n, styles | `frontend/src/app.ts`, `app/commands-shell.ts`, `commands/registry.ts`, `io/`, `ui/`, `i18n/`, `styles/` | `window-shell` |
| Menus: in-window menu bar, native macOS menus, context menus | `frontend/src/ui/menu.ts`, `ui/native-menu.ts`, `ui/context-menu.ts`, `app/menus.ts`, `styles/menu.css` | `menus` |
@@ -66,6 +68,9 @@ app/clip-*.ts, import-files -> engine/model, ops, the export and parse routes;
services/chem/writers, stream -> formats, report, io, rdkit, indigo (never the store)
services/batch.py, app/cli.py -> chem/stream, records, standardise, depict, props (never routers or the store)
services/pictures/ -> fontTools and the bundled fonts only
+services/names, nmr, spectra -> rdkit, numpy, chem (never routers); nmr registers its hook in spectra.source.PREDICTORS
+services/three_d -> rdkit, numpy, chem (never routers); store.apply_now runs three_d.stale
+ui/view3d-lib.ts -> 3dmol by dynamic import only (nothing 3D at startup)
window-only abilities -> reach the engine as window tools over /api/live (bridge.window_call)
desktop shell -> frozen engine (formchem_engine.py) -> serves frontend/dist
```
@@ -95,13 +100,15 @@ The window reaches the engine only through `frontend/src/io/api.ts` (REST with t
| Opening, saving, undo, autosave, versions, recovery, importing a structure file into a new drawing | `engine`, then `document-format` for the ops |
| A new field or object kind, an op or path problem, a validation error, coalescing, the `.fchem` package shape | `document-format` |
| SMILES, InChI, formula, masses, implicit hydrogens, valence errors, warnings, 2D clean-up or layout, a structure file reader or writer, the derived cache | `chemistry-engine` |
-| Drawing on the canvas: how a bond, label or wedge renders, a drawing tool, a hover hotkey, snapping, hit testing, selection, zoom and pan, the tool rail, canvas right-click menus | `canvas` |
-| An arrow, bracket, shape, line, table, TLC plate, orbital, picture or caption: drawing, hitting, handles, its tool; z-order and groups; a template; picture upload | `annotations`, with `canvas` for the laws it builds on |
+| How a bond, label or wedge renders, a drawing tool, a hover key, hit testing, selection, zoom, the tool rail, canvas context menus | `canvas` |
+| An arrow, bracket, shape, table, TLC plate, orbital, picture or caption, its handles and tool; z-order, groups, templates | `annotations`, with `canvas` for the laws it builds on |
| Reaction roles, atom mapping, balance, the stoichiometry panel or grid, reaction SMILES or RXN, a reaction route, command or MCP tool | `reactions`, with `chemistry-engine` for RDKit and `agents` for a tool |
| A CIP label, stereo group, wedge, abbreviation, explicit hydrogen, atom list, query bond, SMARTS, substructure hit, R-group, property, check issue or isotope peak; an `/api/analysis` route, an analysis MCP tool, a stereo or query mark | `stereo-and-queries`, with `chemistry-engine` for the converter and `agents` for a tool |
| A file that opens wrong or loses something, an export or import report, a new format, File > Import, picture export, the drawing inside a picture, saving in the desktop app, print | `formats-and-export`, with `chemistry-engine` for RDKit and `clean-room` for a new format |
| Copy, Cut, Paste, Copy As, Paste Special, Duplicate, a clipboard flavour on one platform | `clipboard`, with `formats-and-export` for the text formats and pictures |
| `./formchem convert`, `batch`, `descriptors`, `render`, the stream reader, per-record failures, Standardise | `command-line`, with `chemistry-engine` for RDKit |
+| A name read wrong, a dictionary entry, a ring parent, OPSIN; a predicted shift, an increment, a predictor; a JCAMP-DX file, the spectrum plot, peaks, integrals, atom links, the Spectrum editor | `names-and-spectra` (`clean-room` first; `canvas` for the renderer, `document-format` for the spectrum object) |
+| A 3D build, conformer, scan, measurement or surface; a PDB or mmCIF file or ligand; the 3D View, a 3D object on the page, glTF; conformers after an edit | `three-d` (`document-format` for `conformers` and `model3d`, `agents` for a tool) |
| A crowded or crossing 2D layout, Lay Out or Clean Up | `chemistry-engine` (the scored layout) |
| The dark page, a grid type, snapping, scale handles, Scale Up and Down | `canvas`, with `document-format` for `style.grid` |
| New, Open, Save, Insert from SMILES, the Analysis panel, the status bar formula, the dirty mark | `window-shell`, with `chemistry-engine` for the values |
@@ -124,8 +131,8 @@ formchem-skillset/
references/repo-laws.md each law with its reason and exact format
EVALS.json evaluation prompts and the trigger tests (should and should not load)
sub-skills/ engine, document-format, chemistry-engine, reactions, stereo-and-queries, formats-and-export,
- clipboard, command-line, canvas, annotations, window-shell, menus, dock, extensions, agents,
- desktop, release, clean-room
+ clipboard, command-line, names-and-spectra, three-d, canvas, annotations, window-shell, menus, dock,
+ extensions, agents, desktop, release, clean-room
chemistry-engine/references/warning-codes.md every ChemWarning code and where it comes from
stereo-and-queries/references/routes-and-codes.md the /api/analysis routes, check codes and service warning codes
canvas/references/hover-keys.md the hover key map with the code that implements it
@@ -152,7 +159,7 @@ cd frontend && npx tsc --noEmit type-check
backend/venv/bin/python -m compileall -q backend/app setup
```
-Scratch engines for checks: `FORMCHEM_PORT=[port] FORMCHEM_DATA_DIR=[scratch]/data venv/bin/python -m uvicorn app.main:app --port [port]` from `backend/`. `backend/venv/bin/python backend/formchem_engine.py --selfcheck` confirms RDKit and Indigo import. Never point a check at `~/formchem`: a scratch data folder keeps the person's drawings, autosaves and versions out of it.
+Scratch engines for checks: `FORMCHEM_PORT=[port] FORMCHEM_DATA_DIR=[scratch]/data venv/bin/python -m uvicorn app.main:app --port [port]` from `backend/`. `backend/venv/bin/python backend/formchem_engine.py --selfcheck` confirms RDKit and Indigo import. Never point a check at `~/formchem`, the person's data folder.
## Done means
diff --git a/.agents/skills/formchem-skillset/sub-skills/agents/SUB-SKILL.md b/.agents/skills/formchem-skillset/sub-skills/agents/SUB-SKILL.md
index d474d33a..2ae35fca 100644
--- a/.agents/skills/formchem-skillset/sub-skills/agents/SUB-SKILL.md
+++ b/.agents/skills/formchem-skillset/sub-skills/agents/SUB-SKILL.md
@@ -31,9 +31,9 @@ Give agents an honest tool surface that only describes what FormChem can do now,
| `docs/AGENTS.md` | the public reference of every tool, the token and the call log |
| `.claude/skills/formchem-harness`, `formchem-skillset` | the packs; `.agents/skills` is a mirror written by sync. Made and repaired only through the god-tier-skill-creator pipeline; its `scripts/validate_skill.py` reports zero FAIL before a commit |
-## The tool surface (0.8.0)
+## The tool surface (0.10.0)
-42 tools: the six of the shell (`get_context`, `list_commands`, `run_command`, `extensions_list`, `extension_command`, `handoff`); the reaction tools of 0.5.0 and the analysis tools of 0.6.0 (owned by `reactions` and `stereo-and-queries`); and the 28 of 0.8.0: `list_open_documents`, `new_document`, `open_document`, `save_document`, `close_document`, `draw_from_smiles`, `draw_from_molfile`, `render`, `get_structure`, `validate`, `compute_properties`, `convert`, `batch_convert`, `get_atoms` and the 14 edit tools `add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text`, `add_reaction`. `draw_from_name` waits for the naming decision (Q7 in the plan); do not add it early.
+60 tools: the six of the shell (`get_context`, `list_commands`, `run_command`, `extensions_list`, `extension_command`, `handoff`); the reaction tools of 0.5.0 and the analysis tools of 0.6.0 (owned by `reactions` and `stereo-and-queries`); and the 28 of 0.8.0: `list_open_documents`, `new_document`, `open_document`, `save_document`, `close_document`, `draw_from_smiles`, `draw_from_molfile`, `render`, `get_structure`, `validate`, `compute_properties`, `convert`, `batch_convert`, `get_atoms` and the 14 edit tools `add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text`, `add_reaction`; and the 10 of 0.9.0, whose services `names-and-spectra` owns: `draw_from_name` (through `_draw`), `name_structure` (the route's `name_mol`), `predict_nmr`, `predict_spectrum` (`nmr.document.spectrum_ops`), `open_spectrum`, `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate` (`spectra.peak_ops`, `integral_ops`) and `spectrum_export`; and the 8 of 0.10.0, whose services `three-d` owns: `build_3d`, `conformers_3d`, `minimise_3d`, `scan_dihedral`, `measure_3d`, `open_3d_structure` (`three_d.open_bytes`) and `extract_ligand` call the `routers/three_d.py` functions through `_three_d` with an `AgentCall` in the body, so the route's `commit` applies with origin `agent` and the agent's name, and `export_3d` calls `export.write` directly. The writing ones are in `MUTATING` (`scan_dihedral` only with `store`, `export_3d` only with an `output` outside the temporary folder, through `_mutating`); a tool never builds its own copy of a route's ops.
## Laws of the agent tools
diff --git a/.agents/skills/formchem-skillset/sub-skills/names-and-spectra/SUB-SKILL.md b/.agents/skills/formchem-skillset/sub-skills/names-and-spectra/SUB-SKILL.md
new file mode 100644
index 00000000..44920167
--- /dev/null
+++ b/.agents/skills/formchem-skillset/sub-skills/names-and-spectra/SUB-SKILL.md
@@ -0,0 +1,100 @@
+---
+name: names-and-spectra
+description: "FormChem's 0.9.0 names, NMR prediction and spectra code: the pluggable name engine (services/names: NameEngine protocol, registry, offline engine, the 629-entry dictionary in data/names, lexicon, rings, parser, build, stereo, namer with its round-trip guard), the increment predictor (services/nmr: environment, groups, carbon, proton, coupling, predict, simulate, the predicted spectrum object, the data hook, reference and accuracy), the JCAMP-DX reader and spectrum service (services/spectra), their routers, and the window side (names-api, name dialog, Name section, spectrum kind and data cache, atom links, Spectrum editor, name, NMR and spectrum commands). Use when adding a dictionary entry, a ring parent, a lexicon word, an increment or a predictor, registering OPSIN or another name engine, reading a new JCAMP-DX feature, or fixing a name, a predicted shift, a spectrum plot, peaks, integrals or links."
+---
+
+# Names and spectra
+
+## Purpose
+
+Change FormChem's names, NMR prediction and spectra without breaking the three promises they make: every name and every predicted number carries its method and version, FormChem refuses rather than guesses, and no third-party name list, shift table or parser code enters the repository. Hands back the change, the checks that prove it (the dictionary verify, the name corpus or round trip, the accuracy script, the JCAMP-DX corpus) and HASHOUT entries.
+
+## Preconditions
+
+`clean-room` loaded: names, NMR prediction and spectra are described only in the owner's clean-room specifications (`CLEANROOM_A`, `B` and `C`, the sections on names, NMR prediction, spectra). Licence rule: permissive anywhere; LGPL only as a separate module or process; GPL and AGPL never; NMRShiftDB2 data and any share-alike or non-commercial data only after the owner decides (plan question Q8 is open). Data FormChem ships is written for FormChem.
+
+## File map
+
+| Path | Holds |
+| --- | --- |
+| `backend/app/services/names/base.py`, `__init__.py` | the `NameEngine` protocol, result shapes, the registry (`register`, `engine`, `engines`, `listing`) |
+| `services/names/offline.py` | `OfflineEngine`: dictionary, then refusals, then the parser; `Stats` |
+| `services/names/dictionary.py`, `backend/app/data/names/*.json` | the dictionary loader and its seven files (`source`, `licence`, `category`, `method`, `entries`) |
+| `services/names/lexicon.py`, `rings.py`, `parser.py`, `build.py`, `stereo.py` | stems, multipliers, prefixes, suffixes, retained parents; ring parents in IUPAC numbering; the grammar; the builder; descriptors |
+| `services/names/namer.py` | structure to name; raises `Unsupported` with a reason |
+| `routers/names.py` | `/api/names/to-structure`, `/to-name`, `/engines`, `POST /api/documents/{id}/names/insert`; `name_mol` shared with MCP |
+| `services/nmr/__init__.py`, `base.py` | `METHOD`, `VERSION`, `DESCRIPTION`, `REGISTRY`; `Shift`, `Predictor`, `Registry` |
+| `services/nmr/environment.py`, `groups.py` | the fragment as an RDKit molecule with ids, H counts, symmetry ranks, rings; the substituent classifier shared by both nuclei |
+| `services/nmr/carbon.py`, `proton.py`, `coupling.py` | 13C and 1H increments and their tables (`ALKYL`, `AROMATIC`, `SIX_RING_HETERO`, `SP3_BASE`, `SP3_ALPHA`, `ALKENE` and the rest); J values and labels |
+| `services/nmr/predict.py`, `simulate.py` | the predictor chain, signals, confidence, warnings, the journal line; lines and Lorentzians |
+| `services/nmr/document.py`, `source.py` | the predicted spectrum object, placement and refresh; the hook for the spectra data route |
+| `services/nmr/reference.py`, `accuracy.py` | calibration and holdout sets; `python -m app.services.nmr.accuracy` |
+| `routers/nmr.py` | `/api/nmr/predictors`, `/api/nmr/predict`, `/nmr/predict-spectrum`, `/nmr/refresh` |
+| `services/spectra/` | `ldr.py`, `asdf.py`, `tables.py`, `ntuples.py`, `jcamp.py` (reader), `technique.py`, `issues.py`, `display.py`, `measure.py`, `export.py`, `document.py`, `source.py` (`PREDICTORS`) |
+| `routers/spectra.py` | data, peaks, integrals, export, parse; `peak_ops` and `integral_ops` shared with MCP |
+| `frontend/src/engine/names-api.ts`, `nmr-api.ts`, `spectra-api.ts` | the only callers of those routes |
+| `frontend/src/ui/name-dialog.ts`, `ui/analysis-name.ts`, `app/name-commands.ts` | Structure from Name, offerName, the Name section, Copy Name |
+| `frontend/src/canvas/render/spectrum.ts`, `spectrum-axes.ts`, `spectrum-data.ts`, `canvas/spectrum-links.ts`, `chem/spectrum-ops.ts` | the spectrum kind, axes, the data cache, the link layer, the op builders |
+| `frontend/src/ui/spectrum-panel.ts`, `app/spectrum-commands.ts`, `app/spectrum-import.ts`, `app/nmr-commands.ts` | the Spectrum editor and the commands |
+| `docs/NAMES.md`, `docs/SPECTRA.md` | the reference pages; HASHOUT backend 165 to 198, frontend 201 to 221 |
+
+## Laws
+
+1. **Method and version on every value.** A name result carries `method`, `engine`, `version` and `confidence`; a shift carries `method`, `version`, `confidence` and `uncertainty`; a predicted spectrum's `source.predicted` names its method, version and frequency. A new engine or predictor sets its own; never reuse FormChem's labels for another method.
+2. **Refuse, never guess.** The parser refuses with a code and a position; the namer raises `Unsupported`; a systematic name is shown only after an exact standard InChIKey round trip at high confidence. A change that turns a refusal into an answer needs a corpus case proving the answer right.
+3. **Own data only.** Dictionary SMILES, ring parents and increments are written for FormChem from general knowledge. Never paste a published table, a database export or another program's word list.
+4. **Points are never stored.** A spectrum object holds its source, view and marks; the engine parses or computes points on each request. Change FORMAT.md first, with `model.ts` and `model.py`, if a field must be added (`document-format`).
+5. **One transaction per gesture.** Insert from a name, predict a spectrum, refresh, pick peaks, integrate, link: each is one undo step. MCP tools reuse the route builders (`structure_ops`, `spectrum_ops`, `peak_ops`, `integral_ops`) so routes and tools answer the same.
+6. **The window patches.** The spectrum trace keeps its node (only `d` changes), the data cache asks once per zoom doubling, highlights live in the link layer, and the name dialog keeps its height. A MutationObserver check proves it.
+
+## Recipes
+
+### Add a dictionary entry
+
+1. Pick the file by category in `backend/app/data/names/` (solvents, reagents, amino-acids, biochemistry, drugs, organics, natural-products).
+2. Add `{"name", "smiles", "inchikey", "synonyms"?}` by hand with the Edit tool. Write the SMILES yourself, with the stereo the bare name means (L amino acids, D sugars, racemic drugs without stereo), and compute the standard InChIKey with RDKit in a scratch shell.
+3. Check: from `backend/`, `venv/bin/python -c "from app.services.names import dictionary as d; i = d.verify(); print(len(i.entries), i.problems)"`. Problems must be empty: a wrong key, or a name or synonym already used for another structure, is reported there.
+4. Check the CIP labels of a chiral entry against a configuration you know independently, and that `to-structure` with the name answers `method: dictionary`, `confidence: high`.
+
+### Add a ring parent
+
+1. In `services/names/rings.py`, add a `Ring(id, smiles, locants, name, stem, indicated?, yl?)` whose SMILES atom order is the IUPAC numbering (the locant tuple maps atom index to locant, `FUSED_9` and `FUSED_10` for the common fused shapes), plus any `ALIASES`.
+2. The namer uses the same table, so check both directions: parse a name on the new ring with substituents at two positions, then name the structure and confirm the round trip gives the same InChIKey. Ring seniority for the namer follows its rules in `namer.py`; a ring that cannot be ranked there must stay `Unsupported`.
+
+### Add a lexicon word or a suffix
+
+`services/names/lexicon.py` (`STEMS`, `MULT`, `BIS`, the prefix `Group` table, `Suffix`, `Retained`, `CLASS_WORDS`). A new word can create a second reading of an existing name: run the name corpus and the dictionary round trip, and look for new `ambiguous` warnings.
+
+### Add or tune an increment
+
+1. Find the table (`carbon.py` for 13C, `proton.py` for 1H, `coupling.py` for J) and the classifier key in `groups.classify`. A new substituent class is added to `groups.py` first, then a row in every table that names classes, or the rule falls back with low confidence.
+2. Change only general rules. A term that fixes one molecule of the reference set and nothing else is overfitting: the holdout set exists to catch it.
+3. Run `venv/bin/python -m app.services.nmr.accuracy --holdout --molecules` and `--calibration` from `backend/`. Report both MAE tables before and after; the holdout figure (1H 0.092, 13C 1.12 ppm at 0.9.0) must not get worse, and a change to the published figures updates `docs/SPECTRA.md` and the CHANGELOG.
+4. New reference molecules go into `reference.py` with values written from general knowledge, as its note says; never from a database.
+
+### Add a predictor or a name engine
+
+- Predictor: an object with `name`, `version`, `method`, `nuclei` and `predict(env, nucleus) -> {site: Shift}`, registered with `REGISTRY.register(p)` (it goes first; the increments fill the sites it leaves). If spectra store its method name, register a data hook in `app.services.spectra.source.PREDICTORS[method]` as `services/nmr/source.py` does.
+- Name engine: `services/names/[engine].py` with a class meeting `NameEngine`, registered with `names.register(engine, first=True)` at startup. OPSIN runs as a separate process. An engine strong in one direction answers `NameResult([], ..., reason=...)` in the other.
+- Either way: routes, window and MCP tools need no change, and every result names the new engine and version.
+
+### A JCAMP-DX feature
+
+Write it from the published rules, not from another reader. Report what you repair or skip through `issues.py` with a code, a line and a sentence; add a synthetic file that exercises it to the scratch corpus (outside the repo) and confirm every existing corpus file still reads identically, and that `export.py` output re-reads with an empty report.
+
+## Gate
+
+- [ ] Every new or changed value still carries method and version, and refusals still refuse.
+- [ ] `dictionary.verify()` reports no problems; the name corpus (50 systematic, 20 trivial, 5 refusals at 0.9.0) still passes, and the dictionary round trip has no failure.
+- [ ] The accuracy script ran before and after any increment change, holdout not worse, figures quoted.
+- [ ] No third-party data or code was added; any new dependency has a NOTICE.md row first.
+- [ ] Window changes keep the trace node and add no `Loading spectrum` status on a y-mode toggle or a structure edit.
+- [ ] HASHOUT entries and `docs/NAMES.md` or `docs/SPECTRA.md` updated; `./formchem agents sync --check` passes if an MCP tool changed.
+
+## Hands back
+
+The change, the check outputs (verify, corpus or round trip, accuracy tables, corpus reads), the HASHOUT entries and the commit list.
+
+## Owned resources
+
+None of its own. `agents` owns the MCP tools over these services; `document-format` owns the spectrum object's shape; `canvas` the renderer laws the spectrum kind follows.
diff --git a/.agents/skills/formchem-skillset/sub-skills/three-d/SUB-SKILL.md b/.agents/skills/formchem-skillset/sub-skills/three-d/SUB-SKILL.md
new file mode 100644
index 00000000..48ca1508
--- /dev/null
+++ b/.agents/skills/formchem-skillset/sub-skills/three-d/SUB-SKILL.md
@@ -0,0 +1,77 @@
+---
+name: three-d
+description: "FormChem's 0.10.0 3D code: the engine package services/three_d (molecule labels, forcefield, build, verify, conformers, minimise, scan, measure, export, structure, pdb, mmcif, molfile3d, ligand, readers, document, stale), routers/three_d.py, the stale-conformer rule in the store and in engine/stale.ts, the window's 3D View panel over a lazily loaded 3Dmol.js (view3d-lib, view3d-viewer, view3d-panel, dialogs, scan plot), the model3d page renderer and its snapshots, the glb writer and the 3D commands. Use when adding a display style, a surface, a force field or method, a structure file reader, a 3D MCP tool or route, fixing a build that loses stereo, a conformer or scan result, a PDB summary or ligand, a 3D object that flashes on the page, or the conformer drop after an edit."
+---
+
+# Three-d
+
+## Purpose
+
+Change FormChem's 3D without breaking its promises: every energy and measurement names its method and engine version, a build keeps the drawn stereo or says it did not, conformers never outlive the graph they were made for, a 3D object on the page never flashes, and nothing 3D loads at startup. Hands back the change, the checks that prove it and HASHOUT entries.
+
+## Preconditions
+
+`clean-room` loaded (the 3D sections of the clean-room specifications). Licence rule: permissive anywhere; LGPL only as a separate process the person installs (xtb and CREST stay user-installed by path while plan question Q9 is open); GPL and AGPL never (no Open Babel code); gemmi (MPL-2.0) is not vetted. Ligand templates are written for FormChem; the Chemical Component Dictionary is CC0 but nothing was copied from it.
+
+## File map
+
+| Path | Holds |
+| --- | --- |
+| `backend/app/services/three_d/__init__.py` | `METHODS`, `SEED`, `MAX_ITERS`, `GRADIENT`, `MAX_ATOMS`, `ThreeDError`, `method_of` |
+| `three_d/molecule.py` | `prepare` (perceive, expand, AddHs), labels `a1`, `a1:h0`, `a5:x0`, `positions`, `record` |
+| `three_d/forcefield.py`, `build.py`, `verify.py` | MMFF94, MMFF94s, UFF with the fallback; ETKDGv3 embedding; the CIP comparison and clashes |
+| `three_d/conformers.py`, `minimise.py`, `scan.py`, `measure.py`, `export.py` | search with RMSD pruning and populations; minimisation to an RMS gradient; the relaxed scan; geometry and charges; MOL, SDF, PDB, XYZ |
+| `three_d/structure.py`, `pdb.py`, `mmcif.py`, `molfile3d.py`, `ligand.py`, `readers.py`, `document.py` | the structure model and summary, the two readers, 3D SD records, ligand bond orders, opening and importing |
+| `three_d/stale.py`, `services/store.py` `apply_now` | the graph signature and the conformer drop |
+| `backend/app/routers/three_d.py` | every route, `commit`, `AgentCall`, `open_bytes` |
+| `frontend/src/engine/three-api.ts`, `engine/stale.ts` | the only caller of the routes; the window's copy of the stale rule |
+| `frontend/src/ui/view3d-lib.ts`, `view3d-viewer.ts`, `view3d-panel.ts`, `view3d-dialogs.ts`, `scan-plot.ts`, `structure3d-dialogs.ts`, `styles/view3d.css` | the lazy loader, the 3Dmol wrapper and camera mapping, the panel, the dialogs |
+| `frontend/src/canvas/render/model3d.ts` | the page object (snapshot, or a placeholder) |
+| `frontend/src/io/glb.ts`, `chem/elements3d.ts`, `chem/geom3d.ts`, `chem/conformer-mol.ts` | glTF writer, palette and radii, measurement maths, local molfile |
+| `frontend/src/app/view3d-commands.ts`, `app/menus.ts` | `VIEW3D_COMMAND_IDS`, the commands, `DISPLAY_3D`, `SURFACE_3D` |
+| `docs/3D.md`, `docs/FORMAT.md` | the reference; `conformers`, `conformer` and `model3d`. HASHOUT backend 199 to 222, frontend 222 to 244 |
+
+## Laws
+
+1. **Method and version on every number.** Answers carry `engine` and `method`; conformers store `method` and `energy`. A new method names itself; never relabel a force-field energy as anything else.
+2. **Stereo is verified, not assumed.** A new embedding or minimisation path runs `verify.stereo` and reports `kept` and `lost`.
+3. **One transaction per command, computed off the lock.** Snapshot, compute in `asyncio.to_thread`, check the graph signature, then `commit`. MCP tools call the route functions with `AgentCall`, never a copy of their ops.
+4. **One stale rule, twice.** `stale.py` and `stale.ts` list the same fields in the same order, and FORMAT.md lists them too; a change edits all three.
+5. **Nothing 3D at startup.** 3Dmol.js is reached only through `load3dmol`'s dynamic import, and the panel and its CSS are a lazy chunk. A static import of either is a regression.
+6. **No flash on the page.** A snapshot write keeps the old image until the new media has loaded, replaces `snapshot`, `camera` and `display` in one coalesced transaction and removes the old media entry.
+
+## Recipes
+
+### A display style or a surface
+
+1. `display` and `surface.kind` are format enums: change FORMAT.md, `model.ts` and `model.py` together (`document-format`).
+2. Viewer: `atomStyle` (style) or the surface call in `view3d-viewer.ts`; panel: `DISPLAYS` or `SURFACES`; commands: a `style(...)` or `surface(...)` entry and the id in `VIEW3D_COMMAND_IDS`, `DISPLAY_3D` or `SURFACE_3D`. The glTF radii follow the display (`scene` in `view3d-viewer.ts`): give the new style its radii there.
+3. Strings through `t()` whole, then `./formchem i18n scan --write` for the keys.
+
+### A force field or method
+
+Add it to `METHODS` and `forcefield.setup` with its own fallback reason, to `FORCE_FIELDS` in `three-api.ts`, the panel's select, `_FF` in `mcp.py`, and `docs/3D.md`. An external program (xtb) runs as a separate process found by a path the person sets, never bundled or linked, and its energy is stored under its own `method`.
+
+### A structure file reader
+
+A parser returning `Structure` (with `summary` working on it), a `detect` rule and rows in `EXTENSIONS` and `MIMES`, `readers.read`, `document.MODEL_FORMATS` and `importers.MODELS_3D`, `package.EXT_BY_MIME`, the window's `OPEN_EXTENSIONS` and `STRUCTURE_ACCEPT`, and `routers/files.py` `SUFFIXES` so the desktop save accepts it (that list still lacks `.glb`, `.cif`, `.mmcif` and `.ent` at 0.10.0). The bytes stay as media; never rewrite the file.
+
+### A 3D MCP tool or route
+
+Route first (window key on POST, `commit` with the label), then a `t_` handler through `_three_d`, a `TOOLS` entry, `MUTATING` or `_mutating`, `INSTRUCTIONS`, `WORKFLOW` and `GUIDE`, `./formchem agents sync`, and `docs/AGENTS.md` (`agents`).
+
+## Checks
+
+From `backend/` on a scratch engine: ethanol C-O after MMFF94 between 1.41 and 1.44 Å; paclitaxel builds with 11 of 11 labels kept and 0 clashes; a graph edit drops `conformers` in the same `tx` and undo restores them. In the built window under 4x CPU throttling: no 3D chunk before the first 3D View; a MutationObserver sees no placeholder or empty `href` while restyling a 3D object; glTF output passes the Khronos validator; `npx tsc --noEmit` clean.
+
+## Gate
+
+- [ ] Every new number carries method and engine version; builds still report the stereo check.
+- [ ] `stale.py`, `stale.ts` and FORMAT.md agree; undo restores dropped conformers.
+- [ ] The startup chunk loads no 3D code; the page shows no flash.
+- [ ] No new dependency without a NOTICE.md row; no GPL code, no copied tables.
+- [ ] HASHOUT entries and `docs/3D.md` updated; `./formchem agents sync --check` passes after an MCP change.
+
+## Hands back
+
+The change, the check results, the HASHOUT entries and the commit list.
diff --git a/.claude/skills/formchem-harness/EVALS.json b/.claude/skills/formchem-harness/EVALS.json
index 5814ed3a..8e288d02 100644
--- a/.claude/skills/formchem-harness/EVALS.json
+++ b/.claude/skills/formchem-harness/EVALS.json
@@ -1,6 +1,6 @@
{
"skill_name": "formchem-harness",
- "notes": "Run with the FormChem engine and window open (./formchem) and the formchem MCP server connected with the agent token, version 0.8.0. Expected behaviours are observable in the tool calls and the final answer. FormChem 0.8.0 has 42 tools: agents draw with draw_from_smiles, draw_from_molfile and add_reaction, edit by id with get_atoms and the 14 edit tools, check with render, get_structure and validate, and still reach the window's commands, reactions, analysis and extensions; several evals check that the agent draws with the tools and checks before it claims. Evals 13 and 14 need a drawn esterification scheme (acetic acid + ethanol, arrow, ethyl acetate + water); evals 15 to 18 need ibuprofen inserted with insert-smiles CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O; eval 20 needs an SD file at the path it names.",
+ "notes": "Run with the FormChem engine and window open (./formchem) and the formchem MCP server connected with the agent token, version 0.10.0. Expected behaviours are observable in the tool calls and the final answer. FormChem 0.10.0 has 60 tools: agents draw with draw_from_smiles, draw_from_molfile, draw_from_name and add_reaction, edit by id with get_atoms and the 14 edit tools, check with render, get_structure and validate, name with name_structure, predict NMR with predict_nmr and predict_spectrum, work on spectra with open_spectrum and the spectrum tools, work in 3D with build_3d, conformers_3d, minimise_3d, scan_dihedral, measure_3d, open_3d_structure, extract_ligand and export_3d, and still reach the window's commands, reactions, analysis and extensions; several evals check that the agent draws with the tools and checks before it claims. Evals 13 and 14 need a drawn esterification scheme (acetic acid + ethanol, arrow, ethyl acetate + water); evals 15 to 18 need ibuprofen inserted with insert-smiles CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O; eval 20 needs an SD file at the path it names; eval 28 needs ethyl acetate drawn; eval 29 needs a JCAMP-DX 1H NMR file of ethanol at the path it names; eval 33 needs a PDB file with a protein chain and a benzamidine ligand (BEN) at the path it names; eval 34 needs butane drawn.",
"evals": [
{
"id": 1,
@@ -9,8 +9,8 @@
"files": [],
"expected_behavior": [
"Calls get_context first",
- "Says in plain words that an agent can make, open and save drawings, draw structures and reaction schemes from SMILES or molfiles, edit them atom by atom, read them back as SMILES, InChIKey or molfile, render and validate them, convert files and run menu commands, each change one undo step",
- "Names what is not there yet: drawing from a name, typing stoichiometry amounts, 3D",
+ "Says in plain words that an agent can make, open and save drawings, draw structures and reaction schemes from SMILES, molfiles or names, edit them atom by atom, read them back as SMILES, InChIKey, molfile or names, render and validate them, predict 1H and 13C NMR, open JCAMP-DX spectra and pick peaks, build structures in 3D with conformers, scans and measurements, open PDB files and extract ligands, convert files and run menu commands, each change one undo step",
+ "Names what is not there yet: typing stoichiometry amounts, quantum or tight-binding energies (no xtb or CREST)",
"Does not run any command or post a handoff for a question that only asks"
]
},
@@ -286,6 +286,124 @@
"Quotes the InChIKeys from the answer and reports failed records with their reasons as the answer lists them",
"Does not open the file as a drawing or use the export commands to get the text"
]
+ },
+ {
+ "id": 26,
+ "name": "draw-from-a-systematic-name",
+ "prompt": "Draw (2R)-butan-2-ol in FormChem and tell me how sure it is about the structure.",
+ "files": [],
+ "expected_behavior": [
+ "Calls get_context, then draw_from_name with name (2R)-butan-2-ol once, with no x or y",
+ "Quotes the method (systematic parser), the confidence (high) and the engine version from the answer's read field or its first sentence",
+ "Quotes the InChIKey BTANRVKWQNVYAZ-SCSAIBSYSA-N from the answer or from get_structure, and does not write a SMILES of its own",
+ "Says the drawing is one undo step"
+ ]
+ },
+ {
+ "id": 27,
+ "name": "refused-name",
+ "prompt": "In FormChem, draw Benzene, 1,2-dichloro-.",
+ "files": [],
+ "expected_behavior": [
+ "Calls draw_from_name once and reads the refusal that inverted index names are not read",
+ "Either retries once with 1,2-dichlorobenzene through draw_from_name, or draws Clc1ccccc1Cl with draw_from_smiles and says it wrote that SMILES itself",
+ "Does not loop on the refused name and does not claim the original name was read"
+ ]
+ },
+ {
+ "id": 28,
+ "name": "predict-and-place-nmr",
+ "prompt": "Predict the 1H NMR of the ethyl acetate in my FormChem drawing and put the spectrum next to it.",
+ "files": [],
+ "expected_behavior": [
+ "Finds the fragment id with get_context, get_structure or get_atoms, then calls predict_spectrum with that object and nucleus 1H (predict_nmr first is fine)",
+ "Quotes the journal line as the tool gives it, with 4.10 (q, J = 7.0 Hz, 2H), 2.05 (s, 3H) and 1.25 (t, J = 7.0 Hz, 3H), and names the method FormChem increments 0.9.0",
+ "Calls the values predicted, not measured, and passes on any warnings the answer lists",
+ "Says the spectrum is one undo step and that its peaks are linked to the atoms"
+ ]
+ },
+ {
+ "id": 29,
+ "name": "open-and-integrate-a-spectrum",
+ "prompt": "Open /data/ethanol-1h.jdx in FormChem, integrate the CH3 triplet around 1.2 ppm to 3 protons and the CH2 quartet around 3.7 ppm, and tell me the CH2 value.",
+ "files": [],
+ "expected_behavior": [
+ "Calls open_spectrum with path /data/ethanol-1h.jdx and reads the spectrum id and any report lines from the answer",
+ "Calls spectrum_integrate with a range around 1.2 ppm and value 3, then with a range around 3.7 ppm (or both at once with ranges and value 3)",
+ "Quotes the CH2 integral as the tool answers it (close to 2) and says each integration is one undo step",
+ "Does not compute the integral itself from spectrum_data points"
+ ]
+ },
+ {
+ "id": 30,
+ "name": "name-a-salt",
+ "prompt": "What is the systematic name of the sodium acetate in my FormChem drawing?",
+ "files": [],
+ "expected_behavior": [
+ "Calls name_structure with the fragment id or with no object",
+ "Reports the common name if the answer gives one, and the reason the answer gives for having no systematic name",
+ "Does not present a systematic name that name_structure did not return; a name it writes itself is labelled as its own"
+ ]
+ },
+ {
+ "id": 31,
+ "name": "ethanol-3d-bond-length",
+ "prompt": "Draw ethanol in FormChem, make it 3D and tell me the C-O bond length.",
+ "files": [],
+ "expected_behavior": [
+ "Calls get_context, then draw_from_smiles with CCO (or draw_from_name with ethanol)",
+ "Calls build_3d on the new fragment and reads its answer: one conformer, the energy with ETKDGv3+MMFF94 and the engine version, 0 clashes",
+ "Calls get_atoms (or reads the write result) for the C and O ids, then measure_3d with those two atoms",
+ "Reports the distance as the tool gives it (about 1.42 angstrom) with the method, and does not compute it from coordinates itself"
+ ]
+ },
+ {
+ "id": 32,
+ "name": "taxol-3d-stereo-check",
+ "prompt": "Make a 3D model of the paclitaxel in my FormChem drawing and make sure the stereochemistry survived.",
+ "files": [],
+ "expected_behavior": [
+ "Calls build_3d with the paclitaxel fragment id",
+ "Quotes the stereo line from the answer (all 11 stereo labels kept, or which were lost) and the clash count",
+ "If any label was lost, says the 3D structure is not the drawn isomer and does not hand the geometry on as correct",
+ "Quotes the energy with its force field and engine version, and does not call it a heat of formation or a quantum energy"
+ ]
+ },
+ {
+ "id": 33,
+ "name": "pdb-ligand-extract",
+ "prompt": "Open /data/gasfk-ligands.pdb in FormChem and pull the benzamidine out as a structure I can edit.",
+ "files": [],
+ "expected_behavior": [
+ "Calls open_3d_structure with path /data/gasfk-ligands.pdb and reads the chains, the ligand keys and the waters from the answer",
+ "Calls extract_ligand with the model's object id and ligand A:BEN:301 (or BEN)",
+ "Reports the new fragment id, the SMILES as returned (N=C(N)c1ccccc1) and that the bond orders came from the template table",
+ "Checks the new fragment with validate or get_structure, and does not claim bond orders the answer marked as inferred are certain"
+ ]
+ },
+ {
+ "id": 34,
+ "name": "butane-torsion-scan",
+ "prompt": "How high is the rotation barrier of the central bond of the butane in my FormChem drawing?",
+ "files": [],
+ "expected_behavior": [
+ "Builds 3D first with build_3d when the fragment has no conformer",
+ "Calls get_atoms for the four carbon ids in a row and calls scan_dihedral with them, without store",
+ "Quotes the barrier and the minimum angle from the answer with MMFF94 and the engine version (a barrier of about 5 kcal/mol, anti minimum at 180 degrees)",
+ "Says it is a force-field profile and that nothing was stored in the drawing"
+ ]
+ },
+ {
+ "id": 35,
+ "name": "style-3d-for-person",
+ "prompt": "Show the structure I selected in FormChem in 3D as ball and stick with a van der Waals surface.",
+ "files": [],
+ "expected_behavior": [
+ "Calls build_3d when the selected structure has no conformer, and reads its stereo line",
+ "Uses run_command with view-3d, then style-ballstick and surface-vdw, after finding them with list_commands",
+ "Does not claim to see the 3D View; says the panel shows it and that render shows only a stored picture",
+ "Ends with a handoff naming what the person will see"
+ ]
}
],
"trigger_evals": [
@@ -339,6 +457,22 @@
{"query": "convert this SDF file to SMILES with RDKit in a Python script", "should_trigger": false},
{"query": "check the valence of this molfile with RDKit, no app needed", "should_trigger": false},
{"query": "fix the perception distances in formchem's services/chem/reactions.py", "should_trigger": false},
- {"query": "balance this equation for me: Fe + O2 -> Fe2O3", "should_trigger": false}
+ {"query": "balance this equation for me: Fe + O2 -> Fe2O3", "should_trigger": false},
+ {"query": "draw 2,2,4-trimethylpentane from its name in formchem", "should_trigger": true},
+ {"query": "what is the IUPAC name of the structure I drew in FormChem", "should_trigger": true},
+ {"query": "predict the 13C NMR of my FormChem structure and put the spectrum beside it", "should_trigger": true},
+ {"query": "open this .jdx IR spectrum in formchem and pick the peaks", "should_trigger": true},
+ {"query": "set the first integral of the NMR spectrum in my formchem drawing to 3 protons", "should_trigger": true},
+ {"query": "add a ring parent to formchem's systematic name parser", "should_trigger": false},
+ {"query": "tune the 13C increments in formchem's services/nmr/carbon.py", "should_trigger": false},
+ {"query": "convert this IUPAC name to SMILES with OPSIN on the command line", "should_trigger": false},
+ {"query": "make the structure in my formchem drawing 3D and give me its lowest-energy conformer", "should_trigger": true},
+ {"query": "measure the C-O bond length of the ethanol I drew in FormChem", "should_trigger": true},
+ {"query": "open this pdb file in formchem and extract the ligand as a structure", "should_trigger": true},
+ {"query": "scan the dihedral of the central C-C bond of butane in formchem", "should_trigger": true},
+ {"query": "export the 3D coordinates of my formchem structure as an SDF with every conformer", "should_trigger": true},
+ {"query": "add a new force field to formchem's services/three_d/forcefield.py", "should_trigger": false},
+ {"query": "write an RDKit script that embeds and minimises conformers for a list of SMILES", "should_trigger": false},
+ {"query": "render this PDB entry as a cartoon in PyMOL", "should_trigger": false}
]
}
diff --git a/.claude/skills/formchem-harness/SKILL.md b/.claude/skills/formchem-harness/SKILL.md
index 93f182ec..2235c344 100644
--- a/.claude/skills/formchem-harness/SKILL.md
+++ b/.claude/skills/formchem-harness/SKILL.md
@@ -1,21 +1,21 @@
---
name: formchem-harness
-description: "Drives FormChem, the FormAI family's chemical structure drawing suite, through its MCP server. Use whenever the person wants an agent to work in FormChem: draw a structure or reaction from SMILES or a molfile, build or edit it atom by atom, set a charge or R/S, replace a group, add arrows or captions, check the drawing with render, get_structure or validate, read its InChIKey, SMILES or molfile, convert files, open or save drawings, run a menu command or extension, perceive or map a reaction, read stoichiometry, get cLogP or TPSA, match SMARTS, hand off, or asks what FormChem can do, and FormChem is named or its tools (draw_from_smiles, render, get_structure, get_atoms, add_atom, run_command, handoff and the rest) are available. Covers 127.0.0.1:8220, the agent token, approval, Stop and Agent Activity. Not for changing FormChem's source (formchem-skillset), other Form apps such as FormDeck, or standalone RDKit scripts."
+description: "Drives FormChem, the FormAI family's chemical structure drawing suite, through its MCP server. Use whenever the person wants an agent to work in FormChem: draw a structure or reaction from SMILES, a molfile or a chemical name, build or edit it atom by atom, check the drawing with render, get_structure or validate, name a structure, predict a 1H or 13C NMR spectrum, open a JCAMP-DX spectrum, pick peaks or integrate, build it in 3D, find conformers, minimise, scan a dihedral or measure a bond length, open a PDB file or extract a ligand, convert files, open or save drawings, run a menu command, perceive a reaction, get cLogP, hand off, or asks what FormChem can do, and FormChem is named or its tools (draw_from_smiles, draw_from_name, predict_nmr, build_3d, render, get_atoms, run_command, handoff and the rest) are available. Covers 127.0.0.1:8220, the agent token, approval and Stop. Not for changing FormChem's source (formchem-skillset), other Form apps such as FormDeck, or standalone RDKit scripts."
license: Apache-2.0
metadata:
author: nodemode-ai
- version: "0.8.0"
+ version: "0.10.0"
---
# FormChem harness
FormChem is a chemical structure drawing suite running on this computer. Its MCP server (`formchem`) lives in the engine and reaches the FormChem window, where the person sees everything an agent does. This pack is the method for using it well: draw with the tools, check what you drew, and hand back.
-## What exists today (0.8.0)
+## What exists today (0.10.0)
-FormChem has drawings (`.fchem` documents kept by the engine with undo, autosave and versions), an RDKit chemistry service that computes SMILES, InChIKey, formula, masses, CIP labels and valence warnings after every change, and a 2D canvas the person draws on. Earlier versions added reactions and annotations (0.5.0), stereo, queries and analysis (0.6.0), and formats, pictures, the clipboard, Standardise, the command line, the dark page, scaling and grids (0.7.0).
+FormChem has drawings (`.fchem` documents kept by the engine with undo, autosave and versions), an RDKit chemistry service that computes SMILES, InChIKey, formula, masses, CIP labels and valence warnings after every change, and a 2D canvas the person draws on. Earlier versions added reactions and annotations (0.5.0), stereo, queries and analysis (0.6.0), formats, pictures, the clipboard, Standardise, the command line, the dark page, scaling and grids (0.7.0), the agent tools (0.8.0), and names, NMR prediction (FormChem increments) and JCAMP-DX spectra (0.9.0).
-0.8.0 is the agent release. The MCP server has 42 tools; `references/tools.md` lists every argument and is generated from the server.
+0.10.0 adds 3D: conformers built from the drawing with the stereo checked, conformer searches, minimisation and dihedral scans with RDKit's force fields, measurements, the 3D View and 3D objects on the page, PDB and mmCIF files with ligand extraction, and 3D exports. The MCP server has 60 tools; `references/tools.md` lists every argument and is generated from the server.
| Group | Tools |
| --- | --- |
@@ -24,12 +24,15 @@ FormChem has drawings (`.fchem` documents kept by the engine with undo, autosave
| Checking | `render` (a picture drawn by the window's own renderer), `get_structure` (SMILES, CXSMILES, InChI, InChIKey, molfile, masses), `validate`, `compute_properties` |
| Editing by id | `get_atoms`; `add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text` |
| Converting | `convert`, `batch_convert` (the command line's own code and output) |
+| Names (0.9.0) | `draw_from_name` (a common or systematic name, read offline), `name_structure` (common and round-trip-checked systematic names) |
+| NMR and spectra (0.9.0) | `predict_nmr`, `predict_spectrum`; `open_spectrum` (JCAMP-DX), `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate`, `spectrum_export` |
+| 3D (0.10.0) | `build_3d`, `conformers_3d`, `minimise_3d`, `scan_dihedral`, `measure_3d`; `open_3d_structure` (PDB, mmCIF, SDF, MOL), `extract_ligand`, `export_3d` |
| Window, extensions, handoff | `list_commands`, `run_command`, `extensions_list`, `extension_command`, `handoff` |
| Reactions (0.5.0) and analysis (0.6.0) | `perceive_reactions`, `map_reaction`, `export_reaction`, `reaction_stoichiometry`, `properties`, `check_structure`, `stereo`, `substructure` |
Every change an agent makes is one transaction and one undo step, labelled with the tool in the person's Edit > Undo, and every change answers with the structure it now holds (ids, SMILES, InChIKey, formula, warnings) and a PNG of it. The person sees which agent is editing in the title bar, with a Stop button, and Window > Agent Activity lists every call with undo for the latest one.
-What still is not there: drawing from a chemical name (`draw_from_name` waits on a packaging decision; use SMILES), typing amounts into the Stoichiometry panel, 3D (0.10.0). The export and copy commands still hand their file to the person, not to the agent; use `convert` or `get_structure` for text you can read. Never draw by other means and present it as FormChem's work.
+Every name and computed number carries its method and version (FormChem names 0.9.0, FormChem increments 0.9.0, `ETKDGv3+MMFF94 (rdkit 2025.09.3)`); quote them with the value, and never present a prediction or a force-field energy as measured. What still is not there: names the offline engine refuses (hydro prefixes, spiro and bridged rings, peptides; use SMILES), a tool that links peaks to atoms (the window command does) or inserts a spectrum file into an existing drawing, typing amounts into the Stoichiometry panel, tools for 3D styles and surfaces (the window commands do), and any quantum or tight-binding method (no xtb or CREST). The export and copy commands still hand their file to the person, not to the agent; use `convert` or `get_structure` for text you can read. Never draw by other means and present it as FormChem's work.
## Doctrine (applies to every route)
@@ -46,13 +49,15 @@ What still is not there: drawing from a chemical name (`draw_from_name` waits on
```
formchem-harness/
SKILL.md this router and the doctrine
- references/tools.md the 42 MCP tools and their arguments (generated by ./formchem agents sync)
+ references/tools.md the 60 MCP tools and their arguments (generated by ./formchem agents sync)
EVALS.json evaluation prompts and trigger tests for this pack
sub-skills/
session-and-connection/ connecting, the agent token, get_context, approval, Stop, connection errors
drawing/ documents, draw_from_smiles, draw_from_molfile, add_reaction, placement, convert
edit-by-id/ get_atoms and the 14 edit tools: atoms, bonds, charges, stereo, groups, arrows, text
visual-qa/ render, get_structure, validate and compute_properties to check your own work
+ names-and-spectra/ draw_from_name, name_structure, predict_nmr, predict_spectrum and the spectrum tools
+ three-d/ build_3d, conformers, minimise, scans, measure, PDB files, ligands, 3D export and checks
handoff/ handoff states and notes, what the person sees, Agent Activity
window-commands/ the window's commands through run_command; references/command-catalogue.md
reactions/ reaction schemes, the four reaction tools, Set Reaction Roles
@@ -71,12 +76,18 @@ Paths inside a SUB-SKILL.md resolve against that sub-skill's own folder. `refere
| Draw a structure or reaction from SMILES, a molfile or a reaction SMILES; make, open, save or close a drawing; convert a file or folder | `drawing`, then `visual-qa` |
| Build a structure atom by atom; add or change a bond; set a charge, element, isotope, label, R/S or E/Z; replace a group; delete, move, scale, align or clean up by id; add an arrow, text or caption | `edit-by-id`, then `visual-qa` |
| Does it look right, is it valid, what is its InChIKey, SMILES or molfile, show me | `visual-qa` |
+| Draw caffeine, draw "(2R)-butan-2-ol", what is this structure called, its IUPAC name | `names-and-spectra`, then `visual-qa` |
+| Predict or simulate the 1H or 13C NMR, why is this proton at 4.1, put the predicted spectrum next to it | `names-and-spectra` |
+| Open this .jdx file, pick the IR peaks, integrate the NMR, set this integral to 3, link a peak to atoms, export the spectrum | `names-and-spectra` |
| The reaction in the drawing: steps, roles, atom mapping, reaction SMILES or RXN, balance, moles, yield | `reactions` |
| cLogP, TPSA, Lipinski, the structure check, stereo groups, SMARTS hits, hydrogens, abbreviations, atom lists, R-groups | `structure-analysis` |
| Export a picture or file for the person, print, the clipboard, Standardise, a template, the grid, the dark page, Preferences, any menu command | `window-commands` |
| Run an extension's command, which extensions are installed, read the drawing through an extension | `extension-drawings` |
| Tell the person you are done, ask them something, clear your note | `handoff` |
-| Draw from a name, 3D, type amounts into the Stoichiometry panel | Not yet: say so (names in a later version, 3D in 0.10.0) and offer SMILES, or ask the person |
+| Make it 3D, its conformers or lowest-energy shape, minimise, a torsion scan, a bond length or angle in 3D, does the 3D keep the stereo | `three-d`, then `visual-qa` |
+| Open this PDB or mmCIF file, pull out the ligand, save 3D coordinates as SDF, PDB or XYZ | `three-d` |
+| Show it in 3D, ball and stick, a surface, ESP, a 3D picture or glTF for the person | `three-d`, then `window-commands` |
+| Type amounts into the Stoichiometry panel, xtb or quantum energies | Not yet: say so, or ask the person |
| Change FormChem's own code, add an MCP tool, edit this pack | Not this pack: `formchem-skillset` |
## When something fails
@@ -94,6 +105,16 @@ Paths inside a SUB-SKILL.md resolve against that sub-skill's own folder. `refere
| "already exists" from `save_document` or `convert` | Agent tools never write over a file | Choose a new path, or ask the person to save over it in the window |
| "has unsaved changes" from `close_document` | Only the person may discard changes | `save_document` first, or ask the person |
| "is not available right now" | A window command is off (nothing selected, nothing to undo, a later version) | Do not retry; tell the person the reason it gives |
+| "Could not read the name" | The offline engine refused it (spelling, an inverted index name, D- or L- outside the dictionary, an impossible locant); nothing was drawn | Fix an obvious spelling once; else write the SMILES, use `draw_from_smiles` and say so |
+| `confidence: medium` on a name | A locant was assumed or the name has two readings | Quote the note and say what was drawn; ask if it matters |
+| `names: []` with a reason | No dictionary entry and the namer cannot name it, or the round trip failed | Report the reason; do not invent a systematic name |
+| "is not a spectrum" or "has none" from a spectrum tool | Wrong id, or the drawing holds no spectrum | `open_spectrum` or `predict_spectrum` first; pass `object` from its answer |
+| Predicted links stale after an edit | The curve follows the structure, the marks do not | Ask the person for Refresh Predicted Spectrum, or `run_command {id: "nmr-refresh"}` with that spectrum selected |
+| "stereo changed: lost ..." from `build_3d` | The 3D structure is not the drawn isomer | Do not use the geometry; check the wedges (`stereo`, `get_atoms`) and report it |
+| `unspecified_stereo` or `uff_fallback` note on a build | Centres without wedges were built as one arbitrary isomer; or MMFF94 had no parameters and UFF ran | Pass the note on with the numbers |
+| "No 3D coordinates yet" or "has no conformer" | The structure was never built, or an edit dropped its conformers | `build_3d`, then retry |
+| "The structure changed while 3D was being computed" (409) | Someone edited the structure during the build | Retry once; if it repeats, the person is editing: ask them |
+| `extract_ligand` refuses, or answers "inferred from the geometry" | The object is not a PDB or mmCIF model; or the ligand is outside the template table | Pass the model's `o...` id from `open_3d_structure`; say the bond orders were inferred and show the SMILES |
| `renderer: "engine"` in a picture | No window answered; the engine drew the structures only | Fine for checking structures; say arrows and text were not drawn, or ask the person to open the window |
When a call keeps failing in a way this table does not explain, call the same tool once with the simplest arguments (`get_context`, then `draw_from_smiles {smiles: "C"}`). If that fails too, the problem is the server or the connection, not the plan: report it to the person with the error text.
@@ -102,7 +123,8 @@ When a call keeps failing in a way this table does not explain, call the same to
- `get_context` was called first and its answer shaped the plan.
- Every structure the agent drew was checked: the write result's SMILES or InChIKey matched what was asked, and anything about how it looks was confirmed with `render`.
-- Nothing was claimed that a tool did not say; values were quoted from tool answers.
+- Nothing was claimed that a tool did not say; values were quoted from tool answers, names, predicted shifts, energies and 3D measurements with their method and version.
+- Every 3D geometry used was from a build whose stereo line said every label was kept.
- Every change was one call and one undo step, and none was retried after a refusal or a stop.
- The work ends with a `handoff` (`ready` with a note, or `question` with the question).
diff --git a/.claude/skills/formchem-harness/references/tools.md b/.claude/skills/formchem-harness/references/tools.md
index 3c4793c0..ddf0065c 100644
--- a/.claude/skills/formchem-harness/references/tools.md
+++ b/.claude/skills/formchem-harness/references/tools.md
@@ -1,6 +1,6 @@
# FormChem MCP tools
-Generated by `./formchem agents sync` from the TOOLS list in `backend/app/routers/mcp.py`; edit the server, never this file. 42 tools. Names and arguments are case sensitive. A tool answers with text first, then `structuredContent` where it sends it; a tool that cannot act answers with `isError: true` and a sentence naming the next step.
+Generated by `./formchem agents sync` from the TOOLS list in `backend/app/routers/mcp.py`; edit the server, never this file. 60 tools. Names and arguments are case sensitive. A tool answers with text first, then `structuredContent` where it sends it; a tool that cannot act answers with `isError: true` and a sentence naming the next step.
Read-only tools never ask the person. An approval-gated tool asks the person in the FormChem window the first time (Deny, Allow once, Always allow); agents started in FormChem's own Claude Code, Codex, Cursor or Antigravity tabs are never asked.
@@ -11,9 +11,19 @@ Read-only tools never ask the person. An approval-gated tool asks the person in
- render
- draw_from_smiles
- draw_from_molfile
+- draw_from_name
+- name_structure
- get_structure
- validate
- compute_properties
+- predict_nmr
+- predict_spectrum
+- open_spectrum
+- spectrum_data
+- spectrum_peaks
+- spectrum_pick_peaks
+- spectrum_integrate
+- spectrum_export
- convert
- batch_convert
- list_open_documents
@@ -49,6 +59,14 @@ Read-only tools never ask the person. An approval-gated tool asks the person in
- add_arrow
- add_text
- add_reaction
+- build_3d
+- conformers_3d
+- minimise_3d
+- scan_dihedral
+- measure_3d
+- open_3d_structure
+- extract_ligand
+- export_3d
- Resource
| Tool | Kind |
@@ -57,9 +75,19 @@ Read-only tools never ask the person. An approval-gated tool asks the person in
| `render` | read-only |
| `draw_from_smiles` | approval-gated |
| `draw_from_molfile` | approval-gated |
+| `draw_from_name` | approval-gated |
+| `name_structure` | read-only |
| `get_structure` | read-only |
| `validate` | read-only |
| `compute_properties` | read-only |
+| `predict_nmr` | read-only |
+| `predict_spectrum` | approval-gated |
+| `open_spectrum` | approval-gated |
+| `spectrum_data` | read-only |
+| `spectrum_peaks` | read-only |
+| `spectrum_pick_peaks` | approval-gated |
+| `spectrum_integrate` | approval-gated |
+| `spectrum_export` | read-only |
| `convert` | approval-gated when it changes something |
| `batch_convert` | approval-gated when it changes something |
| `list_open_documents` | read-only |
@@ -95,6 +123,14 @@ Read-only tools never ask the person. An approval-gated tool asks the person in
| `add_arrow` | approval-gated |
| `add_text` | approval-gated |
| `add_reaction` | approval-gated |
+| `build_3d` | approval-gated |
+| `conformers_3d` | approval-gated |
+| `minimise_3d` | approval-gated |
+| `scan_dihedral` | approval-gated when it changes something |
+| `measure_3d` | read-only |
+| `open_3d_structure` | approval-gated |
+| `extract_ligand` | approval-gated |
+| `export_3d` | approval-gated when it changes something |
## get_context
@@ -139,6 +175,29 @@ Draws the structure of an MDL molfile (V2000 or V3000) or the first records of S
| `x` | number | no | Left edge in points; left out: free space |
| `y` | number | no | Top edge in points; left out: free space |
+## draw_from_name
+
+Draws the structure of a chemical name in a drawing, read offline by FormChem: a common name from its dictionary (aspirin, caffeine, THF, L-alanine, Taxol) or a systematic IUPAC name for the common classes (2,2,4-trimethylpentane, (2R)-butan-2-ol, ethyl propanoate, N,N-dimethylpropan-1-amine, pyridine-3-carboxylic acid). Laid out with the scored 2D layout and placed in free space right of or below what is on the page, as one undo step; with no drawing open it makes one. Returns the new ids, SMILES, InChIKey, formula and a picture, plus how the name was read: method (dictionary or systematic parser), confidence (high, or medium when a locant had to be assumed, with the assumption in the notes), engine and version. A name it cannot read is refused with the character where reading stopped; inverted index names and D-/L- outside the dictionary are refused too. Prefer draw_from_smiles when you know the SMILES.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `name` | string | yes | Chemical name, such as aspirin or 2-methylpropan-1-ol (up to 300 characters) |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `x` | number | no | Left edge in points; left out: free space |
+| `y` | number | no | Top edge in points; left out: free space |
+| `label` | string | no | Name given to the new structure; default the name read |
+
+## name_structure
+
+Names structures without changing anything: for SMILES, one object (a fragment or group), the person's selection in the window, or every fragment of a drawing. Each answer lists the common name from FormChem's dictionary when there is one and the systematic IUPAC name from FormChem's rule-based namer, which is only given when it reads back to the same structure (same InChIKey); otherwise no name and the reason (for example salts, unlisted ring systems, stereo outside the parent chain). Every name carries its method, confidence, engine and version.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `smiles` | string | no | SMILES to name instead of a drawing |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | A fragment or group id; left out: every fragment |
+| `selection` | boolean | no | True: the fragments the person has selected in the FormChem window |
+
## get_structure
The structures of a drawing in machine form: SMILES, CXSMILES, InChI, InChIKey, a molfile (V2000, or V3000 when the structure needs it), formula, average and monoisotopic mass, m/z of charged structures and elemental analysis, per fragment. For one object (a fragment or a group), the person's selection in the window (selection true) or every fragment. Does not change the drawing.
@@ -167,6 +226,107 @@ The calculated properties of a drawing's structures per fragment, each with the
| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
| `object` | string | no | One fragment id; left out: every fragment |
+## predict_nmr
+
+Predicted 1H or 13C NMR of a structure with FormChem's own increment rules (method FormChem increments, no shift database): per-atom shifts with a confidence (high, medium, low) and an uncertainty in ppm, signals grouped by symmetry with multiplicity, J values and proton counts, a journal-style line, and warnings (exchangeable, diastereotopic, second order, rotamers). For a fragment of a drawing (doc, object) or SMILES. Does not change the drawing. Predicted values, never measured data.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id; may be left out when the drawing has one fragment |
+| `smiles` | string | no | SMILES instead of a drawing object, such as CCOC(C)=O |
+| `nucleus` | 1H or 13C or both | no | Default 1H |
+| `frequency` | number | no | Spectrometer frequency in MHz for this nucleus (default 400 for 1H, 100 for 13C) |
+
+## predict_spectrum
+
+Adds a predicted 1H or 13C NMR spectrum of a structure to the drawing beside it, as one undo step: a spectrum object whose source names the fragment, method, version and frequency, with multiplets and integrals (1H) or peaks (13C) linked to the structure's atoms; the curve is recomputed from the structure, never stored. Returns the spectrum id, the journal line and the warnings.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | yes | Fragment id from get_atoms or get_structure |
+| `nucleus` | 1H or 13C | no | Default 1H |
+| `frequency` | number | no | MHz; default 400 for 1H, 100 for 13C |
+| `x` | number | no | Left edge in points; left out: right of the structure |
+| `y` | number | no | Top edge in points |
+
+## open_spectrum
+
+Opens a JCAMP-DX spectrum (IR, Raman, UV-Vis, MS or 1D NMR, every compression form, LINK files with several blocks) as a new drawing with one spectrum object per data block, the file kept byte for byte, and shows it in the window. Give the file as text, as base64 or as the absolute path of a .jdx, .dx or .jcamp file. Returns the drawing id and each spectrum's id, technique, nucleus and title, plus the reader's report.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `text` | string | no | The JCAMP-DX file as text, starting with ##TITLE= |
+| `base64` | string | no | The file's bytes as base64, instead of text |
+| `path` | string | no | Absolute path of a .jdx, .dx or .jcamp file, instead of text |
+| `name` | string | no | File name for the drawing's title, such as ir-ethyl-acetate.jdx |
+
+## spectrum_data
+
+The points of a spectrum object (measured or predicted) as the window draws them: x and y decimated to at most points values with min-max buckets so no peak is lost, the axis labels and units, the direction (decreasing: the largest x at the left, as for IR wavenumbers and NMR ppm), the view, the y mode (transmittance or absorbance), the observe frequency for NMR, the method (the JCAMP-DX reader, or the predictor and its version) and the reader's report. Does not change the drawing.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `from` | number | no | Range start in the x unit (cm-1, nm, m/z, ppm) |
+| `to` | number | no | Range end in the x unit |
+| `points` | integer | no | Most points to return (16 to 2000, default 200) |
+| `y_mode` | transmittance or absorbance | no | IR, Raman and UV-Vis only; default the spectrum's own |
+
+## spectrum_peaks
+
+The peaks, integrals and multiplets stored on a spectrum object, each with its id, position, label and the structure atoms it is linked to; with detect true it also runs FormChem's peak picker over the range and lists what it finds without adding anything. Does not change the drawing.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `detect` | boolean | no | Also list the peaks the picker finds |
+| `from` | number | no | Detection range start in the x unit |
+| `to` | number | no | Detection range end in the x unit |
+
+## spectrum_pick_peaks
+
+Finds the peaks of a spectrum in a range (default all of it) and adds them to its peak list as one undo step, skipping peaks already there: minima for transmittance, maxima otherwise, sticks above 1 percent of the base peak for MS, NMR lines above six times the noise.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `from` | number | no | Range start in the x unit |
+| `to` | number | no | Range end in the x unit |
+| `max` | integer | no | Most peaks to add (default 50) |
+| `threshold` | number | no | NMR detection floor in y units |
+| `prominence` | number | no | Smallest prominence in y units of the displayed mode |
+| `replace` | boolean | no | Replace the peak list instead of adding to it |
+
+## spectrum_integrate
+
+Adds NMR integrals over ranges as one undo step (trapezoid area after a straight baseline between the range ends), scaled like the existing integrals; with value the first new region reads value and the rest are rescaled. With id and value it renormalises an existing integral, for example to a proton count.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `from` | number | no | Range start in ppm |
+| `to` | number | no | Range end in ppm |
+| `ranges` | array of array | no | Several [from, to] pairs at once, instead of from and to |
+| `value` | number | no | What the (first new, or the id) integral should read |
+| `id` | string | no | An existing integral id to renormalise to value |
+
+## spectrum_export
+
+A spectrum as a fresh JCAMP-DX 5.01 file (with its peak table when it has peaks), as CSV of every point in display order, or with original true the imported file untouched. The file comes back as text. Does not change the drawing.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Spectrum object id; may be left out when the drawing has one spectrum |
+| `format` | jdx or csv | no | Default jdx |
+| `original` | boolean | no | With jdx: the original imported file |
+
## convert
Converts structures between file formats with the same code as ./formchem convert: input is structure text or the absolute path of a file; the result comes back as text, or is written to output (an absolute path; writing outside the temporary folder asks the person the first time, and an existing file is never written over). Reads SD, SMILES, CXSMILES, InChI, molfile, RXN, reaction SMILES, RD, CML, CDXML, CDX and .fchem; writes smiles, cxsmiles, sdf, molfile, inchi, inchikey, cml, rxn, rsmiles and fchem. Failures are reported per record.
@@ -536,6 +696,101 @@ Draws a reaction scheme from reaction SMILES (reactants>agents>products) as one
| `y` | number | no | Top in points |
| `page` | string | no | Page id; default the first page |
+## build_3d
+
+Builds 3D coordinates for a structure from its 2D drawing as one undo step: ETKDGv3 embedding with a fixed seed (wedges, double-bond geometry and charges kept), then a force-field minimisation, stored as the fragment's one conformer. Answers with the energy, method and engine version, whether every drawn stereocentre was kept, clashes and warnings.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `minimise` | boolean | no | Minimise after embedding (default true) |
+| `method` | MMFF94 or MMFF94s or UFF | no | Force field (default MMFF94; UFF when MMFF94 has no parameters) |
+
+## conformers_3d
+
+Searches conformers of a structure as one undo step: an ETKDGv3 ensemble of n, near duplicates pruned by heavy-atom RMSD, each minimised, then those within window kcal/mol of the lowest, at most keep, replace the fragment's conformers; the lowest becomes the shown one. Answers with relative energies and Boltzmann populations at 298.15 K.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `n` | integer | no | Conformers to embed, 1 to 1000 (default 50) |
+| `window` | number | no | Energy window in kcal/mol (default 10) |
+| `keep` | integer | no | Most conformers kept, 1 to 200 (default 10) |
+| `method` | MMFF94 or MMFF94s or UFF | no | Force field (default MMFF94; UFF when MMFF94 has no parameters) |
+
+## minimise_3d
+
+Minimises a stored conformer (the shown one by default) with a force field as one undo step and reports the energy before and after, the RMS gradient and whether it converged. A structure without 3D coordinates is built first.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `conformer` | string | no | Conformer id (c...); default the shown one |
+| `method` | MMFF94 or MMFF94s or UFF | no | Force field (default MMFF94; UFF when MMFF94 has no parameters) |
+
+## scan_dihedral
+
+Relaxed scan of one dihedral: at each angle from start to end the four atoms' dihedral is held and everything else minimised; answers with angle against relative energy, the minimum and the barrier. Read-only unless store is true, which keeps one conformer per angle as one undo step.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `atoms` | array of string | yes | Four bonded atom ids in a row; a hydrogen at either end as a1:h0 |
+| `start` | number | no | First angle in degrees (default -180) |
+| `end` | number | no | Last angle in degrees (default 180) |
+| `step` | number | no | Step in degrees (default 10) |
+| `method` | MMFF94 or MMFF94s or UFF | no | Force field (default MMFF94; UFF when MMFF94 has no parameters) |
+| `store` | boolean | no | Keep each point as a conformer (default false) |
+
+## measure_3d
+
+Measures a stored conformer: two atoms give a distance in ångström, three an angle and four a signed dihedral in degrees. Atoms are fragment atom ids, hydrogens as a1:h0.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `atoms` | array of string | yes | Two to four atom ids |
+| `conformer` | string | no | Conformer id (c...); default the shown one |
+
+## open_3d_structure
+
+Opens a PDB, mmCIF, SDF or MOL file into a drawing as one undo step: PDB and mmCIF become a 3D object over the file kept byte for byte (cartoon for a protein, ligands as ball and stick, waters hidden, the main ligand focused); SDF and MOL records become structures whose file coordinates are kept as their conformer. Answers with the chains, ligands and waters found.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `path` | string | yes | Absolute path of the .pdb, .ent, .cif, .mmcif, .sdf or .mol file |
+| `as` | model or fragment | no | model (default for PDB and mmCIF) or fragment (default for SDF and MOL) |
+| `x` | number | no | Left in points; default free space |
+| `y` | number | no | Top in points; default free space |
+
+## extract_ligand
+
+Turns a ligand of a 3D object opened from a PDB or mmCIF file into a 2D structure beside it as one undo step: bond orders from a built-in template for common ligands, otherwise inferred from the geometry and reported; the file coordinates become its conformer. Answers with the new fragment id and its SMILES.
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | The 3D object (o...); may be left out when the drawing has one |
+| `ligand` | string | no | Ligand key chain:het:number such as A:ATP:301, or a het code; default the main ligand |
+
+## export_3d
+
+Writes the 3D coordinates of a structure with every hydrogen as MOL (the shown conformer), SDF (every conformer, with energy and method data fields), PDB or XYZ; answers with the text, or writes it to output (never over an existing file).
+
+| Argument | Type | Required | Notes |
+| --- | --- | --- | --- |
+| `doc` | string | no | Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one |
+| `object` | string | no | Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure |
+| `format` | mol or sdf or pdb or xyz | no | Default sdf |
+| `conformer` | string | no | Conformer id, or all; default all for sdf, else the shown one |
+| `output` | string | no | Absolute path of a new file to write; left out, the text comes back |
+
## Resource
`formchem://guide` (text/markdown): what exists in this version, the tools, asking the person and errors.
diff --git a/.claude/skills/formchem-harness/sub-skills/drawing/SUB-SKILL.md b/.claude/skills/formchem-harness/sub-skills/drawing/SUB-SKILL.md
index bdb17e10..1bbf2bce 100644
--- a/.claude/skills/formchem-harness/sub-skills/drawing/SUB-SKILL.md
+++ b/.claude/skills/formchem-harness/sub-skills/drawing/SUB-SKILL.md
@@ -34,6 +34,7 @@ A reaction SMILES (`reactants>agents>products`, such as `CCO.CC(=O)O>[H+]>CC(=O)
| Which drawings are open | `list_open_documents` | id, title, path, unsaved changes, revision, fragments, formula, and `active` (what the window shows) |
| A new empty drawing | `new_document {title?}` | shown in the window; pass its id as `doc` from then on |
| Open a file | `open_document {path}` (absolute) | `.fchem`, molfile, SD, RXN, RD, SMILES, CXSMILES, CML, CDXML, CDX, InChI, or a picture FormChem exported with its drawing; the answer lists the objects and import notes; a file already open is not opened twice |
+| Open a PDB, mmCIF or 3D SD file | `open_3d_structure {path}` (absolute) | a 3D object over the file, or structures with their file coordinates, with the chains, ligands and waters listed (`three-d`) |
| Save | `save_document {doc?, path?}` | to its own file, to `path` (`.fchem` added), or to a free name in the Drawings folder; never over another existing file |
| Close | `close_document {doc?}` | refused while the drawing has unsaved changes: save first, or ask the person |
| Convert text or a file | `convert {input, to, output?, standardise?}` | the result comes back as text, or is written to a new `output`; failed records are listed |
@@ -47,7 +48,7 @@ A reaction SMILES (`reactants>agents>products`, such as `CCO.CC(=O)O>[H+]>CC(=O)
- **x and y are for layouts the person asked for.** Coordinates are points, x right, y down, the top-left of the new drawing. A note warns when that spot overlaps something; move it with `move` rather than drawing again.
- **One call, one step.** A wrong structure is removed with the person's Undo, Agent Activity's Undo, or `delete {ids}`; never by undoing the person's work.
- **Failed input leaves nothing.** When the text cannot be read, a drawing the call made is closed again and nothing is added. Fix the text once, or ask.
-- **Names are not read yet.** For "draw caffeine", write the SMILES yourself and say you did; if you are not sure of it, ask the person for one.
+- **Names go through `draw_from_name`.** For "draw caffeine" or a systematic name, use `draw_from_name` (`names-and-spectra`): it places and answers like `draw_from_smiles` and says how the name was read. Only when FormChem refuses the name, write the SMILES yourself, use `draw_from_smiles`, and say you did.
## Gate
diff --git a/.claude/skills/formchem-harness/sub-skills/names-and-spectra/SUB-SKILL.md b/.claude/skills/formchem-harness/sub-skills/names-and-spectra/SUB-SKILL.md
new file mode 100644
index 00000000..5a0e158e
--- /dev/null
+++ b/.claude/skills/formchem-harness/sub-skills/names-and-spectra/SUB-SKILL.md
@@ -0,0 +1,68 @@
+---
+name: names-and-spectra
+description: "Uses FormChem's 0.9.0 name, NMR prediction and spectrum tools: draw_from_name (a common or systematic name read offline, with method and confidence), name_structure (common and round-trip-checked systematic names), predict_nmr and predict_spectrum (FormChem increments 1H and 13C, journal line, multiplets linked to atoms), open_spectrum for JCAMP-DX files, and spectrum_data, spectrum_peaks, spectrum_pick_peaks, spectrum_integrate and spectrum_export, plus linking peaks to atoms with the window command. Use when the person asks an agent to draw a structure from its name, name a structure, predict or simulate an NMR spectrum, open a .jdx, .dx or .jcamp file, pick peaks, integrate, normalise integrals or export a spectrum in FormChem."
+---
+
+# Names and spectra
+
+## Purpose
+
+Draw from names and name what is drawn, predict NMR spectra, and work on measured spectra, quoting every name and number with the method and version FormChem gives it. Hands back the ids of what was drawn or added, the names or the journal line as FormChem returned them, and how they were made.
+
+## Preconditions
+
+`get_context` has been called (`session-and-connection`). `draw_from_name` needs no drawing (it makes one); `predict_spectrum` and the spectrum tools need a drawing that holds the structure or the spectrum. The writing tools (`draw_from_name`, `predict_spectrum`, `open_spectrum`, `spectrum_pick_peaks`, `spectrum_integrate`) ask the person the first time, like every changing tool.
+
+## Workflow 1: draw from a name
+
+1. **Call `draw_from_name {name}`.** Common names (aspirin, caffeine, THF, L-alanine, Taxol) come from FormChem's dictionary of 629 names; systematic IUPAC names (2,2,4-trimethylpentane, (2R)-butan-2-ol, ethyl propanoate, pyridine-3-carboxylic acid) from its parser. Placement, the write result and the one undo step are those of `draw_from_smiles` (`drawing`).
+2. **Read how it was read.** The text starts "Read [name] by [method] ([confidence] confidence, formchem names 0.9.0) as [SMILES]"; `structuredContent.read` holds `method`, `confidence`, `engine`, `version` and `warnings`. Medium confidence means something was assumed ("propanol" drawn as propan-1-ol) or the name has two readings: say which, quoting the note, and ask the person if it matters.
+3. **On a refusal**, nothing was drawn. The error says why: a character where reading stopped, an inverted index name ("Benzene, 1,2-dichloro-": rewrite it as 1,2-dichlorobenzene), D- or L- outside the dictionary, an impossible structure or locant. Correct an obvious spelling once and retry; otherwise write the SMILES yourself, use `draw_from_smiles`, and say that you did and why.
+4. **Check** with `visual-qa` when the person cares about the exact isomer: compare the InChIKey with one you trust.
+
+## Workflow 2: name a structure
+
+`name_structure {object}` (or `{selection: true}`, `{smiles}`, or nothing for every fragment) answers per structure the common name (`kind: trivial`, method dictionary) and the systematic name (`kind: systematic`, method rule-based namer, round-trip checked), each with its confidence, engine and version. A systematic name is listed only when it parses back to the same InChIKey; otherwise the answer gives the reason (salts and mixtures, unlisted ring systems, stereocentres outside the parent chain). Quote the reason; never invent a systematic name FormChem did not give, and say a name you write yourself is yours.
+
+## Workflow 3: predict NMR
+
+1. **Numbers only:** `predict_nmr {object, nucleus: "1H" | "13C" | "both", frequency?}` (or `{smiles}`) changes nothing. Quote the journal line as given, for example "1H NMR (400 MHz, predicted, FormChem increments 0.9.0): δ 4.10 (q, J = 7.0 Hz, 2H), 2.05 (s, 3H), 1.25 (t, J = 7.0 Hz, 3H)." `signals` add per signal `confidence`, `uncertainty` (ppm), `atoms` and `terms` (the increments behind the shift, for "why is this at 4.10").
+2. **A spectrum on the page:** `predict_spectrum {object, nucleus}` adds one spectrum object beside the structure as one undo step, its multiplets and integrals (1H) or peaks (13C) already linked to atoms. Predict 13C with a second call.
+3. **Say what it is.** Predicted values from FormChem's own increment rules, not measured data and not a database. On molecules it was not tuned on the mean error is about 0.09 ppm (1H) and 1.1 ppm (13C); low-confidence atoms (exchangeable OH and NH, charged atoms, unusual elements) and the warnings (`nmr_exchangeable`, `nmr_diastereotopic`, `nmr_second_order`, `nmr_rotamer`) must be passed on, not dropped.
+4. **After the structure changes,** the predicted curve follows by itself but the multiplets, integrals and peaks do not: tell the person to use Analysis > Refresh Predicted Spectrum, or run `run_command {id: "nmr-refresh"}` while that spectrum is selected or open in the Spectrum editor.
+
+## Workflow 4: measured spectra
+
+| Goal | Call | Notes |
+| --- | --- | --- |
+| Open a JCAMP-DX file | `open_spectrum {path}` (absolute `.jdx`, `.dx` or `.jcamp`), or `{text}` or `{base64}` with `name` | always a new drawing, one spectrum per block, shown in the window; read the `report` lines (repairs, blocks left out) and pass them on |
+| Read it | `spectrum_data {object, from?, to?, points?}` | at most 2000 points (default 200); `direction: decreasing` means the largest x is at the left (IR, NMR); `method` names the reader or the predictor |
+| See what is marked | `spectrum_peaks {object}` | peaks, integrals and multiplets with atom links; `detect: true` lists what the picker would find without adding it |
+| Pick peaks | `spectrum_pick_peaks {object, from?, to?, max?}` | one undo step; peaks already there are skipped and counted; IR in transmittance picks dips |
+| Integrate (NMR) | `spectrum_integrate {object, from, to, value?}`, or `ranges`, or `{id, value}` to renormalise | one undo step; a value rescales every integral, so set the proton count on a clean multiplet first |
+| Link a peak to atoms | `run_command {id: "link-peak-to-atoms", params: {object, peak, fragment, atoms}}` | no MCP tool links; atom ids come from `get_atoms` |
+| Export | `spectrum_export {object, format, original?}` with format `jdx` or `csv` | the file comes back as text; nothing is written |
+
+The data route never invents points: for a predicted spectrum it recomputes from the structure, for a measured one it decimates the file with min-max buckets so no peak is lost. Insert a file into an existing drawing only through the window (Insert > Spectrum from File, `run_command {id: "open-spectrum", params: {path}}`).
+
+## Rules
+
+- **Method and version travel with the value.** Every name, shift and spectrum you report names how FormChem made it; FormChem names 0.9.0 and FormChem increments 0.9.0 at this version.
+- **Refusals are answers.** A refused name or an absent systematic name is reported with its reason, not papered over.
+- **Predicted is not measured.** Never present a predicted shift as an experimental value, and never compare a prediction with a measured spectrum without saying which is which.
+- **One call, one undo step.** Each drawing, prediction, pick or integration is one step the person can undo.
+
+## Gate
+
+- [ ] Every name or shift reported was quoted from a tool answer with its method, confidence where given, and version.
+- [ ] A refused name led to one correction or to SMILES the agent declared as its own, never to a silent substitution.
+- [ ] Predicted values were labelled predicted, and low-confidence atoms and warnings were passed on.
+- [ ] Spectrum changes (peaks, integrals, predicted spectra) were one call each, and the handoff says how to undo them.
+
+## Hands back
+
+The drawing id and the new object or spectrum ids, the names or journal lines as FormChem returned them with their method and version, the warnings and report lines that matter, and a ready handoff.
+
+## Owned resources
+
+None of its own. `references/tools.md` at the pack root lists every argument; `drawing` covers placement and the write result, `visual-qa` the InChIKey check, `window-commands` the spectrum commands of the Analysis menu.
diff --git a/.claude/skills/formchem-harness/sub-skills/session-and-connection/SUB-SKILL.md b/.claude/skills/formchem-harness/sub-skills/session-and-connection/SUB-SKILL.md
index 52f3dc6f..9c8d91bd 100644
--- a/.claude/skills/formchem-harness/sub-skills/session-and-connection/SUB-SKILL.md
+++ b/.claude/skills/formchem-harness/sub-skills/session-and-connection/SUB-SKILL.md
@@ -52,5 +52,5 @@ Agents started from FormChem's own Claude Code, Codex, Cursor or Antigravity tab
## Gate
- [ ] `get_context` was the first call.
-- [ ] The plan uses only the 42 tools in the pack root's `references/tools.md` and the commands and extensions they report.
+- [ ] The plan uses only the 60 tools in the pack root's `references/tools.md` and the commands and extensions they report.
- [ ] No change was attempted after a refusal or a stop, and the agent token never appeared in a reply or a note.
diff --git a/.claude/skills/formchem-harness/sub-skills/structure-analysis/SUB-SKILL.md b/.claude/skills/formchem-harness/sub-skills/structure-analysis/SUB-SKILL.md
index f5e60860..03da30fa 100644
--- a/.claude/skills/formchem-harness/sub-skills/structure-analysis/SUB-SKILL.md
+++ b/.claude/skills/formchem-harness/sub-skills/structure-analysis/SUB-SKILL.md
@@ -22,7 +22,7 @@ Answer chemistry questions about the drawing with FormChem's own numbers, quoted
| Stereo | `stereo {doc?, object?}` | centres, double bonds and axes with label, `state` (defined, undefined, unknown) and group (`abs`, `and1`, `or1`), the stereo groups, the chiral flag and CXSMILES |
| Substructure | `substructure {doc?, smarts or query_object, objects?, chirality?, max_hits?}` | hits with the fragment id, matched atom and bond ids and the query-to-target map; `count`, `truncated` |
-From 0.8.0 `compute_properties` and `validate` are the same answers as `properties` and `check_structure` under the spec's names, and they take the drawing the window shows when `doc` is left out; `validate` adds `valid`. To set R or S on a centre, or E or Z on a double bond, by id, use `set_stereo` (`edit-by-id`), then read it back with `stereo`.
+From 0.8.0 `compute_properties` and `validate` are the same answers as `properties` and `check_structure` under the spec's names, and they take the drawing the window shows when `doc` is left out; `validate` adds `valid`. To set R or S on a centre, or E or Z on a double bond, by id, use `set_stereo` (`edit-by-id`), then read it back with `stereo`. From 0.9.0 `name_structure` gives the common and the round-trip-checked systematic name and `predict_nmr` the predicted 1H and 13C shifts, both read only, each value with its method and version (`names-and-spectra`).
`doc` may be left out when one drawing is open (the four 0.6.0 tools need it when several are open); `object` left out means every fragment. `structuredContent` carries the same JSON as the engine's `/api/analysis` routes. The isotope pattern has no tool: it is in the person's Analysis panel (`show-analysis`).
diff --git a/.claude/skills/formchem-harness/sub-skills/three-d/SUB-SKILL.md b/.claude/skills/formchem-harness/sub-skills/three-d/SUB-SKILL.md
new file mode 100644
index 00000000..01f82aa8
--- /dev/null
+++ b/.claude/skills/formchem-harness/sub-skills/three-d/SUB-SKILL.md
@@ -0,0 +1,66 @@
+---
+name: three-d
+description: "Uses FormChem's 0.10.0 3D tools: build_3d (a conformer from the 2D drawing with ETKDGv3 and MMFF94, MMFF94s or UFF, with the stereo check), conformers_3d (an ensemble in an energy window with populations), minimise_3d, scan_dihedral (a relaxed scan with its barrier), measure_3d (distance, angle, dihedral), open_3d_structure (PDB, mmCIF, SDF, MOL), extract_ligand and export_3d (MOL, SDF, PDB, XYZ), plus the 3D window commands for styles, surfaces and PNG or glTF. Use when the person asks an agent to make a structure 3D, find its conformers or lowest-energy shape, minimise it, scan a torsion, measure a bond length or angle, open a PDB or mmCIF file, pull a ligand out of a protein, or save 3D coordinates in FormChem, and to check that a 3D geometry kept the drawn stereo."
+---
+
+# Three-d
+
+## Purpose
+
+Turn drawn structures into 3D geometry FormChem stores in the drawing, work on that geometry, and open protein files, quoting every energy and measurement with the force field and engine version FormChem gives it. Hands back the fragment and conformer ids, the numbers as returned with their method, the stereo check, and what the person can see in the 3D View.
+
+## Preconditions
+
+`get_context` has been called (`session-and-connection`), and the structure is drawn (`drawing`, `edit-by-id`, `names-and-spectra`). `build_3d`, `conformers_3d`, `minimise_3d`, `open_3d_structure` and `extract_ligand` ask the person the first time; `scan_dihedral` only with `store: true`; `export_3d` only when it writes a file outside the temporary folder; `measure_3d` never asks.
+
+## How 3D is held
+
+A structure's 3D coordinates are its `conformers`, each with an id (`c...`), an energy in kcal/mol, a `method` (`ETKDG` when only embedded, `MMFF94`, `MMFF94s`, `UFF`, or `file` when read from a file) and `converged`; `conformer` names the shown one. Atoms are the fragment atom ids from `get_atoms`; a hydrogen is `a1:h0` (the first hydrogen of `a1`), an atom inside an expanded abbreviation `a5:x0`. Any later edit to the structure's atoms or bonds (element, charge, bond order, wedge, adding or deleting) removes its conformers in the same undo step; moves and colours keep them. So: finish editing, then build.
+
+## Workflow 1: build and check
+
+1. **Call `build_3d {object}`** (`object` may be left out when the drawing has one structure). ETKDGv3 with a fixed seed, then MMFF94 unless `method` says otherwise or `minimise: false`. One undo step.
+2. **Read the stereo line.** The text says "all N stereo labels kept (a3 R, b2 E, ...)" or "stereo changed: lost ...". `report.stereo` has `expected`, `found`, `kept`, `lost`. Lost stereo means the 3D structure is not the drawn one: say so, do not use the geometry, and check the drawing's wedges with `stereo` or `get_atoms`.
+3. **Read the rest.** The energy with its method and engine (`ETKDGv3+MMFF94 (rdkit 2025.09.3)`), the clash count, and the notes: `unspecified_stereo` (centres without wedges: one arbitrary isomer was built; tell the person), `enhanced_stereo` (the drawn member of an AND or OR group was built), `uff_fallback` (no MMFF94 parameters, UFF used: name it), `embed_retry`.
+4. **Verify geometry when it matters** with `measure_3d {atoms: [a, b]}`: a C-O single bond reads about 1.42 Å, C-C about 1.53 Å, aromatic C-C about 1.39 Å. A value far off those means something is wrong with the structure, not with the ruler.
+
+## Workflow 2: conformers, minimisation, scans
+
+| Goal | Call | Notes |
+| --- | --- | --- |
+| Lowest-energy shape, ensemble | `conformers_3d {object, n?, window?, keep?, method?}` | defaults 50, 10 kcal/mol, 10 kept; one undo step; the lowest is shown. Quote relative energies and populations (Boltzmann at 298.15 K over the kept set only). Rotamers that differ only in hydrogens merge, so ethanol keeps one |
+| Tighten a geometry | `minimise_3d {object, conformer?, method?}` | energy before and after, RMS gradient, `converged` (gradient at or below 0.01 kcal/mol/Å); builds first when there is no conformer |
+| Rotational profile | `scan_dihedral {object, atoms: [four bonded in a row], start?, end?, step?}` | relaxed: the angle is held, the rest minimised; answers the minimum and the barrier. Reads only; `store: true` keeps one conformer per angle as one undo step |
+| A distance, angle or dihedral | `measure_3d {object, atoms: [2 to 4], conformer?}` | Å with 3 decimals, degrees with 1; dihedrals signed -180 to 180 |
+
+MMFF94 energies compare conformers of one structure under one force field. They are not heats of formation and do not compare across structures, compositions or force fields. Say that when a person compares them.
+
+## Workflow 3: protein files and ligands
+
+1. **Call `open_3d_structure {path}`** with an absolute `.pdb`, `.ent`, `.cif` or `.mmcif` path. One undo step: a 3D object (`o...`) over the file kept byte for byte, cartoon for a protein, ligands ball and stick, waters hidden, the primary ligand focused. Read the chains, ligand keys (`A:ATP:301`) and the reader's warnings and pass them on. An `.sdf` or `.mol` opens as structures whose conformers are the file's coordinates (method `file`).
+2. **Call `extract_ligand {object?, ligand?}`** with a key or het code, or nothing for the primary ligand. The answer gives the new fragment id and its SMILES, and whether bond orders came "from the template table" (30 common ligands) or were "inferred from the geometry". Say which; an inferred ligand's SMILES needs the person's eye.
+3. **Check it** like any structure (`visual-qa`): `get_structure` and `validate` on the new fragment.
+
+## Workflow 4: export and show
+
+- `export_3d {object, format, conformer?, output?}`: MOL (the shown conformer), SDF (default; every conformer, with energy and method data fields), PDB or XYZ, every hydrogen included. Without `output` the text comes back; with an absolute `output` it writes a new file and never overwrites.
+- Styles, surfaces and pictures are window commands (`window-commands`): `view-3d` opens the 3D View on the selection, then `style-wire`, `style-stick`, `style-ballstick`, `style-spacefill`, `style-cartoon`, `surface-vdw`, `surface-sas`, `surface-ses`, `surface-esp`, `surface-none`; `insert-3d-view` places a 3D view on the page; `export-3d-png` and `export-gltf` save for the person (the agent gets no file). ESP is approximate, from empirical Gasteiger charges, and off for PDB models.
+- `render` shows the page's 3D object as its stored picture, not a live view.
+
+## Rules
+
+- **Method and version travel with the number.** Every energy, barrier, population and measurement names its force field and engine version as FormChem gave them.
+- **Stereo before geometry.** A build is usable only when its stereo line says every label was kept.
+- **Build after editing.** An edit to atoms or bonds drops the conformers; rebuild rather than reuse numbers from before the edit.
+- **No quantum claims.** FormChem has no xtb, CREST or other quantum method; do not describe a force-field energy as anything more.
+
+## Gate
+
+- [ ] Every build reported its stereo line, and a lost label stopped the work with the reason.
+- [ ] Every energy, barrier and measurement was quoted from a tool answer with its method and engine version.
+- [ ] Inferred ligand bond orders and unspecified stereocentres were passed on to the person.
+- [ ] Each changing call was one undo step, and the handoff says what the person will see in the 3D View or on the page.
+
+## Hands back
+
+Fragment, conformer and 3D object ids; the energies, measurements, stereo check and warnings as returned; what was opened, extracted or exported and where.
diff --git a/.claude/skills/formchem-harness/sub-skills/visual-qa/SUB-SKILL.md b/.claude/skills/formchem-harness/sub-skills/visual-qa/SUB-SKILL.md
index 0d6e998e..d46fecae 100644
--- a/.claude/skills/formchem-harness/sub-skills/visual-qa/SUB-SKILL.md
+++ b/.claude/skills/formchem-harness/sub-skills/visual-qa/SUB-SKILL.md
@@ -22,6 +22,12 @@ A drawing exists and its ids are known (from a draw or edit answer, `get_structu
| Is it chemically valid? | `validate {object?}` | `valid`, then each issue's `code`, `severity`, `text`, `atoms`, `bonds` |
| What are its properties? | `compute_properties {object?}` | each value with its `method`; quote both |
| The molfile, InChI or masses | `get_structure {object}` | `molfile` and `molfile_version` (V3000 only when the structure needs it), `inchi`, `mw`, `exact_mass`, `mz` for charged structures |
+| Did a name draw the right isomer? | the `draw_from_name` answer, then `get_structure {object}` | `read.method` and `read.confidence`; compare the InChIKey with one you trust, the second block for stereo |
+| What is it called? | `name_structure {object}` | each name's `kind`, `method` and `confidence`, or the `reason` there is none |
+| Does a spectrum show what was asked? | `spectrum_peaks {object}`, `render {ids}` | peak, integral and multiplet positions with their atom links; the picture for labels and axes |
+| Did a 3D build keep the drawn stereo? | the `build_3d` answer | the stereo line and `report.stereo` (`kept`, `lost`); `clashes`; the notes (`unspecified_stereo`, `uff_fallback`) |
+| Is a 3D geometry plausible? | `measure_3d {atoms}` on bonds you know | C-O about 1.42 Å, C-C about 1.53 Å, aromatic C-C about 1.39 Å; quote the value with its method (`three-d`) |
+| Is an extracted ligand right? | the `extract_ligand` answer, then `validate {object}` and `get_structure {object}` | `bonds` (`template` or `perceived`) and the SMILES; a perceived ligand is shown to the person |
| What did the person select? | `get_structure {selection: true}` or `render {scope: "selection"}` | needs the window open |
| Did a window command work? | the `run_command` answer, then `list_commands {id}` | `checked` for toggles, `off now` with its reason |
diff --git a/.claude/skills/formchem-harness/sub-skills/window-commands/SUB-SKILL.md b/.claude/skills/formchem-harness/sub-skills/window-commands/SUB-SKILL.md
index f27eb4fe..f18eede1 100644
--- a/.claude/skills/formchem-harness/sub-skills/window-commands/SUB-SKILL.md
+++ b/.claude/skills/formchem-harness/sub-skills/window-commands/SUB-SKILL.md
@@ -1,6 +1,6 @@
---
name: window-commands
-description: "Runs the FormChem window's own commands through run_command for what the 0.8.0 drawing tools do not cover: finding commands with list_commands, opening a .fchem or structure file by path with open-recent, inserting a structure with insert-smiles {smiles} or a template with insert-template {id}, undo and redo, select-all, delete, duplicate, flips, rotate-90, align, distribute, stacking order, group and ungroup, clean-structure, layout-structure, check-structure, the 0.6.0 chemistry commands, the 0.7.0 import, export, print, copy, standardise, scale, grid and dark page commands, zoom and the Analysis panel, reading params and off-now states, and telling the person what only they can do. Use when the person asks an agent to open, import, insert, tidy, arrange, resize, export, copy, undo or save something in FormChem, or asks which drawing commands exist."
+description: "Runs the FormChem window's own commands through run_command for what the drawing, name, spectrum and 3D tools do not cover: finding commands with list_commands, opening a file by path with open-recent, insert-smiles {smiles}, insert-name {name}, insert-template {id}, undo and redo, select-all, delete, duplicate, flips, rotate-90, align, distribute, stacking order, groups, clean-structure, layout-structure, check-structure, the chemistry commands, import, export, print, copy, standardise, scale, grid and dark page, the spectrum and NMR commands (link-peak-to-atoms, open-spectrum, nmr-refresh), the 3D commands (view-3d, insert-3d-view, style-ballstick, surface-esp, export-gltf), zoom and the Analysis panel, reading params and off-now states, and telling the person what only they can do. Use when the person asks an agent to open, import, insert, tidy, arrange, resize, export, copy, undo or save something in FormChem, show it in 3D, or asks which drawing commands exist."
---
# Window commands
@@ -27,7 +27,9 @@ Most canvas commands act on the canvas selection. The agent sets the selection t
| Draw or insert a structure from SMILES | Use `draw_from_smiles` (`drawing`): it places the structure in free space and answers with its SMILES, InChIKey and a picture. `run_command {id: "insert-smiles", params: {smiles}}` still works when the person wants it in the middle of the view and selected, so the next selection command acts on it; the answer names the new fragment ids |
| Insert a ring, amino acid, sugar, protecting group, reagent or glassware | `run_command {id: "insert-template", params: {id: "[template id]"}}`: one undo step, centred in view at the drawing's bond length, selected; without `id` it opens the library for the person. Ids such as `benzene`, `l-alanine` come from the engine's `GET /api/templates` |
| Draw by atoms; place an arrow, a caption or text | The edit tools do it by id (`edit-by-id`): `add_atom`, `add_bond`, `add_arrow`, `add_text`. Shapes, brackets and tables have no tool and no drawing command (insert-arrow, insert-shape and insert-table only pick the person's tool): ask the person |
-| Draw from a name | Not yet in any version up to 0.8.0: write the SMILES and use `draw_from_smiles`, saying you did |
+| Draw from a name | Use `draw_from_name` (`names-and-spectra`). `run_command {id: "insert-name", params: {name}}` inserts it the window's way (centred like a template, selected); without `name` it opens Structure from Name for the person. `copy-name` puts the selection's name on the person's clipboard |
+| Spectrum commands: edit, pick peaks, integrate, link a peak, y axis, export, predict, refresh | Prefer the spectrum and NMR tools (`names-and-spectra`). The commands remain for what they add: `link-peak-to-atoms {object, peak, fragment, atoms}` (no tool links), `open-spectrum {path}` (inserts a file into the open drawing), `spectrum-y-mode {object, mode}`, `edit-spectrum` (opens the Spectrum editor for the person), `nmr-refresh` (with a predicted spectrum selected) |
+| Show it in 3D, change the 3D style or surface, put a 3D view on the page, save a 3D picture | Build and measure with the 3D tools (`three-d`). Then `view-3d` (opens the 3D View on the selection), `style-wire`, `style-stick`, `style-ballstick`, `style-spacefill`, `style-cartoon`, `surface-none`, `surface-vdw`, `surface-sas`, `surface-ses`, `surface-esp` (on only while the 3D View is open), `insert-3d-view` (a 3D object beside the selected structure), `export-3d-png {transparent}` and `export-gltf` (saved for the person). `export-3d-file {format, all}` saves MOL, SDF, PDB or XYZ for the person; `export_3d` gives the agent the text |
| Stack or group objects | `bring-front`, `bring-forward`, `send-backward`, `send-back`, `group`, `ungroup` on the selection; off with "Select something on the canvas first" when nothing is selected |
| Anything about the reaction in the drawing | Load `reactions` |
| Undo the last change | `run_command {id: "undo"}`: one transaction, whoever made it |
diff --git a/.claude/skills/formchem-harness/sub-skills/window-commands/references/command-catalogue.md b/.claude/skills/formchem-harness/sub-skills/window-commands/references/command-catalogue.md
index dc93e5af..929cca42 100644
--- a/.claude/skills/formchem-harness/sub-skills/window-commands/references/command-catalogue.md
+++ b/.claude/skills/formchem-harness/sub-skills/window-commands/references/command-catalogue.md
@@ -1,6 +1,6 @@
# Commands that touch a drawing
-The window's command registry, as far as it concerns drawings, for FormChem 0.8.0 (the commands are those of 0.7.0, plus `agent-activity`, which opens Window > Agent Activity for the person). From 0.8.0 the agent's own tools draw, edit, read back, render and convert; this page covers what the window's commands add. This page is a map, not the authority: `list_commands` is. A command marked `off now` there is not available in the running build, whatever this page says, and a command that lists `params` there takes exactly those.
+The window's command registry, as far as it concerns drawings, for FormChem 0.10.0 (the commands of 0.7.0, plus `agent-activity` from 0.8.0, which opens Window > Agent Activity for the person, plus the name, spectrum and NMR commands of 0.9.0, plus the 3D commands of 0.10.0). From 0.8.0 the agent's own tools draw, edit, read back, render and convert; this page covers what the window's commands add. This page is a map, not the authority: `list_commands` is. A command marked `off now` there is not available in the running build, whatever this page says, and a command that lists `params` there takes exactly those.
## Contents
@@ -12,6 +12,8 @@ The window's command registry, as far as it concerns drawings, for FormChem 0.8.
- Stereo, queries and analysis
- Import, export, print and the clipboard
- Standardise and size on the sheet
+- Names, spectra and NMR prediction
+- 3D
- The canvas, the view and the grid
- Registered but off until a later version
- What no command does yet
@@ -106,7 +108,7 @@ From 0.7.0. Exports and copies act on the selection where the command says so, e
| Command | Params | What it does |
| --- | --- | --- |
-| `import` | `path` (absolute, optional) | inserts a chemistry file, a `.fchem` drawing or a picture with its FormChem drawing into the active drawing (a new one when none is open), in free space right of or below what is there, selected, one undo step per file, with the import report for the person; an SD file brings at most 50 structures. The answer names what came in. Without `path` the person picks files in a dialog |
+| `import` | `path` (absolute, optional) | inserts a chemistry file (from 0.10.0 also PDB and mmCIF, as a 3D object), a `.fchem` drawing or a picture with its FormChem drawing into the active drawing (a new one when none is open), in free space right of or below what is there, selected, one undo step per file, with the import report for the person; an SD file brings at most 50 structures. The answer names what came in. Without `path` the person picks files in a dialog |
| `export-png`, `export-svg`, `export-pdf`, `export-eps` | | save the whole page as a picture with the drawing kept inside (300 dpi PNG by default); the desktop app shows the person's save dialog, a browser downloads |
| `export-picture` | | opens the Export Picture dialog for the person (format, scope, resolution, background, scale, margin) |
| `export-cdxml`, `export-mol`, `export-smiles` | | save the page as CDXML, molfile or SMILES; warn and error report items show to the person |
@@ -128,6 +130,46 @@ The agent never receives the saved file or the clipboard text. To read a structu
Zoom never changes the drawing; use these when the person wants a structure larger.
+## Names, spectra and NMR prediction
+
+From 0.9.0. The MCP tools `draw_from_name`, `name_structure`, `predict_nmr`, `predict_spectrum` and the spectrum tools do most of this with answers an agent can read (`names-and-spectra`); these commands are the window's own route. Spectrum commands take `object` and otherwise use the selected spectrum, then the one open in the Spectrum editor, then the only spectrum on the page.
+
+| Command | Params | What it does |
+| --- | --- | --- |
+| `insert-name` | `name` (optional) | reads the name offline and inserts the structure like a template, selected, one undo step; without `name` it opens Structure from Name for the person |
+| `copy-name` | `kind` (`trivial` or `systematic`, optional) | the selection's name on the person's clipboard (Edit > Copy Name) |
+| `predict-nmr-1h`, `predict-nmr-13c` | `object` (fragment id), `frequency` (optional) | a predicted spectrum beside the selected structure, or the only one on the page, one undo step; off with two structures and none selected |
+| `nmr-refresh` | `object` (predicted spectrum id, optional) | moves a predicted spectrum's multiplets, integrals or peaks to match an edited structure, one undo step; on only while a predicted spectrum is selected or open in the Spectrum editor |
+| `open-spectrum` | `path` (absolute `.jdx`, `.dx` or `.jcamp`, optional) | inserts a file's spectra into the open drawing, one undo step per file; without `path` the person picks a file |
+| `edit-spectrum` | `object` | opens the Spectrum editor for the person |
+| `pick-peaks` | `object`, `from`, `to`, `threshold`, `replace` (all optional) | picks peaks in the range (default the range shown), one undo step |
+| `integrate` | `object`, `from`, `to`, `value` | an NMR integral over the range, one undo step; without `from` and `to` it switches the editor to its integrate tool for the person |
+| `link-peak-to-atoms` | `object`, `peak`, `fragment`, `atoms` (list of atom ids) | links a peak, integral or multiplet to atoms of one structure, one undo step; without `atoms` it uses the selected atoms or waits for the person's clicks. The only agent route to atom links |
+| `unlink` | `object`, `peak` | removes a mark's atom link, one undo step |
+| `spectrum-y-mode` | `object`, `mode` (`transmittance` or `absorbance`; leave out to toggle) | IR, Raman and UV-Vis y axis, one undo step |
+| `export-spectrum` | `object`, `format` (`jdx` or `csv`), `original`, `path` (optional) | saves the spectrum for the person, or to `path`; the agent's own copy comes from `spectrum_export` |
+
+## 3D
+
+From 0.10.0, group `3D`. Building, conformers, minimising, scans, measuring, opening and extracting also have MCP tools (`three-d`); prefer them, because they answer with the numbers. The commands add the 3D View panel, its styles and surfaces, and the files saved for the person. Commands marked "while the 3D View is open" are off with "Open the 3D View first" otherwise.
+
+| Command | Params | What it does |
+| --- | --- | --- |
+| `view-3d` | | opens the 3D View panel on the selected structure or 3D object and follows the selection (Mod+3; checked while open); running it again with no 3D object selected closes it |
+| `build-3d` | | builds a conformer of the selected structure with the panel's force field, one undo step (`build_3d` answers with the stereo check) |
+| `minimize-3d` | | minimises the shown conformer, one undo step |
+| `conformers` | `n` (1 to 1000), `window` (kcal/mol), `method` (`MMFF94`, `MMFF94s`, `UFF`) | a conformer search without the dialog; without `n` it opens the Conformers dialog for the person |
+| `dihedral-scan` | | opens the Dihedral Scan dialog on the four atoms picked in the panel, for the person (while the 3D View is open) |
+| `measure-3d` | `atoms` (two to four ids: `a1`, `a1:h0`, or PDB serial numbers) | measures in the panel and lists it (kept on a bound 3D object); answers `{kind, value, atoms}`; without `atoms` it switches the panel to picking (while the 3D View is open) |
+| `insert-3d-view` | | places a 3D object beside the selected structure (building first when it has no conformer) and binds the panel to it, one undo step |
+| `open-3d-structure` | | the person picks a PDB, mmCIF, SDF or MOL file; it is placed as a 3D object or as structures. For an agent, `open_3d_structure {path}` |
+| `extract-ligand` | `ligand` (`A:ATP:301` or a het code, optional) | a ligand of the selected (or bound) PDB or mmCIF model as a structure beside it, one undo step; without `ligand` and with several ligands it asks the person |
+| `style-wire`, `style-stick`, `style-ballstick`, `style-spacefill`, `style-cartoon` | | the panel's display style; on a bound 3D object the style, picture and camera are saved, one undo step per burst (while the 3D View is open) |
+| `surface-none`, `surface-vdw`, `surface-sas`, `surface-ses`, `surface-esp` | | the panel's surface; ESP colours it by approximate Gasteiger charges, off for PDB models (while the 3D View is open) |
+| `export-3d-png` | `transparent` (boolean) | saves the 3D View as PNG for the person (while the 3D View is open) |
+| `export-gltf` | | saves the 3D View as binary glTF (`.glb`) for the person (while the 3D View is open) |
+| `export-3d-file` | `format` (`mol`, `sdf`, `pdb`, `xyz`), `all` (every conformer) | saves the selected structure's 3D coordinates for the person, or a PDB or mmCIF model's original file; without `format` it opens the dialog. For text the agent reads, `export_3d` |
+
## The canvas, the view and the grid
| Command | What it does |
@@ -149,8 +191,8 @@ Zoom never changes the drawing; use these when the person wants a structure larg
## Registered but off until a later version
-`insert-name` (0.9.0); the 3D commands `view-3d`, `build-3d`, `minimize-3d`, `conformers` (0.10.0); `demos` (0.13.0). Every 0.7.0 placeholder is now a working command. Running an off one returns "is not available right now: Arrives in [version]". Say so; do not retry.
+`demos` (0.13.0). Every 0.7.0, 0.9.0 and 0.10.0 placeholder is now a working command (`insert-name`, `view-3d`, `build-3d`, `minimize-3d` and `conformers` among them). Running an off one returns "is not available right now: Arrives in [version]". Say so; do not retry.
## What no command does yet
-Selecting particular atoms or objects, typing stoichiometry amounts, and filling the person's dialogs (atom list, R-group, abbreviation label). Drawing atoms, bonds, arrows and text at given positions, reading the structure back, rendering and converting are not commands: the 0.8.0 tools do them (`drawing`, `edit-by-id`, `visual-qa`). An installed extension with the `document` permission can also read and change the drawing (`extension-drawings`).
+Selecting particular atoms or objects, typing stoichiometry amounts, and filling the person's dialogs (atom list, R-group, abbreviation label). Drawing atoms, bonds, arrows and text at given positions, reading the structure back, rendering and converting are not commands: the 0.8.0 tools do them (`drawing`, `edit-by-id`, `visual-qa`). Reading a spectrum's points, its peaks or the predicted shifts as data is not a command either: the 0.9.0 tools do it (`names-and-spectra`). Nor is reading conformer energies, a scan profile or a 3D measurement as data, or 3D coordinates as text: the 0.10.0 tools do it (`three-d`). Picking atoms in the 3D View, choosing the shown conformer and running a scan from the dialog belong to the person. An installed extension with the `document` permission can also read and change the drawing (`extension-drawings`).
diff --git a/.claude/skills/formchem-skillset/EVALS.json b/.claude/skills/formchem-skillset/EVALS.json
index 95dd8f8c..3b0745e9 100644
--- a/.claude/skills/formchem-skillset/EVALS.json
+++ b/.claude/skills/formchem-skillset/EVALS.json
@@ -1,6 +1,6 @@
{
"skill_name": "formchem-skillset",
- "notes": "Run in a FormChem checkout at 0.8.0 with CLAUDE.md present. Expected behaviours are observable in the files read, the edits made and the commits.",
+ "notes": "Run in a FormChem checkout at 0.10.0 with CLAUDE.md present. Expected behaviours are observable in the files read, the edits made and the commits.",
"evals": [
{
"id": 1,
@@ -212,6 +212,97 @@
"Keeps undone true while the call's transaction is not back on the undo stack, rather than reading the redo stack alone",
"Leaves the window mirror (app/agent-calls.ts) to follow the engine's agentCall messages instead of computing undone itself"
]
+ },
+ {
+ "id": 20,
+ "name": "add-a-dictionary-entry",
+ "prompt": "FormChem does not know the name 'sulfanilamide'; add it.",
+ "files": [],
+ "expected_behavior": [
+ "Loads the names-and-spectra sub-skill and clean-room, and adds one entry by hand to the right file under backend/app/data/names/ (drugs.json) with name, a SMILES it wrote itself and the standard InChIKey computed with RDKit",
+ "Runs dictionary.verify() from backend/ and reports that problems is empty and the entry count went up by one",
+ "Does not copy the entry from a database or another program's list, and writes no test file"
+ ]
+ },
+ {
+ "id": 21,
+ "name": "add-a-ring-parent",
+ "prompt": "Make FormChem read and write names on the thiadiazole ring (1,3,4-thiadiazole).",
+ "files": [],
+ "expected_behavior": [
+ "Adds a Ring to services/names/rings.py whose SMILES atom order follows the IUPAC numbering of 1,3,4-thiadiazole, with its aliases",
+ "Checks both directions in a scratch shell: a substituted name parses to the expected InChIKey, and naming that structure round-trips to the same InChIKey",
+ "Records the decision in backend/HASHOUT_LOG.md and updates the ring list in docs/NAMES.md"
+ ]
+ },
+ {
+ "id": 22,
+ "name": "tune-an-increment-without-overfitting",
+ "prompt": "The predicted 13C shift of the CH2 in triethylamine is off by a few ppm in FormChem; improve it.",
+ "files": [],
+ "expected_behavior": [
+ "Loads names-and-spectra, runs python -m app.services.nmr.accuracy --holdout --molecules and --calibration from backend/ before changing anything, and quotes the tables",
+ "Changes a general rule in services/nmr/carbon.py (an amine alpha or branching term) rather than a term that only touches triethylamine",
+ "Runs the accuracy script again, shows the holdout 13C MAE did not get worse, and updates docs/SPECTRA.md and the CHANGELOG only if the published figures changed"
+ ]
+ },
+ {
+ "id": 23,
+ "name": "register-another-name-engine",
+ "prompt": "We want OPSIN as an optional name to structure engine in FormChem. Wire it in.",
+ "files": [],
+ "expected_behavior": [
+ "Writes backend/app/services/names/opsin.py with a class meeting the NameEngine protocol, running OPSIN as a separate process, and registers it with names.register(..., first=True)",
+ "Leaves routers/names.py, the window and mcp.py unchanged, since they call names.engine()",
+ "Adds the NOTICE.md row and asks the owner before shipping a new runtime, and makes every result name the opsin engine and its version"
+ ]
+ },
+ {
+ "id": 24,
+ "name": "add-a-3d-display-style",
+ "prompt": "Add a licorice display style to FormChem's 3D View.",
+ "files": [],
+ "expected_behavior": [
+ "Loads three-d and document-format, and changes the display enum in docs/FORMAT.md, frontend/src/engine/model.ts and backend/app/services/model.py in one change",
+ "Adds the style to atomStyle and the glTF radii in ui/view3d-viewer.ts, to DISPLAYS in ui/view3d-panel.ts, and a style-licorice command with its id in VIEW3D_COMMAND_IDS and DISPLAY_3D in app/menus.ts",
+ "Passes the new labels to t() whole and runs ./formchem i18n scan --write; adds no static import of 3dmol",
+ "Writes a frontend HASHOUT entry and does not write tests"
+ ]
+ },
+ {
+ "id": 25,
+ "name": "conformers-survive-a-charge-edit",
+ "prompt": "In FormChem, after I change an atom's charge the 3D View still shows the old conformer until I reload. Fix it.",
+ "files": [],
+ "expected_behavior": [
+ "Loads three-d and reads backend/app/services/three_d/stale.py, frontend/src/engine/stale.ts and the conformers clause of docs/FORMAT.md",
+ "Checks that charge is in both field lists and that client.commit appends the conformer unsets to the window's own transaction, and that confirm applies the engine's appended drops",
+ "Keeps stale.py, stale.ts and FORMAT.md in agreement and confirms undo restores the conformers",
+ "Verifies in a scratch engine or browser outside the repository, not with a test file"
+ ]
+ },
+ {
+ "id": 26,
+ "name": "xtb-as-a-method",
+ "prompt": "Let FormChem minimise with xtb when it is installed.",
+ "files": [],
+ "expected_behavior": [
+ "Loads clean-room and three-d, and notes that plan question Q9 is open, so xtb is only a program the person installs and points to by path, run as a separate process and never bundled or linked",
+ "Adds the method to METHODS and forcefield (or a separate runner) with its own method label and version, to FORCE_FIELDS in three-api.ts, the panel's select and _FF in mcp.py",
+ "Stores energies under method xtb, never mixed with MMFF94 energies, and asks the owner before adding any download",
+ "Updates docs/3D.md and the HASHOUT log"
+ ]
+ },
+ {
+ "id": 27,
+ "name": "new-3d-export-desktop-save",
+ "prompt": "I added a .usdz export to the FormChem 3D View; it downloads in the browser but the desktop app refuses to save it.",
+ "files": [],
+ "expected_behavior": [
+ "Loads three-d and formats-and-export, and follows saveFile in app/save-file.ts to POST /api/files/write",
+ "Finds that SUFFIXES in backend/app/routers/files.py lacks .usdz (as it lacked .glb, .cif, .mmcif and .ent until 0.10.0) and adds it by hand",
+ "Updates the extension list in docs/FORMATS.md and writes a backend HASHOUT entry"
+ ]
}
],
"trigger_evals": [
@@ -256,6 +347,17 @@
{"query": "update the extension catalogue page in FormPortal", "should_trigger": false},
{"query": "scaffold a Tauri 2 shell for my new todo app", "should_trigger": false},
{"query": "write an RDKit script that computes logP for a CSV of SMILES", "should_trigger": false},
- {"query": "map the atoms of the reaction in my open FormChem drawing", "should_trigger": false}
+ {"query": "map the atoms of the reaction in my open FormChem drawing", "should_trigger": false},
+ {"query": "add a ring parent to formchem's name parser in services/names/rings.py", "should_trigger": true},
+ {"query": "the formchem JCAMP-DX reader misreads a DIFDUP file", "should_trigger": true},
+ {"query": "why is formchem's predicted 1H shift for anisole's OCH3 too low", "should_trigger": true},
+ {"query": "predict the 1H NMR of the structure in my open FormChem drawing", "should_trigger": false},
+ {"query": "draw caffeine from its name in formchem", "should_trigger": false},
+ {"query": "formchem's build 3D loses a wedge on this steroid; look at services/three_d/verify.py", "should_trigger": true},
+ {"query": "add a mol2 reader to formchem's 3D structure file import", "should_trigger": true},
+ {"query": "the 3D object on the formchem page flashes when I change its style", "should_trigger": true},
+ {"query": "add a surface option to FormChem's 3D View panel in frontend/src/ui", "should_trigger": true},
+ {"query": "give me the lowest-energy conformer of the structure in my open FormChem drawing", "should_trigger": false},
+ {"query": "open this PDB file in formchem and extract the ligand for me", "should_trigger": false}
]
}
diff --git a/.claude/skills/formchem-skillset/SKILL.md b/.claude/skills/formchem-skillset/SKILL.md
index 4bde2c2d..68284afc 100644
--- a/.claude/skills/formchem-skillset/SKILL.md
+++ b/.claude/skills/formchem-skillset/SKILL.md
@@ -1,17 +1,17 @@
---
name: formchem-skillset
-description: "Guides development of the FormChem codebase, the FormAI family's chemical structure drawing suite. Use whenever a task changes, fixes or explains FormChem code: the document format (FORMAT.md, model.ts, model.py, ops, undo), the engine store, the RDKit service (identifiers, the scored 2D layout, CIP, stereo groups, abbreviations, queries, SMARTS, R-groups, properties, the structure check), reactions, file formats and loss reports, picture export with the embedded drawing, the clipboard, the command line, Standardise, the SVG canvas, dark page, grids, scaling, tools, annotations, the shell, menus, the dock, Form extensions, the MCP server and agent tools (agent_out, agent_edits, agent_log, the render bridge, the agent token, Agent Activity), the Tauri shell and one-folder engine, or a release. Trigger on FormChem or formchem with backend/app, frontend/src, src-tauri, FORMAT.md, port 8220 or 5220. Not for using FormChem (formchem-harness), other Form apps such as FormDeck, or standalone RDKit scripts."
+description: "Guides development of the FormChem codebase, the FormAI family's chemical structure drawing suite. Use whenever a task changes, fixes or explains FormChem code: the document format (FORMAT.md, model.ts, model.py, ops, undo), the RDKit service (identifiers, the scored 2D layout, CIP, stereo groups, abbreviations, queries, R-groups, properties), reactions, file formats and loss reports, picture export, the clipboard, the command line, Standardise, the SVG canvas, grids, scaling, tools, annotations, names (dictionary, parser, namer), NMR prediction (increments), JCAMP-DX spectra, 3D (build, conformers, force fields, PDB and mmCIF, the 3D View, glTF), the shell, menus, the dock, Form extensions, the MCP server and agent tools (agent_edits, agent_log, the agent token), the Tauri shell, or a release. Trigger on FormChem or formchem with backend/app, frontend/src, src-tauri, FORMAT.md, port 8220 or 5220. Not for using FormChem (formchem-harness), other Form apps such as FormDeck, or standalone RDKit scripts."
license: Apache-2.0
metadata:
author: nodemode-ai
- version: "0.8.0"
+ version: "0.10.0"
---
# FormChem skillset
Route every change to FormChem's code through this file. It maps the subsystems that exist today, states the laws that hold everywhere and names the specialist to load. FormChem is a Python 3.12 FastAPI engine (`backend/`, port 8220), a vanilla TypeScript and Vite window (`frontend/`, port 5220, no framework) that talks to the engine over REST and one WebSocket, and a Tauri 2 shell (`src-tauri/`) that runs the frozen engine from a folder inside the app on macOS and as a sidecar elsewhere.
-**Where FormChem is (0.8.0).** Phases 1 and 2 built the family skeleton and shell. 0.3.0 added the document format and ops, the engine's document store with undo, autosave, versions and importers, the RDKit chemistry service, and the window's document client and local chemistry. 0.4.0 added the 2D canvas: the SVG renderer, the drawing tools and hover hotkeys, the canvas view with hit testing, selection, context menus and the tool rail. 0.5.0 added reactions and annotations: every drawn object kind through one renderer registry with its tool and handles, z-order and groups, the engine's reaction perception, mapping, balance, stoichiometry and RXN exchange with the Reaction menu and four MCP tools, the Stoichiometry panel, the template library and media. 0.6.0 added stereo, queries and analysis: enhanced stereo, CIP, wedges, abbreviations, hydrogens, queries and SMARTS, substructure search, R-groups and Markush, properties with methods, the structure check, the isotope pattern, the `/api/analysis` router with four read-only MCP tools, the marks layer and the chemistry commands. 0.7.0 added formats and exchange (readers, writers and report items, CDXML and CDX through Indigo, pictures with the embedded drawing and the engine's own PDF and EPS writer, print, the clipboard, File > Import, the command line, Standardise) plus the desktop test fixes: the one-folder macOS engine, the scored 2D layout, the dark page, scaling, grids and snapping, the folding menu row and the quick command state mirror. 0.8.0 adds the agent tools (42 MCP tools: documents, drawing, `render` through the window, reading back, conversion, 14 edit tools by id), the agent call log with Agent Activity and Stop, and the agent token. Names, spectra (0.9.0) and 3D (0.10.0) come later (`DEV_PLAN.md`). Do not write a later phase's code ahead of it; its commands stay registered and disabled.
+**Where FormChem is (0.10.0).** Through 0.9.0: the family shell, the document format, store and RDKit service, the canvas, reactions, stereo and analysis, formats and pictures, the agent tools with Agent Activity and the token, names, NMR prediction and spectra (`CHANGELOG.md`). 0.10.0 adds 3D: builds from 2D with a stereo check, conformers, force fields, scans, PDB and mmCIF files, the 3D View, model3d objects and eight more MCP tools (60). The structure database (0.11.0) comes later (`DEV_PLAN.md`). Do not write a later phase's code ahead of it; its commands stay registered and disabled.
## Subsystem map
@@ -21,13 +21,15 @@ Route every change to FormChem's code through this file. It maps the subsystems
| Engine document store: open documents, transactions, undo and redo, autosave, versions, recovery, the `.fchem` package, importers, the live `tx` messages | `backend/app/services/store.py`, `services/history.py`, `services/package.py`, `services/importers.py`, `routers/documents.py`, `core/files.py` | `engine` |
| The format contract: document.json, styles, ids, ops and inverses, transactions, validation, coalescing, the derived cache shape | `docs/FORMAT.md`, `frontend/src/engine/model.ts`, `engine/ops.ts`, `backend/app/services/model.py`, `services/ops.py` | `document-format` |
| Chemistry engine on RDKit: conversion, sanitising, valence, aromaticity, identifiers, formula, masses, layout, file reading and writing, the derived cache | `backend/app/services/chem/`, `backend/app/routers/chem.py` | `chemistry-engine` |
-| Window documents and chemistry: the document client and session, the actions behind File and Insert, the Analysis panel, local valence, rings, labels and formula | `frontend/src/engine/client.ts`, `engine/session.ts`, `engine/client-api.ts`, `app/documents.ts`, `ui/analysis-panel.ts`, `frontend/src/chem/` | `window-shell` (chemistry rules in `chemistry-engine`) |
-| Canvas: SVG renderer, drawing tools and hover hotkeys, view, hit testing, selection, text editor, canvas context menus, tool rail; from 0.7.0 the dark page, grids and snapping, scale handles | `frontend/src/canvas/` (`render/`, `tools/`, `dark-page.ts`, `grid.ts`, `grid-layer.ts`, `tools/scale.ts`, `geom.ts`, `view.ts`, `hit.ts`, `selection.ts`, `text-editor.ts`, `context.ts`, `types.ts`), `ui/tool-rail.ts`, `styles/canvas.css`, `styles/canvas-view.css`, `styles/tool-rail.css`, `public/fonts/` | `canvas` |
+| Window documents and chemistry: the document client, File and Insert actions, the Analysis panel, local valence, rings and formula | `frontend/src/engine/client.ts`, `engine/session.ts`, `engine/client-api.ts`, `app/documents.ts`, `ui/analysis-panel.ts`, `frontend/src/chem/` | `window-shell` (chemistry rules in `chemistry-engine`) |
+| Canvas: SVG renderer, drawing tools and hover hotkeys, view, hit testing, selection, text editor, canvas context menus, tool rail; from 0.7.0 the dark page, grids and snapping, scale handles | `frontend/src/canvas/` (`render/`, `tools/`, `view.ts`, `hit.ts`, `selection.ts`, `context.ts`, the grid and dark page files), `ui/tool-rail.ts`, `styles/canvas*.css`, `public/fonts/` | `canvas` |
| Drawn objects: the object kind registry and kind modules, anchors, bounds, drawn-outline hits, annotation tools and handles, captions, z-order and groups, the template library, media | `frontend/src/canvas/render/objects.ts` and its kind modules, `canvas/hit-objects.ts`, `canvas/tools/objects.ts`, `tools/handles.ts`, `app/object-commands.ts`, `ui/template-*.ts`, `backend/app/services/templates.py`, `routers/templates.py`, `backend/app/data/templates/`, the media routes in `routers/documents.py` | `annotations` |
| Reactions: perception, atom mapping, balance, stoichiometry (engine and window), reaction SMILES and RXN, the Reaction menu, the MCP reaction tools | `backend/app/services/chem/` (`geometry`, `reactions`, `mapping`, `balance`, `stoich`, `rxnio`, `scheme`), `routers/reactions.py`, `frontend/src/chem/stoich.ts`, `ui/stoich-panel.ts`, `app/reaction-commands.ts`, `engine/reactions-api.ts`, `docs/REACTIONS.md` | `reactions` |
-| Stereo, queries and analysis: stereo groups, CIP report, wedges, abbreviations, hydrogens, queries and SMARTS, substructure search, V3000 queries, Markush, properties, the structure check, the isotope pattern, their routes, tools, commands, marks and panels | `backend/app/services/chem/` (`stereo`, `superatom`, `hydrogens`, `query`, `search`, `v3000`, `markush`, `props`, `check`, `isotopes`), `routers/analysis.py`, `frontend/src/engine/analysis-api.ts`, `app/chem-edits.ts`, `app/chem-commands.ts`, `canvas/render/marks-*.ts`, the 0.6.0 dialogs in `ui/`, `docs/ANALYSIS.md` | `stereo-and-queries` |
-| Formats and export: the formats table, report items, readers and writers, CDXML and CDX through Indigo, RD files, CML, the export, parse, import and file write routes, pictures (SVG, PNG, PDF, EPS) with the embedded drawing, the save path, print, the import report, File > Import | `backend/app/services/chem/` (`formats`, `report`, `io`, `writers`, `cdxio`, `rdfio`, `cml`), `services/embedded_source.py`, `services/pictures/`, `services/importers.py`, `routers/files.py`, `routers/pictures.py`, `frontend/src/app/` (`picture`, `embedded-source`, `save-file`, `export-commands`, `print`, `import-files`), `ui/export-dialog.ts`, `ui/import-report.ts`, `docs/FORMATS.md` | `formats-and-export` |
+| Stereo, queries and analysis: stereo groups, CIP, wedges, abbreviations, hydrogens, queries, SMARTS, Markush, properties, the structure check, the isotope pattern, their routes, commands, marks and panels | `backend/app/services/chem/` (`stereo`, `superatom`, `hydrogens`, `query`, `search`, `v3000`, `markush`, `props`, `check`, `isotopes`), `routers/analysis.py`, `frontend/src/engine/analysis-api.ts`, `app/chem-*.ts`, `canvas/render/marks-*.ts`, `docs/ANALYSIS.md` | `stereo-and-queries` |
+| Formats and export: the formats table, report items, readers and writers (CDXML and CDX through Indigo, RD, CML), the export, parse, import and file write routes, pictures with the embedded drawing, the save path, print, File > Import | `backend/app/services/chem/` (`formats`, `report`, `io`, `writers`, `cdxio`, `rdfio`, `cml`), `services/embedded_source.py`, `services/pictures/`, `services/importers.py`, `routers/files.py`, `routers/pictures.py`, `frontend/src/app/` (`picture`, `embedded-source`, `save-file`, `export-commands`, `print`, `import-files`), `ui/export-dialog.ts`, `ui/import-report.ts`, `docs/FORMATS.md` | `formats-and-export` |
| Clipboard: the native payload and paste plan, text formats, flavours per platform, Copy As, Paste Special, Duplicate | `frontend/src/app/clip-*.ts`, `app/clipboard.ts`, `ui/paste-special-dialog.ts`, `ui/native-menu.ts` `ALWAYS_NATIVE` | `clipboard` |
+| Names, NMR prediction and spectra: name engines, dictionary, parser, namer; increments and predicted spectra; the JCAMP-DX reader, peaks, integrals; the name dialog, spectrum kind, atom links, Spectrum editor | `backend/app/services/` (`names/`, `nmr/`, `spectra/`), `data/names/`, `routers/` (`names`, `nmr`, `spectra`), the window files in the specialist's file map, `docs/NAMES.md`, `docs/SPECTRA.md` | `names-and-spectra` |
+| 3D: builds, conformers, force fields, scans, measurements, PDB and mmCIF, ligands, the stale-conformer rule; the 3D View, model3d snapshots, glTF | `backend/app/services/three_d/`, `routers/three_d.py`, `frontend/src/ui/view3d-*.ts`, `canvas/render/model3d.ts`, `io/glb.ts`, `engine/three-api.ts`, `engine/stale.ts`, `docs/3D.md` | `three-d` |
| Command line and batch: convert, batch, descriptors, render, the stream reader, Standardise (engine, route, dialog) | `backend/app/cli.py`, `services/batch.py`, `services/chem/` (`stream`, `records`, `standardise`, `depict`), `setup/convert`, `frontend/src/ui/standardise-dialog.ts`, `app/standardise-command.ts`, `docs/CLI.md` | `command-line` |
| Window shell: app root, command registry, palette, Home, title bar, status bar, Preferences, dialogs, themes, i18n, styles | `frontend/src/app.ts`, `app/commands-shell.ts`, `commands/registry.ts`, `io/`, `ui/`, `i18n/`, `styles/` | `window-shell` |
| Menus: in-window menu bar, native macOS menus, context menus | `frontend/src/ui/menu.ts`, `ui/native-menu.ts`, `ui/context-menu.ts`, `app/menus.ts`, `styles/menu.css` | `menus` |
@@ -66,6 +68,9 @@ app/clip-*.ts, import-files -> engine/model, ops, the export and parse routes;
services/chem/writers, stream -> formats, report, io, rdkit, indigo (never the store)
services/batch.py, app/cli.py -> chem/stream, records, standardise, depict, props (never routers or the store)
services/pictures/ -> fontTools and the bundled fonts only
+services/names, nmr, spectra -> rdkit, numpy, chem (never routers); nmr registers its hook in spectra.source.PREDICTORS
+services/three_d -> rdkit, numpy, chem (never routers); store.apply_now runs three_d.stale
+ui/view3d-lib.ts -> 3dmol by dynamic import only (nothing 3D at startup)
window-only abilities -> reach the engine as window tools over /api/live (bridge.window_call)
desktop shell -> frozen engine (formchem_engine.py) -> serves frontend/dist
```
@@ -95,13 +100,15 @@ The window reaches the engine only through `frontend/src/io/api.ts` (REST with t
| Opening, saving, undo, autosave, versions, recovery, importing a structure file into a new drawing | `engine`, then `document-format` for the ops |
| A new field or object kind, an op or path problem, a validation error, coalescing, the `.fchem` package shape | `document-format` |
| SMILES, InChI, formula, masses, implicit hydrogens, valence errors, warnings, 2D clean-up or layout, a structure file reader or writer, the derived cache | `chemistry-engine` |
-| Drawing on the canvas: how a bond, label or wedge renders, a drawing tool, a hover hotkey, snapping, hit testing, selection, zoom and pan, the tool rail, canvas right-click menus | `canvas` |
-| An arrow, bracket, shape, line, table, TLC plate, orbital, picture or caption: drawing, hitting, handles, its tool; z-order and groups; a template; picture upload | `annotations`, with `canvas` for the laws it builds on |
+| How a bond, label or wedge renders, a drawing tool, a hover key, hit testing, selection, zoom, the tool rail, canvas context menus | `canvas` |
+| An arrow, bracket, shape, table, TLC plate, orbital, picture or caption, its handles and tool; z-order, groups, templates | `annotations`, with `canvas` for the laws it builds on |
| Reaction roles, atom mapping, balance, the stoichiometry panel or grid, reaction SMILES or RXN, a reaction route, command or MCP tool | `reactions`, with `chemistry-engine` for RDKit and `agents` for a tool |
| A CIP label, stereo group, wedge, abbreviation, explicit hydrogen, atom list, query bond, SMARTS, substructure hit, R-group, property, check issue or isotope peak; an `/api/analysis` route, an analysis MCP tool, a stereo or query mark | `stereo-and-queries`, with `chemistry-engine` for the converter and `agents` for a tool |
| A file that opens wrong or loses something, an export or import report, a new format, File > Import, picture export, the drawing inside a picture, saving in the desktop app, print | `formats-and-export`, with `chemistry-engine` for RDKit and `clean-room` for a new format |
| Copy, Cut, Paste, Copy As, Paste Special, Duplicate, a clipboard flavour on one platform | `clipboard`, with `formats-and-export` for the text formats and pictures |
| `./formchem convert`, `batch`, `descriptors`, `render`, the stream reader, per-record failures, Standardise | `command-line`, with `chemistry-engine` for RDKit |
+| A name read wrong, a dictionary entry, a ring parent, OPSIN; a predicted shift, an increment, a predictor; a JCAMP-DX file, the spectrum plot, peaks, integrals, atom links, the Spectrum editor | `names-and-spectra` (`clean-room` first; `canvas` for the renderer, `document-format` for the spectrum object) |
+| A 3D build, conformer, scan, measurement or surface; a PDB or mmCIF file or ligand; the 3D View, a 3D object on the page, glTF; conformers after an edit | `three-d` (`document-format` for `conformers` and `model3d`, `agents` for a tool) |
| A crowded or crossing 2D layout, Lay Out or Clean Up | `chemistry-engine` (the scored layout) |
| The dark page, a grid type, snapping, scale handles, Scale Up and Down | `canvas`, with `document-format` for `style.grid` |
| New, Open, Save, Insert from SMILES, the Analysis panel, the status bar formula, the dirty mark | `window-shell`, with `chemistry-engine` for the values |
@@ -124,8 +131,8 @@ formchem-skillset/
references/repo-laws.md each law with its reason and exact format
EVALS.json evaluation prompts and the trigger tests (should and should not load)
sub-skills/ engine, document-format, chemistry-engine, reactions, stereo-and-queries, formats-and-export,
- clipboard, command-line, canvas, annotations, window-shell, menus, dock, extensions, agents,
- desktop, release, clean-room
+ clipboard, command-line, names-and-spectra, three-d, canvas, annotations, window-shell, menus, dock,
+ extensions, agents, desktop, release, clean-room
chemistry-engine/references/warning-codes.md every ChemWarning code and where it comes from
stereo-and-queries/references/routes-and-codes.md the /api/analysis routes, check codes and service warning codes
canvas/references/hover-keys.md the hover key map with the code that implements it
@@ -152,7 +159,7 @@ cd frontend && npx tsc --noEmit type-check
backend/venv/bin/python -m compileall -q backend/app setup
```
-Scratch engines for checks: `FORMCHEM_PORT=[port] FORMCHEM_DATA_DIR=[scratch]/data venv/bin/python -m uvicorn app.main:app --port [port]` from `backend/`. `backend/venv/bin/python backend/formchem_engine.py --selfcheck` confirms RDKit and Indigo import. Never point a check at `~/formchem`: a scratch data folder keeps the person's drawings, autosaves and versions out of it.
+Scratch engines for checks: `FORMCHEM_PORT=[port] FORMCHEM_DATA_DIR=[scratch]/data venv/bin/python -m uvicorn app.main:app --port [port]` from `backend/`. `backend/venv/bin/python backend/formchem_engine.py --selfcheck` confirms RDKit and Indigo import. Never point a check at `~/formchem`, the person's data folder.
## Done means
diff --git a/.claude/skills/formchem-skillset/sub-skills/agents/SUB-SKILL.md b/.claude/skills/formchem-skillset/sub-skills/agents/SUB-SKILL.md
index d474d33a..2ae35fca 100644
--- a/.claude/skills/formchem-skillset/sub-skills/agents/SUB-SKILL.md
+++ b/.claude/skills/formchem-skillset/sub-skills/agents/SUB-SKILL.md
@@ -31,9 +31,9 @@ Give agents an honest tool surface that only describes what FormChem can do now,
| `docs/AGENTS.md` | the public reference of every tool, the token and the call log |
| `.claude/skills/formchem-harness`, `formchem-skillset` | the packs; `.agents/skills` is a mirror written by sync. Made and repaired only through the god-tier-skill-creator pipeline; its `scripts/validate_skill.py` reports zero FAIL before a commit |
-## The tool surface (0.8.0)
+## The tool surface (0.10.0)
-42 tools: the six of the shell (`get_context`, `list_commands`, `run_command`, `extensions_list`, `extension_command`, `handoff`); the reaction tools of 0.5.0 and the analysis tools of 0.6.0 (owned by `reactions` and `stereo-and-queries`); and the 28 of 0.8.0: `list_open_documents`, `new_document`, `open_document`, `save_document`, `close_document`, `draw_from_smiles`, `draw_from_molfile`, `render`, `get_structure`, `validate`, `compute_properties`, `convert`, `batch_convert`, `get_atoms` and the 14 edit tools `add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text`, `add_reaction`. `draw_from_name` waits for the naming decision (Q7 in the plan); do not add it early.
+60 tools: the six of the shell (`get_context`, `list_commands`, `run_command`, `extensions_list`, `extension_command`, `handoff`); the reaction tools of 0.5.0 and the analysis tools of 0.6.0 (owned by `reactions` and `stereo-and-queries`); and the 28 of 0.8.0: `list_open_documents`, `new_document`, `open_document`, `save_document`, `close_document`, `draw_from_smiles`, `draw_from_molfile`, `render`, `get_structure`, `validate`, `compute_properties`, `convert`, `batch_convert`, `get_atoms` and the 14 edit tools `add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text`, `add_reaction`; and the 10 of 0.9.0, whose services `names-and-spectra` owns: `draw_from_name` (through `_draw`), `name_structure` (the route's `name_mol`), `predict_nmr`, `predict_spectrum` (`nmr.document.spectrum_ops`), `open_spectrum`, `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate` (`spectra.peak_ops`, `integral_ops`) and `spectrum_export`; and the 8 of 0.10.0, whose services `three-d` owns: `build_3d`, `conformers_3d`, `minimise_3d`, `scan_dihedral`, `measure_3d`, `open_3d_structure` (`three_d.open_bytes`) and `extract_ligand` call the `routers/three_d.py` functions through `_three_d` with an `AgentCall` in the body, so the route's `commit` applies with origin `agent` and the agent's name, and `export_3d` calls `export.write` directly. The writing ones are in `MUTATING` (`scan_dihedral` only with `store`, `export_3d` only with an `output` outside the temporary folder, through `_mutating`); a tool never builds its own copy of a route's ops.
## Laws of the agent tools
diff --git a/.claude/skills/formchem-skillset/sub-skills/names-and-spectra/SUB-SKILL.md b/.claude/skills/formchem-skillset/sub-skills/names-and-spectra/SUB-SKILL.md
new file mode 100644
index 00000000..44920167
--- /dev/null
+++ b/.claude/skills/formchem-skillset/sub-skills/names-and-spectra/SUB-SKILL.md
@@ -0,0 +1,100 @@
+---
+name: names-and-spectra
+description: "FormChem's 0.9.0 names, NMR prediction and spectra code: the pluggable name engine (services/names: NameEngine protocol, registry, offline engine, the 629-entry dictionary in data/names, lexicon, rings, parser, build, stereo, namer with its round-trip guard), the increment predictor (services/nmr: environment, groups, carbon, proton, coupling, predict, simulate, the predicted spectrum object, the data hook, reference and accuracy), the JCAMP-DX reader and spectrum service (services/spectra), their routers, and the window side (names-api, name dialog, Name section, spectrum kind and data cache, atom links, Spectrum editor, name, NMR and spectrum commands). Use when adding a dictionary entry, a ring parent, a lexicon word, an increment or a predictor, registering OPSIN or another name engine, reading a new JCAMP-DX feature, or fixing a name, a predicted shift, a spectrum plot, peaks, integrals or links."
+---
+
+# Names and spectra
+
+## Purpose
+
+Change FormChem's names, NMR prediction and spectra without breaking the three promises they make: every name and every predicted number carries its method and version, FormChem refuses rather than guesses, and no third-party name list, shift table or parser code enters the repository. Hands back the change, the checks that prove it (the dictionary verify, the name corpus or round trip, the accuracy script, the JCAMP-DX corpus) and HASHOUT entries.
+
+## Preconditions
+
+`clean-room` loaded: names, NMR prediction and spectra are described only in the owner's clean-room specifications (`CLEANROOM_A`, `B` and `C`, the sections on names, NMR prediction, spectra). Licence rule: permissive anywhere; LGPL only as a separate module or process; GPL and AGPL never; NMRShiftDB2 data and any share-alike or non-commercial data only after the owner decides (plan question Q8 is open). Data FormChem ships is written for FormChem.
+
+## File map
+
+| Path | Holds |
+| --- | --- |
+| `backend/app/services/names/base.py`, `__init__.py` | the `NameEngine` protocol, result shapes, the registry (`register`, `engine`, `engines`, `listing`) |
+| `services/names/offline.py` | `OfflineEngine`: dictionary, then refusals, then the parser; `Stats` |
+| `services/names/dictionary.py`, `backend/app/data/names/*.json` | the dictionary loader and its seven files (`source`, `licence`, `category`, `method`, `entries`) |
+| `services/names/lexicon.py`, `rings.py`, `parser.py`, `build.py`, `stereo.py` | stems, multipliers, prefixes, suffixes, retained parents; ring parents in IUPAC numbering; the grammar; the builder; descriptors |
+| `services/names/namer.py` | structure to name; raises `Unsupported` with a reason |
+| `routers/names.py` | `/api/names/to-structure`, `/to-name`, `/engines`, `POST /api/documents/{id}/names/insert`; `name_mol` shared with MCP |
+| `services/nmr/__init__.py`, `base.py` | `METHOD`, `VERSION`, `DESCRIPTION`, `REGISTRY`; `Shift`, `Predictor`, `Registry` |
+| `services/nmr/environment.py`, `groups.py` | the fragment as an RDKit molecule with ids, H counts, symmetry ranks, rings; the substituent classifier shared by both nuclei |
+| `services/nmr/carbon.py`, `proton.py`, `coupling.py` | 13C and 1H increments and their tables (`ALKYL`, `AROMATIC`, `SIX_RING_HETERO`, `SP3_BASE`, `SP3_ALPHA`, `ALKENE` and the rest); J values and labels |
+| `services/nmr/predict.py`, `simulate.py` | the predictor chain, signals, confidence, warnings, the journal line; lines and Lorentzians |
+| `services/nmr/document.py`, `source.py` | the predicted spectrum object, placement and refresh; the hook for the spectra data route |
+| `services/nmr/reference.py`, `accuracy.py` | calibration and holdout sets; `python -m app.services.nmr.accuracy` |
+| `routers/nmr.py` | `/api/nmr/predictors`, `/api/nmr/predict`, `/nmr/predict-spectrum`, `/nmr/refresh` |
+| `services/spectra/` | `ldr.py`, `asdf.py`, `tables.py`, `ntuples.py`, `jcamp.py` (reader), `technique.py`, `issues.py`, `display.py`, `measure.py`, `export.py`, `document.py`, `source.py` (`PREDICTORS`) |
+| `routers/spectra.py` | data, peaks, integrals, export, parse; `peak_ops` and `integral_ops` shared with MCP |
+| `frontend/src/engine/names-api.ts`, `nmr-api.ts`, `spectra-api.ts` | the only callers of those routes |
+| `frontend/src/ui/name-dialog.ts`, `ui/analysis-name.ts`, `app/name-commands.ts` | Structure from Name, offerName, the Name section, Copy Name |
+| `frontend/src/canvas/render/spectrum.ts`, `spectrum-axes.ts`, `spectrum-data.ts`, `canvas/spectrum-links.ts`, `chem/spectrum-ops.ts` | the spectrum kind, axes, the data cache, the link layer, the op builders |
+| `frontend/src/ui/spectrum-panel.ts`, `app/spectrum-commands.ts`, `app/spectrum-import.ts`, `app/nmr-commands.ts` | the Spectrum editor and the commands |
+| `docs/NAMES.md`, `docs/SPECTRA.md` | the reference pages; HASHOUT backend 165 to 198, frontend 201 to 221 |
+
+## Laws
+
+1. **Method and version on every value.** A name result carries `method`, `engine`, `version` and `confidence`; a shift carries `method`, `version`, `confidence` and `uncertainty`; a predicted spectrum's `source.predicted` names its method, version and frequency. A new engine or predictor sets its own; never reuse FormChem's labels for another method.
+2. **Refuse, never guess.** The parser refuses with a code and a position; the namer raises `Unsupported`; a systematic name is shown only after an exact standard InChIKey round trip at high confidence. A change that turns a refusal into an answer needs a corpus case proving the answer right.
+3. **Own data only.** Dictionary SMILES, ring parents and increments are written for FormChem from general knowledge. Never paste a published table, a database export or another program's word list.
+4. **Points are never stored.** A spectrum object holds its source, view and marks; the engine parses or computes points on each request. Change FORMAT.md first, with `model.ts` and `model.py`, if a field must be added (`document-format`).
+5. **One transaction per gesture.** Insert from a name, predict a spectrum, refresh, pick peaks, integrate, link: each is one undo step. MCP tools reuse the route builders (`structure_ops`, `spectrum_ops`, `peak_ops`, `integral_ops`) so routes and tools answer the same.
+6. **The window patches.** The spectrum trace keeps its node (only `d` changes), the data cache asks once per zoom doubling, highlights live in the link layer, and the name dialog keeps its height. A MutationObserver check proves it.
+
+## Recipes
+
+### Add a dictionary entry
+
+1. Pick the file by category in `backend/app/data/names/` (solvents, reagents, amino-acids, biochemistry, drugs, organics, natural-products).
+2. Add `{"name", "smiles", "inchikey", "synonyms"?}` by hand with the Edit tool. Write the SMILES yourself, with the stereo the bare name means (L amino acids, D sugars, racemic drugs without stereo), and compute the standard InChIKey with RDKit in a scratch shell.
+3. Check: from `backend/`, `venv/bin/python -c "from app.services.names import dictionary as d; i = d.verify(); print(len(i.entries), i.problems)"`. Problems must be empty: a wrong key, or a name or synonym already used for another structure, is reported there.
+4. Check the CIP labels of a chiral entry against a configuration you know independently, and that `to-structure` with the name answers `method: dictionary`, `confidence: high`.
+
+### Add a ring parent
+
+1. In `services/names/rings.py`, add a `Ring(id, smiles, locants, name, stem, indicated?, yl?)` whose SMILES atom order is the IUPAC numbering (the locant tuple maps atom index to locant, `FUSED_9` and `FUSED_10` for the common fused shapes), plus any `ALIASES`.
+2. The namer uses the same table, so check both directions: parse a name on the new ring with substituents at two positions, then name the structure and confirm the round trip gives the same InChIKey. Ring seniority for the namer follows its rules in `namer.py`; a ring that cannot be ranked there must stay `Unsupported`.
+
+### Add a lexicon word or a suffix
+
+`services/names/lexicon.py` (`STEMS`, `MULT`, `BIS`, the prefix `Group` table, `Suffix`, `Retained`, `CLASS_WORDS`). A new word can create a second reading of an existing name: run the name corpus and the dictionary round trip, and look for new `ambiguous` warnings.
+
+### Add or tune an increment
+
+1. Find the table (`carbon.py` for 13C, `proton.py` for 1H, `coupling.py` for J) and the classifier key in `groups.classify`. A new substituent class is added to `groups.py` first, then a row in every table that names classes, or the rule falls back with low confidence.
+2. Change only general rules. A term that fixes one molecule of the reference set and nothing else is overfitting: the holdout set exists to catch it.
+3. Run `venv/bin/python -m app.services.nmr.accuracy --holdout --molecules` and `--calibration` from `backend/`. Report both MAE tables before and after; the holdout figure (1H 0.092, 13C 1.12 ppm at 0.9.0) must not get worse, and a change to the published figures updates `docs/SPECTRA.md` and the CHANGELOG.
+4. New reference molecules go into `reference.py` with values written from general knowledge, as its note says; never from a database.
+
+### Add a predictor or a name engine
+
+- Predictor: an object with `name`, `version`, `method`, `nuclei` and `predict(env, nucleus) -> {site: Shift}`, registered with `REGISTRY.register(p)` (it goes first; the increments fill the sites it leaves). If spectra store its method name, register a data hook in `app.services.spectra.source.PREDICTORS[method]` as `services/nmr/source.py` does.
+- Name engine: `services/names/[engine].py` with a class meeting `NameEngine`, registered with `names.register(engine, first=True)` at startup. OPSIN runs as a separate process. An engine strong in one direction answers `NameResult([], ..., reason=...)` in the other.
+- Either way: routes, window and MCP tools need no change, and every result names the new engine and version.
+
+### A JCAMP-DX feature
+
+Write it from the published rules, not from another reader. Report what you repair or skip through `issues.py` with a code, a line and a sentence; add a synthetic file that exercises it to the scratch corpus (outside the repo) and confirm every existing corpus file still reads identically, and that `export.py` output re-reads with an empty report.
+
+## Gate
+
+- [ ] Every new or changed value still carries method and version, and refusals still refuse.
+- [ ] `dictionary.verify()` reports no problems; the name corpus (50 systematic, 20 trivial, 5 refusals at 0.9.0) still passes, and the dictionary round trip has no failure.
+- [ ] The accuracy script ran before and after any increment change, holdout not worse, figures quoted.
+- [ ] No third-party data or code was added; any new dependency has a NOTICE.md row first.
+- [ ] Window changes keep the trace node and add no `Loading spectrum` status on a y-mode toggle or a structure edit.
+- [ ] HASHOUT entries and `docs/NAMES.md` or `docs/SPECTRA.md` updated; `./formchem agents sync --check` passes if an MCP tool changed.
+
+## Hands back
+
+The change, the check outputs (verify, corpus or round trip, accuracy tables, corpus reads), the HASHOUT entries and the commit list.
+
+## Owned resources
+
+None of its own. `agents` owns the MCP tools over these services; `document-format` owns the spectrum object's shape; `canvas` the renderer laws the spectrum kind follows.
diff --git a/.claude/skills/formchem-skillset/sub-skills/three-d/SUB-SKILL.md b/.claude/skills/formchem-skillset/sub-skills/three-d/SUB-SKILL.md
new file mode 100644
index 00000000..48ca1508
--- /dev/null
+++ b/.claude/skills/formchem-skillset/sub-skills/three-d/SUB-SKILL.md
@@ -0,0 +1,77 @@
+---
+name: three-d
+description: "FormChem's 0.10.0 3D code: the engine package services/three_d (molecule labels, forcefield, build, verify, conformers, minimise, scan, measure, export, structure, pdb, mmcif, molfile3d, ligand, readers, document, stale), routers/three_d.py, the stale-conformer rule in the store and in engine/stale.ts, the window's 3D View panel over a lazily loaded 3Dmol.js (view3d-lib, view3d-viewer, view3d-panel, dialogs, scan plot), the model3d page renderer and its snapshots, the glb writer and the 3D commands. Use when adding a display style, a surface, a force field or method, a structure file reader, a 3D MCP tool or route, fixing a build that loses stereo, a conformer or scan result, a PDB summary or ligand, a 3D object that flashes on the page, or the conformer drop after an edit."
+---
+
+# Three-d
+
+## Purpose
+
+Change FormChem's 3D without breaking its promises: every energy and measurement names its method and engine version, a build keeps the drawn stereo or says it did not, conformers never outlive the graph they were made for, a 3D object on the page never flashes, and nothing 3D loads at startup. Hands back the change, the checks that prove it and HASHOUT entries.
+
+## Preconditions
+
+`clean-room` loaded (the 3D sections of the clean-room specifications). Licence rule: permissive anywhere; LGPL only as a separate process the person installs (xtb and CREST stay user-installed by path while plan question Q9 is open); GPL and AGPL never (no Open Babel code); gemmi (MPL-2.0) is not vetted. Ligand templates are written for FormChem; the Chemical Component Dictionary is CC0 but nothing was copied from it.
+
+## File map
+
+| Path | Holds |
+| --- | --- |
+| `backend/app/services/three_d/__init__.py` | `METHODS`, `SEED`, `MAX_ITERS`, `GRADIENT`, `MAX_ATOMS`, `ThreeDError`, `method_of` |
+| `three_d/molecule.py` | `prepare` (perceive, expand, AddHs), labels `a1`, `a1:h0`, `a5:x0`, `positions`, `record` |
+| `three_d/forcefield.py`, `build.py`, `verify.py` | MMFF94, MMFF94s, UFF with the fallback; ETKDGv3 embedding; the CIP comparison and clashes |
+| `three_d/conformers.py`, `minimise.py`, `scan.py`, `measure.py`, `export.py` | search with RMSD pruning and populations; minimisation to an RMS gradient; the relaxed scan; geometry and charges; MOL, SDF, PDB, XYZ |
+| `three_d/structure.py`, `pdb.py`, `mmcif.py`, `molfile3d.py`, `ligand.py`, `readers.py`, `document.py` | the structure model and summary, the two readers, 3D SD records, ligand bond orders, opening and importing |
+| `three_d/stale.py`, `services/store.py` `apply_now` | the graph signature and the conformer drop |
+| `backend/app/routers/three_d.py` | every route, `commit`, `AgentCall`, `open_bytes` |
+| `frontend/src/engine/three-api.ts`, `engine/stale.ts` | the only caller of the routes; the window's copy of the stale rule |
+| `frontend/src/ui/view3d-lib.ts`, `view3d-viewer.ts`, `view3d-panel.ts`, `view3d-dialogs.ts`, `scan-plot.ts`, `structure3d-dialogs.ts`, `styles/view3d.css` | the lazy loader, the 3Dmol wrapper and camera mapping, the panel, the dialogs |
+| `frontend/src/canvas/render/model3d.ts` | the page object (snapshot, or a placeholder) |
+| `frontend/src/io/glb.ts`, `chem/elements3d.ts`, `chem/geom3d.ts`, `chem/conformer-mol.ts` | glTF writer, palette and radii, measurement maths, local molfile |
+| `frontend/src/app/view3d-commands.ts`, `app/menus.ts` | `VIEW3D_COMMAND_IDS`, the commands, `DISPLAY_3D`, `SURFACE_3D` |
+| `docs/3D.md`, `docs/FORMAT.md` | the reference; `conformers`, `conformer` and `model3d`. HASHOUT backend 199 to 222, frontend 222 to 244 |
+
+## Laws
+
+1. **Method and version on every number.** Answers carry `engine` and `method`; conformers store `method` and `energy`. A new method names itself; never relabel a force-field energy as anything else.
+2. **Stereo is verified, not assumed.** A new embedding or minimisation path runs `verify.stereo` and reports `kept` and `lost`.
+3. **One transaction per command, computed off the lock.** Snapshot, compute in `asyncio.to_thread`, check the graph signature, then `commit`. MCP tools call the route functions with `AgentCall`, never a copy of their ops.
+4. **One stale rule, twice.** `stale.py` and `stale.ts` list the same fields in the same order, and FORMAT.md lists them too; a change edits all three.
+5. **Nothing 3D at startup.** 3Dmol.js is reached only through `load3dmol`'s dynamic import, and the panel and its CSS are a lazy chunk. A static import of either is a regression.
+6. **No flash on the page.** A snapshot write keeps the old image until the new media has loaded, replaces `snapshot`, `camera` and `display` in one coalesced transaction and removes the old media entry.
+
+## Recipes
+
+### A display style or a surface
+
+1. `display` and `surface.kind` are format enums: change FORMAT.md, `model.ts` and `model.py` together (`document-format`).
+2. Viewer: `atomStyle` (style) or the surface call in `view3d-viewer.ts`; panel: `DISPLAYS` or `SURFACES`; commands: a `style(...)` or `surface(...)` entry and the id in `VIEW3D_COMMAND_IDS`, `DISPLAY_3D` or `SURFACE_3D`. The glTF radii follow the display (`scene` in `view3d-viewer.ts`): give the new style its radii there.
+3. Strings through `t()` whole, then `./formchem i18n scan --write` for the keys.
+
+### A force field or method
+
+Add it to `METHODS` and `forcefield.setup` with its own fallback reason, to `FORCE_FIELDS` in `three-api.ts`, the panel's select, `_FF` in `mcp.py`, and `docs/3D.md`. An external program (xtb) runs as a separate process found by a path the person sets, never bundled or linked, and its energy is stored under its own `method`.
+
+### A structure file reader
+
+A parser returning `Structure` (with `summary` working on it), a `detect` rule and rows in `EXTENSIONS` and `MIMES`, `readers.read`, `document.MODEL_FORMATS` and `importers.MODELS_3D`, `package.EXT_BY_MIME`, the window's `OPEN_EXTENSIONS` and `STRUCTURE_ACCEPT`, and `routers/files.py` `SUFFIXES` so the desktop save accepts it (that list still lacks `.glb`, `.cif`, `.mmcif` and `.ent` at 0.10.0). The bytes stay as media; never rewrite the file.
+
+### A 3D MCP tool or route
+
+Route first (window key on POST, `commit` with the label), then a `t_` handler through `_three_d`, a `TOOLS` entry, `MUTATING` or `_mutating`, `INSTRUCTIONS`, `WORKFLOW` and `GUIDE`, `./formchem agents sync`, and `docs/AGENTS.md` (`agents`).
+
+## Checks
+
+From `backend/` on a scratch engine: ethanol C-O after MMFF94 between 1.41 and 1.44 Å; paclitaxel builds with 11 of 11 labels kept and 0 clashes; a graph edit drops `conformers` in the same `tx` and undo restores them. In the built window under 4x CPU throttling: no 3D chunk before the first 3D View; a MutationObserver sees no placeholder or empty `href` while restyling a 3D object; glTF output passes the Khronos validator; `npx tsc --noEmit` clean.
+
+## Gate
+
+- [ ] Every new number carries method and engine version; builds still report the stereo check.
+- [ ] `stale.py`, `stale.ts` and FORMAT.md agree; undo restores dropped conformers.
+- [ ] The startup chunk loads no 3D code; the page shows no flash.
+- [ ] No new dependency without a NOTICE.md row; no GPL code, no copied tables.
+- [ ] HASHOUT entries and `docs/3D.md` updated; `./formchem agents sync --check` passes after an MCP change.
+
+## Hands back
+
+The change, the check results, the HASHOUT entries and the commit list.
diff --git a/.docs/wiki/3D.md b/.docs/wiki/3D.md
new file mode 100644
index 00000000..e5d0e18a
--- /dev/null
+++ b/.docs/wiki/3D.md
@@ -0,0 +1,76 @@
+# 3D
+
+From 0.10.0 a structure you drew can be turned in 3D: build it from the drawing, search its conformers, minimise it, scan a dihedral, measure it, wrap it in a surface, and put a 3D view of it on the page. PDB and mmCIF files open as proteins with their ligands, and a ligand comes out as a structure you can edit. The engine side, with every route and the methods behind the numbers, is [`docs/3D.md`](https://github.com/nodemode-dev/formchem/blob/main/docs/3D.md).
+
+## The 3D View
+
+Select a structure and choose 3D > 3D View (`Ctrl+3`, `Cmd+3` on a Mac). A panel floats over the drawing and follows your selection; drag it by its title and resize it from its corner. The first time it opens it loads the 3D viewer (3Dmol.js), so FormChem starts no slower for people who never use 3D.
+
+| Do | How |
+| --- | --- |
+| Turn and zoom | drag to turn, wheel to zoom |
+| Change the style | Wire, Stick, Ball and Stick, Space Filling, Cartoon (proteins), or 3D > Display |
+| Add a surface | the Surface list (van der Waals, solvent accessible, solvent excluded) or 3D > Surface; ESP colours it by charge |
+| Show the ligand | Focus the ligand; Reset view brings the whole model back |
+| Spin | the spin button (off when your system asks for reduced motion) |
+| Export | the download button: PNG, transparent PNG or glTF |
+
+## Building 3D from 2D
+
+A drawing has no depth until you build it. Press Build 3D in the panel, or 3D > Build 3D from 2D. FormChem embeds the structure with ETKDGv3, keeping every wedge and every double bond as you drew them, minimises it with MMFF94 and stores the result in the drawing as one undo step. It then reads the stereo back from the 3D model and checks it against your drawing; the status line names the method and version and the energy, for example "Built: ETKDGv3+MMFF94, rdkit 2025.09.3 · -1.34 kcal/mol". Unspecified stereocentres are named in a warning, and for an AND or OR group the drawn member is built.
+
+The force field list beside Minimise picks MMFF94, MMFF94s or UFF. For elements MMFF94 does not cover (tin, for example) FormChem uses UFF and says why.
+
+## Conformers and minimising
+
+- **Minimise** (3D > Minimise Energy) minimises the shown conformer and reports the energy before and after.
+- **Conformers...** generates an ensemble (50 by default), minimises each, and keeps those within an energy window of the lowest (10 kcal/mol by default). The list shows each conformer's energy relative to the lowest and its population; click one to show it. Conformers that differ only in where the hydrogens point are merged, so ethanol has one.
+
+Each run is one undo step.
+
+## Dihedral scan
+
+Pick four bonded atoms in a row (or measure a dihedral first) and press Scan.... Choose the range and step and Run Scan: at each angle the dihedral is held and everything else is minimised, and the plot shows the energy against the angle with the minimum and the barrier. For butane's C-C-C-C the plot shows the anti minimum at 180 degrees, the gauche minima near 65 degrees and the eclipsed maximum at 0 degrees, a barrier of about 5.1 kcal/mol. Tick Keep each point as a conformer to keep the geometries; then click a point on the plot to see it.
+
+## Measuring
+
+Choose Distance, Angle or Dihedral under Measure and click two, three or four atoms. Ethanol's C-O bond reads 1.420 Å after minimising. Measurements on a 3D object on the page are saved with it.
+
+## Surfaces and ESP
+
+The van der Waals, solvent accessible and solvent excluded surfaces are drawn see-through over the model. ESP colours the surface red (negative) to blue (positive) from the engine's empirical partial charges; the legend says it is approximate and names the method and the charge range. ESP is for structures you drew or opened from SD and MOL files, not for PDB models.
+
+## A 3D view on the page
+
+3D > Insert 3D View puts a 3D object beside the selected structure. Turn it, restyle it or add a surface in the panel, and the picture on the page follows, as one undo step for each burst of changes, without the page flashing. Double-click the object to open it in the panel again. The object moves, resizes, copies and exports like a picture, and prints as you left it.
+
+## Opening PDB and mmCIF files
+
+File > Open a `.pdb`, `.ent`, `.cif` or `.mmcif` file (or drop it on Home) for a new drawing, or use File > Import or 3D > 3D Structure File... to add it to the drawing you have open. The protein shows as cartoon, ligands as ball and stick with green carbons, waters are hidden, and the main ligand is in focus. The import report names the chains, ligands and waters. The file is kept unchanged inside the `.fchem` drawing.
+
+SD and MOL files with 3D coordinates keep them: each record becomes a structure with its file geometry ready to view, with no need to build.
+
+## Extracting a ligand
+
+Select a PDB or mmCIF model and choose 3D > Extract Ligand.... With several ligands FormChem asks which. The ligand lands beside the model as a structure you can edit, with its coordinates from the file kept for 3D. Common ligands (ATP, NAG, folate, glycerol and about 25 more) get their bond orders from FormChem's own table; for others the bond orders are worked out from the geometry, and the message says "bond orders inferred", so check them.
+
+## Exporting
+
+- **3D > Export 3D View as PNG...**: the view as a picture, opaque or transparent.
+- **3D > Export 3D View as glTF...**: a `.glb` 3D model (atoms and bonds in element colours) for 3D viewers, slides and 3D printing.
+- **File > Export > Export 3D Structure...**: MOL, SD (every conformer, with energy and method), PDB or XYZ, every hydrogen included; a PDB or mmCIF model saves its original file.
+
+## When the structure changes
+
+3D coordinates belong to the structure they were built from. Change an element, a charge, a bond or a wedge, or add or delete atoms, and the structure's conformers are removed in the same undo step; build again. Moving atoms and changing colours keep them, and Undo brings them back.
+
+## Not yet
+
+- xtb and CREST are not offered; every energy is a force-field energy.
+- Surfaces on large proteins take a while and hold the window meanwhile.
+- Measurements on a structure without a 3D object on the page last only while the panel is open.
+- Atropisomers and allene axial chirality are not recognised.
+
+## For agents
+
+`build_3d`, `conformers_3d`, `minimise_3d`, `scan_dihedral` and `measure_3d` work on a structure's conformers, `open_3d_structure` opens PDB, mmCIF, SD and MOL files, `extract_ligand` takes a ligand out, and `export_3d` writes MOL, SD, PDB or XYZ. See [Agents](Agents).
diff --git a/.docs/wiki/Agents.md b/.docs/wiki/Agents.md
index 8165bbcf..80316343 100644
--- a/.docs/wiki/Agents.md
+++ b/.docs/wiki/Agents.md
@@ -1,6 +1,6 @@
# Agents
-FormChem's engine is an MCP server (`backend/app/routers/mcp.py`), over HTTP at `http://127.0.0.1:8220/mcp` and over stdio with `./formchem mcp` (`setup/mcp_stdio.py`, which starts the engine when needed). An agent works in the same window you see. From 0.8.0 it draws there directly: it makes and opens drawings, draws structures and reaction schemes from SMILES or molfiles, edits them atom by atom by id, reads them back in machine form and checks its work with a picture drawn by the window's own renderer. Every change is one undo step, every call is listed in [Agent Activity](Agent-Activity), and you can stop an agent from the title bar.
+FormChem's engine is an MCP server (`backend/app/routers/mcp.py`), over HTTP at `http://127.0.0.1:8220/mcp` and over stdio with `./formchem mcp` (`setup/mcp_stdio.py`, which starts the engine when needed). An agent works in the same window you see. From 0.8.0 it draws there directly: it makes and opens drawings, draws structures and reaction schemes from SMILES or molfiles, edits them atom by atom by id, reads them back in machine form and checks its work with a picture drawn by the window's own renderer. From 0.9.0 it also draws from chemical names and names what is drawn, predicts 1H and 13C NMR spectra, and opens JCAMP-DX spectra, picks their peaks and integrates them. From 0.10.0 it builds structures in 3D, searches conformers, minimises, scans dihedrals and measures, opens PDB, mmCIF and 3D SD files, extracts ligands and writes 3D files. Every change is one undo step, every call is listed in [Agent Activity](Agent-Activity), and you can stop an agent from the title bar.
The full reference, with every tool's arguments and result shape and the recorded examples, is [`docs/AGENTS.md`](https://github.com/nodemode-dev/formchem/blob/main/docs/AGENTS.md).
@@ -20,7 +20,7 @@ The full reference, with every tool's arguments and result shape and the recorde
## Tools
-42 tools. Reading never asks you; a tool that changes something asks you in the window the first time (Consent, below).
+60 tools. Reading never asks you; a tool that changes something asks you in the window the first time (Consent, below).
| Group | Tools | Kind |
| --- | --- | --- |
@@ -30,6 +30,10 @@ The full reference, with every tool's arguments and result shape and the recorde
| Checking (0.8.0) | `render`, `get_structure`, `validate`, `compute_properties` | read |
| Editing by id (0.8.0) | `get_atoms` (read); `add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text` | change |
| Converting (0.8.0) | `convert`, `batch_convert` | change only when they write outside the temporary folder |
+| Names (0.9.0) | `draw_from_name` (change); `name_structure` (read) | |
+| NMR prediction (0.9.0) | `predict_nmr` (read); `predict_spectrum` (change) | |
+| Spectra (0.9.0) | `open_spectrum`, `spectrum_pick_peaks`, `spectrum_integrate` (change); `spectrum_data`, `spectrum_peaks`, `spectrum_export` (read) | |
+| 3D (0.10.0) | `build_3d`, `conformers_3d`, `minimise_3d`, `open_3d_structure`, `extract_ligand` (change); `measure_3d` (read); `scan_dihedral` (change only with `store`); `export_3d` (change only when it writes outside the temporary folder) | |
| Window and extensions | `list_commands`, `extensions_list` (read); `run_command`, `extension_command` (change) | |
| Handoff | `handoff` | change with a state |
| Reactions (0.5.0) | `perceive_reactions`, `map_reaction` (change); `export_reaction`, `reaction_stoichiometry` (read) | |
@@ -57,6 +61,23 @@ The full reference, with every tool's arguments and result shape and the recorde
| `delete`, `move`, `scale`, `align`, `clean_layout` | arrange and tidy by id, without a window |
| `add_arrow`, `add_text` | arrows (anchored to atoms and bonds for electron pushing) and text or captions |
| `convert`, `batch_convert` | files and folders, with the same code and output as `./formchem convert` and `batch` |
+| `draw_from_name {name, doc?, x?, y?, label?}` | reads a common or systematic name offline and draws it like `draw_from_smiles`, saying how it was read (method, confidence, engine, version); an unread name is refused with where reading stopped ([Names](Names)) |
+| `name_structure {smiles? or doc?, object?, selection?}` | the common name and the round-trip-checked systematic name of each structure, or the reason there is none |
+| `predict_nmr {doc?, object? or smiles, nucleus?, frequency?}` | predicted 1H, 13C or both: signals with shift, multiplicity, J, count, confidence and uncertainty, a journal line and warnings ([Spectra and NMR](Spectra-and-NMR)) |
+| `predict_spectrum {object, doc?, nucleus?, frequency?, x?, y?}` | adds a predicted spectrum beside the structure, linked to its atoms, as one undo step |
+| `open_spectrum {text, base64 or path, name?}` | opens a JCAMP-DX file as a new drawing with one spectrum per block, shown in the window |
+| `spectrum_data {doc?, object?, from?, to?, points?, y_mode?}` | a spectrum's points (at most 2000), axes, direction, frequency and method |
+| `spectrum_peaks {doc?, object?, detect?, from?, to?}` | the stored peaks, integrals and multiplets with their atom links; `detect` lists what the picker finds without adding it |
+| `spectrum_pick_peaks`, `spectrum_integrate` | add peaks, or add and renormalise NMR integrals, as one undo step each |
+| `spectrum_export {doc?, object?, format?, original?}` | the spectrum as JCAMP-DX or CSV text, or the original file |
+| `build_3d {doc?, object?, minimise?, method?}` | a 3D conformer from the drawing (ETKDGv3, then MMFF94, MMFF94s or UFF) as one undo step, with the energy, method and version and whether every stereo label was kept ([3D](3D)) |
+| `conformers_3d {doc?, object?, n?, window?, keep?, method?}` | a conformer ensemble kept within an energy window, with relative energies and populations |
+| `minimise_3d {doc?, object?, conformer?, method?}` | minimises a conformer and reports the energy before and after and whether it converged |
+| `scan_dihedral {atoms, doc?, object?, start?, end?, step?, method?, store?}` | a relaxed dihedral scan: angle against relative energy, minimum and barrier; `store` keeps the points as conformers |
+| `measure_3d {atoms, doc?, object?, conformer?}` | a distance, angle or dihedral of a conformer |
+| `open_3d_structure {path, doc?, as?, x?, y?}` | a PDB or mmCIF file as a 3D object (cartoon, ligand in focus, the file kept as it is), or SD and MOL records as structures with their file coordinates |
+| `extract_ligand {doc?, object?, ligand?}` | a ligand of a PDB or mmCIF model as a structure beside it, with its SMILES and whether its bond orders were inferred |
+| `export_3d {doc?, object?, format?, conformer?, output?}` | MOL, SD, PDB or XYZ text with every hydrogen, or a new file |
| `list_commands`, `run_command` | the window's command catalogue, the same commands as the menus |
| `extensions_list`, `extension_command` | Form extensions and their commands |
| `handoff {state?, note?}` | working, ready or question, with a note the person sees |
@@ -73,6 +94,10 @@ Every change answers with the structure it now holds and a picture: a text line
To build or change a structure by id: `get_atoms` lists the ids, `add_atom {element, bond_to}` adds an atom at the bond length in the freest direction (a zigzag for chains), `add_bond {atom1, atom2, order}` bonds two atoms or changes an existing bond, `set_charge`, `set_atom` and `set_stereo` change one atom or bond, and `replace_substructure` swaps a group. `move`, `scale`, `align` and `clean_layout` arrange; `add_arrow`, `add_text` and `add_reaction` build schemes. They all work without a window.
+From 0.9.0: `draw_from_name {name: "ethyl ethanoate"}` draws a name exactly as `draw_from_smiles` would, and its answer starts with how the name was read ("by dictionary" or "by systematic parser", the confidence, "formchem names 0.9.0"); a name it cannot read is refused before any drawing is made. `name_structure` names what is drawn. `predict_nmr {object, nucleus: "both"}` gives predicted shifts and a journal line without changing anything, and `predict_spectrum {object}` puts the predicted spectrum beside the structure as one undo step. `open_spectrum` opens a JCAMP-DX file, and the spectrum tools read its points, pick peaks and integrate. Every name and predicted value carries its method and version, so an agent quotes them rather than presenting them as measured.
+
+From 0.10.0: `build_3d {object}` builds a conformer and says whether every drawn stereocentre was kept ("all 11 stereo labels kept" for Taxol), so an agent checks that line before using the geometry; `measure_3d {atoms: [C, O]}` then reads ethanol's C-O as 1.42 Å with the method. `conformers_3d`, `minimise_3d` and `scan_dihedral` give energies with their force field and engine version; a scan stores nothing unless `store` is true. `open_3d_structure {path}` opens a PDB or mmCIF file as a 3D object and lists its chains, ligands and waters, `extract_ligand` turns one ligand into a structure (saying when its bond orders were inferred), and `export_3d` returns MOL, SD, PDB or XYZ text. An edit to a structure's atoms or bonds removes its conformers, so build again after editing. Styles, surfaces and the PNG and glTF exports of the 3D View are window commands (`style-ballstick`, `surface-vdw`, `export-gltf` and the rest) for `run_command`.
+
Which drawing: `doc` when given; else the only open drawing; else the drawing the window shows; else the tool asks for `doc`. Coordinates are points, x right and y down; the default bond length is 14.4 points.
`get_context` lists every drawing open, oldest first, as text and in `structuredContent.documents`:
@@ -128,4 +153,4 @@ Every tool call, from any transport or from the window's own chat, is logged by
## Skills
-`formchem-harness` (using FormChem: drawing with the tools, checking with render and get_structure, commands, reactions, analysis, handoff) and `formchem-skillset` (developing FormChem), in `.claude/skills` and mirrored to `.agents/skills`. The harness's `references/tools.md` is generated from the server and lists every argument.
+`formchem-harness` (using FormChem: drawing with the tools, checking with render and get_structure, names, NMR prediction and spectra, 3D, commands, reactions, analysis, handoff) and `formchem-skillset` (developing FormChem), in `.claude/skills` and mirrored to `.agents/skills`. The harness's `references/tools.md` is generated from the server and lists every argument.
diff --git a/.docs/wiki/Analysis.md b/.docs/wiki/Analysis.md
index db0b35a2..d05cd026 100644
--- a/.docs/wiki/Analysis.md
+++ b/.docs/wiki/Analysis.md
@@ -4,7 +4,7 @@ From 0.6.0 the Analysis panel computes drug-like properties and the isotope patt
## The Analysis panel
-Open it with Analysis > Show Analysis. It follows the selection, or the whole page when nothing is selected, and is worked out only while it is open.
+Open it with Analysis > Show Analysis. It follows the selection, or the whole page when nothing is selected, and is worked out only while it is open. From 0.9.0 its Name section shows the common and systematic names above the properties ([Names](Names)), and the Analysis menu also predicts 1H and 13C NMR spectra ([Spectra and NMR](Spectra-and-NMR)).
| Row | Method (the row's tooltip) |
| --- | --- |
diff --git a/.docs/wiki/Architecture.md b/.docs/wiki/Architecture.md
index a4147a63..2a1226aa 100644
--- a/.docs/wiki/Architecture.md
+++ b/.docs/wiki/Architecture.md
@@ -1,13 +1,18 @@
# Architecture
```
-frontend/ vanilla TypeScript and Vite: engine/ (model, ops, document client, session, reactions-api), chem/ (valence, rings, formula, stoich),
- canvas/ (view, hit testing, tools, render/ with one module per object kind), app/ (menus, shell, canvas, object and reaction commands,
- documents, window tools, agent-window, agent-calls, agent-activity), ui/ (shell, menus, Home, Preferences, tool rail, Analysis and
- Stoichiometry panels, template library, Agent activity panel, agent chip), dock/, extensions/, styles/
+frontend/ vanilla TypeScript and Vite: engine/ (model, ops, document client, session, reactions-api, names-api, nmr-api, spectra-api,
+ three-api, stale), chem/ (valence, rings, formula, stoich, spectrum-ops, elements3d, geom3d, conformer-mol), canvas/ (view, hit
+ testing, tools, spectrum-links, render/ with one module per object kind, spectrum and its data cache and model3d included),
+ app/ (menus, shell, canvas, object and reaction commands, documents, window tools, agent-window, agent-calls, agent-activity,
+ name, nmr, spectrum and 3D commands), ui/ (shell, menus, Home, Preferences, tool rail, Analysis and Stoichiometry panels,
+ template library, Agent activity panel, agent chip, name dialog, Spectrum editor, 3D View panel with its viewer, lazy 3Dmol.js
+ loader and dialogs), io/ (glb), dock/, extensions/, styles/
backend/ FastAPI engine: core/ (config, guard, window key, seal, agent token), routers/ (system, live, library, commands, documents, chem, reactions,
- templates, terminal, chat, extensions, mcp, agent_activity), services/ (model, ops, store, history, package, importers, templates,
- agent_out, agent_draw, agent_edits, agent_convert, agent_log, chem/ on RDKit and Indigo), data/templates/
+ templates, terminal, chat, extensions, mcp, agent_activity, names, nmr, spectra, three_d), services/ (model, ops, store, history,
+ package, importers, templates, agent_out, agent_draw, agent_edits, agent_convert, agent_log, chem/ on RDKit and Indigo, names/ (the
+ name engines), nmr/ (the increment predictor), spectra/ (the JCAMP-DX reader and spectrum service), three_d/ (3D building,
+ conformers, force fields, scans, PDB and mmCIF readers, ligands, the stale-conformer rule)), data/templates/, data/names/
src-tauri/ the desktop shell; the frozen engine runs from a folder inside the app on macOS and as a sidecar elsewhere
```
@@ -40,6 +45,25 @@ Every write answers with `agent_out.write_result`: the touched structures read b
Every tool call passes through `call_tool` in `routers/mcp.py`, which logs it in `services/agent_log.py` before and after it runs. A context variable set for the call flows through `STORE.apply` into the store's after-change hooks (`store.AFTER_CHANGE`), so each transaction is credited to the call that made it; a window command's transaction, which the window posts itself, is credited to the one writing window-tool call that is running or ended less than 1.5 seconds ago. After every change, undo and redo the hook checks which call owns the top of that drawing's undo stack and tells the windows (`agentUndoable`), so Agent Activity offers Undo on exactly that call. The log is mirrored live to every window (`agentCall`), kept in memory and appended to files in the data folder, and served under `/api/agents` ([Agent Activity](Agent-Activity)). A stopped agent is refused in `call_tool` before any tool runs.
+## Names, predictions and spectra
+
+From 0.9.0 three engine services sit beside the chemistry core, each behind a registry so a later engine can take its place without touching the routes, the window or the agent tools.
+
+- **Names** (`services/names/`, routes under `/api/names`): a registry of name engines that all meet one protocol. The only one at 0.9.0 is FormChem's offline engine: a dictionary of 629 common names, then a systematic parser and builder, and a namer whose names are shown only when they parse back to the same InChIKey. OPSIN or an online lookup would be registered in front of it ([`docs/NAMES.md`](https://github.com/nodemode-dev/formchem/blob/main/docs/NAMES.md)).
+- **NMR prediction** (`services/nmr/`, routes under `/api/nmr`): a chain of predictors where the first answer for each atom wins, at 0.9.0 FormChem's own increments for 1H and 13C. A predicted spectrum is a document object that stores its settings and its links to atoms, never its points.
+- **Spectra** (`services/spectra/`, routes under `/api/documents/{doc}/spectra`): the JCAMP-DX reader, decimation, peaks, integrals and export. A measured spectrum's file lives in the drawing as media; a predicted one is answered by the predictor registered for its method (`spectra.source.PREDICTORS`), so the data, peaks, integrals and export routes serve both the same way.
+
+The window never holds spectrum points in the document: its spectrum kind asks the data route for about as many points as the plot has pixels at the current zoom, keeps them in a cache keyed by range and zoom bucket, and patches only the trace path when finer data arrives. Peak picking and integration run in the engine and come back as transactions; links, the view range and the y mode are ordinary window transactions. Atom and peak highlights live in their own overlay layer, so they never reach an export.
+
+## 3D
+
+From 0.10.0 the engine's `services/three_d/` (routes under `/api/documents/{id}/3d` and `/api/3d/parse`) builds and keeps 3D structures, with RDKit's ETKDGv3, MMFF94, MMFF94s, UFF and Gasteiger code. ([`docs/3D.md`](https://github.com/nodemode-dev/formchem/blob/main/docs/3D.md))
+
+- **Conformers live in the fragment.** A structure's `conformers` hold 3D coordinates for every atom (hydrogens under `h`, the extra atoms of an abbreviation under `expanded`), each with its energy and method; `conformer` names the shown one. A build, a conformer search, a minimisation or a stored scan computes in a worker thread on a snapshot of the drawing, checks that the structure has not changed meanwhile, and applies one transaction, which travels the document flow like any other.
+- **Stale conformers drop in the same transaction.** Inside `Store.apply_now`, `three_d/stale.py` compares each touched fragment's graph before and after; when the atoms or bonds changed (not just positions or display), it appends unsets of `conformers` and `conformer` to the transaction, so undo brings them back with the old graph. The window's client runs the same rule (`engine/stale.ts`) on its own transactions before sending them, and on the engine's echo it applies a trailing conformer drop it did not send, so both sides agree at once.
+- **Structure files stay as files.** A PDB or mmCIF file read by FormChem's own readers becomes a `model3d` object over the bytes kept as media, so saving, exporting and pasting carry the original file. 3D SD and MOL records become structures whose file coordinates are their conformer.
+- **The window shows, the engine computes.** The 3D View panel loads 3Dmol.js on first use (its own chunk, so startup is unaffected), reads a structure as a molfile with an atom map from the engine (or writes one locally from the stored conformer), and measures in the window with the engine's formulas. A `model3d` on the page is drawn as a PNG snapshot of the view; the panel writes a new snapshot, the camera and the style in one coalesced transaction after the person changes the view, and the renderer keeps the old picture until the new one has loaded, so the page never flashes. Exports and print use the snapshot and need no 3D renderer.
+
## Guarding the engine
The engine binds to 127.0.0.1. A local guard refuses requests whose Host or Origin is not local, and a window key made at each start lets only the FormChem window change settings, use the terminal dock or answer an agent's question. Saved agent choices are sealed with a key in the system keychain. From 0.8.0 the MCP endpoint also needs the agent token (`core/agent_token.py`, the file `agent-token` in the data folder), which the stdio relay and the agent configs send.
diff --git a/.docs/wiki/Clipboard.md b/.docs/wiki/Clipboard.md
index e6b9e148..ea9961d5 100644
--- a/.docs/wiki/Clipboard.md
+++ b/.docs/wiki/Clipboard.md
@@ -32,7 +32,7 @@ Edit > Copy As puts one chosen form on the clipboard: SMILES, CXSMILES, Molfile,
In this order: a FormChem drawing, a picture that carries a drawing (an SVG or PNG exported or copied by FormChem), structure text in any format FormChem reads (SMILES, CXSMILES, reaction SMILES, molfile, SD, RXN, InChI, CML, CDXML), SMARTS (as a query structure), a plain picture (placed as an image) and plain text (a text object). Structure text takes your drawing's bond length. When the text holds something that could not be read exactly, a note says so.
-Chemical names are not read yet: pasting "aspirin" gives a text object and a note that name to structure arrives in a later version.
+From 0.9.0 a pasted chemical name is read: pasting "aspirin" opens Structure from Name with its structure, and Enter draws it ([Names](Names)). Text that is not a name, or a name FormChem cannot read, still becomes a text object.
## Platforms
diff --git a/.docs/wiki/Formats-and-Export.md b/.docs/wiki/Formats-and-Export.md
index bcfeb898..5b2ceb06 100644
--- a/.docs/wiki/Formats-and-Export.md
+++ b/.docs/wiki/Formats-and-Export.md
@@ -18,10 +18,15 @@ File > Open (or dropping a file on Home) reads:
| CML | `.cml` | molecules, data and reaction schemes |
| CDXML, CDX | `.cdxml`, `.cdx` | structures, arrows, plus signs and text |
| Pictures FormChem exported | `.svg`, `.png`, `.pdf`, `.eps` | the drawing kept inside opens again, unchanged |
+| PDB, mmCIF (0.10.0) | `.pdb`, `.ent`, `.cif`, `.mmcif` | one 3D object over the file kept unchanged: the protein as cartoon, ligands as ball and stick, waters hidden, the main ligand in focus ([3D](3D)) |
+
+From 0.10.0 an SD or molfile whose records have 3D coordinates (up to 200 records) keeps them: each structure is laid out in 2D for the page and carries the file's geometry as its conformer, ready for the 3D View. Flat files read as before.
A file from another program opens as a new, unsaved drawing at your drawing's bond length. When anything was lost or changed on the way in, a short note appears ("opened with notes", or how many things changed) with **Details**: a panel that lists each item with its count, such as text whose fonts were approximated, a record that could not be read, or stereocentres of unknown configuration. Nothing in the file on disk changes; save the drawing to keep it as a `.fchem` file.
-**File > Import...** brings one or more files into the drawing you have open instead of opening each as a drawing of its own: chemistry files, `.fchem` drawings and pictures that carry a drawing. Each file lands in free space to the right of or below what is already there, at your drawing's bond length, selected, and is one undo step. An SD file brings at most 50 structures, laid out in a table, and the note ("imported with notes") says how many were left out; File > Open reads the whole file. Only the first page of a drawing with several pages comes in.
+**File > Import...** brings one or more files into the drawing you have open instead of opening each as a drawing of its own: chemistry files, `.fchem` drawings and pictures that carry a drawing. Each file lands in free space to the right of or below what is already there, at your drawing's bond length, selected, and is one undo step. An SD file brings at most 50 structures, laid out in a table, and the note ("imported with notes") says how many were left out; File > Open reads the whole file. Only the first page of a drawing with several pages comes in. A PDB or mmCIF file comes in as a 3D object over the file.
+
+3D exports (the 3D View as PNG or glTF, and Export 3D Structure as MOL, SD, PDB or XYZ) are on the [3D](3D) page.
## Exporting pictures
diff --git a/.docs/wiki/Getting-Started.md b/.docs/wiki/Getting-Started.md
index 0f7d92e8..f0961efa 100644
--- a/.docs/wiki/Getting-Started.md
+++ b/.docs/wiki/Getting-Started.md
@@ -24,7 +24,7 @@ Aspirin, with the mouse and a few keys:
5. Open the Analysis panel (title bar or View > Analysis Panel): formula C9H8O4, molecular weight 180.16, exact mass 180.0423 and the elemental analysis. The formula also sits in the status bar.
6. Structure > Clean Up Structure tidies bond lengths and angles in one undo step. `Ctrl+S` (`Cmd+S` on macOS) saves; a new drawing asks for a name.
-Faster: copy `CC(=O)Oc1ccccc1C(=O)O` and press `Ctrl+V` on the canvas, or use Insert > Structure from SMILES. Molfile, SDF, RXN, SMILES, InChI, CML, CDXML and CDX files open from File > Open or by dropping them on Home, and File > Export saves PNG, SVG, PDF and EPS pictures that open again as the drawing ([Formats and Export](Formats-and-Export)). The page is dark by default; View > Dark Page turns it off ([Grid and Page](Grid-and-Page)). [Drawing](Drawing) lists every tool and hover key, and how to draw with the keyboard alone.
+Faster: copy `CC(=O)Oc1ccccc1C(=O)O` and press `Ctrl+V` on the canvas, or use Insert > Structure from SMILES. Molfile, SDF, RXN, SMILES, InChI, CML, CDXML and CDX files open from File > Open or by dropping them on Home, PDB and mmCIF files open there as 3D objects, and Ctrl+3 shows a structure in 3D after 3D > Build 3D from 2D ([3D](3D)), and File > Export saves PNG, SVG, PDF and EPS pictures that open again as the drawing ([Formats and Export](Formats-and-Export)). The page is dark by default; View > Dark Page turns it off ([Grid and Page](Grid-and-Page)). [Drawing](Drawing) lists every tool and hover key, and how to draw with the keyboard alone.
## Connect an agent
diff --git a/.docs/wiki/Home.md b/.docs/wiki/Home.md
index d6d21917..44d0170a 100644
--- a/.docs/wiki/Home.md
+++ b/.docs/wiki/Home.md
@@ -2,7 +2,7 @@
FormChem is the chemical structure drawing suite of the FormAI family: local-first, no account, on macOS, Windows and Linux. It runs in the browser or as a Tauri desktop app, with a local engine that holds every document, and an MCP server so Claude Code, Codex, Cursor or Antigravity can work in the same window you see.
-FormChem is in development. 0.1.0 is the family skeleton (dispatcher, engine, window, desktop shell, CI) and 0.2.0 the family shell (title bar, menus, Home, Preferences, the terminal and agent dock, extensions, Help and updates). 0.3.0 added documents and the RDKit chemistry engine, 0.4.0 the drawing canvas, its tools and hover keys, and the Analysis panel, 0.5.0 reactions and annotations: arrows and the other drawn objects, reaction perception, atom mapping, balance and stoichiometry, the template library, Find and rulers, and 0.6.0 stereo, queries and analysis: CIP labels and enhanced stereo, abbreviations, query structures and R-groups, calculated properties with their methods, the structure check and the isotope pattern. 0.7.0 is formats and exchange: chemistry files in and out with a report of what each format loses, pictures (PNG, SVG, PDF, EPS) that open again as the drawing, printing, the clipboard, Standardise and a command line for whole files, plus what the first desktop test asked for: a fast start on macOS, a clearer 2D layout, the dark page, resizing on the sheet and grids. 0.8.0 is agents: 42 MCP tools with which an agent makes and opens drawings, draws structures and reaction schemes from SMILES or molfiles, edits them atom by atom by id, reads them back and checks its work with a picture from the window's own renderer, each change one undo step, plus Agent Activity with undo and Stop, and an agent token for the HTTP endpoint.
+FormChem is in development. 0.1.0 is the family skeleton (dispatcher, engine, window, desktop shell, CI) and 0.2.0 the family shell (title bar, menus, Home, Preferences, the terminal and agent dock, extensions, Help and updates). 0.3.0 added documents and the RDKit chemistry engine, 0.4.0 the drawing canvas, its tools and hover keys, and the Analysis panel, 0.5.0 reactions and annotations: arrows and the other drawn objects, reaction perception, atom mapping, balance and stoichiometry, the template library, Find and rulers, and 0.6.0 stereo, queries and analysis: CIP labels and enhanced stereo, abbreviations, query structures and R-groups, calculated properties with their methods, the structure check and the isotope pattern. 0.7.0 is formats and exchange: chemistry files in and out with a report of what each format loses, pictures (PNG, SVG, PDF, EPS) that open again as the drawing, printing, the clipboard, Standardise and a command line for whole files, plus what the first desktop test asked for: a fast start on macOS, a clearer 2D layout, the dark page, resizing on the sheet and grids. 0.8.0 is agents: 42 MCP tools with which an agent makes and opens drawings, draws structures and reaction schemes from SMILES or molfiles, edits them atom by atom by id, reads them back and checks its work with a picture from the window's own renderer, each change one undo step, plus Agent Activity with undo and Stop, and an agent token for the HTTP endpoint. 0.9.0 is names, predictions and spectra: chemical names read into structures and written for them, offline with FormChem's own dictionary, systematic parser and round-trip-checked namer; 1H and 13C NMR spectra predicted by FormChem's own increment method, each value with its method and version; JCAMP-DX spectra opened as spectrum objects with peaks, integrals and multiplets linked to atoms in the Spectrum editor; and ten more agent tools (52). 0.10.0 is 3D: structures built in 3D from the drawing with their stereo checked, conformer searches, minimisation and dihedral scans with the force field and version beside each energy, measurements, surfaces with ESP, a 3D View panel and 3D views placed on the page, PDB and mmCIF files opened as proteins with their ligands, ligands extracted as structures, PNG, glTF and 3D structure exports, and eight more agent tools (60). A structure database comes next.
| Page | What it covers |
| --- | --- |
@@ -13,10 +13,13 @@ FormChem is in development. 0.1.0 is the family skeleton (dispatcher, engine, wi
| [Reactions](Reactions) | Reaction schemes, roles, atom mapping, balance, stoichiometry, RXN and reaction SMILES |
| [Stereo and Queries](Stereo-and-Queries) | CIP labels, enhanced stereo groups, wedges, abbreviations, query atoms and bonds, substructure search, SMARTS, R-groups and Markush structures |
| [Analysis](Analysis) | Calculated properties with their methods, the isotope pattern, Copy Analysis and Check Structure |
+| [Names](Names) | Structure from Name, pasting a name, the Name section and Copy Name, what names are read and refused |
+| [Spectra and NMR](Spectra-and-NMR) | JCAMP-DX spectra, the Spectrum editor, peaks, integrals and links to atoms, predicted 1H and 13C NMR |
+| [3D](3D) | The 3D View, Build 3D from 2D, conformers, minimising, dihedral scans, measuring, surfaces, 3D views on the page, PDB and mmCIF files, ligands and 3D exports |
| [Formats and Export](Formats-and-Export) | Opening chemistry files and the import report, File > Import, exporting pictures that keep the drawing inside, exporting chemistry files, printing |
| [Clipboard](Clipboard) | Copy, Cut, Paste and Paste Special, Copy As, what goes on the clipboard and what each platform can do |
| [Command Line](Command-Line) | Converting files and folders, properties to CSV and pictures of every record, with standardising and the failure report |
-| [Agents](Agents) | The MCP server and its 42 tools, drawing directly, agent configs, the agent token, skills, consent and Stop |
+| [Agents](Agents) | The MCP server and its 60 tools, drawing directly and from names, NMR, spectrum and 3D tools, agent configs, the agent token, skills, consent and Stop |
| [Agent Activity](Agent-Activity) | Every call agents made with undo for the latest one, the editing chip with Stop, and the call log |
| [Terminal](Terminal) | The terminal and agent dock |
| [Extensions](Extensions) | Form extensions in FormChem |
diff --git a/.docs/wiki/Names.md b/.docs/wiki/Names.md
new file mode 100644
index 00000000..cbf89162
--- /dev/null
+++ b/.docs/wiki/Names.md
@@ -0,0 +1,48 @@
+# Names
+
+From 0.9.0 FormChem reads chemical names into structures and names the structures you draw, offline on your computer with no account and no lookup service. Every name and every structure drawn from a name says how it was read: the method, the confidence and the engine version. The engine side, with every route and the full coverage list, is [`docs/NAMES.md`](https://github.com/nodemode-dev/formchem/blob/main/docs/NAMES.md).
+
+## Structure from Name
+
+Insert > Structure from Name. Type a name and the dialog reads it as you type:
+
+- the structure as a preview, with its formula
+- the confidence: **High** for a name found in the dictionary or read fully with one meaning, **Medium** when something had to be assumed or the name has two readings (the note says what), **Not read** otherwise
+- the method: **Dictionary** or **Systematic parser**, and "FormChem names 0.9.0"
+
+Insert or Enter draws it as one undo step, placed like a template. The dialog keeps its size through every state, so the buttons never move while you type.
+
+| Type | Read as |
+| --- | --- |
+| aspirin, caffeine, THF, DMSO, L-alanine, Taxol, cholesterol | the dictionary's structure, high confidence |
+| 2,2,4-trimethylpentane, (2R)-butan-2-ol, ethyl propanoate, N,N-dimethylpropan-1-amine, pyridine-3-carboxylic acid | the systematic parser, high confidence |
+| propanol | propan-1-ol, medium confidence, with the note that the locant was assumed |
+| Benzene, 1,2-dichloro- | refused: inverted index names are not read; type 1,2-dichlorobenzene |
+| benzoic acdi | refused, with the unread part marked |
+
+What the systematic parser covers: chains to 20 carbons with branched and compound substituents, rings and 49 ring parents (benzene, pyridine, the azoles, naphthalene, quinoline, indole, purine, piperidine, morpholine and more), double and triple bonds, halogens, alcohols, ethers, thiols, sulfides, amines, aldehydes, ketones, acids, esters, salts, acid halides, amides, nitriles, retained names such as phenol, aniline, toluene and benzoic acid, multipliers to deca and bis to hexakis, functional class names such as benzyl alcohol and diethyl ether, and R, S, E, Z, cis and trans. The dictionary holds 629 common names: solvents, reagents, amino acids, sugars and nucleosides, drugs, natural products and everyday organics.
+
+FormChem refuses rather than guesses. A name it cannot read, an impossible structure ("2,2,2-trimethylpropane"), a locant that does not exist ("propan-4-ol"), an inverted index name, or D- and L- outside the dictionary is refused with the reason.
+
+## Pasting a name
+
+Paste a name onto the canvas (`Ctrl+V` or `Cmd+V`) and Structure from Name opens with its structure already read; Enter draws it. Text that is not a name, or a name FormChem cannot read, pastes as text as before.
+
+## Naming what you drew
+
+The Analysis panel (Analysis > Show Analysis) has a Name section for the selection, or the whole page when nothing is selected:
+
+- **Common name**, from the dictionary, when the structure is in it
+- **Systematic**, from FormChem's rule-based namer, shown only when the name reads back to exactly the same structure (the same InChIKey); otherwise the section says why there is none, for example for salts, ring systems outside the table, or stereocentres outside the parent chain
+
+Each row shows its method. Edit > Copy Name copies the first name. Aspirin, for example, shows "aspirin" (Common name, Dictionary) and "2-(acetyloxy)benzoic acid" (Systematic, Rule-based namer, round-trip checked).
+
+## Not yet
+
+- Hydro prefixes ("pyridin-2(1H)-one"), spiro and bridged rings, ring systems outside the table, peptide and sugar systematic names.
+- Systematic names for salts, sulfoxides and sulfones, phosphorus and metal compounds, imines and azo compounds; pyridones, uracils and caffeine get their common name only.
+- A misspelt name is marked from its first character rather than at the misspelt word.
+
+## For agents
+
+`draw_from_name {name}` draws a name as one undo step and says how it was read; `name_structure` names structures, a selection or SMILES without changing anything. See [Agents](Agents).
diff --git a/.docs/wiki/Spectra-and-NMR.md b/.docs/wiki/Spectra-and-NMR.md
new file mode 100644
index 00000000..859c3ec2
--- /dev/null
+++ b/.docs/wiki/Spectra-and-NMR.md
@@ -0,0 +1,57 @@
+# Spectra and NMR
+
+From 0.9.0 a drawing holds spectra: measured ones opened from JCAMP-DX files, and 1H and 13C NMR spectra FormChem predicts for a structure on the page. Peaks, integrals and multiplets link to atoms, so hovering one lights the other. The engine side, with the file support table, the prediction method and its accuracy, and every route, is [`docs/SPECTRA.md`](https://github.com/nodemode-dev/formchem/blob/main/docs/SPECTRA.md).
+
+## Opening a spectrum
+
+- **File > Open** a `.jdx`, `.dx` or `.jcamp` file: a new drawing with one spectrum per block of the file, with a report of anything the reader repaired or left out.
+- **Insert > Spectrum from File** adds the spectra of a file to the drawing you have open, as one undo step.
+
+FormChem reads IR, Raman, UV-Vis, mass spectra and 1D NMR, in every JCAMP-DX compression form, with several blocks per file. The file is kept byte for byte inside the `.fchem` drawing, so nothing is lost when you save, and Export Spectrum can give it back untouched.
+
+Each spectrum is drawn as its technique is read: IR and Raman wavenumber and NMR ppm run from high on the left to low on the right, UV-Vis wavelength and m/z from low to high, and the y axis is labelled from the file (Transmittance (%), Absorbance, Relative abundance, Intensity). Spectra zoom with the page and get sharper as you zoom in.
+
+## The Spectrum editor
+
+Double-click a spectrum, or Analysis > Spectrum > Edit Spectrum, to open the editor beside the canvas.
+
+| Do | How |
+| --- | --- |
+| Zoom and pan | wheel to zoom the x axis, drag to pan, Shift-drag or the box tool to zoom into a range, double-click or Fit for the whole spectrum |
+| Pick peaks | the peak tool, then drag across a range; or Analysis > Spectrum > Pick Peaks for the visible range |
+| Add or remove a peak | the add tool, then click near a peak (it snaps to the nearest top or dip), or click a peak's label to remove it |
+| Integrate (NMR) | the integral tool, then drag across a multiplet; type a value into any integral (for example its proton count) and the others follow |
+| Transmittance or absorbance | the Y axis switch (IR, Raman, UV-Vis) |
+| Show a range on the page | zoom to it, then Show this range on the page |
+| Export | Export Spectrum: a fresh JCAMP-DX file with its peaks, CSV of every point, or the original file |
+
+The list below the plot shows the peaks, integrals and multiplets; each row can be linked, unlinked or removed. Every change is one undo step.
+
+## Linking peaks to atoms
+
+Select a peak, integral or multiplet in the editor and press Link to Atoms. If you had atoms of one structure selected they are linked at once; otherwise click the atoms in the drawing (they get a dashed ring) and press Done or Enter. Esc cancels.
+
+Then hover an atom to light its peaks in every spectrum on the page, or hover a peak label, an integral or a multiplet (on the page or in the editor's list) to light its atoms.
+
+## Predicting an NMR spectrum
+
+Select a structure (or have only one on the page) and choose Analysis > Predict 1H NMR Spectrum or Predict 13C NMR Spectrum. The spectrum lands beside the structure as one undo step, titled with the method, the version and the frequency, for example "Predicted ¹H NMR, 400 MHz (FormChem increments 0.9.0)". For ethyl acetate the 1H spectrum shows 4.10 (q, J = 7.0), 2.05 (s) and 1.25 (t, J = 7.0) with integrals 2, 3 and 3, and the 13C spectrum 171.0, 59.8, 20.2 and 13.8, each linked to its atoms.
+
+The method is FormChem's own: additive increments written for FormChem, with no shift database. On molecules it was never tuned on, it is off by 0.09 ppm on average for 1H and 1.1 ppm for 13C. Each atom carries a confidence and an uncertainty, and the prediction notes exchangeable protons (OH, NH), diastereotopic CH2, second-order patterns and amide rotamers. Predicted values are never measured data.
+
+The curve follows the structure: change the structure and the predicted curve is redrawn. Its multiplets, integrals and peaks move with Analysis > Refresh Predicted Spectrum (also on the spectrum's right-click menu), as one undo step.
+
+## Right-click on a spectrum
+
+Edit Spectrum, Pick Peaks, Integrate (NMR) or Transmittance or Absorbance (IR, Raman, UV-Vis), Refresh Predicted Spectrum (predicted spectra), and Export Spectrum, above the usual items.
+
+## Not yet
+
+- 2D NMR is listed as not drawn, an NMR FID is shown as recorded (no Fourier transform), and of a GC-MS file only the first scan is drawn.
+- The Analysis panel has no NMR table yet; predictions show on the page and in the editor.
+- 1H labels can crowd at the default size; make the spectrum larger with its handles.
+- A third predicted spectrum on an A4 page can be placed below the page.
+
+## For agents
+
+`predict_nmr` and `predict_spectrum` predict, `open_spectrum` opens a JCAMP-DX file, and `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate` and `spectrum_export` work on spectrum objects. See [Agents](Agents).
diff --git a/.docs/wiki/_Sidebar.md b/.docs/wiki/_Sidebar.md
index 1536bfd9..aef50456 100644
--- a/.docs/wiki/_Sidebar.md
+++ b/.docs/wiki/_Sidebar.md
@@ -8,6 +8,9 @@
- [Reactions](Reactions)
- [Stereo and Queries](Stereo-and-Queries)
- [Analysis](Analysis)
+- [Names](Names)
+- [Spectra and NMR](Spectra-and-NMR)
+- [3D](3D)
- [Formats and Export](Formats-and-Export)
- [Clipboard](Clipboard)
- [Command Line](Command-Line)
diff --git a/AGENTS.md b/AGENTS.md
index f08a46fd..0bced17a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -2,7 +2,7 @@
FormChem exposes an MCP server at http://127.0.0.1:8220/mcp (stdio: `./formchem mcp`, which runs `setup/mcp_stdio.py`). Configs: .codex/config.toml, .cursor/mcp.json, .mcp.json, and for Antigravity ~/.gemini/config/mcp_config.json. Run `./formchem agents install` to install them and the skills for your home folder too.
-HTTP requests need the agent token (`./formchem agents token`; `agents install` writes it into the configs; the stdio transport sends it itself). FormChem has 42 tools. Reading is open; changing tools make the window ask the person the first time, and the person can Stop an agent. Since 0.8.0 agents draw directly: get_context or list_open_documents first; draw_from_smiles and draw_from_molfile place a structure as one undo step and answer with ids, SMILES, InChIKey, formula and a picture; get_atoms names atoms and bonds for the edit tools (add_atom, add_bond, set_charge, set_atom, set_stereo, replace_substructure, delete, move, scale, align, clean_layout, add_arrow, add_text, add_reaction), one undo step each; render, get_structure and validate check the result; convert and batch_convert match the CLI. Reaction and analysis tools, list_commands and run_command for the window's commands, Form extensions and handoff to the person (question when you need their input) are there too. The skill packs live in .agents/skills: formchem-harness (using FormChem) and formchem-skillset (developing FormChem). The document contract is docs/FORMAT.md.
+HTTP requests need the agent token (`./formchem agents token`; `agents install` writes it into the configs; the stdio transport sends it itself). FormChem has 60 tools. Reading is open; changing tools make the window ask the person the first time, and the person can Stop an agent. Since 0.8.0 agents draw directly: get_context or list_open_documents first; draw_from_smiles and draw_from_molfile place a structure as one undo step and answer with ids, SMILES, InChIKey, formula and a picture; get_atoms names atoms and bonds for the edit tools (add_atom, add_bond, set_charge, set_atom, set_stereo, replace_substructure, delete, move, scale, align, clean_layout, add_arrow, add_text, add_reaction), one undo step each; render, get_structure and validate check the result; convert and batch_convert match the CLI. Since 0.9.0 draw_from_name and name_structure read and write names offline, predict_nmr and predict_spectrum predict 1H and 13C NMR, and the spectrum tools open, read, pick, integrate and export JCAMP-DX spectra. Since 0.10.0 build_3d builds a structure in 3D and reports whether every stereo label was kept, conformers_3d, minimise_3d, scan_dihedral and measure_3d work on its conformers with the force field and version beside each number, open_3d_structure opens PDB, mmCIF, SDF and MOL files, extract_ligand turns a bound ligand into a structure, and export_3d writes MOL, SDF, PDB or XYZ. Reaction and analysis tools, list_commands and run_command for the window's commands, Form extensions and handoff to the person (question when you need their input) are there too. The skill packs live in .agents/skills: formchem-harness (using FormChem) and formchem-skillset (developing FormChem). The document contract is docs/FORMAT.md.
Clean room (details in CLAUDE.md): FormChem is written only from the owner's clean-room specifications. Never open, run, decompile or read the private documentation of the commercial suite it replaces, and never copy its names, icons, templates or text. Vendor names appear only to name file formats.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b52c5554..d9da2bab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,121 @@
Versions follow `v*.*.*` with dots. Dates are US Eastern.
+## 0.10.0 · 2026-12-03
+
+3D: a structure you drew becomes a molecule you can turn. Build 3D from 2D keeps every wedge and double bond as drawn, the 3D View shows it in five styles with surfaces and measurements, conformer searches, minimisation and dihedral scans report energies with their force field and version, and a 3D view placed on the page keeps its angle and style in the drawing. PDB and mmCIF files open as proteins in cartoon with the ligand in focus, and a ligand comes out as an editable structure. Agents reach all of it through eight new MCP tools.
+
+### New
+
+- 3D > 3D View (`Mod+3`) opens a floating panel on the selected structure, or on the selected 3D object on the page, and follows the selection. The viewer is 3Dmol.js 3.0.0, loaded the first time a 3D view opens, so starting FormChem loads none of it. Five display styles (Wire, Stick, Ball and Stick, Space Filling, Cartoon), Reset view, Focus the ligand, and Spin (off, with the reason, when the system asks for reduced motion). The panel follows the theme.
+- 3D > Build 3D from 2D makes a 3D conformer of the selected structure as one undo step: ETKDGv3 embedding with a fixed seed, explicit hydrogens, wedges, double-bond geometry and charges kept, then a minimisation with MMFF94 (or MMFF94s or UFF, chosen in the panel; UFF with the reason when MMFF94 has no parameters for an element). The engine then reads the stereo back from the 3D coordinates and compares every CIP label with the drawing; a lost label makes it try again with the next seed. Taxol builds with all 11 of its 11 stereocentres kept and no clashes. The status line names the method and version, for example "Built: ETKDGv3+MMFF94, rdkit 2025.09.3 · -1.34 kcal/mol". Unspecified stereocentres and enhanced stereo groups (the drawn member is built) are named in a warning.
+- 3D > Conformers... generates an ensemble (ETKDGv3, near duplicates pruned by heavy-atom RMSD, each minimised) and keeps those within an energy window of the lowest (default 50 generated, 10 kcal/mol, at most 10 kept), as one undo step. The panel lists them with their energy relative to the lowest and their Boltzmann population at 298.15 K; click one to show it. Butan-1-ol keeps 6 from 30.
+- 3D > Minimise Energy minimises the shown conformer until the RMS gradient is below 0.01 kcal/mol/Å (or 2000 steps) and reports the energy before and after and whether it converged, as one undo step.
+- 3D > Dihedral Scan... runs a relaxed scan of the dihedral of four picked atoms: at each angle the dihedral is held and everything else is minimised, and a plot shows angle against relative energy with the minimum and the barrier. Butane's C-C-C-C scan shows the anti minimum, the gauche minima near plus or minus 65 degrees and the eclipsed maximum at 0 degrees, a barrier of 5.1 kcal/mol with MMFF94. Keep each point as a conformer stores the scan as conformers (one undo step), and clicking a point shows its geometry.
+- 3D > Measure in 3D, or the panel's Measure buttons: click two atoms for a distance (ångström, three decimals), three for an angle or four for a signed dihedral (degrees, one decimal). Ethanol's C-O bond reads 1.420 Å after MMFF94. On a 3D object on the page the measurements are kept with it.
+- 3D > Surface: van der Waals, solvent accessible (1.4 Å probe), solvent excluded, and ESP-mapped: the surface coloured red to blue by an approximate electrostatic potential from Gasteiger partial charges, with a legend that says so and names the method, version and charge range.
+- 3D > Insert 3D View places a 3D object on the page beside the structure (building 3D coordinates first when it has none) and binds the panel to it. Turning, restyling or adding a surface or a measurement writes a new picture of the view, its camera and its style into the drawing as one undo step per burst of changes; the old picture stays on screen until the new one has loaded, so the page never flashes. Double-click the object to open it in the panel again. Exports, print and thumbnails show the 3D object without a 3D renderer.
+- 3D > 3D Structure File... and File > Open or Import read PDB (`.pdb`, `.ent`) and mmCIF (`.cif`, `.mmcif`) files with FormChem's own readers. The file becomes a 3D object over the bytes kept unchanged in the `.fchem` package: a protein shows as cartoon with ligands as ball and stick, waters hidden and the main ligand focused, and the import report names the chains, ligands and waters. Human DHFR (1DRF, 186 residues with folate) reads in 37 ms.
+- 3D > Extract Ligand... turns a ligand of a PDB or mmCIF model into a 2D structure beside it, as one undo step, with the file coordinates kept as its conformer. Bond orders come from a built-in table of 30 common ligands (ATP, NAG, folate, glycerol and others); any other ligand gets bond orders inferred from its geometry, and the toast says "bond orders inferred". With several ligands a dialog asks which, with the focused one chosen.
+- SD and MOL files whose records have 3D coordinates keep them: each record opens or imports as a structure with a 2D layout and the file's coordinates as its conformer, so it shows in 3D without Build 3D.
+- Exports: 3D > Export 3D View as PNG (opaque or transparent) and as glTF (binary `.glb`: atoms as spheres and bonds as cylinders in element colours, 1 Å = 1 cm, for 3D viewers, slides and printing), and File > Export > Export 3D Structure... (MDL molfile of the shown conformer, SD file of every conformer with energy and method fields, PDB or XYZ, every hydrogen written; a PDB or mmCIF model saves its original file).
+- Conformers follow the graph: an edit to a structure's atoms or bonds (element, charge, isotope, label, hydrogens, bond order, wedge, adding or deleting) removes its conformers in the same undo step, in the engine and in the window, and Undo brings them back. Moving atoms, colours and double-bond placement keep them.
+- The MCP server has 60 tools, 8 of them new: `build_3d`, `conformers_3d`, `minimise_3d`, `scan_dihedral` and `measure_3d` for a structure's conformers, `open_3d_structure` for PDB, mmCIF, SDF and MOL files, `extract_ligand`, and `export_3d` for MOL, SDF, PDB or XYZ text. Each answer carries the method and engine version. See `docs/AGENTS.md` and `docs/3D.md`.
+
+### Exit criteria
+
+Checked in the built window under 4x CPU throttling, with Chromium's software WebGL:
+
+- Ethanol drawn in 2D, Build 3D from 2D: shown 1.5 to 2.5 s after the command; Minimise Energy; C-O 1.420 Å from the engine and in the panel (expected 1.41 to 1.44). Pass.
+- Taxol (11 stereocentres): built in 0.6 to 2.4 s with 11 of 11 CIP labels kept and 0 clashes. Pass.
+- A PDB file with a pentapeptide, acetate and a water: File > Import placed a 3D object in cartoon with acetate in ball and stick and the water hidden, focused on the ligand, the file kept byte for byte (3041 bytes). Pass.
+- Startup: the window ready in 0.76 to 1.20 s with no 3D code loaded; the first 3D View loads the panel and 3Dmol.js (581 kB, 170 kB gzip) once. Pass.
+- Zero flash: restyling a 3D object on the page swapped its picture straight from the old one to the new one, with no placeholder or empty image in between, and kept one picture in the drawing. Pass.
+
+### Changed
+
+- The File > Open dialogs and Home's Open list `.pdb`, `.ent`, `.cif` and `.mmcif`. The 3D menu holds the whole 3D set with Display and Surface submenus; Insert gains Insert 3D View and 3D Structure File..., and File > Export gains Export 3D Structure....
+- The media route of a drawing accepts PDB, mmCIF, SDF and MOL files as well as pictures and JCAMP-DX, which is how an imported structure file reaches the drawing.
+- Copy, paste and Duplicate carry conformers and 3D objects, with the conformers' atom keys moved to the new atom ids; picture exports wait for the 3D object's picture.
+- The MCP instructions, the `formchem://guide` resource and the workflow describe the 3D tools.
+- The desktop app's file write route accepts `.glb`, `.cif`, `.mmcif`, `.ent` and `.jcamp`, so Export 3D View as glTF, saving an mmCIF model's original file and saving a `.jcamp` spectrum work there as they do in the browser (found by reading the code; the desktop save dialog has not been run).
+
+### Known issues
+
+- xtb and CREST are not offered. Plan question Q9 (optional downloads, or only programs the person installs and points to) is unanswered, so the default applies: user-installed by path only, and that path is not built yet. Every energy is a force-field energy.
+- The model summary inside the import toast ("3041 atoms; chain A: protein, 5 residues; ligand A:ACT:301; 1 water (hidden)") stays in English in every language; the sentence around it is translated.
+- Not verified: the desktop save dialog for the PNG, glTF and 3D structure exports (only the browser download ran); mmCIF in the window (the engine reader was checked with files, the panel was not); very large PDB files through File > Import, which carries the file to the window and back (the limits are 64 MB to read and 50 MB to upload; File > Open has no such round trip); undo of a picture update while the panel is open; the macOS desktop app.
+- Surfaces are computed on the main thread, so a surface on a large protein holds the window for a while. ESP needs a structure's charges and is off for PDB and mmCIF models. glTF holds atoms and bonds only, not surfaces or cartoons.
+- Measurements on a structure that is not placed as a 3D object last only while the panel is open.
+- A 3D change checks that the structure did not change while the engine worked, then applies, without one lock around both; an edit landing in that moment could keep conformers made for the old structure.
+- Ligands outside the 30-entry table get bond orders inferred from geometry; check them. Small-molecule CIF files are read in their unit cell without symmetry mates.
+- Atropisomers and allene axial chirality, moved to this phase, are still not perceived.
+- MMFF94s and UFF were exercised but not compared with reference energies.
+- The desktop file associations do not list `.pdb`, `.cif` or `.ent` yet (the Open dialogs do).
+
+### Under the hood
+
+- New engine package `services/three_d/`: `molecule` (fragments to hydrogen-complete molecules, atom labels `a1`, `a1:h0`, `a5:x0`), `forcefield`, `build`, `verify` (stereo from 3D and clashes), `conformers`, `minimise`, `scan`, `measure` (geometry and partial charges), `export`, `structure`, `pdb`, `mmcif`, `molfile3d`, `ligand`, `readers`, `document` (PDB and mmCIF as drawings) and `stale` (the rule that drops conformers, run inside the store's apply).
+- New routes in `routers/three_d.py`: `POST /api/documents/{id}/3d/build`, `/conformers`, `/active`, `/minimise`, `/scan`, `/open`, `/extract-ligand`; `GET /3d/measure`, `/charges`, `/molblock`, `/structure`; and `POST /api/3d/parse`.
+- The window gains the 3D View panel, the 3Dmol.js wrapper and lazy loader, the Conformers, Dihedral Scan, Export 3D Structure and Extract Ligand dialogs, the model3d page renderer, FormChem's own glTF 2.0 binary writer, the 3D commands, one client for every 3D route (`engine/three-api.ts`) and the stale-conformer rule mirrored from the engine (`engine/stale.ts`).
+- New dependency: `3dmol` 3.0.0 (BSD-3-Clause), with its packages `pako` 2.2.0 and 1.0.11 (MIT AND Zlib), `upng-js` 2.1.0, `iobuffer` 5.4.0 and `netcdfjs` 3.0.0 (all MIT). 3Dmol.js incorporates code from GLmol (taken under MIT), Three.js and jQuery (MIT); `NOTICE.md` quotes them and `THIRD-PARTY-NOTICES.txt` holds every licence text. RDKit's ETKDGv3, MMFF94, UFF and Gasteiger code was already shipped.
+- `setup/notices.py` crashed on the two `pako` versions; it now reads nested npm packages by their path in the lock file.
+- `docs/FORMAT.md` gains the `c` id prefix for conformers, the optional `expanded` and `scan` conformer keys, the `a1:h0` and `a5:x0` atom names, the `file` method, the camera's meaning, `focus.residue`, the snapshot replacement rule and structure files as media.
+- Translations of the new strings into all 25 languages.
+
+## 0.9.0 · 2026-12-03
+
+Names, predictions and spectra: FormChem reads chemical names and writes them, offline and with no account, predicts 1H and 13C NMR spectra with its own rules, and opens measured spectra from JCAMP-DX files. Type or paste "aspirin" or "(2R)-butan-2-ol" and the structure is drawn; select a structure and the Analysis panel names it; predict its NMR spectrum and it lands beside the structure with every multiplet linked to its atoms; open an IR or NMR file and pick peaks, integrate and link peaks to atoms in the Spectrum editor. Every name and every predicted number says which method and version made it, and agents reach all of it through ten new MCP tools.
+
+### New
+
+- Insert > Structure from Name reads a name as you type, with a live preview, the formula, a confidence (high, medium or low) and the method that read it (FormChem's dictionary or its systematic parser), and draws it as one undo step. Names are read by FormChem's own offline engine: a dictionary of 629 common names (solvents, reagents, amino acids, sugars and nucleosides, drugs, natural products and everyday organics, each stored with its InChIKey) and a systematic IUPAC parser for chains to C20, rings and 49 ring parents, unsaturation, the common functional groups, esters, salts, amides, nitriles, multipliers to deca and bis to hexakis, functional class names, and R, S, E, Z, cis and trans.
+- When a reading had to assume something ("propanol" read as propan-1-ol) or a name has two readings, the confidence drops to medium and the note says what was assumed. A name the engine cannot read is refused with the reason and the character where reading stopped; inverted index names ("Benzene, 1,2-dichloro-"), D- and L- outside the dictionary, impossible valences and locants that do not exist are refused rather than guessed.
+- The Analysis panel has a Name section: the common name from the dictionary and the systematic name from FormChem's rule-based namer, each with its method. A systematic name is shown only when it reads back to the same structure (the same standard InChIKey); otherwise the section says why there is none, for example salts and mixtures, ring systems outside the table, or stereocentres outside the parent chain. Edit > Copy Name copies the first name.
+- Pasting a chemical name onto the canvas opens Structure from Name already filled in with its structure, so Enter draws it; text that is not a name, or a name the engine cannot read, still pastes as text.
+- Analysis > Predict 1H NMR Spectrum and Predict 13C NMR Spectrum add a predicted spectrum beside the selected structure (or the only one on the page), as one undo step. The prediction is FormChem's own increment method (FormChem increments 0.9.0), written for FormChem with no shift database: shifts per atom with a confidence and an uncertainty in ppm, signals grouped by symmetry, first-order multiplets with J values, integrals for 1H, proton-decoupled peaks for 13C, and notes for exchangeable protons, diastereotopic CH2, second-order patterns and amide rotamers. On a held-out set of 17 molecules it was never tuned on, the mean absolute error is 0.092 ppm for 1H and 1.12 ppm for 13C. The title on the page and the Spectrum editor's header name the method, its version and the frequency.
+- A predicted spectrum keeps only its settings and its links to the structure; the curve is computed from the structure each time it is drawn. After you change the structure, Analysis > Refresh Predicted Spectrum (also on the spectrum's context menu) moves the multiplets, integrals and peaks to match, as one undo step.
+- JCAMP-DX spectra: File > Open of a `.jdx`, `.dx` or `.jcamp` file makes a drawing with one spectrum per data block, and Insert > Spectrum from File adds them to the open drawing. FormChem's own reader handles IR, Raman, UV-Vis, mass spectra and 1D NMR, every compression form (AFFN, PAC, SQZ, DIF, DUP), XYDATA, XYPOINTS, PEAK TABLE, NTUPLES with real and imaginary NMR pages, LINK files with several blocks, shift references and observe frequencies, and checks the file as it reads it, repairing what it can and reporting the rest. The file is kept byte for byte inside the `.fchem` package.
+- Spectra are drawn on the page as their technique is read: IR and Raman wavenumber and NMR shift decrease from left to right, UV-Vis wavelength and m/z increase, and the y axis is labelled from the file (Transmittance (%), Absorbance, Relative abundance, Intensity). Spectra zoom with the page and fetch finer data as you zoom in.
+- The Spectrum editor (double-click a spectrum, or Analysis > Spectrum > Edit Spectrum) docks beside the canvas with its own plot: wheel zoom, drag to pan, box zoom, pick peaks in a dragged range, click to add or remove a peak, integrate a range and type the value an integral should read (the others follow), switch transmittance and absorbance, show a chosen range on the page, and a list of peaks, integrals and multiplets.
+- Peaks, integrals and multiplets link to atoms both ways: Link Peak to Atoms uses the selected atoms or the atoms you click next; hovering an atom lights its peaks in every spectrum on the page, and hovering a peak, an integral or a multiplet lights its atoms.
+- Analysis > Spectrum holds Edit Spectrum, Pick Peaks, Integrate, Link Peak to Atoms, Unlink Peak, Transmittance or Absorbance and Export Spectrum (a fresh JCAMP-DX file with its peak table, CSV of every point, or the original file), and a right-click on a spectrum offers the ones that apply to it.
+- The MCP server has 52 tools, 10 of them new: `draw_from_name` and `name_structure` for names, `predict_nmr` and `predict_spectrum` for NMR prediction, and `open_spectrum`, `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate` and `spectrum_export` for spectra. Each answer carries the method, confidence where there is one, engine and version. See `docs/AGENTS.md`, `docs/NAMES.md` and `docs/SPECTRA.md`.
+
+### Changed
+
+- The File > Open dialogs (browser and desktop) and Home's Open list `.jdx`, `.dx` and `.jcamp`.
+- The media route of a drawing accepts JCAMP-DX text as well as pictures, which is how an imported spectrum file reaches the drawing.
+- Copy and paste carry spectra with their file and give pasted peaks, integrals and multiplets fresh ids.
+- The MCP instructions, the `formchem://guide` resource and the workflow describe names, NMR prediction and spectra.
+
+### Fixed
+
+- Canvas text drawn with the class `fc-text` (TLC Rf labels and other captions) took the dialogs' 13 px font size on screen instead of its own; the dialog rule now applies to dialog paragraphs only.
+
+### Known issues
+
+- The namer gives a systematic name for about 56 percent of the dictionary's structures; it refuses rather than guesses for bridged, spiro and unlisted fused rings, salts, S and N oxides, phosphorus and metals, imines and azo compounds, and stereocentres outside the parent chain. The parser does not read hydro prefixes and added hydrogen ("pyridin-2(1H)-one"), multipliers above deca or stereo descriptors inside substituents.
+- A misspelt name ("benzoic acdi") is refused from the first character rather than at the misspelt word.
+- After a structure edit the predicted curve follows at once, but its multiplets, integrals and peaks move only after Refresh Predicted Spectrum.
+- 1H multiplet labels can crowd at the default spectrum size (2.05 (s) and 1.25 (t, J = 7.0) touch for ethyl acetate).
+- Predicted spectra are placed inside the page width but not its height; a third prediction on an A4 page can sit below the page.
+- The Analysis panel has no NMR table yet (signal rows with the increments behind each shift); predictions show on the page and in the Spectrum editor.
+- 2D NMR blocks are listed as not drawn, an NMR FID is shown as acquired without a Fourier transform, and of a GC-MS file only the first scan is drawn. Only synthetic test files were read; vendor files may carry quirks the reader has not met.
+- The predicted shifts were measured against typical literature values written from general knowledge, not a cited data set; expect larger errors on crowded or unusual structures, as each atom's confidence and uncertainty say.
+- `open_spectrum` opens a file as a new drawing; agents cannot yet insert a spectrum file into an existing drawing (the window's Insert > Spectrum from File can).
+- The macOS desktop app was not run for this version; everything was checked in the browser window and through the MCP server in process.
+
+### Under the hood
+
+- New engine packages: `services/names/` (the pluggable name engine protocol and registry, the offline engine, dictionary, lexicon, ring table, parser, builder, stereo and namer), `services/nmr/` (environment, substituent groups, 13C and 1H rules, couplings, simulation, the predictor registry, the spectrum object and its refresh, and an accuracy script), and `services/spectra/` (the JCAMP-DX reader and writer, display, peak picking, integrals and baselines, the spectrum source registry). Data: `data/names/` holds the dictionary in seven files, written for FormChem.
+- New routes: `/api/names/to-structure`, `/api/names/to-name`, `/api/names/engines`, `POST /api/documents/{id}/names/insert`, `/api/nmr/predictors`, `/api/nmr/predict`, `POST /api/documents/{id}/nmr/predict-spectrum` and `/nmr/refresh`, `/api/documents/{doc}/spectra/{obj}/data`, `/peaks`, `/integrals`, `/export` and `/api/spectra/parse`.
+- The name engine and the NMR predictor are both registries: OPSIN or an online lookup can be registered in front of the offline name engine, and a data-backed NMR predictor in front of the increments, with no change to the routes, the window or the MCP tools.
+- The window gains a spectrum object kind with a keyed page renderer and a data cache by zoom level, the atom link layer, the Spectrum editor, and the name, NMR and spectrum commands.
+- numpy (BSD-3-Clause) was already installed with RDKit; the engine now imports it directly, so it is pinned at 2.5.5 and listed in `NOTICE.md`, with a section on FormChem's own names and NMR data. No other new dependency.
+- `docs/FORMAT.md` says which spectrum files are kept and how (`media/[id].jdx`), that a peak's `y` is in the y mode shown when it was picked, and that normalising one integral rewrites them all.
+- Translations of the new strings into all 25 languages.
+
## 0.8.0 · 2026-12-03
Agents: Claude Code, Codex, Cursor, Antigravity or any MCP client can now draw in FormChem directly. An agent opens and makes drawings, draws structures and reaction schemes from SMILES or molfiles, builds and edits them atom by atom, reads every structure back in machine form, and checks its own work with a picture drawn by the window's own renderer. Every change is one undo step you see as it lands, Agent activity lists every call with undo for the latest one, and Stop in the title bar shuts an agent out.
diff --git a/CLAUDE.md b/CLAUDE.md
index 47b02332..47e0cc49 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -4,9 +4,9 @@ Two jobs happen in this repo: drawing chemistry with FormChem, and developing Fo
## Drawing with FormChem
-The FormChem MCP server runs at http://127.0.0.1:8220/mcp, configured in .mcp.json; HTTP requests need the agent token (`./formchem agents token`; `./formchem agents install` writes it into the configs, and the stdio transport `./formchem mcp` sends it itself). Start the app with `./formchem` so changes appear live in the window. It has 42 tools. Changing tools make the window ask the person the first time unless you were started from FormChem's own dock, and the person can Stop an agent from the title bar.
+The FormChem MCP server runs at http://127.0.0.1:8220/mcp, configured in .mcp.json; HTTP requests need the agent token (`./formchem agents token`; `./formchem agents install` writes it into the configs, and the stdio transport `./formchem mcp` sends it itself). Start the app with `./formchem` so changes appear live in the window. It has 60 tools. Changing tools make the window ask the person the first time unless you were started from FormChem's own dock, and the person can Stop an agent from the title bar.
-Since 0.8.0 agents draw directly: `get_context` or `list_open_documents` first; `draw_from_smiles` (reaction SMILES draws a scheme) and `draw_from_molfile` place a structure in free space as one undo step and answer with ids, SMILES, InChIKey, formula and a picture; `get_atoms` names atoms and bonds by id for the edit tools (`add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text`, `add_reaction`), each one undo step; check your work with `render`, `get_structure` and `validate`; `convert` and `batch_convert` match `./formchem convert` and `batch`. Reaction tools, analysis tools, the window's own commands (`list_commands`, `run_command`), Form extensions and `handoff` (with `question` when you need the person's input) are there too. Every call shows in the window's Agent activity panel.
+Since 0.8.0 agents draw directly: `get_context` or `list_open_documents` first; `draw_from_smiles` (reaction SMILES draws a scheme) and `draw_from_molfile` place a structure in free space as one undo step and answer with ids, SMILES, InChIKey, formula and a picture; `get_atoms` names atoms and bonds by id for the edit tools (`add_atom`, `add_bond`, `set_charge`, `set_atom`, `set_stereo`, `replace_substructure`, `delete`, `move`, `scale`, `align`, `clean_layout`, `add_arrow`, `add_text`, `add_reaction`), each one undo step; check your work with `render`, `get_structure` and `validate`; `convert` and `batch_convert` match `./formchem convert` and `batch`. Since 0.9.0 `draw_from_name` and `name_structure` read and write names offline, `predict_nmr` and `predict_spectrum` predict 1H and 13C NMR, and `open_spectrum`, `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate` and `spectrum_export` work with JCAMP-DX spectra. Since 0.10.0 `build_3d` builds a structure in 3D (check that its answer says every stereo label was kept), `conformers_3d`, `minimise_3d`, `scan_dihedral` and `measure_3d` work on its conformers with the force field and version beside each number, `open_3d_structure` opens PDB, mmCIF, SDF and MOL files, `extract_ligand` turns a bound ligand into a structure, and `export_3d` writes MOL, SDF, PDB or XYZ; an edit to a structure's atoms or bonds drops its conformers. Reaction tools, analysis tools, the window's own commands (`list_commands`, `run_command`), Form extensions and `handoff` (with `question` when you need the person's input) are there too. Every call shows in the window's Agent activity panel.
Load the skill `.claude/skills/formchem-harness` for using the app. For work on the codebase itself, load `.claude/skills/formchem-skillset`. The document format is `docs/FORMAT.md`.
diff --git a/NOTICE.md b/NOTICE.md
index 3fce049c..5c681435 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -20,6 +20,10 @@ This file is the human list, with the reason each work is there. The full licenc
| Package | License | Notes |
| --- | --- | --- |
| @xterm/xterm 6.0.0, @xterm/addon-fit 0.11.0 | MIT | app, the terminal dock |
+| 3Dmol.js 3.0.0 (`3dmol`, Copyright (c) 2014, University of Pittsburgh and contributors), only its ES build `3Dmol.es6-min.js`, loaded the first time a 3D view opens | BSD-3-Clause | app, the 3D View panel and the 3D objects' snapshots; it incorporates GLmol, Three.js and jQuery code under the notices below |
+| pako 2.2.0, and pako 1.0.11 under upng-js | MIT AND Zlib | app, through 3dmol (compressed structure files) |
+| upng-js 2.1.0 | MIT | app, through 3dmol (PNG encoding) |
+| iobuffer 5.4.0, netcdfjs 3.0.0 | MIT | app, through 3dmol (binary trajectory and NetCDF readers) |
| ptyprocess 0.7.0 (not Windows), pywinpty 3.0.5 (Windows; its wheel carries winpty and OpenConsole.exe and conpty.dll from Microsoft Terminal, both MIT, and MIT or Apache-2.0 Rust crates listed in its SBOM) | ISC, MIT | engine, the terminal dock's pseudo-terminal |
| keyring 25.7.0, jaraco.classes, jaraco.context, jaraco.functools, more-itertools, jeepney (Linux) | MIT | engine, keeps the key that seals the agent access setting in the system keychain |
| SecretStorage (Linux), pywin32-ctypes (Windows) | BSD-3-Clause | engine, keychain access for keyring |
@@ -27,6 +31,7 @@ This file is the human list, with the reason each work is there. The full licenc
| httpx 0.28.1 | BSD-3-Clause | engine |
| starlette, pydantic, pydantic-core | BSD-3-Clause, MIT, MIT | engine, through fastapi |
| RDKit 2025.9.3 (`rdkit` Python wheel, with the InChI library and CoordGen it carries) | BSD-3-Clause | engine, the chemistry core: structure model, sanitisation, canonical SMILES, InChI, stereo, coordinates; required from 0.1.0 |
+| numpy 2.5.5 (its wheels carry OpenBLAS and LAPACK, BSD-3-Clause, and the GCC runtime libraries, GPL-3.0-or-later WITH GCC-exception-3.1, as separate shared libraries) | BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0 | engine, decoding, decimating, peak picking and integrating JCAMP-DX spectra and simulating predicted NMR spectra; also a dependency of RDKit; pinned from 0.9.0 |
| Indigo 1.49.0 (`epam.indigo`) | Apache-2.0 | engine, reading and writing chemical drawing formats; required from 0.1.0 |
| fontTools 4.69.1 (fonttools) | MIT | engine, embeds subsets of the label fonts in exported SVG and draws label outlines in PDF and EPS |
| Other Python packages frozen into the engine | listed with their licences in `THIRD-PARTY-NOTICES.txt` | read from the installed metadata of `backend/requirements.txt` |
@@ -36,6 +41,16 @@ This file is the human list, with the reason each work is there. The full licenc
| Arimo (Copyright 2020-2026 The Arimo Project Authors; googlefonts/arimo 4a6255f, through google/fonts 659809e), variable weight, roman and italic | SIL OFL-1.1 | app, atom labels and captions standing in for Arial and Helvetica so output measures the same everywhere; `frontend/public/fonts/Arimo-*.ttf` with `Arimo-OFL.txt` beside them |
| Tinos (Copyright 2026 The Tinos Project Authors; googlefonts/tinos 3b4482a, through google/fonts 659809e), regular, bold, italic, bold italic | SIL OFL-1.1 | app, the serif presets standing in for Times; `frontend/public/fonts/Tinos-*.ttf` with `Tinos-OFL.txt` beside them |
+### Works incorporated in 3Dmol.js
+
+Quoted from `node_modules/3dmol/LICENSE`, which says: "3Dmol.js incorporates code from GLmol, Three.js, and jQuery and is licensed under a BSD-3-Clause license." The full texts are in `THIRD-PARTY-NOTICES.txt`.
+
+| Work | Notice | License |
+| --- | --- | --- |
+| GLmol 0.47 (Molecular Viewer on WebGL/Javascript; contributor Robert Hanson for parseXYZ, deferred instantiation) | (C) Copyright 2011-2012, biochem_fan | dual MIT or LGPL3; FormChem uses it under MIT |
+| Three.js (https://github.com/mrdoob/three.js) | Copyright (c) 2010-2012 three.js Authors. All rights reserved. | MIT |
+| jQuery (http://jquery.org/) | Copyright (c) 2011 John Resig | MIT |
+
## Desktop shell: crates under other licences
Tauri links these crates unedited (no `[patch]` and no vendored copy):
@@ -57,6 +72,13 @@ The Linux AppImage also carries the build machine's WebKitGTK, GTK and GLib (LGP
| cairosvg, Pillow (run by `assets/icon_src/build.py` in a throwaway environment to draw the icon set; the icons are shipped, the tools are not) | LGPL-3.0-or-later, MIT-CMU |
| PyInstaller | GPL-2.0 with the bootloader exception, which permits distributing the frozen engine; the bootloader is inside the engine, so its licence text is in `THIRD-PARTY-NOTICES.txt` |
+## FormChem's own data
+
+These ship with the engine and are FormChem's own work under Apache-2.0; no third-party database or list was copied to make them:
+
+- The names dictionary in `backend/app/data/names/` (common names with SMILES written for FormChem and InChIKeys computed with RDKit), read by the offline name engine.
+- The NMR increments in `backend/app/services/nmr/` (rounded base values and substituent terms of textbook additive methods), and the reference shifts in `backend/app/services/nmr/reference.py`, approximate typical values used only to measure the predictor's error. NMRShiftDB2 data is not used.
+
## Trademarks
Other vendors' product names appear in FormChem, its documentation and its interface only to name the file formats it reads and writes. They are the trademarks of their owners. FormChem is independent and not affiliated with or endorsed by any of them, and it carries none of their code, text, icons, templates or styles.
diff --git a/README.md b/README.md
index 5a5f01d3..05e62146 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
with an MCP server so an agent works in the same window you see. Local-first, no account.
-
+
@@ -28,7 +28,7 @@
## Features
-FormChem draws structures and reactions: draw on the canvas with the mouse or the keyboard, annotate with arrows, brackets, shapes, tables and TLC plates, and the chemistry engine checks every change, reads reaction schemes, maps their atoms, works out the amounts, labels stereochemistry and computes properties with the method behind each number. Drawings go out as chemistry files and as pictures that open again as the drawing, through the clipboard to other programs, and whole files convert on the command line. Agents draw in the same window: they draw and edit structures and reactions through 42 MCP tools, check their work with a picture of what you see, and every call is one undo step you can review, undo or stop.
+FormChem draws structures and reactions: draw on the canvas with the mouse or the keyboard, annotate with arrows, brackets, shapes, tables and TLC plates, and the chemistry engine checks every change, reads reaction schemes, maps their atoms, works out the amounts, labels stereochemistry and computes properties with the method behind each number. Drawings go out as chemistry files and as pictures that open again as the drawing, through the clipboard to other programs, and whole files convert on the command line. Names turn into structures and structures into names, offline; 1H and 13C NMR spectra are predicted with the method and version beside every number; and measured spectra open from JCAMP-DX files with their peaks linked to atoms. Structures turn in 3D: built from the drawing with their stereo checked, with conformers, minimisation, dihedral scans, measurements and surfaces, placed on the page as 3D views, and proteins open from PDB and mmCIF files with their ligands. Agents draw in the same window: they draw and edit structures and reactions, from names too, predict and read spectra and build in 3D through 60 MCP tools, check their work with a picture of what you see, and every call is one undo step you can review, undo or stop.
@@ -62,7 +62,17 @@ FormChem draws structures and reactions: draw on the canvas with the mouse or th
Size on the sheet Drag a corner handle, or use Arrange > Scale, Scale Up and Scale Down, to make structures larger or smaller on the page by percent or bond length, with their labels and line widths or without.
- MCP server 42 tools over HTTP (with an agent token) and stdio: agents open and save drawings, draw from SMILES, reaction SMILES or molfiles, build and edit atom by atom by id, read structures back as SMILES, InChIKey and molfiles, render what you see, validate, convert files as the command line does, and run every menu command. Agent Activity lists each call with undo and Stop.
+ Names Insert > Structure from Name reads "aspirin" or "(2R)-butan-2-ol" offline as you type, from a dictionary of 629 common names or a systematic IUPAC parser, with a confidence and the reason when it refuses. Paste a name to draw it; the Analysis panel names your structure, and a systematic name is shown only when it reads back to the same structure.
+ NMR prediction Predict 1H and 13C NMR spectra with FormChem's own increment method: shifts with a confidence and an uncertainty, multiplets with J values, integrals, and the increments behind each shift. The spectrum lands beside the structure, linked to its atoms, titled with the method, version and frequency (holdout error 0.09 ppm for 1H, 1.1 ppm for 13C).
+ Spectra Open IR, Raman, UV-Vis, MS and NMR spectra from JCAMP-DX files in every compression form, kept byte for byte in the drawing. The Spectrum editor zooms, picks peaks, integrates and switches transmittance and absorbance; peaks, integrals and multiplets link to atoms, and hovering one lights the other.
+
+
+ 3D View Build 3D from 2D keeps every wedge and double bond as drawn and checks each stereocentre from the 3D model (Taxol keeps 11 of 11). Wire, stick, ball and stick, space filling and cartoon; van der Waals, solvent surfaces and ESP; distances, angles and dihedrals; a 3D view placed on the page keeps its angle and style. PNG and glTF out.
+ Conformers and energies Conformer searches within an energy window with Boltzmann populations, MMFF94, MMFF94s or UFF minimisation, and relaxed dihedral scans plotted with their barrier, each energy shown with its force field and version. Edit the structure and its conformers go in the same undo step.
+ Proteins and ligands PDB and mmCIF files open as cartoon with the ligand in focus and waters hidden, the file kept byte for byte in the drawing. Extract Ligand turns a ligand into an editable structure with its coordinates; 3D SD files keep theirs. Export as MOL, SD, PDB or XYZ with every hydrogen.
+
+
+ MCP server 60 tools over HTTP (with an agent token) and stdio: agents open and save drawings, draw from SMILES, reaction SMILES, molfiles or names, build and edit atom by atom by id, read structures back as SMILES, InChIKey, molfiles and names, render what you see, validate, predict NMR, open spectra and pick their peaks, build 3D conformers, scan and measure them, open PDB files and extract ligands, convert files as the command line does, and run every menu command. Agent Activity lists each call with undo and Stop.
The family shell Home, Preferences, twelve menus with full keyboard use (those that do not fit fold into More menus), Find a Command, the terminal and agent dock, Help and updates, in 26 interface languages.
Form extensions Extensions installed by FormPortal run in a sandboxed frame from the Extensions menu and panel, and ask before they read or change a drawing.
@@ -70,13 +80,12 @@ FormChem draws structures and reactions: draw on the canvas with the mouse or th
### Coming next
-- Names (also as an agent tool), predicted spectra and spectrum viewing
-- 3D models of molecules
-- A local structure database with search
+- A local structure database: records with fields, exact, substructure, similarity and formula search, saved queries, SD import and export, and table and gallery views with structure columns
+- A notebook view: experiment entries with schemes, tables, spectra and text, searchable across entries
## Built for agents
-Claude Code, Codex, Cursor, Antigravity or any MCP client draws in the window you have open. `draw_from_smiles {"smiles": "CC(=O)Oc1ccccc1C(=O)O"}` lays aspirin out in free space on the page and answers with its ids, SMILES, InChIKey, formula and a picture drawn by the window's own renderer; `render`, `get_structure` and `validate` check the work; `get_atoms` and 14 edit tools (`add_atom`, `add_bond`, `set_charge`, `set_stereo`, `replace_substructure`, `move`, `scale`, `add_arrow`, `add_reaction` and more) build and change structures by id; `new_document`, `open_document`, `save_document` and `close_document` handle drawings; `convert` and `batch_convert` give the command line's exact output. The window's commands (`list_commands`, `run_command`), Form extensions, handoffs and the reaction and analysis tools are there as before.
+Claude Code, Codex, Cursor, Antigravity or any MCP client draws in the window you have open. `draw_from_smiles {"smiles": "CC(=O)Oc1ccccc1C(=O)O"}` lays aspirin out in free space on the page and answers with its ids, SMILES, InChIKey, formula and a picture drawn by the window's own renderer; `render`, `get_structure` and `validate` check the work; `get_atoms` and 14 edit tools (`add_atom`, `add_bond`, `set_charge`, `set_stereo`, `replace_substructure`, `move`, `scale`, `add_arrow`, `add_reaction` and more) build and change structures by id; `new_document`, `open_document`, `save_document` and `close_document` handle drawings; `convert` and `batch_convert` give the command line's exact output. From 0.9.0 `draw_from_name {"name": "caffeine"}` draws a name and says how it was read, `name_structure` names what is drawn, `predict_nmr` and `predict_spectrum` give predicted 1H and 13C NMR with their method and version, and `open_spectrum`, `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate` and `spectrum_export` work on JCAMP-DX spectra. From 0.10.0 `build_3d` builds a structure in 3D and says whether every stereo label was kept, `conformers_3d`, `minimise_3d`, `scan_dihedral` and `measure_3d` give energies and geometry with their force field and version, `open_3d_structure` opens PDB, mmCIF, SDF and MOL files, `extract_ligand` turns a bound ligand into a structure, and `export_3d` writes MOL, SDF, PDB or XYZ. The window's commands (`list_commands`, `run_command`), Form extensions, handoffs and the reaction and analysis tools are there as before.
Every change is one undo step, labelled with the tool in Edit > Undo. Reading is always open; the window asks before an outside agent changes anything, the title bar shows which agent is editing with a Stop button, and Window > Agent Activity lists every call with undo for the latest one. The HTTP endpoint needs the agent token, which `./formchem agents install` writes into the agent configs; stdio clients send it themselves. An agent set up for 0.7.0 over HTTP needs `./formchem agents install` once more.
@@ -100,6 +109,8 @@ FormChem hosts Form extensions (Form Extension Contract, API 1): FormPortal inst
- **Desktop:** a Tauri 2 shell around the same window, with the engine frozen by PyInstaller. On macOS it ships as a folder inside the app, so nothing is unpacked at launch (the one-file engine it replaces made the app take about 30 seconds to open); on Linux and Windows it is still a one-file sidecar.
- **Pictures:** built from the drawing off screen, never from the canvas; PDF and EPS come from FormChem's own writer, with fontTools for the label fonts.
- **Agents:** the drawing and edit tools build JSON ops in the engine and apply them as one transaction, so they work with or without a window; pictures for agents come from the window's own renderer over the live channel, with an RDKit fallback when no window is open. One function logs every call for Agent Activity.
+- **Names and spectra:** FormChem's own offline name engine, NMR increment predictor and JCAMP-DX reader, each behind a registry so that OPSIN or a data-backed predictor can be added later without changing the window or the tools. No name or shift database is copied; spectrum points are computed on request and never stored in the drawing.
+- **3D:** RDKit's ETKDGv3, MMFF94 and UFF in the engine, FormChem's own PDB and mmCIF readers and glTF writer, and 3Dmol.js in the window, loaded only when a 3D view first opens. Conformers live in the drawing and drop in the same undo step when the structure they were built from changes, in the engine and in the window alike.
- **Format:** `.fchem` is a zip package around `document.json`, specified in [`docs/FORMAT.md`](docs/FORMAT.md), which both the engine and the window implement.
## Run it from source
@@ -118,7 +129,7 @@ cd formchem
`./formchem desktop dev` opens the desktop window instead. On Windows use `formchem.bat install` and `formchem.bat`. The engine listens on `127.0.0.1:8220` (MCP at `/mcp`); `FORMCHEM_DATA_DIR` moves the data folder from `~/formchem`.
> [!IMPORTANT]
-> **Status:** in development, and the repository is private until the first release. This version draws, checks and analyses structures and reactions, with stereochemistry, query structures and calculated properties, from 0.7.0 reads and writes the common chemistry files, exports pictures, prints, copies and pastes, and converts files on the command line, and from 0.8.0 lets agents draw, edit, check and convert directly; names, spectra and 3D come in later versions. The 0.7.0 and 0.8.0 desktop apps have not been run on a Mac yet, and 0.8.0's agent tools were checked over stdio and HTTP, not yet with a real Claude Code or Codex client. Nothing is built or released for download yet.
+> **Status:** in development, and the repository is private until the first release. This version draws, checks and analyses structures and reactions, with stereochemistry, query structures and calculated properties, from 0.7.0 reads and writes the common chemistry files, exports pictures, prints, copies and pastes, and converts files on the command line, from 0.8.0 lets agents draw, edit, check and convert directly, from 0.9.0 reads and writes chemical names, predicts NMR spectra and opens JCAMP-DX spectra, and from 0.10.0 builds structures in 3D, searches conformers, opens PDB and mmCIF files and extracts their ligands; a structure database comes next. The 0.7.0 to 0.10.0 desktop apps have not been run on a Mac yet, 0.8.0's agent tools were checked over stdio and HTTP and 0.9.0's and 0.10.0's in process, not yet with a real Claude Code or Codex client, the NMR accuracy figures rest on approximate reference shifts, the 3D View ran on software WebGL only, and xtb and CREST are not offered. Nothing is built or released for download yet.
**Contributing:** branch from `main`, keep changes to source here, and leave packaging and releases to FormCompiler. See [`CONTRIBUTING.md`](CONTRIBUTING.md), [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md), [`.docs/BRANCHING.md`](.docs/BRANCHING.md) and [`AGENTS.md`](AGENTS.md). Report security issues privately as [`SECURITY.md`](SECURITY.md) describes.
@@ -126,12 +137,12 @@ cd formchem
| Path | What it is |
|---|---|
-| `backend/` | FastAPI engine: documents, chemistry, reactions and analysis, file formats and pictures, the conversion command line, templates, live channel, terminal dock, extensions, MCP and the agent tools, the agent call log |
-| `frontend/` | Vanilla TypeScript and Vite window: the drawing canvas and tools, export, print and clipboard, shell, menus, Home, Preferences, dock |
+| `backend/` | FastAPI engine: documents, chemistry, reactions and analysis, names, NMR prediction and spectra, 3D (conformers, force fields, PDB and mmCIF), file formats and pictures, the conversion command line, templates, live channel, terminal dock, extensions, MCP and the agent tools, the agent call log |
+| `frontend/` | Vanilla TypeScript and Vite window: the drawing canvas and tools, spectra and the Spectrum editor, the 3D View, export, print and clipboard, shell, menus, Home, Preferences, dock |
| `setup/` | Install, boot, build, freeze, convert and agent setup scripts |
| `src-tauri/` | Desktop shell; it starts the engine folder on macOS and the engine sidecar elsewhere |
-Docs: [`.docs/wiki`](.docs/wiki) · Formats: [`docs/FORMATS.md`](docs/FORMATS.md) · Command line: [`docs/CLI.md`](docs/CLI.md) · Agent tools: [`docs/AGENTS.md`](docs/AGENTS.md) · Agents: [`CLAUDE.md`](CLAUDE.md), [`AGENTS.md`](AGENTS.md) · Contributing: [`.docs/BRANCHING.md`](.docs/BRANCHING.md)
+Docs: [`.docs/wiki`](.docs/wiki) · Formats: [`docs/FORMATS.md`](docs/FORMATS.md) · Names: [`docs/NAMES.md`](docs/NAMES.md) · Spectra and NMR: [`docs/SPECTRA.md`](docs/SPECTRA.md) · 3D: [`docs/3D.md`](docs/3D.md) · Command line: [`docs/CLI.md`](docs/CLI.md) · Agent tools: [`docs/AGENTS.md`](docs/AGENTS.md) · Agents: [`CLAUDE.md`](CLAUDE.md), [`AGENTS.md`](AGENTS.md) · Contributing: [`.docs/BRANCHING.md`](.docs/BRANCHING.md)
diff --git a/SECURITY.md b/SECURITY.md
index 7b944daf..5bb31bd9 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -7,7 +7,7 @@ check whether the problem is still there.
| Version | Supported |
| --- | --- |
-| 0.8.x (in development, not yet released) | Yes |
+| 0.10.x (in development, not yet released) | Yes |
| Anything older | No |
## Reporting a vulnerability
diff --git a/THIRD-PARTY-NOTICES.txt b/THIRD-PARTY-NOTICES.txt
index 544df01d..e8c471a3 100644
--- a/THIRD-PARTY-NOTICES.txt
+++ b/THIRD-PARTY-NOTICES.txt
@@ -6591,6 +6591,102 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[[ end file websockets-17.4.dist-info/licenses/LICENSE ]]
+==============================================================================
+npm: 3dmol 3.0.0
+Licence: BSD-3-Clause
+Source: https://registry.npmjs.org/3dmol/-/3dmol-3.0.0.tgz
+[[ begin file LICENSE ]]
+3Dmol.js incorporates code from GLmol, Three.js, and jQuery and
+is licensed under a BSD-3-Clause license.
+
+* 3Dmol.js
+ Copyright (c) 2014, University of Pittsburgh and contributors
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+* GLmol
+ GLmol - Molecular Viewer on WebGL/Javascript (0.47)
+ (C) Copyright 2011-2012, biochem_fan
+ License: dual license of MIT or LGPL3
+
+ Contributors:
+ Robert Hanson for parseXYZ, deferred instantiation
+
+
+
+* Three.js
+ https://github.com/mrdoob/three.js
+
+ Copyright (c) 2010-2012 three.js Authors. All rights reserved.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+* jQuery
+ http://jquery.org/
+
+ Copyright (c) 2011 John Resig
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+[[ end file LICENSE ]]
+
==============================================================================
npm: @tauri-apps/api 2.12.1
Licence: Apache-2.0 OR MIT
@@ -6674,6 +6770,102 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
[[ end file LICENSE ]]
+==============================================================================
+npm: iobuffer 5.4.0
+Licence: MIT
+Source: https://registry.npmjs.org/iobuffer/-/iobuffer-5.4.0.tgz
+[[ begin file LICENSE ]]
+The MIT License (MIT)
+
+Copyright (c) 2015 Michaël Zasso
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+[[ end file LICENSE ]]
+
+==============================================================================
+npm: netcdfjs 3.0.0
+Licence: MIT
+Source: https://registry.npmjs.org/netcdfjs/-/netcdfjs-3.0.0.tgz
+[[ begin file LICENSE ]]
+The MIT License (MIT)
+
+Copyright (c) 2016 cheminfo
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+[[ end file LICENSE ]]
+
+==============================================================================
+npm: pako 1.0.11
+Licence: (MIT AND Zlib)
+Source: https://registry.npmjs.org/pako/-/pako-1.0.11.tgz
+[[ file LICENSE: shared text T5 ]]
+
+==============================================================================
+npm: pako 2.2.0
+Licence: (MIT AND Zlib)
+Source: https://registry.npmjs.org/pako/-/pako-2.2.0.tgz
+[[ file LICENSE: shared text T5 ]]
+
+==============================================================================
+npm: upng-js 2.1.0
+Licence: MIT
+Source: https://registry.npmjs.org/upng-js/-/upng-js-2.1.0.tgz
+[[ begin file LICENSE ]]
+MIT License
+
+Copyright (c) 2017 Photopea
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+[[ end file LICENSE ]]
+
==============================================================================
crate: adler2 2.0.1
Licence: 0BSD OR MIT OR Apache-2.0
@@ -6692,22 +6884,22 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
[[ end file LICENSE-0BSD ]]
-[[ file LICENSE-APACHE: shared text T5 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: aho-corasick 1.1.5
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/aho-corasick
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: alloc-no-stdlib 3.0.0
Licence: BSD-3-Clause
Source: https://github.com/dropbox/rust-alloc-no-stdlib
-[[ file LICENSE: shared text T10 ]]
+[[ file LICENSE: shared text T11 ]]
==============================================================================
crate: alloc-stdlib 0.3.0
@@ -6761,8 +6953,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
crate: anyhow 1.0.105
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/anyhow
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-broadcast 0.7.2
@@ -6988,91 +7180,91 @@ SOFTWARE.
crate: async-channel 2.5.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/async-channel
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-executor 1.14.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/async-executor
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-io 2.6.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/async-io
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-lock 3.5.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/async-lock
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-process 2.5.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/async-process
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-recursion 1.2.0
Licence: MIT OR Apache-2.0
Source: https://github.com/dcchut/async-recursion
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-signal 0.2.14
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/async-signal
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-task 4.7.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/async-task
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: async-trait 0.1.92
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/async-trait
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: atk 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: atk-sys 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: atomic-waker 1.1.2
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/atomic-waker
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
-[[ file LICENSE-THIRD-PARTY: shared text T15 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
+[[ file LICENSE-THIRD-PARTY: shared text T16 ]]
==============================================================================
crate: autocfg 1.5.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/cuviper/autocfg
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2018 Josh Stone
@@ -7105,7 +7297,7 @@ DEALINGS IN THE SOFTWARE.
crate: base64 0.21.7
Licence: MIT OR Apache-2.0
Source: https://github.com/marshallpierce/rust-base64
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
The MIT License (MIT)
@@ -7134,7 +7326,7 @@ THE SOFTWARE.
crate: base64 0.23.1
Licence: MIT OR Apache-2.0
Source: https://github.com/marshallpierce/rust-base64
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
The MIT License (MIT)
@@ -7163,49 +7355,49 @@ THE SOFTWARE.
crate: bit-set 0.11.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/contain-rs/bit-vec
-[[ file LICENSE-APACHE: shared text T16 ]]
-[[ file LICENSE-MIT: shared text T17 ]]
+[[ file LICENSE-APACHE: shared text T17 ]]
+[[ file LICENSE-MIT: shared text T18 ]]
==============================================================================
crate: bit-set 0.8.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/contain-rs/bit-set
-[[ file LICENSE-APACHE: shared text T16 ]]
-[[ file LICENSE-MIT: shared text T17 ]]
+[[ file LICENSE-APACHE: shared text T17 ]]
+[[ file LICENSE-MIT: shared text T18 ]]
==============================================================================
crate: bit-vec 0.10.2
Licence: Apache-2.0 OR MIT
Source: https://github.com/contain-rs/bit-vec
-[[ file LICENSE-APACHE: shared text T16 ]]
-[[ file LICENSE-MIT: shared text T17 ]]
+[[ file LICENSE-APACHE: shared text T17 ]]
+[[ file LICENSE-MIT: shared text T18 ]]
==============================================================================
crate: bit-vec 0.8.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/contain-rs/bit-vec
-[[ file LICENSE-APACHE: shared text T16 ]]
-[[ file LICENSE-MIT: shared text T17 ]]
+[[ file LICENSE-APACHE: shared text T17 ]]
+[[ file LICENSE-MIT: shared text T18 ]]
==============================================================================
crate: bitflags 1.3.2
Licence: MIT/Apache-2.0
Source: https://github.com/bitflags/bitflags
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T18 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T19 ]]
==============================================================================
crate: bitflags 2.13.2
Licence: MIT OR Apache-2.0
Source: https://github.com/bitflags/bitflags
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T18 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T19 ]]
==============================================================================
crate: block-buffer 0.10.4
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/utils
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2018-2019 The RustCrypto Project Developers
@@ -7238,7 +7430,7 @@ DEALINGS IN THE SOFTWARE.
crate: block-buffer 0.12.1
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/utils
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2018-2025 The RustCrypto Project Developers
@@ -7277,14 +7469,14 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: blocking 1.7.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/blocking
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: brotli 9.1.3
Licence: BSD-3-Clause AND MIT
Source: https://github.com/dropbox/rust-brotli
-[[ file LICENSE.BSD-3-Clause: shared text T10 ]]
+[[ file LICENSE.BSD-3-Clause: shared text T11 ]]
[[ begin file LICENSE.MIT ]]
Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors.
@@ -7311,13 +7503,13 @@ THE SOFTWARE.
crate: brotli-decompressor 6.4.1
Licence: BSD-3-Clause/MIT
Source: https://github.com/dropbox/rust-brotli-decompressor
-[[ file LICENSE: shared text T10 ]]
+[[ file LICENSE: shared text T11 ]]
==============================================================================
crate: bs58 0.5.1
Licence: MIT/Apache-2.0
Source: https://github.com/Nullus157/bs58-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
MIT License
Copyright (c) 2016 The roaring-rs developers.
@@ -7345,7 +7537,7 @@ SOFTWARE.
crate: bumpalo 3.20.4
Licence: MIT OR Apache-2.0
Source: https://github.com/fitzgen/bumpalo
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2019 Nick Fitzgerald
@@ -7378,7 +7570,7 @@ DEALINGS IN THE SOFTWARE.
crate: bytemuck 1.25.2
Licence: Zlib OR Apache-2.0 OR MIT
Source: https://github.com/Lokathor/bytemuck
-[[ file LICENSE-APACHE: shared text T20 ]]
+[[ file LICENSE-APACHE: shared text T21 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -7390,15 +7582,15 @@ The above copyright notice and this permission notice (including the next paragr
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[[ end file LICENSE-MIT ]]
-[[ file LICENSE-ZLIB: shared text T21 ]]
+[[ file LICENSE-ZLIB: shared text T22 ]]
==============================================================================
crate: byteorder 1.5.1
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/byteorder
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: bytes 1.12.2
@@ -7436,34 +7628,34 @@ DEALINGS IN THE SOFTWARE.
crate: cairo-rs 0.18.5
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: cairo-sys-rs 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: camino 1.2.6
Licence: MIT OR Apache-2.0
Source: https://github.com/camino-rs/camino
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: cargo-platform 0.1.9
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/cargo
-[[ file LICENSE-APACHE: shared text T5 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: cargo_metadata 0.19.2
Licence: MIT
Source: https://github.com/oli-obk/cargo_metadata
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: cargo_toml 1.0.1
@@ -7678,8 +7870,8 @@ DEALINGS IN THE SOFTWARE.
crate: cc 1.12.0
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/cc-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: cesu8 1.1.0
@@ -8142,7 +8334,7 @@ SOFTWARE.
crate: cfg-expr 0.15.8
Licence: MIT OR Apache-2.0
Source: https://github.com/EmbarkStudios/cfg-expr
-[[ file LICENSE-APACHE: shared text T16 ]]
+[[ file LICENSE-APACHE: shared text T17 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2019 Embark Studios
@@ -8175,8 +8367,8 @@ DEALINGS IN THE SOFTWARE.
crate: cfg-if 1.0.5
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/cfg-if
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: cfg_aliases 0.2.2
@@ -8500,22 +8692,22 @@ THE SOFTWARE.
crate: concurrent-queue 2.5.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/concurrent-queue
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: const-oid 0.10.3
Licence: Apache-2.0 OR MIT
Source: https://github.com/RustCrypto/formats
-[[ file LICENSE-APACHE: shared text T19 ]]
-[[ file LICENSE-MIT: shared text T23 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
+[[ file LICENSE-MIT: shared text T24 ]]
==============================================================================
crate: constant_time_eq 0.6.2
Licence: CC0-1.0 OR MIT-0 OR Apache-2.0
Source: https://codeberg.org/cesarb/constant_time_eq
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-CC0: shared text T24 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-CC0: shared text T25 ]]
[[ begin file LICENSE-MIT0 ]]
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
@@ -8774,22 +8966,22 @@ DEALINGS IN THE SOFTWARE.
crate: core-foundation 0.10.1
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/core-foundation-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: core-foundation 0.9.4
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/core-foundation-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: core-foundation-sys 0.8.7
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/core-foundation-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: core-graphics 0.25.0
@@ -8802,21 +8994,21 @@ http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
option. All files in the project carrying such notice may not be
copied, modified, or distributed except according to those terms.
[[ end file COPYRIGHT ]]
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: core-graphics-types 0.2.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/core-foundation-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: core_detect 1.0.0
Licence: MIT/Apache-2.0
Source: https://github.com/thomcc/core_detect
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2017-2020 The Rust Project Developers
@@ -8849,7 +9041,7 @@ DEALINGS IN THE SOFTWARE.
crate: cpufeatures 0.2.17
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/utils
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2020-2025 The RustCrypto Project Developers
@@ -8882,14 +9074,14 @@ DEALINGS IN THE SOFTWARE.
crate: cpufeatures 0.3.1
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/utils
-[[ file LICENSE-APACHE: shared text T19 ]]
-[[ file LICENSE-MIT: shared text T23 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
+[[ file LICENSE-MIT: shared text T24 ]]
==============================================================================
crate: crc32fast 1.5.6
Licence: MIT OR Apache-2.0
Source: https://github.com/srijs/rust-crc32fast
-[[ file LICENSE-APACHE: shared text T26 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -8918,8 +9110,8 @@ SOFTWARE.
crate: crossbeam-channel 0.5.17
Licence: MIT OR Apache-2.0
Source: https://github.com/crossbeam-rs/crossbeam
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T27 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T28 ]]
[[ begin file LICENSE-THIRD-PARTY ]]
===============================================================================
@@ -9520,14 +9712,14 @@ limitations under the License.
crate: crossbeam-utils 0.8.23
Licence: MIT OR Apache-2.0
Source: https://github.com/crossbeam-rs/crossbeam
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T27 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T28 ]]
==============================================================================
crate: crypto-common 0.1.7
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/traits
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2021 RustCrypto Developers
@@ -9560,7 +9752,7 @@ DEALINGS IN THE SOFTWARE.
crate: crypto-common 0.2.2
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/traits
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2021-2026 RustCrypto Developers
@@ -9593,51 +9785,51 @@ DEALINGS IN THE SOFTWARE.
crate: cssparser 0.37.0
Licence: MPL-2.0
Source: https://github.com/servo/rust-cssparser
-[[ file LICENSE: shared text T28 ]]
+[[ file LICENSE: shared text T29 ]]
==============================================================================
crate: cssparser 0.38.0
Licence: MPL-2.0
Source: https://github.com/servo/rust-cssparser
-[[ file LICENSE: shared text T28 ]]
+[[ file LICENSE: shared text T29 ]]
==============================================================================
crate: cssparser-macros 0.7.1
Licence: MPL-2.0
Source: https://github.com/servo/rust-cssparser
-[[ file LICENSE: shared text T28 ]]
+[[ file LICENSE: shared text T29 ]]
==============================================================================
crate: ctor 1.0.14
Licence: Apache-2.0 OR MIT
Source: https://github.com/mmastrac/linktime
-[[ file LICENSE-APACHE: shared text T29 ]]
-[[ file LICENSE-MIT: shared text T30 ]]
+[[ file LICENSE-APACHE: shared text T30 ]]
+[[ file LICENSE-MIT: shared text T31 ]]
==============================================================================
crate: darling 0.24.1
Licence: MIT
Source: https://github.com/TedDriggs/darling
-[[ file LICENSE: shared text T31 ]]
+[[ file LICENSE: shared text T32 ]]
==============================================================================
crate: darling_core 0.24.1
Licence: MIT
Source: https://github.com/TedDriggs/darling
-[[ file LICENSE: shared text T31 ]]
+[[ file LICENSE: shared text T32 ]]
==============================================================================
crate: darling_macro 0.24.1
Licence: MIT
Source: https://github.com/TedDriggs/darling
-[[ file LICENSE: shared text T31 ]]
+[[ file LICENSE: shared text T32 ]]
==============================================================================
crate: dbus 0.9.12
Licence: Apache-2.0/MIT
Source: https://github.com/diwic/dbus-rs
-[[ file LICENSE-APACHE: shared text T32 ]]
-[[ file LICENSE-MIT: shared text T33 ]]
+[[ file LICENSE-APACHE: shared text T33 ]]
+[[ file LICENSE-MIT: shared text T34 ]]
==============================================================================
crate: deranged 0.5.9
@@ -9873,19 +10065,19 @@ SOFTWARE.
crate: derive_more 2.1.1
Licence: MIT
Source: https://github.com/JelteF/derive_more
-[[ file LICENSE: shared text T34 ]]
+[[ file LICENSE: shared text T35 ]]
==============================================================================
crate: derive_more-impl 2.1.1
Licence: MIT
Source: https://github.com/JelteF/derive_more
-[[ file LICENSE: shared text T34 ]]
+[[ file LICENSE: shared text T35 ]]
==============================================================================
crate: digest 0.10.7
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/traits
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2017 Artyom Pavlov
@@ -9918,7 +10110,7 @@ DEALINGS IN THE SOFTWARE.
crate: digest 0.11.3
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/traits
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2017-2025 RustCrypto Developers
Copyright (c) 2017 Artyom Pavlov
@@ -9952,15 +10144,15 @@ DEALINGS IN THE SOFTWARE.
crate: dirs 7.0.0
Licence: MIT OR Apache-2.0
Source: https://codeberg.org/dirs/dirs-rs
-[[ file LICENSE-APACHE: shared text T35 ]]
-[[ file LICENSE-MIT: shared text T36 ]]
+[[ file LICENSE-APACHE: shared text T36 ]]
+[[ file LICENSE-MIT: shared text T37 ]]
==============================================================================
crate: dirs-sys 0.5.0
Licence: MIT OR Apache-2.0
Source: https://github.com/dirs-dev/dirs-sys-rs
-[[ file LICENSE-APACHE: shared text T35 ]]
-[[ file LICENSE-MIT: shared text T36 ]]
+[[ file LICENSE-APACHE: shared text T36 ]]
+[[ file LICENSE-MIT: shared text T37 ]]
==============================================================================
crate: dispatch2 0.3.1
@@ -9972,8 +10164,8 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: displaydoc 0.2.7
Licence: MIT OR Apache-2.0
Source: https://github.com/yaahc/displaydoc
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: dlopen2 0.8.2
@@ -9991,19 +10183,19 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: dom_query 0.28.0
Licence: MIT
Source: https://github.com/niklak/dom_query
-[[ file LICENSE: shared text T37 ]]
+[[ file LICENSE: shared text T38 ]]
==============================================================================
crate: dom_query 0.30.0
Licence: MIT
Source: https://github.com/niklak/dom_query
-[[ file LICENSE: shared text T37 ]]
+[[ file LICENSE: shared text T38 ]]
==============================================================================
crate: dpi 0.1.2
Licence: Apache-2.0 AND MIT
Source: https://github.com/rust-windowing/winit
-[[ file LICENSE: shared text T29 ]]
+[[ file LICENSE: shared text T30 ]]
[[ begin file LICENSE-LIBM-MIT ]]
rust-lang/libm as a whole is available for use under the MIT license:
@@ -10062,8 +10254,8 @@ have been licensed under extremely permissive terms.
crate: dtoa 1.0.11
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/dtoa
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: dtoa-short 0.3.5
@@ -10449,14 +10641,14 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
crate: dunce 1.0.5
Licence: CC0-1.0 OR MIT-0 OR Apache-2.0
Source: https://gitlab.com/kornelski/dunce
-[[ file LICENSE: shared text T24 ]]
+[[ file LICENSE: shared text T25 ]]
==============================================================================
crate: dyn-clone 1.0.20
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/dyn-clone
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: embed-resource 3.0.12
@@ -10539,7 +10731,7 @@ Test code within encoding_rs is dedicated to the Public Domain when so
designated (see the individual files for PD/CC0-dedicated sections).
[[ end file COPYRIGHT ]]
[[ file LICENSE-APACHE: shared text T2 ]]
-[[ file LICENSE-MIT: shared text T38 ]]
+[[ file LICENSE-MIT: shared text T39 ]]
[[ begin file LICENSE-WHATWG ]]
Copyright © WHATWG (Apple, Google, Mozilla, Microsoft).
@@ -10573,7 +10765,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
crate: endi 1.1.1
Licence: MIT
Source: https://github.com/zeenix/endi
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: enumflags2 0.7.12
@@ -10783,7 +10975,7 @@ DEALINGS IN THE SOFTWARE.
crate: equivalent 1.0.3
Licence: Apache-2.0 OR MIT
Source: https://github.com/indexmap-rs/equivalent
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2016--2023
@@ -10816,14 +11008,14 @@ DEALINGS IN THE SOFTWARE.
crate: erased-serde 0.4.11
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/erased-serde
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: errno 0.3.15
Licence: MIT OR Apache-2.0
Source: https://github.com/lambda-fairy/rust-errno
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2014 Chris Wong
@@ -10856,22 +11048,22 @@ DEALINGS IN THE SOFTWARE.
crate: event-listener 5.4.2
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/event-listener
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: event-listener-strategy 0.5.4
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/event-listener-strategy
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: fastrand 2.5.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/fastrand
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: fdeflate 0.3.7
@@ -11116,21 +11308,21 @@ SOFTWARE.
crate: filetime 0.2.30
Licence: MIT/Apache-2.0
Source: https://github.com/alexcrichton/filetime
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: find-msvc-tools 0.1.16
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/cc-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: flate2 1.1.11
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/flate2-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2014-2026 Alex Crichton
@@ -11163,7 +11355,7 @@ DEALINGS IN THE SOFTWARE.
crate: fnv 1.0.7
Licence: Apache-2.0 / MIT
Source: https://github.com/servo/rust-fnv
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2017 Contributors
@@ -11278,28 +11470,28 @@ SOFTWARE.
crate: foreign-types 0.5.0
Licence: MIT/Apache-2.0
Source: https://github.com/sfackler/foreign-types
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T39 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T40 ]]
==============================================================================
crate: foreign-types-macros 0.2.4
Licence: MIT/Apache-2.0
Source: https://github.com/sfackler/foreign-types
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T39 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T40 ]]
==============================================================================
crate: foreign-types-shared 0.3.1
Licence: MIT/Apache-2.0
Source: https://github.com/sfackler/foreign-types
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T39 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T40 ]]
==============================================================================
crate: form_urlencoded 1.2.3
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/rust-url
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2013-2016 The rust-url developers
@@ -11332,110 +11524,110 @@ DEALINGS IN THE SOFTWARE.
crate: futures-channel 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/futures-rs
-[[ file LICENSE-APACHE: shared text T40 ]]
-[[ file LICENSE-MIT: shared text T41 ]]
+[[ file LICENSE-APACHE: shared text T41 ]]
+[[ file LICENSE-MIT: shared text T42 ]]
==============================================================================
crate: futures-core 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/futures-rs
-[[ file LICENSE-APACHE: shared text T40 ]]
-[[ file LICENSE-MIT: shared text T41 ]]
+[[ file LICENSE-APACHE: shared text T41 ]]
+[[ file LICENSE-MIT: shared text T42 ]]
==============================================================================
crate: futures-executor 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/futures-rs
-[[ file LICENSE-APACHE: shared text T40 ]]
-[[ file LICENSE-MIT: shared text T41 ]]
+[[ file LICENSE-APACHE: shared text T41 ]]
+[[ file LICENSE-MIT: shared text T42 ]]
==============================================================================
crate: futures-io 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/futures-rs
-[[ file LICENSE-APACHE: shared text T40 ]]
-[[ file LICENSE-MIT: shared text T41 ]]
+[[ file LICENSE-APACHE: shared text T41 ]]
+[[ file LICENSE-MIT: shared text T42 ]]
==============================================================================
crate: futures-lite 2.6.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/futures-lite
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
-[[ file LICENSE-THIRD-PARTY: shared text T15 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
+[[ file LICENSE-THIRD-PARTY: shared text T16 ]]
==============================================================================
crate: futures-macro 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/futures-rs
-[[ file LICENSE-APACHE: shared text T40 ]]
-[[ file LICENSE-MIT: shared text T41 ]]
+[[ file LICENSE-APACHE: shared text T41 ]]
+[[ file LICENSE-MIT: shared text T42 ]]
==============================================================================
crate: futures-sink 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/futures-rs
-[[ file LICENSE-APACHE: shared text T40 ]]
-[[ file LICENSE-MIT: shared text T41 ]]
+[[ file LICENSE-APACHE: shared text T41 ]]
+[[ file LICENSE-MIT: shared text T42 ]]
==============================================================================
crate: futures-task 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/futures-rs
-[[ file LICENSE-APACHE: shared text T40 ]]
-[[ file LICENSE-MIT: shared text T41 ]]
+[[ file LICENSE-APACHE: shared text T41 ]]
+[[ file LICENSE-MIT: shared text T42 ]]
==============================================================================
crate: futures-util 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/futures-rs
-[[ file LICENSE-APACHE: shared text T40 ]]
-[[ file LICENSE-MIT: shared text T41 ]]
+[[ file LICENSE-APACHE: shared text T41 ]]
+[[ file LICENSE-MIT: shared text T42 ]]
==============================================================================
crate: gdk 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gdk-pixbuf 0.18.5
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gdk-pixbuf-sys 0.18.0
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gdk-sys 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gdkwayland-sys 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gdkx11 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gdkx11-sys 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: generic-array 0.14.7
@@ -11469,7 +11661,7 @@ SOFTWARE.
crate: getrandom 0.2.17
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-random/getrandom
-[[ file LICENSE-APACHE: shared text T42 ]]
+[[ file LICENSE-APACHE: shared text T43 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2018-2024 The rust-random Project Developers
Copyright (c) 2014 The Rust Project Developers
@@ -11503,7 +11695,7 @@ DEALINGS IN THE SOFTWARE.
crate: getrandom 0.3.4
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-random/getrandom
-[[ file LICENSE-APACHE: shared text T42 ]]
+[[ file LICENSE-APACHE: shared text T43 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2018-2025 The rust-random Project Developers
Copyright (c) 2014 The Rust Project Developers
@@ -11537,7 +11729,7 @@ DEALINGS IN THE SOFTWARE.
crate: getrandom 0.4.3
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-random/getrandom
-[[ file LICENSE-APACHE: shared text T42 ]]
+[[ file LICENSE-APACHE: shared text T43 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2018-2026 The rust-random Project Developers
Copyright (c) 2014 The Rust Project Developers
@@ -11571,108 +11763,108 @@ DEALINGS IN THE SOFTWARE.
crate: gio 0.18.4
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gio-sys 0.18.1
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: glib 0.18.5
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: glib-macros 0.18.5
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: glib-sys 0.18.1
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: glob 0.3.4
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/glob
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T18 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T19 ]]
==============================================================================
crate: gobject-sys 0.18.0
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gtk 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gtk-sys 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: gtk3-macros 0.18.2
Licence: MIT
Source: https://github.com/gtk-rs/gtk3-rs
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: hashbrown 0.12.3
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/hashbrown
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T43 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T44 ]]
==============================================================================
crate: hashbrown 0.17.2
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/hashbrown
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T43 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T44 ]]
==============================================================================
crate: heck 0.4.1
Licence: MIT OR Apache-2.0
Source: https://github.com/withoutboats/heck
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T44 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T45 ]]
==============================================================================
crate: heck 0.5.0
Licence: MIT OR Apache-2.0
Source: https://github.com/withoutboats/heck
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T44 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T45 ]]
==============================================================================
crate: hermit-abi 0.5.3
Licence: MIT OR Apache-2.0
Source: https://github.com/hermit-os/hermit-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: hex 0.4.3
Licence: MIT OR Apache-2.0
Source: https://github.com/KokaKiwi/rust-hex
-[[ file LICENSE-APACHE: shared text T26 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2013-2014 The Rust Project Developers.
Copyright (c) 2015-2020 The rust-hex Developers
@@ -11700,15 +11892,15 @@ SOFTWARE.
crate: html5ever 0.39.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/html5ever
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T45 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T46 ]]
==============================================================================
crate: html5ever 0.40.1
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/html5ever
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T45 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T46 ]]
==============================================================================
crate: http 1.6.0
@@ -11949,19 +12141,19 @@ DEALINGS IN THE SOFTWARE.
crate: http-body 1.1.0
Licence: MIT
Source: https://github.com/hyperium/http-body
-[[ file LICENSE: shared text T46 ]]
+[[ file LICENSE: shared text T47 ]]
==============================================================================
crate: http-body-util 0.1.5
Licence: MIT
Source: https://github.com/hyperium/http-body
-[[ file LICENSE: shared text T46 ]]
+[[ file LICENSE: shared text T47 ]]
==============================================================================
crate: httparse 1.10.1
Licence: MIT OR Apache-2.0
Source: https://github.com/seanmonstar/httparse
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2015-2025 Sean McArthur
@@ -11988,7 +12180,7 @@ THE SOFTWARE.
crate: hybrid-array 0.4.15
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/hybrid-array
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2022-2026 The RustCrypto Project Developers
@@ -12047,9 +12239,9 @@ THE SOFTWARE.
crate: hyper-rustls 0.27.10
Licence: Apache-2.0 OR ISC OR MIT
Source: https://github.com/rustls/hyper-rustls
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-ISC: shared text T47 ]]
-[[ file LICENSE-MIT: shared text T48 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-ISC: shared text T48 ]]
+[[ file LICENSE-MIT: shared text T49 ]]
==============================================================================
crate: hyper-util 0.1.21
@@ -12081,15 +12273,15 @@ THE SOFTWARE.
crate: iana-time-zone 0.1.65
Licence: MIT OR Apache-2.0
Source: https://github.com/strawlab/iana-time-zone
-[[ file LICENSE-APACHE: shared text T49 ]]
-[[ file LICENSE-MIT: shared text T50 ]]
+[[ file LICENSE-APACHE: shared text T50 ]]
+[[ file LICENSE-MIT: shared text T51 ]]
==============================================================================
crate: iana-time-zone-haiku 0.1.2
Licence: MIT OR Apache-2.0
Source: https://github.com/strawlab/iana-time-zone
-[[ file LICENSE-APACHE: shared text T49 ]]
-[[ file LICENSE-MIT: shared text T50 ]]
+[[ file LICENSE-APACHE: shared text T50 ]]
+[[ file LICENSE-MIT: shared text T51 ]]
==============================================================================
crate: ico 0.6.0
@@ -12123,62 +12315,62 @@ SOFTWARE.
crate: icu_collections 2.4.0
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: icu_locale_core 2.4.0
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: icu_normalizer 2.4.0
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: icu_normalizer_data 2.4.0
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: icu_properties 2.4.0
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: icu_properties_data 2.4.0
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: icu_provider 2.4.0
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: ident_case 1.0.1
Licence: MIT/Apache-2.0
Source: https://github.com/TedDriggs/ident_case
-[[ file LICENSE: shared text T52 ]]
+[[ file LICENSE: shared text T53 ]]
==============================================================================
crate: idna 1.1.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/rust-url/
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T53 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T54 ]]
==============================================================================
crate: idna_adapter 1.2.2
Licence: Apache-2.0 OR MIT
Source: https://github.com/hsivonen/idna_adapter
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) The rust-url developers
@@ -12211,15 +12403,15 @@ DEALINGS IN THE SOFTWARE.
crate: indexmap 1.9.3
Licence: Apache-2.0 OR MIT
Source: https://github.com/bluss/indexmap
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T54 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T55 ]]
==============================================================================
crate: indexmap 2.14.2
Licence: Apache-2.0 OR MIT
Source: https://github.com/indexmap-rs/indexmap
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T54 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T55 ]]
==============================================================================
crate: infer 0.22.0
@@ -12470,20 +12662,20 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
crate: is-docker 0.2.0
Licence: MIT
Source: https://github.com/TheLarkInn/is-docker
-[[ file LICENSE: shared text T55 ]]
+[[ file LICENSE: shared text T56 ]]
==============================================================================
crate: is-wsl 0.4.0
Licence: MIT
Source: https://github.com/TheLarkInn/is-wsl
-[[ file LICENSE: shared text T55 ]]
+[[ file LICENSE: shared text T56 ]]
==============================================================================
crate: itoa 1.0.19
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/itoa
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: javascriptcore-rs 1.1.2
@@ -12518,93 +12710,93 @@ SOFTWARE.
crate: javascriptcore-rs-sys 1.1.1
Licence: MIT
Source: https://github.com/tauri-apps/javascriptcore-rs
-[[ file LICENSE: shared text T56 ]]
+[[ file LICENSE: shared text T57 ]]
==============================================================================
crate: jiff 0.2.46
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff 1.1.0
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff-core 0.1.8
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff-core 1.1.0
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff-static 0.2.46
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff-static 1.1.0
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff-tzdb 0.1.10
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff-tzdb 1.0.0
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff-tzdb-platform 0.1.3
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jiff-tzdb-platform 1.0.0
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/jiff
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: jni 0.21.1
Licence: MIT/Apache-2.0
Source: https://github.com/jni-rs/jni-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
The MIT License (MIT)
@@ -12645,15 +12837,15 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: jni-sys 0.3.1
Licence: MIT OR Apache-2.0
Source: https://github.com/jni-rs/jni-sys
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T57 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T58 ]]
==============================================================================
crate: jni-sys 0.4.1
Licence: MIT OR Apache-2.0
Source: https://github.com/jni-rs/jni-sys
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T57 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T58 ]]
==============================================================================
crate: jni-sys-macros 0.4.1
@@ -12665,14 +12857,14 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: js-sys 0.3.107
Licence: MIT OR Apache-2.0
Source: https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/js-sys
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: json-patch 4.2.0
Licence: MIT/Apache-2.0
Source: https://github.com/idubrov/json-patch
-[[ file LICENSE-APACHE: shared text T26 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -12932,7 +13124,7 @@ SOFTWARE.
crate: keyboard-types 0.8.3
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-windowing/keyboard-types
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2017 Pyfisch
@@ -12959,7 +13151,7 @@ THE SOFTWARE.
crate: libappindicator 0.9.0
Licence: Apache-2.0 OR MIT
Source: https://crates.io/crates/libappindicator/0.9.0
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -12995,7 +13187,7 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: libc 0.2.191
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/libc
-[[ file LICENSE-APACHE: shared text T11 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) The Rust Project Developers
@@ -13028,8 +13220,8 @@ DEALINGS IN THE SOFTWARE.
crate: libdbus-sys 0.2.7
Licence: Apache-2.0/MIT
Source: https://github.com/diwic/dbus-rs
-[[ file LICENSE-APACHE: shared text T32 ]]
-[[ file LICENSE-MIT: shared text T33 ]]
+[[ file LICENSE-APACHE: shared text T33 ]]
+[[ file LICENSE-MIT: shared text T34 ]]
==============================================================================
crate: libloading 0.7.4
@@ -13082,8 +13274,8 @@ SOFTWARE.
crate: link-section 0.19.4
Licence: Apache-2.0 OR MIT
Source: https://github.com/mmastrac/linktime
-[[ file LICENSE-APACHE: shared text T29 ]]
-[[ file LICENSE-MIT: shared text T30 ]]
+[[ file LICENSE-APACHE: shared text T30 ]]
+[[ file LICENSE-MIT: shared text T31 ]]
==============================================================================
crate: linux-raw-sys 0.12.1
@@ -13120,51 +13312,51 @@ is licensed under:
at your option.
[[ end file COPYRIGHT ]]
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T58 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T59 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: litemap 0.8.3
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: lock_api 0.4.14
Licence: MIT OR Apache-2.0
Source: https://github.com/Amanieu/parking_lot
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T59 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T60 ]]
==============================================================================
crate: log 0.4.35
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/log
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T18 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T19 ]]
==============================================================================
crate: markup5ever 0.39.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/html5ever
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T45 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T46 ]]
==============================================================================
crate: markup5ever 0.40.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/html5ever
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T45 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T46 ]]
==============================================================================
crate: memchr 2.8.3
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/memchr
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: memmap2 0.9.12
@@ -13432,7 +13624,7 @@ SOFTWARE.
crate: mime 0.3.18
Licence: MIT OR Apache-2.0
Source: https://github.com/hyperium/mime
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2014 Sean McArthur
@@ -13525,19 +13717,19 @@ DEALINGS IN THE SOFTWARE.
crate: miniz_oxide 0.8.9
Licence: MIT OR Zlib OR Apache-2.0
Source: https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide
-[[ file LICENSE: shared text T60 ]]
+[[ file LICENSE: shared text T61 ]]
[[ file LICENSE-APACHE.md: shared text T3 ]]
-[[ file LICENSE-MIT.md: shared text T61 ]]
-[[ file LICENSE-ZLIB.md: shared text T62 ]]
+[[ file LICENSE-MIT.md: shared text T62 ]]
+[[ file LICENSE-ZLIB.md: shared text T63 ]]
==============================================================================
crate: miniz_oxide 0.9.1
Licence: MIT OR Zlib OR Apache-2.0
Source: https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide
-[[ file LICENSE: shared text T60 ]]
+[[ file LICENSE: shared text T61 ]]
[[ file LICENSE-APACHE.md: shared text T3 ]]
-[[ file LICENSE-MIT.md: shared text T61 ]]
-[[ file LICENSE-ZLIB.md: shared text T62 ]]
+[[ file LICENSE-MIT.md: shared text T62 ]]
+[[ file LICENSE-ZLIB.md: shared text T63 ]]
==============================================================================
crate: mio 1.2.5
@@ -13569,8 +13761,8 @@ THE SOFTWARE.
crate: muda 0.20.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/tauri-apps/muda
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T63 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T64 ]]
[[ begin file LICENSE.spdx ]]
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
@@ -13615,7 +13807,7 @@ See the Licenses for the specific language governing permissions and
limitations under the Licenses.
[[ end file COPYRIGHT ]]
[[ file LICENSE-APACHE: shared text T2 ]]
-[[ file LICENSE-MIT: shared text T38 ]]
+[[ file LICENSE-MIT: shared text T39 ]]
==============================================================================
crate: ndk 0.9.0
@@ -13726,24 +13918,24 @@ SOFTWARE.
crate: num-traits 0.2.19
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-num/num-traits
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T18 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T19 ]]
==============================================================================
crate: num_enum 0.7.6
Licence: BSD-3-Clause OR MIT OR Apache-2.0
Source: https://github.com/illicitonion/num_enum
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-BSD: shared text T64 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-BSD: shared text T65 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: num_enum_derive 0.7.6
Licence: BSD-3-Clause OR MIT OR Apache-2.0
Source: https://github.com/illicitonion/num_enum
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-BSD: shared text T64 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-BSD: shared text T65 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: objc2 0.6.5
@@ -13857,8 +14049,8 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: once_cell 1.21.4
Licence: MIT OR Apache-2.0
Source: https://github.com/matklad/once_cell
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: open 5.4.5
@@ -13896,8 +14088,8 @@ OTHER DEALINGS IN THE SOFTWARE.
crate: openssl-probe 0.2.2
Licence: MIT OR Apache-2.0
Source: https://github.com/rustls/openssl-probe
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: option-ext 0.2.0
@@ -14283,20 +14475,20 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
crate: ordered-stream 0.2.0
Licence: MIT OR Apache-2.0
Source: https://github.com/danieldg/ordered-stream
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: os_pipe 1.2.3
Licence: MIT
Source: https://github.com/oconnor663/os_pipe.rs
-[[ file LICENSE: shared text T65 ]]
+[[ file LICENSE: shared text T66 ]]
==============================================================================
crate: osakit 0.3.1
Licence: MIT OR Apache-2.0
Source: https://github.com/mdevils/rust-osakit
-[[ file LICENSE-APACHE: shared text T11 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2024 Marat Dulin
@@ -14329,21 +14521,21 @@ DEALINGS IN THE SOFTWARE.
crate: pango 0.18.3
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file COPYRIGHT: shared text T13 ]]
-[[ file LICENSE: shared text T14 ]]
+[[ file COPYRIGHT: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: pango-sys 0.18.0
Licence: MIT
Source: https://github.com/gtk-rs/gtk-rs-core
-[[ file LICENSE: shared text T14 ]]
+[[ file LICENSE: shared text T15 ]]
==============================================================================
crate: parking 2.2.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/parking
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
[[ begin file LICENSE-THIRD-PARTY ]]
===============================================================================
@@ -14360,103 +14552,103 @@ copied, modified, or distributed except according to those terms.
crate: parking_lot 0.12.5
Licence: MIT OR Apache-2.0
Source: https://github.com/Amanieu/parking_lot
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T59 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T60 ]]
==============================================================================
crate: parking_lot_core 0.9.12
Licence: MIT OR Apache-2.0
Source: https://github.com/Amanieu/parking_lot
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T59 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T60 ]]
==============================================================================
crate: percent-encoding 2.3.2
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/rust-url/
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T53 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T54 ]]
==============================================================================
crate: phf 0.13.1
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf 0.14.0
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf_codegen 0.13.1
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf_codegen 0.14.0
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf_generator 0.13.1
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf_generator 0.14.0
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf_macros 0.13.1
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf_macros 0.14.0
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf_shared 0.13.1
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: phf_shared 0.14.0
Licence: MIT
Source: https://github.com/rust-phf/rust-phf
-[[ file LICENSE: shared text T66 ]]
+[[ file LICENSE: shared text T67 ]]
==============================================================================
crate: pin-project-lite 0.2.19
Licence: Apache-2.0 OR MIT
Source: https://github.com/taiki-e/pin-project-lite
[[ file LICENSE-APACHE: shared text T3 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: piper 0.2.5
Licence: MIT OR Apache-2.0
Source: https://github.com/smol-rs/piper
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: pkg-config 0.3.34
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/pkg-config-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: plist 1.10.5
@@ -14488,7 +14680,7 @@ SOFTWARE.
crate: png 0.18.1
Licence: MIT OR Apache-2.0
Source: https://github.com/image-rs/image-png
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2015 nwin
@@ -14521,28 +14713,28 @@ DEALINGS IN THE SOFTWARE.
crate: polling 3.11.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/smol-rs/polling
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: portable-atomic 1.15.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/taiki-e/portable-atomic
[[ file LICENSE-APACHE: shared text T3 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: portable-atomic-util 0.2.8
Licence: Apache-2.0 OR MIT
Source: https://github.com/taiki-e/portable-atomic-util
[[ file LICENSE-APACHE: shared text T3 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: potential_utf 0.1.6
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: powerfmt 0.2.1
@@ -14806,43 +14998,43 @@ SOFTWARE.
crate: proc-macro-crate 1.3.1
Licence: MIT OR Apache-2.0
Source: https://github.com/bkchr/proc-macro-crate
-[[ file LICENSE-APACHE: shared text T5 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: proc-macro-crate 2.0.2
Licence: MIT OR Apache-2.0
Source: https://github.com/bkchr/proc-macro-crate
-[[ file LICENSE-APACHE: shared text T5 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: proc-macro-crate 3.5.0
Licence: MIT OR Apache-2.0
Source: https://github.com/bkchr/proc-macro-crate
-[[ file LICENSE-APACHE: shared text T5 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: proc-macro-error 1.0.4
Licence: MIT OR Apache-2.0
Source: https://gitlab.com/CreepySkeleton/proc-macro-error
-[[ file LICENSE-APACHE: shared text T67 ]]
-[[ file LICENSE-MIT: shared text T68 ]]
+[[ file LICENSE-APACHE: shared text T68 ]]
+[[ file LICENSE-MIT: shared text T69 ]]
==============================================================================
crate: proc-macro-error-attr 1.0.4
Licence: MIT OR Apache-2.0
Source: https://gitlab.com/CreepySkeleton/proc-macro-error
-[[ file LICENSE-APACHE: shared text T67 ]]
-[[ file LICENSE-MIT: shared text T68 ]]
+[[ file LICENSE-APACHE: shared text T68 ]]
+[[ file LICENSE-MIT: shared text T69 ]]
==============================================================================
crate: proc-macro2 1.0.107
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/proc-macro2
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: quick-xml 0.42.0
@@ -14878,8 +15070,8 @@ THE SOFTWARE.
crate: quote 1.0.47
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/quote
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: r-efi 5.3.0
@@ -15147,36 +15339,36 @@ SOFTWARE.
crate: ref-cast 1.0.27
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/ref-cast
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: ref-cast-impl 1.0.27
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/ref-cast
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: regex 1.13.2
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/regex
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T18 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T19 ]]
==============================================================================
crate: regex-automata 0.4.19
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/regex
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T18 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T19 ]]
==============================================================================
crate: regex-syntax 0.8.12
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/regex
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T18 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T19 ]]
==============================================================================
crate: reqwest 0.13.5
@@ -15744,7 +15936,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
crate: roxmltree 0.20.0
Licence: MIT OR Apache-2.0
Source: https://github.com/RazrFalcon/roxmltree
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
The MIT License (MIT)
@@ -15773,15 +15965,15 @@ SOFTWARE.
crate: rustc-hash 2.1.3
Licence: Apache-2.0 OR MIT
Source: https://github.com/rust-lang/rustc-hash
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: rustc_version 0.4.1
Licence: MIT OR Apache-2.0
Source: https://github.com/djc/rustc-version-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T59 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T60 ]]
==============================================================================
crate: rustix 1.1.6
@@ -15818,17 +16010,17 @@ is licensed under:
at your option.
[[ end file COPYRIGHT ]]
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T58 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T59 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: rustls 0.23.47
Licence: Apache-2.0 OR ISC OR MIT
Source: https://github.com/rustls/rustls
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-ISC: shared text T47 ]]
-[[ file LICENSE-MIT: shared text T48 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-ISC: shared text T48 ]]
+[[ file LICENSE-MIT: shared text T49 ]]
==============================================================================
crate: rustls-native-certs 0.8.5
@@ -15845,9 +16037,9 @@ These are included as LICENSE-APACHE, LICENSE-MIT and LICENSE-ISC
respectively. You may use this software under the terms of any
of these licenses, at your option.
[[ end file LICENSE ]]
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-ISC: shared text T47 ]]
-[[ file LICENSE-MIT: shared text T48 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-ISC: shared text T48 ]]
+[[ file LICENSE-MIT: shared text T49 ]]
==============================================================================
crate: rustls-pki-types 1.16.0
@@ -16088,7 +16280,7 @@ DEALINGS IN THE SOFTWARE.
crate: rustls-platform-verifier 0.7.1
Licence: MIT OR Apache-2.0
Source: https://github.com/rustls/rustls-platform-verifier
-[[ file LICENSE-APACHE: shared text T69 ]]
+[[ file LICENSE-APACHE: shared text T70 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -16149,16 +16341,16 @@ third-party/chromium/LICENSE.
crate: rustversion 1.0.23
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/rustversion
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: same-file 1.0.6
Licence: Unlicense/MIT
Source: https://github.com/BurntSushi/same-file
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T70 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T71 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: schannel 0.1.30
@@ -16178,31 +16370,31 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
crate: schemars 0.8.22
Licence: MIT
Source: https://github.com/GREsau/schemars
-[[ file LICENSE: shared text T71 ]]
+[[ file LICENSE: shared text T72 ]]
==============================================================================
crate: schemars 0.9.0
Licence: MIT
Source: https://github.com/GREsau/schemars
-[[ file LICENSE: shared text T71 ]]
+[[ file LICENSE: shared text T72 ]]
==============================================================================
crate: schemars 1.2.3
Licence: MIT
Source: https://github.com/GREsau/schemars
-[[ file LICENSE: shared text T71 ]]
+[[ file LICENSE: shared text T72 ]]
==============================================================================
crate: schemars_derive 0.8.22
Licence: MIT
Source: https://github.com/GREsau/schemars
-[[ file LICENSE: shared text T71 ]]
+[[ file LICENSE: shared text T72 ]]
==============================================================================
crate: scopeguard 1.2.0
Licence: MIT OR Apache-2.0
Source: https://github.com/bluss/scopeguard
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2016-2019 Ulrik Sverdrup "bluss" and scopeguard developers
@@ -16235,15 +16427,15 @@ DEALINGS IN THE SOFTWARE.
crate: security-framework 3.7.0
Licence: MIT OR Apache-2.0
Source: https://github.com/kornelski/rust-security-framework
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T72 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T73 ]]
==============================================================================
crate: security-framework-sys 2.17.0
Licence: MIT OR Apache-2.0
Source: https://github.com/kornelski/rust-security-framework
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T72 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T73 ]]
==============================================================================
crate: selectors 0.38.0
@@ -16261,119 +16453,119 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: semver 1.0.28
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/semver
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: serde 1.0.229
Licence: MIT OR Apache-2.0
Source: https://github.com/serde-rs/serde
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: serde-untagged 0.1.9
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/serde-untagged
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: serde_core 1.0.229
Licence: MIT OR Apache-2.0
Source: https://github.com/serde-rs/serde
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: serde_derive 1.0.229
Licence: MIT OR Apache-2.0
Source: https://github.com/serde-rs/serde
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: serde_derive_internals 0.29.1
Licence: MIT OR Apache-2.0
Source: https://github.com/serde-rs/serde
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: serde_json 1.0.154
Licence: MIT OR Apache-2.0
Source: https://github.com/serde-rs/json
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: serde_repr 0.1.21
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/serde-repr
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: serde_spanned 0.6.9
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: serde_spanned 1.1.3
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T74 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T75 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: serde_with 3.25.0
Licence: MIT OR Apache-2.0
Source: https://github.com/jonasbb/serde_with/
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T75 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T76 ]]
==============================================================================
crate: serde_with_macros 3.25.0
Licence: MIT OR Apache-2.0
Source: https://github.com/jonasbb/serde_with/
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T75 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T76 ]]
==============================================================================
crate: serialize-to-javascript 0.1.2
Licence: MIT OR Apache-2.0
Source: https://github.com/chippers/serialize-to-javascript
-[[ file LICENSE-APACHE: shared text T69 ]]
-[[ file LICENSE-MIT: shared text T76 ]]
+[[ file LICENSE-APACHE: shared text T70 ]]
+[[ file LICENSE-MIT: shared text T77 ]]
==============================================================================
crate: serialize-to-javascript-impl 0.1.2
Licence: MIT OR Apache-2.0
Source: https://github.com/chippers/serialize-to-javascript
-[[ file LICENSE-APACHE: shared text T69 ]]
-[[ file LICENSE-MIT: shared text T76 ]]
+[[ file LICENSE-APACHE: shared text T70 ]]
+[[ file LICENSE-MIT: shared text T77 ]]
==============================================================================
crate: servo_arc 0.4.3
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/stylo
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: servo_arc 0.5.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/stylo
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: sha2 0.10.9
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/hashes
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2006-2009 Graydon Hoare
Copyright (c) 2009-2013 Mozilla Foundation
@@ -16408,7 +16600,7 @@ DEALINGS IN THE SOFTWARE.
crate: sha2 0.11.3
Licence: MIT OR Apache-2.0
Source: https://github.com/RustCrypto/hashes
-[[ file LICENSE-APACHE: shared text T19 ]]
+[[ file LICENSE-APACHE: shared text T20 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2016-2026 The RustCrypto Project Developers
Copyright (c) 2016 Artyom Pavlov
@@ -16444,7 +16636,7 @@ DEALINGS IN THE SOFTWARE.
crate: shared_child 1.1.2
Licence: MIT
Source: https://github.com/oconnor663/shared_child.rs
-[[ file LICENSE: shared text T65 ]]
+[[ file LICENSE: shared text T66 ]]
==============================================================================
crate: shlex 2.0.1
@@ -16493,7 +16685,7 @@ THE SOFTWARE.
crate: signal-hook-registry 1.4.8
Licence: MIT OR Apache-2.0
Source: https://github.com/vorner/signal-hook
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2017 tokio-jsonrpc developers
@@ -16554,15 +16746,15 @@ SOFTWARE.
crate: simd_cesu8 1.2.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/seancroach/simd_cesu8
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: simdutf8 0.1.5
Licence: MIT OR Apache-2.0
Source: https://github.com/rusticstuff/simdutf8
[[ file LICENSE-Apache: shared text T3 ]]
-[[ file LICENSE-MIT: shared text T52 ]]
+[[ file LICENSE-MIT: shared text T53 ]]
==============================================================================
crate: siphasher 1.0.4
@@ -16578,7 +16770,7 @@ http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
option.
[[ end file COPYING ]]
[[ file LICENSE-APACHE: shared text T2 ]]
-[[ file LICENSE-MIT: shared text T14 ]]
+[[ file LICENSE-MIT: shared text T15 ]]
==============================================================================
crate: slab 0.4.12
@@ -16642,7 +16834,7 @@ the following restrictions:
crate: smallvec 1.16.6
Licence: MIT OR Apache-2.0
Source: https://github.com/smallvec/smallvec
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2018 The Servo Project Developers
@@ -16675,8 +16867,8 @@ DEALINGS IN THE SOFTWARE.
crate: socket2 0.6.5
Licence: MIT OR Apache-2.0
Source: https://github.com/rust-lang/socket2
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: softbuffer 0.4.8
@@ -16911,19 +17103,19 @@ SOFTWARE.
crate: soup3 0.5.0
Licence: MIT
Source: https://gitlab.gnome.org/World/Rust/soup3-rs
-[[ file LICENSE: shared text T56 ]]
+[[ file LICENSE: shared text T57 ]]
==============================================================================
crate: soup3-sys 0.5.0
Licence: MIT
Source: https://gitlab.gnome.org/World/Rust/soup3-rs
-[[ file LICENSE: shared text T56 ]]
+[[ file LICENSE: shared text T57 ]]
==============================================================================
crate: stable_deref_trait 1.2.1
Licence: MIT OR Apache-2.0
Source: https://github.com/storyyeller/stable_deref_trait
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2017 Robert Grosse
@@ -16959,7 +17151,7 @@ Source: https://github.com/ChrisDenton/static_vcruntime
[[ begin file LICENSE ]]
MIT OR Apache-2.0 OR Zlib
[[ end file LICENSE ]]
-[[ file LICENSE-APACHE: shared text T20 ]]
+[[ file LICENSE-APACHE: shared text T21 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -16989,29 +17181,29 @@ Permission is granted to anyone to use this software for any purpose, including
crate: string_cache 0.11.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/string-cache
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: string_cache 0.9.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/string-cache
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: string_cache_codegen 0.11.2
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/string-cache
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: string_cache_codegen 0.6.1
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/string-cache
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T25 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T26 ]]
==============================================================================
crate: strsim 0.11.1
@@ -17312,22 +17504,22 @@ SOFTWARE.
crate: syn 1.0.109
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/syn
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: syn 2.0.119
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/syn
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: syn 3.0.10
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/syn
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: sync_wrapper 1.0.2
@@ -17353,28 +17545,28 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
crate: system-configuration 0.7.0
Licence: MIT OR Apache-2.0
Source: https://github.com/mullvad/system-configuration-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T77 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T78 ]]
==============================================================================
crate: system-configuration-sys 0.6.0
Licence: MIT OR Apache-2.0
Source: https://github.com/mullvad/system-configuration-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T77 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T78 ]]
==============================================================================
crate: system-deps 6.2.2
Licence: MIT OR Apache-2.0
Source: https://github.com/gdesmott/system-deps
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: tao 0.37.3
Licence: Apache-2.0
Source: https://github.com/tauri-apps/tao
-[[ file LICENSE: shared text T29 ]]
+[[ file LICENSE: shared text T30 ]]
[[ begin file LICENSE.spdx ]]
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
@@ -17400,7 +17592,7 @@ Creator: Person: Daniel Thompson-Yvetot
crate: tao-macros 0.1.4
Licence: MIT OR Apache-2.0
Source: https://github.com/tauri-apps/tao
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -17450,7 +17642,7 @@ Creator: Person: Daniel Thompson-Yvetot
crate: tar 0.4.46
Licence: MIT OR Apache-2.0
Source: https://github.com/composefs/tar-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) The tar-rs Project Contributors
@@ -17483,7 +17675,7 @@ DEALINGS IN THE SOFTWARE.
crate: target-lexicon 0.12.16
Licence: Apache-2.0 WITH LLVM-exception
Source: https://github.com/bytecodealliance/target-lexicon
-[[ file LICENSE: shared text T58 ]]
+[[ file LICENSE: shared text T59 ]]
==============================================================================
crate: tauri 2.12.7
@@ -17523,7 +17715,7 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: tauri-plugin-dialog 2.8.4
Licence: Apache-2.0 OR MIT
Source: https://github.com/tauri-apps/plugins-workspace
-[[ file LICENSE.spdx: shared text T78 ]]
+[[ file LICENSE.spdx: shared text T79 ]]
[[ file LICENSE_APACHE-2.0: shared text T3 ]]
[[ file LICENSE_MIT: shared text T4 ]]
@@ -17531,7 +17723,7 @@ Source: https://github.com/tauri-apps/plugins-workspace
crate: tauri-plugin-fs 2.7.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/tauri-apps/plugins-workspace
-[[ file LICENSE.spdx: shared text T78 ]]
+[[ file LICENSE.spdx: shared text T79 ]]
[[ file LICENSE_APACHE-2.0: shared text T3 ]]
[[ file LICENSE_MIT: shared text T4 ]]
@@ -17539,7 +17731,7 @@ Source: https://github.com/tauri-apps/plugins-workspace
crate: tauri-plugin-shell 2.6.0
Licence: Apache-2.0 OR MIT
Source: https://github.com/tauri-apps/plugins-workspace
-[[ file LICENSE.spdx: shared text T78 ]]
+[[ file LICENSE.spdx: shared text T79 ]]
[[ file LICENSE_APACHE-2.0: shared text T3 ]]
[[ file LICENSE_MIT: shared text T4 ]]
@@ -17547,7 +17739,7 @@ Source: https://github.com/tauri-apps/plugins-workspace
crate: tauri-plugin-single-instance 2.5.5
Licence: Apache-2.0 OR MIT
Source: https://github.com/tauri-apps/plugins-workspace
-[[ file LICENSE.spdx: shared text T78 ]]
+[[ file LICENSE.spdx: shared text T79 ]]
[[ file LICENSE_APACHE-2.0: shared text T3 ]]
[[ begin file LICENSE_MIT ]]
MIT License
@@ -17577,7 +17769,7 @@ SOFTWARE.
crate: tauri-plugin-updater 2.14.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/tauri-apps/plugins-workspace
-[[ file LICENSE.spdx: shared text T78 ]]
+[[ file LICENSE.spdx: shared text T79 ]]
[[ file LICENSE_APACHE-2.0: shared text T3 ]]
[[ file LICENSE_MIT: shared text T4 ]]
@@ -17641,14 +17833,14 @@ DEALINGS IN THE SOFTWARE.
crate: tempfile 3.27.0
Licence: MIT OR Apache-2.0
Source: https://github.com/Stebalien/tempfile
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T79 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T80 ]]
==============================================================================
crate: tendril 0.5.1
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/html5ever
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2015 Keegan McAllister
@@ -17681,70 +17873,70 @@ DEALINGS IN THE SOFTWARE.
crate: thiserror 1.0.69
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/thiserror
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: thiserror 2.0.21
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/thiserror
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: thiserror-impl 1.0.69
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/thiserror
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: thiserror-impl 2.0.21
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/thiserror
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: time 0.3.55
Licence: MIT OR Apache-2.0
Source: https://github.com/time-rs/time
[[ file LICENSE-Apache: shared text T3 ]]
-[[ file LICENSE-MIT: shared text T80 ]]
+[[ file LICENSE-MIT: shared text T81 ]]
==============================================================================
crate: time-core 0.1.9
Licence: MIT OR Apache-2.0
Source: https://github.com/time-rs/time
[[ file LICENSE-Apache: shared text T3 ]]
-[[ file LICENSE-MIT: shared text T80 ]]
+[[ file LICENSE-MIT: shared text T81 ]]
==============================================================================
crate: time-macros 0.2.32
Licence: MIT OR Apache-2.0
Source: https://github.com/time-rs/time
[[ file LICENSE-Apache: shared text T3 ]]
-[[ file LICENSE-MIT: shared text T80 ]]
+[[ file LICENSE-MIT: shared text T81 ]]
==============================================================================
crate: tinystr 0.8.5
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: tinyvec 1.13.3
Licence: Zlib OR Apache-2.0 OR MIT
Source: https://github.com/Lokathor/tinyvec
[[ file LICENSE-APACHE.md: shared text T2 ]]
-[[ file LICENSE-MIT.md: shared text T30 ]]
-[[ file LICENSE-ZLIB.md: shared text T21 ]]
+[[ file LICENSE-MIT.md: shared text T31 ]]
+[[ file LICENSE-ZLIB.md: shared text T22 ]]
==============================================================================
crate: tokio 1.54.1
Licence: MIT
Source: https://github.com/tokio-rs/tokio
-[[ file LICENSE: shared text T81 ]]
+[[ file LICENSE: shared text T82 ]]
==============================================================================
crate: tokio-rustls 0.26.6
@@ -17985,76 +18177,76 @@ DEALINGS IN THE SOFTWARE.
crate: tokio-util 0.7.20
Licence: MIT
Source: https://github.com/tokio-rs/tokio
-[[ file LICENSE: shared text T81 ]]
+[[ file LICENSE: shared text T82 ]]
==============================================================================
crate: toml 0.8.2
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: toml 1.2.3+spec-1.1.0
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T74 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T75 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: toml_datetime 0.6.3
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: toml_datetime 1.1.3+spec-1.1.0
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T74 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T75 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: toml_edit 0.19.15
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: toml_edit 0.20.2
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T26 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: toml_edit 0.25.21+spec-1.1.0
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T74 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T75 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: toml_parser 1.1.7+spec-1.1.0
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T74 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T75 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: toml_writer 1.2.0+spec-1.1.0
Licence: MIT OR Apache-2.0
Source: https://github.com/toml-rs/toml
-[[ file LICENSE-APACHE: shared text T74 ]]
-[[ file LICENSE-MIT: shared text T73 ]]
+[[ file LICENSE-APACHE: shared text T75 ]]
+[[ file LICENSE-MIT: shared text T74 ]]
==============================================================================
crate: tower 0.5.3
Licence: MIT
Source: https://github.com/tower-rs/tower
-[[ file LICENSE: shared text T82 ]]
+[[ file LICENSE: shared text T83 ]]
==============================================================================
crate: tower-http 0.6.11
@@ -18092,38 +18284,38 @@ DEALINGS IN THE SOFTWARE.
crate: tower-layer 0.3.3
Licence: MIT
Source: https://github.com/tower-rs/tower
-[[ file LICENSE: shared text T82 ]]
+[[ file LICENSE: shared text T83 ]]
==============================================================================
crate: tower-service 0.3.3
Licence: MIT
Source: https://github.com/tower-rs/tower
-[[ file LICENSE: shared text T82 ]]
+[[ file LICENSE: shared text T83 ]]
==============================================================================
crate: tracing 0.1.44
Licence: MIT
Source: https://github.com/tokio-rs/tracing
-[[ file LICENSE: shared text T83 ]]
+[[ file LICENSE: shared text T84 ]]
==============================================================================
crate: tracing-attributes 0.1.31
Licence: MIT
Source: https://github.com/tokio-rs/tracing
-[[ file LICENSE: shared text T83 ]]
+[[ file LICENSE: shared text T84 ]]
==============================================================================
crate: tracing-core 0.1.36
Licence: MIT
Source: https://github.com/tokio-rs/tracing
-[[ file LICENSE: shared text T83 ]]
+[[ file LICENSE: shared text T84 ]]
==============================================================================
crate: tray-icon 0.25.1
Licence: MIT OR Apache-2.0
Source: https://github.com/tauri-apps/tray-icon
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T63 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T64 ]]
[[ begin file LICENSE.spdx ]]
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
@@ -18177,15 +18369,15 @@ THE SOFTWARE.
crate: typed-path 0.13.0
Licence: MIT OR Apache-2.0
Source: https://github.com/chipsenkbeil/typed-path
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: typeid 1.0.3
Licence: MIT OR Apache-2.0
Source: https://github.com/dtolnay/typeid
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: typenum 1.20.1
@@ -18453,8 +18645,8 @@ Source: https://github.com/haraldh/rust_uds_windows
crate: unicode-ident 1.0.27
Licence: (MIT OR Apache-2.0) AND Unicode-3.0
Source: https://github.com/dtolnay/unicode-ident
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
[[ begin file LICENSE-UNICODE ]]
UNICODE LICENSE V3
@@ -18510,8 +18702,8 @@ at your option. All files in the project carrying such
notice may not be copied, modified, or distributed except
according to those terms.
[[ end file COPYRIGHT ]]
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T44 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T45 ]]
==============================================================================
crate: untrusted 0.9.0
@@ -18537,8 +18729,8 @@ Source: https://github.com/briansmith/untrusted
crate: url 2.5.9
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/rust-url
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T53 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T54 ]]
==============================================================================
crate: urlpattern 0.6.0
@@ -18617,7 +18809,7 @@ licensed under the Apache License, Version 2.0 or
or , at your option.
[[ end file COPYRIGHT ]]
[[ file LICENSE-APACHE: shared text T2 ]]
-[[ file LICENSE-MIT: shared text T38 ]]
+[[ file LICENSE-MIT: shared text T39 ]]
==============================================================================
crate: utf_types 1.0.0
@@ -18646,13 +18838,13 @@ Test code is dedicated to the Public Domain when so designated (see
the individual files for PD/CC0-dedicated sections).
[[ end file COPYRIGHT ]]
[[ file LICENSE-APACHE: shared text T2 ]]
-[[ file LICENSE-MIT: shared text T38 ]]
+[[ file LICENSE-MIT: shared text T39 ]]
==============================================================================
crate: uuid 1.29.3
Licence: Apache-2.0 OR MIT
Source: https://github.com/uuid-rs/uuid
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2014 The Rust Project Developers
Copyright (c) 2018 Ashley Mannix, Christopher Armstrong, Dylan DPC, Hunar Roop Kahlon
@@ -18712,7 +18904,7 @@ SOFTWARE.
crate: version_check 0.9.5
Licence: MIT/Apache-2.0
Source: https://github.com/SergioBenitez/version_check
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
The MIT License (MIT)
Copyright (c) 2017-2018 Sergio Benitez
@@ -18739,21 +18931,21 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
crate: vswhom 0.1.0
Licence: MIT
Source: https://github.com/nabijaczleweli/vswhom.rs
-[[ file LICENSE: shared text T84 ]]
+[[ file LICENSE: shared text T85 ]]
==============================================================================
crate: vswhom-sys 0.1.3
Licence: MIT
Source: https://github.com/nabijaczleweli/vswhom-sys.rs
-[[ file LICENSE: shared text T84 ]]
+[[ file LICENSE: shared text T85 ]]
==============================================================================
crate: walkdir 2.5.1
Licence: Unlicense/MIT
Source: https://github.com/BurntSushi/walkdir
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T8 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T9 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: want 0.3.2
@@ -18785,66 +18977,66 @@ THE SOFTWARE.
crate: wasi 0.11.1+wasi-snapshot-preview1
Licence: Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
Source: https://github.com/bytecodealliance/wasi
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T58 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T59 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: wasip2 1.0.4+wasi-0.2.12
Licence: Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
Source: https://github.com/bytecodealliance/wasi-rs
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T58 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T59 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: wasm-bindgen 0.2.130
Licence: MIT OR Apache-2.0
Source: https://github.com/wasm-bindgen/wasm-bindgen
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: wasm-bindgen-futures 0.4.80
Licence: MIT OR Apache-2.0
Source: https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/futures
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: wasm-bindgen-macro 0.2.130
Licence: MIT OR Apache-2.0
Source: https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/macro
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: wasm-bindgen-macro-support 0.2.130
Licence: MIT OR Apache-2.0
Source: https://github.com/wasm-bindgen/wasm-bindgen/tree/main/crates/macro-support
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: wasm-bindgen-shared 0.2.130
Licence: MIT OR Apache-2.0
Source: https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/shared
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: wasm-streams 0.5.0
Licence: MIT OR Apache-2.0
Source: https://github.com/MattiasBuelens/wasm-streams/
-[[ file LICENSE-APACHE: shared text T11 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: web-sys 0.3.107
Licence: MIT OR Apache-2.0
Source: https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/web-sys
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T22 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T23 ]]
==============================================================================
crate: web-time 1.1.0
@@ -19081,15 +19273,15 @@ SOFTWARE.
crate: web_atoms 0.2.6
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/html5ever
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T45 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T46 ]]
==============================================================================
crate: web_atoms 0.3.0
Licence: MIT OR Apache-2.0
Source: https://github.com/servo/html5ever
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T45 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T46 ]]
==============================================================================
crate: webkit2gtk 2.0.2
@@ -19233,7 +19425,7 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: winapi 0.3.9
Licence: MIT/Apache-2.0
Source: https://github.com/retep998/winapi-rs
-[[ file LICENSE-APACHE: shared text T26 ]]
+[[ file LICENSE-APACHE: shared text T27 ]]
[[ begin file LICENSE-MIT ]]
Copyright (c) 2015-2018 The winapi-rs Developers
@@ -19266,9 +19458,9 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: winapi-util 0.1.11
Licence: Unlicense OR MIT
Source: https://github.com/BurntSushi/winapi-util
-[[ file COPYING: shared text T7 ]]
-[[ file LICENSE-MIT: shared text T70 ]]
-[[ file UNLICENSE: shared text T9 ]]
+[[ file COPYING: shared text T8 ]]
+[[ file LICENSE-MIT: shared text T71 ]]
+[[ file UNLICENSE: shared text T10 ]]
==============================================================================
crate: winapi-x86_64-pc-windows-gnu 0.4.0
@@ -19280,7 +19472,7 @@ Note: The published crate carries no licence file; its SPDX licence and reposito
crate: window-vibrancy 0.8.1
Licence: Apache-2.0 OR MIT
Source: https://github.com/tauri-apps/tauri-plugin-vibrancy
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -19330,328 +19522,328 @@ Creator: Person: Daniel Thompson-Yvetot
crate: windows 0.62.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-collections 0.3.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-core 0.62.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-future 0.3.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-implement 0.60.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-interface 0.59.3
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-link 0.101.0
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-link 0.2.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-numerics 0.3.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-registry 0.6.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-result 0.4.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-strings 0.5.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-sys 0.101.0
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-sys 0.45.0
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-sys 0.52.0
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-sys 0.60.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-sys 0.61.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-targets 0.42.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-targets 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-targets 0.53.5
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-threading 0.2.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows-version 0.1.7
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_aarch64_gnullvm 0.42.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_aarch64_gnullvm 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_aarch64_gnullvm 0.53.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_aarch64_msvc 0.42.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_aarch64_msvc 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_aarch64_msvc 0.53.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_i686_gnu 0.42.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_i686_gnu 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_i686_gnu 0.53.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_i686_gnullvm 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_i686_gnullvm 0.53.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_i686_msvc 0.42.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_i686_msvc 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_i686_msvc 0.53.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_gnu 0.42.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_gnu 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_gnu 0.53.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_gnullvm 0.42.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_gnullvm 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_gnullvm 0.53.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_msvc 0.42.2
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_msvc 0.52.6
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: windows_x86_64_msvc 0.53.1
Licence: MIT OR Apache-2.0
Source: https://github.com/microsoft/windows-rs
-[[ file license-apache-2.0: shared text T85 ]]
-[[ file license-mit: shared text T86 ]]
+[[ file license-apache-2.0: shared text T86 ]]
+[[ file license-mit: shared text T87 ]]
==============================================================================
crate: winnow 0.5.40
Licence: MIT
Source: https://github.com/winnow-rs/winnow
-[[ file LICENSE-MIT: shared text T87 ]]
+[[ file LICENSE-MIT: shared text T88 ]]
==============================================================================
crate: winnow 1.0.5
Licence: MIT
Source: https://github.com/winnow-rs/winnow
-[[ file LICENSE-MIT: shared text T87 ]]
+[[ file LICENSE-MIT: shared text T88 ]]
==============================================================================
crate: winreg 0.56.0
@@ -19683,21 +19875,21 @@ THE SOFTWARE.
crate: wit-bindgen 0.57.1
Licence: Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
Source: https://github.com/bytecodealliance/wit-bindgen
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T58 ]]
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-Apache-2.0_WITH_LLVM-exception: shared text T59 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: writeable 0.6.4
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: wry 0.57.4
Licence: Apache-2.0 OR MIT
Source: https://github.com/tauri-apps/wry
-[[ file LICENSE-APACHE: shared text T12 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
[[ begin file LICENSE-MIT ]]
MIT License
@@ -19748,50 +19940,50 @@ Creator: Person: Daniel Thompson-Yvetot
crate: x11 2.21.0
Licence: MIT
Source: https://github.com/AltF02/x11-rs.git
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: x11-dl 2.21.0
Licence: MIT
Source: https://github.com/AltF02/x11-rs.git
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: xattr 1.7.0
Licence: MIT OR Apache-2.0
Source: https://github.com/Stebalien/xattr
-[[ file LICENSE-APACHE: shared text T12 ]]
-[[ file LICENSE-MIT: shared text T79 ]]
+[[ file LICENSE-APACHE: shared text T13 ]]
+[[ file LICENSE-MIT: shared text T80 ]]
==============================================================================
crate: yoke 0.8.4
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: yoke-derive 0.8.4
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: zbus 5.19.0
Licence: MIT
Source: https://github.com/z-galaxy/zbus/
-[[ file LICENSE: shared text T88 ]]
+[[ file LICENSE: shared text T89 ]]
==============================================================================
crate: zbus_macros 5.19.0
Licence: MIT
Source: https://github.com/z-galaxy/zbus/
-[[ file LICENSE: shared text T88 ]]
+[[ file LICENSE: shared text T89 ]]
==============================================================================
crate: zbus_names 4.3.5
Licence: MIT
Source: https://github.com/z-galaxy/zbus/
-[[ file LICENSE: shared text T88 ]]
+[[ file LICENSE: shared text T89 ]]
==============================================================================
crate: zcheapstr 1.4.0
@@ -19829,13 +20021,13 @@ DEALINGS IN THE SOFTWARE.
crate: zerofrom 0.1.8
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: zerofrom-derive 0.1.8
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: zeroize 1.9.2
@@ -19907,19 +20099,19 @@ DEALINGS IN THE SOFTWARE.
crate: zerotrie 0.2.5
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: zerovec 0.11.9
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: zerovec-derive 0.11.7
Licence: Unicode-3.0
Source: https://github.com/unicode-org/icu4x
-[[ file LICENSE: shared text T51 ]]
+[[ file LICENSE: shared text T52 ]]
==============================================================================
crate: zip 9.9.0
@@ -19979,25 +20171,25 @@ freely, subject to the following restrictions:
crate: zmij 1.0.23
Licence: MIT
Source: https://github.com/dtolnay/zmij
-[[ file LICENSE-MIT: shared text T6 ]]
+[[ file LICENSE-MIT: shared text T7 ]]
==============================================================================
crate: zvariant 5.15.1
Licence: MIT
Source: https://github.com/z-galaxy/zbus/
-[[ file LICENSE: shared text T88 ]]
+[[ file LICENSE: shared text T89 ]]
==============================================================================
crate: zvariant_derive 5.15.1
Licence: MIT
Source: https://github.com/z-galaxy/zbus/
-[[ file LICENSE: shared text T88 ]]
+[[ file LICENSE: shared text T89 ]]
==============================================================================
crate: zvariant_utils 4.2.0
Licence: MIT
Source: https://github.com/z-galaxy/zbus/
-[[ file LICENSE: shared text T6 ]]
+[[ file LICENSE: shared text T7 ]]
==============================================================================
font: Arimo bundled
@@ -20635,6 +20827,30 @@ SOFTWARE.
[[ end shared text T4 ]]
[[ begin shared text T5 ]]
+(The MIT License)
+
+Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+[[ end shared text T5 ]]
+
+[[ begin shared text T6 ]]
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/LICENSE-2.0
@@ -20836,9 +21052,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T5 ]]
+[[ end shared text T6 ]]
-[[ begin shared text T6 ]]
+[[ begin shared text T7 ]]
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
@@ -20862,15 +21078,15 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T6 ]]
+[[ end shared text T7 ]]
-[[ begin shared text T7 ]]
+[[ begin shared text T8 ]]
This project is dual-licensed under the Unlicense and MIT licenses.
You may use this code under the terms of either license.
-[[ end shared text T7 ]]
+[[ end shared text T8 ]]
-[[ begin shared text T8 ]]
+[[ begin shared text T9 ]]
The MIT License (MIT)
Copyright (c) 2015 Andrew Gallant
@@ -20892,9 +21108,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-[[ end shared text T8 ]]
+[[ end shared text T9 ]]
-[[ begin shared text T9 ]]
+[[ begin shared text T10 ]]
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
@@ -20919,9 +21135,9 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to
-[[ end shared text T9 ]]
+[[ end shared text T10 ]]
-[[ begin shared text T10 ]]
+[[ begin shared text T11 ]]
Copyright (c) 2016 Dropbox, Inc.
All rights reserved.
@@ -20934,9 +21150,9 @@ Redistribution and use in source and binary forms, with or without modification,
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-[[ end shared text T10 ]]
+[[ end shared text T11 ]]
-[[ begin shared text T11 ]]
+[[ begin shared text T12 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -21113,9 +21329,9 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
-[[ end shared text T11 ]]
+[[ end shared text T12 ]]
-[[ begin shared text T12 ]]
+[[ begin shared text T13 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -21317,9 +21533,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T12 ]]
+[[ end shared text T13 ]]
-[[ begin shared text T13 ]]
+[[ begin shared text T14 ]]
The gtk-rs Project is licensed under the MIT license, see the LICENSE file or
.
@@ -21334,9 +21550,9 @@ doesn't distribute any parts of them. Distributing compiled libraries and
executables that link to those libraries may be subject to terms of the GNU
LGPL or other licenses. For more information check the license of each GNOME
library.
-[[ end shared text T13 ]]
+[[ end shared text T14 ]]
-[[ begin shared text T14 ]]
+[[ begin shared text T15 ]]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@@ -21354,9 +21570,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T14 ]]
+[[ end shared text T15 ]]
-[[ begin shared text T15 ]]
+[[ begin shared text T16 ]]
===============================================================================
Copyright (c) 2016 Alex Crichton
@@ -21402,9 +21618,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T15 ]]
+[[ end shared text T16 ]]
-[[ begin shared text T16 ]]
+[[ begin shared text T17 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -21606,9 +21822,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T16 ]]
+[[ end shared text T17 ]]
-[[ begin shared text T17 ]]
+[[ begin shared text T18 ]]
Copyright (c) 2023 The Rust Project Developers
Permission is hereby granted, free of charge, to any
@@ -21634,9 +21850,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T17 ]]
+[[ end shared text T18 ]]
-[[ begin shared text T18 ]]
+[[ begin shared text T19 ]]
Copyright (c) 2014 The Rust Project Developers
Permission is hereby granted, free of charge, to any
@@ -21662,9 +21878,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T18 ]]
+[[ end shared text T19 ]]
-[[ begin shared text T19 ]]
+[[ begin shared text T20 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -21866,9 +22082,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T19 ]]
+[[ end shared text T20 ]]
-[[ begin shared text T20 ]]
+[[ begin shared text T21 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -21930,9 +22146,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T20 ]]
+[[ end shared text T21 ]]
-[[ begin shared text T21 ]]
+[[ begin shared text T22 ]]
Copyright (c) 2019 Daniel "Lokathor" Gee.
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
@@ -21944,9 +22160,9 @@ Permission is granted to anyone to use this software for any purpose, including
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-[[ end shared text T21 ]]
+[[ end shared text T22 ]]
-[[ begin shared text T22 ]]
+[[ begin shared text T23 ]]
Copyright (c) 2014 Alex Crichton
Permission is hereby granted, free of charge, to any
@@ -21972,9 +22188,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T22 ]]
+[[ end shared text T23 ]]
-[[ begin shared text T23 ]]
+[[ begin shared text T24 ]]
Copyright (c) 2020-2026 The RustCrypto Project Developers
Permission is hereby granted, free of charge, to any
@@ -22000,9 +22216,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T23 ]]
+[[ end shared text T24 ]]
-[[ begin shared text T24 ]]
+[[ begin shared text T25 ]]
Creative Commons Legal Code
CC0 1.0 Universal
@@ -22124,9 +22340,9 @@ express Statement of Purpose.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
-[[ end shared text T24 ]]
+[[ end shared text T25 ]]
-[[ begin shared text T25 ]]
+[[ begin shared text T26 ]]
Copyright (c) 2012-2013 Mozilla Foundation
Permission is hereby granted, free of charge, to any
@@ -22152,9 +22368,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T25 ]]
+[[ end shared text T26 ]]
-[[ begin shared text T26 ]]
+[[ begin shared text T27 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -22356,9 +22572,9 @@ DEALINGS IN THE SOFTWARE.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T26 ]]
+[[ end shared text T27 ]]
-[[ begin shared text T27 ]]
+[[ begin shared text T28 ]]
The MIT License (MIT)
Copyright (c) 2019 The Crossbeam Project Developers
@@ -22386,9 +22602,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T27 ]]
+[[ end shared text T28 ]]
-[[ begin shared text T28 ]]
+[[ begin shared text T29 ]]
Mozilla Public License Version 2.0
==================================
@@ -22762,9 +22978,9 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
-[[ end shared text T28 ]]
+[[ end shared text T29 ]]
-[[ begin shared text T29 ]]
+[[ begin shared text T30 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -22966,17 +23182,17 @@ Apache License
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T29 ]]
+[[ end shared text T30 ]]
-[[ begin shared text T30 ]]
+[[ begin shared text T31 ]]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-[[ end shared text T30 ]]
+[[ end shared text T31 ]]
-[[ begin shared text T31 ]]
+[[ begin shared text T32 ]]
MIT License
Copyright (c) 2017 Ted Driggs
@@ -22998,9 +23214,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T31 ]]
+[[ end shared text T32 ]]
-[[ begin shared text T32 ]]
+[[ begin shared text T33 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -23202,9 +23418,9 @@ Apache License
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T32 ]]
+[[ end shared text T33 ]]
-[[ begin shared text T33 ]]
+[[ begin shared text T34 ]]
Copyright (c) 2014-2018 David Henningsson and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -23224,9 +23440,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T33 ]]
+[[ end shared text T34 ]]
-[[ begin shared text T34 ]]
+[[ begin shared text T35 ]]
The MIT License (MIT)
Copyright (c) 2016 Jelte Fennema
@@ -23248,9 +23464,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T34 ]]
+[[ end shared text T35 ]]
-[[ begin shared text T35 ]]
+[[ begin shared text T36 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -23425,9 +23641,9 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
-[[ end shared text T35 ]]
+[[ end shared text T36 ]]
-[[ begin shared text T36 ]]
+[[ begin shared text T37 ]]
Copyright (c) 2018-2019 dirs-rs contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -23447,9 +23663,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T36 ]]
+[[ end shared text T37 ]]
-[[ begin shared text T37 ]]
+[[ begin shared text T38 ]]
MIT License
Copyright (c) 2023 Mykola Humanov
@@ -23477,9 +23693,9 @@ SOFTWARE.
This project contains portions of code and architectural concepts originally
derived from the "nipper" project (https://github.com/importcjj/nipper),
developed by Chen Jiaju, licensed under the MIT License and the Apache License 2.0 (dual licensed).
-[[ end shared text T37 ]]
+[[ end shared text T38 ]]
-[[ begin shared text T38 ]]
+[[ begin shared text T39 ]]
Copyright Mozilla Foundation
Permission is hereby granted, free of charge, to any
@@ -23505,9 +23721,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T38 ]]
+[[ end shared text T39 ]]
-[[ begin shared text T39 ]]
+[[ begin shared text T40 ]]
Copyright (c) 2017 The foreign-types Developers
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -23527,9 +23743,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T39 ]]
+[[ end shared text T40 ]]
-[[ begin shared text T40 ]]
+[[ begin shared text T41 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -23732,9 +23948,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T40 ]]
+[[ end shared text T41 ]]
-[[ begin shared text T41 ]]
+[[ begin shared text T42 ]]
Copyright (c) 2016 Alex Crichton
Copyright (c) 2017 The Tokio Authors
@@ -23761,9 +23977,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T41 ]]
+[[ end shared text T42 ]]
-[[ begin shared text T42 ]]
+[[ begin shared text T43 ]]
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
@@ -23965,9 +24181,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T42 ]]
+[[ end shared text T43 ]]
-[[ begin shared text T43 ]]
+[[ begin shared text T44 ]]
Copyright (c) 2016 Amanieu d'Antras
Permission is hereby granted, free of charge, to any
@@ -23993,9 +24209,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T43 ]]
+[[ end shared text T44 ]]
-[[ begin shared text T44 ]]
+[[ begin shared text T45 ]]
Copyright (c) 2015 The Rust Project Developers
Permission is hereby granted, free of charge, to any
@@ -24021,9 +24237,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T44 ]]
+[[ end shared text T45 ]]
-[[ begin shared text T45 ]]
+[[ begin shared text T46 ]]
Copyright (c) 2014 The html5ever Project Developers
Permission is hereby granted, free of charge, to any
@@ -24049,9 +24265,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T45 ]]
+[[ end shared text T46 ]]
-[[ begin shared text T46 ]]
+[[ begin shared text T47 ]]
Copyright (c) 2019-2026 Sean McArthur & Hyper Contributors
Permission is hereby granted, free of charge, to any
@@ -24077,9 +24293,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T46 ]]
+[[ end shared text T47 ]]
-[[ begin shared text T47 ]]
+[[ begin shared text T48 ]]
ISC License (ISC)
Copyright (c) 2016, Joseph Birr-Pixton
@@ -24095,9 +24311,9 @@ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
-[[ end shared text T47 ]]
+[[ end shared text T48 ]]
-[[ begin shared text T48 ]]
+[[ begin shared text T49 ]]
Copyright (c) 2016 Joseph Birr-Pixton
Permission is hereby granted, free of charge, to any
@@ -24123,9 +24339,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T48 ]]
+[[ end shared text T49 ]]
-[[ begin shared text T49 ]]
+[[ begin shared text T50 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -24327,9 +24543,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T49 ]]
+[[ end shared text T50 ]]
-[[ begin shared text T50 ]]
+[[ begin shared text T51 ]]
Copyright (c) 2020 Andrew D. Straw
Permission is hereby granted, free of charge, to any
@@ -24355,9 +24571,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T50 ]]
+[[ end shared text T51 ]]
-[[ begin shared text T51 ]]
+[[ begin shared text T52 ]]
UNICODE LICENSE V3
COPYRIGHT AND PERMISSION NOTICE
@@ -24404,9 +24620,9 @@ SPDX-License-Identifier: Unicode-3.0
Portions of ICU4X may have been adapted from ICU4C and/or ICU4J.
ICU 1.8.1 to ICU 57.1 © 1995-2016 International Business Machines Corporation and others.
-[[ end shared text T51 ]]
+[[ end shared text T52 ]]
-[[ begin shared text T52 ]]
+[[ begin shared text T53 ]]
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -24426,9 +24642,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T52 ]]
+[[ end shared text T53 ]]
-[[ begin shared text T53 ]]
+[[ begin shared text T54 ]]
Copyright (c) 2013-2025 The rust-url developers
Permission is hereby granted, free of charge, to any
@@ -24454,9 +24670,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T53 ]]
+[[ end shared text T54 ]]
-[[ begin shared text T54 ]]
+[[ begin shared text T55 ]]
Copyright (c) 2016--2017
Permission is hereby granted, free of charge, to any
@@ -24482,9 +24698,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T54 ]]
+[[ end shared text T55 ]]
-[[ begin shared text T55 ]]
+[[ begin shared text T56 ]]
MIT License
Copyright (c) 2023 Sean Larkin
@@ -24506,9 +24722,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T55 ]]
+[[ end shared text T56 ]]
-[[ begin shared text T56 ]]
+[[ begin shared text T57 ]]
The MIT License (MIT)
Copyright (c) 2013-2017, The Gtk-rs Project Developers.
@@ -24530,9 +24746,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T56 ]]
+[[ end shared text T57 ]]
-[[ begin shared text T57 ]]
+[[ begin shared text T58 ]]
Copyright (c) 2015 The rust-jni-sys Developers
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -24552,9 +24768,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T57 ]]
+[[ end shared text T58 ]]
-[[ begin shared text T58 ]]
+[[ begin shared text T59 ]]
Apache License
Version 2.0, January 2004
@@ -24774,9 +24990,9 @@ conflicts with the conditions of the GPLv2, you may retroactively and
prospectively choose to deem waived or otherwise exclude such Section(s) of
the License, but only in their entirety and only with respect to the Combined
Software.
-[[ end shared text T58 ]]
+[[ end shared text T59 ]]
-[[ begin shared text T59 ]]
+[[ begin shared text T60 ]]
Copyright (c) 2016 The Rust Project Developers
Permission is hereby granted, free of charge, to any
@@ -24802,9 +25018,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T59 ]]
+[[ end shared text T60 ]]
-[[ begin shared text T60 ]]
+[[ begin shared text T61 ]]
MIT License
Copyright 2013-2014 RAD Game Tools and Valve Software
@@ -24830,9 +25046,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T60 ]]
+[[ end shared text T61 ]]
-[[ begin shared text T61 ]]
+[[ begin shared text T62 ]]
MIT License
Copyright 2013-2014 RAD Game Tools and Valve Software
@@ -24857,9 +25073,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T61 ]]
+[[ end shared text T62 ]]
-[[ begin shared text T62 ]]
+[[ begin shared text T63 ]]
Copyright 2013-2014 RAD Game Tools and Valve Software
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
Copyright (c) 2020 Frommi
@@ -24874,9 +25090,9 @@ Permission is granted to anyone to use this software for any purpose, including
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-[[ end shared text T62 ]]
+[[ end shared text T63 ]]
-[[ begin shared text T63 ]]
+[[ begin shared text T64 ]]
MIT License
Copyright (c) 2022-2022 Tauri Programme within The Commons Conservancy
@@ -24898,9 +25114,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T63 ]]
+[[ end shared text T64 ]]
-[[ begin shared text T64 ]]
+[[ begin shared text T65 ]]
Copyright (c) 2018, Daniel Wagner-Hall
All rights reserved.
@@ -24928,9 +25144,9 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-[[ end shared text T64 ]]
+[[ end shared text T65 ]]
-[[ begin shared text T65 ]]
+[[ begin shared text T66 ]]
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -24950,9 +25166,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-[[ end shared text T65 ]]
+[[ end shared text T66 ]]
-[[ begin shared text T66 ]]
+[[ begin shared text T67 ]]
The MIT License (MIT)
Copyright (c) 2014-2022 Steven Fackler, Yuki Okushi
@@ -24973,9 +25189,9 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-[[ end shared text T66 ]]
+[[ end shared text T67 ]]
-[[ begin shared text T67 ]]
+[[ begin shared text T68 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -25177,9 +25393,9 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T67 ]]
+[[ end shared text T68 ]]
-[[ begin shared text T68 ]]
+[[ begin shared text T69 ]]
MIT License
Copyright (c) 2019-2020 CreepySkeleton
@@ -25201,9 +25417,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T68 ]]
+[[ end shared text T69 ]]
-[[ begin shared text T69 ]]
+[[ begin shared text T70 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -25405,9 +25621,9 @@ SOFTWARE.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T69 ]]
+[[ end shared text T70 ]]
-[[ begin shared text T70 ]]
+[[ begin shared text T71 ]]
The MIT License (MIT)
Copyright (c) 2017 Andrew Gallant
@@ -25429,9 +25645,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-[[ end shared text T70 ]]
+[[ end shared text T71 ]]
-[[ begin shared text T71 ]]
+[[ begin shared text T72 ]]
MIT License
Copyright (c) 2019 Graham Esau
@@ -25453,9 +25669,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T71 ]]
+[[ end shared text T72 ]]
-[[ begin shared text T72 ]]
+[[ begin shared text T73 ]]
The MIT License (MIT)
Copyright (c) 2015 Steven Fackler
@@ -25476,9 +25692,9 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-[[ end shared text T72 ]]
+[[ end shared text T73 ]]
-[[ begin shared text T73 ]]
+[[ begin shared text T74 ]]
Copyright (c) Individual contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -25498,9 +25714,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T73 ]]
+[[ end shared text T74 ]]
-[[ begin shared text T74 ]]
+[[ begin shared text T75 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -25702,9 +25918,9 @@ SOFTWARE.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T74 ]]
+[[ end shared text T75 ]]
-[[ begin shared text T75 ]]
+[[ begin shared text T76 ]]
Copyright (c) 2015
Permission is hereby granted, free of charge, to any
@@ -25730,9 +25946,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T75 ]]
+[[ end shared text T76 ]]
-[[ begin shared text T76 ]]
+[[ begin shared text T77 ]]
MIT License
Copyright (c) 2021 Chip Reed
@@ -25754,9 +25970,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T76 ]]
+[[ end shared text T77 ]]
-[[ begin shared text T77 ]]
+[[ begin shared text T78 ]]
Copyright (c) 2024 Mullvad VPN AB
Permission is hereby granted, free of charge, to any
@@ -25782,9 +25998,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T77 ]]
+[[ end shared text T78 ]]
-[[ begin shared text T78 ]]
+[[ begin shared text T79 ]]
SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0
PackageName: tauri
@@ -25805,9 +26021,9 @@ PackageDownloadLocation: git://github.com/tauri-apps/tauri
PackageDownloadLocation: git+https://github.com/tauri-apps/tauri.git
PackageDownloadLocation: git+ssh://github.com/tauri-apps/tauri.git
Creator: Person: Daniel Thompson-Yvetot
-[[ end shared text T78 ]]
+[[ end shared text T79 ]]
-[[ begin shared text T79 ]]
+[[ begin shared text T80 ]]
Copyright (c) 2015 Steven Allen
Permission is hereby granted, free of charge, to any
@@ -25833,9 +26049,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T79 ]]
+[[ end shared text T80 ]]
-[[ begin shared text T80 ]]
+[[ begin shared text T81 ]]
Copyright (c) Jacob Pratt et al.
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -25855,9 +26071,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T80 ]]
+[[ end shared text T81 ]]
-[[ begin shared text T81 ]]
+[[ begin shared text T82 ]]
MIT License
Copyright (c) Tokio Contributors
@@ -25879,9 +26095,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T81 ]]
+[[ end shared text T82 ]]
-[[ begin shared text T82 ]]
+[[ begin shared text T83 ]]
Copyright (c) 2019 Tower Contributors
Permission is hereby granted, free of charge, to any
@@ -25907,9 +26123,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T82 ]]
+[[ end shared text T83 ]]
-[[ begin shared text T83 ]]
+[[ begin shared text T84 ]]
Copyright (c) 2019 Tokio Contributors
Permission is hereby granted, free of charge, to any
@@ -25935,9 +26151,9 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T83 ]]
+[[ end shared text T84 ]]
-[[ begin shared text T84 ]]
+[[ begin shared text T85 ]]
The MIT License (MIT)
Copyright (c) 2019 nabijaczleweli
@@ -25959,9 +26175,9 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-[[ end shared text T84 ]]
+[[ end shared text T85 ]]
-[[ begin shared text T85 ]]
+[[ begin shared text T86 ]]
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -26163,9 +26379,9 @@ SOFTWARE.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-[[ end shared text T85 ]]
+[[ end shared text T86 ]]
-[[ begin shared text T86 ]]
+[[ begin shared text T87 ]]
MIT License
Copyright (c) Microsoft Corporation.
@@ -26187,9 +26403,9 @@ SOFTWARE.
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
-[[ end shared text T86 ]]
+[[ end shared text T87 ]]
-[[ begin shared text T87 ]]
+[[ begin shared text T88 ]]
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -26208,9 +26424,9 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-[[ end shared text T87 ]]
+[[ end shared text T88 ]]
-[[ begin shared text T88 ]]
+[[ begin shared text T89 ]]
Copyright (c) 2024 Zeeshan Ali Khan & zbus contributors
Permission is hereby granted, free of charge, to any
@@ -26236,4 +26452,4 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-[[ end shared text T88 ]]
+[[ end shared text T89 ]]
diff --git a/agents/manifest.json b/agents/manifest.json
index d9001d35..b65c08b7 100644
--- a/agents/manifest.json
+++ b/agents/manifest.json
@@ -8,9 +8,19 @@
"render",
"draw_from_smiles",
"draw_from_molfile",
+ "draw_from_name",
+ "name_structure",
"get_structure",
"validate",
"compute_properties",
+ "predict_nmr",
+ "predict_spectrum",
+ "open_spectrum",
+ "spectrum_data",
+ "spectrum_peaks",
+ "spectrum_pick_peaks",
+ "spectrum_integrate",
+ "spectrum_export",
"convert",
"batch_convert",
"list_open_documents",
@@ -45,14 +55,27 @@
"clean_layout",
"add_arrow",
"add_text",
- "add_reaction"
+ "add_reaction",
+ "build_3d",
+ "conformers_3d",
+ "minimise_3d",
+ "scan_dihedral",
+ "measure_3d",
+ "open_3d_structure",
+ "extract_ligand",
+ "export_3d"
],
"read_only": [
"get_context",
"render",
+ "name_structure",
"get_structure",
"validate",
"compute_properties",
+ "predict_nmr",
+ "spectrum_data",
+ "spectrum_peaks",
+ "spectrum_export",
"list_open_documents",
"list_commands",
"extensions_list",
@@ -62,11 +85,17 @@
"check_structure",
"stereo",
"substructure",
- "get_atoms"
+ "get_atoms",
+ "measure_3d"
],
"approval_gated": [
"draw_from_smiles",
"draw_from_molfile",
+ "draw_from_name",
+ "predict_spectrum",
+ "open_spectrum",
+ "spectrum_pick_peaks",
+ "spectrum_integrate",
"convert",
"batch_convert",
"new_document",
@@ -91,7 +120,14 @@
"clean_layout",
"add_arrow",
"add_text",
- "add_reaction"
+ "add_reaction",
+ "build_3d",
+ "conformers_3d",
+ "minimise_3d",
+ "scan_dihedral",
+ "open_3d_structure",
+ "extract_ligand",
+ "export_3d"
],
"transports": [
"stdio",
@@ -106,9 +142,11 @@
"edit-by-id",
"extension-drawings",
"handoff",
+ "names-and-spectra",
"reactions",
"session-and-connection",
"structure-analysis",
+ "three-d",
"visual-qa",
"window-commands"
]
@@ -130,9 +168,11 @@
"extensions",
"formats-and-export",
"menus",
+ "names-and-spectra",
"reactions",
"release",
"stereo-and-queries",
+ "three-d",
"window-shell"
]
}
diff --git a/backend/HASHOUT_LOG.md b/backend/HASHOUT_LOG.md
index 64a2ef21..601b7360 100644
--- a/backend/HASHOUT_LOG.md
+++ b/backend/HASHOUT_LOG.md
@@ -1,6 +1,6 @@
# backend HASHOUT_LOG
-Living log for the FormChem engine and its setup scripts, _v0.1.0 to _v0.8.0. It follows the family template (formdeck's engine) for 0.1.0 and 0.2.0, from 0.3.0 it records the chemistry engine, the document store and the file format, from 0.5.0 the reaction services (perception, mapping, balance, stoichiometry, reaction exchange), the template library and media, and from 0.6.0 the analysis services (stereo and enhanced stereo, wedges, abbreviations, hydrogens, queries and SMARTS, V3000 query molfiles, Markush, properties, the structure check, the isotope pattern), the analysis router and tools, and the desktop build fixes, and from 0.7.0 the one-folder macOS engine, the scored 2D layout, the formats table with its readers, writers and report items, the stream reader, picture export with its own PDF and EPS writer, the embedded source, the file write route, standardisation, the batch command line and the quick command state mirror, and from 0.8.0 the agent tools (drawing, checking, documents, conversion and edits by id), the shared write result and the render bridge, the agent call log with its undo and Stop, and the agent token, so many reasons here are about what was kept, what was dropped, and why. The code carries almost no comments; the reasons live here, anchored by file and symbol. Read the map and the TOC first.
+Living log for the FormChem engine and its setup scripts, _v0.1.0 to _v0.10.0. It follows the family template (formdeck's engine) for 0.1.0 and 0.2.0, from 0.3.0 it records the chemistry engine, the document store and the file format, from 0.5.0 the reaction services (perception, mapping, balance, stoichiometry, reaction exchange), the template library and media, and from 0.6.0 the analysis services (stereo and enhanced stereo, wedges, abbreviations, hydrogens, queries and SMARTS, V3000 query molfiles, Markush, properties, the structure check, the isotope pattern), the analysis router and tools, and the desktop build fixes, and from 0.7.0 the one-folder macOS engine, the scored 2D layout, the formats table with its readers, writers and report items, the stream reader, picture export with its own PDF and EPS writer, the embedded source, the file write route, standardisation, the batch command line and the quick command state mirror, and from 0.8.0 the agent tools (drawing, checking, documents, conversion and edits by id), the shared write result and the render bridge, the agent call log with its undo and Stop, and the agent token, and from 0.9.0 the offline name engine (dictionary, systematic parser, round-trip-checked namer), FormChem's own NMR increment predictor, the JCAMP-DX reader and the spectra service, and the ten agent tools over them, and from 0.10.0 the 3D package (building from 2D with the stereo check, force fields, conformer searches, minimisation, relaxed scans, measurements and charges, 3D export), FormChem's own PDB and mmCIF readers with ligand extraction, 3D SD records, the stale-conformer rule inside the store, the 3D routes and the eight agent tools over them, so many reasons here are about what was kept, what was dropped, and why. The code carries almost no comments; the reasons live here, anchored by file and symbol. Read the map and the TOC first.
## Org navi map
@@ -34,7 +34,22 @@ backend/app/services/ agent_out.py (write result, render bridge, free spa
agent_log.py (the agent call log), 0.8.0
backend/app/core/agent_token.py the agent token for HTTP MCP (0.8.0)
backend/app/routers/agent_activity.py /api/agents: calls, undo, stop, allow, token (0.8.0)
+backend/app/services/names/ base (the NameEngine protocol), registry, offline engine, dictionary, lexicon, rings, parser, build,
+ stereo, namer (0.9.0); data/names/ holds the 629-entry dictionary in seven files
+backend/app/services/nmr/ base (Shift, Predictor, Registry), environment, groups, carbon, proton, coupling, predict, simulate,
+ document (the predicted spectrum object), source (the data hook), reference and accuracy (0.9.0)
+backend/app/services/spectra/ ldr, asdf, tables, ntuples, jcamp (the JCAMP-DX reader), technique, issues, display, measure, export,
+ document (opening and inserting), source (parse cache and predictor registry) (0.9.0)
+backend/app/routers/ also names (/api/names and names/insert), nmr (/api/nmr and nmr/predict-spectrum, nmr/refresh),
+ spectra (data, peaks, integrals, export, /api/spectra/parse) (0.9.0)
+backend/app/services/three_d/ molecule (atom labels), forcefield, build, verify, conformers, minimise, scan, measure, export,
+ structure, pdb, mmcif, molfile3d, ligand, readers, document (structure files as drawings),
+ stale (the conformer rule the store runs) (0.10.0)
+backend/app/routers/three_d.py /api/documents/{id}/3d/... (build, conformers, active, minimise, scan, measure, charges,
+ molblock, open, structure, extract-ligand) and /api/3d/parse (0.10.0)
+docs/3D.md building, conformers, scans, measurements, surfaces, structure files, exports and limits (0.10.0)
docs/AGENTS.md every agent tool with arguments and results, consent, Stop, the token and the call log (0.8.0)
+docs/NAMES.md, docs/SPECTRA.md how names are read and written; JCAMP-DX, the spectrum object and NMR prediction (0.9.0)
docs/FORMATS.md every format, what it loses, the report codes and the exchange routes (0.7.0)
docs/CLI.md the conversion command line with examples and timings (0.7.0)
backend/app/data/templates/ 206 original templates in nine category files (0.5.0)
@@ -215,6 +230,64 @@ build_app, build_app.bat desktop bundle build, teed to build_app.log
162. A lone atom's box covers its hydrogens on the side they are written · services/chem/geometry.py fragment_box
163. Formula text in an arrow's band is conditions · services/chem/reactions.py infer_step, docs/FORMAT.md
164. Settings are written under one lock · core/config.py write_settings
+165. Names go through a pluggable engine · services/names/base.py NameEngine, services/names/__init__.py register, engine
+166. The offline engine: dictionary, then refusals, then the parser · services/names/offline.py OfflineEngine
+167. The dictionary is FormChem's own, with stored InChIKeys · services/names/dictionary.py, data/names/
+168. What an unprefixed biochemical name means · data/names/amino-acids.json, biochemistry.json, drugs.json
+169. The parser backtracks with a memo and a step budget · services/names/parser.py Parser, TooHard
+170. Readings are ranked, and an assumption costs confidence · services/names/offline.py, services/names/build.py _ambiguous
+171. The builder works on kekulized fragments and checks valence · services/names/build.py build, apply_prefixes
+172. Ring parents are SMILES in IUPAC numbering · services/names/rings.py Ring, template
+173. Stereo descriptors are set, then checked with the CIP labeller · services/names/stereo.py apply, labels
+174. The namer refuses rather than guesses, and only round trips are shown · services/names/namer.py Namer, Unsupported
+175. The names routes · routers/names.py to_structure, to_name, insert_name, name_mol, engines
+176. NMR prediction is a chain of predictors; the first answer per site wins · services/nmr/base.py Registry, services/nmr/predict.py
+177. The environment is built once per fragment · services/nmr/environment.py build, Environment
+178. 13C by increments · services/nmr/carbon.py, services/nmr/groups.py classify
+179. 1H by increments, alkene sides from the drawing · services/nmr/proton.py IncrementProton, _side
+180. First-order couplings and their labels · services/nmr/coupling.py partners, multiplicity
+181. Confidence and uncertainty per atom, and the warnings · services/nmr/predict.py _worst, _notes
+182. Simulated spectra are area-normalised Lorentzians on a dense grid · services/nmr/simulate.py
+183. Accuracy is measured on a holdout set · services/nmr/accuracy.py, services/nmr/reference.py
+184. A predicted spectrum stores links, never points · services/nmr/document.py spectrum_ops, annotations
+185. Placement keeps label room and stays on the page · services/nmr/document.py place, LABEL_ROOM_BONDS
+186. Refresh rewrites the links; nothing refreshes by itself · services/nmr/document.py refresh_ops, routers/nmr.py
+187. The predicted source hook · services/nmr/source.py hook, register; services/spectra/source.py
+188. The NMR routes · routers/nmr.py predict_route, predict_spectrum, refresh_spectrum, predictors
+189. One tokenizer for every JCAMP-DX compression form · services/spectra/asdf.py, ldr.py, tables.py
+190. The reader checks, repairs and reports · services/spectra/tables.py, issues.py, jcamp.py finish
+191. NTUPLES, LINK and what is not drawn · services/spectra/ntuples.py, jcamp.py _walk
+192. Techniques, units and directions · services/spectra/technique.py
+193. A spectrum file opens as a drawing and stays byte for byte · services/spectra/document.py, importers.py, store.py, package.py
+194. The data route decimates and the parse is cached · services/spectra/display.py, source.py, routers/spectra.py _data
+195. Peaks, integrals and baselines · services/spectra/measure.py, routers/spectra.py peak_ops, integral_ops
+196. Exports re-read clean · services/spectra/export.py
+197. The ten agent tools of 0.9.0 · routers/mcp.py
+198. numpy is pinned, and FormChem's own data is described · requirements.txt, requirements_macos.txt, NOTICE.md
+199. 3D is one package with fixed defaults · services/three_d/__init__.py ThreeDError, METHODS, SEED, method_of
+200. Atoms are named by fragment id, hydrogens by index · services/three_d/molecule.py prepare, Model, _labels
+201. Abbreviations are expanded for 3D and kept under expanded · services/three_d/molecule.py positions, record
+202. MMFF94 first, UFF with a reason · services/three_d/forcefield.py setup, Field, fallback_warning
+203. Converged means the RMS gradient · services/three_d/forcefield.py run, rms_gradient, minimise.py
+204. Build keeps the drawn stereo and checks it from 3D · services/three_d/build.py, verify.py stereo
+205. Clashes are heavy pairs more than two bonds apart · services/three_d/verify.py clashes, CLASH_SCALE
+206. Conformers: pruned by heavy-atom RMSD, kept in a window, weighted by Boltzmann · services/three_d/conformers.py
+207. The scan restarts every angle from one geometry · services/three_d/scan.py run, chain, _constrained
+208. Measurements and partial charges · services/three_d/measure.py measure, charges, ESP_LABEL
+209. 3D export writes every hydrogen and an atom map · services/three_d/export.py write, atom_map
+210. Stale conformers are dropped inside apply · services/three_d/stale.py, services/store.py apply_now
+211. Routes snapshot, compute in a thread, then check the graph · routers/three_d.py _snapshot, _run, _unchanged, commit
+212. FormChem reads PDB and mmCIF itself · services/three_d/structure.py, pdb.py, mmcif.py
+213. The summary sorts residues and picks the primary ligand · services/three_d/structure.py summary, primary
+214. Ligand bond orders: a template first, then perception · services/three_d/ligand.py TEMPLATES, bond_orders, extract
+215. 3D SD and MOL records keep their coordinates · services/three_d/molfile3d.py, document.py mdl_with_conformers
+216. A structure file becomes a model3d over its kept bytes · services/three_d/readers.py, routers/three_d.py open_bytes
+217. PDB and mmCIF through Open and Import · services/three_d/document.py, services/importers.py MODELS_3D
+218. The media route takes structure files · services/store.py _structure_file, add_media; services/package.py
+219. Agent calls commit 3D changes under their own name · routers/three_d.py AgentCall, _agent
+220. The eight agent tools of 0.10.0 · routers/mcp.py
+221. The notices read nested npm packages by their lock path · setup/notices.py
+222. Engine 3D texts the window shows are keys; some stay agent text · setup/i18n_tool.py NOT_TEXT, part15
## 1. Ports and the data folder are FormChem's own · _v0.1.0 (app/core/config.py)
@@ -872,6 +945,238 @@ FORMAT.md (the contract) says that in the arrow's band above or below, structure
Always allow in the consent box (consent.py writes settings) and a window preference save ran in two threadpool workers; both wrote `settings.tmp`, the second `replace` failed with FileNotFoundError and a 500, and one change was lost. `write_settings` now holds a `threading.Lock` across read, merge, seal, write and replace. One engine process writes the settings, so a process lock is enough.
+## 165. Names go through a pluggable engine · _v0.9.0 (services/names/base.py NameEngine, StructureResult, NameResult, NameItem, note; services/names/__init__.py register, engine, engines, listing, _defaults)
+
+Plan question Q7 (how name to structure ships: OPSIN as a separate process, an online lookup, or FormChem's own) was open, so the engine was built so that the answer does not reach the routes, the window or MCP. `NameEngine` is a runtime-checkable Protocol: `id`, `label`, `version`, `available()`, `to_structure(name) -> StructureResult`, `to_name(mol) -> NameResult`. Results carry the SMILES and InChIKey, a confidence (`high`, `medium`, `low`, `none`), the method, the engine id and version, warnings and an error, so every caller shows how a name was read. The registry registers the offline engine lazily; `register(engine, first=True)` puts another one in front, and `engine(id=None)` answers the first available. OPSIN would be `services/names/opsin.py` with a class meeting the protocol, run as a separate process so its Java runtime and its licence stay apart (the brief's rules hold: LGPL only as a separate module or process, never GPL), and one `names.register(OpsinEngine(), first=True)` at startup. An engine may be good in one direction only: its `to_name` answers `NameResult([], ..., reason=...)`.
+
+## 166. The offline engine: dictionary, then refusals, then the parser · _v0.9.0 (services/names/offline.py OfflineEngine, Stats, _cas_inverted, _bare, DL_PREFIX, MAX_NAME)
+
+`OfflineEngine` (id `formchem`, version 0.9.0) looks a name up in the dictionary first, so "acetyl salicylic acid", "L-DOPA" and "(-)-nicotine" resolve before any rule could refuse them. Then it refuses what it must not guess: CAS inverted index names ("Benzene, 1,2-dichloro-") with the code `cas_inverted`, and D- or L- outside the dictionary (`dl_configuration`), because a systematic reading of those would silently drop meaning. Then the systematic parser. A refusal names the 0-based character where reading stopped (`position`) or the build problem (`not_valid` for 2,2,2-trimethylpropane or propan-4-ol). `to_name` is the dictionary's reverse lookup by InChIKey for the trivial name plus the namer (entry 174). `Stats` counts named, round-trip passes and failures and unsupported structures per engine run; `/api/names/engines` reports them, so a regression in the namer shows as a falling round-trip rate rather than as wrong names.
+
+## 167. The dictionary is FormChem's own, with stored InChIKeys · _v0.9.0 (services/names/dictionary.py Index, Entry, lookup, by_inchikey, loose, verify, LOOSE; data/names/*.json)
+
+629 entries in seven files (solvents 73, reagents 153, amino acids 46, biochemistry 67, drugs 126, organics 114, natural products 50), every SMILES written for FormChem (source "FormChem", Apache-2.0), no third-party list or database copied. Each entry stores its InChIKey computed with RDKit 2025.09.3, and `verify()` recomputes them all (0 problems at 0.9.0), so an RDKit upgrade that changes a key is caught before a name silently points at a different structure. Stereo-rich entries (paclitaxel, morphine, cholesterol, the steroids, quinine, artemisinin, the sugars and nucleosides and others) were checked against keys known independently, and every chiral entry's CIP labels were reviewed. Loose matching (`LOOSE` drops spaces, hyphens, commas, apostrophes and brackets) applies to dictionary names only, never to the systematic parser, where a hyphen or a bracket carries meaning.
+
+## 168. What an unprefixed biochemical name means · _v0.9.0 (data/names/amino-acids.json, biochemistry.json, drugs.json)
+
+"alanine" means L-alanine and "glucose" D-glucose, because that is what a chemist means by the bare word; the sugars are drawn as the pyranose with the anomeric centre left open (fructose and the pentoses open chain). Racemic drugs (ibuprofen) carry no stereo, because drawing one enantiomer would claim something the name does not.
+
+## 169. The parser backtracks with a memo and a step budget · _v0.9.0 (services/names/parser.py Parser, parse, normalise, TooHard, Tree, Word; services/names/lexicon.py)
+
+IUPAC names are ambiguous at the token level ("pent" in "pentyl" and "pentane", "di" in "diethyl" and "dimethylamino"), so the grammar backtracks over the lexicon (stems to C20, multipliers to deca, bis to hexakis, 90 prefix groups, 22 suffixes, retained parents, class words, cations) and memoises each node. The memo is capped at 200 readings per node and the whole parse at 20000 steps (`TooHard`), so the worst name tried still answers in about 140 ms and a pasted paragraph cannot stall the live preview. Old-style locants ("2-butanol", "1,3-butadiene", "3-buten-2-one"), bracketed and bare compound prefixes nested with (), [] and {}, and functional class names (benzyl alcohol, diethyl ether, ethyl methyl ketone, methyl iodide) are read.
+
+## 170. Readings are ranked, and an assumption costs confidence · _v0.9.0 (services/names/offline.py; services/names/build.py _ambiguous, _positions)
+
+Readings are ranked by the number of assumptions, then by unbracketed compound prefixes. When the best readings tie and give different structures, the answer carries an `ambiguous` warning and medium confidence, which is how "chloromethylbenzene" reads as benzyl chloride with a note and "4-dimethylaminopyridine" as DMAP. A locant the name leaves out and the structure needs ("propanol" drawn as propan-1-ol) is recorded as an `assumed` warning and lowers the confidence to medium, unless every position is equivalent or fully substituted. A name with no stereo descriptors for a structure with stereocentres keeps high confidence with a note: it is a correct name for the unspecified structure.
+
+## 171. The builder works on kekulized fragments and checks valence · _v0.9.0 (services/names/build.py build, build_parent, build_sub, apply_suffix, apply_prefixes, apply_unsat, graft, valence, free, BuildError)
+
+The parse tree becomes a structure by grafting kekulized fragments onto the parent, with a valence check at every graft, so a name that asks for a fifth bond on carbon is refused (`not_valid`) rather than sanitised into something else. Locantless prefixes go to the lowest free positions. The result is laid out by the same path as pasted SMILES (`io.read_text`, `convert.from_mol`, `layout.depict`, the scored layout of 0.7.0), so a structure drawn from a name looks like one drawn from its SMILES.
+
+## 172. Ring parents are SMILES in IUPAC numbering · _v0.9.0 (services/names/rings.py Ring, Template, template, lookup, names_for)
+
+The 49 ring parents (benzene to azepane, the azoles, the benzo-fused bicycles, purine, the saturated heterocycles) are written as SMILES whose atom order is the ring's IUPAC numbering, with aliases ("2-pyridyl") and indicated hydrogen. A locant is then an atom index, and the namer numbers rings with the same table, so parser and namer cannot disagree about where position 3 is. A ring system outside the table is refused by both, never approximated.
+
+## 173. Stereo descriptors are set, then checked with the CIP labeller · _v0.9.0 (services/names/stereo.py apply, labels, potential, StereoError)
+
+R, S, E, Z, cis and trans are set on the atoms and bonds the locants name, then the structure is labelled with RDKit's `rdCIPLabeler` (the new rules, as the Analysis panel uses) and any centre whose label disagrees is flipped until all agree; a descriptor on an atom that is not a stereocentre is refused. (+), (-), rac and (RS) draw without stereo, with a note, since optical rotation does not fix a configuration.
+
+## 174. The namer refuses rather than guesses, and only round trips are shown · _v0.9.0 (services/names/namer.py Namer, name, Unsupported, assemble, RANK, MAX_ATOMS)
+
+Structure to name follows the IUPAC 2013 order: principal characteristic group by seniority (acid, ester, amide, nitrile, aldehyde, ketone, alcohol, thiol, amine), parent by most principal groups then ring over chain, ring seniority, chain length then unsaturation, lowest locants in the rule order, prefixes alphabetised. Wherever its rules stop it raises `Unsupported` with a reason: ring systems outside the table, salts and mixtures, S and N oxides, phosphorus and metals, imines and azo, stereocentres outside the parent, pseudo-asymmetric centres, more than 80 heavy atoms. Every systematic name is then parsed back by the parser and shown only when the standard InChIKey is identical at high confidence (spec 8.2). The guard earned its place during development: it caught "1,1-dioxothiolane" for sulfolane, after which the namer refuses S=O. Coverage at 0.9.0: 352 of the 629 dictionary structures named, all 352 round-trip; the 50 corpus structures all named and round-tripped.
+
+## 175. The names routes · _v0.9.0 (routers/names.py to_structure, to_name, insert_name, engines, resolve, name_mol, MAX_NAME, MAX_SMILES, MAX_ATOMS)
+
+`POST /api/names/to-structure` answers 200 even for a refused name, with `error` set and `fragment` null, because the dialog's live preview calls it on every pause in typing and must not need an exception path; 422 is kept for a missing name or bad coordinates, 404 for an unknown engine. `POST /api/names/to-name` takes SMILES or a fragment (wedges become stereo through `perceive.prepare`); fragments with labels, R-groups or any-atoms answer `names: []` with the reason. `POST /api/documents/{id}/names/insert` is a write: it needs the window key, resolves the name, then uses the 0.8.0 placement (`agent_draw.structure_ops`, free space unless x and y are given) and applies one transaction labelled "Insert [name]"; an unread name is 422 there. `name_mol` is shared with the `name_structure` MCP tool so both answer the same.
+
+## 176. NMR prediction is a chain of predictors; the first answer per site wins · _v0.9.0 (services/nmr/base.py Shift, Predictor, Registry; services/nmr/__init__.py METHOD, VERSION, DESCRIPTION, REGISTRY; services/nmr/predict.py predict, predict_both, _sites, _groups)
+
+Plan question Q8 (NMRShiftDB2 data, share-alike) is open and its data must not be used, so 0.9.0 ships FormChem's own additive increments, and the registry is built so a data-backed predictor (a HOSE lookup or a model) can sit in front later. A predictor is any object with `name`, `version`, `method`, `nuclei` and `predict(env, nucleus) -> {site: Shift}`; `Registry.register` puts it first, and `predict` asks each predictor in order, filling only the sites still empty. So a database that knows half the molecule leaves the rest to the increments, and every signal and atom names the method and version that produced it. Entries are keyed by name and nucleus, which lets the 1H and 13C increment predictors share the name "increments". `predictor` in the route body picks one by name.
+
+## 177. The environment is built once per fragment · _v0.9.0 (services/nmr/environment.py build, Environment, redraw, ring_distance, ring_heteroatom)
+
+A fragment becomes a heavy-atom RDKit molecule through `perceive.prepare` (abbreviations expanded; an abbreviation's hidden atoms answer under its label atom's id), with the fragment atom id of every atom, the drawn H atom ids, implicit H counts after `RemoveHs`, rings, page coordinates and stereocentres. Symmetry comes from `CanonicalRankAtoms(breakTies=False, includeChirality=True)`, so symmetry-equivalent atoms always share one signal. A drawn D atom stays a graph atom and is not counted as a proton.
+
+## 178. 13C by increments · _v0.9.0 (services/nmr/carbon.py; services/nmr/groups.py classify, acyl_kind, is_alkyl)
+
+`groups.classify` names the substituent seen from a carbon (about 50 classes, shared by both nuclei). sp3 carbons start from methane and walk outwards through sp3 carbons and simple heteroatoms with alpha, beta, gamma and delta terms; any other group adds its terms and stops the walk; branching, ring size, damping of several heteroatom alphas and gamma terms across a carbonyl follow. Aromatic carbons start from the six-ring or five-ring base with ring heteroatom terms by position, then ipso, ortho, meta and para terms per substituent; alkenes from ethylene with same-side and far-side terms; carbonyls by class (ketone, aldehyde, acid, carboxylate, ester, anhydride, amide, acyl halide, carbonate, carbamate, urea) with their own corrections. All values are FormChem's own rounded numbers; one tuning round added only general rules (gamma across a carbonyl, aryl ketone alpha carbon, 1,3-dicarbonyl, a damped third proton substituent, aryl acetate methyl), never a molecule-specific one.
+
+## 179. 1H by increments, alkene sides from the drawing · _v0.9.0 (services/nmr/proton.py IncrementProton, shifts, _side, _alkene, _aromatic, _exchangeable, EXCHANGE)
+
+sp3 protons start from a base by H count with an alpha term per non-alkyl neighbour, beta terms and damping for a second and third group; aromatic protons from benzene 7.30 with ortho, meta and para terms (six-ring N and five-ring heteroatom bases apart); aldehyde, alkyne and imine protons by class. An alkene proton's cis and trans terms come from the drawn 2D geometry, because a drawn double bond already fixes which side each substituent is on, undrawn stereo included; a degenerate drawing falls back to a fresh RDKit depiction (medium confidence), then to the average (medium, with a note). Each half of a terminal =CH2 is its own site, and the side is stored relative to the lower-index carbon so both carbons agree. Exchangeable OH, NH and SH protons get a typical value and a range by kind, always low confidence.
+
+## 180. First-order couplings and their labels · _v0.9.0 (services/nmr/coupling.py partners, multiplicity, Coupling, Multiplicity, J_ALKYL, J_CIS, J_TRANS, J_ORTHO, J_META)
+
+Couplings are computed for one representative of each symmetry group, excluding its own group: vicinal 7.0 Hz (allylic 6.5, to an aldehyde 2.5, diene 10), alkene cis 10.5 and trans 16.5 from the sides, aromatic ortho 8.0 (5.0 next to ring N), meta 2.0, propargylic 2.5. Partners within 0.75 Hz merge by the n+1 rule; labels go to three letters (dd, td, ddt, qd) and then m; exchangeable protons are br s. Diastereotopic CH2 is treated as equivalent, amide rotamers are merged, AA'BB' systems show as d, and only first-order patterns are drawn; each simplification is reported as a warning rather than hidden.
+
+## 181. Confidence and uncertainty per atom, and the warnings · _v0.9.0 (services/nmr/predict.py _worst, _notes, _label, CONFIDENCE_ORDER; services/nmr/carbon.py UNCERTAINTY; services/nmr/proton.py UNCERTAINTY)
+
+`high` where the rules cover the environment well; `medium` for several heteroatoms on one carbon, small rings, heteroaromatic and fused rings, four or more ring substituents, undrawn alkene geometry and diastereotopic CH2; `low` for unknown labels, R-groups, metals, B, P, Si, charged or radical atoms and all exchangeable protons. The uncertainty in ppm follows (1H 0.15, 0.3, 0.6; 13C 2, 4, 8; an exchangeable proton half its range), and a signal takes the worst of its atoms. The warnings (`nmr_exchangeable`, `nmr_diastereotopic`, `nmr_second_order` when coupled signals sit closer than three times J at the chosen frequency, `nmr_rotamer` and the rest) name their atoms, so the window can point at them.
+
+## 182. Simulated spectra are area-normalised Lorentzians on a dense grid · _v0.9.0 (services/nmr/simulate.py lines, split, spectrum, multiplets, evaluate, _grid, DEFAULT_LINEWIDTH, EXCHANGE_LINEWIDTH, INTEGRAL_PAD)
+
+Lines come from Pascal patterns per coupling (J in Hz divided by the frequency), drawn as Lorentzians normalised by area, 1 Hz wide (12 Hz for exchangeable protons). Area, not height, because a broad OH must integrate to one proton through the same integrals route a person uses. 13C is proton-decoupled with intensity by carbon count (NOE and relaxation not modelled). The grid is uniform plus a dense sinh-spaced cluster around each line, so a 1 Hz line keeps its shape at any zoom without millions of points. Stored integrals span about ten line widths and hold about 97 percent of the area, so they agree with an integral the person drags over the same multiplet.
+
+## 183. Accuracy is measured on a holdout set · _v0.9.0 (services/nmr/accuracy.py evaluate, report, main, SETS; services/nmr/reference.py REFERENCE, HOLDOUT, NOTE, HOLDOUT_NOTE)
+
+`python -m app.services.nmr.accuracy [--calibration|--holdout] [--molecules] [--json]` from backend/. The calibration set (40 molecules) shares parent compounds with the increments, so its error (1H 0.055 ppm over 119 protons, 13C 0.63 ppm over 152 carbons) is optimistic; the holdout set (17 molecules: p-xylene to methyl methacrylate) was never tuned on and gives the fair figure: 1H 0.092 ppm (58 protons, worst 0.51), 13C 1.12 ppm (80 carbons, worst 4.4), exchangeable protons reported apart. The reference shifts are approximate typical values written from general knowledge, not taken from a cited data set, and the module says so; a measured set with an acceptable licence would give a firmer number. Largest remaining errors: caffeine's fused lactam ring, ring CH2 protons of cyclic ketones, THF C3, cyclohexene's allylic carbons.
+
+## 184. A predicted spectrum stores links, never points · _v0.9.0 (services/nmr/document.py spectrum_ops, annotations, fragment, DocumentError, WIDTH_BONDS, HEIGHT_BONDS)
+
+FORMAT.md keeps parsed and computed points out of the document, so `spectrum_ops` adds one `spectrum` object whose `source.predicted` holds the fragment, method, version and frequency, plus multiplets and integrals (1H) or peaks (13C) linked to the atoms, in one transaction ("Predict 1H NMR Spectrum"). The curve is recomputed from the structure every time the data route is asked. The box is 25 by 13 bond lengths (360 by 187 pt at 14.4).
+
+## 185. Placement keeps label room and stays on the page · _v0.9.0 (services/nmr/document.py place, _clear, _labelled, _page_width, _on_page, _spectra_below, LABEL_ROOM_BONDS, GAP_BONDS)
+
+The first version compared bare plot boxes, so a 13C spectrum covered the 1H spectrum's axis title and a spectrum right of a centred structure ran off an A4 page. Candidates now keep label room around the new box and around existing spectra (left 0.5, top 1.5, right 0.5, bottom 3 bond lengths), stay inside the page width, and stack below spectra already there: right of the structure, vertically centred, else below it, else the page's free spot. The page height is not checked yet (CHANGELOG known issue).
+
+## 186. Refresh rewrites the links; nothing refreshes by itself · _v0.9.0 (services/nmr/document.py refresh_ops; routers/nmr.py refresh_spectrum)
+
+`POST /api/documents/{id}/nmr/refresh` recomputes multiplets, integrals or peaks after the structure changed, keeps ids where the same atoms are linked, moves `source.predicted.version` to the running version, and answers `changed: false` when nothing moved. It is a command (Refresh Predicted Spectrum), not automatic: a window that sent a refresh transaction on every remote edit would race other windows and agents for the same change and fill the undo stack with steps nobody made.
+
+## 187. The predicted source hook · _v0.9.0 (services/nmr/source.py hook, register, settings, series, metadata, HOOK_POINTS; services/spectra/source.py PREDICTORS, synthetic, resolve; routers/spectra.py _method)
+
+The spectra data, peaks, integrals and export routes serve measured and predicted spectra alike by asking `spectra.source.resolve`, which hands a `predicted` source to the predictor registered under its method name (`PREDICTORS["FormChem increments"]`). Importing `app.routers.nmr` registers the hook, and does nothing while the spectra package is absent, so neither package imports the other at load time. The hook answers a 16000-point simulated curve with `metadata.METHOD` "FormChem increments 0.9.0", the observe nucleus and frequency and each prediction warning as an info report item. At integration the data route still answered the JCAMP-DX reader as `method` for predicted spectra; `_method` now answers the predictor's method and `predicted: true`, which is what the window's title shows.
+
+## 188. The NMR routes · _v0.9.0 (routers/nmr.py predictors, predict_route, predict_spectrum, refresh_spectrum, _structure, _with_spectrum, NUCLEUS_CHOICES)
+
+`GET /api/nmr/predictors` lists the method, version, description and registered predictors. `POST /api/nmr/predict` reads only: a fragment, a drawing object or SMILES, `nucleus` 1H, 13C or both, `frequency` (10 to 1500 MHz, default 400 for 1H and 100 for 13C; with both, 13C uses 0.2515 of the 1H frequency), optionally `spectrum: true` for simulated points; it answers signals, per-atom shifts keyed by fragment atom id, the journal line, the `terms` that built each shift (the explainable view of spec B 12) and the warnings. The two document routes are writes and need the window key, as every other changing route does.
+
+## 189. One tokenizer for every JCAMP-DX compression form · _v0.9.0 (services/spectra/asdf.py tokens, expand, line, rebase, values, SQZ, DIF, DUP; services/spectra/ldr.py records, tree, decode, norm, strip_comment; services/spectra/tables.py equidistant, var_list, grouped)
+
+Written from the published JCAMP-DX rules (4.24, 5.0, 5.01, 6.0 for the 2D markers) under the clean-room rule, without reading any existing parser. AFFN, PAC, SQZ, DIF and DUP go through one tokenizer, because real files mix them on one line. An E inside a number is an exponent only when a sign follows (`1.5E+03`): a bare E is a valid SQZ character, and the published examples always write exponents with a sign. Labels match ignoring spaces, dashes, slashes, underscores and case; `$$` comments are stripped anywhere and kept; text is read as ASCII, then UTF-8, then Latin-1 (reported). Parsed files are cached by SHA-256 (12 files), so every pan and zoom reuses one parse.
+
+## 190. The reader checks, repairs and reports · _v0.9.0 (services/spectra/tables.py, issues.py Issues, jcamp.py finish, _shift_reference, _ordered, JcampError)
+
+Every DIF Y check value is verified and dropped; a wrong one restarts its line from the trusted value (`y_check`), and a writer that skips the check stays readable (`y_check_missing`). FIRSTX and LASTX are trusted over line X values; NPOINTS is checked against the decoded count and replaced when the line X values fit the real count. Transmittance with a maximum at or below 1.5 is a fraction and is shown in percent, so the label is always "Transmittance (%)". `##.SHIFT REFERENCE` moves the ppm axis so the named point reads its value. Every item goes into the import report in the 0.7.0 shape with its line number (at most eight lines kept per code). 300 random 20-byte corruptions of a DIFDUP file raised only `JcampError` or parsed with a report.
+
+## 191. NTUPLES, LINK and what is not drawn · _v0.9.0 (services/spectra/ntuples.py build, Page, MAX_PAGES; services/spectra/jcamp.py _walk, build, _structure, parse, describe)
+
+NTUPLES pages are read with per-symbol FIRST, LAST, FACTOR and VAR_DIM; NMR real and imaginary pages become one spectrum with `imag` beside it; an FID stays in seconds as `kind: fid`, drawn as acquired, because a Fourier transform with phasing is a processing step FormChem does not claim to do. Every data block of a LINK file becomes its own spectrum; JCAMP-CS structure blocks, 2D NTUPLES and the pages after the first of a GC-MS file are listed as left out with a reason (`2d_unsupported`, `pages_left_out`) rather than dropped silently.
+
+## 192. Techniques, units and directions · _v0.9.0 (services/spectra/technique.py of, direction, x_axis, y_axis, y_modes, nucleus)
+
+DATA TYPE maps to `ir`, `raman`, `uvvis`, `ms` or `nmr` (with a fallback from the units), XUNITS and YUNITS to axis labels per technique, and `.OBSERVE NUCLEUS` "^1H" to "1H". `direction` is `decreasing` when the largest x belongs at the left (IR and Raman wavenumber, NMR in ppm or Hz) and `increasing` otherwise (UV-Vis wavelength, m/z, FID time, IR in micrometres), and the data route's `view.x_from` already honours it, so the window draws `x_from` at the left without a flag of its own.
+
+## 193. A spectrum file opens as a drawing and stays byte for byte · _v0.9.0 (services/spectra/document.py open_file, drawing, for_insert, spectrum_object, media_entry, boxes, sniff; services/importers.py SPECTRA, is_spectrum, import_spectrum, import_with_media; services/store.py open, add_media; services/package.py EXT_BY_MIME)
+
+File > Open of `.jdx`, `.dx` or `.jcamp` makes a drawing with one spectrum object per block, stacked down the page, and keeps the file once as a media entry (`chemical/x-jcamp-dx`), so the package holds the original bytes as `media/[id].jdx` and export with `original=1` answers them untouched. Import into an open drawing answers the media as a data URL, the carrier `.fchem` imports already use, so the window uploads it and the paste plan remaps the ids. The media route accepts JCAMP-DX text after sniffing it and still refuses other text. Spectrum objects take the prefix `o`, peaks and integrals `k`, media `m`, each checked against every id in the document. `import_file` refuses spectra, because a spectrum without its media would have nothing to draw.
+
+## 194. The data route decimates and the parse is cached · _v0.9.0 (routers/spectra.py _data, _load, _resolve, _y_mode, _with_baseline; services/spectra/display.py minmax, tallest, points, convert, auto_view, merged_view; services/spectra/source.py parsed, CACHE_SIZE)
+
+`GET /api/documents/{doc}/spectra/{obj}/data?from=&to=&n=&y_mode=&imag=` reduces continuous data with min-max buckets (each bucket keeps its lowest and highest point in x order, both ends always kept), so no peak vanishes at any zoom; sticks keep the tallest `n`. A 32761-point NMR file decimates to 1323 points in about 13 ms. Absorbance is `-log10(T/100)` with T floored at 1e-6. The answer carries the axis labels, direction, view, y modes, the NMR observe frequency as a top-level `frequency` in MHz, the method and the report, so the window needs no JCAMP-DX knowledge.
+
+## 195. Peaks, integrals and baselines · _v0.9.0 (services/spectra/measure.py peaks, prominences, maxima, noise, integrals, area, baseline, MAX_PEAKS, STICK_FLOOR, NMR_SIGMA; routers/spectra.py peak_ops, integral_ops, pick_peaks, integrate)
+
+Peaks by prominence (5 percent of the y span by default), minima in transmittance and reflectance because those bands point down; NMR above the median plus six times a noise estimate from the median absolute deviation of first differences; MS sticks above 1 percent of the base peak; x refined with a parabola. A peak's `y` is stored in the y mode shown when it was picked. Integrals are trapezoid areas after a straight baseline between the range ends; a typed value rescales every integral of the spectrum in the same transaction. A polynomial baseline (degree 3, points above the fit clipped) is offered as `baseline=auto` on the data route. At integration the op building was split out of the routes into `peak_ops` and `integral_ops`, so the MCP tools apply the same ops with the agent's attribution; the route answers did not change.
+
+## 196. Exports re-read clean · _v0.9.0 (services/spectra/export.py jdx, csv, _header, _xydata, _pairs, _block)
+
+JCAMP-DX 5.01 out: AFFN `##XYDATA=(X++(Y..Y))` when x is evenly spaced, XYPOINTS otherwise, PEAK TABLE for sticks; a spectrum with peaks becomes a LINK file with a second PEAK TABLE block and `##$FORMCHEM PEAK LABELS`. AFFN because every reader reads it and size is not the point of an export. Every written file re-reads with an empty report. CSV is every point in display order with a header row naming the axes. The imaginary channel is not written, and the export report says so.
+
+## 197. The ten agent tools of 0.9.0 · _v0.9.0 (routers/mcp.py t_draw_from_name, t_name_structure, t_predict_nmr, t_predict_spectrum, t_open_spectrum, t_spectrum_data, t_spectrum_peaks, t_spectrum_pick_peaks, t_spectrum_integrate, t_spectrum_export, _snapshot, _spectrum, _number_arg, _mark_line, _refused; MUTATING; INSTRUCTIONS, WORKFLOW, GUIDE)
+
+42 tools became 52. `draw_from_name` reads the name with the registered engine and draws through `_draw`, the 0.8.0 path, so placement, the write result and the one undo step are the same as `draw_from_smiles`; its answer adds `read` (method, confidence, engine, version, warnings) and refuses an unread name before any drawing is made. `name_structure` calls the route's `name_mol`. `predict_nmr` reads; `predict_spectrum` applies `spectrum_ops` with `_apply`. `predict_nmr` and the spectrum tools resolve the drawing with `_doc_id` (the window's active drawing), like the 0.8.0 tools, rather than the older `_drawing`. `open_spectrum` writes text or base64 into the Imports folder, as the upload route does, and opens it with `STORE.open`; it opens a new drawing because inserting needs the window's media upload. `spectrum_parse` was proposed and left out: `open_spectrum` covers what an agent needs. `spectrum_data` caps points at 2000 (default 200), enough to read a spectrum without flooding the context. The writing tools (`draw_from_name`, `predict_spectrum`, `open_spectrum`, `spectrum_pick_peaks`, `spectrum_integrate`) joined `MUTATING`, so they pass the consent gate. `./formchem agents sync` regenerated the harness tools reference and the manifest.
+
+## 198. numpy is pinned, and FormChem's own data is described · _v0.9.0 (backend/requirements.txt, requirements_macos.txt; NOTICE.md)
+
+numpy was already installed as RDKit's dependency (2.5.5 in the venv) and used by the layout scorer, but the spectra and NMR packages import it directly, so a future RDKit that drops it must not silently break them: `numpy==2.5.5` follows the rdkit pin in both requirement files. NOTICE.md lists it (`BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0`, for the OpenBLAS, LAPACK and GCC runtime libraries its wheels carry), and a short section says the names dictionary, the NMR increments and the reference shifts are FormChem's own, with NMRShiftDB2 not used. THIRD-PARTY-NOTICES.txt already held numpy and did not change; `setup/notices.py --check` passes.
+
+## 199. 3D is one package with fixed defaults · _v0.10.0 (services/three_d/__init__.py ThreeDError, EMBED, METHODS, MMFF_ELEMENTS, SEED, MAX_ITERS, GRADIENT, MAX_ATOMS, COORD_DIGITS, ENERGY_DIGITS, TEMPERATURE, method_of, rounded)
+
+Everything 3D in the engine lives in `services/three_d/`, pure functions over a fragment dict and RDKit, so the routes, the MCP tools and the importers call the same code and nothing there knows about HTTP. `ThreeDError(message, status)` carries the HTTP status the route should answer (422 by default, 409 for a stale conformer, 413 for a file over a limit). The defaults are fixed and reported back in every answer: embedding `ETKDGv3`, seed 61453 (the same drawing always builds the same geometry, so a person and an agent see the same numbers), 2000 steps, an RMS gradient target of 0.01 kcal/mol/Å (the clean-room default), at most 1500 atoms with hydrogens, coordinates to 4 decimals and energies to 4, Boltzmann weights at 298.15 K. `method_of` accepts the three force field names in any case and refuses anything else with the list, so `"mmff94"` from an agent works and `"xtb"` is a clear 422 rather than a silent MMFF94.
+
+## 200. Atoms are named by fragment id, hydrogens by index · _v0.10.0 (services/three_d/molecule.py Model, prepare, _labels, heavy_labels, split, parent_of, find_fragment, find_conformer, H_TAG, X_TAG)
+
+`prepare` reuses `perceive.prepare` (fragment atoms in sorted id order, abbreviations expanded, the same molecule the 2D chemistry sees) and adds hydrogens with `Chem.AddHs`, so the heavy atoms keep the order of the 2D perception and each atom's hydrogens follow in AddHs order. `Model.labels` names every atom: the fragment atom id (`a1`), a hydrogen as `a1:h0`, `a1:h1`, and an atom of an expanded abbreviation as `a5:x0`. One scheme serves `conformers.h`, the measure route, the charges route, the molblock atom map and the window's measurements, so a label written by one side reads on the other. Rebuilding from the same fragment gives the same order, so a stored conformer always loads; a mismatch (the hydrogen count changed under it) is a 409 asking to build again. Atoms that are labels, R-groups or attachment points are refused with their ids: 3D needs real atoms.
+
+## 201. Abbreviations are expanded for 3D and kept under expanded · _v0.10.0 (services/three_d/molecule.py positions, add_conformer, load, record, _point; services/model.py Conformer, ScanPoint; docs/FORMAT.md)
+
+An atom drawn as OMe, Ph or Boc is expanded for 3D, because a force field needs every atom. `coords[aid]` holds the attachment atom, and the abbreviation's other atoms (heavy first, then hydrogens, in molecule order) go into `expanded: { aid: [[x, y, z], ...] }`, so the fragment's own atoms keep one position each and the abbreviation stays an abbreviation in 2D. `record` writes the conformer dict (`id` with prefix `c`, `coords`, `h`, `expanded`, `energy`, `method`, `converged`); an embed-only conformer has no `energy` (method `ETKDG`), because an ETKDG geometry has no force-field energy of its own. The integration added `expanded`, `scan` and the `c` prefix to FORMAT.md and typed them in `model.py` (`Conformer`, `ScanPoint`); readers keep unknown keys anyway.
+
+## 202. MMFF94 first, UFF with a reason · _v0.10.0 (services/three_d/forcefield.py Field, setup, mmff_properties, _missing_mmff, fallback_warning; services/three_d/__init__.py MMFF_ELEMENTS)
+
+`setup` builds MMFF94 or MMFF94s properties; when RDKit has no MMFF parameters for the molecule it falls back to UFF and says why, naming the elements MMFF94 does not cover (`Universal force field used: no MMFF94 parameters for Sn.`) or that it could not type every atom. `Field` keeps the asked method, the method used and the reason, so the answer's `method` is always what actually ran and `fallback` says what changed. The warning code is `uff_fallback`; the window shows it in the status line, keyed as a nested sentence.
+
+## 203. Converged means the RMS gradient · _v0.10.0 (services/three_d/forcefield.py run, rms_gradient, energy, minimise, optimise_all, PASSES, TIGHT; services/three_d/minimise.py minimise_conformer)
+
+RDKit's minimiser stops on a relative energy change and reports no iteration count, so its own "converged" says little about the geometry. `run` minimises, measures the RMS gradient over all 3N components, and if it is above the target restarts with tight tolerances (`TIGHT`), up to `PASSES` passes or `max_iters`; `converged` means the RMS gradient reached the target, and `passes` counts the restarts. `minimise_conformer` loads the stored conformer, runs that, verifies the stereo again, and replaces the conformer in one transaction; a fragment with no conformer is built first in the same transaction (`built: true`). Ethanol: 4.5513 to -1.5171 kcal/mol, RMS gradient 0.000285.
+
+## 204. Build keeps the drawn stereo and checks it from 3D · _v0.10.0 (services/three_d/build.py build, build_model, embed, embed_params, ATTEMPTS; services/three_d/verify.py expected, from_3d, stereo, stereo_warnings, enhanced_note, _cip)
+
+The chiral tags come from the drawing through `perceive.prepare` (wedges) and the bond stereo from the 2D coordinates, so ETKDGv3 embeds the drawn configuration. Verification does not trust that: `expected` takes the CIP labels of the 2D molecule, `from_3d` assigns stereo from the 3D coordinates (`AssignStereochemistryFrom3D`) and labels again with the new CIP labeller, and `stereo` compares them by atom and bond id. A lost label makes `build` try seed+1 and seed+2 (`embed_retry`), and the report keeps `expected`, `found` and `lost`, so the answer says plainly whether the 3D structure is the drawn one. Unspecified centres get `unspecified_stereo` with their ids (the clean-room notice). Enhanced stereo builds the drawn member and `enhanced_note` names the AND and OR groups. Taxol (62 heavy atoms, 11 wedges): 11 of 11 labels kept on the first seed, 1.48 s.
+
+## 205. Clashes are heavy pairs more than two bonds apart · _v0.10.0 (services/three_d/verify.py clashes, CLASH_SCALE)
+
+A clash is a pair of heavy atoms more than two bonds apart (topological distance from `GetDistanceMatrix`, so 1-2 and 1-3 pairs never count) closer than 0.65 times the sum of their van der Waals radii. Hydrogens are left out because a minimised geometry often brings them near each other without anything being wrong. At most 50 pairs are reported, each with the distance and the limit. The numbers were chosen to give 0 for Taxol, folate and the test peptides after minimisation and to flag a knotted embedding.
+
+## 206. Conformers: pruned by heavy-atom RMSD, kept in a window, weighted by Boltzmann · _v0.10.0 (services/three_d/conformers.py search, _embed_all, _best_rms, populations, MAX_N, MAX_KEEP, THREADS)
+
+`search` embeds `n` conformers (1 to 1000) with ETKDGv3 and RDKit's symmetry-aware heavy-atom RMS pruning on two threads (`THREADS`, so one CPU stays free for the window), retrying with random starting coordinates when none embed, minimises them all (`optimise_all`), sorts by energy, and keeps those within `window` kcal/mol of the lowest, at most `keep` (1 to 200), pruning again by symmetry-aware heavy-atom RMSD (`_best_rms`, default 0.5 Å) because minimisation brings embeddings together. Pruning by heavy atoms means ethanol gives one conformer: its rotamers differ only in hydrogens, and a list of hydrogen rotamers is noise to a chemist. Conformers whose minimisation changed the drawn stereo are left out (`stereo_dropped`). `populations` are Boltzmann fractions at 298.15 K over the kept set, so they sum to 1 and say how the kept set divides, not the whole landscape. One transaction replaces `conformers` and shows the lowest. Taxol with n=10 took 9.6 s and kept 4.
+
+## 207. The scan restarts every angle from one geometry · _v0.10.0 (services/three_d/scan.py run, angles, chain, _constrained, MAX_POINTS, RESTRAINT, SCAN_ITERS, PASSES)
+
+`chain` checks that the four atoms are bonded in a row (hydrogens `a1:h0` allowed at the ends); a ring bond in the middle is allowed with a warning (`ring_bond`), since the restraint does the work. At each angle the dihedral is set, held by a torsion restraint (force constant 1e4) and everything else minimised in two tight passes; the energy reported is the plain force field's at that geometry, without the restraint term. Every angle restarts from the same starting geometry: a sequential scan, each angle starting from the last, got stuck in a higher basin for butane at -60 degrees and gave an asymmetric profile. Butane at 15 degree steps: minima at 180 and plus or minus 60 (0.84 kcal/mol), maximum at 0 (5.21 kcal/mol), symmetric. At most 361 points. The scan reads only, unless `store` keeps one conformer per angle (with `scan: { atoms, angle }`) in one transaction and shows the lowest point.
+
+## 208. Measurements and partial charges · _v0.10.0 (services/three_d/measure.py point, distance, angle, dihedral, measure, charges, UNIT, KINDS, CHARGE_KINDS, ESP_LABEL)
+
+Two labels give a distance (Å, 3 decimals), three an angle and four a signed dihedral (IUPAC sign, -180 to 180, 1 decimal); the window computes the same formulas from what it shows, so the numbers agree. `charges` gives Gasteiger-Marsili charges per atom and per hydrogen (`h`), with the range, for ESP colouring; `mmff` charges fall back to Gasteiger with a warning when MMFF94 has no parameters. The route always says `label: "approximate, from empirical charges"`, because a surface coloured by empirical charges is a picture of a trend, not a computed potential, and the legend must not suggest more.
+
+## 209. 3D export writes every hydrogen and an atom map · _v0.10.0 (services/three_d/export.py write, atom_map, _chosen, _data, FORMATS)
+
+`write` loads the chosen conformer (or all) and writes MOL V2000 with every hydrogen explicit (V3000 above 999 atoms or when asked), SD with one record per conformer and the data fields `FORMCHEM_ENERGY`, `FORMCHEM_METHOD` and `FORMCHEM_CONFORMER`, PDB with MODEL records, or XYZ frames. Hydrogens are written, because a 3D file without them cannot be read back as the same geometry. `atom_map` answers with the label of each atom of the block (`atoms[i].id`, with `parent` for a hydrogen or an abbreviation atom), which is how the window maps a picked 3D atom to a fragment atom.
+
+## 210. Stale conformers are dropped inside apply · _v0.10.0 (services/three_d/stale.py signature, watch, settle, _touched, _norm, ATOM_FIELDS, BOND_FIELDS, DEFAULTS, DIRECTED, OWN; services/store.py apply_now)
+
+FORMAT.md says a conformer is valid only for the graph it was made from. `signature` covers what changes the molecule: atom element, charge, isotope, radical, hydrogens, label, expansion, generic, rgroup and query, and bond ends, order, stereo, query and topology (plain bond ends unordered, wedge, hash and hollow ends ordered, because flipping a wedge's narrow end changes the centre). Position, label side, colour, notes, map numbers, lone pairs, double-bond placement, bold or dashed and data fields keep conformers. `watch` notes the signatures of the fragments a transaction touches before it applies, and `settle` compares after: changed ones with conformers get `conformers` and `conformer` unset ops appended to the same recorded transaction, so undo restores the conformers with the old graph and the live `tx` message carries the drop. A transaction that sets `conformers` or `conformer` itself is trusted (the 3D routes, paste). The hook is two lines in `Store.apply_now`; nothing else is wired. The window applies the same rule to its own transactions (frontend log), so both sides agree without a resync.
+
+## 211. Routes snapshot, compute in a thread, then check the graph · _v0.10.0 (routers/three_d.py _snapshot, _run, _unchanged, commit, _replace_ops, _fragment, _number, _method, _brief, GUARD)
+
+A build or a conformer search takes seconds, so the routes copy the drawing under the lock, compute in `asyncio.to_thread` without the lock, and before committing compare the fragment's graph signature with the one they started from (`_unchanged`, 409 "The structure changed while 3D was being computed" if it moved). The check and the apply are not atomic: an edit landing between them would be followed by a conformer set that the stale rule trusts. A `Store.apply` that takes a precondition would close it; logged, not built. Every changing route needs the window key (`GUARD`); the reading routes (`measure`, `charges`, `molblock`, `structure`) are open to the local window. Numbers are clamped and checked by `_number` with the limits in the answer text. One transaction per command, labelled "Build 3D", "Conformers", "Minimise", "Dihedral scan", "Show conformer", "Open 3D structure" and "Extract ligand".
+
+## 212. FormChem reads PDB and mmCIF itself · _v0.10.0 (services/three_d/structure.py Atom, Structure, detect, decode, element_of, EXTENSIONS, MIMES; services/three_d/pdb.py parse, _atom, MAX_ATOMS; services/three_d/mmcif.py tokens, read_blocks, _loop, _macromolecular, _small_molecule, _cell, parse)
+
+RDKit's PDB reader drops HETNAM, HELIX, SHEET and the model count, and RDKit 2025.09 has no CIF reader. gemmi would do both but is MPL-2.0 and was not vetted, so `pdb.py` is an original fixed-column reader (ATOM, HETATM, MODEL, HETNAM, HELIX, SHEET, CONECT, TITLE, the id code) and `mmcif.py` an original tokenizer and `atom_site` reader (auth columns preferred, label columns as fallback, models, altlocs, `chem_comp` names, `struct_conf` helices, `struct_sheet_range`, text fields and quoted values). A small-molecule CIF with fractional coordinates is orthogonalised from its cell; symmetry mates are not generated, with a warning. `detect` decides the format from the bytes, then the name, then what the caller said. 1DRF reads in 37 ms; a 1.6 MB entry with 18448 atoms in 1.15 s.
+
+## 213. The summary sorts residues and picks the primary ligand · _v0.10.0 (services/three_d/structure.py summary, primary, residues, is_polymer, residue_id, ligand_key, find_ligand, PROTEIN, NUCLEIC, WATER, ADDITIVES)
+
+Polymer residues are the 20 standard amino acids with their common variants (MSE, SEP, TPO, PTR, HID, HIE, HIP, CYX and the like) and nucleotides; waters are HOH, WAT, DOD, H2O, TIP, TIP3 and SOL; everything else is a ligand, flagged `ion` (one non-organic heavy atom) or `additive` (GOL, EDO, SO4, PEG and similar). The primary ligand is the largest that is neither, so a crystallisation sulfate never takes the focus from the drug. Ligands are keyed `chain:het:number` (with an insertion code when there is one), which is the key `focus.residue`, `extract-ligand` and the window's Ligand dialog use. The summary per chain carries the residue count, the one-letter sequence and the first and last numbers.
+
+## 214. Ligand bond orders: a template first, then perception · _v0.10.0 (services/three_d/ligand.py TEMPLATES, bond_orders, extract, _block, _from_lengths, _protonate, _planar, LENGTH_RULES, RING_LENGTHS, RING_MEAN, PLANAR_RMS, CARBONYL_MAX, MAX_TAUTOMER_TRIES)
+
+PDB files carry no bond orders. `TEMPLATES` holds SMILES for 30 common het codes (nucleotides, cofactors, folate and methotrexate, sugars, buffers and cryo additives), written for FormChem from chemistry knowledge; no Chemical Component Dictionary file was read (it is CC0 if a larger table is wanted later). A template is applied with `AssignBondOrdersFromTemplate` (`bonds: "template"`). Otherwise, with hydrogens present, `DetermineBondOrders` tries total charges 0, -1, 1, -2, 2; without them, bond lengths decide: planar SSSR rings with ring bonds of 1.22 to 1.55 Å and a mean of at most 1.44 Å are aromatic, exocyclic double bonds only from aromatic atoms to terminal O or S, a carbonyl rule for trigonal carbons with a terminal oxygen, a valence clamp, then a lactam-first search over ring NH positions until RDKit can kekulise. Every perceived result carries `bond_orders_inferred`, so the window and agents say so. Folate from 1DRF perceived this way matched folic acid exactly before FOL joined the table. The ligand's atoms come through `MolFromPDBBlock` on a rebuilt HETATM block with its CONECT records; with none, bonds by proximity and a `proximity_bonds` warning. Stereo is read from the 3D coordinates, a 2D layout is generated, and the coordinates (with hydrogens added and placed) become the fragment's one conformer, method `file`.
+
+## 215. 3D SD and MOL records keep their coordinates · _v0.10.0 (services/three_d/molfile3d.py read, record, _is_3d, _energy, SOURCE, MAX_RECORDS, GAP; services/three_d/document.py mdl_with_conformers, _has_depth, MDL_SUFFIXES)
+
+A record whose z coordinates are not all zero is 3D: `record` reads it with RDKit, takes stereo from the 3D coordinates, lays it out in 2D for the page and keeps the file's positions as the fragment's one conformer (method `file`, an energy only when the record names one in a data field). The 2D reader would flatten the coordinates (`coordinates_flattened`), which is right for a drawing program and wrong for a conformer file. The importers ask `mdl_with_conformers` first for `.mol`, `.mdl`, `.sdf` and `.sd`: it looks at the first record only and reads the file this way when it is 3D and holds at most 200 records; otherwise the 2D reader runs as before. The report says `conformers_kept` (info).
+
+## 216. A structure file becomes a model3d over its kept bytes · _v0.10.0 (services/three_d/readers.py read, model_object, used_ids, MODEL_SIZE; routers/three_d.py parse_3d, open_3d, open_bytes, _payload, _place_ops, _page, _public, structure_3d, _media_source; services/store.py add_file_media; services/package.py EXT_BY_MIME)
+
+`open` takes multipart or JSON (text or base64). PDB and mmCIF default to `as=model`: the bytes are kept unchanged as media (`chemical/x-pdb`, `chemical/x-mmcif`; SD and MOL `chemical/x-mdl-sdfile` and `chemical/x-mdl-molfile` when opened as a model) through `Store.add_file_media`, and one transaction sets `media[id]`, adds the model3d object (`display` `cartoon` for a protein, else `ballstick`; `focus` the primary ligand with `residue`) and puts it on the page. Keeping the bytes means saving writes `media/[id].pdb` into the package (`EXT_BY_MIME`), Export gives the original file back, and nothing the reader does not understand is lost. SD and MOL default to `as=fragment` (entry 215). `parse` reads without touching a drawing, for previews and agents. `structure` answers the summary of a model3d's media, or for a fragment source its atom and conformer counts.
+
+## 217. PDB and mmCIF through Open and Import · _v0.10.0 (services/three_d/document.py drawing, open_file, for_insert, read, describe, report_items, media_entry, StructureFileError, READ_LIMIT, MODEL_FORMATS; services/importers.py MODELS_3D, is_model3d, import_model3d, _with_conformers)
+
+File Open of `.pdb`, `.ent`, `.cif` or `.mmcif` goes the JCAMP-DX way: `document.drawing` makes a new drawing with one model3d over the kept bytes and an import report line naming what was found ("PDB model placed as a 3D object: ..."). Import goes through `for_insert`, which hands the window the object and the bytes as a data URI for the clipboard insert. `describe` joins counts and plural pieces with "; ", which no translation key can match, so the model summary stays English inside a translated sentence; sending the parts as fields would fix it (key10). Files are read up to 64 MB.
+
+## 218. The media route takes structure files · _v0.10.0 (services/store.py _structure_file, add_media; services/three_d/structure.py detect)
+
+The window's Import of a PDB sends the bytes back through `POST .../media`, which knew pictures and JCAMP-DX only and answered 415 ("the drawing did not accept it"); so would a paste of a PDB model into another drawing. `add_media` now tries `structure.detect` after the picture and spectrum checks and records the structure mime; other text is still refused, with a message that lists the structure files.
+
+## 219. Agent calls commit 3D changes under their own name · _v0.10.0 (routers/three_d.py AgentCall, _agent, _origin, _client, commit)
+
+The MCP tools call the route functions in process rather than repeating them. To commit with origin `agent` and the agent's name (Agent activity, attribution, Stop), the body carries `_agent: AgentCall(name)`, an instance of a class that JSON can never produce, so an HTTP caller cannot pose as an agent by sending a field. `commit` reads it and applies with `"agent"`, the name and no window client.
+
+## 220. The eight agent tools of 0.10.0 · _v0.10.0 (routers/mcp.py t_build_3d, t_conformers_3d, t_minimise_3d, t_scan_dihedral, t_measure_3d, t_open_3d_structure, t_extract_ligand, t_export_3d, _three_d, _fragment_of, _three_d_body, _stereo_text, _warn_text, _FRAG, _FF; MUTATING, _mutating; INSTRUCTIONS, WORKFLOW, GUIDE)
+
+52 tools became 60. `_three_d` calls a route function with the agent marker and turns an HTTPException into a ToolError with the route's sentence. `_fragment_of` accepts a fragment id or a model3d bound to one, and takes the only structure when there is one, as the 0.9.0 tools do. The answers lead with what an agent needs to check its work: energy with method and engine, `all 11 stereo labels kept (...)` or what was lost, clashes, relative energies with populations, the scan's minimum and barrier, the ligand's SMILES and whether its bond orders were inferred. Classification: `build_3d`, `conformers_3d`, `minimise_3d`, `open_3d_structure` and `extract_ligand` are always gated; `scan_dihedral` only with `store: true` (a read-only scan changes nothing); `export_3d` only with an `output` outside the temporary folder, and never over an existing file; `measure_3d` reads. `open_3d_structure` places the model at `agent_out.free_spot` and closes a drawing it created when reading fails. `export_3d` writes through `export.write` directly, without a route, because it changes nothing. `./formchem agents sync` regenerated the tools reference and the manifest.
+
+## 221. The notices read nested npm packages by their lock path · _v0.10.0 (setup/notices.py; THIRD-PARTY-NOTICES.txt; NOTICE.md)
+
+3dmol brings `pako` twice (2.2.0 at the top and 1.0.11 under `upng-js`). The notices tool sorted packages by a tuple whose second item was a dict, so two equal names fell through to comparing dicts and crashed, and it read the top-level folder's licence for the nested one. It now sorts by name and lock path and reads each package from its own path. THIRD-PARTY-NOTICES.txt was regenerated offline (six npm sections added); NOTICE.md lists 3Dmol.js with GLmol (dual MIT or LGPL-3, taken under MIT), Three.js and jQuery (MIT) as its LICENSE names them.
+
+## 222. Engine 3D texts the window shows are keys; some stay agent text · _v0.10.0 (setup/i18n_tool.py NOT_TEXT; frontend/src/i18n/keys/part15.json)
+
+The engine's build and minimise warnings, route errors, file reading errors, import report items and ligand errors that reach the window are keyed in part15 as they render, with nested pattern keys (`Universal force field used: {0}.` wraps `no {0} parameters for {1}`). Left English on purpose: the ligand warnings and charge warnings the window does not show, the measure route's errors (the window measures itself), validation errors of fields the window always sends right, and every MCP text, which agents read. `NOT_TEXT` gained the save filter names, method ids, glTF accessor types, water residue names, unit readouts and the command results that only go back to agents. Two dead keys stay where they are (part01:8, the 0.10.0 placeholder text, and part13:187, the 0.9.0 media refusal), because removing them would shift indices in 25 languages.
+
## Not verified at 0.7.0
No macOS build was made: the one-folder freeze with Python 3.14 (in particular that `fc_flatten_engine` finds and replaces `Python.framework` and that `otool` finds nothing still linking it), the signed and notarized build, the launch time against the old 30 seconds, and multiprocessing under the frozen engine. At a2c81f6 `build_app`'s own freeze step does not pass `--collect-submodules fontTools`, which `setup/freeze_backend` does; a desktop app built with `./build_app` may lack fontTools' table modules, which would turn the font subsets off. EPS was not rendered (no Ghostscript). CDXML and CDX files made by the reference suite itself were never read; only Indigo-written files were. `formchem.bat` and `setup/convert.bat` were not run (no Windows here).
@@ -879,3 +1184,11 @@ No macOS build was made: the one-folder freeze with Python 3.14 (in particular t
## Not verified at 0.8.0
No real Claude Code, Codex, Cursor or Antigravity client was connected: the tools ran through `setup/mcp_stdio.py`, raw HTTP and curl, with the window in headless Chromium. Clients that cannot show image content were not tried; they still get the text and `structuredContent`. The desktop window (Tauri, WKWebView on macOS) never answered a `render` call; the PNG path avoids requestAnimationFrame, so a minimised window should still answer, untried. `formchem.bat agents token` was not run. `batch_convert` on 10,000 records was not timed through MCP (it runs the CLI's code in a worker thread). E and Z on bonds with large or crossing substituent trees were tried only on small chains. The 1.5 s attribution window can credit an agent with a person's edit made in that moment; it was reasoned about, not provoked.
+
+## Not verified at 0.9.0
+
+No macOS build: the frozen engine carrying `data/names/` and the spectra and NMR packages (numpy is already frozen with RDKit, but nobody ran it). The MCP tools ran in process through a TestClient portal as an in-app agent, not through a real client over HTTP or stdio, so the consent prompt for the five writing tools was reasoned about, not clicked. The JCAMP-DX corpus is synthetic by design (clean room); no vendor file was read, so quirks beyond the published rules (for example a Bruker `$OFFSET`-only shift reference) are untested. The NMR reference shifts are from general knowledge, about 0.05 ppm for 1H and 0.5 ppm for 13C, not a cited data set. The increment method has not had the freedom-to-operate review the plan asks for on NMR prediction methods (spec C 9 item 3); additive increments are textbook methods, but counsel should confirm. Names were checked against a corpus of 50 systematic and 20 trivial names plus 5 refusals (all passed) and the 629 dictionary structures; peptide and sugar systematic names, hydro prefixes, spiro and bridged parents were not attempted. The JCAMP-DX reader label reads `app.__version__`, so it says 0.8.0 until the release commit moves the version sites.
+
+## Not verified at 0.10.0
+
+No macOS build: the frozen engine with the `three_d` package (RDKit's force fields and ETKDG were already frozen, but nobody ran a 3D build in the app). The MCP tools ran in process as an in-app agent, not through a real client, so the consent prompt for the five always-gated tools was reasoned about, not clicked. MMFF94s and UFF ran (UFF on a stannane and on ethanol) but were not compared with reference energies. mmCIF was read from hand-written files and the engine path only; a large real mmCIF entry was not tried. `as=file` exports were checked for SDF and PDB; XYZ and V3000 only through the service and the MCP tool. A 14-membered lactone gave 10 conformers from 47 embedded; macrocycle timing was not measured. Large PDB files through File > Import (base64 to the window and back, under the 64 MB read and 50 MB upload limits) were not tried. The race in entry 211 was reasoned about, not provoked. The ligand template table was written from knowledge; the templates exercised (BEN, ACT, FOL) matched their ligands, the others were not compared with a reference. 1DRF in the engine's corpus was copied from a local test folder of another project (the PDB data file only, wwPDB data, CC0); it lives outside the repository.
diff --git a/backend/app/__init__.py b/backend/app/__init__.py
index 777f190d..61fb31ca 100644
--- a/backend/app/__init__.py
+++ b/backend/app/__init__.py
@@ -1 +1 @@
-__version__ = "0.8.0"
+__version__ = "0.10.0"
diff --git a/backend/app/data/names/amino-acids.json b/backend/app/data/names/amino-acids.json
new file mode 100644
index 00000000..6a6d58de
--- /dev/null
+++ b/backend/app/data/names/amino-acids.json
@@ -0,0 +1,54 @@
+{
+ "source": "FormChem",
+ "licence": "Apache-2.0",
+ "category": "amino-acids",
+ "method": "Names and SMILES written for FormChem; InChIKeys computed with RDKit 2025.09.3 (standard InChI). A name without D- or L- means the L amino acid.",
+ "entries": [
+ {"name": "L-alanine", "smiles": "C[C@H](N)C(=O)O", "inchikey": "QNAYBMKLOCPYGJ-REOHCLBHSA-N", "synonyms": ["alanine", "(S)-alanine"]},
+ {"name": "L-arginine", "smiles": "N=C(N)NCCC[C@H](N)C(=O)O", "inchikey": "ODKSFYDXXFIFQN-BYPYZUCNSA-N", "synonyms": ["arginine"]},
+ {"name": "L-asparagine", "smiles": "NC(=O)C[C@H](N)C(=O)O", "inchikey": "DCXYFEDJOCDNAF-REOHCLBHSA-N", "synonyms": ["asparagine"]},
+ {"name": "L-aspartic acid", "smiles": "N[C@@H](CC(=O)O)C(=O)O", "inchikey": "CKLJMWTZIZZHCS-REOHCLBHSA-N", "synonyms": ["aspartic acid"]},
+ {"name": "L-cysteine", "smiles": "N[C@@H](CS)C(=O)O", "inchikey": "XUJNEKJLAYXESH-REOHCLBHSA-N", "synonyms": ["cysteine"]},
+ {"name": "L-glutamic acid", "smiles": "N[C@@H](CCC(=O)O)C(=O)O", "inchikey": "WHUUTDBJXJRKMK-VKHMYHEASA-N", "synonyms": ["glutamic acid"]},
+ {"name": "L-glutamine", "smiles": "NC(=O)CC[C@H](N)C(=O)O", "inchikey": "ZDXPYRJPNDTMRX-VKHMYHEASA-N", "synonyms": ["glutamine"]},
+ {"name": "glycine", "smiles": "NCC(=O)O", "inchikey": "DHMQDGOQFOQNFH-UHFFFAOYSA-N", "synonyms": ["aminoacetic acid"]},
+ {"name": "L-histidine", "smiles": "N[C@@H](Cc1c[nH]cn1)C(=O)O", "inchikey": "HNDVDQJCIGZPNO-YFKPBYRVSA-N", "synonyms": ["histidine"]},
+ {"name": "L-isoleucine", "smiles": "CC[C@H](C)[C@H](N)C(=O)O", "inchikey": "AGPKZVBTJJNPAG-WHFBIAKZSA-N", "synonyms": ["isoleucine"]},
+ {"name": "L-leucine", "smiles": "CC(C)C[C@H](N)C(=O)O", "inchikey": "ROHFNLRQFUQHCH-YFKPBYRVSA-N", "synonyms": ["leucine"]},
+ {"name": "L-lysine", "smiles": "NCCCC[C@H](N)C(=O)O", "inchikey": "KDXKERNSBIXSRK-YFKPBYRVSA-N", "synonyms": ["lysine"]},
+ {"name": "L-methionine", "smiles": "CSCC[C@H](N)C(=O)O", "inchikey": "FFEARJCKVFRZRR-BYPYZUCNSA-N", "synonyms": ["methionine"]},
+ {"name": "L-phenylalanine", "smiles": "N[C@@H](Cc1ccccc1)C(=O)O", "inchikey": "COLNVLDHVKWLRT-QMMMGPOBSA-N", "synonyms": ["phenylalanine"]},
+ {"name": "L-proline", "smiles": "O=C(O)[C@@H]1CCCN1", "inchikey": "ONIBWKKTOPOVIA-BYPYZUCNSA-N", "synonyms": ["proline"]},
+ {"name": "L-serine", "smiles": "N[C@@H](CO)C(=O)O", "inchikey": "MTCFGRXMJLQNBG-REOHCLBHSA-N", "synonyms": ["serine"]},
+ {"name": "L-threonine", "smiles": "C[C@@H](O)[C@H](N)C(=O)O", "inchikey": "AYFVYJQAPQTCCC-GBXIJSLDSA-N", "synonyms": ["threonine"]},
+ {"name": "L-tryptophan", "smiles": "N[C@@H](Cc1c[nH]c2ccccc12)C(=O)O", "inchikey": "QIVBCDIJIAJPQS-VIFPVBQESA-N", "synonyms": ["tryptophan"]},
+ {"name": "L-tyrosine", "smiles": "N[C@@H](Cc1ccc(O)cc1)C(=O)O", "inchikey": "OUYCCCASQSFEME-QMMMGPOBSA-N", "synonyms": ["tyrosine"]},
+ {"name": "L-valine", "smiles": "CC(C)[C@H](N)C(=O)O", "inchikey": "KZSNJWFQEVHDMF-BYPYZUCNSA-N", "synonyms": ["valine"]},
+ {"name": "D-alanine", "smiles": "C[C@@H](N)C(=O)O", "inchikey": "QNAYBMKLOCPYGJ-UWTATZPHSA-N", "synonyms": ["(R)-alanine"]},
+ {"name": "D-serine", "smiles": "N[C@H](CO)C(=O)O", "inchikey": "MTCFGRXMJLQNBG-UWTATZPHSA-N", "synonyms": []},
+ {"name": "D-phenylalanine", "smiles": "N[C@H](Cc1ccccc1)C(=O)O", "inchikey": "COLNVLDHVKWLRT-MRVPVSSYSA-N", "synonyms": []},
+ {"name": "D-proline", "smiles": "O=C(O)[C@H]1CCCN1", "inchikey": "ONIBWKKTOPOVIA-SCSAIBSYSA-N", "synonyms": []},
+ {"name": "L-selenocysteine", "smiles": "N[C@@H](C[SeH])C(=O)O", "inchikey": "ZKZBPNGNEQAJSX-REOHCLBHSA-N", "synonyms": ["selenocysteine"]},
+ {"name": "L-ornithine", "smiles": "NCCC[C@H](N)C(=O)O", "inchikey": "AHLPHDHHMVZTML-BYPYZUCNSA-N", "synonyms": ["ornithine"]},
+ {"name": "L-citrulline", "smiles": "NC(=O)NCCC[C@H](N)C(=O)O", "inchikey": "RHGKLRLOHDJJDR-BYPYZUCNSA-N", "synonyms": ["citrulline"]},
+ {"name": "L-cystine", "smiles": "N[C@@H](CSSC[C@H](N)C(=O)O)C(=O)O", "inchikey": "LEVWYRKDKASIDU-IMJSIDKUSA-N", "synonyms": ["cystine"]},
+ {"name": "L-homocysteine", "smiles": "N[C@@H](CCS)C(=O)O", "inchikey": "FFFHZYDWPBMWHY-VKHMYHEASA-N", "synonyms": ["homocysteine"]},
+ {"name": "trans-4-hydroxy-L-proline", "smiles": "O=C(O)[C@@H]1C[C@@H](O)CN1", "inchikey": "PMMYEEVYMWASQN-DMTCNVIQSA-N", "synonyms": ["hydroxyproline", "L-hydroxyproline"]},
+ {"name": "levodopa", "smiles": "N[C@@H](Cc1ccc(O)c(O)c1)C(=O)O", "inchikey": "WTDRDQBEARUVNC-LURJTMIESA-N", "synonyms": ["L-DOPA", "L-dopa"]},
+ {"name": "beta-alanine", "smiles": "NCCC(=O)O", "inchikey": "UCMIRNVEIXFBKS-UHFFFAOYSA-N", "synonyms": ["β-alanine"]},
+ {"name": "gamma-aminobutyric acid", "smiles": "NCCCC(=O)O", "inchikey": "BTCSSZJGUNDROE-UHFFFAOYSA-N", "synonyms": ["GABA", "γ-aminobutyric acid"]},
+ {"name": "taurine", "smiles": "NCCS(=O)(=O)O", "inchikey": "XOAAWQZATWQOTB-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "sarcosine", "smiles": "CNCC(=O)O", "inchikey": "FSYKKLYZXJSNPZ-UHFFFAOYSA-N", "synonyms": ["N-methylglycine"]},
+ {"name": "creatine", "smiles": "CN(CC(=O)O)C(=N)N", "inchikey": "CVSVTCORWBXHQV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "creatinine", "smiles": "CN1CC(=O)N=C1N", "inchikey": "DDRJAANPRJIHGJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "L-carnitine", "smiles": "C[N+](C)(C)C[C@H](O)CC(=O)[O-]", "inchikey": "PHIQHXFUZVPYII-ZCFIWIBFSA-N", "synonyms": ["carnitine", "levocarnitine"]},
+ {"name": "choline", "smiles": "C[N+](C)(C)CCO", "inchikey": "OEYIOHPDSNJKLS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "betaine", "smiles": "C[N+](C)(C)CC(=O)[O-]", "inchikey": "KWIUHFFTVRNATP-UHFFFAOYSA-N", "synonyms": ["glycine betaine", "trimethylglycine"]},
+ {"name": "L-theanine", "smiles": "CCNC(=O)CC[C@H](N)C(=O)O", "inchikey": "DATAGRPVKZEWHA-YFKPBYRVSA-N", "synonyms": ["theanine"]},
+ {"name": "glutathione", "smiles": "N[C@@H](CCC(=O)N[C@@H](CS)C(=O)NCC(=O)O)C(=O)O", "inchikey": "RWSXRVCMGQZWBV-WDSKDSINSA-N", "synonyms": ["GSH", "reduced glutathione"]},
+ {"name": "carnosine", "smiles": "NCCC(=O)N[C@@H](Cc1c[nH]cn1)C(=O)O", "inchikey": "CQOVPNPJLQNMDC-ZETCQYMHSA-N", "synonyms": []},
+ {"name": "aspartame", "smiles": "COC(=O)[C@H](Cc1ccccc1)NC(=O)[C@@H](N)CC(=O)O", "inchikey": "IAOZJIPTCAWIRG-QWRGUYRKSA-N", "synonyms": []},
+ {"name": "monosodium glutamate", "smiles": "N[C@@H](CCC(=O)O)C(=O)[O-].[Na+]", "inchikey": "LPUQAYUQRXPFSQ-DFWYDOINSA-M", "synonyms": ["MSG", "sodium glutamate"]},
+ {"name": "N-acetylcysteine", "smiles": "CC(=O)N[C@@H](CS)C(=O)O", "inchikey": "PWKSKIMOESPYIA-BYPYZUCNSA-N", "synonyms": ["acetylcysteine", "NAC"]}
+ ]
+}
diff --git a/backend/app/data/names/biochemistry.json b/backend/app/data/names/biochemistry.json
new file mode 100644
index 00000000..4d9a1bae
--- /dev/null
+++ b/backend/app/data/names/biochemistry.json
@@ -0,0 +1,75 @@
+{
+ "source": "FormChem",
+ "licence": "Apache-2.0",
+ "category": "biochemistry",
+ "method": "Names and SMILES written for FormChem; InChIKeys computed with RDKit 2025.09.3 (standard InChI). Hexoses are pyranoses with the anomeric centre open unless alpha or beta is named; fructose and the pentoses are open chains.",
+ "entries": [
+ {"name": "D-glucose", "smiles": "OC[C@H]1OC(O)[C@H](O)[C@@H](O)[C@@H]1O", "inchikey": "WQZGKKKJIJFFOK-GASJEMHNSA-N", "synonyms": ["glucose", "dextrose", "D-glucopyranose"]},
+ {"name": "alpha-D-glucose", "smiles": "OC[C@H]1O[C@H](O)[C@H](O)[C@@H](O)[C@@H]1O", "inchikey": "WQZGKKKJIJFFOK-DVKNGEFBSA-N", "synonyms": ["α-D-glucose", "alpha-D-glucopyranose", "α-D-glucopyranose"]},
+ {"name": "beta-D-glucose", "smiles": "OC[C@H]1O[C@@H](O)[C@H](O)[C@@H](O)[C@@H]1O", "inchikey": "WQZGKKKJIJFFOK-VFUOTHLCSA-N", "synonyms": ["β-D-glucose", "beta-D-glucopyranose", "β-D-glucopyranose"]},
+ {"name": "L-glucose", "smiles": "OC[C@@H]1OC(O)[C@@H](O)[C@H](O)[C@H]1O", "inchikey": "WQZGKKKJIJFFOK-ZZWDRFIYSA-N", "synonyms": ["L-glucopyranose"]},
+ {"name": "D-galactose", "smiles": "OC[C@H]1OC(O)[C@H](O)[C@@H](O)[C@H]1O", "inchikey": "WQZGKKKJIJFFOK-SVZMEOIVSA-N", "synonyms": ["galactose", "D-galactopyranose"]},
+ {"name": "D-mannose", "smiles": "OC[C@H]1OC(O)[C@@H](O)[C@@H](O)[C@@H]1O", "inchikey": "WQZGKKKJIJFFOK-QTVWNMPRSA-N", "synonyms": ["mannose", "D-mannopyranose"]},
+ {"name": "D-fructose", "smiles": "O=C(CO)[C@@H](O)[C@H](O)[C@H](O)CO", "inchikey": "BJHIKXHVCXFQLS-UYFOZJQFSA-N", "synonyms": ["fructose", "fruit sugar", "levulose"]},
+ {"name": "D-ribose", "smiles": "O=C[C@H](O)[C@H](O)[C@H](O)CO", "inchikey": "PYMYPHUHKUWMLA-LMVFSUKVSA-N", "synonyms": ["ribose"]},
+ {"name": "2-deoxy-D-ribose", "smiles": "O=CC[C@H](O)[C@H](O)CO", "inchikey": "ASJSAQIRZKANQN-CRCLSJGQSA-N", "synonyms": ["deoxyribose"]},
+ {"name": "D-xylose", "smiles": "O=C[C@H](O)[C@@H](O)[C@H](O)CO", "inchikey": "PYMYPHUHKUWMLA-VPENINKCSA-N", "synonyms": ["xylose"]},
+ {"name": "L-arabinose", "smiles": "O=C[C@@H](O)[C@H](O)[C@@H](O)CO", "inchikey": "PYMYPHUHKUWMLA-WISUUJSJSA-N", "synonyms": ["arabinose"]},
+ {"name": "D-erythrose", "smiles": "O=C[C@H](O)[C@H](O)CO", "inchikey": "YTBSYETUWUMLBZ-IUYQGCFVSA-N", "synonyms": ["erythrose"]},
+ {"name": "D-glyceraldehyde", "smiles": "O=C[C@H](O)CO", "inchikey": "MNQZXJOMYWMBOU-VKHMYHEASA-N", "synonyms": ["(R)-glyceraldehyde"]},
+ {"name": "dihydroxyacetone", "smiles": "O=C(CO)CO", "inchikey": "RXKJFZQQPQGTFL-UHFFFAOYSA-N", "synonyms": ["DHA"]},
+ {"name": "sucrose", "smiles": "OC[C@H]1O[C@H](O[C@]2(CO)O[C@H](CO)[C@@H](O)[C@@H]2O)[C@H](O)[C@@H](O)[C@@H]1O", "inchikey": "CZMRCDWAGMRECN-UGDNZRGBSA-N", "synonyms": ["saccharose", "table sugar", "cane sugar"]},
+ {"name": "D-sorbitol", "smiles": "OC[C@H](O)[C@@H](O)[C@H](O)[C@H](O)CO", "inchikey": "FBPFZTCFMRRESA-JGWLITMVSA-N", "synonyms": ["sorbitol", "D-glucitol", "glucitol"]},
+ {"name": "D-mannitol", "smiles": "OC[C@@H](O)[C@@H](O)[C@H](O)[C@H](O)CO", "inchikey": "FBPFZTCFMRRESA-KVTDHHQDSA-N", "synonyms": ["mannitol"]},
+ {"name": "xylitol", "smiles": "OC[C@H](O)[C@@H](O)[C@H](O)CO", "inchikey": "HEBKCHPVOIAQTA-SCDXWVJYSA-N", "synonyms": []},
+ {"name": "D-glucosamine", "smiles": "N[C@H]1C(O)O[C@H](CO)[C@@H](O)[C@@H]1O", "inchikey": "MSWZFWKMSRAUBD-IVMDWMLBSA-N", "synonyms": ["glucosamine"]},
+ {"name": "N-acetyl-D-glucosamine", "smiles": "CC(=O)N[C@H]1C(O)O[C@H](CO)[C@@H](O)[C@@H]1O", "inchikey": "OVRNDRQMDRJTHS-RTRLPJTCSA-N", "synonyms": ["GlcNAc", "N-acetylglucosamine"]},
+ {"name": "L-ascorbic acid", "smiles": "OC[C@H](O)[C@H]1OC(=O)C(O)=C1O", "inchikey": "CIWBSHSKHKDKBQ-JLAZNSOCSA-N", "synonyms": ["ascorbic acid", "vitamin C"]},
+ {"name": "D-gluconic acid", "smiles": "OC[C@@H](O)[C@@H](O)[C@H](O)[C@@H](O)C(=O)O", "inchikey": "RGHNJXZEOKUKBD-SQOUGZDYSA-N", "synonyms": ["gluconic acid"]},
+ {"name": "L-lactic acid", "smiles": "C[C@H](O)C(=O)O", "inchikey": "JVTAAEKCZFNVCJ-REOHCLBHSA-N", "synonyms": ["(S)-lactic acid"]},
+ {"name": "lactic acid", "smiles": "CC(O)C(=O)O", "inchikey": "JVTAAEKCZFNVCJ-UHFFFAOYSA-N", "synonyms": ["DL-lactic acid"]},
+ {"name": "pyruvic acid", "smiles": "CC(=O)C(=O)O", "inchikey": "LCTONWCANYUPML-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "citric acid", "smiles": "O=C(O)CC(O)(CC(=O)O)C(=O)O", "inchikey": "KRKNYBCHXYNGOX-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "succinic acid", "smiles": "O=C(O)CCC(=O)O", "inchikey": "KDYFGRWQOYBRFD-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "fumaric acid", "smiles": "O=C(O)/C=C/C(=O)O", "inchikey": "VZCYOOQTPOCHFL-OWOJBTEDSA-N", "synonyms": []},
+ {"name": "maleic acid", "smiles": "O=C(O)/C=C\\C(=O)O", "inchikey": "VZCYOOQTPOCHFL-UPHRSURJSA-N", "synonyms": []},
+ {"name": "L-malic acid", "smiles": "O=C(O)C[C@H](O)C(=O)O", "inchikey": "BJEPYKJPYRNKOW-REOHCLBHSA-N", "synonyms": []},
+ {"name": "malic acid", "smiles": "O=C(O)CC(O)C(=O)O", "inchikey": "BJEPYKJPYRNKOW-UHFFFAOYSA-N", "synonyms": ["DL-malic acid"]},
+ {"name": "oxaloacetic acid", "smiles": "O=C(O)CC(=O)C(=O)O", "inchikey": "KHPXUQMNIQBQEV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "alpha-ketoglutaric acid", "smiles": "O=C(O)CCC(=O)C(=O)O", "inchikey": "KPGXRSRHYNQIFN-UHFFFAOYSA-N", "synonyms": ["α-ketoglutaric acid", "2-oxoglutaric acid"]},
+ {"name": "acetoacetic acid", "smiles": "CC(=O)CC(=O)O", "inchikey": "WDJHALXBUFZDSR-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "oxalic acid", "smiles": "O=C(O)C(=O)O", "inchikey": "MUBZPKHOEPUJKR-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "glycolic acid", "smiles": "O=C(O)CO", "inchikey": "AEMRFAOFKBGASW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "glyoxylic acid", "smiles": "O=CC(=O)O", "inchikey": "HHLFWLYXYJOTON-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "L-tartaric acid", "smiles": "O=C(O)[C@H](O)[C@@H](O)C(=O)O", "inchikey": "FEWJPZIEWOKRBE-JCYAYHJZSA-N", "synonyms": ["L-(+)-tartaric acid", "tartaric acid"]},
+ {"name": "uric acid", "smiles": "O=c1[nH]c(=O)c2[nH]c(=O)[nH]c2[nH]1", "inchikey": "LEHOTFFKMJEONL-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "adenine", "smiles": "Nc1ncnc2[nH]cnc12", "inchikey": "GFFGJBXGBJISGV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "guanine", "smiles": "Nc1nc2[nH]cnc2c(=O)[nH]1", "inchikey": "UYTPUPDQBNUYGX-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "cytosine", "smiles": "Nc1cc[nH]c(=O)n1", "inchikey": "OPTASPLRGRRNAP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "thymine", "smiles": "Cc1c[nH]c(=O)[nH]c1=O", "inchikey": "RWQNBRDOKXIBIV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "uracil", "smiles": "O=c1cc[nH]c(=O)[nH]1", "inchikey": "ISAKRJDGNUQOIC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "hypoxanthine", "smiles": "O=c1[nH]cnc2nc[nH]c12", "inchikey": "FDGQSTZJBFJUBT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "xanthine", "smiles": "O=c1[nH]c(=O)c2[nH]cnc2[nH]1", "inchikey": "LRFVTYWOQMYALW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "theobromine", "smiles": "Cn1cnc2c1c(=O)[nH]c(=O)n2C", "inchikey": "YAPQBXQYLJRXSA-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "theophylline", "smiles": "Cn1c(=O)c2[nH]cnc2n(C)c1=O", "inchikey": "ZFXYFBGIUFBOJW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "adenosine", "smiles": "Nc1ncnc2c1ncn2[C@@H]1O[C@H](CO)[C@@H](O)[C@H]1O", "inchikey": "OIRDTQYFTABQOQ-KQYNXXCUSA-N", "synonyms": []},
+ {"name": "guanosine", "smiles": "Nc1nc2c(ncn2[C@@H]2O[C@H](CO)[C@@H](O)[C@H]2O)c(=O)[nH]1", "inchikey": "NYHBQMYGNKIUIF-UUOKFMHZSA-N", "synonyms": []},
+ {"name": "uridine", "smiles": "O=c1ccn([C@@H]2O[C@H](CO)[C@@H](O)[C@H]2O)c(=O)[nH]1", "inchikey": "DRTQHJPVMGBUCF-XVFCMESISA-N", "synonyms": []},
+ {"name": "cytidine", "smiles": "Nc1ccn([C@@H]2O[C@H](CO)[C@@H](O)[C@H]2O)c(=O)n1", "inchikey": "UHDGCWIWMRVCDJ-XVFCMESISA-N", "synonyms": []},
+ {"name": "thymidine", "smiles": "Cc1cn([C@H]2C[C@H](O)[C@@H](CO)O2)c(=O)[nH]c1=O", "inchikey": "IQFYYKKMVGJFEH-XLPZGREQSA-N", "synonyms": ["deoxythymidine"]},
+ {"name": "2'-deoxyadenosine", "smiles": "Nc1ncnc2c1ncn2[C@H]1C[C@H](O)[C@@H](CO)O1", "inchikey": "OLXZPDWKRNYJJZ-RRKCRQDMSA-N", "synonyms": ["deoxyadenosine"]},
+ {"name": "inosine", "smiles": "O=c1[nH]cnc2c1ncn2[C@@H]1O[C@H](CO)[C@@H](O)[C@H]1O", "inchikey": "UGQMRVRMYYASKQ-KQYNXXCUSA-N", "synonyms": []},
+ {"name": "adenosine monophosphate", "smiles": "Nc1ncnc2c1ncn2[C@@H]1O[C@H](COP(=O)(O)O)[C@@H](O)[C@H]1O", "inchikey": "UDMBCSSLTHHNCD-KQYNXXCUSA-N", "synonyms": ["AMP", "adenosine 5'-monophosphate", "adenylic acid"]},
+ {"name": "adenosine diphosphate", "smiles": "Nc1ncnc2c1ncn2[C@@H]1O[C@H](COP(=O)(O)OP(=O)(O)O)[C@@H](O)[C@H]1O", "inchikey": "XTWYTFMLZFPYCI-KQYNXXCUSA-N", "synonyms": ["ADP"]},
+ {"name": "adenosine triphosphate", "smiles": "Nc1ncnc2c1ncn2[C@@H]1O[C@H](COP(=O)(O)OP(=O)(O)OP(=O)(O)O)[C@@H](O)[C@H]1O", "inchikey": "ZKHQWZAMYRWXGA-KQYNXXCUSA-N", "synonyms": ["ATP"]},
+ {"name": "nicotinamide", "smiles": "NC(=O)c1cccnc1", "inchikey": "DFPAKSUCGFBDDF-UHFFFAOYSA-N", "synonyms": ["niacinamide"]},
+ {"name": "niacin", "smiles": "O=C(O)c1cccnc1", "inchikey": "PVNIIMVLHYAWGP-UHFFFAOYSA-N", "synonyms": ["nicotinic acid", "vitamin B3"]},
+ {"name": "pyridoxine", "smiles": "Cc1ncc(CO)c(CO)c1O", "inchikey": "LXNHXLLTXMVWPM-UHFFFAOYSA-N", "synonyms": ["vitamin B6"]},
+ {"name": "thiamine", "smiles": "Cc1ncc(C[n+]2csc(CCO)c2C)c(N)n1", "inchikey": "JZRWCGZRTZMZEH-UHFFFAOYSA-N", "synonyms": ["vitamin B1", "thiamin"]},
+ {"name": "riboflavin", "smiles": "Cc1cc2nc3c(=O)[nH]c(=O)nc-3n(C[C@H](O)[C@H](O)[C@H](O)CO)c2cc1C", "inchikey": "AUNGANRZJHBGPY-SCRDCRAPSA-N", "synonyms": ["vitamin B2"]},
+ {"name": "folic acid", "smiles": "Nc1nc2ncc(CNc3ccc(C(=O)N[C@@H](CCC(=O)O)C(=O)O)cc3)nc2c(=O)[nH]1", "inchikey": "OVBPIULPVIDEAO-LBPRGKRZSA-N", "synonyms": ["folate", "vitamin B9", "pteroylglutamic acid"]},
+ {"name": "biotin", "smiles": "O=C(O)CCCC[C@@H]1SC[C@@H]2NC(=O)N[C@H]12", "inchikey": "YBJHBAHKTGYVGT-ZKWXMUAHSA-N", "synonyms": ["vitamin B7", "vitamin H"]},
+ {"name": "pantothenic acid", "smiles": "CC(C)(CO)[C@@H](O)C(=O)NCCC(=O)O", "inchikey": "GHOKWGTUZJEAQD-ZETCQYMHSA-N", "synonyms": ["vitamin B5", "D-pantothenic acid"]},
+ {"name": "acetylcholine", "smiles": "CC(=O)OCC[N+](C)(C)C", "inchikey": "OIPILFWXSMYKGL-UHFFFAOYSA-N", "synonyms": ["ACh"]}
+ ]
+}
diff --git a/backend/app/data/names/drugs.json b/backend/app/data/names/drugs.json
new file mode 100644
index 00000000..786372e7
--- /dev/null
+++ b/backend/app/data/names/drugs.json
@@ -0,0 +1,134 @@
+{
+ "source": "FormChem",
+ "licence": "Apache-2.0",
+ "category": "drugs",
+ "method": "Names and SMILES written for FormChem; InChIKeys computed with RDKit 2025.09.3 (standard InChI). Drugs sold as racemates are drawn without stereo; single enantiomers carry it.",
+ "entries": [
+ {"name": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O", "inchikey": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N", "synonyms": ["acetylsalicylic acid", "ASA"]},
+ {"name": "paracetamol", "smiles": "CC(=O)Nc1ccc(O)cc1", "inchikey": "RZVAJINKPMORJF-UHFFFAOYSA-N", "synonyms": ["acetaminophen", "APAP"]},
+ {"name": "ibuprofen", "smiles": "CC(C)Cc1ccc(C(C)C(=O)O)cc1", "inchikey": "HEFNNWSXXWATRW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "dexibuprofen", "smiles": "CC(C)Cc1ccc([C@H](C)C(=O)O)cc1", "inchikey": "HEFNNWSXXWATRW-JTQLQIEISA-N", "synonyms": ["(S)-ibuprofen"]},
+ {"name": "naproxen", "smiles": "COc1ccc2cc([C@H](C)C(=O)O)ccc2c1", "inchikey": "CMWTZPSULFXXJA-VIFPVBQESA-N", "synonyms": ["(S)-naproxen"]},
+ {"name": "diclofenac", "smiles": "O=C(O)Cc1ccccc1Nc1c(Cl)cccc1Cl", "inchikey": "DCOPUUMXTXDBNB-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ketoprofen", "smiles": "CC(C(=O)O)c1cccc(C(=O)c2ccccc2)c1", "inchikey": "DKYWVDODHFEZIM-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "indometacin", "smiles": "COc1ccc2c(c1)c(CC(=O)O)c(C)n2C(=O)c1ccc(Cl)cc1", "inchikey": "CGIGDMFJXJATDK-UHFFFAOYSA-N", "synonyms": ["indomethacin"]},
+ {"name": "celecoxib", "smiles": "Cc1ccc(-c2cc(C(F)(F)F)nn2-c2ccc(S(N)(=O)=O)cc2)cc1", "inchikey": "RZEKVGVHFLEQIL-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "caffeine", "smiles": "Cn1c(=O)c2c(ncn2C)n(C)c1=O", "inchikey": "RYYVLZVUVIJVGH-UHFFFAOYSA-N", "synonyms": ["1,3,7-trimethylxanthine", "guaranine", "theine"]},
+ {"name": "nicotine", "smiles": "CN1CCC[C@H]1c1cccnc1", "inchikey": "SNICXCGAKADSCV-JTQLQIEISA-N", "synonyms": ["(S)-nicotine", "(-)-nicotine"]},
+ {"name": "morphine", "smiles": "CN1CC[C@]23c4c5ccc(O)c4O[C@H]2[C@@H](O)C=C[C@H]3[C@H]1C5", "inchikey": "BQJCRHHNABKAKU-KBQPJGBKSA-N", "synonyms": []},
+ {"name": "codeine", "smiles": "COc1ccc2c3c1O[C@H]1[C@@H](O)C=C[C@H]4[C@@H](C2)N(C)CC[C@]314", "inchikey": "OROGSEYTTFOCAN-DNJOTXNNSA-N", "synonyms": ["methylmorphine"]},
+ {"name": "heroin", "smiles": "CC(=O)Oc1ccc2c3c1O[C@H]1[C@@H](OC(C)=O)C=C[C@H]4[C@@H](C2)N(C)CC[C@]314", "inchikey": "GVGLGOZIDCSQPN-PVHGPHFFSA-N", "synonyms": ["diamorphine", "diacetylmorphine"]},
+ {"name": "fentanyl", "smiles": "CCC(=O)N(c1ccccc1)C1CCN(CCc2ccccc2)CC1", "inchikey": "PJMPHNIQZUBGLI-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "methadone", "smiles": "CCC(=O)C(CC(C)N(C)C)(c1ccccc1)c1ccccc1", "inchikey": "USSIQXCVUWKGNF-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "tramadol", "smiles": "COc1cccc(C2(O)CCCCC2CN(C)C)c1", "inchikey": "TVYLLZQTGLZFBW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "cocaine", "smiles": "COC(=O)[C@H]1[C@@H](OC(=O)c2ccccc2)C[C@@H]2CC[C@H]1N2C", "inchikey": "ZPUCINDJVBIVPJ-LJISPDSOSA-N", "synonyms": []},
+ {"name": "lidocaine", "smiles": "CCN(CC)CC(=O)Nc1c(C)cccc1C", "inchikey": "NNJVILVZKWQKPM-UHFFFAOYSA-N", "synonyms": ["lignocaine"]},
+ {"name": "procaine", "smiles": "CCN(CC)CCOC(=O)c1ccc(N)cc1", "inchikey": "MFDFERRIHVXMIY-UHFFFAOYSA-N", "synonyms": ["novocaine"]},
+ {"name": "benzocaine", "smiles": "CCOC(=O)c1ccc(N)cc1", "inchikey": "BLFLLBZGZJTVJG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "epinephrine", "smiles": "CNC[C@H](O)c1ccc(O)c(O)c1", "inchikey": "UCTWMZQNUQWSLP-VIFPVBQESA-N", "synonyms": ["adrenaline", "(R)-epinephrine"]},
+ {"name": "norepinephrine", "smiles": "NC[C@H](O)c1ccc(O)c(O)c1", "inchikey": "SFLSHLFXELFNJZ-QMMMGPOBSA-N", "synonyms": ["noradrenaline"]},
+ {"name": "dopamine", "smiles": "NCCc1ccc(O)c(O)c1", "inchikey": "VYFYYTLLBUKUHU-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "serotonin", "smiles": "NCCc1c[nH]c2ccc(O)cc12", "inchikey": "QZAYGJVTTNCVMB-UHFFFAOYSA-N", "synonyms": ["5-hydroxytryptamine", "5-HT"]},
+ {"name": "histamine", "smiles": "NCCc1c[nH]cn1", "inchikey": "NTYJJOPFIAHURM-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "melatonin", "smiles": "COc1ccc2[nH]cc(CCNC(C)=O)c2c1", "inchikey": "DRLFMBDRBRZALE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "tryptamine", "smiles": "NCCc1c[nH]c2ccccc12", "inchikey": "APJYDQYYACXCRM-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "amphetamine", "smiles": "CC(N)Cc1ccccc1", "inchikey": "KWTSXDURSIMDCE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "dextroamphetamine", "smiles": "C[C@H](N)Cc1ccccc1", "inchikey": "KWTSXDURSIMDCE-QMMMGPOBSA-N", "synonyms": ["dexamfetamine", "(S)-amphetamine"]},
+ {"name": "methamphetamine", "smiles": "CNC(C)Cc1ccccc1", "inchikey": "MYWUZJCMWCOHBA-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "MDMA", "smiles": "CNC(C)Cc1ccc2c(c1)OCO2", "inchikey": "SHXWCVYOXRDMCX-UHFFFAOYSA-N", "synonyms": ["3,4-methylenedioxymethamphetamine", "ecstasy"]},
+ {"name": "ephedrine", "smiles": "CN[C@@H](C)[C@H](O)c1ccccc1", "inchikey": "KWGRBVOPPLSCSI-WPRPVWTQSA-N", "synonyms": ["(-)-ephedrine"]},
+ {"name": "pseudoephedrine", "smiles": "CN[C@@H](C)[C@@H](O)c1ccccc1", "inchikey": "KWGRBVOPPLSCSI-WCBMZHEXSA-N", "synonyms": ["(+)-pseudoephedrine"]},
+ {"name": "salbutamol", "smiles": "CC(C)(C)NCC(O)c1ccc(O)c(CO)c1", "inchikey": "NDAUXUAQIAJITI-UHFFFAOYSA-N", "synonyms": ["albuterol"]},
+ {"name": "propranolol", "smiles": "CC(C)NCC(O)COc1cccc2ccccc12", "inchikey": "AQHHHDLHHXJYJD-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "atenolol", "smiles": "CC(C)NCC(O)COc1ccc(CC(N)=O)cc1", "inchikey": "METKIMKYRPQLGS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "metoprolol", "smiles": "COCCc1ccc(OCC(O)CNC(C)C)cc1", "inchikey": "IUBSYMUCCVWXPE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "amlodipine", "smiles": "CCOC(=O)C1=C(COCCN)NC(C)=C(C(=O)OC)C1c1ccccc1Cl", "inchikey": "HTIQEAQVCYTUBX-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "nifedipine", "smiles": "COC(=O)C1=C(C)NC(C)=C(C(=O)OC)C1c1ccccc1[N+](=O)[O-]", "inchikey": "HYIMSNHJOBLJNT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "captopril", "smiles": "C[C@H](CS)C(=O)N1CCC[C@H]1C(=O)O", "inchikey": "FAKRSMQSSFJEIM-RQJHMYQMSA-N", "synonyms": []},
+ {"name": "enalapril", "smiles": "CCOC(=O)[C@H](CCc1ccccc1)N[C@@H](C)C(=O)N1CCC[C@H]1C(=O)O", "inchikey": "GBXSMTUPTTWBMN-XIRDDKMYSA-N", "synonyms": []},
+ {"name": "lisinopril", "smiles": "NCCCC[C@H](N[C@@H](CCc1ccccc1)C(=O)O)C(=O)N1CCC[C@H]1C(=O)O", "inchikey": "RLAWWYSOJDYHDC-BZSNNMDCSA-N", "synonyms": []},
+ {"name": "losartan", "smiles": "CCCCc1nc(Cl)c(CO)n1Cc1ccc(-c2ccccc2-c2nn[nH]n2)cc1", "inchikey": "PSIFNNKUMBGKDQ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "warfarin", "smiles": "CC(=O)CC(c1ccccc1)c1c(O)c2ccccc2oc1=O", "inchikey": "PJVWKTKQMONHTI-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "clopidogrel", "smiles": "COC(=O)[C@H](c1ccccc1Cl)N1CCc2sccc2C1", "inchikey": "GKTWGGQPFAXNFI-HNNXBMFYSA-N", "synonyms": []},
+ {"name": "atorvastatin", "smiles": "CC(C)c1c(C(=O)Nc2ccccc2)c(-c2ccccc2)c(-c2ccc(F)cc2)n1CC[C@@H](O)C[C@@H](O)CC(=O)O", "inchikey": "XUKUURHRXDUEBC-KAYWLYCHSA-N", "synonyms": []},
+ {"name": "simvastatin", "smiles": "CCC(C)(C)C(=O)O[C@H]1C[C@@H](C)C=C2C=C[C@H](C)[C@H](CC[C@@H]3C[C@@H](O)CC(=O)O3)[C@H]21", "inchikey": "RYMZZMVNJRMUDD-HGQWONQESA-N", "synonyms": []},
+ {"name": "metformin", "smiles": "CN(C)C(=N)N=C(N)N", "inchikey": "XZWYZXLIPXDOLR-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "glibenclamide", "smiles": "COc1ccc(Cl)cc1C(=O)NCCc1ccc(S(=O)(=O)NC(=O)NC2CCCCC2)cc1", "inchikey": "ZNNLBTZKUZBEKO-UHFFFAOYSA-N", "synonyms": ["glyburide"]},
+ {"name": "omeprazole", "smiles": "COc1ccc2[nH]c(S(=O)Cc3ncc(C)c(OC)c3C)nc2c1", "inchikey": "SUBDBMMJDZJVOS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ranitidine", "smiles": "CNC(=C[N+](=O)[O-])NCCSCc1ccc(CN(C)C)o1", "inchikey": "VMXUWOKSQNHOCA-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "cimetidine", "smiles": "CN=C(NC#N)NCCSCc1nc[nH]c1C", "inchikey": "AQIXAKUUQRKLND-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "loratadine", "smiles": "CCOC(=O)N1CCC(=C2c3ccc(Cl)cc3CCc3cccnc32)CC1", "inchikey": "JCCNYMKQOSZNPW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "cetirizine", "smiles": "O=C(O)COCCN1CCN(C(c2ccccc2)c2ccc(Cl)cc2)CC1", "inchikey": "ZKLPARSLTMPFCP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "diphenhydramine", "smiles": "CN(C)CCOC(c1ccccc1)c1ccccc1", "inchikey": "ZZVUWRFHKOJYTH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "chlorphenamine", "smiles": "CN(C)CCC(c1ccc(Cl)cc1)c1ccccn1", "inchikey": "SOYKEARSMXGVTM-UHFFFAOYSA-N", "synonyms": ["chlorpheniramine"]},
+ {"name": "fluoxetine", "smiles": "CNCCC(Oc1ccc(C(F)(F)F)cc1)c1ccccc1", "inchikey": "RTHCYVBBDHJXIQ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "sertraline", "smiles": "CN[C@H]1CC[C@@H](c2ccc(Cl)c(Cl)c2)c2ccccc21", "inchikey": "VGKDLMBJGBXTGI-SJCJKPOMSA-N", "synonyms": []},
+ {"name": "citalopram", "smiles": "CN(C)CCCC1(c2ccc(F)cc2)OCc2cc(C#N)ccc21", "inchikey": "WSEQXVZVJXJVFP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "paroxetine", "smiles": "Fc1ccc([C@@H]2CCNC[C@H]2COc2ccc3c(c2)OCO3)cc1", "inchikey": "AHOUBRCZNHFOSL-YOEHRIQHSA-N", "synonyms": []},
+ {"name": "venlafaxine", "smiles": "COc1ccc(C(CN(C)C)C2(O)CCCCC2)cc1", "inchikey": "PNVNVHUZROJLTJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "amitriptyline", "smiles": "CN(C)CCC=C1c2ccccc2CCc2ccccc21", "inchikey": "KRMDCWKBEZIMAB-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "imipramine", "smiles": "CN(C)CCCN1c2ccccc2CCc2ccccc21", "inchikey": "BCGWQEUPMDMJNV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "diazepam", "smiles": "CN1C(=O)CN=C(c2ccccc2)c2cc(Cl)ccc21", "inchikey": "AAOVKJBEBIDNHE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "lorazepam", "smiles": "O=C1Nc2ccc(Cl)cc2C(c2ccccc2Cl)=NC1O", "inchikey": "DIWRORZWFLOCLC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "alprazolam", "smiles": "Cc1nnc2n1-c1ccc(Cl)cc1C(c1ccccc1)=NC2", "inchikey": "VREFGVBLTWBCJP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "midazolam", "smiles": "Cc1ncc2n1-c1ccc(Cl)cc1C(c1ccccc1F)=NC2", "inchikey": "DDLIGBOFAVUZHB-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "zolpidem", "smiles": "Cc1ccc(-c2nc3ccc(C)cn3c2CC(=O)N(C)C)cc1", "inchikey": "ZAFYATHCZYHLPB-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "haloperidol", "smiles": "O=C(CCCN1CCC(O)(c2ccc(Cl)cc2)CC1)c1ccc(F)cc1", "inchikey": "LNEPOXFFQSENCJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "chlorpromazine", "smiles": "CN(C)CCCN1c2ccccc2Sc2ccc(Cl)cc21", "inchikey": "ZPEIMTDSQAKGNT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "risperidone", "smiles": "Cc1nc2n(c(=O)c1CCN1CCC(c3noc4cc(F)ccc34)CC1)CCCC2", "inchikey": "RAPZEAPATHNIPO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "olanzapine", "smiles": "Cc1cc2c(s1)Nc1ccccc1N=C2N1CCN(C)CC1", "inchikey": "KVWDHTXUZHCGIO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "quetiapine", "smiles": "OCCOCCN1CCN(C2=Nc3ccccc3Sc3ccccc32)CC1", "inchikey": "URKOMYMAXPYINW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "clozapine", "smiles": "CN1CCN(C2=Nc3cc(Cl)ccc3Nc3ccccc32)CC1", "inchikey": "QZUDBNBUXVUHMW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "valproic acid", "smiles": "CCCC(CCC)C(=O)O", "inchikey": "NIJJYAXOARWZEE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "carbamazepine", "smiles": "NC(=O)N1c2ccccc2C=Cc2ccccc21", "inchikey": "FFGPTBGBLSHEPO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phenytoin", "smiles": "O=C1NC(=O)C(c2ccccc2)(c2ccccc2)N1", "inchikey": "CXOFVDLJLONNDW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "gabapentin", "smiles": "NCC1(CC(=O)O)CCCCC1", "inchikey": "UGJMXCAKCUNAIE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "pregabalin", "smiles": "CC(C)C[C@H](CN)CC(=O)O", "inchikey": "AYXYPKUFHZROOJ-ZETCQYMHSA-N", "synonyms": []},
+ {"name": "levetiracetam", "smiles": "CC[C@@H](C(N)=O)N1CCCC1=O", "inchikey": "HPHUVLMMVZITSG-LURJTMIESA-N", "synonyms": []},
+ {"name": "lamotrigine", "smiles": "Nc1nnc(-c2cccc(Cl)c2Cl)c(N)n1", "inchikey": "PYZRQGJRPPTADH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "sildenafil", "smiles": "CCCc1nn(C)c2c(=O)[nH]c(-c3cc(S(=O)(=O)N4CCN(C)CC4)ccc3OCC)nc12", "inchikey": "BNRNXUUZRGQAQC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "tadalafil", "smiles": "CN1CC(=O)N2[C@H](Cc3c([nH]c4ccccc34)[C@H]2c2ccc3c(c2)OCO3)C1=O", "inchikey": "WOXKDUGGOYFFRN-IIBYNOLFSA-N", "synonyms": []},
+ {"name": "benzylpenicillin", "smiles": "CC1(C)S[C@@H]2[C@H](NC(=O)Cc3ccccc3)C(=O)N2[C@H]1C(=O)O", "inchikey": "JGSARLDLIJGVTE-MBNYWOFBSA-N", "synonyms": ["penicillin G", "penicillin"]},
+ {"name": "amoxicillin", "smiles": "CC1(C)S[C@@H]2[C@H](NC(=O)[C@H](N)c3ccc(O)cc3)C(=O)N2[C@H]1C(=O)O", "inchikey": "LSQZJLSUYDQPKJ-NJBDSQKTSA-N", "synonyms": ["amoxycillin"]},
+ {"name": "ampicillin", "smiles": "CC1(C)S[C@@H]2[C@H](NC(=O)[C@H](N)c3ccccc3)C(=O)N2[C@H]1C(=O)O", "inchikey": "AVKUERGKIZMTKX-NJBDSQKTSA-N", "synonyms": []},
+ {"name": "ciprofloxacin", "smiles": "O=C(O)c1cn(C2CC2)c2cc(N3CCNCC3)c(F)cc2c1=O", "inchikey": "MYSWGUAQZAJSOK-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "levofloxacin", "smiles": "C[C@H]1COc2c(N3CCN(C)CC3)c(F)cc3c(=O)c(C(=O)O)cn1c23", "inchikey": "GSDSWSVVBLHKDQ-JTQLQIEISA-N", "synonyms": []},
+ {"name": "metronidazole", "smiles": "Cc1ncc([N+](=O)[O-])n1CCO", "inchikey": "VAOCPAMSLUNLGC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "trimethoprim", "smiles": "COc1cc(Cc2cnc(N)nc2N)cc(OC)c1OC", "inchikey": "IEDVJHCEMCRBQM-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "sulfamethoxazole", "smiles": "Cc1cc(NS(=O)(=O)c2ccc(N)cc2)no1", "inchikey": "JLKIGFTWXXRPMT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "isoniazid", "smiles": "NNC(=O)c1ccncc1", "inchikey": "QRXWMOHMRWLFEY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "chloroquine", "smiles": "CCN(CC)CCCC(C)Nc1ccnc2cc(Cl)ccc12", "inchikey": "WHTVZRBIWZFKQO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "hydroxychloroquine", "smiles": "CCN(CCO)CCCC(C)Nc1ccnc2cc(Cl)ccc12", "inchikey": "XXSMGPRMXLTPCZ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "quinine", "smiles": "COc1ccc2nccc([C@@H](O)[C@@H]3C[C@@H]4CCN3C[C@@H]4C=C)c2c1", "inchikey": "LOUPRKONTZGTKE-WZBLMQSHSA-N", "synonyms": []},
+ {"name": "artemisinin", "smiles": "C[C@@H]1CC[C@H]2[C@@H](C)C(=O)O[C@@H]3O[C@@]4(C)CC[C@@H]1[C@]32OO4", "inchikey": "BLUAFEHZUWYNDE-NNWCWBAJSA-N", "synonyms": []},
+ {"name": "aciclovir", "smiles": "Nc1nc2c(ncn2COCCO)c(=O)[nH]1", "inchikey": "MKUXAQIIEYXACX-UHFFFAOYSA-N", "synonyms": ["acyclovir"]},
+ {"name": "oseltamivir", "smiles": "CCOC(=O)C1=C[C@@H](OC(CC)CC)[C@H](NC(C)=O)[C@@H](N)C1", "inchikey": "VSZGPKBBMSAYNT-RRFJBIMHSA-N", "synonyms": []},
+ {"name": "zidovudine", "smiles": "Cc1cn([C@H]2C[C@H](N=[N+]=[N-])[C@@H](CO)O2)c(=O)[nH]c1=O", "inchikey": "HBOMLICNUCNMMY-XLPZGREQSA-N", "synonyms": ["AZT", "azidothymidine"]},
+ {"name": "methotrexate", "smiles": "CN(Cc1cnc2nc(N)nc(N)c2n1)c1ccc(C(=O)N[C@@H](CCC(=O)O)C(=O)O)cc1", "inchikey": "FBOZXECLQNJBKD-ZDUSSCGKSA-N", "synonyms": []},
+ {"name": "fluorouracil", "smiles": "O=c1[nH]cc(F)c(=O)[nH]1", "inchikey": "GHASVSINZRGABV-UHFFFAOYSA-N", "synonyms": ["5-fluorouracil", "5-FU"]},
+ {"name": "cisplatin", "smiles": "N.N.Cl[Pt]Cl", "inchikey": "LXZZYRPGZAFOLE-UHFFFAOYSA-L", "synonyms": []},
+ {"name": "tamoxifen", "smiles": "CC/C(=C(\\c1ccccc1)c1ccc(OCCN(C)C)cc1)c1ccccc1", "inchikey": "NKANXQFJJICGDU-QPLCGJKRSA-N", "synonyms": []},
+ {"name": "imatinib", "smiles": "Cc1ccc(NC(=O)c2ccc(CN3CCN(C)CC3)cc2)cc1Nc1nccc(-c2cccnc2)n1", "inchikey": "KTUFNOKKBVMGRW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "paclitaxel", "smiles": "CC(=O)O[C@H]1C(=O)[C@@]2(C)[C@H]([C@H](OC(=O)c3ccccc3)[C@]3(O)C[C@H](OC(=O)[C@H](O)[C@@H](NC(=O)c4ccccc4)c4ccccc4)C(C)=C1C3(C)C)[C@]1(OC(C)=O)CO[C@@H]1C[C@@H]2O", "inchikey": "RCINICONZNJXQF-MZXODVADSA-N", "synonyms": ["Taxol"]},
+ {"name": "testosterone", "smiles": "C[C@]12CC[C@H]3[C@@H](CCC4=CC(=O)CC[C@@]43C)[C@@H]1CC[C@@H]2O", "inchikey": "MUMGGOZAMZWBJJ-DYKIIFRCSA-N", "synonyms": []},
+ {"name": "estradiol", "smiles": "C[C@]12CC[C@@H]3c4ccc(O)cc4CC[C@H]3[C@@H]1CC[C@@H]2O", "inchikey": "VOXZDWNPVJITMN-ZBRFXRBCSA-N", "synonyms": ["17beta-estradiol", "oestradiol"]},
+ {"name": "progesterone", "smiles": "CC(=O)[C@H]1CC[C@H]2[C@@H]3CCC4=CC(=O)CC[C@]4(C)[C@H]3CC[C@]12C", "inchikey": "RJKFOVLPORLFTN-LEKSSAKUSA-N", "synonyms": []},
+ {"name": "hydrocortisone", "smiles": "C[C@]12CCC(=O)C=C1CC[C@@H]1[C@@H]2[C@@H](O)C[C@@]2(C)[C@H]1CC[C@]2(O)C(=O)CO", "inchikey": "JYGXADMDTFJGBT-VWUMJDOOSA-N", "synonyms": ["cortisol"]},
+ {"name": "dexamethasone", "smiles": "C[C@@H]1C[C@H]2[C@@H]3CCC4=CC(=O)C=C[C@]4(C)[C@@]3(F)[C@@H](O)C[C@]2(C)[C@@]1(O)C(=O)CO", "inchikey": "UREBDLICKHMUKA-CXSFZGCWSA-N", "synonyms": []},
+ {"name": "ethinylestradiol", "smiles": "C#C[C@]1(O)CC[C@H]2[C@@H]3CCc4cc(O)ccc4[C@H]3CC[C@@]21C", "inchikey": "BFPYWIDHMRZLRN-SLHNCBLASA-N", "synonyms": ["ethinyl estradiol"]},
+ {"name": "levothyroxine", "smiles": "N[C@@H](Cc1cc(I)c(Oc2cc(I)c(O)c(I)c2)c(I)c1)C(=O)O", "inchikey": "XUIIKFGFIJCVMT-LBPRGKRZSA-N", "synonyms": ["L-thyroxine", "thyroxine", "T4"]},
+ {"name": "furosemide", "smiles": "NS(=O)(=O)c1cc(C(=O)O)c(NCc2ccco2)cc1Cl", "inchikey": "ZZUFCTLCJUWOSV-UHFFFAOYSA-N", "synonyms": ["frusemide"]},
+ {"name": "hydrochlorothiazide", "smiles": "NS(=O)(=O)c1cc2c(cc1Cl)NCNS2(=O)=O", "inchikey": "JZUFKLXOESDKRF-UHFFFAOYSA-N", "synonyms": ["HCTZ"]},
+ {"name": "allopurinol", "smiles": "O=c1[nH]cnc2[nH]ncc12", "inchikey": "OFCNXPDARWKPPY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "colchicine", "smiles": "COc1cc2c(c(OC)c1OC)-c1ccc(OC)c(=O)cc1[C@@H](NC(C)=O)CC2", "inchikey": "IAKHMKGGTNLKSZ-INIZCTEOSA-N", "synonyms": []},
+ {"name": "ondansetron", "smiles": "Cc1nccn1CC1CCc2c(c3ccccc3n2C)C1=O", "inchikey": "FELGMEQIXOGIFQ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "metoclopramide", "smiles": "CCN(CC)CCNC(=O)c1cc(Cl)c(N)cc1OC", "inchikey": "TTWJBBZEZQICBI-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "loperamide", "smiles": "CN(C)C(=O)C(CCN1CCC(O)(c2ccc(Cl)cc2)CC1)(c1ccccc1)c1ccccc1", "inchikey": "RDOIQAHITMMDAJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "dextromethorphan", "smiles": "COc1ccc2c(c1)[C@]13CCCC[C@@H]1[C@H](C2)N(C)CC3", "inchikey": "MKXZASYAUGDDCJ-NJAFHUGGSA-N", "synonyms": []},
+ {"name": "ketamine", "smiles": "CNC1(c2ccccc2Cl)CCCCC1=O", "inchikey": "YQEZLKZALYSWHR-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "propofol", "smiles": "CC(C)c1cccc(C(C)C)c1O", "inchikey": "OLBCVFGFOZPWHH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "sumatriptan", "smiles": "CNS(=O)(=O)Cc1ccc2[nH]cc(CCN(C)C)c2c1", "inchikey": "KQKPFRSPSRPDEB-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "nitroglycerin", "smiles": "O=[N+]([O-])OCC(CO[N+](=O)[O-])O[N+](=O)[O-]", "inchikey": "SNIOPGDIGTZGOP-UHFFFAOYSA-N", "synonyms": ["glyceryl trinitrate", "nitroglycerine"]},
+ {"name": "minoxidil", "smiles": "Nc1cc(N2CCCCC2)nc(N)[n+]1[O-]", "inchikey": "ZFMITUMMTDLWHR-UHFFFAOYSA-N", "synonyms": []}
+ ]
+}
diff --git a/backend/app/data/names/natural-products.json b/backend/app/data/names/natural-products.json
new file mode 100644
index 00000000..5499513f
--- /dev/null
+++ b/backend/app/data/names/natural-products.json
@@ -0,0 +1,58 @@
+{
+ "source": "FormChem",
+ "licence": "Apache-2.0",
+ "category": "natural-products",
+ "method": "Names and SMILES written for FormChem; InChIKeys computed with RDKit 2025.09.3 (standard InChI). Mixtures and racemates found in nature are drawn without stereo.",
+ "entries": [
+ {"name": "cholesterol", "smiles": "CC(C)CCC[C@@H](C)[C@H]1CC[C@H]2[C@@H]3CC=C4C[C@@H](O)CC[C@]4(C)[C@H]3CC[C@]12C", "inchikey": "HVYWMOMLDIMFJA-DPAQBDIFSA-N", "synonyms": []},
+ {"name": "L-menthol", "smiles": "CC(C)[C@@H]1CC[C@@H](C)C[C@H]1O", "inchikey": "NOOLISFMXDJSKH-KXUCPTDWSA-N", "synonyms": ["menthol", "(-)-menthol", "levomenthol"]},
+ {"name": "camphor", "smiles": "CC1(C)C2CCC1(C)C(=O)C2", "inchikey": "DSSYKIVIOFKYAU-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "(R)-limonene", "smiles": "C=C(C)[C@H]1CC=C(C)CC1", "inchikey": "XMGQYMWWDOXHJM-JTQLQIEISA-N", "synonyms": ["D-limonene", "(+)-limonene"]},
+ {"name": "limonene", "smiles": "C=C(C)C1CC=C(C)CC1", "inchikey": "XMGQYMWWDOXHJM-UHFFFAOYSA-N", "synonyms": ["dipentene"]},
+ {"name": "alpha-pinene", "smiles": "CC1=CCC2CC1C2(C)C", "inchikey": "GRWFGVWFFZKLTI-UHFFFAOYSA-N", "synonyms": ["α-pinene"]},
+ {"name": "beta-pinene", "smiles": "C=C1CCC2CC1C2(C)C", "inchikey": "WTARULDDTDQWMU-UHFFFAOYSA-N", "synonyms": ["β-pinene"]},
+ {"name": "carvone", "smiles": "C=C(C)C1CC=C(C)C(=O)C1", "inchikey": "ULDHMXUKGWMISQ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "geraniol", "smiles": "CC(C)=CCC/C(C)=C/CO", "inchikey": "GLZPCOQZEFWAFX-JXMROGBWSA-N", "synonyms": []},
+ {"name": "nerol", "smiles": "CC(C)=CCC/C(C)=C\\CO", "inchikey": "GLZPCOQZEFWAFX-YFHOEESVSA-N", "synonyms": []},
+ {"name": "linalool", "smiles": "C=CC(C)(O)CCC=C(C)C", "inchikey": "CDOSHBSSFJOMGT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "geranial", "smiles": "CC(C)=CCC/C(C)=C/C=O", "inchikey": "WTEVQBCEXWBHNA-JXMROGBWSA-N", "synonyms": ["citral", "citral A"]},
+ {"name": "citronellol", "smiles": "CC(C)=CCCC(C)CCO", "inchikey": "QMVPMAAFGQKVCJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "farnesol", "smiles": "CC(C)=CCC/C(C)=C/CC/C(C)=C/CO", "inchikey": "CRDAMVZIKSXKFV-YFVJMOTDSA-N", "synonyms": []},
+ {"name": "thymol", "smiles": "Cc1ccc(C(C)C)c(O)c1", "inchikey": "MGSRCZKZVOBKFT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "carvacrol", "smiles": "Cc1ccc(C(C)C)cc1O", "inchikey": "RECUKUPTGUEGMW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "eucalyptol", "smiles": "CC12CCC(CC1)C(C)(C)O2", "inchikey": "WEEGYLXZBRQIMU-UHFFFAOYSA-N", "synonyms": ["1,8-cineole", "cineole"]},
+ {"name": "safrole", "smiles": "C=CCc1ccc2c(c1)OCO2", "inchikey": "ZMQAAUBTXCXRIC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "anethole", "smiles": "C/C=C/c1ccc(OC)cc1", "inchikey": "RUVINXPYWBROJD-ONEGZZNKSA-N", "synonyms": ["trans-anethole"]},
+ {"name": "capsaicin", "smiles": "COc1cc(CNC(=O)CCCC/C=C/C(C)C)ccc1O", "inchikey": "YKPUWZUDDOIDPM-SOFGYWHQSA-N", "synonyms": []},
+ {"name": "piperine", "smiles": "O=C(/C=C/C=C/c1ccc2c(c1)OCO2)N1CCCCC1", "inchikey": "MXXWOMGUGJBKIW-YPCIICBESA-N", "synonyms": []},
+ {"name": "curcumin", "smiles": "COc1cc(/C=C/C(=O)CC(=O)/C=C/c2ccc(O)c(OC)c2)ccc1O", "inchikey": "VFLDPWHFBUODDF-FCXRPNKRSA-N", "synonyms": []},
+ {"name": "resveratrol", "smiles": "Oc1ccc(/C=C/c2cc(O)cc(O)c2)cc1", "inchikey": "LUKBXSAWLPMMSZ-OWOJBTEDSA-N", "synonyms": ["trans-resveratrol"]},
+ {"name": "quercetin", "smiles": "O=c1c(O)c(-c2ccc(O)c(O)c2)oc2cc(O)cc(O)c12", "inchikey": "REFJWTPEDVJJIY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "kaempferol", "smiles": "O=c1c(O)c(-c2ccc(O)cc2)oc2cc(O)cc(O)c12", "inchikey": "IYRMWMYZSQPJKC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "genistein", "smiles": "O=c1c(-c2ccc(O)cc2)coc2cc(O)cc(O)c12", "inchikey": "TZBJGXHYKVUXJN-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "gallic acid", "smiles": "O=C(O)c1cc(O)c(O)c(O)c1", "inchikey": "LNTHITQWFMADLM-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "caffeic acid", "smiles": "O=C(O)/C=C/c1ccc(O)c(O)c1", "inchikey": "QAIPRVGONGVQAS-DUXPYHPUSA-N", "synonyms": []},
+ {"name": "ferulic acid", "smiles": "COc1cc(/C=C/C(=O)O)ccc1O", "inchikey": "KSEBMYQBYZTDHS-HWKANZROSA-N", "synonyms": []},
+ {"name": "(+)-catechin", "smiles": "Oc1ccc([C@H]2Oc3cc(O)cc(O)c3C[C@@H]2O)cc1O", "inchikey": "PFTAWBLQPZVEMU-DZGCQCFKSA-N", "synonyms": ["catechin"]},
+ {"name": "(-)-epicatechin", "smiles": "Oc1ccc([C@H]2Oc3cc(O)cc(O)c3C[C@H]2O)cc1O", "inchikey": "PFTAWBLQPZVEMU-UKRRQHHQSA-N", "synonyms": ["epicatechin"]},
+ {"name": "retinol", "smiles": "CC1=C(/C=C/C(C)=C/C=C/C(C)=C/CO)C(C)(C)CCC1", "inchikey": "FPIPGXGPPPQFEQ-OVSJKPMPSA-N", "synonyms": ["vitamin A", "all-trans-retinol"]},
+ {"name": "beta-carotene", "smiles": "CC1=C(/C=C/C(C)=C/C=C/C(C)=C/C=C/C=C(C)/C=C/C=C(C)/C=C/C2=C(C)CCCC2(C)C)C(C)(C)CCC1", "inchikey": "OENHQHLEOONYIE-JLTXGRSLSA-N", "synonyms": ["β-carotene"]},
+ {"name": "squalene", "smiles": "CC(C)=CCC/C(C)=C/CC/C(C)=C/CC/C=C(C)/CC/C=C(C)/CCC=C(C)C", "inchikey": "YYGNTYWPHWGJRM-AAJYLUCBSA-N", "synonyms": []},
+ {"name": "alpha-tocopherol", "smiles": "Cc1c(C)c2c(c(C)c1O)CC[C@@](C)(CCC[C@H](C)CCC[C@H](C)CCCC(C)C)O2", "inchikey": "GVJHHUAWPYXKBD-IEOSBIPESA-N", "synonyms": ["vitamin E", "α-tocopherol"]},
+ {"name": "oleic acid", "smiles": "CCCCCCCC/C=C\\CCCCCCCC(=O)O", "inchikey": "ZQPPMHVWECSIRJ-KTKRTIGZSA-N", "synonyms": []},
+ {"name": "linoleic acid", "smiles": "CCCCC/C=C\\C/C=C\\CCCCCCCC(=O)O", "inchikey": "OYHQOLUKZRVURQ-HZJYTTRNSA-N", "synonyms": []},
+ {"name": "alpha-linolenic acid", "smiles": "CC/C=C\\C/C=C\\C/C=C\\CCCCCCCC(=O)O", "inchikey": "DTOSIQBPPRVQHS-PDBXOOCHSA-N", "synonyms": ["α-linolenic acid"]},
+ {"name": "arachidonic acid", "smiles": "CCCCC/C=C\\C/C=C\\C/C=C\\C/C=C\\CCCC(=O)O", "inchikey": "YZXBAPSDXZZRGB-DOFZRALJSA-N", "synonyms": []},
+ {"name": "prostaglandin E2", "smiles": "CCCCC[C@H](O)/C=C/[C@H]1[C@H](O)CC(=O)[C@@H]1C/C=C\\CCCC(=O)O", "inchikey": "XEYBRNLFEZDVAW-ARSRFYASSA-N", "synonyms": ["PGE2", "dinoprostone"]},
+ {"name": "mescaline", "smiles": "COc1cc(CCN)cc(OC)c1OC", "inchikey": "RHCSKNNOAZULRK-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "N,N-dimethyltryptamine", "smiles": "CN(C)CCc1c[nH]c2ccccc12", "inchikey": "DMULVCHRPCFFGV-UHFFFAOYSA-N", "synonyms": ["DMT"]},
+ {"name": "psilocybin", "smiles": "CN(C)CCc1c[nH]c2cccc(OP(=O)(O)O)c12", "inchikey": "QVDSEJDULKLHCG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "psilocin", "smiles": "CN(C)CCc1c[nH]c2cccc(O)c12", "inchikey": "SPCIYGNTAMCTRO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "lysergic acid diethylamide", "smiles": "CCN(CC)C(=O)[C@H]1CN(C)[C@@H]2Cc3c[nH]c4cccc(c34)C2=C1", "inchikey": "VAYOSLLFUXYJDT-RDTXWAMCSA-N", "synonyms": ["LSD"]},
+ {"name": "tetrahydrocannabinol", "smiles": "CCCCCc1cc(O)c2c(c1)OC(C)(C)[C@@H]1CCC(C)=C[C@@H]21", "inchikey": "CYQFCXCEBYINGO-IAGOWNOFSA-N", "synonyms": ["THC", "delta-9-tetrahydrocannabinol", "dronabinol"]},
+ {"name": "cannabidiol", "smiles": "C=C(C)[C@@H]1CCC(C)=C[C@H]1c1c(O)cc(CCCCC)cc1O", "inchikey": "QHMBSVQNZZTUGM-ZWKOTPCHSA-N", "synonyms": ["CBD"]},
+ {"name": "berberine", "smiles": "COc1ccc2cc3[n+](cc2c1OC)CCc1cc2c(cc1-3)OCO2", "inchikey": "YBHILYKTIRIUTE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "papaverine", "smiles": "COc1ccc(Cc2nccc3cc(OC)c(OC)cc23)cc1OC", "inchikey": "XQYZDYMELSJDRZ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "indigo", "smiles": "O=C1/C(=C2\\Nc3ccccc3C2=O)Nc2ccccc12", "inchikey": "COHYTHOBJLSHDF-BUHFOSPRSA-N", "synonyms": []}
+ ]
+}
diff --git a/backend/app/data/names/organics.json b/backend/app/data/names/organics.json
new file mode 100644
index 00000000..c2fa6f75
--- /dev/null
+++ b/backend/app/data/names/organics.json
@@ -0,0 +1,122 @@
+{
+ "source": "FormChem",
+ "licence": "Apache-2.0",
+ "category": "organics",
+ "method": "Names and SMILES written for FormChem; InChIKeys computed with RDKit 2025.09.3 (standard InChI).",
+ "entries": [
+ {"name": "methane", "smiles": "C", "inchikey": "VNWKTOKETHGBQD-UHFFFAOYSA-N", "synonyms": ["marsh gas"]},
+ {"name": "ethane", "smiles": "CC", "inchikey": "OTMSDBZUPAUEDD-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "propane", "smiles": "CCC", "inchikey": "ATUOYWHBWRKTHZ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "butane", "smiles": "CCCC", "inchikey": "IJDNQMDRQITEOD-UHFFFAOYSA-N", "synonyms": ["n-butane"]},
+ {"name": "isobutane", "smiles": "CC(C)C", "inchikey": "NNPPMTNAJDCUHE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "isopentane", "smiles": "CCC(C)C", "inchikey": "QWTDNUCVQCZILF-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "neopentane", "smiles": "CC(C)(C)C", "inchikey": "CRSOQBOWXPBRES-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethylene", "smiles": "C=C", "inchikey": "VGGSQFUCUMXWEO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "propylene", "smiles": "C=CC", "inchikey": "QQONPFPTGQHPMA-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "isobutylene", "smiles": "C=C(C)C", "inchikey": "VQTUBCCKSQIDNK-UHFFFAOYSA-N", "synonyms": ["isobutene"]},
+ {"name": "acetylene", "smiles": "C#C", "inchikey": "HSFWRNGVRCDJHI-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "isoprene", "smiles": "C=CC(=C)C", "inchikey": "RRHGJUQNOFWUDK-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "1,3-butadiene", "smiles": "C=CC=C", "inchikey": "KAKZBPTYRLMSJV-UHFFFAOYSA-N", "synonyms": ["butadiene"]},
+ {"name": "allene", "smiles": "C=C=C", "inchikey": "IYABWNGZIDDRAK-UHFFFAOYSA-N", "synonyms": ["propadiene"]},
+ {"name": "styrene", "smiles": "C=Cc1ccccc1", "inchikey": "PPBRXRYQALVLMV-UHFFFAOYSA-N", "synonyms": ["vinylbenzene"]},
+ {"name": "naphthalene", "smiles": "c1ccc2ccccc2c1", "inchikey": "UFWIBTONFRDIAS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "anthracene", "smiles": "c1ccc2cc3ccccc3cc2c1", "inchikey": "MWPLVEDNUUSJAV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phenanthrene", "smiles": "c1ccc2c(c1)ccc1ccccc12", "inchikey": "YNPNZTXNASCQKK-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "pyrene", "smiles": "c1cc2ccc3cccc4ccc(c1)c2c34", "inchikey": "BBEAQIROQSPTKN-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "biphenyl", "smiles": "c1ccc(-c2ccccc2)cc1", "inchikey": "ZUOUZKKEUPVFJK-UHFFFAOYSA-N", "synonyms": ["diphenyl"]},
+ {"name": "fluorene", "smiles": "c1ccc2c(c1)Cc1ccccc1-2", "inchikey": "NIHNNTQXNPWCJQ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "azulene", "smiles": "c1ccc2cccc-2cc1", "inchikey": "CUFNKYGDVFVPHO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "indene", "smiles": "C1=Cc2ccccc2C1", "inchikey": "YBYIRNPNPLQARY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "indane", "smiles": "c1ccc2c(c1)CCC2", "inchikey": "PQNFLJBBNBOBRQ-UHFFFAOYSA-N", "synonyms": ["indan"]},
+ {"name": "tetralin", "smiles": "c1ccc2c(c1)CCCC2", "inchikey": "CXWXQJXEFPUFDZ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "decalin", "smiles": "C1CCC2CCCCC2C1", "inchikey": "NNBZCPXTIHJBJL-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "adamantane", "smiles": "C1C2CC3CC1CC(C2)C3", "inchikey": "ORILYTVJVMAKLC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "cubane", "smiles": "C12C3C4C1C1C2C3C41", "inchikey": "TXWRERCHRDBNLG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "norbornane", "smiles": "C1CC2CCC1C2", "inchikey": "UMRZSTCPUPJPOJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phenol", "smiles": "Oc1ccccc1", "inchikey": "ISWSIDIOOBJBQZ-UHFFFAOYSA-N", "synonyms": ["carbolic acid"]},
+ {"name": "o-cresol", "smiles": "Cc1ccccc1O", "inchikey": "QWVGKYWNOKOFNN-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "m-cresol", "smiles": "Cc1cccc(O)c1", "inchikey": "RLSSMJSEOOYNOY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "p-cresol", "smiles": "Cc1ccc(O)cc1", "inchikey": "IWDCLRJOBJJRNH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "catechol", "smiles": "Oc1ccccc1O", "inchikey": "YCIMNLLNPGFGHC-UHFFFAOYSA-N", "synonyms": ["pyrocatechol"]},
+ {"name": "resorcinol", "smiles": "Oc1cccc(O)c1", "inchikey": "GHMLBKRAJCXXBS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "hydroquinone", "smiles": "Oc1ccc(O)cc1", "inchikey": "QIGBRXMKCJKVMJ-UHFFFAOYSA-N", "synonyms": ["quinol"]},
+ {"name": "pyrogallol", "smiles": "Oc1cccc(O)c1O", "inchikey": "WQGWDDDVZFFDIG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phloroglucinol", "smiles": "Oc1cc(O)cc(O)c1", "inchikey": "QCDYQQDYXPDABM-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "1,4-benzoquinone", "smiles": "O=C1C=CC(=O)C=C1", "inchikey": "AZQWKYJCGOJGHM-UHFFFAOYSA-N", "synonyms": ["p-benzoquinone", "quinone"]},
+ {"name": "aniline", "smiles": "Nc1ccccc1", "inchikey": "PAYRUJLWNCNPSJ-UHFFFAOYSA-N", "synonyms": ["aminobenzene"]},
+ {"name": "o-toluidine", "smiles": "Cc1ccccc1N", "inchikey": "RNVCVTLRINQCPJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "p-toluidine", "smiles": "Cc1ccc(N)cc1", "inchikey": "RZXMPPFPUUCRFN-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "p-anisidine", "smiles": "COc1ccc(N)cc1", "inchikey": "BHAAPTBBJKJZER-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "nitrobenzene", "smiles": "O=[N+]([O-])c1ccccc1", "inchikey": "LQNUZADURLCDLV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "benzoic acid", "smiles": "O=C(O)c1ccccc1", "inchikey": "WPYMKLBDIGXBTP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "salicylic acid", "smiles": "O=C(O)c1ccccc1O", "inchikey": "YGSDEFSMJLZEOE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phthalic acid", "smiles": "O=C(O)c1ccccc1C(=O)O", "inchikey": "XNGIFLGASWRNHJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "isophthalic acid", "smiles": "O=C(O)c1cccc(C(=O)O)c1", "inchikey": "QQVIHTHCMHWDBS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "terephthalic acid", "smiles": "O=C(O)c1ccc(C(=O)O)cc1", "inchikey": "KKEYFWRCBNTPAC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phthalic anhydride", "smiles": "O=C1OC(=O)c2ccccc21", "inchikey": "LGRFSURHDFAFJT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "maleic anhydride", "smiles": "O=C1C=CC(=O)O1", "inchikey": "FPYJFEHAWHCUMM-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "succinic anhydride", "smiles": "O=C1CCC(=O)O1", "inchikey": "RINCXYDBBGOEEQ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phthalimide", "smiles": "O=C1NC(=O)c2ccccc21", "inchikey": "XKJCHHZQLQNZHY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "succinimide", "smiles": "O=C1CCC(=O)N1", "inchikey": "KZNICNPSHKQLFF-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "acetophenone", "smiles": "CC(=O)c1ccccc1", "inchikey": "KWOLFJPFCHCOCG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "benzophenone", "smiles": "O=C(c1ccccc1)c1ccccc1", "inchikey": "RWCCWEUUXYIKHB-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "benzyl alcohol", "smiles": "OCc1ccccc1", "inchikey": "WVDDGKGOMKODPV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "benzylamine", "smiles": "NCc1ccccc1", "inchikey": "WGQKYBSKWIADBV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "cinnamaldehyde", "smiles": "O=C/C=C/c1ccccc1", "inchikey": "KJPRLNWUNMBNBZ-QPJJXVBHSA-N", "synonyms": ["trans-cinnamaldehyde"]},
+ {"name": "cinnamic acid", "smiles": "O=C(O)/C=C/c1ccccc1", "inchikey": "WBYWAXJHAXSJNI-VOTSOKGWSA-N", "synonyms": ["trans-cinnamic acid"]},
+ {"name": "vanillin", "smiles": "COc1cc(C=O)ccc1O", "inchikey": "MWOOGOJBHIARFG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "eugenol", "smiles": "C=CCc1ccc(O)c(OC)c1", "inchikey": "RRAFCDWBNXTKKO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "methyl salicylate", "smiles": "COC(=O)c1ccccc1O", "inchikey": "OSWPMRLSEDHDFF-UHFFFAOYSA-N", "synonyms": ["oil of wintergreen"]},
+ {"name": "coumarin", "smiles": "O=c1ccc2ccccc2o1", "inchikey": "ZYGHJZDHTFUPRJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "acrolein", "smiles": "C=CC=O", "inchikey": "HGINCPLSRVDWNT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "crotonaldehyde", "smiles": "C/C=C/C=O", "inchikey": "MLUCVPSAIODCQM-NSCUHMNNSA-N", "synonyms": []},
+ {"name": "acrylic acid", "smiles": "C=CC(=O)O", "inchikey": "NIXOWILDQLNWCW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "methacrylic acid", "smiles": "C=C(C)C(=O)O", "inchikey": "CERQOIWHTDAKMF-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "methyl methacrylate", "smiles": "C=C(C)C(=O)OC", "inchikey": "VVQNEPGJFQJSBK-UHFFFAOYSA-N", "synonyms": ["MMA"]},
+ {"name": "vinyl chloride", "smiles": "C=CCl", "inchikey": "BZHJMEDXRYGGRV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "vinyl acetate", "smiles": "C=COC(C)=O", "inchikey": "XTXRWKRVRITETP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "tetrafluoroethylene", "smiles": "FC(F)=C(F)F", "inchikey": "BFKJFAAPBSQJPD-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethylenediamine", "smiles": "NCCN", "inchikey": "PIICEJLVQHRZGT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethanolamine", "smiles": "NCCO", "inchikey": "HZAXFHJVJLSVMW-UHFFFAOYSA-N", "synonyms": ["monoethanolamine"]},
+ {"name": "diethanolamine", "smiles": "OCCNCCO", "inchikey": "ZBCBWPMODOFKDW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "triethanolamine", "smiles": "OCCN(CCO)CCO", "inchikey": "GSEJCLTVZPLZKY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "hexamethylenediamine", "smiles": "NCCCCCCN", "inchikey": "NAQMVNRVTILPCV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "caprolactam", "smiles": "O=C1CCCCCN1", "inchikey": "JBKVHLHDHHXQEQ-UHFFFAOYSA-N", "synonyms": ["epsilon-caprolactam"]},
+ {"name": "adipic acid", "smiles": "O=C(O)CCCCC(=O)O", "inchikey": "WNLRTRBMVRJNCN-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "methylamine", "smiles": "CN", "inchikey": "BAVYZALUXZFZLV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "dimethylamine", "smiles": "CNC", "inchikey": "ROSDSFDQCJNGOL-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "trimethylamine", "smiles": "CN(C)C", "inchikey": "GETQZCLCWQTVFV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "trinitrotoluene", "smiles": "Cc1c([N+](=O)[O-])cc([N+](=O)[O-])cc1[N+](=O)[O-]", "inchikey": "SPSSULHKWOKEEL-UHFFFAOYSA-N", "synonyms": ["TNT", "2,4,6-trinitrotoluene"]},
+ {"name": "picric acid", "smiles": "O=[N+]([O-])c1cc([N+](=O)[O-])c(O)c([N+](=O)[O-])c1", "inchikey": "OXNIZHLAWKMVMX-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "RDX", "smiles": "O=[N+]([O-])N1CN([N+](=O)[O-])CN([N+](=O)[O-])C1", "inchikey": "XTFIVUDBNACUBN-UHFFFAOYSA-N", "synonyms": ["cyclonite"]},
+ {"name": "butylated hydroxytoluene", "smiles": "Cc1cc(C(C)(C)C)c(O)c(C(C)(C)C)c1", "inchikey": "NLZUEZXRPGMBCV-UHFFFAOYSA-N", "synonyms": ["BHT"]},
+ {"name": "bisphenol A", "smiles": "CC(C)(c1ccc(O)cc1)c1ccc(O)cc1", "inchikey": "IISBACLAFKSPIT-UHFFFAOYSA-N", "synonyms": ["BPA"]},
+ {"name": "indole", "smiles": "c1ccc2[nH]ccc2c1", "inchikey": "SIKJAQJRHWYJAI-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "quinoline", "smiles": "c1ccc2ncccc2c1", "inchikey": "SMWDFEZZVXVKRB-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "isoquinoline", "smiles": "c1ccc2cnccc2c1", "inchikey": "AWJUIBRHMBBTKR-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "pyrrole", "smiles": "c1cc[nH]c1", "inchikey": "KAESVJOAVNADME-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "furan", "smiles": "c1ccoc1", "inchikey": "YLQBMQCUIZJEEH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "thiophene", "smiles": "c1ccsc1", "inchikey": "YTPLMLYBLZKORZ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "pyrimidine", "smiles": "c1cncnc1", "inchikey": "CZPWVGJYEJSRLH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "pyrazine", "smiles": "c1cnccn1", "inchikey": "KYQCOXFCLRTKLS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "carbazole", "smiles": "c1ccc2c(c1)[nH]c1ccccc12", "inchikey": "UJOBWOGCFQCDNV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "acridine", "smiles": "c1ccc2nc3ccccc3cc2c1", "inchikey": "DZBUGLKDJFMEHC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phenothiazine", "smiles": "c1ccc2c(c1)Nc1ccccc1S2", "inchikey": "WJFKNYWRSNBZNX-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "methenamine", "smiles": "C1N2CN3CN1CN(C2)C3", "inchikey": "VKYKSIONXSXAKP-UHFFFAOYSA-N", "synonyms": ["hexamine", "hexamethylenetetramine"]},
+ {"name": "diphenylamine", "smiles": "c1ccc(Nc2ccccc2)cc1", "inchikey": "DMBHHRLKUKUOEG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "triphenylmethane", "smiles": "c1ccc(C(c2ccccc2)c2ccccc2)cc1", "inchikey": "AAAQKTZKLRYKHR-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "stilbene", "smiles": "C(=C/c1ccccc1)\\c1ccccc1", "inchikey": "PJANXHGTPQOBST-VAWYXSNFSA-N", "synonyms": ["trans-stilbene", "(E)-stilbene"]},
+ {"name": "azobenzene", "smiles": "c1ccc(/N=N/c2ccccc2)cc1", "inchikey": "DMLAVOWQYNRWNQ-BUHFOSPRSA-N", "synonyms": ["trans-azobenzene"]},
+ {"name": "chloral hydrate", "smiles": "OC(O)C(Cl)(Cl)Cl", "inchikey": "RNFNDJAIBTYOQL-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "DDT", "smiles": "ClC(Cl)(Cl)C(c1ccc(Cl)cc1)c1ccc(Cl)cc1", "inchikey": "YVGGHNCTFXOJCH-UHFFFAOYSA-N", "synonyms": ["dichlorodiphenyltrichloroethane"]},
+ {"name": "glyphosate", "smiles": "O=C(O)CNCP(=O)(O)O", "inchikey": "XDDAORKBJWWYJS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "butyric acid", "smiles": "CCCC(=O)O", "inchikey": "FERIUCNNQQJTOY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "propionic acid", "smiles": "CCC(=O)O", "inchikey": "XBDQKXXYIPTUBI-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "valeric acid", "smiles": "CCCCC(=O)O", "inchikey": "NQPDZGIKBAWPEJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "caproic acid", "smiles": "CCCCCC(=O)O", "inchikey": "FUZZWVXGSFPDMH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "lauric acid", "smiles": "CCCCCCCCCCCC(=O)O", "inchikey": "POULHZVOKOAJMA-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "myristic acid", "smiles": "CCCCCCCCCCCCCC(=O)O", "inchikey": "TUNFSRHWOTWDNC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "palmitic acid", "smiles": "CCCCCCCCCCCCCCCC(=O)O", "inchikey": "IPCSVZSSVZVIGE-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "stearic acid", "smiles": "CCCCCCCCCCCCCCCCCC(=O)O", "inchikey": "QIQXTHQIDYTFRH-UHFFFAOYSA-N", "synonyms": []}
+ ]
+}
diff --git a/backend/app/data/names/reagents.json b/backend/app/data/names/reagents.json
new file mode 100644
index 00000000..30bd62ab
--- /dev/null
+++ b/backend/app/data/names/reagents.json
@@ -0,0 +1,161 @@
+{
+ "source": "FormChem",
+ "licence": "Apache-2.0",
+ "category": "reagents",
+ "method": "Names and SMILES written for FormChem; InChIKeys computed with RDKit 2025.09.3 (standard InChI).",
+ "entries": [
+ {"name": "hydrogen chloride", "smiles": "Cl", "inchikey": "VEXZGXHMUGYJMC-UHFFFAOYSA-N", "synonyms": ["hydrochloric acid", "HCl"]},
+ {"name": "hydrogen bromide", "smiles": "Br", "inchikey": "CPELXLSAUQHCOX-UHFFFAOYSA-N", "synonyms": ["hydrobromic acid", "HBr"]},
+ {"name": "hydrogen iodide", "smiles": "I", "inchikey": "XMBWDFGMSWQBCA-UHFFFAOYSA-N", "synonyms": ["hydroiodic acid", "HI"]},
+ {"name": "hydrogen fluoride", "smiles": "F", "inchikey": "KRHYYFGTRYWZRS-UHFFFAOYSA-N", "synonyms": ["hydrofluoric acid", "HF"]},
+ {"name": "sulfuric acid", "smiles": "O=S(=O)(O)O", "inchikey": "QAOWNCQODCNURD-UHFFFAOYSA-N", "synonyms": ["sulphuric acid", "H2SO4"]},
+ {"name": "nitric acid", "smiles": "O=[N+]([O-])O", "inchikey": "GRYLNZFGIOXLOG-UHFFFAOYSA-N", "synonyms": ["HNO3"]},
+ {"name": "phosphoric acid", "smiles": "O=P(O)(O)O", "inchikey": "NBIIXXVUZAFLBC-UHFFFAOYSA-N", "synonyms": ["orthophosphoric acid", "H3PO4"]},
+ {"name": "perchloric acid", "smiles": "O=Cl(=O)(=O)O", "inchikey": "VLTRZXGMWDSKGL-UHFFFAOYSA-N", "synonyms": ["HClO4"]},
+ {"name": "ammonia", "smiles": "N", "inchikey": "QGZKDVFQNNGYKY-UHFFFAOYSA-N", "synonyms": ["NH3"]},
+ {"name": "hydrazine", "smiles": "NN", "inchikey": "OAKJQQAXSVQMHS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "hydroxylamine", "smiles": "NO", "inchikey": "AVXURJPOCDRRFD-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "hydrogen peroxide", "smiles": "OO", "inchikey": "MHAJPDPJQMAIIY-UHFFFAOYSA-N", "synonyms": ["H2O2"]},
+ {"name": "sodium hydroxide", "smiles": "[Na+].[OH-]", "inchikey": "HEMHJVSKTPXQMS-UHFFFAOYSA-M", "synonyms": ["NaOH", "caustic soda", "lye"]},
+ {"name": "potassium hydroxide", "smiles": "[K+].[OH-]", "inchikey": "KWYUFKZDYYNOTN-UHFFFAOYSA-M", "synonyms": ["KOH", "caustic potash"]},
+ {"name": "lithium hydroxide", "smiles": "[Li+].[OH-]", "inchikey": "WMFOQBRAJBCJND-UHFFFAOYSA-M", "synonyms": ["LiOH"]},
+ {"name": "sodium chloride", "smiles": "[Na+].[Cl-]", "inchikey": "FAPWRFPIFSIZLT-UHFFFAOYSA-M", "synonyms": ["NaCl", "table salt"]},
+ {"name": "potassium chloride", "smiles": "[K+].[Cl-]", "inchikey": "WCUXLLCKKVVCTQ-UHFFFAOYSA-M", "synonyms": ["KCl"]},
+ {"name": "sodium bromide", "smiles": "[Na+].[Br-]", "inchikey": "JHJLBTNAGRQEKS-UHFFFAOYSA-M", "synonyms": ["NaBr"]},
+ {"name": "sodium iodide", "smiles": "[Na+].[I-]", "inchikey": "FVAUCKIRQBBSSJ-UHFFFAOYSA-M", "synonyms": ["NaI"]},
+ {"name": "potassium iodide", "smiles": "[K+].[I-]", "inchikey": "NLKNQRATVPKPDG-UHFFFAOYSA-M", "synonyms": ["KI"]},
+ {"name": "lithium chloride", "smiles": "[Li+].[Cl-]", "inchikey": "KWGKDLIKAYFUFQ-UHFFFAOYSA-M", "synonyms": ["LiCl"]},
+ {"name": "ammonium chloride", "smiles": "[NH4+].[Cl-]", "inchikey": "NLXLAEXVIDQMFP-UHFFFAOYSA-N", "synonyms": ["NH4Cl", "sal ammoniac"]},
+ {"name": "sodium carbonate", "smiles": "O=C([O-])[O-].[Na+].[Na+]", "inchikey": "CDBYLPFSWZWCQE-UHFFFAOYSA-L", "synonyms": ["soda ash", "Na2CO3"]},
+ {"name": "sodium bicarbonate", "smiles": "O=C([O-])O.[Na+]", "inchikey": "UIIMBOGNXHQVGW-UHFFFAOYSA-M", "synonyms": ["sodium hydrogen carbonate", "baking soda", "NaHCO3"]},
+ {"name": "potassium carbonate", "smiles": "O=C([O-])[O-].[K+].[K+]", "inchikey": "BWHMMNNQKKPAPP-UHFFFAOYSA-L", "synonyms": ["K2CO3", "potash"]},
+ {"name": "cesium carbonate", "smiles": "O=C([O-])[O-].[Cs+].[Cs+]", "inchikey": "FJDQFPXHSGXQBY-UHFFFAOYSA-L", "synonyms": ["caesium carbonate", "Cs2CO3"]},
+ {"name": "calcium carbonate", "smiles": "O=C([O-])[O-].[Ca+2]", "inchikey": "VTYYLEPIZMXCLO-UHFFFAOYSA-L", "synonyms": ["CaCO3"]},
+ {"name": "lithium carbonate", "smiles": "O=C([O-])[O-].[Li+].[Li+]", "inchikey": "XGZVUEUWXADBQD-UHFFFAOYSA-L", "synonyms": ["Li2CO3"]},
+ {"name": "sodium sulfate", "smiles": "O=S(=O)([O-])[O-].[Na+].[Na+]", "inchikey": "PMZURENOXWZQFD-UHFFFAOYSA-L", "synonyms": ["Na2SO4"]},
+ {"name": "magnesium sulfate", "smiles": "O=S(=O)([O-])[O-].[Mg+2]", "inchikey": "CSNNHWWHGAXBCP-UHFFFAOYSA-L", "synonyms": ["MgSO4"]},
+ {"name": "calcium chloride", "smiles": "[Ca+2].[Cl-].[Cl-]", "inchikey": "UXVMQQNJUSDDNG-UHFFFAOYSA-L", "synonyms": ["CaCl2"]},
+ {"name": "sodium hydride", "smiles": "[H-].[Na+]", "inchikey": "BZKBCQXYZZXSCO-UHFFFAOYSA-N", "synonyms": ["NaH"]},
+ {"name": "lithium aluminium hydride", "smiles": "[AlH4-].[Li+]", "inchikey": "OCZDCIYGECBNKL-UHFFFAOYSA-N", "synonyms": ["lithium aluminum hydride", "LAH", "LiAlH4"]},
+ {"name": "sodium borohydride", "smiles": "[BH4-].[Na+]", "inchikey": "YOQDYZUWIQVZSF-UHFFFAOYSA-N", "synonyms": ["NaBH4"]},
+ {"name": "sodium cyanoborohydride", "smiles": "N#C[BH3-].[Na+]", "inchikey": "CVDUGUOQTVTBJH-UHFFFAOYSA-N", "synonyms": ["NaBH3CN"]},
+ {"name": "sodium triacetoxyborohydride", "smiles": "CC(=O)O[BH-](OC(C)=O)OC(C)=O.[Na+]", "inchikey": "HHYFEYBWNZJVFQ-UHFFFAOYSA-N", "synonyms": ["STAB", "NaBH(OAc)3"]},
+ {"name": "diisobutylaluminium hydride", "smiles": "CC(C)C[AlH]CC(C)C", "inchikey": "AZWXAPCAJCYGIA-UHFFFAOYSA-N", "synonyms": ["DIBAL", "DIBAL-H", "diisobutylaluminum hydride"]},
+ {"name": "n-butyllithium", "smiles": "CCCC[Li]", "inchikey": "MZRVEZGGRBJDDB-UHFFFAOYSA-N", "synonyms": ["butyllithium", "nBuLi", "n-BuLi"]},
+ {"name": "tert-butyllithium", "smiles": "CC(C)(C)[Li]", "inchikey": "BKDLGMUIXWPYGD-UHFFFAOYSA-N", "synonyms": ["t-BuLi", "tBuLi"]},
+ {"name": "methyllithium", "smiles": "C[Li]", "inchikey": "DVSDBMFJEQPWNO-UHFFFAOYSA-N", "synonyms": ["MeLi"]},
+ {"name": "lithium diisopropylamide", "smiles": "CC(C)[N-]C(C)C.[Li+]", "inchikey": "ZCSHNCUQKCANBX-UHFFFAOYSA-N", "synonyms": ["LDA"]},
+ {"name": "lithium bis(trimethylsilyl)amide", "smiles": "C[Si](C)(C)[N-][Si](C)(C)C.[Li+]", "inchikey": "YNESATAKKCNGOF-UHFFFAOYSA-N", "synonyms": ["LiHMDS", "LHMDS"]},
+ {"name": "potassium tert-butoxide", "smiles": "CC(C)(C)[O-].[K+]", "inchikey": "LPNYRYFBWFDTMA-UHFFFAOYSA-N", "synonyms": ["KOtBu", "t-BuOK", "potassium t-butoxide"]},
+ {"name": "sodium methoxide", "smiles": "C[O-].[Na+]", "inchikey": "WQDUMFSSJAZKTM-UHFFFAOYSA-N", "synonyms": ["NaOMe"]},
+ {"name": "sodium ethoxide", "smiles": "CC[O-].[Na+]", "inchikey": "QDRKDTQENPPHOJ-UHFFFAOYSA-N", "synonyms": ["NaOEt"]},
+ {"name": "triethylamine", "smiles": "CCN(CC)CC", "inchikey": "ZMANZCXQSJIPKH-UHFFFAOYSA-N", "synonyms": ["TEA", "Et3N"]},
+ {"name": "N,N-diisopropylethylamine", "smiles": "CCN(C(C)C)C(C)C", "inchikey": "JGFZNNIVVJXRND-UHFFFAOYSA-N", "synonyms": ["DIPEA", "Hunig's base", "DIEA"]},
+ {"name": "1,8-diazabicyclo[5.4.0]undec-7-ene", "smiles": "C1CCC2=NCCCN2CC1", "inchikey": "GQHTUMJGOHRCHB-UHFFFAOYSA-N", "synonyms": ["DBU"]},
+ {"name": "4-dimethylaminopyridine", "smiles": "CN(C)c1ccncc1", "inchikey": "VHYFNPMBLIVWCW-UHFFFAOYSA-N", "synonyms": ["DMAP"]},
+ {"name": "1,4-diazabicyclo[2.2.2]octane", "smiles": "C1CN2CCN1CC2", "inchikey": "IMNIMPAHZVJRPE-UHFFFAOYSA-N", "synonyms": ["DABCO", "triethylenediamine"]},
+ {"name": "imidazole", "smiles": "c1c[nH]cn1", "inchikey": "RAXXELZNTBOGNW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "2,6-lutidine", "smiles": "Cc1cccc(C)n1", "inchikey": "OISVCGZHLKNMSJ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "N-methylmorpholine", "smiles": "CN1CCOCC1", "inchikey": "SJRJJKPEHAURKC-UHFFFAOYSA-N", "synonyms": ["NMM"]},
+ {"name": "tetramethylethylenediamine", "smiles": "CN(C)CCN(C)C", "inchikey": "KWYHDKDOAIKMQN-UHFFFAOYSA-N", "synonyms": ["TMEDA"]},
+ {"name": "morpholine", "smiles": "C1COCCN1", "inchikey": "YNAVUWVOSKDBBP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "piperidine", "smiles": "C1CCNCC1", "inchikey": "NQRYJNQNLNOLGT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "pyrrolidine", "smiles": "C1CCNC1", "inchikey": "RWRDLPDLKQPQOW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "diisopropylamine", "smiles": "CC(C)NC(C)C", "inchikey": "UAOMVDZJSHZZME-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "thionyl chloride", "smiles": "O=S(Cl)Cl", "inchikey": "FYSNRJHAOHDILO-UHFFFAOYSA-N", "synonyms": ["SOCl2"]},
+ {"name": "oxalyl chloride", "smiles": "O=C(Cl)C(=O)Cl", "inchikey": "CTSLXHKWHWQRSH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "phosphoryl chloride", "smiles": "O=P(Cl)(Cl)Cl", "inchikey": "XHXFXVLFKHQFAL-UHFFFAOYSA-N", "synonyms": ["phosphorus oxychloride", "POCl3"]},
+ {"name": "phosphorus pentachloride", "smiles": "ClP(Cl)(Cl)(Cl)Cl", "inchikey": "UHZYTMXLRWXGPK-UHFFFAOYSA-N", "synonyms": ["PCl5"]},
+ {"name": "phosphorus tribromide", "smiles": "BrP(Br)Br", "inchikey": "IPNPIHIZVLFAFP-UHFFFAOYSA-N", "synonyms": ["PBr3"]},
+ {"name": "acetyl chloride", "smiles": "CC(=O)Cl", "inchikey": "WETWJCDKMRHUPV-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "acetic anhydride", "smiles": "CC(=O)OC(C)=O", "inchikey": "WFDIJRYMOXRFFG-UHFFFAOYSA-N", "synonyms": ["Ac2O"]},
+ {"name": "benzoyl chloride", "smiles": "O=C(Cl)c1ccccc1", "inchikey": "PASDCCFISLVPSO-UHFFFAOYSA-N", "synonyms": ["BzCl"]},
+ {"name": "p-toluenesulfonyl chloride", "smiles": "Cc1ccc(S(=O)(=O)Cl)cc1", "inchikey": "YYROPELSRYBVMQ-UHFFFAOYSA-N", "synonyms": ["tosyl chloride", "TsCl"]},
+ {"name": "methanesulfonyl chloride", "smiles": "CS(=O)(=O)Cl", "inchikey": "QARBMVPHQWIHKH-UHFFFAOYSA-N", "synonyms": ["mesyl chloride", "MsCl"]},
+ {"name": "trifluoromethanesulfonic anhydride", "smiles": "O=S(=O)(OS(=O)(=O)C(F)(F)F)C(F)(F)F", "inchikey": "WJKHJLXJJJATHN-UHFFFAOYSA-N", "synonyms": ["triflic anhydride", "Tf2O"]},
+ {"name": "p-toluenesulfonic acid", "smiles": "Cc1ccc(S(=O)(=O)O)cc1", "inchikey": "JOXIMZWYDAKGHI-UHFFFAOYSA-N", "synonyms": ["tosic acid", "TsOH", "PTSA"]},
+ {"name": "methanesulfonic acid", "smiles": "CS(=O)(=O)O", "inchikey": "AFVFQIVMOAPDHO-UHFFFAOYSA-N", "synonyms": ["MsOH"]},
+ {"name": "trifluoromethanesulfonic acid", "smiles": "O=S(=O)(O)C(F)(F)F", "inchikey": "ITMCEJHCFYSIIV-UHFFFAOYSA-N", "synonyms": ["triflic acid", "TfOH"]},
+ {"name": "di-tert-butyl dicarbonate", "smiles": "CC(C)(C)OC(=O)OC(=O)OC(C)(C)C", "inchikey": "DYHSDKLCOJIUFX-UHFFFAOYSA-N", "synonyms": ["Boc anhydride", "Boc2O"]},
+ {"name": "benzyl chloroformate", "smiles": "O=C(Cl)OCc1ccccc1", "inchikey": "HSDAJNMJOMSNEV-UHFFFAOYSA-N", "synonyms": ["Cbz-Cl", "CbzCl"]},
+ {"name": "9-fluorenylmethyl chloroformate", "smiles": "O=C(Cl)OCC1c2ccccc2-c2ccccc21", "inchikey": "IRXSLJNXXZKURP-UHFFFAOYSA-N", "synonyms": ["Fmoc-Cl", "Fmoc chloride"]},
+ {"name": "N,N'-dicyclohexylcarbodiimide", "smiles": "C(=NC1CCCCC1)=NC1CCCCC1", "inchikey": "QOSSAOTZNIDXMA-UHFFFAOYSA-N", "synonyms": ["DCC"]},
+ {"name": "1-ethyl-3-(3-dimethylaminopropyl)carbodiimide", "smiles": "CCN=C=NCCCN(C)C", "inchikey": "LMDZBCPBFSXMTL-UHFFFAOYSA-N", "synonyms": ["EDC", "EDCI"]},
+ {"name": "1-hydroxybenzotriazole", "smiles": "On1nnc2ccccc21", "inchikey": "ASOKPJOREAFHNY-UHFFFAOYSA-N", "synonyms": ["HOBt"]},
+ {"name": "1,1'-carbonyldiimidazole", "smiles": "O=C(n1ccnc1)n1ccnc1", "inchikey": "PFKFTWBEEFSNDU-UHFFFAOYSA-N", "synonyms": ["CDI"]},
+ {"name": "N-bromosuccinimide", "smiles": "O=C1CCC(=O)N1Br", "inchikey": "PCLIMKBDDGJMGD-UHFFFAOYSA-N", "synonyms": ["NBS"]},
+ {"name": "N-chlorosuccinimide", "smiles": "O=C1CCC(=O)N1Cl", "inchikey": "JRNVZBWKYDBUCA-UHFFFAOYSA-N", "synonyms": ["NCS"]},
+ {"name": "N-iodosuccinimide", "smiles": "O=C1CCC(=O)N1I", "inchikey": "LQZMLBORDGWNPD-UHFFFAOYSA-N", "synonyms": ["NIS"]},
+ {"name": "bromine", "smiles": "BrBr", "inchikey": "GDTBXPJZTBHREO-UHFFFAOYSA-N", "synonyms": ["Br2"]},
+ {"name": "iodine", "smiles": "II", "inchikey": "PNDPGZBMCMUPRI-UHFFFAOYSA-N", "synonyms": ["I2"]},
+ {"name": "chlorine", "smiles": "ClCl", "inchikey": "KZBUYRJDOAKODT-UHFFFAOYSA-N", "synonyms": ["Cl2"]},
+ {"name": "fluorine", "smiles": "FF", "inchikey": "PXGOKWXKJXAPGV-UHFFFAOYSA-N", "synonyms": ["F2"]},
+ {"name": "meta-chloroperoxybenzoic acid", "smiles": "O=C(OO)c1cccc(Cl)c1", "inchikey": "NHQDETIJWKXCTC-UHFFFAOYSA-N", "synonyms": ["mCPBA", "m-CPBA", "MCPBA"]},
+ {"name": "osmium tetroxide", "smiles": "O=[Os](=O)(=O)=O", "inchikey": "VUVGYHUDAICLFK-UHFFFAOYSA-N", "synonyms": ["OsO4"]},
+ {"name": "potassium permanganate", "smiles": "O=[Mn](=O)(=O)[O-].[K+]", "inchikey": "VZJVWSHVAAUDKD-UHFFFAOYSA-N", "synonyms": ["KMnO4"]},
+ {"name": "pyridinium chlorochromate", "smiles": "O=[Cr](=O)([O-])Cl.c1cc[nH+]cc1", "inchikey": "LEHBURLTIWGHEM-UHFFFAOYSA-N", "synonyms": ["PCC"]},
+ {"name": "TEMPO", "smiles": "CC1(C)CCCC(C)(C)N1[O]", "inchikey": "QYTDEUPAUMOIOP-UHFFFAOYSA-N", "synonyms": ["2,2,6,6-tetramethylpiperidinyloxyl"]},
+ {"name": "2,3-dichloro-5,6-dicyano-1,4-benzoquinone", "smiles": "N#CC1=C(C#N)C(=O)C(Cl)=C(Cl)C1=O", "inchikey": "HZNVUJQVZSTENZ-UHFFFAOYSA-N", "synonyms": ["DDQ"]},
+ {"name": "triphenylphosphine", "smiles": "c1ccc(P(c2ccccc2)c2ccccc2)cc1", "inchikey": "RIOQSEWOXXDEQQ-UHFFFAOYSA-N", "synonyms": ["PPh3"]},
+ {"name": "triphenylphosphine oxide", "smiles": "O=P(c1ccccc1)(c1ccccc1)c1ccccc1", "inchikey": "FIQMHBFVRAXMOP-UHFFFAOYSA-N", "synonyms": ["TPPO"]},
+ {"name": "diethyl azodicarboxylate", "smiles": "CCOC(=O)/N=N/C(=O)OCC", "inchikey": "FAMRKDQNMBBFBR-BQYQJAHWSA-N", "synonyms": ["DEAD"]},
+ {"name": "diisopropyl azodicarboxylate", "smiles": "CC(C)OC(=O)/N=N/C(=O)OC(C)C", "inchikey": "VVWRJUBEIPHGQF-MDZDMXLPSA-N", "synonyms": ["DIAD"]},
+ {"name": "sodium azide", "smiles": "[N-]=[N+]=[N-].[Na+]", "inchikey": "PXIPVTKHYLBLMZ-UHFFFAOYSA-N", "synonyms": ["NaN3"]},
+ {"name": "trimethylsilyl chloride", "smiles": "C[Si](C)(C)Cl", "inchikey": "IJOOHPMOJXWVHK-UHFFFAOYSA-N", "synonyms": ["TMSCl", "chlorotrimethylsilane", "TMS chloride"]},
+ {"name": "tert-butyldimethylsilyl chloride", "smiles": "CC(C)(C)[Si](C)(C)Cl", "inchikey": "BCNZYOJHNLTNEZ-UHFFFAOYSA-N", "synonyms": ["TBSCl", "TBDMSCl"]},
+ {"name": "methyl iodide", "smiles": "CI", "inchikey": "INQOMBQAUSQDDS-UHFFFAOYSA-N", "synonyms": ["iodomethane", "MeI"]},
+ {"name": "dimethyl sulfate", "smiles": "COS(=O)(=O)OC", "inchikey": "VAYGXNSJCAHWJZ-UHFFFAOYSA-N", "synonyms": ["Me2SO4"]},
+ {"name": "benzyl bromide", "smiles": "BrCc1ccccc1", "inchikey": "AGEZXYOZHKGVCM-UHFFFAOYSA-N", "synonyms": ["BnBr"]},
+ {"name": "allyl bromide", "smiles": "C=CCBr", "inchikey": "BHELZAPQIKSEDF-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethyl bromoacetate", "smiles": "CCOC(=O)CBr", "inchikey": "PQJJJMRNHATNKG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethyl chloroformate", "smiles": "CCOC(=O)Cl", "inchikey": "RIFGWPKJUGCATF-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "formaldehyde", "smiles": "C=O", "inchikey": "WSFSSNUMVMOOMR-UHFFFAOYSA-N", "synonyms": ["methanal", "formalin"]},
+ {"name": "acetaldehyde", "smiles": "CC=O", "inchikey": "IKHGUXGNUITLKF-UHFFFAOYSA-N", "synonyms": ["ethanal"]},
+ {"name": "benzaldehyde", "smiles": "O=Cc1ccccc1", "inchikey": "HUMNYLRZRPPJDN-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "glyoxal", "smiles": "O=CC=O", "inchikey": "LEQAOMBKQFMDFZ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "Meldrum's acid", "smiles": "CC1(C)OC(=O)CC(=O)O1", "inchikey": "GXHFUVWIGNLZSC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "malonic acid", "smiles": "O=C(O)CC(=O)O", "inchikey": "OFOBLEOULBTSOW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "diethyl malonate", "smiles": "CCOC(=O)CC(=O)OCC", "inchikey": "IYXGSMUGOJNHAZ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethyl acetoacetate", "smiles": "CCOC(=O)CC(C)=O", "inchikey": "XYIBRDXRRQCHLP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "acetylacetone", "smiles": "CC(=O)CC(C)=O", "inchikey": "YRKCREAYFQTBPV-UHFFFAOYSA-N", "synonyms": ["acac"]},
+ {"name": "urea", "smiles": "NC(N)=O", "inchikey": "XSQUKJJJFZCRTK-UHFFFAOYSA-N", "synonyms": ["carbamide"]},
+ {"name": "thiourea", "smiles": "NC(N)=S", "inchikey": "UMGDCJDMYOKAJW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "guanidine", "smiles": "N=C(N)N", "inchikey": "ZRALSGWEFCBTJO-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "carbon monoxide", "smiles": "[C-]#[O+]", "inchikey": "UGFAIRIUMAVXCW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "carbon dioxide", "smiles": "O=C=O", "inchikey": "CURLTUGMZLYLDI-UHFFFAOYSA-N", "synonyms": ["CO2"]},
+ {"name": "nitrogen", "smiles": "N#N", "inchikey": "IJGRMHOSHXDMSA-UHFFFAOYSA-N", "synonyms": ["dinitrogen", "N2"]},
+ {"name": "oxygen", "smiles": "O=O", "inchikey": "MYMOFIZGZYHOMD-UHFFFAOYSA-N", "synonyms": ["dioxygen", "O2"]},
+ {"name": "hydrogen", "smiles": "[H][H]", "inchikey": "UFHFLCQGNIYNRP-UHFFFAOYSA-N", "synonyms": ["dihydrogen", "H2"]},
+ {"name": "ozone", "smiles": "[O-][O+]=O", "inchikey": "CBENFWSGALASAD-UHFFFAOYSA-N", "synonyms": ["O3"]},
+ {"name": "sulfur dioxide", "smiles": "O=S=O", "inchikey": "RAHZWNYVWXNFOC-UHFFFAOYSA-N", "synonyms": ["SO2"]},
+ {"name": "hydrogen sulfide", "smiles": "S", "inchikey": "RWSOTUBLDIXVET-UHFFFAOYSA-N", "synonyms": ["H2S"]},
+ {"name": "nitrous oxide", "smiles": "[N-]=[N+]=O", "inchikey": "GQPLMRYTRLFLPF-UHFFFAOYSA-N", "synonyms": ["laughing gas", "N2O"]},
+ {"name": "sodium nitrite", "smiles": "O=N[O-].[Na+]", "inchikey": "LPXPTNMVRIOKMN-UHFFFAOYSA-M", "synonyms": ["NaNO2"]},
+ {"name": "silver nitrate", "smiles": "O=[N+]([O-])[O-].[Ag+]", "inchikey": "SQGYOTSLMSWVJD-UHFFFAOYSA-N", "synonyms": ["AgNO3"]},
+ {"name": "copper(II) sulfate", "smiles": "O=S(=O)([O-])[O-].[Cu+2]", "inchikey": "ARUVKPQLZAKDPS-UHFFFAOYSA-L", "synonyms": ["copper sulfate", "cupric sulfate", "CuSO4"]},
+ {"name": "palladium(II) acetate", "smiles": "CC(=O)[O-].CC(=O)[O-].[Pd+2]", "inchikey": "YJVFFLUZDVXJQI-UHFFFAOYSA-L", "synonyms": ["palladium acetate", "Pd(OAc)2"]},
+ {"name": "sodium hypochlorite", "smiles": "[O-]Cl.[Na+]", "inchikey": "SUKJFIGYRHOWBL-UHFFFAOYSA-N", "synonyms": ["NaOCl", "bleach"]},
+ {"name": "potassium cyanide", "smiles": "[C-]#N.[K+]", "inchikey": "NNFCIKHAZHQZJG-UHFFFAOYSA-N", "synonyms": ["KCN"]},
+ {"name": "sodium cyanide", "smiles": "[C-]#N.[Na+]", "inchikey": "MNWBNISUBARLIT-UHFFFAOYSA-N", "synonyms": ["NaCN"]},
+ {"name": "phosgene", "smiles": "O=C(Cl)Cl", "inchikey": "YGYAWVDWMABLBF-UHFFFAOYSA-N", "synonyms": ["carbonyl dichloride"]},
+ {"name": "triphosgene", "smiles": "O=C(OC(Cl)(Cl)Cl)OC(Cl)(Cl)Cl", "inchikey": "UCPYLLCMEDAXFR-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethylene oxide", "smiles": "C1CO1", "inchikey": "IAYPIBMASNFSPL-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "propylene oxide", "smiles": "CC1CO1", "inchikey": "GOOHAUXETOMSMM-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "acrylonitrile", "smiles": "C=CC#N", "inchikey": "NLHHRLWOUZZQLW-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "methyl vinyl ketone", "smiles": "C=CC(C)=O", "inchikey": "FUSUHKVFWTUUBE-UHFFFAOYSA-N", "synonyms": ["MVK"]},
+ {"name": "diazomethane", "smiles": "C=[N+]=[N-]", "inchikey": "YXHKONLOYHBTNS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "trimethylsilyldiazomethane", "smiles": "C[Si](C)(C)C=[N+]=[N-]", "inchikey": "ONDSBJMLAHVLMI-UHFFFAOYSA-N", "synonyms": ["TMS-diazomethane"]},
+ {"name": "tributyltin hydride", "smiles": "CCCC[SnH](CCCC)CCCC", "inchikey": "DBGVGMSCBYYSLD-UHFFFAOYSA-N", "synonyms": ["Bu3SnH"]},
+ {"name": "azobisisobutyronitrile", "smiles": "CC(C)(C#N)/N=N/C(C)(C)C#N", "inchikey": "OZAIFHULBGXAKX-VAWYXSNFSA-N", "synonyms": ["AIBN"]},
+ {"name": "benzoyl peroxide", "smiles": "O=C(OOC(=O)c1ccccc1)c1ccccc1", "inchikey": "OMPJBNCRMGITSC-UHFFFAOYSA-N", "synonyms": ["BPO", "dibenzoyl peroxide"]},
+ {"name": "tetrabutylammonium fluoride", "smiles": "CCCC[N+](CCCC)(CCCC)CCCC.[F-]", "inchikey": "FPGGTKZVZWFYPV-UHFFFAOYSA-M", "synonyms": ["TBAF"]},
+ {"name": "tetrabutylammonium bromide", "smiles": "CCCC[N+](CCCC)(CCCC)CCCC.[Br-]", "inchikey": "JRMUNVKIHCOMHV-UHFFFAOYSA-M", "synonyms": ["TBAB"]},
+ {"name": "18-crown-6", "smiles": "C1COCCOCCOCCOCCOCCO1", "inchikey": "XEZNGIUYQVAUSS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethylenediaminetetraacetic acid", "smiles": "O=C(O)CN(CCN(CC(=O)O)CC(=O)O)CC(=O)O", "inchikey": "KCXVZYZYPLLWCC-UHFFFAOYSA-N", "synonyms": ["EDTA"]},
+ {"name": "2-mercaptoethanol", "smiles": "OCCS", "inchikey": "DGVVWUTYPXICAM-UHFFFAOYSA-N", "synonyms": ["beta-mercaptoethanol", "BME"]},
+ {"name": "dithiothreitol", "smiles": "OC(CS)C(O)CS", "inchikey": "VHJLVAABSRFDPM-UHFFFAOYSA-N", "synonyms": ["DTT"]},
+ {"name": "tris(hydroxymethyl)aminomethane", "smiles": "NC(CO)(CO)CO", "inchikey": "LENZDBCJOHFCAS-UHFFFAOYSA-N", "synonyms": ["Tris", "trometamol", "tromethamine"]},
+ {"name": "HEPES", "smiles": "O=S(=O)(O)CCN1CCN(CCO)CC1", "inchikey": "JKMHFZQWWAIEOD-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "sodium dodecyl sulfate", "smiles": "CCCCCCCCCCCCOS(=O)(=O)[O-].[Na+]", "inchikey": "DBMJMQXJHONAFJ-UHFFFAOYSA-M", "synonyms": ["SDS", "sodium lauryl sulfate"]}
+ ]
+}
diff --git a/backend/app/data/names/solvents.json b/backend/app/data/names/solvents.json
new file mode 100644
index 00000000..88cc47c7
--- /dev/null
+++ b/backend/app/data/names/solvents.json
@@ -0,0 +1,81 @@
+{
+ "source": "FormChem",
+ "licence": "Apache-2.0",
+ "category": "solvents",
+ "method": "Names and SMILES written for FormChem; InChIKeys computed with RDKit 2025.09.3 (standard InChI).",
+ "entries": [
+ {"name": "water", "smiles": "O", "inchikey": "XLYOFNOQVPJJNP-UHFFFAOYSA-N", "synonyms": ["H2O"]},
+ {"name": "deuterium oxide", "smiles": "[2H]O[2H]", "inchikey": "XLYOFNOQVPJJNP-ZSJDYOACSA-N", "synonyms": ["D2O", "heavy water"]},
+ {"name": "methanol", "smiles": "CO", "inchikey": "OKKJLVBELUTLKV-UHFFFAOYSA-N", "synonyms": ["methyl alcohol", "MeOH", "wood alcohol"]},
+ {"name": "methanol-d4", "smiles": "[2H]OC([2H])([2H])[2H]", "inchikey": "OKKJLVBELUTLKV-MZCSYVLQSA-N", "synonyms": ["CD3OD", "tetradeuteromethanol"]},
+ {"name": "ethanol", "smiles": "CCO", "inchikey": "LFQSCWFLJHTTHZ-UHFFFAOYSA-N", "synonyms": ["ethyl alcohol", "EtOH", "alcohol"]},
+ {"name": "1-propanol", "smiles": "CCCO", "inchikey": "BDERNNFJNOPAEC-UHFFFAOYSA-N", "synonyms": ["n-propanol", "propyl alcohol", "n-propyl alcohol"]},
+ {"name": "isopropanol", "smiles": "CC(C)O", "inchikey": "KFZMGEQAYNKOFK-UHFFFAOYSA-N", "synonyms": ["isopropyl alcohol", "IPA", "rubbing alcohol", "2-propanol"]},
+ {"name": "1-butanol", "smiles": "CCCCO", "inchikey": "LRHPLDYGYMQRHN-UHFFFAOYSA-N", "synonyms": ["n-butanol", "butyl alcohol", "n-butyl alcohol"]},
+ {"name": "isobutanol", "smiles": "CC(C)CO", "inchikey": "ZXEKIIBDNHEJCQ-UHFFFAOYSA-N", "synonyms": ["isobutyl alcohol"]},
+ {"name": "tert-butanol", "smiles": "CC(C)(C)O", "inchikey": "DKGAVHZHDRPRBM-UHFFFAOYSA-N", "synonyms": ["tert-butyl alcohol", "t-butanol", "t-butyl alcohol", "tBuOH"]},
+ {"name": "ethylene glycol", "smiles": "OCCO", "inchikey": "LYCAIKOWRPUZTN-UHFFFAOYSA-N", "synonyms": ["glycol", "monoethylene glycol"]},
+ {"name": "propylene glycol", "smiles": "CC(O)CO", "inchikey": "DNIAPMSPPWPWGF-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "glycerol", "smiles": "OCC(O)CO", "inchikey": "PEDCQBHIVMGVHV-UHFFFAOYSA-N", "synonyms": ["glycerin", "glycerine"]},
+ {"name": "diethylene glycol", "smiles": "OCCOCCO", "inchikey": "MTHSVFCYNBDYFN-UHFFFAOYSA-N", "synonyms": ["DEG"]},
+ {"name": "acetone", "smiles": "CC(C)=O", "inchikey": "CSCPPACGZOOCGX-UHFFFAOYSA-N", "synonyms": ["dimethyl ketone", "propanone"]},
+ {"name": "acetone-d6", "smiles": "[2H]C([2H])([2H])C(=O)C([2H])([2H])[2H]", "inchikey": "CSCPPACGZOOCGX-WFGJKAKNSA-N", "synonyms": ["deuterated acetone"]},
+ {"name": "methyl ethyl ketone", "smiles": "CCC(C)=O", "inchikey": "ZWEHNKRNPOVVGH-UHFFFAOYSA-N", "synonyms": ["MEK", "butanone", "2-butanone"]},
+ {"name": "methyl isobutyl ketone", "smiles": "CC(C)CC(C)=O", "inchikey": "NTIZESTWPVYFNL-UHFFFAOYSA-N", "synonyms": ["MIBK"]},
+ {"name": "acetonitrile", "smiles": "CC#N", "inchikey": "WEVYAHXRMPXWCK-UHFFFAOYSA-N", "synonyms": ["MeCN", "methyl cyanide", "ACN"]},
+ {"name": "acetonitrile-d3", "smiles": "[2H]C([2H])([2H])C#N", "inchikey": "WEVYAHXRMPXWCK-FIBGUPNXSA-N", "synonyms": ["CD3CN"]},
+ {"name": "tetrahydrofuran", "smiles": "C1CCOC1", "inchikey": "WYURNTSHIVDZCO-UHFFFAOYSA-N", "synonyms": ["THF", "oxolane"]},
+ {"name": "2-methyltetrahydrofuran", "smiles": "CC1CCCO1", "inchikey": "JWUJQDFVADABEY-UHFFFAOYSA-N", "synonyms": ["2-MeTHF"]},
+ {"name": "diethyl ether", "smiles": "CCOCC", "inchikey": "RTZKZFJDLAIYFH-UHFFFAOYSA-N", "synonyms": ["ether", "ethyl ether", "Et2O"]},
+ {"name": "diisopropyl ether", "smiles": "CC(C)OC(C)C", "inchikey": "ZAFNJMIOTHYJRJ-UHFFFAOYSA-N", "synonyms": ["isopropyl ether", "DIPE"]},
+ {"name": "methyl tert-butyl ether", "smiles": "COC(C)(C)C", "inchikey": "BZLVMXJERCGZMT-UHFFFAOYSA-N", "synonyms": ["MTBE", "tert-butyl methyl ether"]},
+ {"name": "cyclopentyl methyl ether", "smiles": "COC1CCCC1", "inchikey": "SKTCDJAMAYNROS-UHFFFAOYSA-N", "synonyms": ["CPME"]},
+ {"name": "dimethyl ether", "smiles": "COC", "inchikey": "LCGLNKUTAGEVQW-UHFFFAOYSA-N", "synonyms": ["methoxymethane"]},
+ {"name": "1,4-dioxane", "smiles": "C1COCCO1", "inchikey": "RYHBNJHYFVUHQT-UHFFFAOYSA-N", "synonyms": ["dioxane", "p-dioxane"]},
+ {"name": "1,2-dimethoxyethane", "smiles": "COCCOC", "inchikey": "XTHFKEDIFFGKHM-UHFFFAOYSA-N", "synonyms": ["DME", "glyme", "monoglyme"]},
+ {"name": "diglyme", "smiles": "COCCOCCOC", "inchikey": "SBZXBUIDTXKZTM-UHFFFAOYSA-N", "synonyms": ["diethylene glycol dimethyl ether"]},
+ {"name": "dimethylformamide", "smiles": "CN(C)C=O", "inchikey": "ZMXDDKWLCZADIW-UHFFFAOYSA-N", "synonyms": ["DMF", "N,N-dimethylformamide"]},
+ {"name": "dimethylacetamide", "smiles": "CC(=O)N(C)C", "inchikey": "FXHOOIRPVKKKFG-UHFFFAOYSA-N", "synonyms": ["DMA", "DMAc", "N,N-dimethylacetamide"]},
+ {"name": "N-methyl-2-pyrrolidone", "smiles": "CN1CCCC1=O", "inchikey": "SECXISVLQFMRJM-UHFFFAOYSA-N", "synonyms": ["NMP", "N-methylpyrrolidone", "N-methylpyrrolidinone"]},
+ {"name": "dimethyl sulfoxide", "smiles": "CS(C)=O", "inchikey": "IAZDPXIOMUYVGZ-UHFFFAOYSA-N", "synonyms": ["DMSO", "methyl sulfoxide"]},
+ {"name": "dimethyl sulfoxide-d6", "smiles": "[2H]C([2H])([2H])S(=O)C([2H])([2H])[2H]", "inchikey": "IAZDPXIOMUYVGZ-WFGJKAKNSA-N", "synonyms": ["DMSO-d6"]},
+ {"name": "sulfolane", "smiles": "O=S1(=O)CCCC1", "inchikey": "HXJUTPCZVOIRIF-UHFFFAOYSA-N", "synonyms": ["tetramethylene sulfone"]},
+ {"name": "hexamethylphosphoramide", "smiles": "CN(C)P(=O)(N(C)C)N(C)C", "inchikey": "GNOIPBMMFNIUFM-UHFFFAOYSA-N", "synonyms": ["HMPA"]},
+ {"name": "dichloromethane", "smiles": "ClCCl", "inchikey": "YMWUJEATGCHHMB-UHFFFAOYSA-N", "synonyms": ["DCM", "methylene chloride", "methylene dichloride"]},
+ {"name": "chloroform", "smiles": "ClC(Cl)Cl", "inchikey": "HEDRZPFGACZZDS-UHFFFAOYSA-N", "synonyms": ["trichloromethane", "CHCl3"]},
+ {"name": "chloroform-d", "smiles": "[2H]C(Cl)(Cl)Cl", "inchikey": "HEDRZPFGACZZDS-MICDWDOJSA-N", "synonyms": ["deuterochloroform", "CDCl3"]},
+ {"name": "carbon tetrachloride", "smiles": "ClC(Cl)(Cl)Cl", "inchikey": "VZGDMQKNWNREIO-UHFFFAOYSA-N", "synonyms": ["tetrachloromethane", "CCl4"]},
+ {"name": "1,2-dichloroethane", "smiles": "ClCCCl", "inchikey": "WSLDOOZREJYCGB-UHFFFAOYSA-N", "synonyms": ["DCE", "ethylene dichloride"]},
+ {"name": "benzene", "smiles": "c1ccccc1", "inchikey": "UHOVQNZJYSORNB-UHFFFAOYSA-N", "synonyms": ["benzol"]},
+ {"name": "benzene-d6", "smiles": "[2H]c1c([2H])c([2H])c([2H])c([2H])c1[2H]", "inchikey": "UHOVQNZJYSORNB-MZWXYZOWSA-N", "synonyms": ["C6D6", "hexadeuterobenzene"]},
+ {"name": "toluene", "smiles": "Cc1ccccc1", "inchikey": "YXFVVABEGXRONW-UHFFFAOYSA-N", "synonyms": ["methylbenzene", "toluol"]},
+ {"name": "o-xylene", "smiles": "Cc1ccccc1C", "inchikey": "CTQNGGLPUBDAKN-UHFFFAOYSA-N", "synonyms": ["ortho-xylene"]},
+ {"name": "m-xylene", "smiles": "Cc1cccc(C)c1", "inchikey": "IVSZLXZYQVIEFR-UHFFFAOYSA-N", "synonyms": ["meta-xylene"]},
+ {"name": "p-xylene", "smiles": "Cc1ccc(C)cc1", "inchikey": "URLKBWYHVLBVBO-UHFFFAOYSA-N", "synonyms": ["para-xylene"]},
+ {"name": "mesitylene", "smiles": "Cc1cc(C)cc(C)c1", "inchikey": "AUHZEENZYGFFBQ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "o-dichlorobenzene", "smiles": "Clc1ccccc1Cl", "inchikey": "RFFLAFLAYFXFSW-UHFFFAOYSA-N", "synonyms": ["ODCB", "ortho-dichlorobenzene"]},
+ {"name": "anisole", "smiles": "COc1ccccc1", "inchikey": "RDOXTESZEPMUJZ-UHFFFAOYSA-N", "synonyms": ["methoxybenzene"]},
+ {"name": "pyridine", "smiles": "c1ccncc1", "inchikey": "JUJWROOIHBZHMG-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "pyridine-d5", "smiles": "[2H]c1nc([2H])c([2H])c([2H])c1[2H]", "inchikey": "JUJWROOIHBZHMG-RALIUCGRSA-N", "synonyms": []},
+ {"name": "pentane", "smiles": "CCCCC", "inchikey": "OFBQJSOFQDEBGM-UHFFFAOYSA-N", "synonyms": ["n-pentane"]},
+ {"name": "hexane", "smiles": "CCCCCC", "inchikey": "VLKZOEOYAKHREP-UHFFFAOYSA-N", "synonyms": ["n-hexane"]},
+ {"name": "heptane", "smiles": "CCCCCCC", "inchikey": "IMNFDUFMRHMDMM-UHFFFAOYSA-N", "synonyms": ["n-heptane"]},
+ {"name": "cyclohexane", "smiles": "C1CCCCC1", "inchikey": "XDTMQSROBMDMFD-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "isooctane", "smiles": "CC(C)CC(C)(C)C", "inchikey": "NHTMVDHEPJAVLT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethyl acetate", "smiles": "CCOC(C)=O", "inchikey": "XEKOWRVHYACXOJ-UHFFFAOYSA-N", "synonyms": ["EtOAc", "AcOEt", "ethyl ethanoate"]},
+ {"name": "methyl acetate", "smiles": "COC(C)=O", "inchikey": "KXKVLQRXCPHEJC-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "isopropyl acetate", "smiles": "CC(C)OC(C)=O", "inchikey": "JMMWKPVZQRWMSS-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "n-butyl acetate", "smiles": "CCCCOC(C)=O", "inchikey": "DKPFZGUDAPQIHT-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "acetic acid", "smiles": "CC(=O)O", "inchikey": "QTBSBXVTEAMEQO-UHFFFAOYSA-N", "synonyms": ["ethanoic acid", "glacial acetic acid", "AcOH"]},
+ {"name": "formic acid", "smiles": "O=CO", "inchikey": "BDAGIHXWWSANSR-UHFFFAOYSA-N", "synonyms": ["methanoic acid"]},
+ {"name": "trifluoroacetic acid", "smiles": "O=C(O)C(F)(F)F", "inchikey": "DTQVDTLACAAQTR-UHFFFAOYSA-N", "synonyms": ["TFA"]},
+ {"name": "propylene carbonate", "smiles": "CC1COC(=O)O1", "inchikey": "RUOJZAUFBMNUDX-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "ethylene carbonate", "smiles": "O=C1OCCO1", "inchikey": "KMTRUDSVKNLOMY-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "dimethyl carbonate", "smiles": "COC(=O)OC", "inchikey": "IEJIGPNLZYLLBP-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "diethyl carbonate", "smiles": "CCOC(=O)OCC", "inchikey": "OIFBSDVPJOWBCH-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "nitromethane", "smiles": "C[N+](=O)[O-]", "inchikey": "LYGJENNIWJXYER-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "carbon disulfide", "smiles": "S=C=S", "inchikey": "QGJOPFRUJISHPQ-UHFFFAOYSA-N", "synonyms": []},
+ {"name": "2,2,2-trifluoroethanol", "smiles": "OCC(F)(F)F", "inchikey": "RHQDFWAXVIIEBN-UHFFFAOYSA-N", "synonyms": ["TFE", "trifluoroethanol"]},
+ {"name": "hexafluoroisopropanol", "smiles": "OC(C(F)(F)F)C(F)(F)F", "inchikey": "BYEAHWXPCBROCE-UHFFFAOYSA-N", "synonyms": ["HFIP"]}
+ ]
+}
diff --git a/backend/app/main.py b/backend/app/main.py
index e0cc9fae..d76f625f 100644
--- a/backend/app/main.py
+++ b/backend/app/main.py
@@ -13,13 +13,14 @@
from app.core import agent_token, config
from app.core.local_guard import LocalGuard
from app.core.window_key import WindowKeyGuard
-from app.routers import analysis, chat, chem, commands, documents, extensions, library, live, mcp, reactions, system, templates, terminal
+from app.routers import analysis, chat, chem, commands, documents, extensions, library, live, mcp, nmr, reactions, spectra, system, templates, terminal, three_d
from app.services import claude_code, consent, history
from app.services import terminal as terminals
from app.services.chat import engine as chat_engine
from app.routers import files as file_writes
from app.routers import pictures
from app.routers import agent_activity
+from app.routers import names
mimetypes.add_type("text/javascript", ".js")
mimetypes.add_type("text/javascript", ".mjs")
@@ -69,6 +70,8 @@ async def lifespan(this: FastAPI):
app.include_router(chem.router)
app.include_router(reactions.router)
app.include_router(analysis.router)
+app.include_router(spectra.router)
+app.include_router(nmr.router)
app.include_router(templates.router)
app.include_router(commands.router)
app.include_router(extensions.router)
@@ -78,6 +81,8 @@ async def lifespan(this: FastAPI):
app.include_router(agent_activity.router)
app.include_router(file_writes.router)
app.include_router(pictures.router)
+app.include_router(names.router)
+app.include_router(three_d.router)
_dist = config.dist_dir()
if _dist is not None:
diff --git a/backend/app/routers/files.py b/backend/app/routers/files.py
index 6388109e..b13c75a7 100644
--- a/backend/app/routers/files.py
+++ b/backend/app/routers/files.py
@@ -15,8 +15,8 @@
".svg", ".svgz", ".png", ".pdf", ".eps", ".ps",
".mol", ".mdl", ".sdf", ".sd", ".rxn", ".rdf", ".rd",
".smi", ".smiles", ".cxsmi", ".cxsmiles", ".sma", ".smarts", ".inchi", ".key",
- ".cml", ".cdxml", ".cdx", ".helm", ".xyz", ".mol2", ".pdb",
- ".txt", ".csv", ".tsv", ".json", ".jdx", ".dx",
+ ".cml", ".cdxml", ".cdx", ".helm", ".xyz", ".mol2", ".pdb", ".ent", ".cif", ".mmcif", ".glb",
+ ".txt", ".csv", ".tsv", ".json", ".jdx", ".dx", ".jcamp",
}
diff --git a/backend/app/routers/mcp.py b/backend/app/routers/mcp.py
index fa88f45a..271319c6 100644
--- a/backend/app/routers/mcp.py
+++ b/backend/app/routers/mcp.py
@@ -28,30 +28,34 @@
INSTRUCTIONS = ("FormChem is the structure drawing suite of the FormAI family, running on this computer; the person watches it in the FormChem window. "
"get_context (or list_open_documents) lists the drawings open (id, title, path, unsaved changes, revision, fragments, formula). "
"Draw directly: draw_from_smiles {smiles} (reaction SMILES draws a scheme) and draw_from_molfile {molfile} lay a structure out and place it clear of the page content as one undo step, "
- "and answer with the new ids, SMILES, InChIKey, formula, warnings and a picture. Check your work with render (a PNG or SVG of objects, the selection or the page, drawn by the window's own renderer when it is open), "
+ "and answer with the new ids, SMILES, InChIKey, formula, warnings and a picture; draw_from_name {name} does the same for a chemical name read offline, and name_structure names what is drawn. Check your work with render (a PNG or SVG of objects, the selection or the page, drawn by the window's own renderer when it is open), "
"get_structure (SMILES, CXSMILES, InChI, InChIKey, molfile, formula, masses) and validate (the structure check). new_document, open_document, save_document and close_document handle drawings; "
"convert and batch_convert convert files with the same code as ./formchem convert and batch. "
"The window's own commands stay reachable through list_commands and run_command; reaction tools (perceive_reactions, map_reaction, export_reaction, reaction_stoichiometry) and analysis tools "
- "(compute_properties, stereo, substructure) work on a drawing directly; extensions_list and extension_command reach Form extensions; handoff {state: ready or question, note} tells the person where your work stands. "
+ "(compute_properties, stereo, substructure) work on a drawing directly; predict_nmr gives predicted 1H and 13C shifts and predict_spectrum places a predicted spectrum beside its structure; open_spectrum opens a JCAMP-DX file and spectrum_data, spectrum_peaks, spectrum_pick_peaks, spectrum_integrate and spectrum_export work on spectrum objects; extensions_list and extension_command reach Form extensions; handoff {state: ready or question, note} tells the person where your work stands. "
"Edit tools change a drawing by id, one undo step per call, and answer with the structure and a picture: get_atoms lists the atom and bond ids; add_atom, add_bond, set_charge, set_atom, "
"set_stereo, replace_substructure, delete, move, scale, align, clean_layout, add_arrow, add_text and add_reaction. "
+ "3D tools work on a structure's stored conformers: build_3d, conformers_3d, minimise_3d, scan_dihedral and measure_3d; open_3d_structure opens PDB, mmCIF, SDF and MOL files, "
+ "extract_ligand turns a bound ligand into a structure, export_3d writes MOL, SDF, PDB or XYZ. "
"Tools that change what the person sees ask the person in the window to allow agents the first time. Details: resource formchem://guide.")
WORKFLOW = [
"1. get_context -> window open or not, agents allowed or not, open drawings, catalogue size, your last handoff",
- "2. draw_from_smiles {smiles} or draw_from_molfile {molfile} -> new object ids, structure and a picture (one undo step); new_document, open_document {path}, save_document, close_document",
+ "2. draw_from_smiles {smiles}, draw_from_name {name} or draw_from_molfile {molfile} -> new object ids, structure and a picture (one undo step); new_document, open_document {path}, save_document, close_document",
"3. edit by id: get_atoms -> atom and bond ids; add_atom, add_bond, set_charge, set_atom, set_stereo, replace_substructure, delete, move, scale, align, clean_layout, "
"add_arrow, add_text, add_reaction (one undo step each)",
"4. check: render {ids | scope} -> picture; get_structure {object} -> SMILES, InChIKey, molfile; validate -> issues by atom and bond id",
- "5. reactions: perceive_reactions, map_reaction, export_reaction, reaction_stoichiometry; analysis: compute_properties, stereo, substructure; files: convert, batch_convert",
- "6. list_commands {text} and run_command {id} for the window's own menu commands; extensions_list and extension_command for Form extensions",
- "7. handoff {state: ready, note} when you are done; state question when you need the person's input",
+ "5. reactions: perceive_reactions, map_reaction, export_reaction, reaction_stoichiometry; analysis: compute_properties, stereo, substructure, name_structure, predict_nmr; files: convert, batch_convert",
+ "6. spectra: predict_spectrum, open_spectrum, spectrum_data, spectrum_peaks, spectrum_pick_peaks, spectrum_integrate, spectrum_export",
+ "7. 3D: build_3d {object} -> a conformer with energy and the stereo check; conformers_3d, minimise_3d, scan_dihedral, measure_3d; open_3d_structure {path}, extract_ligand, export_3d",
+ "8. list_commands {text} and run_command {id} for the window's own menu commands; extensions_list and extension_command for Form extensions",
+ "9. handoff {state: ready, note} when you are done; state question when you need the person's input",
]
GUIDE = f"""# FormChem agent guide
FormChem is a chemical structure drawing suite and a member of the FormAI family. The engine on this computer serves this MCP server; the person works in the FormChem window and sees every change there.
## What exists in this version
-FormChem {config.VERSION} draws. Drawings are documents the engine owns (docs/FORMAT.md): the person opens them in the window, draws on the canvas with the tool rail and hover keys, and the engine's chemistry (RDKit) works out SMILES, InChIKey, formula, masses, elemental analysis and CIP labels after every change, shown in the Analysis panel with the calculated properties and the isotope pattern. Drawings hold reaction schemes with perceived or hand-set roles, stereo groups, query atoms and bonds, abbreviations and R-group definitions. Files in molfile, SDF, RXN, SMILES, CML and CDXML open as new drawings.
+FormChem {config.VERSION} draws. Drawings are documents the engine owns (docs/FORMAT.md): the person opens them in the window, draws on the canvas with the tool rail and hover keys, and the engine's chemistry (RDKit) works out SMILES, InChIKey, formula, masses, elemental analysis and CIP labels after every change, shown in the Analysis panel with the calculated properties and the isotope pattern. Drawings hold reaction schemes with perceived or hand-set roles, stereo groups, query atoms and bonds, abbreviations and R-group definitions. Files in molfile, SDF, RXN, SMILES, CML and CDXML open as new drawings. Names are read and written offline (a dictionary of common names, a systematic parser and a round-trip-checked namer), JCAMP-DX spectra open as spectrum objects, and 1H and 13C NMR spectra are predicted by FormChem's own increment rules; every computed name and number carries its method and version. Structures carry 3D conformers built by the engine (RDKit ETKDGv3 with MMFF94, MMFF94s or UFF), shown in the 3D View and on the page as 3D objects; PDB and mmCIF files open as 3D objects with their ligands.
How an agent works on drawings:
- Drawing tools (since {DRAWING_FROM}): draw_from_smiles and draw_from_molfile put a structure or a reaction scheme on a drawing as one undo step, in free space right of or below what is there, and answer with the new object ids, the structure in machine form and a picture. With no drawing open they make one and show it in the window.
@@ -69,10 +73,19 @@
- get_context: app, version, whether a window is open, whether agents are allowed, the documents open in the window (id, title, path, unsaved changes, revision, fragment count, formula), the size of the command catalogue and your last handoff. Call it first.
- draw_from_smiles {{smiles, doc?, x?, y?, name?}}: draws SMILES, CXSMILES or reaction SMILES (a scheme with arrow and plus signs) with the scored 2D layout, as one undo step. x and y place the top-left corner in points; left out, FormChem finds free space. Returns ids, structure and a picture.
- draw_from_molfile {{molfile, doc?, x?, y?}}: draws a V2000 or V3000 molfile (or SD records), keeping its coordinates, as one undo step. Returns ids, structure and a picture.
+- draw_from_name {{name, doc?, x?, y?, label?}}: draws the structure of a chemical name read offline (FormChem's dictionary of common names, then its systematic name parser), as one undo step. Returns ids, structure and a picture, plus the method, confidence, engine and version of the reading; a name it cannot read is refused with the character where reading stopped.
+- name_structure {{smiles? | doc?, object? | selection?}}: the common name and the round-trip-checked systematic name of each structure, each with its method, confidence, engine and version, or the reason there is none. Read only.
- render {{doc?, scope?, ids?, format?, width?, height?, dpi?}}: a PNG (image) or SVG (text) of objects, the selection or the page, and which renderer drew it. Read only.
- get_structure {{doc?, object? | selection?}}: SMILES, CXSMILES, InChI, InChIKey, molfile (V3000 only when needed), formula, average and monoisotopic mass, m/z and elemental analysis per fragment. Read only.
- validate {{doc?, object?}}: the structure check (valence, charges, undefined stereo, overlaps, wedges, isotopes, query features, R-groups) with a valid verdict; check_structure is the same check under its older name. Read only.
- compute_properties {{doc?, object?}}: the calculated properties with their methods; properties is the same list under its older name. Read only.
+- predict_nmr {{doc?, object? | smiles, nucleus?, frequency?}}: predicted 1H or 13C shifts with confidence, uncertainty, multiplicity and a journal line (FormChem increments, its own rules and no shift database), each value with its method and version. Read only.
+- predict_spectrum {{doc?, object, nucleus?, frequency?, x?, y?}}: adds a predicted 1H or 13C spectrum beside the structure (one undo step), its multiplets, integrals or peaks linked to the atoms; the points come from the spectra data route, recomputed from the structure.
+- open_spectrum {{text | base64 | path, name?}}: opens a JCAMP-DX file as a new drawing with one spectrum object per block (the file kept byte for byte) and shows it in the window.
+- spectrum_data {{doc?, object?, from?, to?, points?, y_mode?}}: the decimated points, axes, direction, view, frequency and method of a measured or predicted spectrum. Read only.
+- spectrum_peaks {{doc?, object?, detect?, from?, to?}}: the stored peaks, integrals and multiplets with their atom links; detect lists what the peak picker finds without adding it. Read only.
+- spectrum_pick_peaks {{doc?, object?, from?, to?, max?, threshold?, prominence?, replace?}} and spectrum_integrate {{doc?, object?, from, to | ranges | id, value?}}: add peaks or NMR integrals as one undo step each.
+- spectrum_export {{doc?, object?, format?, original?}}: the spectrum as JCAMP-DX or CSV text, or the original file. Read only.
- list_open_documents: the open drawings and which one the window shows. Read only.
- new_document {{title?}}, open_document {{path}}, save_document {{doc?, path?}}, close_document {{doc?}}: make, open, save and close drawings; new and opened drawings show in the window.
- convert {{input, from?, to, output?, v3000?, standardise?}}: converts structure text or a file; the result comes back as text or goes to output. batch_convert {{input_dir, to, output_dir?, standardise?, recursive?, v3000?}}: converts a folder with a failure report, as ./formchem batch does.
@@ -98,6 +111,10 @@
- delete {{ids}}, move {{ids, dx, dy}}, scale {{ids?, percent | bond_length, labels?}}, align {{ids, mode}}: arrange atoms and objects; scale changes the drawing, not the zoom.
- clean_layout {{objects?, mode clean|layout}}: Clean Up or Lay Out through the scored layout, with the score before and after.
- add_arrow {{kind?, from, to?, bend?, head?, tail?}}: from and to are [x, y] or an object, atom or bond id. add_text {{text, x?, y?, style?, size?, align?, below?}}: free text, or a caption under a structure. add_reaction {{reaction_smiles, x?, y?}}: a whole scheme from reaction SMILES with its step recorded.
+- build_3d {{object?, minimise?, method?}}: 3D coordinates from the 2D drawing (ETKDGv3, then MMFF94 unless asked otherwise) stored as the fragment's conformer, one undo step; answers with energy, method, engine version and whether every stereocentre was kept. A later edit to the structure's atoms or bonds drops its conformers.
+- conformers_3d {{object?, n?, window?, keep?, method?}}: a conformer ensemble kept within an energy window, with relative energies and populations. minimise_3d {{object?, conformer?, method?}}: minimises the shown conformer.
+- scan_dihedral {{object?, atoms, start?, end?, step?, store?}}: a relaxed dihedral scan, angle against relative energy; read only unless store. measure_3d {{object?, atoms}}: distance, angle or dihedral of a conformer. Read only.
+- open_3d_structure {{path, as?, x?, y?}}: a PDB or mmCIF file as a 3D object (the file kept byte for byte), or SDF and MOL records as structures with their file coordinates. extract_ligand {{object?, ligand?}}: a ligand of that 3D object as a 2D structure with its coordinates. export_3d {{object?, format?, conformer?, output?}}: MOL, SDF, PDB or XYZ text with every hydrogen, or a new file.
## Asking the person
Tools that change a drawing or what the person sees (the drawing, document and edit tools, run_command, extension_command, the reaction writers and handoff with a state), and convert or batch_convert writing outside the temporary folder, ask the person in the FormChem window the first time: Deny, Allow once or Always allow. Read-only tools never ask. With no window open there is nobody to ask, and the call is refused with a sentence saying so, unless the person chose Always allow earlier. Agents started from FormChem's own Claude Code, Codex, Cursor or Antigravity tabs are already trusted and are never asked.
@@ -131,6 +148,8 @@ def _tool(name: str, description: str, props: dict, required: list[str] | None =
_S = {"type": "string"}
_DOC = {"type": "string", "description": "Drawing id from list_open_documents; may be left out when one drawing is open or the window shows one"}
_IDS = {"type": "array", "items": {"type": "string"}, "description": "Object ids: fragments, arrows, plus signs, text or groups"}
+_FRAG = {"type": "string", "description": "Fragment id (or a 3D object bound to one); may be left out when the drawing has one structure"}
+_FF = {"type": "string", "enum": ["MMFF94", "MMFF94s", "UFF"], "description": "Force field (default MMFF94; UFF when MMFF94 has no parameters)"}
TOOLS = [
_tool("get_context", "FormChem's version, whether a window is open, whether agents are allowed, the drawings open in the window (id, title, path, unsaved changes, revision, fragment count, formula), "
"the command catalogue size and your last handoff. Draw with draw_from_smiles and draw_from_molfile and check with render, get_structure and validate; "
@@ -152,6 +171,22 @@ def _tool(name: str, description: str, props: dict, required: list[str] | None =
"(laid out when it has none), placed in free space right of or below what is on the page, as one undo step. With no drawing open it makes one. Returns ids, SMILES, InChIKey, formula, warnings and a picture.",
{"molfile": {"type": "string", "description": "Molfile or SD text, with its line breaks"}, "doc": _DOC,
"x": {"type": "number", "description": "Left edge in points; left out: free space"}, "y": {"type": "number", "description": "Top edge in points; left out: free space"}}, ["molfile"]),
+ _tool("draw_from_name", "Draws the structure of a chemical name in a drawing, read offline by FormChem: a common name from its dictionary (aspirin, caffeine, THF, L-alanine, Taxol) "
+ "or a systematic IUPAC name for the common classes (2,2,4-trimethylpentane, (2R)-butan-2-ol, ethyl propanoate, N,N-dimethylpropan-1-amine, pyridine-3-carboxylic acid). "
+ "Laid out with the scored 2D layout and placed in free space right of or below what is on the page, as one undo step; with no drawing open it makes one. "
+ "Returns the new ids, SMILES, InChIKey, formula and a picture, plus how the name was read: method (dictionary or systematic parser), confidence (high, or medium when "
+ "a locant had to be assumed, with the assumption in the notes), engine and version. A name it cannot read is refused with the character where reading stopped; "
+ "inverted index names and D-/L- outside the dictionary are refused too. Prefer draw_from_smiles when you know the SMILES.",
+ {"name": {"type": "string", "description": "Chemical name, such as aspirin or 2-methylpropan-1-ol (up to 300 characters)"}, "doc": _DOC,
+ "x": {"type": "number", "description": "Left edge in points; left out: free space"}, "y": {"type": "number", "description": "Top edge in points; left out: free space"},
+ "label": {"type": "string", "description": "Name given to the new structure; default the name read"}}, ["name"]),
+ _tool("name_structure", "Names structures without changing anything: for SMILES, one object (a fragment or group), the person's selection in the window, or every fragment of a drawing. "
+ "Each answer lists the common name from FormChem's dictionary when there is one and the systematic IUPAC name from FormChem's rule-based namer, which is only given "
+ "when it reads back to the same structure (same InChIKey); otherwise no name and the reason (for example salts, unlisted ring systems, stereo outside the parent chain). "
+ "Every name carries its method, confidence, engine and version.",
+ {"smiles": {"type": "string", "description": "SMILES to name instead of a drawing"}, "doc": _DOC,
+ "object": {"type": "string", "description": "A fragment or group id; left out: every fragment"},
+ "selection": {"type": "boolean", "description": "True: the fragments the person has selected in the FormChem window"}}, read=True),
_tool("get_structure", "The structures of a drawing in machine form: SMILES, CXSMILES, InChI, InChIKey, a molfile (V2000, or V3000 when the structure needs it), formula, average and monoisotopic mass, m/z of "
"charged structures and elemental analysis, per fragment. For one object (a fragment or a group), the person's selection in the window (selection true) or every fragment. Does not change the drawing.",
{"doc": _DOC, "object": {"type": "string", "description": "A fragment or group id; left out: every fragment"},
@@ -164,6 +199,59 @@ def _tool(name: str, description: str, props: dict, required: list[str] | None =
"cLogP and molar refractivity (Crippen), TPSA, H-bond donors and acceptors, rotatable bonds, rings, aromatic rings, fraction Csp3, charge, stereocentres, Lipinski and Veber verdicts and elemental analysis. "
"Does not change the drawing.",
{"doc": _DOC, "object": {"type": "string", "description": "One fragment id; left out: every fragment"}}, read=True),
+ _tool("predict_nmr", "Predicted 1H or 13C NMR of a structure with FormChem's own increment rules (method FormChem increments, no shift database): per-atom shifts with a confidence "
+ "(high, medium, low) and an uncertainty in ppm, signals grouped by symmetry with multiplicity, J values and proton counts, a journal-style line, and warnings "
+ "(exchangeable, diastereotopic, second order, rotamers). For a fragment of a drawing (doc, object) or SMILES. Does not change the drawing. Predicted values, never measured data.",
+ {"doc": _DOC, "object": {"type": "string", "description": "Fragment id; may be left out when the drawing has one fragment"},
+ "smiles": {"type": "string", "description": "SMILES instead of a drawing object, such as CCOC(C)=O"},
+ "nucleus": {"type": "string", "enum": ["1H", "13C", "both"], "description": "Default 1H"},
+ "frequency": {"type": "number", "description": "Spectrometer frequency in MHz for this nucleus (default 400 for 1H, 100 for 13C)"}}, read=True),
+ _tool("predict_spectrum", "Adds a predicted 1H or 13C NMR spectrum of a structure to the drawing beside it, as one undo step: a spectrum object whose source names the fragment, "
+ "method, version and frequency, with multiplets and integrals (1H) or peaks (13C) linked to the structure's atoms; the curve is recomputed from the structure, never stored. "
+ "Returns the spectrum id, the journal line and the warnings.",
+ {"doc": _DOC, "object": {"type": "string", "description": "Fragment id from get_atoms or get_structure"},
+ "nucleus": {"type": "string", "enum": ["1H", "13C"], "description": "Default 1H"},
+ "frequency": {"type": "number", "description": "MHz; default 400 for 1H, 100 for 13C"},
+ "x": {"type": "number", "description": "Left edge in points; left out: right of the structure"}, "y": {"type": "number", "description": "Top edge in points"}},
+ ["object"]),
+ _tool("open_spectrum", "Opens a JCAMP-DX spectrum (IR, Raman, UV-Vis, MS or 1D NMR, every compression form, LINK files with several blocks) as a new drawing with one spectrum object "
+ "per data block, the file kept byte for byte, and shows it in the window. Give the file as text, as base64 or as the absolute path of a .jdx, .dx or .jcamp file. "
+ "Returns the drawing id and each spectrum's id, technique, nucleus and title, plus the reader's report.",
+ {"text": {"type": "string", "description": "The JCAMP-DX file as text, starting with ##TITLE="},
+ "base64": {"type": "string", "description": "The file's bytes as base64, instead of text"},
+ "path": {"type": "string", "description": "Absolute path of a .jdx, .dx or .jcamp file, instead of text"},
+ "name": {"type": "string", "description": "File name for the drawing's title, such as ir-ethyl-acetate.jdx"}}),
+ _tool("spectrum_data", "The points of a spectrum object (measured or predicted) as the window draws them: x and y decimated to at most points values with min-max buckets so no peak is lost, "
+ "the axis labels and units, the direction (decreasing: the largest x at the left, as for IR wavenumbers and NMR ppm), the view, the y mode (transmittance or absorbance), "
+ "the observe frequency for NMR, the method (the JCAMP-DX reader, or the predictor and its version) and the reader's report. Does not change the drawing.",
+ {"doc": _DOC, "object": {"type": "string", "description": "Spectrum object id; may be left out when the drawing has one spectrum"},
+ "from": {"type": "number", "description": "Range start in the x unit (cm-1, nm, m/z, ppm)"}, "to": {"type": "number", "description": "Range end in the x unit"},
+ "points": {"type": "integer", "description": "Most points to return (16 to 2000, default 200)"},
+ "y_mode": {"type": "string", "enum": ["transmittance", "absorbance"], "description": "IR, Raman and UV-Vis only; default the spectrum's own"}}, read=True),
+ _tool("spectrum_peaks", "The peaks, integrals and multiplets stored on a spectrum object, each with its id, position, label and the structure atoms it is linked to; "
+ "with detect true it also runs FormChem's peak picker over the range and lists what it finds without adding anything. Does not change the drawing.",
+ {"doc": _DOC, "object": {"type": "string", "description": "Spectrum object id; may be left out when the drawing has one spectrum"},
+ "detect": {"type": "boolean", "description": "Also list the peaks the picker finds"},
+ "from": {"type": "number", "description": "Detection range start in the x unit"}, "to": {"type": "number", "description": "Detection range end in the x unit"}}, read=True),
+ _tool("spectrum_pick_peaks", "Finds the peaks of a spectrum in a range (default all of it) and adds them to its peak list as one undo step, skipping peaks already there: "
+ "minima for transmittance, maxima otherwise, sticks above 1 percent of the base peak for MS, NMR lines above six times the noise.",
+ {"doc": _DOC, "object": {"type": "string", "description": "Spectrum object id; may be left out when the drawing has one spectrum"},
+ "from": {"type": "number", "description": "Range start in the x unit"}, "to": {"type": "number", "description": "Range end in the x unit"},
+ "max": {"type": "integer", "description": "Most peaks to add (default 50)"}, "threshold": {"type": "number", "description": "NMR detection floor in y units"},
+ "prominence": {"type": "number", "description": "Smallest prominence in y units of the displayed mode"},
+ "replace": {"type": "boolean", "description": "Replace the peak list instead of adding to it"}}),
+ _tool("spectrum_integrate", "Adds NMR integrals over ranges as one undo step (trapezoid area after a straight baseline between the range ends), scaled like the existing integrals; "
+ "with value the first new region reads value and the rest are rescaled. With id and value it renormalises an existing integral, for example to a proton count.",
+ {"doc": _DOC, "object": {"type": "string", "description": "Spectrum object id; may be left out when the drawing has one spectrum"},
+ "from": {"type": "number", "description": "Range start in ppm"}, "to": {"type": "number", "description": "Range end in ppm"},
+ "ranges": {"type": "array", "items": {"type": "array", "items": {"type": "number"}}, "description": "Several [from, to] pairs at once, instead of from and to"},
+ "value": {"type": "number", "description": "What the (first new, or the id) integral should read"},
+ "id": {"type": "string", "description": "An existing integral id to renormalise to value"}}),
+ _tool("spectrum_export", "A spectrum as a fresh JCAMP-DX 5.01 file (with its peak table when it has peaks), as CSV of every point in display order, or with original true the "
+ "imported file untouched. The file comes back as text. Does not change the drawing.",
+ {"doc": _DOC, "object": {"type": "string", "description": "Spectrum object id; may be left out when the drawing has one spectrum"},
+ "format": {"type": "string", "enum": ["jdx", "csv"], "description": "Default jdx"},
+ "original": {"type": "boolean", "description": "With jdx: the original imported file"}}, read=True),
_tool("convert", "Converts structures between file formats with the same code as ./formchem convert: input is structure text or the absolute path of a file; the result comes back as text, "
"or is written to output (an absolute path; writing outside the temporary folder asks the person the first time, and an existing file is never written over). "
"Reads SD, SMILES, CXSMILES, InChI, molfile, RXN, reaction SMILES, RD, CML, CDXML, CDX and .fchem; writes smiles, cxsmiles, sdf, molfile, inchi, inchikey, cml, rxn, rsmiles and fchem. "
@@ -306,11 +394,46 @@ def _tool(name: str, description: str, props: dict, required: list[str] | None =
{"doc": _DOC, "reaction_smiles": {"type": "string", "description": "Such as CCO.CC(=O)O>[H+]>CC(=O)OCC.O"},
"x": {"type": "number", "description": "Left in points"}, "y": {"type": "number", "description": "Top in points"}, "page": {"type": "string", "description": "Page id; default the first page"}},
["reaction_smiles"]),
+ _tool("build_3d", "Builds 3D coordinates for a structure from its 2D drawing as one undo step: ETKDGv3 embedding with a fixed seed (wedges, double-bond geometry and charges kept), then a force-field "
+ "minimisation, stored as the fragment's one conformer. Answers with the energy, method and engine version, whether every drawn stereocentre was kept, clashes and warnings.",
+ {"doc": _DOC, "object": _FRAG, "minimise": {"type": "boolean", "description": "Minimise after embedding (default true)"}, "method": _FF}),
+ _tool("conformers_3d", "Searches conformers of a structure as one undo step: an ETKDGv3 ensemble of n, near duplicates pruned by heavy-atom RMSD, each minimised, then those within window kcal/mol "
+ "of the lowest, at most keep, replace the fragment's conformers; the lowest becomes the shown one. Answers with relative energies and Boltzmann populations at 298.15 K.",
+ {"doc": _DOC, "object": _FRAG, "n": {"type": "integer", "description": "Conformers to embed, 1 to 1000 (default 50)"},
+ "window": {"type": "number", "description": "Energy window in kcal/mol (default 10)"}, "keep": {"type": "integer", "description": "Most conformers kept, 1 to 200 (default 10)"}, "method": _FF}),
+ _tool("minimise_3d", "Minimises a stored conformer (the shown one by default) with a force field as one undo step and reports the energy before and after, the RMS gradient and whether it converged. "
+ "A structure without 3D coordinates is built first.",
+ {"doc": _DOC, "object": _FRAG, "conformer": {"type": "string", "description": "Conformer id (c...); default the shown one"}, "method": _FF}),
+ _tool("scan_dihedral", "Relaxed scan of one dihedral: at each angle from start to end the four atoms' dihedral is held and everything else minimised; answers with angle against relative energy, "
+ "the minimum and the barrier. Read-only unless store is true, which keeps one conformer per angle as one undo step.",
+ {"doc": _DOC, "object": _FRAG, "atoms": {"type": "array", "items": {"type": "string"}, "description": "Four bonded atom ids in a row; a hydrogen at either end as a1:h0"},
+ "start": {"type": "number", "description": "First angle in degrees (default -180)"}, "end": {"type": "number", "description": "Last angle in degrees (default 180)"},
+ "step": {"type": "number", "description": "Step in degrees (default 10)"}, "method": _FF, "store": {"type": "boolean", "description": "Keep each point as a conformer (default false)"}},
+ ["atoms"]),
+ _tool("measure_3d", "Measures a stored conformer: two atoms give a distance in ångström, three an angle and four a signed dihedral in degrees. Atoms are fragment atom ids, hydrogens as a1:h0.",
+ {"doc": _DOC, "object": _FRAG, "atoms": {"type": "array", "items": {"type": "string"}, "description": "Two to four atom ids"},
+ "conformer": {"type": "string", "description": "Conformer id (c...); default the shown one"}}, ["atoms"], read=True),
+ _tool("open_3d_structure", "Opens a PDB, mmCIF, SDF or MOL file into a drawing as one undo step: PDB and mmCIF become a 3D object over the file kept byte for byte (cartoon for a protein, "
+ "ligands as ball and stick, waters hidden, the main ligand focused); SDF and MOL records become structures whose file coordinates are kept as their conformer. Answers with the chains, ligands and waters found.",
+ {"doc": _DOC, "path": {"type": "string", "description": "Absolute path of the .pdb, .ent, .cif, .mmcif, .sdf or .mol file"},
+ "as": {"type": "string", "enum": ["model", "fragment"], "description": "model (default for PDB and mmCIF) or fragment (default for SDF and MOL)"},
+ "x": {"type": "number", "description": "Left in points; default free space"}, "y": {"type": "number", "description": "Top in points; default free space"}}, ["path"]),
+ _tool("extract_ligand", "Turns a ligand of a 3D object opened from a PDB or mmCIF file into a 2D structure beside it as one undo step: bond orders from a built-in template for common ligands, "
+ "otherwise inferred from the geometry and reported; the file coordinates become its conformer. Answers with the new fragment id and its SMILES.",
+ {"doc": _DOC, "object": {"type": "string", "description": "The 3D object (o...); may be left out when the drawing has one"},
+ "ligand": {"type": "string", "description": "Ligand key chain:het:number such as A:ATP:301, or a het code; default the main ligand"}}),
+ _tool("export_3d", "Writes the 3D coordinates of a structure with every hydrogen as MOL (the shown conformer), SDF (every conformer, with energy and method data fields), PDB or XYZ; "
+ "answers with the text, or writes it to output (never over an existing file).",
+ {"doc": _DOC, "object": _FRAG, "format": {"type": "string", "enum": ["mol", "sdf", "pdb", "xyz"], "description": "Default sdf"},
+ "conformer": {"type": "string", "description": "Conformer id, or all; default all for sdf, else the shown one"},
+ "output": {"type": "string", "description": "Absolute path of a new file to write; left out, the text comes back"}}),
]
NAMES = {t["name"] for t in TOOLS}
MUTATING = {"run_command", "extension_command", "perceive_reactions", "map_reaction", "new_document", "open_document", "save_document", "close_document",
- "draw_from_smiles", "draw_from_molfile", "add_atom", "add_bond", "set_charge", "set_atom", "set_stereo", "replace_substructure",
- "delete", "move", "scale", "align", "clean_layout", "add_arrow", "add_text", "add_reaction"}
+ "draw_from_smiles", "draw_from_molfile", "draw_from_name", "add_atom", "add_bond", "set_charge", "set_atom", "set_stereo", "replace_substructure",
+ "delete", "move", "scale", "align", "clean_layout", "add_arrow", "add_text", "add_reaction", "predict_spectrum",
+ "open_spectrum", "spectrum_pick_peaks", "spectrum_integrate",
+ "build_3d", "conformers_3d", "minimise_3d", "open_3d_structure", "extract_ligand"}
def _ok(text: str, data: dict | None = None) -> dict:
@@ -338,6 +461,10 @@ def _mutating(name: str, args: dict) -> bool:
return bool(args.get("output")) and not _temporary(args.get("output"))
if name == "batch_convert":
return not _temporary(args.get("output_dir") or f"{args.get('input_dir') or ''}/converted")
+ if name == "scan_dihedral":
+ return args.get("store") is True
+ if name == "export_3d":
+ return bool(args.get("output")) and not _temporary(args.get("output"))
return False
@@ -702,6 +829,244 @@ async def t_compute_properties(a: Agent, args: dict) -> dict:
return await _same_as(a, args, t_properties)
+async def _snapshot(args: dict) -> tuple[str, dict]:
+ from app.services.store import STORE
+ doc_id, _ = await _doc_id(args)
+ s = STORE.get(doc_id)
+ with s.lock:
+ return doc_id, copy.deepcopy(s.doc)
+
+
+def _number_arg(args: dict, key: str) -> float | None:
+ v = args.get(key)
+ return float(v) if isinstance(v, (int, float)) and not isinstance(v, bool) else None
+
+
+async def t_predict_nmr(a: Agent, args: dict) -> dict:
+ from app.services.nmr import predict as nmr_predict
+ nucleus = str(args.get("nucleus") or "1H")
+ if nucleus not in ("1H", "13C", "both"):
+ raise ToolError("nucleus is 1H, 13C or both.")
+ freq = _number_arg(args, "frequency")
+ if str(args.get("smiles") or "").strip():
+ from app.services.chem import DEFAULT_BOND_LENGTH, io
+ try:
+ parsed = io.read_text(str(args["smiles"]).strip(), "smiles", DEFAULT_BOND_LENGTH, (0.0, 0.0))
+ except ValueError as exc:
+ raise ToolError(f"smiles: {exc}") from None
+ frag, exp = next((f for f in parsed.fragments if f.get("atoms")), None), None
+ if frag is None:
+ raise ToolError("The SMILES holds no structure.")
+ else:
+ doc_id, doc = await _snapshot(args)
+ frags = [k for k, o in (doc.get("objects") or {}).items() if isinstance(o, dict) and o.get("kind") == "fragment" and o.get("atoms")]
+ fid = str(args.get("object") or "").strip() or (frags[0] if len(frags) == 1 else "")
+ if fid not in frags:
+ raise ToolError("Give object, a fragment id from get_structure." if not fid else f"{fid} is not a fragment of {doc_id}.")
+ frag, exp = doc["objects"][fid], doc.get("expansions")
+ try:
+ if nucleus == "both":
+ out = await asyncio.to_thread(nmr_predict.predict_both, frag, freq, exp)
+ lines = [out["1H"]["journal"], out["13C"]["journal"]]
+ else:
+ out = await asyncio.to_thread(nmr_predict.predict, frag, nucleus, freq, exp)
+ lines = [out["journal"]] + [f"- {w['code']}: {w['text']}" for w in out["warnings"]]
+ except nmr_predict.PredictError as exc:
+ raise ToolError(str(exc)) from None
+ return _ok("\n".join(lines), out)
+
+
+async def t_predict_spectrum(a: Agent, args: dict) -> dict:
+ from app.services.nmr import document as nmr_document
+ doc_id, doc = await _snapshot(args)
+ nucleus = str(args.get("nucleus") or "1H")
+ if nucleus not in ("1H", "13C"):
+ raise ToolError("nucleus is 1H or 13C.")
+ try:
+ ops, obj, result = await asyncio.to_thread(nmr_document.spectrum_ops, doc, str(args.get("object") or ""), nucleus,
+ _number_arg(args, "frequency"), _number_arg(args, "x"), _number_arg(args, "y"))
+ except nmr_document.DocumentError as exc:
+ raise ToolError(f"{exc} get_structure lists the fragment ids.") from None
+ done = await _apply(a, doc_id, f"Predict {obj['nucleus']} NMR Spectrum", ops)
+ rev = done["rev"] if done else None
+ src = obj["source"]["predicted"]
+ return _ok(f"Added predicted {obj['nucleus']} NMR spectrum {obj['id']} to {doc_id} (rev {rev}, one undo step; {src['method']} {src['version']}, {src['frequency']:g} MHz). "
+ f"spectrum_data reads its points, spectrum_peaks its linked marks.\n{result['journal']}"
+ + "".join(f"\n- {w['code']}: {w['text']}" for w in result["warnings"]),
+ {"doc": doc_id, "id": obj["id"], "rev": rev, "object": obj, "journal": result["journal"], "warnings": result["warnings"]})
+
+
+def _refused(exc: Exception) -> ToolError:
+ detail = getattr(exc, "detail", None) or str(exc)
+ if isinstance(detail, dict):
+ detail = detail.get("message") or json.dumps(detail)
+ return ToolError(str(detail))
+
+
+async def _spectrum(args: dict):
+ from fastapi import HTTPException
+ from app.routers import spectra
+ doc_id, doc = await _snapshot(args)
+ found = [k for k, o in (doc.get("objects") or {}).items() if isinstance(o, dict) and o.get("kind") == "spectrum"]
+ oid = str(args.get("object") or "").strip() or (found[0] if len(found) == 1 else "")
+ if oid not in found:
+ raise ToolError(f"{oid} is not a spectrum of {doc_id}." if oid else f"Give object, a spectrum id of {doc_id} ({', '.join(found[:8]) or 'it has none; open_spectrum or predict_spectrum adds one'}).")
+ try:
+ return doc_id, oid, await spectra._load(doc_id, oid)
+ except HTTPException as exc:
+ raise _refused(exc) from None
+
+
+def _spectrum_body(args: dict, keys: tuple) -> dict:
+ return {k: args[k] for k in keys if args.get(k) is not None}
+
+
+def _mark_line(kind: str, m: dict) -> str:
+ at = m.get("shift", m.get("x"))
+ where = f"{m['from']:g} to {m['to']:g}" if "from" in m and "to" in m else f"{at:g}" if isinstance(at, (int, float)) else str(at)
+ if "shift" in m and isinstance(m["shift"], (int, float)):
+ where += f" (centre {m['shift']:g})"
+ extra = f" = {m['value']:g}" if isinstance(m.get("value"), (int, float)) else f" {m['kind']}" if m.get("kind") else ""
+ link = m.get("atoms") or {}
+ linked = f" -> {link.get('object')} atoms {', '.join(link.get('atoms') or [])}" if link else ""
+ return f"- {kind} {m.get('id')}: {where}{extra}{linked}"
+
+
+async def t_open_spectrum(a: Agent, args: dict) -> dict:
+ from fastapi import HTTPException
+ from app.core import files
+ from app.routers import documents, spectra
+ from app.services.spectra import SUFFIXES
+ from app.services.store import STORE, StoreError
+ raw = str(args.get("path") or "").strip()
+ target = None
+ if raw:
+ p = Path(raw).expanduser()
+ if not p.is_absolute() or p.suffix.lower() not in SUFFIXES:
+ raise ToolError("Give path as the absolute path of a .jdx, .dx or .jcamp file.")
+ target = p
+ else:
+ try:
+ data = spectra._decode(args)
+ except HTTPException as exc:
+ raise _refused(exc) from None
+ name = files.safe_name(Path(str(args.get("name") or "Spectrum.jdx")).name, "Spectrum.jdx")
+ if Path(name).suffix.lower() not in SUFFIXES:
+ name = f"{name}.jdx"
+ target = files.free_name(config.data_dir() / documents.IMPORTS, name)
+ await asyncio.to_thread(files.write_atomic, target, data)
+ try:
+ info = await STORE.open(str(target))
+ except StoreError as exc:
+ if not raw:
+ files.remove_quietly(target)
+ raise ToolError(f"{exc} Check that it is a JCAMP-DX file.") from None
+ doc_id = info["id"]
+ shown = await _show(doc_id, True)
+ s = STORE.get(doc_id)
+ with s.lock:
+ objects = s.doc.get("objects") or {}
+ rows = [{"id": k, "technique": o.get("technique"), "nucleus": o.get("nucleus"), "name": o.get("name")}
+ for k, o in objects.items() if isinstance(o, dict) and o.get("kind") == "spectrum"]
+ report = [r.get("text") for r in info.get("report") or [] if isinstance(r, dict) and r.get("text")]
+ lines = [f"Opened {raw or name} as {doc_id} \"{info['title']}\" with {len(rows)} spectrum object{'' if len(rows) == 1 else 's'}. {_shown_text(shown)}"]
+ lines += [f"- {r['id']}: {r['technique']}" + (f" {r['nucleus']}" if r["nucleus"] else "") + (f" \"{r['name']}\"" if r["name"] else "") for r in rows]
+ lines += [f"Report: {t}" for t in report[:6]]
+ return _ok("\n".join(lines), {"doc": doc_id, "title": info["title"], "spectra": rows, "shown": shown, "report": info.get("report") or []})
+
+
+async def t_spectrum_data(a: Agent, args: dict) -> dict:
+ from fastapi import HTTPException
+ from app.routers import spectra
+ doc_id, oid, _ = await _spectrum(args)
+ points = args.get("points", 200)
+ if isinstance(points, bool) or not isinstance(points, int) or not 16 <= points <= 2000:
+ raise ToolError("points is a whole number from 16 to 2000.")
+ mode = args.get("y_mode") if args.get("y_mode") in ("transmittance", "absorbance") else None
+ try:
+ d = await asyncio.to_thread(spectra._data, doc_id, oid, _number_arg(args, "from"), _number_arg(args, "to"), points, mode, False, None)
+ except HTTPException as exc:
+ raise _refused(exc) from None
+ ax = d.get("axis") or {}
+ xs = d.get("x") or []
+ text = (f"{oid} ({d['technique']}{' ' + d['nucleus'] if d.get('nucleus') else ''}, {d['kind']}) \"{d.get('title') or ''}\": {len(xs)} of {d.get('total')} points, "
+ f"x {ax.get('x', {}).get('label')} {d['direction']} left to right, y {ax.get('y', {}).get('label')}"
+ + (f", {d['frequency']:g} MHz" if d.get("frequency") else "") + f". Method: {d['method']}.")
+ keep = ("technique", "nucleus", "kind", "title", "frequency", "x", "y", "n", "total", "decimated", "range", "full", "direction", "view", "axis", "y_mode", "y_modes", "report", "method", "predicted")
+ return _ok(text, {"doc": doc_id, "object": oid, **{k: d.get(k) for k in keep}})
+
+
+async def t_spectrum_peaks(a: Agent, args: dict) -> dict:
+ from fastapi import HTTPException
+ from app.routers import spectra
+ doc_id, oid, got = await _spectrum(args)
+ obj = got.obj
+ lines = [f"{oid} ({obj.get('technique')}{' ' + obj['nucleus'] if obj.get('nucleus') else ''})"
+ + (f", predicted by {obj['source']['predicted'].get('method')} {obj['source']['predicted'].get('version')}" if "predicted" in (obj.get("source") or {}) else "") + ":"]
+ marks = {}
+ for key, kind in (("peaks", "peak"), ("integrals", "integral"), ("multiplets", "multiplet")):
+ marks[key] = [m for m in obj.get(key) or [] if isinstance(m, dict)]
+ lines += [_mark_line(kind, m) for m in marks[key]]
+ if not any(marks.values()):
+ lines.append("- no peaks, integrals or multiplets stored")
+ data = {"doc": doc_id, "object": oid, **marks}
+ if args.get("detect") is True:
+ try:
+ _, found, skipped, mode = await spectra.peak_ops(got, oid, _spectrum_body(args, ("from", "to")))
+ except HTTPException as exc:
+ raise _refused(exc) from None
+ lines.append(f"Detected (not added): {', '.join(p.get('label') or str(p.get('x')) for p in found) or 'none new'}" + (f"; {skipped} already stored" if skipped else ""))
+ data.update({"detected": found, "already": skipped, "y_mode": mode})
+ return _ok("\n".join(lines), data)
+
+
+async def t_spectrum_pick_peaks(a: Agent, args: dict) -> dict:
+ from fastapi import HTTPException
+ from app.routers import spectra
+ doc_id, oid, got = await _spectrum(args)
+ try:
+ ops, added, skipped, mode = await spectra.peak_ops(got, oid, _spectrum_body(args, ("from", "to", "max", "threshold", "prominence", "replace")))
+ except HTTPException as exc:
+ raise _refused(exc) from None
+ done = await _apply(a, doc_id, "Pick Peaks", ops)
+ head = (f"Added {len(added)} peak{'' if len(added) == 1 else 's'} to {oid} (rev {done['rev']}, one undo step): {', '.join(p.get('label') or str(p.get('x')) for p in added)}."
+ if done else f"No new peaks in that range of {oid}.") + (f" {skipped} were already there." if skipped else "")
+ return _ok(head, {"doc": doc_id, "object": oid, "rev": done["rev"] if done else None, "peaks": added, "skipped": skipped, "y_mode": mode})
+
+
+async def t_spectrum_integrate(a: Agent, args: dict) -> dict:
+ from fastapi import HTTPException
+ from app.routers import spectra
+ doc_id, oid, got = await _spectrum(args)
+ try:
+ ops, rows, scale = await spectra.integral_ops(got, oid, _spectrum_body(args, ("from", "to", "ranges", "value", "id")))
+ except HTTPException as exc:
+ raise _refused(exc) from None
+ done = await _apply(a, doc_id, "Integrate", ops)
+ shown = "; ".join(f"{r['from']:g} to {r['to']:g} = {r['value']:g}" for r in rows if isinstance(r.get("value"), (int, float)))
+ head = f"Integrals of {oid}" + (f" (rev {done['rev']}, one undo step)" if done else " (unchanged)") + f": {shown}."
+ return _ok(head, {"doc": doc_id, "object": oid, "rev": done["rev"] if done else None, "integrals": rows, "scale": scale})
+
+
+async def t_spectrum_export(a: Agent, args: dict) -> dict:
+ from urllib.parse import unquote
+ from fastapi import HTTPException
+ from app.routers import spectra
+ doc_id, oid, _ = await _spectrum(args)
+ fmt = str(args.get("format") or "jdx")
+ if fmt not in ("jdx", "csv"):
+ raise ToolError("format is jdx or csv.")
+ try:
+ res = await asyncio.to_thread(spectra._export, doc_id, oid, fmt, args.get("original") is True, None, None, None)
+ except HTTPException as exc:
+ raise _refused(exc) from None
+ body = bytes(res.body)
+ name = unquote(res.headers.get("x-formchem-filename") or f"spectrum.{fmt}")
+ text = body.decode("utf-8", "replace")
+ return {"content": [{"type": "text", "text": f"{name} ({len(body):,} bytes, {fmt}) of {oid}:"}, {"type": "text", "text": text}],
+ "structuredContent": {"doc": doc_id, "object": oid, "name": name, "format": fmt, "text": text}}
+
+
def _failures(rows: list[dict]) -> list[str]:
return [f" {r['file']} " + (f"record {r['record']}" if r.get("record") != "" else "file") + (f" ({r['name']})" if r.get("name") else "") + f": {r['message']}"
for r in rows if r.get("status") == "failed"][:12]
@@ -744,6 +1109,74 @@ async def t_draw_from_molfile(a: Agent, args: dict) -> dict:
return await _draw(a, args, text, "sdf" if "$$$$" in text else "molfile", "Draw from Molfile", "molfile")
+async def t_draw_from_name(a: Agent, args: dict) -> dict:
+ from app.services import names as name_engines
+ text = str(args.get("name") or "").strip()
+ if not text:
+ raise ToolError("Give name, such as aspirin or 2-methylpropan-1-ol.")
+ if len(text) > 300:
+ raise ToolError("Names longer than 300 characters are not read; use draw_from_smiles.")
+ found = await asyncio.to_thread(name_engines.engine().to_structure, text)
+ if not found.ok:
+ why = found.error["text"] if found.error else "no structure"
+ raise ToolError(f"Could not read the name: {why} Check the spelling and locants, or use draw_from_smiles.")
+ out = await _draw(a, {**args, "name": str(args.get("label") or text)}, found.smiles, "smiles", "Draw from Name", "structure")
+ how = {k: v for k, v in found.as_dict().items() if k in ("smiles", "inchikey", "confidence", "method", "engine", "version", "warnings")}
+ head = (f"Read \"{text}\" by {found.method} ({found.confidence} confidence, {found.engine} names {found.version}) as {found.smiles}. "
+ + "".join(f"Note: {w['text']} " for w in found.warnings[:4]))
+ if not out.get("isError"):
+ out["content"][0]["text"] = head + out["content"][0]["text"]
+ out.setdefault("structuredContent", {})["read"] = how
+ return out
+
+
+async def t_name_structure(a: Agent, args: dict) -> dict:
+ from rdkit import Chem
+ from app.routers.names import name_mol
+ from app.services import agent_out
+ from app.services.store import STORE
+ smiles = str(args.get("smiles") or "").strip()
+ rows = []
+ doc_id = None
+ if smiles:
+ mol = Chem.MolFromSmiles(smiles)
+ if mol is None:
+ raise ToolError("smiles is not a valid SMILES.")
+ rows.append({"id": None, "smiles": smiles, **await asyncio.to_thread(name_mol, mol)})
+ else:
+ doc_id, _ = await _doc_id(args)
+ with STORE.get(doc_id).lock:
+ doc = copy.deepcopy(STORE.get(doc_id).doc)
+ objects = doc.get("objects") or {}
+ wanted = str(args.get("object") or "").strip()
+ if args.get("selection") is True:
+ try:
+ found = await agent_out.selection(doc_id)
+ except agent_out.RenderError as exc:
+ raise ToolError(str(exc)) from None
+ frags = agent_out.fragments_in(doc, list(found.get("ids") or [])) if found.get("doc") == doc_id else []
+ elif wanted:
+ if wanted not in objects:
+ raise ToolError(f"{wanted} is not an object of {doc_id}.")
+ frags = agent_out.fragments_in(doc, [wanted])
+ else:
+ frags = [k for k, o in objects.items() if isinstance(o, dict) and o.get("kind") == "fragment" and o.get("atoms")]
+ if not frags:
+ raise ToolError("There is no structure there. draw_from_smiles or draw_from_name draws one.")
+ for r in await asyncio.to_thread(agent_out.full_structures, doc_id, frags[:STRUCTURE_ROWS]):
+ mol = Chem.MolFromSmiles(r["smiles"]) if r.get("smiles") else None
+ named = await asyncio.to_thread(name_mol, mol) if mol is not None else {"names": [], "reason": "The fragment has no SMILES (labels or query features)."}
+ rows.append({"id": r["id"], "smiles": r.get("smiles"), **named})
+ lines = []
+ for r in rows:
+ head = f"{r['id']}: " if r["id"] else ""
+ if r.get("names"):
+ lines.append(head + "; ".join(f"{n['text']} ({n['kind']}, {n['method']}, {n['confidence']})" for n in r["names"]) + f" [{r.get('engine')} {r.get('version')}]")
+ else:
+ lines.append(head + f"no name: {r.get('reason') or 'unsupported'}")
+ return _ok("\n".join(lines), {"doc": doc_id, "structures": rows})
+
+
def _param_line(c: dict) -> str:
ps = c.get("params") or {}
if not isinstance(ps, dict) or not ps:
@@ -1246,6 +1679,206 @@ def say(i: dict) -> str:
return await _edit(a, args, agent_edits.add_reaction, "Add reaction", say, create=True)
+async def _three_d(a: Agent | None, fn, doc_id: str, *args):
+ from fastapi import HTTPException
+ from app.routers import three_d
+ if a is not None:
+ args = (*args[:-1], {**args[-1], "_agent": three_d.AgentCall(a.name)})
+ try:
+ out = fn(doc_id, *args)
+ return await out if asyncio.iscoroutine(out) else out
+ except HTTPException as exc:
+ detail = exc.detail.get("message") if isinstance(exc.detail, dict) else exc.detail
+ raise ToolError(str(detail)) from None
+
+
+def _fragment_of(doc: dict, args: dict) -> str:
+ objects = doc.get("objects") or {}
+ wanted = str(args.get("object") or "").strip()
+ if wanted:
+ o = objects.get(wanted)
+ source = o.get("source") if isinstance(o, dict) and o.get("kind") == "model3d" and isinstance(o.get("source"), dict) else {}
+ return source["fragment"] if isinstance(source.get("fragment"), str) else wanted
+ frags = [k for k, o in objects.items() if isinstance(o, dict) and o.get("kind") == "fragment" and o.get("atoms")]
+ if len(frags) == 1:
+ return frags[0]
+ raise ToolError("Give object, the fragment id of the structure (get_structure or get_atoms lists them)." if frags else "This drawing has no structure yet; draw_from_smiles draws one.")
+
+
+def _three_d_body(args: dict, keys: tuple) -> dict:
+ return {k: args[k] for k in keys if args.get(k) is not None}
+
+
+def _stereo_text(report: dict) -> str:
+ st = report.get("stereo") or {}
+ found = st.get("found") or {}
+ if not found:
+ return "no stereocentres or stereo double bonds"
+ labels = ", ".join(f"{k} {v}" for k, v in sorted(found.items()))
+ return (f"all {len(found)} stereo labels kept ({labels})" if st.get("kept") else f"stereo changed: lost {', '.join(str(x) for x in st.get('lost') or [])}")
+
+
+def _warn_text(items: list) -> str:
+ return "".join(f" Note: {w.get('text')}" for w in (items or [])[:5] if isinstance(w, dict) and w.get("text"))
+
+
+async def t_build_3d(a: Agent, args: dict) -> dict:
+ from app.routers import three_d
+ doc_id, _ = await _doc_id(args)
+ _, doc = _drawing({"doc": doc_id})
+ fid = _fragment_of(doc, args)
+ out = await _three_d(a, three_d.build_3d, doc_id, {"object": fid, **_three_d_body(args, ("minimise", "method"))})
+ rep, c = out.get("report") or {}, out.get("conformer") or {}
+ energy = f"{c['energy']:.2f} kcal/mol" if isinstance(c.get("energy"), (int, float)) else "no force-field energy (embedded only)"
+ text = (f"Built 3D for {fid}: conformer {c.get('id')}, {energy}, {rep.get('method')} ({rep.get('engine')}), {rep.get('atoms')} atoms with hydrogens; "
+ f"{_stereo_text(rep)}; {len(rep.get('clashes') or [])} clashes. One undo step (rev {out.get('rev')}).{_warn_text(rep.get('warnings'))}")
+ return _ok(text, {"doc": doc_id, "object": fid, "changed": out.get("changed"), "rev": out.get("rev"), "conformer": c, "report": rep})
+
+
+async def t_conformers_3d(a: Agent, args: dict) -> dict:
+ from app.routers import three_d
+ doc_id, _ = await _doc_id(args)
+ _, doc = _drawing({"doc": doc_id})
+ fid = _fragment_of(doc, args)
+ out = await _three_d(a, three_d.conformers_3d, doc_id, {"object": fid, **_three_d_body(args, ("n", "window", "keep", "method"))})
+ rep, rows = out.get("report") or {}, out.get("conformers") or []
+ lines = [f"Kept {len(rows)} conformer{'' if len(rows) == 1 else 's'} of {fid} ({rep.get('embedded')} embedded, {rep.get('within_window')} within {rep.get('window')} kcal/mol), "
+ f"{rep.get('method')} ({rep.get('engine')}); shown: {out.get('active')}. One undo step (rev {out.get('rev')}).{_warn_text(rep.get('warnings'))}"]
+ lines += [f"- {r.get('id')}: +{r.get('relative', 0):.2f} kcal/mol, population {100 * (r.get('population') or 0):.1f}%" for r in rows[:20]]
+ return _ok("\n".join(lines), {"doc": doc_id, "object": fid, "changed": out.get("changed"), "rev": out.get("rev"), "conformers": rows, "active": out.get("active"), "report": rep})
+
+
+async def t_minimise_3d(a: Agent, args: dict) -> dict:
+ from app.routers import three_d
+ doc_id, _ = await _doc_id(args)
+ _, doc = _drawing({"doc": doc_id})
+ fid = _fragment_of(doc, args)
+ out = await _three_d(a, three_d.minimise_3d, doc_id, {"object": fid, **_three_d_body(args, ("conformer", "method"))})
+ rep, c = out.get("report") or {}, out.get("conformer") or {}
+ before, after = rep.get("energy_before"), rep.get("energy_after")
+ span = f"{before:.2f} to {after:.2f} kcal/mol" if isinstance(before, (int, float)) and isinstance(after, (int, float)) else f"{after} kcal/mol"
+ text = (f"Minimised conformer {c.get('id')} of {fid} with {rep.get('method')} ({rep.get('engine')}): {span}, RMS gradient {rep.get('rms_gradient')}, "
+ f"{'converged' if rep.get('converged') else 'not converged'}{' (built first)' if rep.get('built') else ''}. One undo step (rev {out.get('rev')}).{_warn_text(rep.get('warnings'))}")
+ return _ok(text, {"doc": doc_id, "object": fid, "changed": out.get("changed"), "rev": out.get("rev"), "conformer": c, "report": rep})
+
+
+async def t_scan_dihedral(a: Agent, args: dict) -> dict:
+ from app.routers import three_d
+ doc_id, _ = await _doc_id(args)
+ _, doc = _drawing({"doc": doc_id})
+ fid = _fragment_of(doc, args)
+ atoms = _id_list(args.get("atoms"))
+ if len(atoms) != 4:
+ raise ToolError("Give atoms, four bonded atom ids in a row (get_atoms lists them).")
+ store = args.get("store") is True
+ out = await _three_d(a if store else None, three_d.scan_3d, doc_id, {"object": fid, "atoms": atoms, "store": store, **_three_d_body(args, ("start", "end", "step", "method"))})
+ lo, hi = out.get("minimum") or {}, out.get("maximum") or {}
+ barrier = f", barrier {hi['energy'] - lo['energy']:.2f} kcal/mol at {hi['angle']:.0f} degrees" if "energy" in hi and "energy" in lo else ""
+ lines = [f"Scanned {'-'.join(atoms)} of {fid}: {len(out.get('points') or [])} points, minimum at {lo.get('angle')} degrees{barrier}, {out.get('method')} ({out.get('engine')})"
+ + (f"; kept as conformers, one undo step (rev {out.get('rev')})." if store and out.get("changed") else "; nothing stored.") + _warn_text(out.get("warnings"))]
+ lines += [f"- {p.get('angle'):.0f}: +{p.get('relative', 0):.2f} kcal/mol" for p in (out.get("points") or [])[:73]]
+ return _ok("\n".join(lines), {"doc": doc_id, "object": fid, **{k: out.get(k) for k in ("points", "minimum", "maximum", "method", "engine", "warnings", "changed", "rev")}})
+
+
+async def t_measure_3d(a: Agent, args: dict) -> dict:
+ from app.routers import three_d
+ doc_id, _ = await _doc_id(args)
+ _, doc = _drawing({"doc": doc_id})
+ fid = _fragment_of(doc, args)
+ atoms = _id_list(args.get("atoms"))
+ if not 2 <= len(atoms) <= 4:
+ raise ToolError("Give atoms, two to four atom ids (hydrogens as a1:h0).")
+ out = await _three_d(None, three_d.measure_3d, doc_id, fid, ",".join(atoms), str(args.get("conformer") or "") or None)
+ text = f"{str(out.get('kind', '')).capitalize()} {'-'.join(atoms)} of {fid}: {out.get('value')} {out.get('unit')} (conformer {out.get('conformer')}, {out.get('method')})."
+ return _ok(text, {"doc": doc_id, "object": fid, **out})
+
+
+async def t_open_3d_structure(a: Agent, args: dict) -> dict:
+ from app.routers import three_d
+ from app.services import agent_out
+ from app.services.store import STORE
+ raw = str(args.get("path") or "").strip()
+ p = Path(raw).expanduser()
+ if not raw or not p.is_absolute():
+ raise ToolError("Give path, the absolute path of a .pdb, .cif, .sdf or .mol file.")
+ if not p.is_file():
+ raise ToolError(f"{p} does not exist.")
+ if p.stat().st_size > three_d.UPLOAD_LIMIT:
+ raise ToolError(f"{p.name} is larger than {three_d.UPLOAD_LIMIT // (1024 * 1024)} MB.")
+ data = await asyncio.to_thread(p.read_bytes)
+ doc_id, created = await _doc_id(args, create=True)
+ _, doc = _drawing({"doc": doc_id})
+ page = (doc.get("pages") or [{}])[0].get("id")
+ x, y = _coord(args, "x"), _coord(args, "y")
+ if x is None or y is None:
+ fx, fy = agent_out.free_spot(doc, page, 240.0, 180.0)
+ x, y = (fx if x is None else x), (fy if y is None else y)
+ fields = {"place": True, "x": x, "y": y, **_three_d_body(args, ("as",))}
+ try:
+ out = await _three_d(a, three_d.open_bytes, doc_id, data, p.name, fields)
+ except ToolError:
+ if created:
+ await STORE.close(doc_id)
+ raise
+ shown = await _show(doc_id, created)
+ s = out.get("summary") or {}
+ if out.get("fragments") is not None:
+ text = f"Opened {p.name} into {doc_id}: {len(out['fragments'])} structure(s) {', '.join(out['fragments'][:10])} with the file coordinates as their conformer. One undo step (rev {out.get('rev')})."
+ else:
+ chains = "; ".join(f"chain {c.get('id')} {c.get('polymer')} {c.get('residues')} residues" for c in s.get("chains") or []) or "no polymer chains"
+ ligs = ", ".join(g.get("key", "") for g in s.get("ligands") or []) or "none"
+ text = (f"Opened {p.name} ({out.get('format')}) into {doc_id} as 3D object {(out.get('object') or {}).get('id')}: {s.get('atoms')} atoms, {chains}; ligands {ligs}; "
+ f"{s.get('waters', 0)} waters (hidden). One undo step (rev {out.get('rev')}). {_shown_text(shown)}")
+ data_out = {k: v for k, v in out.items() if k not in ("tx",)}
+ return _ok(text + _warn_text(s.get("warnings")), {"doc": doc_id, "created": created, "shown": shown, **data_out})
+
+
+async def t_extract_ligand(a: Agent, args: dict) -> dict:
+ from app.routers import three_d
+ doc_id, _ = await _doc_id(args)
+ _, doc = _drawing({"doc": doc_id})
+ objects = doc.get("objects") or {}
+ wanted = str(args.get("object") or "").strip()
+ models = [k for k, o in objects.items() if isinstance(o, dict) and o.get("kind") == "model3d" and isinstance((o.get("source") or {}).get("media"), str)]
+ if not wanted:
+ if len(models) != 1:
+ raise ToolError("Give object, the 3D object opened from a PDB or mmCIF file." if models else "This drawing has no 3D object from a PDB or mmCIF file; open_3d_structure opens one.")
+ wanted = models[0]
+ o = objects.get(wanted) or {}
+ body = {"object": wanted, "x": float(o.get("x", 72)) + float(o.get("w", 0)) + 24, "y": float(o.get("y", 72)), **_three_d_body(args, ("ligand",))}
+ out = await _three_d(a, three_d.extract_ligand, doc_id, body)
+ lig = out.get("ligand") or {}
+ text = (f"Extracted ligand {lig.get('key') or args.get('ligand') or ''} of {wanted} as fragment {out.get('fragment')}: {out.get('smiles')} "
+ f"(bond orders {'from the template table' if out.get('bonds') == 'template' else 'inferred from the geometry'}). One undo step (rev {out.get('rev')}).{_warn_text(out.get('warnings'))}")
+ return _ok(text, {"doc": doc_id, **{k: v for k, v in out.items() if k != "tx"}})
+
+
+async def t_export_3d(a: Agent, args: dict) -> dict:
+ from app.core import files
+ from app.services.three_d import ThreeDError, export, molecule
+ doc_id, _ = await _doc_id(args)
+ _, doc = _drawing({"doc": doc_id})
+ fid = _fragment_of(doc, args)
+ fmt = str(args.get("format") or "sdf")
+ conformer = str(args.get("conformer") or "") or ("all" if fmt == "sdf" else None)
+ try:
+ frag = molecule.find_fragment(doc, fid)
+ out = await asyncio.to_thread(export.write, frag, molecule.expansions_of(doc), fmt, conformer)
+ except ThreeDError as exc:
+ raise ToolError(str(exc)) from None
+ raw = str(args.get("output") or "").strip()
+ info = {"doc": doc_id, "object": fid, "format": out.get("format"), "count": out.get("count"), "conformer": out.get("conformer"), "filename": out.get("filename")}
+ if not raw:
+ return _ok(f"{fmt.upper()} of {fid} ({out.get('count')} conformer(s)):\n{out['text']}", {**info, "text": out["text"]})
+ target = Path(raw).expanduser()
+ if not target.is_absolute():
+ raise ToolError("Give output as an absolute path.")
+ if target.exists():
+ raise ToolError(f"{target} already exists. FormChem does not write over another file for an agent: choose a new path.")
+ written = await asyncio.to_thread(files.write_atomic, target, out["text"].encode("utf-8"))
+ return _ok(f"Wrote {out.get('count')} conformer(s) of {fid} as {fmt.upper()} to {written}.", {**info, "written": str(written)})
+
+
async def _send_handoffs(client: Client, msg: dict) -> None:
await client.send({"t": "handoffs", "items": _handoff_list()})
diff --git a/backend/app/routers/names.py b/backend/app/routers/names.py
new file mode 100644
index 00000000..ca7c8bcb
--- /dev/null
+++ b/backend/app/routers/names.py
@@ -0,0 +1,184 @@
+import asyncio
+import copy
+import math
+
+from fastapi import APIRouter, Body, Depends, HTTPException, Request
+from rdkit import Chem
+
+from app.core import window_key
+from app.services import names
+from app.services import ops as opsmod
+from app.services.chem import DEFAULT_BOND_LENGTH, ENGINE, ids, io, perceive
+from app.services.store import STORE
+
+router = APIRouter()
+MAX_NAME = 300
+MAX_SMILES = 20000
+MAX_ATOMS = 500
+
+
+def _guard(request: Request) -> None:
+ window_key.require(request)
+
+
+GUARD = [Depends(_guard)]
+
+
+def _name(body: dict) -> str:
+ text = body.get("name")
+ if not isinstance(text, str) or not text.strip():
+ raise HTTPException(422, "name is required")
+ if len(text) > MAX_NAME:
+ raise HTTPException(413, f"name is longer than {MAX_NAME} characters")
+ return text.strip()
+
+
+def _engine(body: dict):
+ wanted = body.get("engine")
+ if wanted is not None and not isinstance(wanted, str):
+ raise HTTPException(422, "engine must be an engine id")
+ try:
+ return names.engine(wanted or None)
+ except KeyError as exc:
+ raise HTTPException(404, str(exc).strip("'\""))
+
+
+def _num(v) -> bool:
+ return isinstance(v, (int, float)) and not isinstance(v, bool) and math.isfinite(v)
+
+
+def _bond_length(body: dict) -> float:
+ value = body.get("bond_length")
+ if value is None:
+ return DEFAULT_BOND_LENGTH
+ if not _num(value) or not 1 <= value <= 500:
+ raise HTTPException(422, "bond_length must be a number of points from 1 to 500")
+ return float(value)
+
+
+def _coord(body: dict, key: str) -> float | None:
+ v = body.get(key)
+ if v is None:
+ return None
+ if not _num(v) or not -100_000 <= v <= 100_000:
+ raise HTTPException(422, f"{key} must be a number of points from -100000 to 100000")
+ return float(v)
+
+
+def _display(result) -> str:
+ return result.name.strip()[:200]
+
+
+def resolve(name: str, engine_id: str | None = None, bond_length: float = DEFAULT_BOND_LENGTH,
+ origin: tuple[float, float] = (0.0, 0.0)) -> dict:
+ engine = names.engine(engine_id)
+ result = engine.to_structure(name)
+ out = result.as_dict()
+ out["fragment"] = None
+ out["formula"] = None
+ if result.smiles:
+ parsed = io.read_text(result.smiles, "smiles", bond_length, origin)
+ frags = [f for f in parsed.fragments if f.get("atoms")]
+ if len(frags) == 1:
+ frags[0]["name"] = _display(result)
+ out["fragment"] = frags[0] if len(frags) == 1 else None
+ out["fragments"] = frags
+ out["formula"] = ids.formula(Chem.MolFromSmiles(result.smiles))
+ out["warnings"].extend(w for w in parsed.warnings if isinstance(w, dict) and w.get("code") != "coordinates_generated")
+ out["layout"] = ENGINE
+ return out
+
+
+def name_mol(mol: Chem.Mol, engine_id: str | None = None) -> dict:
+ return names.engine(engine_id).to_name(mol).as_dict()
+
+
+def _mol_from(body: dict) -> tuple[Chem.Mol, list[dict]]:
+ smiles = body.get("smiles")
+ frag = body.get("fragment")
+ if isinstance(smiles, str) and smiles.strip():
+ if len(smiles) > MAX_SMILES:
+ raise HTTPException(413, "smiles is too long")
+ mol = Chem.MolFromSmiles(smiles.strip())
+ if mol is None:
+ raise HTTPException(422, "smiles is not a valid SMILES")
+ return mol, []
+ if isinstance(frag, dict):
+ from app.routers.chem import _fragment
+ checked = _fragment({"fragment": frag})
+ if len(checked["atoms"]) > MAX_ATOMS:
+ raise HTTPException(422, f"fragments over {MAX_ATOMS} atoms are not named")
+ expansions = body.get("expansions") if isinstance(body.get("expansions"), dict) else None
+ conv = perceive.prepare(checked, expansions)
+ if any(a.GetAtomicNum() == 0 for a in conv.mol.GetAtoms()):
+ return None, [{"code": "labels", "text": "The structure holds labels, R-groups or any-atoms, which have no name."}]
+ text = ids.smiles(ids.identifier_mol(conv.mol))
+ mol = Chem.MolFromSmiles(text) if text else None
+ if mol is None:
+ return None, [{"code": "invalid", "text": "The structure could not be read as a molecule (check valences)."}]
+ return mol, [w for w in conv.warnings if isinstance(w, dict) and w.get("code") in ("unknown_label", "bad_expansion")]
+ raise HTTPException(422, "give smiles or fragment")
+
+
+@router.get("/api/names/engines")
+def engines() -> dict:
+ out = names.listing()
+ for row in out:
+ stats = getattr(names.engine(row["id"]), "stats", None)
+ if stats is not None:
+ row["stats"] = stats.as_dict()
+ return {"engines": out}
+
+
+@router.post("/api/names/to-structure")
+async def to_structure(body: dict = Body(...)) -> dict:
+ text = _name(body)
+ engine = _engine(body)
+ return await asyncio.to_thread(resolve, text, engine.id, _bond_length(body), (_coord(body, "x") or 0.0, _coord(body, "y") or 0.0))
+
+
+@router.post("/api/names/to-name")
+async def to_name(body: dict = Body(...)) -> dict:
+ engine = _engine(body)
+ mol, notes = await asyncio.to_thread(_mol_from, body)
+ if mol is None:
+ return {"names": [], "engine": engine.id, "version": engine.version, "inchikey": None, "warnings": notes,
+ "reason": notes[0]["text"] if notes else "There is no structure to name."}
+ out = await asyncio.to_thread(name_mol, mol, engine.id)
+ out["warnings"] = notes + out["warnings"]
+ return out
+
+
+@router.post("/api/documents/{doc_id}/names/insert", dependencies=GUARD)
+async def insert_name(doc_id: str, body: dict = Body(...)) -> dict:
+ from app.services import agent_draw
+ text = _name(body)
+ engine = _engine(body)
+ x, y = _coord(body, "x"), _coord(body, "y")
+ try:
+ s = STORE.get(doc_id)
+ except KeyError:
+ raise HTTPException(404, f"No open drawing has the id {doc_id}.")
+ with s.lock:
+ doc = copy.deepcopy(s.doc)
+ rev = s.rev
+ result = await asyncio.to_thread(engine.to_structure, text)
+ if not result.ok:
+ raise HTTPException(422, {"message": result.error["text"] if result.error else "The name could not be read.", "error": result.error})
+ page = body.get("page") if isinstance(body.get("page"), str) else None
+ try:
+ ops, objects, notes = await asyncio.to_thread(agent_draw.structure_ops, doc, result.smiles, "smiles", page, x, y, _display(result))
+ except agent_draw.DrawError as exc:
+ raise HTTPException(422, str(exc))
+ origin = body.get("origin") if body.get("origin") in ("user", "system") else "user"
+ client = body.get("client") if isinstance(body.get("client"), str) and body.get("client") else None
+ try:
+ applied = await STORE.apply(doc_id, {"label": f"Insert {_display(result)}", "ops": ops}, origin, client=client)
+ except opsmod.OpError as exc:
+ raise HTTPException(409, {"message": str(exc), "errors": exc.errors})
+ except KeyError:
+ raise HTTPException(404, f"The drawing {doc_id} was closed.")
+ out = result.as_dict()
+ out.update({"changed": True, "tx": applied["tx"], "rev": applied.get("rev", rev), "objects": objects})
+ out["warnings"] = list(out["warnings"]) + [n for n in notes if isinstance(n, dict)]
+ return out
diff --git a/backend/app/routers/nmr.py b/backend/app/routers/nmr.py
new file mode 100644
index 00000000..fb89008a
--- /dev/null
+++ b/backend/app/routers/nmr.py
@@ -0,0 +1,167 @@
+import asyncio
+import copy
+
+from fastapi import APIRouter, Body, Depends, HTTPException, Request
+
+from app.core import window_key
+from app.routers.analysis import source as fragment_source
+from app.routers.chem import _num
+from app.services import ops as opsmod
+from app.services.chem import DEFAULT_BOND_LENGTH, io
+from app.services.nmr import DESCRIPTION, METHOD, REGISTRY, VERSION, document, predict, simulate
+from app.services.nmr import source as predicted_source
+from app.services.store import STORE
+
+router = APIRouter()
+NUCLEUS_CHOICES = ("1H", "13C", "both")
+predicted_source.register()
+
+
+def _guard(request: Request) -> None:
+ window_key.require(request)
+
+
+GUARD = [Depends(_guard)]
+
+
+def _client(body: dict) -> str | None:
+ found = body.get("client")
+ return found if isinstance(found, str) and found else None
+
+
+def _origin(body: dict) -> str:
+ return body.get("origin") if body.get("origin") in ("user", "system") else "user"
+
+
+def _number(body: dict, key: str, lo: float, hi: float) -> float | None:
+ value = body.get(key)
+ if value is None:
+ return None
+ if not _num(value) or not lo <= value <= hi:
+ raise HTTPException(422, f"{key} must be a number from {lo:g} to {hi:g}")
+ return float(value)
+
+
+def _nucleus(body: dict, allow_both: bool = True) -> str:
+ value = body.get("nucleus", "1H")
+ choices = NUCLEUS_CHOICES if allow_both else NUCLEUS_CHOICES[:2]
+ if value not in choices:
+ raise HTTPException(422, f"nucleus must be {', '.join(choices)}")
+ return value
+
+
+def _structure(body: dict) -> tuple[dict, dict | None]:
+ smiles = body.get("smiles")
+ if isinstance(smiles, str) and smiles.strip():
+ try:
+ parsed = io.read_text(smiles.strip(), "smiles", DEFAULT_BOND_LENGTH, (0.0, 0.0))
+ except ValueError as exc:
+ raise HTTPException(422, f"smiles: {exc}") from None
+ frags = [f for f in parsed.fragments if f.get("atoms")]
+ if not frags:
+ raise HTTPException(422, "smiles holds no structure")
+ return frags[0], None
+ src = fragment_source(body, single=True)
+ return src.one, src.expansions
+
+
+def _with_spectrum(result: dict, body: dict) -> dict:
+ if body.get("spectrum") is not True:
+ return result
+ lw = _number(body, "linewidth", 0.05, 100.0)
+ n = body.get("n")
+ if n is not None and (not isinstance(n, int) or isinstance(n, bool) or not 16 <= n <= simulate.MAX_POINTS):
+ raise HTTPException(422, f"n must be a whole number from 16 to {simulate.MAX_POINTS}")
+ sp = simulate.spectrum(result, lw, _number(body, "from", -1000, 1000), _number(body, "to", -1000, 1000), n)
+ fid = result.get("fragment") or "f"
+ return {**result, "spectrum": {k: sp[k] for k in ("x", "y", "range", "full", "linewidth_hz")}, "multiplets": simulate.multiplets(result, fid, lw)}
+
+
+def _run(frag: dict, expansions: dict | None, body: dict) -> dict:
+ nucleus = _nucleus(body)
+ frequency = _number(body, "frequency", 10, 1500)
+ only = body.get("predictor") if isinstance(body.get("predictor"), str) else None
+ try:
+ if nucleus == "both":
+ both = predict.predict_both(frag, frequency, expansions)
+ return {"method": METHOD, "version": VERSION, "1H": _with_spectrum(both["1H"], body), "13C": _with_spectrum(both["13C"], body)}
+ return _with_spectrum(predict.predict(frag, nucleus, frequency, expansions, only), body)
+ except predict.PredictError as exc:
+ raise HTTPException(422, str(exc)) from None
+
+
+@router.get("/api/nmr/predictors")
+def predictors() -> dict:
+ return {"method": METHOD, "version": VERSION, "description": DESCRIPTION, "predictors": REGISTRY.listing(),
+ "frequency": predict.DEFAULT_FREQUENCY, "nuclei": ["1H", "13C"]}
+
+
+@router.post("/api/nmr/predict")
+async def predict_route(body: dict = Body(default={})) -> dict:
+ frag, expansions = _structure(body)
+ return await asyncio.to_thread(_run, frag, expansions, body)
+
+
+def _snapshot(doc_id: str) -> tuple[object, dict]:
+ try:
+ s = STORE.get(doc_id)
+ except KeyError:
+ raise HTTPException(404, f"No open drawing has the id {doc_id}.") from None
+ with s.lock:
+ return s, copy.deepcopy(s.doc)
+
+
+async def _commit(doc_id: str, label: str, ops: list[dict], body: dict, rev: int) -> dict:
+ if not ops:
+ return {"changed": False, "tx": None, "rev": rev}
+ try:
+ result = await STORE.apply(doc_id, {"label": label, "ops": ops}, _origin(body), client=_client(body))
+ except opsmod.OpError as exc:
+ raise HTTPException(409, {"message": str(exc), "errors": exc.errors}) from None
+ except KeyError:
+ raise HTTPException(404, f"The drawing {doc_id} was closed.") from None
+ return {"changed": True, "tx": result["tx"], "rev": result["rev"]}
+
+
+def _failed(exc: document.DocumentError) -> HTTPException:
+ return HTTPException(exc.status, str(exc))
+
+
+def _summary(result: dict) -> dict:
+ keep = ("nucleus", "frequency", "method", "version", "signals", "atoms", "journal", "warnings")
+ return {k: result[k] for k in keep}
+
+
+@router.post("/api/documents/{doc_id}/nmr/predict-spectrum", dependencies=GUARD)
+async def predict_spectrum(doc_id: str, body: dict = Body(default={})) -> dict:
+ s, doc = _snapshot(doc_id)
+ fid = body.get("object")
+ if not isinstance(fid, str) or not fid:
+ raise HTTPException(422, "object must be the id of a structure in the drawing")
+ nucleus = _nucleus(body, allow_both=False)
+ frequency = _number(body, "frequency", 10, 1500)
+ place = {k: _number(body, k, -1e6, 1e6) for k in ("x", "y")}
+ size = {k: _number(body, k, 20, 5000) for k in ("w", "h")}
+ name = body.get("name") if isinstance(body.get("name"), str) and body.get("name") else None
+ try:
+ ops, obj, result = await asyncio.to_thread(document.spectrum_ops, doc, fid, nucleus, frequency, place["x"], place["y"],
+ size["w"], size["h"], name)
+ except document.DocumentError as exc:
+ raise _failed(exc) from None
+ out = await _commit(doc_id, f"Predict {nucleus} NMR Spectrum", ops, body, s.rev)
+ return {**out, "id": obj["id"], "object": obj, "prediction": _summary(result),
+ "data": f"/api/documents/{doc_id}/spectra/{obj['id']}/data"}
+
+
+@router.post("/api/documents/{doc_id}/nmr/refresh", dependencies=GUARD)
+async def refresh_spectrum(doc_id: str, body: dict = Body(default={})) -> dict:
+ s, doc = _snapshot(doc_id)
+ oid = body.get("object")
+ if not isinstance(oid, str) or not oid:
+ raise HTTPException(422, "object must be the id of a predicted spectrum")
+ try:
+ ops, fresh, result = await asyncio.to_thread(document.refresh_ops, doc, oid)
+ except document.DocumentError as exc:
+ raise _failed(exc) from None
+ out = await _commit(doc_id, "Refresh Predicted Spectrum", ops, body, s.rev)
+ return {**out, "id": oid, **fresh, "prediction": _summary(result)}
diff --git a/backend/app/routers/spectra.py b/backend/app/routers/spectra.py
new file mode 100644
index 00000000..2c69a976
--- /dev/null
+++ b/backend/app/routers/spectra.py
@@ -0,0 +1,346 @@
+import asyncio
+import base64
+import binascii
+import copy
+import dataclasses
+import json
+import math
+from urllib.parse import quote
+
+import numpy as np
+from fastapi import APIRouter, Body, Depends, HTTPException, Query, Request, Response
+
+from app.core import files, window_key
+from app.services import model
+from app.services import ops as opsmod
+from app.services.spectra import MIME, READER, display, export, jcamp, measure, source
+from app.services.spectra import technique as tech
+from app.services.store import STORE
+
+router = APIRouter()
+MAX_TEXT = 20 * 1024 * 1024
+PREVIEW_N = 400
+
+
+def _guard(request: Request) -> None:
+ window_key.require(request)
+
+
+GUARD = [Depends(_guard)]
+
+
+@dataclasses.dataclass
+class Loaded:
+ session: object
+ rev: int
+ obj: dict
+ spectrum: jcamp.Spectrum
+ file: jcamp.JcampFile | None
+
+
+def _num(value: object, what: str) -> float | None:
+ if value is None or value == "":
+ return None
+ if isinstance(value, bool):
+ raise HTTPException(422, f"{what} must be a number.")
+ try:
+ found = float(value)
+ except (TypeError, ValueError):
+ raise HTTPException(422, f"{what} must be a number.")
+ if not math.isfinite(found):
+ raise HTTPException(422, f"{what} must be a finite number.")
+ return found
+
+
+def _resolve(doc_id: str, obj_id: str) -> Loaded:
+ try:
+ s = STORE.get(doc_id)
+ except KeyError:
+ raise HTTPException(404, f"No open drawing has the id {doc_id}.")
+ with s.lock:
+ raw = s.doc.get("objects", {}).get(obj_id)
+ obj = copy.deepcopy(raw) if isinstance(raw, dict) else None
+ rev = s.rev
+ src = obj.get("source") if obj else None
+ doc = copy.deepcopy(s.doc) if isinstance(src, dict) and "predicted" in src else {}
+ media = dict(s.media)
+ if obj is None or obj.get("kind") != "spectrum":
+ raise HTTPException(404, f"The drawing has no spectrum {obj_id}.")
+ try:
+ found, f = source.resolve(doc, obj, media.get)
+ except source.SourceError as exc:
+ raise HTTPException(exc.status, str(exc))
+ return Loaded(s, rev, obj, found, f)
+
+
+async def _load(doc_id: str, obj_id: str) -> Loaded:
+ return await asyncio.to_thread(_resolve, doc_id, obj_id)
+
+
+def _y_mode(obj: dict, wanted: str | None) -> str | None:
+ if wanted not in (None, "", tech.TRANSMITTANCE, tech.ABSORBANCE):
+ raise HTTPException(422, "y_mode must be transmittance or absorbance.")
+ view = obj.get("view") if isinstance(obj.get("view"), dict) else {}
+ return wanted or view.get("y_mode")
+
+
+def _with_baseline(sp: jcamp.Spectrum, how: str | None) -> jcamp.Spectrum:
+ if how in (None, "", "none"):
+ return sp
+ if how != "auto":
+ raise HTTPException(422, "baseline must be none or auto.")
+ if sp.kind != tech.CONTINUOUS:
+ return sp
+ return dataclasses.replace(sp, y=measure.corrected(sp, measure.baseline(sp)))
+
+
+def _method(sp: jcamp.Spectrum, file: jcamp.JcampFile | None) -> str:
+ named = sp.metadata.get("METHOD") if file is None else None
+ return named if isinstance(named, str) and named else READER
+
+
+def _data(doc_id: str, obj_id: str, lo: float | None, hi: float | None, n: int | None, y_mode: str | None, imag: bool, baseline: str | None) -> dict:
+ got = _resolve(doc_id, obj_id)
+ sp = _with_baseline(got.spectrum, baseline)
+ mode = _y_mode(got.obj, y_mode)
+ view = display.merged_view(sp, got.obj.get("view"), mode)
+ if lo is None and hi is None:
+ lo, hi = view["x_from"], view["x_to"]
+ out = display.points(sp, lo, hi, display.clamp_n(n), mode, imag)
+ if out["y_mode"] and isinstance(got.obj.get("view"), dict) and mode != got.obj["view"].get("y_mode"):
+ auto = display.auto_view(sp, mode)
+ view["y_from"], view["y_to"] = auto["y_from"], auto["y_to"]
+ return {"doc": doc_id, "object": obj_id, "rev": got.rev, "block": sp.index, "blocks": len(got.file.spectra) if got.file else 1,
+ "technique": sp.technique, "nucleus": sp.nucleus, "kind": sp.kind, "title": sp.title, "frequency": sp.frequency,
+ **out, "view": view, "metadata": sp.metadata, "comments": sp.comments,
+ "report": (got.file.issues.as_list() if got.file else []) + sp.report(),
+ "baseline": "auto" if sp is not got.spectrum else "none", "method": _method(sp, got.file), "predicted": got.file is None}
+
+
+@router.get("/api/documents/{doc_id}/spectra/{obj_id}/data")
+async def spectrum_data(doc_id: str, obj_id: str, lo: str | None = Query(None, alias="from"), hi: str | None = Query(None, alias="to"),
+ n: int | None = None, y_mode: str | None = None, imag: bool = False, baseline: str | None = None) -> dict:
+ return await asyncio.to_thread(_data, doc_id, obj_id, _num(lo, "from"), _num(hi, "to"), n, y_mode, imag, baseline)
+
+
+def _decode(body: dict) -> bytes:
+ text = body.get("text")
+ packed = body.get("base64")
+ if isinstance(packed, str) and packed:
+ if len(packed) > MAX_TEXT * 4 // 3 + 4:
+ raise HTTPException(413, "The data is too large.")
+ try:
+ return base64.b64decode(packed, validate=True)
+ except (ValueError, binascii.Error):
+ raise HTTPException(422, "base64 is not valid base64.")
+ if not isinstance(text, str) or not text.strip():
+ raise HTTPException(422, "Send the JCAMP-DX file as text or as base64.")
+ if len(text) > MAX_TEXT:
+ raise HTTPException(413, "The text is too large.")
+ return text.encode("utf-8")
+
+
+def _parse(data: bytes, name: str | None, n: int) -> dict:
+ try:
+ f = source.parsed(data)
+ except jcamp.JcampError as exc:
+ raise HTTPException(422, str(exc))
+ out = jcamp.describe(f, name)
+ for block, sp in zip(out["blocks"], f.spectra):
+ pts = display.points(sp, None, None, n)
+ block["preview"] = {"x": pts["x"], "y": pts["y"]}
+ return out
+
+
+def _client(body: dict) -> str | None:
+ found = body.get("client")
+ return found if isinstance(found, str) and found else None
+
+
+def _origin(body: dict) -> str:
+ return body.get("origin") if body.get("origin") in ("user", "system") else "user"
+
+
+def _used_ids(doc: dict) -> set[str]:
+ used = {doc.get("id")} | {p.get("id") for p in doc.get("pages") or [] if isinstance(p, dict)}
+ for oid, obj in (doc.get("objects") or {}).items():
+ used.add(oid)
+ if isinstance(obj, dict) and obj.get("kind") == "spectrum":
+ for key in ("peaks", "integrals", "multiplets"):
+ used.update(i.get("id") for i in obj.get(key) or [] if isinstance(i, dict))
+ return {u for u in used if isinstance(u, str)}
+
+
+def _fresh(used: set[str], prefix: str) -> str:
+ found = model.new_id(prefix)
+ while found in used:
+ found = model.new_id(prefix)
+ used.add(found)
+ return found
+
+
+async def _commit(doc_id: str, label: str, ops: list[dict], body: dict, rev: int) -> dict:
+ if not ops or body.get("dry_run") is True:
+ return {"changed": False, "tx": None, "rev": rev}
+ try:
+ result = await STORE.apply(doc_id, {"label": label, "ops": ops}, _origin(body), client=_client(body))
+ except opsmod.OpError as exc:
+ raise HTTPException(409, {"message": str(exc), "errors": exc.errors})
+ except KeyError:
+ raise HTTPException(404, f"The drawing {doc_id} was closed.")
+ return {"changed": True, "tx": result["tx"], "rev": result["rev"]}
+
+
+def _list_ops(obj_id: str, key: str, current: object, items: list[dict], replace: bool) -> list[dict]:
+ if replace or not isinstance(current, list):
+ return [{"op": "set", "path": ["objects", obj_id, key], "value": (items if replace or not isinstance(current, list) else current + items)}]
+ return [{"op": "ins", "path": ["objects", obj_id, key], "value": item} for item in items]
+
+
+def _spacing(sp: jcamp.Spectrum) -> float:
+ if sp.kind == tech.STICKS or sp.x.size < 2:
+ return 0.25
+ return 0.5 * float(np.median(np.abs(np.diff(sp.x))))
+
+
+async def peak_ops(got: Loaded, obj_id: str, body: dict) -> tuple[list[dict], list[dict], int, str | None]:
+ sp = got.spectrum
+ limit = body.get("max", 50)
+ if isinstance(limit, bool) or not isinstance(limit, int) or not 1 <= limit <= measure.MAX_PEAKS:
+ raise HTTPException(422, f"max must be a whole number from 1 to {measure.MAX_PEAKS}.")
+ mode = _y_mode(got.obj, body.get("y_mode"))
+ found = await asyncio.to_thread(measure.peaks, sp, _num(body.get("from"), "from"), _num(body.get("to"), "to"), mode, limit,
+ _num(body.get("prominence"), "prominence"), _num(body.get("threshold"), "threshold"))
+ replace = body.get("replace") is True
+ current = got.obj.get("peaks")
+ existing = [p for p in current or [] if isinstance(p, dict)] if not replace else []
+ tol = _spacing(sp)
+ with got.session.lock:
+ used = _used_ids(got.session.doc)
+ added, skipped = [], 0
+ for p in found:
+ if any(isinstance(e.get("x"), (int, float)) and abs(float(e["x"]) - p["x"]) <= tol for e in existing + added):
+ skipped += 1
+ continue
+ added.append({"id": _fresh(used, "k"), **p})
+ ops = _list_ops(obj_id, "peaks", current, added, replace) if added or replace else []
+ return ops, added, skipped, display.mode(sp, mode) if sp.y_modes() else None
+
+
+@router.post("/api/documents/{doc_id}/spectra/{obj_id}/peaks", dependencies=GUARD)
+async def pick_peaks(doc_id: str, obj_id: str, body: dict = Body(default={})) -> dict:
+ got = await _load(doc_id, obj_id)
+ ops, added, skipped, mode = await peak_ops(got, obj_id, body)
+ out = await _commit(doc_id, "Pick Peaks", ops, body, got.rev)
+ return {**out, "peaks": added, "skipped": skipped, "y_mode": mode, "method": READER}
+
+
+def _range(pair: object, what: str) -> tuple[float, float]:
+ if not isinstance(pair, (list, tuple)) or len(pair) != 2:
+ raise HTTPException(422, f"{what} must be a pair of x values.")
+ a, b = _num(pair[0], what), _num(pair[1], what)
+ if a is None or b is None or a == b:
+ raise HTTPException(422, f"{what} must be two different x values.")
+ return a, b
+
+
+async def integral_ops(got: Loaded, obj_id: str, body: dict) -> tuple[list[dict], list[dict], float]:
+ sp = got.spectrum
+ if sp.kind == tech.STICKS:
+ raise HTTPException(422, "Stick spectra have no areas to integrate.")
+ value = _num(body.get("value"), "value")
+ if value is not None and value <= 0:
+ raise HTTPException(422, "value must be greater than zero.")
+ current = got.obj.get("integrals")
+ existing = [dict(i) for i in current or [] if isinstance(i, dict) and isinstance(i.get("id"), str)]
+ ref = body.get("id") if isinstance(body.get("id"), str) else None
+ pairs: list[tuple[float, float]] = []
+ if ref is not None:
+ if not any(i["id"] == ref for i in existing):
+ raise HTTPException(404, f"The spectrum has no integral {ref}.")
+ if value is None:
+ raise HTTPException(422, "Give the value the integral should read.")
+ elif isinstance(body.get("ranges"), list):
+ pairs = [_range(p, "ranges") for p in body["ranges"]]
+ else:
+ pairs = [_range([body.get("from"), body.get("to")], "from and to")]
+ if len(pairs) > 200:
+ raise HTTPException(422, "Send at most 200 ranges at once.")
+ decreasing = sp.direction == tech.DECREASING
+ with got.session.lock:
+ used = _used_ids(got.session.doc)
+ new = [{"id": _fresh(used, "k"), "from": max(a, b) if decreasing else min(a, b), "to": min(a, b) if decreasing else max(a, b)} for a, b in pairs]
+ if new and value is not None:
+ ref = new[0]["id"]
+ rows, scale = await asyncio.to_thread(measure.integrals, sp, existing + new, ref, value, body.get("baseline") is not False)
+ ops: list[dict] = []
+ before = {i["id"]: i.get("value") for i in existing}
+ for row in rows[:len(existing)]:
+ if row["value"] is not None and before.get(row["id"]) != row["value"]:
+ ops.append({"op": "set", "path": ["objects", obj_id, "integrals", {"id": row["id"]}, "value"], "value": row["value"]})
+ fresh = [{k: v for k, v in row.items() if k != "area" and v is not None} for row in rows[len(existing):]]
+ if fresh:
+ ops += _list_ops(obj_id, "integrals", current, fresh, False)
+ return ops, rows, scale
+
+
+@router.post("/api/documents/{doc_id}/spectra/{obj_id}/integrals", dependencies=GUARD)
+async def integrate(doc_id: str, obj_id: str, body: dict = Body(default={})) -> dict:
+ got = await _load(doc_id, obj_id)
+ ops, rows, scale = await integral_ops(got, obj_id, body)
+ out = await _commit(doc_id, "Integrate", ops, body, got.rev)
+ return {**out, "integrals": rows, "scale": scale, "method": READER}
+
+
+def _download(body: bytes, filename: str, mime: str, fmt: str, notes: list[str]) -> Response:
+ plain = filename.encode("ascii", "replace").decode("ascii").replace('"', "")
+ headers = {
+ "content-disposition": f"attachment; filename=\"{plain}\"; filename*=UTF-8''{quote(filename)}",
+ "x-formchem-filename": quote(filename),
+ "x-formchem-format": fmt,
+ "x-formchem-report": quote(json.dumps([{"code": "note", "severity": "info", "count": 1, "text": t} for t in notes], separators=(",", ":"))),
+ "access-control-expose-headers": "x-formchem-filename, x-formchem-format, x-formchem-report, content-disposition",
+ "x-content-type-options": "nosniff",
+ }
+ return Response(body, media_type=mime, headers=headers)
+
+
+def _export(doc_id: str, obj_id: str, fmt: str, original: bool, lo: float | None, hi: float | None, y_mode: str | None) -> Response:
+ got = _resolve(doc_id, obj_id)
+ sp = got.spectrum
+ base = files.safe_name(sp.title, "Spectrum")
+ mode = _y_mode(got.obj, y_mode)
+ if fmt == "csv":
+ return _download(export.csv(sp, mode, lo, hi).encode("utf-8"), f"{base}.csv", "text/csv; charset=utf-8", "csv", [])
+ if original:
+ src = got.obj.get("source") or {}
+ with got.session.lock:
+ data = got.session.media.get(src.get("media")) if isinstance(src.get("media"), str) else None
+ entry = (got.session.doc.get("media") or {}).get(src.get("media")) or {}
+ if data is None:
+ raise HTTPException(409, "This spectrum has no original file; export it without original=1.")
+ name = entry.get("name") if isinstance(entry.get("name"), str) and entry.get("name") else f"{base}.jdx"
+ return _download(data, files.safe_name(name, f"{base}.jdx"), MIME, "jdx", [])
+ peaks = [p for p in got.obj.get("peaks") or [] if isinstance(p, dict)]
+ try:
+ text, notes = export.jdx(sp, peaks, mode, lo, hi)
+ except ValueError as exc:
+ raise HTTPException(422, str(exc))
+ return _download(text.encode("ascii", "replace"), f"{base}.jdx", MIME, "jdx", notes)
+
+
+@router.get("/api/documents/{doc_id}/spectra/{obj_id}/export")
+async def export_spectrum(doc_id: str, obj_id: str, format: str = "jdx", original: bool = False, lo: str | None = Query(None, alias="from"),
+ hi: str | None = Query(None, alias="to"), y_mode: str | None = None) -> Response:
+ if format not in ("jdx", "csv"):
+ raise HTTPException(422, "format must be jdx or csv.")
+ return await asyncio.to_thread(_export, doc_id, obj_id, format, original, _num(lo, "from"), _num(hi, "to"), y_mode)
+
+
+@router.post("/api/spectra/parse")
+async def parse_spectrum(body: dict = Body(...)) -> dict:
+ data = _decode(body)
+ name = body.get("name") if isinstance(body.get("name"), str) else None
+ n = body.get("n")
+ n = max(16, min(4000, int(n))) if isinstance(n, int) and not isinstance(n, bool) else PREVIEW_N
+ return await asyncio.to_thread(_parse, data, name, n)
diff --git a/backend/app/routers/three_d.py b/backend/app/routers/three_d.py
new file mode 100644
index 00000000..7cf53857
--- /dev/null
+++ b/backend/app/routers/three_d.py
@@ -0,0 +1,422 @@
+import asyncio
+import base64
+import binascii
+import copy
+import math
+from pathlib import Path
+from urllib.parse import quote
+
+from fastapi import APIRouter, Body, Depends, HTTPException, Query, Request, Response
+from fastapi.responses import JSONResponse
+from starlette.datastructures import UploadFile as StarletteUpload
+
+from app.core import window_key
+from app.services import model as docmodel
+from app.services import ops as opsmod
+from app.services.store import STORE, StoreError
+from app.services.three_d import (ENGINE, GRADIENT, MAX_ITERS, SEED, ThreeDError, build, conformers, export, ligand, measure, method_of,
+ minimise, molecule, readers, scan, stale, structure)
+
+router = APIRouter()
+UPLOAD_LIMIT = 50 * 1024 * 1024
+
+
+def _guard(request: Request) -> None:
+ window_key.require(request)
+
+
+GUARD = [Depends(_guard)]
+
+
+def _failed(exc: ThreeDError) -> HTTPException:
+ return HTTPException(exc.status, str(exc))
+
+
+def _snapshot(doc_id: str) -> tuple[object, dict]:
+ try:
+ s = STORE.get(doc_id)
+ except KeyError:
+ raise HTTPException(404, f"No open drawing has the id {doc_id}.")
+ with s.lock:
+ return s, copy.deepcopy(s.doc)
+
+
+def _client(body: dict) -> str | None:
+ found = body.get("client")
+ return found if isinstance(found, str) and found else None
+
+
+def _origin(body: dict) -> str:
+ return body.get("origin") if body.get("origin") in ("user", "system") else "user"
+
+
+class AgentCall:
+ def __init__(self, name: str):
+ self.name = name or "agent"
+
+
+def _agent(body: dict) -> str | None:
+ found = body.get("_agent")
+ return found.name if isinstance(found, AgentCall) else None
+
+
+def _number(body: dict, key: str, default: float, low: float, high: float, integer: bool = False) -> float | int:
+ value = body.get(key)
+ if value is None:
+ value = default
+ if isinstance(value, str):
+ try:
+ value = float(value)
+ except ValueError:
+ value = None
+ if isinstance(value, bool) or not isinstance(value, (int, float)) or not math.isfinite(value) or not low <= value <= high:
+ raise HTTPException(422, f"{key} must be a number from {low} to {high}")
+ if integer:
+ if int(value) != value:
+ raise HTTPException(422, f"{key} must be a whole number")
+ return int(value)
+ return float(value)
+
+
+def _method(body: dict) -> str:
+ try:
+ return method_of(body.get("method"))
+ except ThreeDError as exc:
+ raise _failed(exc)
+
+
+def _fragment(doc: dict, oid: object) -> dict:
+ try:
+ return molecule.find_fragment(doc, oid)
+ except ThreeDError as exc:
+ raise _failed(exc)
+
+
+async def _run(fn, *args):
+ try:
+ return await asyncio.to_thread(fn, *args)
+ except ThreeDError as exc:
+ raise _failed(exc)
+
+
+def _unchanged(doc_id: str, fid: str, before: tuple) -> None:
+ try:
+ s = STORE.get(doc_id)
+ except KeyError:
+ raise HTTPException(404, f"The drawing {doc_id} was closed.")
+ with s.lock:
+ frag = (s.doc.get("objects") or {}).get(fid)
+ same = isinstance(frag, dict) and stale.signature(frag) == before
+ if not same:
+ raise HTTPException(409, "The structure changed while 3D was being computed; run the command again.")
+
+
+async def commit(doc_id: str, label: str, ops: list[dict], body: dict, rev: int, guard: tuple[str, tuple] | None = None) -> dict:
+ if not ops:
+ return {"changed": False, "tx": None, "rev": rev}
+ if guard is not None:
+ _unchanged(doc_id, *guard)
+ agent = _agent(body)
+ try:
+ result = await STORE.apply(doc_id, {"label": label, "ops": ops}, "agent" if agent else _origin(body), agent=agent, client=_client(body))
+ except opsmod.OpError as exc:
+ raise HTTPException(409, {"message": str(exc), "errors": exc.errors})
+ except KeyError:
+ raise HTTPException(404, f"The drawing {doc_id} was closed.")
+ return {"changed": True, "tx": result["tx"], "rev": result["rev"]}
+
+
+def _replace_ops(fid: str, records: list[dict], active: str | None) -> list[dict]:
+ ops = [{"op": "set", "path": ["objects", fid, "conformers"], "value": records}]
+ if active:
+ ops.append({"op": "set", "path": ["objects", fid, "conformer"], "value": active})
+ return ops
+
+
+def _brief(rec: dict) -> dict:
+ return {k: rec.get(k) for k in ("id", "energy", "method", "converged")}
+
+
+@router.post("/api/documents/{doc_id}/3d/build", dependencies=GUARD)
+async def build_3d(doc_id: str, body: dict = Body(...)) -> dict:
+ s, doc = _snapshot(doc_id)
+ frag = _fragment(doc, body.get("object"))
+ method = _method(body)
+ seed = _number(body, "seed", SEED, 0, 2 ** 31 - 1, True)
+ max_iters = _number(body, "max_iters", MAX_ITERS, 1, 100000, True)
+ gradient = _number(body, "gradient", GRADIENT, 1e-6, 10)
+ out = await _run(build.build, frag, molecule.expansions_of(doc), body.get("minimise", True) is not False, method, seed, max_iters, gradient)
+ rec = out["conformer"]
+ done = await commit(doc_id, "Build 3D", _replace_ops(frag["id"], [rec], rec["id"]), body, s.rev, (frag["id"], stale.signature(frag)))
+ return {**done, "conformer": _brief(rec), "report": out["report"]}
+
+
+@router.post("/api/documents/{doc_id}/3d/conformers", dependencies=GUARD)
+async def conformers_3d(doc_id: str, body: dict = Body(...)) -> dict:
+ s, doc = _snapshot(doc_id)
+ frag = _fragment(doc, body.get("object"))
+ method = _method(body)
+ args = (frag, molecule.expansions_of(doc), _number(body, "n", 50, 1, conformers.MAX_N, True), _number(body, "window", 10.0, 0, 1000),
+ _number(body, "keep", 10, 1, conformers.MAX_KEEP, True), _number(body, "rmsd", 0.5, 0, 5), method,
+ _number(body, "seed", SEED, 0, 2 ** 31 - 1, True), _number(body, "max_iters", MAX_ITERS, 1, 100000, True))
+ out = await _run(conformers.search, *args)
+ records = out["conformers"]
+ active = records[0]["id"] if records else None
+ done = await commit(doc_id, "Conformers", _replace_ops(frag["id"], records, active), body, s.rev, (frag["id"], stale.signature(frag)))
+ return {**done, "conformers": out["table"], "active": active, "report": out["report"]}
+
+
+@router.post("/api/documents/{doc_id}/3d/active", dependencies=GUARD)
+async def active_3d(doc_id: str, body: dict = Body(...)) -> dict:
+ s, doc = _snapshot(doc_id)
+ frag = _fragment(doc, body.get("object"))
+ cid = body.get("conformer")
+ if not isinstance(cid, str) or not any(isinstance(c, dict) and c.get("id") == cid for c in frag.get("conformers") or []):
+ raise HTTPException(404, f"{frag['id']} has no conformer {cid}.")
+ if frag.get("conformer") == cid:
+ return {"changed": False, "tx": None, "rev": s.rev}
+ return await commit(doc_id, "Show conformer", [{"op": "set", "path": ["objects", frag["id"], "conformer"], "value": cid}], body, s.rev)
+
+
+@router.post("/api/documents/{doc_id}/3d/minimise", dependencies=GUARD)
+async def minimise_3d(doc_id: str, body: dict = Body(...)) -> dict:
+ s, doc = _snapshot(doc_id)
+ frag = _fragment(doc, body.get("object"))
+ cid = body.get("conformer") if isinstance(body.get("conformer"), str) else None
+ out = await _run(minimise.minimise_conformer, frag, molecule.expansions_of(doc), cid, _method(body),
+ _number(body, "max_iters", MAX_ITERS, 1, 100000, True), _number(body, "gradient", GRADIENT, 1e-6, 10))
+ rec = out["conformer"]
+ if out["replace"]:
+ ops = [{"op": "set", "path": ["objects", frag["id"], "conformers", {"id": rec["id"]}], "value": rec}]
+ else:
+ ops = _replace_ops(frag["id"], [rec], rec["id"])
+ done = await commit(doc_id, "Minimise", ops, body, s.rev, (frag["id"], stale.signature(frag)))
+ return {**done, "conformer": _brief(rec), "report": out["report"]}
+
+
+@router.post("/api/documents/{doc_id}/3d/scan", dependencies=GUARD)
+async def scan_3d(doc_id: str, body: dict = Body(...)) -> dict:
+ s, doc = _snapshot(doc_id)
+ frag = _fragment(doc, body.get("object"))
+ atoms = body.get("atoms")
+ if not isinstance(atoms, list) or not all(isinstance(a, str) for a in atoms):
+ raise HTTPException(422, "atoms must be a list of four atom ids")
+ store = body.get("store") is True
+ cid = body.get("conformer") if isinstance(body.get("conformer"), str) else None
+ out = await _run(scan.run, frag, molecule.expansions_of(doc), atoms, _number(body, "start", -180.0, -360, 360),
+ _number(body, "end", 180.0, -360, 360), _number(body, "step", 10.0, 0.1, 360), _method(body), cid, store,
+ _number(body, "max_iters", scan.SCAN_ITERS, 1, 100000, True))
+ records = out.pop("conformers", None)
+ active = out.pop("active", None)
+ if not store:
+ return {**out, "changed": False, "tx": None, "rev": s.rev}
+ done = await commit(doc_id, "Dihedral scan", _replace_ops(frag["id"], records or [], active), body, s.rev, (frag["id"], stale.signature(frag)))
+ return {**out, **done, "active": active}
+
+
+def _ids(text: str | None) -> list[str]:
+ return [a.strip() for a in (text or "").split(",") if a.strip()]
+
+
+@router.get("/api/documents/{doc_id}/3d/measure")
+def measure_3d(doc_id: str, object: str, atoms: str, conformer: str | None = None) -> dict:
+ _, doc = _snapshot(doc_id)
+ frag = _fragment(doc, object)
+ try:
+ return measure.measure(molecule.find_conformer(frag, conformer), _ids(atoms))
+ except ThreeDError as exc:
+ raise _failed(exc)
+
+
+@router.get("/api/documents/{doc_id}/3d/charges")
+async def charges_3d(doc_id: str, object: str, kind: str = "gasteiger") -> dict:
+ _, doc = _snapshot(doc_id)
+ frag = _fragment(doc, object)
+ return await _run(measure.charges, frag, molecule.expansions_of(doc), kind)
+
+
+@router.get("/api/documents/{doc_id}/3d/molblock")
+async def molblock_3d(doc_id: str, object: str, conformer: str | None = None, format: str = "mol",
+ as_: str = Query("json", alias="as")) -> Response:
+ _, doc = _snapshot(doc_id)
+ frag = _fragment(doc, object)
+ out = await _run(export.write, frag, molecule.expansions_of(doc), format, conformer)
+ if as_ == "file":
+ headers = {"content-disposition": f"attachment; filename=\"{out['filename']}\"; filename*=UTF-8''{quote(out['filename'])}",
+ "x-content-type-options": "nosniff"}
+ return Response(out["text"].encode("utf-8"), media_type=f"{out['mime']}; charset=utf-8", headers=headers)
+ return JSONResponse({k: v for k, v in out.items() if k != "mime"} | {"engine": ENGINE})
+
+
+async def _payload(request: Request) -> tuple[bytes, str, dict]:
+ if request.headers.get("content-type", "").startswith("multipart/"):
+ form = await request.form()
+ found = [v for v in form.getlist("file") if isinstance(v, StarletteUpload)]
+ if not found:
+ raise HTTPException(400, "Send the structure file as a multipart field named file.")
+ data = await found[0].read(UPLOAD_LIMIT + 1)
+ fields = {k: v for k, v in form.items() if isinstance(v, str)}
+ name = Path(found[0].filename or "").name
+ else:
+ try:
+ fields = await request.json()
+ except ValueError:
+ raise HTTPException(422, "Send JSON with text or base64, or a multipart file.")
+ if not isinstance(fields, dict):
+ raise HTTPException(422, "Send JSON with text or base64, or a multipart file.")
+ packed, text = fields.get("base64"), fields.get("text")
+ if isinstance(packed, str) and packed:
+ if len(packed) > UPLOAD_LIMIT * 4 // 3 + 4:
+ raise HTTPException(413, "The file is too large.")
+ try:
+ data = base64.b64decode(packed, validate=True)
+ except (ValueError, binascii.Error):
+ raise HTTPException(422, "base64 is not valid base64")
+ elif isinstance(text, str) and text.strip():
+ data = text.encode("utf-8")
+ else:
+ raise HTTPException(422, "text or base64 is required")
+ name = Path(fields.get("name")).name if isinstance(fields.get("name"), str) else ""
+ if len(data) > UPLOAD_LIMIT:
+ raise HTTPException(413, f"The file is larger than {UPLOAD_LIMIT // (1024 * 1024)} MB.")
+ return data, name, fields
+
+
+def _text_field(fields: dict, key: str) -> str | None:
+ value = fields.get(key)
+ return value.strip() if isinstance(value, str) and value.strip() else None
+
+
+def _truthy(value: object) -> bool:
+ return value is True or (isinstance(value, str) and value.strip().lower() in ("1", "true", "yes"))
+
+
+def _page(doc: dict, wanted: object, near: str | None = None) -> str:
+ pages = [p for p in doc.get("pages") or [] if isinstance(p, dict)]
+ if isinstance(wanted, str) and wanted:
+ if not any(p.get("id") == wanted for p in pages):
+ raise HTTPException(404, f"The drawing has no page {wanted}.")
+ return wanted
+ if near:
+ found = docmodel.page_of(doc, near)
+ if found is not None:
+ return found["id"]
+ return pages[0]["id"]
+
+
+def _place_ops(doc: dict, page: str, objects: list[dict], media: tuple[str, dict] | None = None) -> list[dict]:
+ ops: list[dict] = []
+ if media is not None:
+ if isinstance(doc.get("media"), dict):
+ ops.append({"op": "set", "path": ["media", media[0]], "value": media[1]})
+ else:
+ ops.append({"op": "set", "path": ["media"], "value": {media[0]: media[1]}})
+ for obj in objects:
+ ops.append({"op": "set", "path": ["objects", obj["id"]], "value": obj})
+ ops.append({"op": "ins", "path": ["pages", {"id": page}, "order"], "value": obj["id"]})
+ return ops
+
+
+def _public(out: dict) -> dict:
+ keep = {k: v for k, v in out.items() if k not in ("structure", "molecules")}
+ if "molecules" in out:
+ keep["molecules"] = [{k: m[k] for k in ("name", "fragment", "three_d", "warnings")} for m in out["molecules"]]
+ return keep
+
+
+@router.post("/api/3d/parse", dependencies=GUARD)
+async def parse_3d(request: Request) -> dict:
+ data, name, fields = await _payload(request)
+ return _public(await _run(readers.read, data, name, _text_field(fields, "format")))
+
+
+@router.post("/api/documents/{doc_id}/3d/open", dependencies=GUARD)
+async def open_3d(doc_id: str, request: Request) -> dict:
+ _snapshot(doc_id)
+ data, name, fields = await _payload(request)
+ return await open_bytes(doc_id, data, name, fields)
+
+
+async def open_bytes(doc_id: str, data: bytes, name: str, fields: dict) -> dict:
+ s, doc = _snapshot(doc_id)
+ x, y = _number(fields, "x", 72.0, -1e6, 1e6), _number(fields, "y", 72.0, -1e6, 1e6)
+ page = _page(doc, fields.get("page"))
+ style = docmodel.resolve_style(doc)
+ out = await _run(readers.read, data, name, _text_field(fields, "format"), float(style["bond_length"]), (x, y), readers.used_ids(doc))
+ fmt = out["format"]
+ mode = _text_field(fields, "as") or ("fragment" if fmt in ("sdf", "mol") else "model")
+ if mode not in ("model", "fragment"):
+ raise HTTPException(422, "as must be model or fragment")
+ if mode == "fragment":
+ if fmt not in ("sdf", "mol"):
+ raise HTTPException(422, "Only SDF and MOL files open as structures; PDB and mmCIF open as a 3D model.")
+ frags = [m["fragment"] for m in out["molecules"] if m["fragment"]]
+ done = await commit(doc_id, "Open 3D structure", _place_ops(doc, page, frags), fields, s.rev)
+ return {**done, "format": fmt, "fragments": [f["id"] for f in frags], "summary": out["summary"],
+ "warnings": out["summary"]["warnings"], "engine": ENGINE}
+ kept = STORE.add_file_media(doc_id, data, name or f"structure.{fmt}", structure.MIMES[fmt])
+ obj = readers.model_object(kept["id"], fmt, out["summary"], x, y)
+ answer = {**_public(out), "id": kept["id"], "media": kept["media"], "object": obj}
+ if not _truthy(fields.get("place")):
+ return {**answer, "changed": False, "tx": None, "rev": s.rev}
+ done = await commit(doc_id, "Open 3D structure", _place_ops(doc, page, [obj], (kept["id"], kept["media"])), fields, s.rev)
+ return {**answer, **done}
+
+
+def _media_source(doc_id: str, doc: dict, oid: object, mid: object) -> tuple[bytes, str, str | None, str | None]:
+ fmt, near = None, None
+ if isinstance(oid, str) and oid:
+ obj = (doc.get("objects") or {}).get(oid)
+ if not isinstance(obj, dict) or obj.get("kind") != "model3d":
+ raise HTTPException(404, f"The drawing has no 3D model {oid}.")
+ source = obj.get("source") if isinstance(obj.get("source"), dict) else {}
+ mid, fmt, near = source.get("media"), source.get("format"), oid
+ if not isinstance(mid, str):
+ raise HTTPException(422, f"{oid} shows a structure on the page, not a file.")
+ if not isinstance(mid, str) or not mid:
+ raise HTTPException(422, "Name the 3D model (object) or its media file (media).")
+ try:
+ data, _ = STORE.media_bytes(doc_id, mid)
+ except StoreError as exc:
+ raise HTTPException(404, str(exc))
+ entry = (doc.get("media") or {}).get(mid) if isinstance(doc.get("media"), dict) else None
+ name = entry.get("name") if isinstance(entry, dict) and isinstance(entry.get("name"), str) else ""
+ return data, name, fmt if isinstance(fmt, str) else None, near
+
+
+@router.get("/api/documents/{doc_id}/3d/structure")
+async def structure_3d(doc_id: str, object: str) -> dict:
+ _, doc = _snapshot(doc_id)
+ obj = (doc.get("objects") or {}).get(object)
+ if isinstance(obj, dict) and obj.get("kind") == "fragment":
+ return {"format": "fragment", "atoms": len(obj.get("atoms") or {}), "conformers": len(obj.get("conformers") or []),
+ "conformer": obj.get("conformer")}
+ if isinstance(obj, dict) and obj.get("kind") == "model3d" and isinstance((obj.get("source") or {}).get("fragment"), str):
+ frag = (doc.get("objects") or {}).get(obj["source"]["fragment"])
+ return {"format": "fragment", "fragment": obj["source"]["fragment"],
+ "atoms": len((frag or {}).get("atoms") or {}), "conformers": len((frag or {}).get("conformers") or [])}
+ data, name, fmt, _ = _media_source(doc_id, doc, object, None)
+ out = await _run(readers.read, data, name, fmt)
+ return {**_public(out), "media": obj["source"]["media"]}
+
+
+@router.post("/api/documents/{doc_id}/3d/extract-ligand", dependencies=GUARD)
+async def extract_ligand(doc_id: str, body: dict = Body(...)) -> dict:
+ s, doc = _snapshot(doc_id)
+ data, name, fmt, near = _media_source(doc_id, doc, body.get("object"), body.get("media"))
+ page = _page(doc, body.get("page"), near)
+ x, y = _number(body, "x", 72.0, -1e6, 1e6), _number(body, "y", 72.0, -1e6, 1e6)
+ style = docmodel.resolve_style(doc)
+ want = body.get("ligand") if isinstance(body.get("ligand"), str) else ""
+
+ def work() -> dict:
+ found = readers.read(data, name, fmt)
+ if "structure" not in found:
+ raise ThreeDError("Ligands are extracted from PDB and mmCIF files; this model is an SDF or MOL file.")
+ return ligand.extract(found["structure"], want, float(style["bond_length"]), (x, y), readers.used_ids(doc))
+
+ out = await _run(work)
+ frag = out["fragment"]
+ done = await commit(doc_id, "Extract ligand", _place_ops(doc, page, [frag]), body, s.rev)
+ return {**done, "fragment": frag["id"], "ligand": out["ligand"], "bonds": out["bonds"], "smiles": out["smiles"],
+ "warnings": out["warnings"], "engine": out["engine"]}
diff --git a/backend/app/services/importers.py b/backend/app/services/importers.py
index b87bfd5b..42bf740a 100644
--- a/backend/app/services/importers.py
+++ b/backend/app/services/importers.py
@@ -33,19 +33,66 @@
INSERT_MAX = 1000
MEDIA_LIMIT = 16 * 1024 * 1024
PICTURES = {".svg": "SVG picture", ".png": "PNG picture", ".pdf": "PDF picture", ".eps": "EPS picture"}
+SPECTRA = {".jdx": "JCAMP-DX", ".dx": "JCAMP-DX", ".jcamp": "JCAMP-DX"}
+MODELS_3D = {".pdb": "PDB", ".ent": "PDB", ".cif": "mmCIF", ".mmcif": "mmCIF"}
class ImportFailed(ValueError):
pass
+def is_spectrum(path: str | Path) -> bool:
+ return Path(path).suffix.lower() in SPECTRA
+
+
+def is_model3d(path: str | Path) -> bool:
+ return Path(path).suffix.lower() in MODELS_3D
+
+
def can_import(path: str | Path) -> bool:
- return Path(path).suffix.lower() in FORMATS
+ return Path(path).suffix.lower() in FORMATS or is_spectrum(path) or is_model3d(path)
def can_insert(path: str | Path) -> bool:
suffix = Path(path).suffix.lower()
- return suffix in FORMATS or suffix == package.EXT or embedded_source.can_open(path)
+ return suffix in FORMATS or suffix == package.EXT or embedded_source.can_open(path) or is_spectrum(path) or is_model3d(path)
+
+
+def import_model3d(path: str | Path) -> tuple[dict, dict[str, bytes], list[str]]:
+ from app.services.three_d import document
+ try:
+ doc, media, items = document.open_file(path)
+ except document.StructureFileError as exc:
+ raise ImportFailed(str(exc)) from exc
+ return doc, media, [i["text"] for i in items if i.get("severity") != "info"]
+
+
+def import_spectrum(path: str | Path) -> tuple[dict, dict[str, bytes], list[str]]:
+ from app.services.spectra import document
+ try:
+ doc, media, items = document.open_file(path)
+ except document.SpectrumFileError as exc:
+ raise ImportFailed(str(exc)) from exc
+ return doc, media, [i["text"] for i in items if i.get("severity") != "info"]
+
+
+def import_with_media(path: str | Path) -> tuple[dict, dict[str, bytes], list[str]]:
+ if is_spectrum(path):
+ return import_spectrum(path)
+ if is_model3d(path):
+ return import_model3d(path)
+ doc, warnings = import_file(path)
+ return doc, {}, warnings
+
+
+def _with_conformers(p: Path, bond_length: float, used: set[str]):
+ from app.services.three_d import document
+ if p.suffix.lower() not in document.MDL_SUFFIXES:
+ return None
+ try:
+ return document.mdl_with_conformers(p, bond_length, used)
+ except Exception:
+ return None
def _parser():
@@ -276,15 +323,15 @@ def _drawing(doc: dict, page: dict, result: object, ids: _Ids, warnings: list) -
def import_file(path: str | Path, bond_length: float | None = None, limit: int | None = None) -> tuple[dict, list[str]]:
p = Path(path).expanduser()
- if not can_import(p):
- raise ImportFailed(f"FormChem cannot import {p.suffix or 'this kind of'} files.")
+ if not can_import(p) or is_spectrum(p) or is_model3d(p):
+ raise ImportFailed(f"FormChem cannot import {p.suffix or 'this kind of'} files as structures.")
read_file = _parser()
doc = model.empty_document(p.stem or "Untitled", _locale(), f"formchem {__version__}")
if bond_length:
doc["style"]["bond_length"] = float(bond_length)
bond_length = float(model.resolve_style(doc).get("bond_length", 14.4))
try:
- result = read_file(str(p), bond_length=bond_length, **({"max_records": limit} if limit else {}))
+ result = _with_conformers(p, bond_length, {doc["id"], doc["pages"][0]["id"]}) or read_file(str(p), bond_length=bond_length, **({"max_records": limit} if limit else {}))
except ImportFailed:
raise
except Exception as exc:
@@ -356,6 +403,18 @@ def read_for_insert(path: str | Path, bond_length: float | None = None, limit: i
p = Path(path).expanduser()
suffix = p.suffix.lower()
media: dict[str, str] = {}
+ if is_spectrum(p):
+ from app.services.spectra import document
+ try:
+ return document.for_insert(p)
+ except document.SpectrumFileError as exc:
+ raise ImportFailed(str(exc)) from exc
+ if is_model3d(p):
+ from app.services.three_d import document as document3d
+ try:
+ return document3d.for_insert(p)
+ except document3d.StructureFileError as exc:
+ raise ImportFailed(str(exc)) from exc
if suffix in FORMATS:
doc, _ = import_file(p, bond_length, max(1, min(int(limit), INSERT_MAX)))
items = list(doc["meta"]["imported"].get("report") or [])
diff --git a/backend/app/services/model.py b/backend/app/services/model.py
index 943e7925..9e6d8819 100644
--- a/backend/app/services/model.py
+++ b/backend/app/services/model.py
@@ -108,6 +108,22 @@ class RGroupDef(TypedDict):
attach: NotRequired[dict[str, list[str]]]
+class ScanPoint(TypedDict):
+ atoms: list[str]
+ angle: float
+
+
+class Conformer(TypedDict):
+ id: str
+ coords: dict[str, list[float]]
+ h: NotRequired[dict[str, list[list[float]]]]
+ expanded: NotRequired[dict[str, list[list[float]]]]
+ energy: NotRequired[float]
+ method: NotRequired[str]
+ converged: NotRequired[bool]
+ scan: NotRequired[ScanPoint]
+
+
class Fragment(TypedDict):
id: str
kind: Literal["fragment"]
@@ -122,6 +138,8 @@ class Fragment(TypedDict):
chiral: NotRequired[Literal["absolute", "relative", "racemic"]]
stereo_groups: NotRequired[list[dict[str, Any]]]
rgroups: NotRequired[dict[str, RGroupDef]]
+ conformers: NotRequired[list[Conformer]]
+ conformer: NotRequired[str]
class Page(TypedDict):
diff --git a/backend/app/services/names/__init__.py b/backend/app/services/names/__init__.py
new file mode 100644
index 00000000..ef96346a
--- /dev/null
+++ b/backend/app/services/names/__init__.py
@@ -0,0 +1,51 @@
+import threading
+
+from app.services.names.base import HIGH, LOW, MEDIUM, NONE, SYSTEMATIC, TRIVIAL, NameEngine, NameItem, NameResult, StructureResult
+
+_ENGINES: dict[str, NameEngine] = {}
+_ORDER: list[str] = []
+_LOCK = threading.Lock()
+
+
+def register(engine: NameEngine, first: bool = False) -> None:
+ if not isinstance(engine, NameEngine):
+ raise TypeError("a name engine needs id, label, version, available, to_structure and to_name")
+ with _LOCK:
+ _ENGINES[engine.id] = engine
+ if engine.id in _ORDER:
+ _ORDER.remove(engine.id)
+ _ORDER.insert(0 if first else len(_ORDER), engine.id)
+
+
+def _defaults() -> None:
+ if _ENGINES:
+ return
+ from app.services.names.offline import OfflineEngine
+ register(OfflineEngine())
+
+
+def engines() -> list[NameEngine]:
+ _defaults()
+ with _LOCK:
+ return [_ENGINES[i] for i in _ORDER]
+
+
+def engine(engine_id: str | None = None) -> NameEngine:
+ _defaults()
+ with _LOCK:
+ if engine_id:
+ if engine_id not in _ENGINES:
+ raise KeyError(f"no name engine {engine_id}; the engines are {', '.join(_ORDER)}")
+ return _ENGINES[engine_id]
+ for i in _ORDER:
+ if _ENGINES[i].available():
+ return _ENGINES[i]
+ raise KeyError("no name engine is available")
+
+
+def listing() -> list[dict]:
+ return [{"id": e.id, "label": e.label, "version": e.version, "available": e.available()} for e in engines()]
+
+
+__all__ = ["HIGH", "LOW", "MEDIUM", "NONE", "SYSTEMATIC", "TRIVIAL", "NameEngine", "NameItem", "NameResult", "StructureResult",
+ "engine", "engines", "listing", "register"]
diff --git a/backend/app/services/names/base.py b/backend/app/services/names/base.py
new file mode 100644
index 00000000..ad694fc9
--- /dev/null
+++ b/backend/app/services/names/base.py
@@ -0,0 +1,81 @@
+from dataclasses import dataclass, field
+from typing import Protocol, runtime_checkable
+
+from rdkit import Chem
+
+HIGH = "high"
+MEDIUM = "medium"
+LOW = "low"
+NONE = "none"
+
+TRIVIAL = "trivial"
+SYSTEMATIC = "systematic"
+
+
+def note(code: str, text: str, **extra) -> dict:
+ return {"code": code, "text": text, **{k: v for k, v in extra.items() if v is not None}}
+
+
+@dataclass
+class StructureResult:
+ name: str
+ smiles: str | None
+ confidence: str
+ method: str
+ engine: str
+ version: str
+ warnings: list[dict] = field(default_factory=list)
+ inchikey: str | None = None
+ error: dict | None = None
+
+ @property
+ def ok(self) -> bool:
+ return self.smiles is not None
+
+ def as_dict(self) -> dict:
+ out = {"name": self.name, "smiles": self.smiles, "inchikey": self.inchikey, "confidence": self.confidence,
+ "method": self.method, "engine": self.engine, "version": self.version, "warnings": list(self.warnings)}
+ if self.error:
+ out["error"] = dict(self.error)
+ return out
+
+
+@dataclass
+class NameItem:
+ text: str
+ kind: str
+ confidence: str
+ method: str
+
+ def as_dict(self) -> dict:
+ return {"text": self.text, "kind": self.kind, "confidence": self.confidence, "method": self.method}
+
+
+@dataclass
+class NameResult:
+ names: list[NameItem]
+ engine: str
+ version: str
+ warnings: list[dict] = field(default_factory=list)
+ inchikey: str | None = None
+ reason: str | None = None
+
+ def as_dict(self) -> dict:
+ out = {"names": [n.as_dict() for n in self.names], "engine": self.engine, "version": self.version,
+ "inchikey": self.inchikey, "warnings": list(self.warnings)}
+ if self.reason:
+ out["reason"] = self.reason
+ return out
+
+
+@runtime_checkable
+class NameEngine(Protocol):
+ id: str
+ label: str
+ version: str
+
+ def available(self) -> bool: ...
+
+ def to_structure(self, name: str) -> StructureResult: ...
+
+ def to_name(self, mol: Chem.Mol) -> NameResult: ...
diff --git a/backend/app/services/names/build.py b/backend/app/services/names/build.py
new file mode 100644
index 00000000..688f4771
--- /dev/null
+++ b/backend/app/services/names/build.py
@@ -0,0 +1,435 @@
+from dataclasses import dataclass, field
+
+from rdkit import Chem
+
+from app.services.names import lexicon as lx
+from app.services.names import rings
+from app.services.names.parser import Parent, Prefix, Sub, Tree, Unsat
+
+BOND = {1: Chem.BondType.SINGLE, 2: Chem.BondType.DOUBLE, 3: Chem.BondType.TRIPLE}
+
+
+class BuildError(ValueError):
+ pass
+
+
+@dataclass
+class Frag:
+ mol: Chem.RWMol
+ locs: dict[str, int]
+ numbered: list[int]
+ label: str
+ attach: int | None = None
+ order: int = 1
+ chain: bool = False
+ cyclo: bool = False
+ size: int = 0
+ ester: list[int] = field(default_factory=list)
+ suffix_atoms: list[int] = field(default_factory=list)
+ ketones: list[int] = field(default_factory=list)
+ principal: int | None = None
+ assumed: list[str] = field(default_factory=list)
+
+ def where(self, idx: int) -> str:
+ for k, v in self.locs.items():
+ if v == idx and k not in ("n", "o", "s"):
+ return f"position {k} of {self.label}"
+ return self.label
+
+
+@dataclass
+class Built:
+ mol: Chem.Mol
+ locs: dict[str, int]
+ assumed: list[str]
+ label: str
+
+
+def reset_h(rw: Chem.RWMol) -> Chem.RWMol:
+ for a in rw.GetAtoms():
+ if a.GetFormalCharge() == 0 and a.GetSymbol() in lx.VALENCE:
+ a.SetNumExplicitHs(0)
+ a.SetNoImplicit(False)
+ return rw
+
+
+def from_smiles(smiles: str) -> Chem.RWMol:
+ mol = Chem.MolFromSmiles(smiles)
+ if mol is None:
+ raise BuildError(f"internal group {smiles} is not valid")
+ rw = Chem.RWMol(mol)
+ Chem.Kekulize(rw, clearAromaticFlags=True)
+ return reset_h(rw)
+
+
+def valence(mol: Chem.RWMol, idx: int) -> int:
+ a = mol.GetAtomWithIdx(idx)
+ sym = a.GetSymbol()
+ if sym == "S":
+ oxo = sum(1 for b in a.GetBonds() if b.GetBondType() == Chem.BondType.DOUBLE and b.GetOtherAtom(a).GetSymbol() == "O")
+ return 2 + 2 * oxo
+ v = lx.VALENCE.get(sym, 0)
+ if sym == "N" and a.GetFormalCharge() == 1:
+ return 4
+ return v
+
+
+def free(mol: Chem.RWMol, idx: int) -> int:
+ a = mol.GetAtomWithIdx(idx)
+ used = sum(int(b.GetBondTypeAsDouble()) for b in a.GetBonds())
+ return valence(mol, idx) - used - a.GetNumExplicitHs()
+
+
+def graft(host: Frag, at: int, guest: Frag, order: int) -> int:
+ if guest.attach is None:
+ raise BuildError(f"{guest.label} has no attachment point")
+ if free(host.mol, at) < order:
+ raise BuildError(f"there is no room for {guest.label} at {host.where(at)}")
+ if free(guest.mol, guest.attach) < order:
+ raise BuildError(f"{guest.label} cannot bond there")
+ off = host.mol.GetNumAtoms()
+ host.mol.InsertMol(guest.mol)
+ host.mol.AddBond(at, off + guest.attach, BOND[order])
+ host.assumed.extend(a for a in guest.assumed if a not in host.assumed)
+ return off
+
+
+def atom_frag(smiles: str, label: str, order: int = 1) -> Frag:
+ return Frag(from_smiles(smiles), {}, [0], label, attach=0, order=order)
+
+
+def chain(n: int, cyclo: bool, label: str) -> Frag:
+ if n > lx.MAX_CHAIN:
+ raise BuildError(f"chains longer than {lx.MAX_CHAIN} carbons are not read yet")
+ if cyclo and n < 3:
+ raise BuildError(f"{label} is too small to be a ring")
+ rw = Chem.RWMol()
+ for _ in range(n):
+ rw.AddAtom(Chem.Atom(6))
+ for k in range(n - 1):
+ rw.AddBond(k, k + 1, Chem.BondType.SINGLE)
+ if cyclo:
+ rw.AddBond(n - 1, 0, Chem.BondType.SINGLE)
+ return Frag(rw, {str(k + 1): k for k in range(n)}, list(range(n)), label, chain=not cyclo, cyclo=cyclo, size=n)
+
+
+def ring_frag(rid: str, indicated: str | None) -> Frag:
+ t = rings.template(rid)
+ want = t.ring.indicated.lower()
+ if indicated and indicated != want:
+ raise BuildError(f"{indicated.upper()}-{rid} is a tautomer FormChem does not draw from a name yet")
+ rw = reset_h(Chem.RWMol(t.kekule))
+ locs = {loc.lower(): i for i, loc in enumerate(t.ring.locants)}
+ return Frag(rw, locs, list(range(rw.GetNumAtoms())), t.ring.name, size=rw.GetNumAtoms())
+
+
+def _ranks(f: Frag) -> list[int] | None:
+ try:
+ m = f.mol.GetMol()
+ m = Chem.Mol(m)
+ Chem.SanitizeMol(m)
+ return list(Chem.CanonicalRankAtoms(m, breakTies=False))
+ except Exception:
+ return None
+
+
+def _ambiguous(f: Frag, candidates: list[int], count: int, order: int) -> bool:
+ if len(candidates) <= 1:
+ return False
+ if sum(free(f.mol, c) // order for c in candidates) == count:
+ return False
+ ranks = _ranks(f)
+ if ranks is None:
+ return True
+ return count != 1 or len({ranks[c] for c in candidates}) > 1
+
+
+def _loc(f: Frag, loc: str) -> int:
+ if loc not in f.locs:
+ raise BuildError(f"locant {loc.upper() if loc[0].isalpha() else loc} is not a position of {f.label}")
+ return f.locs[loc]
+
+
+def apply_unsat(f: Frag, items: list[Unsat]) -> list[Unsat]:
+ pending = []
+ for u in items:
+ if u.locants is None:
+ pending.append(u)
+ continue
+ for loc in u.locants:
+ if not loc.isdigit():
+ raise BuildError(f"{loc} is not a chain position")
+ k = int(loc)
+ a = _loc(f, loc)
+ if k < f.size:
+ b = f.locs[str(k + 1)]
+ elif f.cyclo and k == f.size:
+ b = f.locs["1"]
+ else:
+ raise BuildError(f"a multiple bond cannot start at position {k} of {f.label}")
+ bond = f.mol.GetBondBetweenAtoms(a, b)
+ if bond is None or bond.GetBondType() != Chem.BondType.SINGLE:
+ raise BuildError(f"position {k} of {f.label} cannot carry that multiple bond")
+ if free(f.mol, a) < u.order - 1 or free(f.mol, b) < u.order - 1:
+ raise BuildError(f"there is no room for a multiple bond at position {k} of {f.label}")
+ bond.SetBondType(BOND[u.order])
+ return pending
+
+
+def default_unsat(f: Frag, pending: list[Unsat]) -> None:
+ for u in pending:
+ pairs = [(f.locs[str(k)], f.locs[str(k + 1)]) for k in range(1, f.size)]
+ if f.cyclo:
+ pairs.append((f.locs[str(f.size)], f.locs["1"]))
+ busy = set(f.suffix_atoms)
+ for b in f.mol.GetBonds():
+ if b.GetBondType() != Chem.BondType.SINGLE:
+ busy.update((b.GetBeginAtomIdx(), b.GetEndAtomIdx()))
+ feasible = [(a, b) for a, b in pairs if a not in busy and b not in busy and free(f.mol, a) >= u.order - 1 and free(f.mol, b) >= u.order - 1]
+ chosen, used = [], set()
+ for a, b in feasible:
+ if a in used or b in used:
+ continue
+ chosen.append((a, b))
+ used.update((a, b))
+ if len(chosen) == u.count:
+ break
+ if len(chosen) < u.count:
+ raise BuildError(f"there is no room for the multiple bonds of {f.label}")
+ ranks = _ranks(f)
+ classes = {tuple(sorted((ranks[a], ranks[b]))) for a, b in feasible} if ranks else set(feasible)
+ if not (u.count == 1 and len(classes) == 1) and not (f.cyclo and u.count == 1):
+ f.assumed.append(f"the multiple bond positions of {f.label} were not given; drawn at the lowest positions")
+ for a, b in chosen:
+ f.mol.GetBondBetweenAtoms(a, b).SetBondType(BOND[u.order])
+
+
+def _terminal(f: Frag, idx: int) -> bool:
+ return f.chain and (f.size == 1 or idx in (f.locs["1"], f.locs[str(f.size)]))
+
+
+def apply_suffix(f: Frag, word: str, locants: list[str] | None, count: int) -> None:
+ sx = lx.SUFFIXES[word]
+ need = sum(o for _, o in sx.groups)
+ if sx.terminal and not f.chain:
+ raise BuildError(f"-{word} needs an open chain; on a ring the suffix is carbaldehyde, carboxylic acid, carbonitrile or carboxamide")
+ if locants is not None:
+ targets = [_loc(f, loc) for loc in locants]
+ elif sx.terminal:
+ if count > 2:
+ raise BuildError(f"a chain has only two ends for -{word}")
+ targets = [f.locs["1"]] if count == 1 else [f.locs["1"], f.locs[str(f.size)]]
+ if count == 2 and f.size < 2:
+ raise BuildError(f"{f.label} is too short for two -{word} groups")
+ else:
+ candidates = [i for i in f.numbered if free(f.mol, i) >= need and not (sx.not_terminal and _terminal(f, i) and f.size > 1)]
+ if len(candidates) < count:
+ candidates = [i for i in f.numbered if free(f.mol, i) >= need]
+ if len(candidates) < count:
+ raise BuildError(f"there is no room for -{word} on {f.label}")
+ targets = candidates[:count]
+ if count < len(candidates) and _ambiguous(f, candidates, count, need):
+ f.assumed.append(f"the position of -{word} on {f.label} was not given; drawn at the lowest position")
+ for t in targets:
+ if sx.terminal and not _terminal(f, t):
+ raise BuildError(f"-{word} must be at the end of the chain, not at {f.where(t)}")
+ if sx.not_terminal:
+ f.ketones.append(t)
+ if free(f.mol, t) < need:
+ raise BuildError(f"there is no room for -{word} at {f.where(t)}")
+ n_atoms = []
+ for t in targets:
+ for gi, (smi, order) in enumerate(sx.groups):
+ off = graft(f, t, atom_frag(smi, f"-{word}", order), order)
+ if sx.n_atom and sx.n_atom[0] == gi:
+ n_atoms.append(off + sx.n_atom[1])
+ if sx.ester_atom and sx.ester_atom[0] == gi:
+ f.ester.append(off + sx.ester_atom[1])
+ f.suffix_atoms.append(t)
+ for k, idx in enumerate(n_atoms):
+ f.locs["n" + "'" * k] = idx
+ if len(targets) == 1:
+ f.principal = targets[0]
+
+
+def _positions(f: Frag, p: Prefix, order: int) -> tuple[list[int], bool]:
+ if p.locants is not None:
+ return [_loc(f, loc) for loc in p.locants], False
+ if p.omp is not None:
+ if f.label != "benzene":
+ raise BuildError("ortho, meta and para need a benzene ring")
+ first = f.principal if f.principal is not None else f.locs["1"]
+ ring_order = [f.locs[str(k)] for k in range(1, 7)]
+ start = ring_order.index(first)
+ rel = ring_order[(start + p.omp - 1) % 6]
+ if p.count == 2:
+ return [first, rel], False
+ if f.principal is None:
+ raise BuildError("ortho, meta or para with a single group needs a parent such as phenol, aniline or toluene")
+ return [rel], False
+ candidates = [i for i in f.numbered if free(f.mol, i) >= order]
+ if not candidates:
+ raise BuildError(f"there is no room for {_label(p.sub)} on {f.label}")
+ out, budget = [], {c: free(f.mol, c) // order for c in candidates}
+ while len(out) < p.count:
+ progressed = False
+ for c in candidates:
+ if budget[c] > 0 and len(out) < p.count:
+ out.append(c)
+ budget[c] -= 1
+ progressed = True
+ if not progressed:
+ raise BuildError(f"there is no room for {p.count} {_label(p.sub)} groups on {f.label}")
+ return out, _ambiguous(f, candidates, p.count, order)
+
+
+def apply_prefixes(f: Frag, prefixes: list[Prefix]) -> None:
+ ordered = [p for p in prefixes if p.locants is not None] + [p for p in prefixes if p.locants is None and p.omp is not None] + \
+ [p for p in prefixes if p.locants is None and p.omp is None]
+ for p in ordered:
+ probe = build_sub(p.sub)
+ positions, unsure = _positions(f, p, probe.order)
+ if unsure:
+ f.assumed.append(f"the position of {_label(p.sub)} on {f.label} was not given; drawn at the lowest free position")
+ for k, at in enumerate(positions):
+ guest = probe if k == 0 else build_sub(p.sub)
+ graft(f, at, guest, guest.order)
+
+
+def _label(sub: Sub) -> str:
+ if sub.kind == "chain":
+ return sub.key + ("oxy" if sub.oxy else "yl")
+ return sub.key
+
+
+def build_sub(sub: Sub) -> Frag:
+ if sub.kind == "group":
+ g = lx.GROUPS[sub.key]
+ locs = g.locant_map()
+ numbered = list(g.prefixable) or sorted({v for k, v in locs.items() if k.isdigit()} - {0})
+ f = Frag(from_smiles(g.smiles), locs, numbered, sub.key, attach=0, order=g.order)
+ if sub.prefixes and not numbered:
+ raise BuildError(f"{sub.key} cannot carry substituents")
+ elif sub.kind == "chain":
+ f = chain(lx.STEMS[sub.key], sub.cyclo, ("cyclo" if sub.cyclo else "") + sub.key + "yl")
+ pending = apply_unsat(f, sub.unsat)
+ f.attach = _loc(f, sub.attach or "1")
+ if sub.acyl:
+ if f.attach != f.locs["1"]:
+ raise BuildError("an acyl group is attached at its carbonyl carbon")
+ graft(f, f.attach, atom_frag("O", "oxo", 2), 2)
+ f.suffix_atoms.append(f.attach)
+ default_unsat(f, pending)
+ f.order = sub.order
+ else:
+ f = ring_frag(sub.key, sub.indicated)
+ f.label = rings.RINGS[sub.key].stem + "yl"
+ if sub.attach is None:
+ candidates = [i for i in f.numbered if free(f.mol, i) >= sub.order]
+ if not candidates:
+ raise BuildError(f"{f.label} has no free position")
+ f.attach = candidates[0]
+ if _ambiguous(f, candidates, 1, sub.order):
+ f.assumed.append(f"the attachment position of {f.label} was not given; position {f.where(f.attach).split()[1]} assumed")
+ else:
+ f.attach = _loc(f, sub.attach)
+ f.order = sub.order
+ if sub.oxy:
+ off = f.mol.AddAtom(Chem.Atom(8))
+ f.mol.AddBond(f.attach, off, Chem.BondType.SINGLE)
+ f.attach = off
+ apply_prefixes(f, sub.prefixes)
+ if free(f.mol, f.attach) < f.order:
+ raise BuildError(f"{f.label} has no room left to attach")
+ return f
+
+
+def build_parent(p: Parent) -> Frag:
+ lead = list(p.lead or [])
+
+ def take(n: int) -> list[str] | None:
+ if len(lead) < n:
+ return None
+ got = lead[:n]
+ del lead[:n]
+ return got
+
+ if p.kind == "retained":
+ r = lx.RETAINED[p.key]
+ f = ring_frag("benzene", None) if r.base == "benzene" else chain(r.size, False, p.key)
+ f.label = r.base if r.base == "benzene" else p.key
+ if r.suffix:
+ apply_suffix(f, r.suffix, ["1"], 1)
+ if r.prefix:
+ graft(f, f.locs["1"], build_sub(Sub("chain", "meth", size=1, oxy=r.prefix == "methoxy")), 1)
+ f.principal = f.locs["1"]
+ return f
+ if p.kind == "amine":
+ return Frag(from_smiles("N"), {"n": 0}, [0], "amine")
+ if p.kind == "ring":
+ f = ring_frag(p.key, p.indicated)
+ pending = []
+ else:
+ f = chain(p.size, p.cyclo, ("cyclo" if p.cyclo else "") + p.key + "ane")
+ unsat = [Unsat(take(u.count) if u.locants is None and lead else u.locants, u.count, u.order) for u in p.unsat]
+ pending = apply_unsat(f, unsat)
+ if p.suffix:
+ locants = p.suffix_locants
+ if locants is None and lead:
+ locants = take(p.suffix_count)
+ apply_suffix(f, p.suffix, locants, p.suffix_count)
+ if lead:
+ raise BuildError(f"the locants {','.join(lead)} before {f.label} are not used")
+ default_unsat(f, pending)
+ return f
+
+
+def _words(tree: Tree) -> list[Frag]:
+ out = []
+ for w in tree.words:
+ for _ in range(w.count):
+ g = build_sub(w.sub)
+ if g.order != 1:
+ raise BuildError(f"{_label(w.sub)} cannot stand as a separate word")
+ out.append(g)
+ return out
+
+
+def build(tree: Tree) -> Built:
+ if tree.form == "class":
+ smiles, n = lx.CLASS_WORDS[tree.cls]
+ f = atom_frag(smiles, tree.cls)
+ f.label = tree.cls
+ subs = _words(tree)
+ if len(subs) != n and not (tree.cls == "amine" and 1 <= len(subs) <= 3):
+ raise BuildError(f"\"{tree.cls}\" needs {n} group{'s' if n > 1 else ''} before it, the name gives {len(subs)}")
+ for g in subs:
+ graft(f, 0, g, 1)
+ assumed = list(f.assumed)
+ else:
+ main = tree.main
+ f = build_parent(main.parent)
+ apply_prefixes(f, main.prefixes)
+ if tree.form == "ester":
+ subs = _words(tree)
+ if len(subs) != len(f.ester):
+ raise BuildError(f"the name gives {len(subs)} alkyl group{'s' if len(subs) != 1 else ''} for {len(f.ester)} ester position{'s' if len(f.ester) != 1 else ''}")
+ for at, g in zip(list(f.ester), subs):
+ graft(f, at, g, 1)
+ elif tree.form == "salt":
+ for at in f.ester:
+ atom = f.mol.GetAtomWithIdx(at)
+ atom.SetFormalCharge(-1)
+ atom.SetNoImplicit(True)
+ atom.SetNumExplicitHs(0)
+ f.mol.InsertMol(Chem.MolFromSmiles(lx.CATIONS[tree.cation]))
+ assumed = list(f.assumed)
+ mol = f.mol.GetMol()
+ try:
+ Chem.SanitizeMol(mol)
+ except Exception as exc:
+ raise BuildError(f"the structure it describes is not valid ({str(exc).splitlines()[0]})") from None
+ for k in f.ketones:
+ if mol.GetAtomWithIdx(k).GetTotalNumHs():
+ raise BuildError(f"-one at {f.where(k)} would be an aldehyde; an aldehyde is named with -al")
+ return Built(mol, dict(f.locs), assumed, f.label)
diff --git a/backend/app/services/names/dictionary.py b/backend/app/services/names/dictionary.py
new file mode 100644
index 00000000..71ddf99d
--- /dev/null
+++ b/backend/app/services/names/dictionary.py
@@ -0,0 +1,107 @@
+import json
+import re
+import threading
+from dataclasses import dataclass, field
+from pathlib import Path
+
+from rdkit import Chem
+from rdkit.Chem import inchi
+
+from app.services.names.parser import normalise
+
+DATA_DIR = Path(__file__).resolve().parents[2] / "data" / "names"
+LOOSE = re.compile(r"[\s\-,'()\[\]{}]")
+
+
+@dataclass
+class Entry:
+ name: str
+ smiles: str
+ inchikey: str
+ category: str
+ synonyms: list[str] = field(default_factory=list)
+ systematic: str | None = None
+
+
+@dataclass
+class Index:
+ entries: list[Entry] = field(default_factory=list)
+ by_name: dict[str, Entry] = field(default_factory=dict)
+ by_loose: dict[str, Entry] = field(default_factory=dict)
+ by_key: dict[str, list[Entry]] = field(default_factory=dict)
+ problems: list[str] = field(default_factory=list)
+ files: list[str] = field(default_factory=list)
+
+
+_index: Index | None = None
+_lock = threading.Lock()
+
+
+def loose(text: str) -> str:
+ return LOOSE.sub("", normalise(text))
+
+
+def _key(smiles: str) -> str | None:
+ mol = Chem.MolFromSmiles(smiles)
+ if mol is None:
+ return None
+ return inchi.MolToInchiKey(mol) or None
+
+
+def _load(directory: Path, verify: bool) -> Index:
+ idx = Index()
+ for path in sorted(directory.glob("*.json")):
+ try:
+ data = json.loads(path.read_text(encoding="utf-8"))
+ except (OSError, ValueError) as exc:
+ idx.problems.append(f"{path.name}: {exc}")
+ continue
+ idx.files.append(path.name)
+ category = str(data.get("category") or path.stem)
+ for raw in data.get("entries") or []:
+ name, smiles, key = raw.get("name"), raw.get("smiles"), raw.get("inchikey")
+ if not (isinstance(name, str) and isinstance(smiles, str) and isinstance(key, str)):
+ idx.problems.append(f"{path.name}: an entry lacks name, smiles or inchikey")
+ continue
+ if verify:
+ got = _key(smiles)
+ if got != key:
+ idx.problems.append(f"{path.name}: {name}: stored InChIKey {key}, RDKit gives {got}")
+ continue
+ e = Entry(name, smiles, key, category, [s for s in raw.get("synonyms") or [] if isinstance(s, str)], raw.get("systematic"))
+ idx.entries.append(e)
+ idx.by_key.setdefault(key, []).append(e)
+ for text in [name, *e.synonyms]:
+ n = normalise(text)
+ other = idx.by_name.get(n)
+ if other is not None and other.inchikey != key:
+ idx.problems.append(f"{path.name}: the name {text} is used for {other.name} and {name}")
+ continue
+ idx.by_name.setdefault(n, e)
+ idx.by_loose.setdefault(loose(text), e)
+ return idx
+
+
+def index() -> Index:
+ global _index
+ with _lock:
+ if _index is None:
+ _index = _load(DATA_DIR, False)
+ return _index
+
+
+def verify(directory: Path | None = None) -> Index:
+ return _load(directory or DATA_DIR, True)
+
+
+def lookup(name: str) -> Entry | None:
+ idx = index()
+ return idx.by_name.get(normalise(name)) or idx.by_loose.get(loose(name))
+
+
+def by_inchikey(key: str) -> list[Entry]:
+ return list(index().by_key.get(key, []))
+
+
+def size() -> int:
+ return len(index().entries)
diff --git a/backend/app/services/names/lexicon.py b/backend/app/services/names/lexicon.py
new file mode 100644
index 00000000..eb37c4db
--- /dev/null
+++ b/backend/app/services/names/lexicon.py
@@ -0,0 +1,155 @@
+from dataclasses import dataclass
+
+STEMS = {
+ "meth": 1, "eth": 2, "prop": 3, "but": 4, "pent": 5, "hex": 6, "hept": 7, "oct": 8, "non": 9, "dec": 10,
+ "undec": 11, "dodec": 12, "tridec": 13, "tetradec": 14, "pentadec": 15, "hexadec": 16, "heptadec": 17,
+ "octadec": 18, "nonadec": 19, "icos": 20, "eicos": 20,
+}
+STEM_OF = {n: s for s, n in STEMS.items() if s != "eicos"}
+MAX_CHAIN = 20
+
+MULT = {"di": 2, "tri": 3, "tetra": 4, "penta": 5, "hexa": 6, "hepta": 7, "octa": 8, "nona": 9, "deca": 10}
+MULT_OF = {n: s for s, n in MULT.items()}
+BIS = {"bis": 2, "tris": 3, "tetrakis": 4, "pentakis": 5, "hexakis": 6}
+BIS_OF = {n: s for s, n in BIS.items()}
+
+SHORT_ALKOXY = {"meth": 1, "eth": 2, "prop": 3, "but": 4}
+
+ITALIC = ("tert-", "sec-", "t-", "s-", "n-", "cis-", "trans-")
+
+
+@dataclass(frozen=True)
+class Group:
+ smiles: str
+ order: int = 1
+ prefixable: tuple[int, ...] = ()
+ locants: tuple[tuple[str, int], ...] = ()
+
+ def locant_map(self) -> dict[str, int]:
+ return dict(self.locants)
+
+
+def _ring6(start: int) -> tuple[tuple[str, int], ...]:
+ return tuple((str(n + 1), start + n) for n in range(6))
+
+
+PHENYL_LOCS = _ring6(0)
+
+GROUPS: dict[str, Group] = {
+ "fluoro": Group("F"), "chloro": Group("Cl"), "bromo": Group("Br"), "iodo": Group("I"),
+ "hydroxy": Group("O"), "oxo": Group("O", 2), "thioxo": Group("S", 2),
+ "amino": Group("N", 1, (0,), (("n", 0),)), "imino": Group("N", 2, (0,), (("n", 0),)),
+ "nitro": Group("[N+](=O)[O-]"), "nitroso": Group("N=O"), "cyano": Group("C#N"), "azido": Group("N=[N+]=[N-]"),
+ "formyl": Group("C=O"), "carboxy": Group("C(=O)O"), "carbamoyl": Group("C(N)=O", 1, (1,), (("n", 1),)),
+ "carbonyl": Group("C=O", 1, (0,)), "oxy": Group("O", 1, (0,)), "sulfanyl": Group("S", 1, (0,)), "mercapto": Group("S"),
+ "sulfinyl": Group("S=O", 1, (0,)), "sulfonyl": Group("S(=O)=O", 1, (0,)), "sulfo": Group("S(=O)(=O)O"),
+ "sulfamoyl": Group("S(N)(=O)=O", 1, (1,), (("n", 1),)), "silyl": Group("[SiH3]", 1, (0,)),
+ "methylidene": Group("C", 2, (0,)), "ethylidene": Group("CC", 2),
+ "vinyl": Group("C=C"), "allyl": Group("CC=C"), "propargyl": Group("CC#C"), "isopropenyl": Group("C(C)=C"),
+ "isopropyl": Group("C(C)C"), "isobutyl": Group("CC(C)C"), "sec-butyl": Group("C(C)CC"), "s-butyl": Group("C(C)CC"),
+ "tert-butyl": Group("C(C)(C)C"), "t-butyl": Group("C(C)(C)C"), "isopentyl": Group("CCC(C)C"), "neopentyl": Group("CC(C)(C)C"),
+ "isopropoxy": Group("OC(C)C"), "isobutoxy": Group("OCC(C)C"), "sec-butoxy": Group("OC(C)CC"), "tert-butoxy": Group("OC(C)(C)C"),
+ "t-butoxy": Group("OC(C)(C)C"), "phenoxy": Group("Oc1ccccc1", 1, (), _ring6(1)),
+ "acetyl": Group("C(C)=O"), "propionyl": Group("C(=O)CC"), "butyryl": Group("C(=O)CCC"),
+ "benzoyl": Group("C(=O)c1ccccc1", 1, (), tuple((str(n + 1), 2 + n) for n in range(6))),
+ "acetoxy": Group("OC(C)=O"), "acetyloxy": Group("OC(C)=O"), "acetamido": Group("NC(C)=O"),
+ "phenyl": Group("c1ccccc1", 1, (), PHENYL_LOCS), "benzyl": Group("Cc1ccccc1", 1, (), _ring6(1)),
+ "phenethyl": Group("CCc1ccccc1"), "trityl": Group("C(c1ccccc1)(c1ccccc1)c1ccccc1"),
+ "anilino": Group("Nc1ccccc1", 1, (0,), (("n", 0),) + _ring6(1)), "morpholino": Group("N1CCOCC1"), "piperidino": Group("N1CCCCC1"),
+ "o-tolyl": Group("c1ccccc1C"), "m-tolyl": Group("c1cccc(C)c1"), "p-tolyl": Group("c1ccc(C)cc1"),
+ "tosyl": Group("S(=O)(=O)c1ccc(C)cc1"), "mesyl": Group("S(C)(=O)=O"), "trifyl": Group("S(=O)(=O)C(F)(F)F"),
+ "tert-butoxycarbonyl": Group("C(=O)OC(C)(C)C"), "benzyloxycarbonyl": Group("C(=O)OCc1ccccc1"),
+}
+
+YL_ALIASES = {
+ "pyridyl": "pyridine", "furyl": "furan", "thienyl": "thiophene", "naphthyl": "naphthalene", "pyrrolyl": "pyrrole",
+ "imidazolyl": "imidazole", "indolyl": "indole", "quinolyl": "quinoline", "pyrimidinyl": "pyrimidine",
+ "piperidyl": "piperidine", "piperidinyl": "piperidine", "pyrrolidinyl": "pyrrolidine", "morpholinyl": "morpholine",
+ "piperazinyl": "piperazine", "thiazolyl": "thiazole", "oxazolyl": "oxazole",
+}
+
+
+@dataclass(frozen=True)
+class Suffix:
+ groups: tuple[tuple[str, int], ...]
+ terminal: bool = False
+ not_terminal: bool = False
+ n_atom: tuple[int, int] | None = None
+ ester_atom: tuple[int, int] | None = None
+ rank: int = 0
+
+
+SUFFIXES: dict[str, Suffix] = {
+ "oic acid": Suffix((("O", 2), ("O", 1)), terminal=True, rank=100),
+ "ic acid": Suffix((("O", 2), ("O", 1)), terminal=True, rank=100),
+ "carboxylic acid": Suffix((("C(=O)O", 1),), rank=100),
+ "sulfonic acid": Suffix((("S(=O)(=O)O", 1),), rank=95),
+ "oate": Suffix((("O", 2), ("O", 1)), terminal=True, ester_atom=(1, 0), rank=90),
+ "ate": Suffix((("O", 2), ("O", 1)), terminal=True, ester_atom=(1, 0), rank=90),
+ "carboxylate": Suffix((("C(=O)O", 1),), ester_atom=(0, 2), rank=90),
+ "oyl chloride": Suffix((("O", 2), ("Cl", 1)), terminal=True, rank=85),
+ "oyl bromide": Suffix((("O", 2), ("Br", 1)), terminal=True, rank=85),
+ "oyl fluoride": Suffix((("O", 2), ("F", 1)), terminal=True, rank=85),
+ "carbonyl chloride": Suffix((("C(=O)Cl", 1),), rank=85),
+ "sulfonyl chloride": Suffix((("S(=O)(=O)Cl", 1),), rank=84),
+ "amide": Suffix((("O", 2), ("N", 1)), terminal=True, n_atom=(1, 0), rank=80),
+ "carboxamide": Suffix((("C(N)=O", 1),), n_atom=(0, 1), rank=80),
+ "sulfonamide": Suffix((("S(N)(=O)=O", 1),), n_atom=(0, 1), rank=79),
+ "nitrile": Suffix((("N", 3),), terminal=True, rank=70),
+ "carbonitrile": Suffix((("C#N", 1),), rank=70),
+ "al": Suffix((("O", 2),), terminal=True, rank=60),
+ "carbaldehyde": Suffix((("C=O", 1),), rank=60),
+ "one": Suffix((("O", 2),), not_terminal=True, rank=50),
+ "ol": Suffix((("O", 1),), rank=40),
+ "thiol": Suffix((("S", 1),), rank=35),
+ "amine": Suffix((("N", 1),), n_atom=(0, 0), rank=30),
+ "imine": Suffix((("N", 2),), n_atom=(0, 0), rank=25),
+}
+
+ACID_WORDS = ("oic acid", "ic acid", "carboxylic acid", "sulfonic acid")
+
+
+@dataclass(frozen=True)
+class Retained:
+ base: str
+ suffix: str | None = None
+ prefix: str | None = None
+ size: int = 0
+
+
+RETAINED: dict[str, Retained] = {
+ "phenol": Retained("benzene", "ol"),
+ "aniline": Retained("benzene", "amine"),
+ "toluene": Retained("benzene", prefix="methyl"),
+ "anisole": Retained("benzene", prefix="methoxy"),
+ "benzoic acid": Retained("benzene", "carboxylic acid"),
+ "benzoate": Retained("benzene", "carboxylate"),
+ "benzaldehyde": Retained("benzene", "carbaldehyde"),
+ "benzonitrile": Retained("benzene", "carbonitrile"),
+ "benzamide": Retained("benzene", "carboxamide"),
+ "benzoyl chloride": Retained("benzene", "carbonyl chloride"),
+ "acetic acid": Retained("chain", "oic acid", size=2),
+ "acetate": Retained("chain", "oate", size=2),
+ "acetamide": Retained("chain", "amide", size=2),
+ "acetonitrile": Retained("chain", "nitrile", size=2),
+ "acetaldehyde": Retained("chain", "al", size=2),
+ "acetyl chloride": Retained("chain", "oyl chloride", size=2),
+ "formic acid": Retained("chain", "oic acid", size=1),
+ "formate": Retained("chain", "oate", size=1),
+ "formamide": Retained("chain", "amide", size=1),
+ "formaldehyde": Retained("chain", "al", size=1),
+}
+
+CLASS_WORDS = {
+ "alcohol": ("O", 1), "chloride": ("Cl", 1), "bromide": ("Br", 1), "iodide": ("I", 1), "fluoride": ("F", 1),
+ "cyanide": ("C#N", 1), "ether": ("O", 2), "ketone": ("C=O", 2), "sulfide": ("S", 2), "amine": ("N", 3),
+}
+
+CATIONS = {"lithium": "[Li+]", "sodium": "[Na+]", "potassium": "[K+]", "cesium": "[Cs+]", "caesium": "[Cs+]", "ammonium": "[NH4+]"}
+
+ORTHO_META_PARA = {"o": 2, "ortho": 2, "m": 3, "meta": 3, "p": 4, "para": 4}
+
+ELEMENTS = frozenset({"C", "H", "N", "O", "S", "F", "Cl", "Br", "I"})
+VALENCE = {"C": 4, "N": 3, "O": 2, "S": 2, "F": 1, "Cl": 1, "Br": 1, "I": 1, "Si": 4}
+
+HALO = {"F": "fluoro", "Cl": "chloro", "Br": "bromo", "I": "iodo"}
diff --git a/backend/app/services/names/namer.py b/backend/app/services/names/namer.py
new file mode 100644
index 00000000..845bab10
--- /dev/null
+++ b/backend/app/services/names/namer.py
@@ -0,0 +1,781 @@
+import re
+from dataclasses import dataclass, field
+
+from rdkit import Chem
+from rdkit.Chem import rdCIPLabeler
+
+from app.services.names import lexicon as lx
+from app.services.names import rings
+
+MAX_ATOMS = 80
+RANK = {"acid": 100, "ester": 90, "amide": 80, "nitrile": 70, "aldehyde": 60, "ketone": 50, "alcohol": 40, "thiol": 35, "amine": 30}
+CHAIN_IN = {"acid", "ester", "amide", "nitrile", "aldehyde"}
+SUFFIX_CHAIN = {"acid": "oic acid", "ester": "oate", "amide": "amide", "nitrile": "nitrile", "aldehyde": "al",
+ "ketone": "one", "alcohol": "ol", "thiol": "thiol", "amine": "amine"}
+SUFFIX_RING = {"acid": "carboxylic acid", "ester": "carboxylate", "amide": "carboxamide", "nitrile": "carbonitrile",
+ "aldehyde": "carbaldehyde", "ketone": "one", "alcohol": "ol", "thiol": "thiol", "amine": "amine"}
+BENZENE_RETAINED = {"alcohol": "phenol", "amine": "aniline", "acid": "benzoic acid", "aldehyde": "benzaldehyde",
+ "nitrile": "benzonitrile", "amide": "benzamide", "ester": "benzoate"}
+C1_RETAINED = {"acid": "formic acid", "amide": "formamide", "aldehyde": "formaldehyde", "ester": "formate"}
+C2_RETAINED = {"acid": "acetic acid", "amide": "acetamide", "aldehyde": "acetaldehyde", "ester": "acetate", "nitrile": "acetonitrile"}
+SHORT_OXY = {"methyl": "methoxy", "ethyl": "ethoxy", "propyl": "propoxy", "butyl": "butoxy", "phenyl": "phenoxy", "tert-butyl": "tert-butoxy"}
+VOWELS = "aeiouy"
+SINGLE, DOUBLE, TRIPLE = Chem.BondType.SINGLE, Chem.BondType.DOUBLE, Chem.BondType.TRIPLE
+ORDER = {SINGLE: 1, DOUBLE: 2, TRIPLE: 3}
+
+
+class Unsupported(ValueError):
+ pass
+
+
+def loc_key(loc: str) -> tuple:
+ m = re.fullmatch(r"(\d+)([a-z]*)('*)", loc)
+ if m:
+ return (0, int(m.group(1)), m.group(2), m.group(3))
+ return (1, 0, loc, "")
+
+
+def wrap(text: str) -> str:
+ if "[" in text:
+ return "{" + text + "}"
+ if "(" in text:
+ return "[" + text + "]"
+ return "(" + text + ")"
+
+
+@dataclass(frozen=True)
+class Sub:
+ text: str
+ compound: bool = False
+
+ def key(self) -> str:
+ s = re.sub(r"^[^a-z]+", "", self.text)
+ for italic in ("tert-", "sec-"):
+ if s.startswith(italic):
+ s = s[len(italic):]
+ return re.sub(r"[^a-z]", "", s.lower())
+
+
+@dataclass
+class Group:
+ kind: str
+ c: int
+ atoms: set[int]
+ anchors: list[int]
+ hetero: int | None = None
+
+
+@dataclass
+class Parent:
+ kind: str
+ atoms: list[int]
+ numberings: list[dict[int, str]]
+ rid: str | None = None
+
+
+@dataclass
+class Choice:
+ key: tuple
+ text: str
+ extra: dict = field(default_factory=dict)
+
+
+def assemble(items: list[tuple[str | None, Sub]]) -> str:
+ groups: dict[str, list[str | None]] = {}
+ meta: dict[str, Sub] = {}
+ for loc, sub in items:
+ groups.setdefault(sub.text, []).append(loc)
+ meta[sub.text] = sub
+ parts = []
+ for text in sorted(groups, key=lambda t: (meta[t].key(), t)):
+ locs = groups[text]
+ n = len(locs)
+ sub = meta[text]
+ if sub.compound:
+ if n > 1 and n not in lx.BIS_OF:
+ raise Unsupported("too many identical substituents")
+ body, mult = wrap(text), (lx.BIS_OF[n] if n > 1 else "")
+ else:
+ if n > 1 and n not in lx.MULT_OF:
+ raise Unsupported("too many identical substituents")
+ body, mult = text, (lx.MULT_OF[n] if n > 1 else "")
+ shown = [l for l in locs if l is not None]
+ if shown and len(shown) != n:
+ raise Unsupported("mixed locants")
+ head = ",".join(sorted(shown, key=loc_key)) + "-" if shown else ""
+ parts.append((head, f"{head}{mult}{body}"))
+ out = ""
+ for k, (head, text) in enumerate(parts):
+ if k and (head or parts[k - 1][0]):
+ out += "-"
+ out += text
+ return out
+
+
+class Namer:
+ def __init__(self, mol: Chem.Mol):
+ self.mol = mol
+ self.n = mol.GetNumAtoms()
+ self.ring_atoms = {a.GetIdx() for a in mol.GetAtoms() if a.IsInRing()}
+ self.systems = self._systems()
+ self.system_of = {a: k for k, s in enumerate(self.systems) for a in s}
+ self.matched: dict[int, Parent | None] = {}
+
+ def atom(self, i: int) -> Chem.Atom:
+ return self.mol.GetAtomWithIdx(i)
+
+ def order(self, a: int, b: int) -> int:
+ bond = self.mol.GetBondBetweenAtoms(a, b)
+ if bond is None:
+ raise Unsupported("internal: no bond")
+ if bond.GetIsAromatic():
+ return 1
+ if bond.GetBondType() not in ORDER:
+ raise Unsupported("unusual bond types are not named yet")
+ return ORDER[bond.GetBondType()]
+
+ def nbrs(self, i: int) -> list[int]:
+ return [n.GetIdx() for n in self.atom(i).GetNeighbors()]
+
+ def _systems(self) -> list[set[int]]:
+ out: list[set[int]] = []
+ for r in self.mol.GetRingInfo().AtomRings():
+ s = set(r)
+ hit = [x for x in out if x & s]
+ for x in hit:
+ s |= x
+ out.remove(x)
+ out.append(s)
+ return out
+
+ def ring_parent(self, k: int) -> Parent:
+ if k in self.matched:
+ found = self.matched[k]
+ if found is None:
+ raise Unsupported("a ring system FormChem cannot name yet")
+ return found
+ atoms = self.systems[k]
+ found = self._template(atoms) or self._cyclo(atoms)
+ self.matched[k] = found
+ if found is None:
+ raise Unsupported("a ring system FormChem cannot name yet")
+ return found
+
+ def _template(self, atoms: set[int]) -> Parent | None:
+ inner = sum(1 for b in self.mol.GetBonds() if b.GetBeginAtomIdx() in atoms and b.GetEndAtomIdx() in atoms)
+ for rid in rings.RINGS:
+ t = rings.template(rid)
+ if t.mol.GetNumAtoms() != len(atoms) or t.mol.GetNumBonds() != inner:
+ continue
+ good = []
+ for m in self.mol.GetSubstructMatches(t.mol, uniquify=False, useChirality=False, maxMatches=2000):
+ if set(m) != atoms:
+ continue
+ ok = True
+ for ti, mi in enumerate(m):
+ ta, ma = t.mol.GetAtomWithIdx(ti), self.atom(mi)
+ if ta.GetIsAromatic() != ma.GetIsAromatic() or ta.GetFormalCharge() != ma.GetFormalCharge():
+ ok = False
+ elif ta.GetSymbol() == "N" and ta.GetIsAromatic():
+ if ti in t.indicated_atoms:
+ ok = ok and (ma.GetTotalNumHs() > 0 or ma.GetDegree() == 3)
+ else:
+ ok = ok and ma.GetTotalNumHs() == 0 and ma.GetDegree() == 2
+ if ok:
+ good.append({mi: t.ring.locants[ti] for ti, mi in enumerate(m)})
+ if good:
+ for a in atoms:
+ if self.atom(a).GetIsAromatic():
+ for b in self.atom(a).GetBonds():
+ if b.GetBondType() == DOUBLE and b.GetOtherAtomIdx(a) not in atoms:
+ raise Unsupported("aromatic rings with exocyclic double bonds (such as pyridones) are not named yet")
+ return Parent("ring", sorted(atoms), good, rid)
+ return None
+
+ def _cyclo(self, atoms: set[int]) -> Parent | None:
+ ri = [r for r in self.mol.GetRingInfo().AtomRings() if set(r) == atoms]
+ if len(ri) != 1 or not 3 <= len(atoms) <= lx.MAX_CHAIN:
+ return None
+ if any(self.atom(a).GetSymbol() != "C" or self.atom(a).GetIsAromatic() for a in atoms):
+ return None
+ cyc = list(ri[0])
+ n = len(cyc)
+ nums = []
+ for start in range(n):
+ for step in (1, -1):
+ nums.append({cyc[(start + step * k) % n]: str(k + 1) for k in range(n)})
+ return Parent("cyclo", cyc, nums)
+
+ def groups(self) -> list[Group]:
+ out = []
+ for a in self.mol.GetAtoms():
+ i = a.GetIdx()
+ sym = a.GetSymbol()
+ if sym == "C" and not a.IsInRing():
+ dO = [n.GetIdx() for n in a.GetNeighbors() if n.GetSymbol() == "O" and self.order(i, n.GetIdx()) == 2 and n.GetDegree() == 1]
+ tN = [n.GetIdx() for n in a.GetNeighbors() if n.GetSymbol() == "N" and self.order(i, n.GetIdx()) == 3]
+ carbons = [n.GetIdx() for n in a.GetNeighbors() if n.GetSymbol() == "C"]
+ if tN and a.GetDegree() <= 2:
+ out.append(Group("nitrile", i, {i, tN[0]}, carbons))
+ continue
+ if len(dO) != 1:
+ continue
+ single = [n for n in a.GetNeighbors() if n.GetIdx() != dO[0]]
+ hetero = [n for n in single if n.GetSymbol() != "C"]
+ if len(hetero) == 1 and len(single) <= 2:
+ h = hetero[0]
+ if h.GetSymbol() == "O" and h.GetFormalCharge() == 0 and h.GetDegree() == 1:
+ out.append(Group("acid", i, {i, dO[0], h.GetIdx()}, carbons, h.GetIdx()))
+ elif h.GetSymbol() == "O" and h.GetDegree() == 2 and not h.IsInRing():
+ r = [n.GetIdx() for n in h.GetNeighbors() if n.GetIdx() != i][0]
+ if self.atom(r).GetSymbol() == "C":
+ out.append(Group("ester", i, {i, dO[0], h.GetIdx()}, carbons, h.GetIdx()))
+ elif h.GetSymbol() == "N" and not h.IsInRing() and h.GetFormalCharge() == 0 and all(self.order(h.GetIdx(), x) == 1 for x in self.nbrs(h.GetIdx())):
+ out.append(Group("amide", i, {i, dO[0], h.GetIdx()}, carbons, h.GetIdx()))
+ elif not hetero and len(carbons) <= 1 and a.GetTotalNumHs() >= 1:
+ out.append(Group("aldehyde", i, {i, dO[0]}, carbons))
+ if sym == "C" and len([n for n in a.GetNeighbors() if n.GetSymbol() == "C"]) == 2 and a.GetDegree() == 3:
+ dO = [n.GetIdx() for n in a.GetNeighbors() if n.GetSymbol() == "O" and self.order(i, n.GetIdx()) == 2 and n.GetDegree() == 1]
+ if dO and not a.GetIsAromatic():
+ out.append(Group("ketone", i, {dO[0]}, [i]))
+ if sym in ("O", "S") and a.GetDegree() == 1 and a.GetTotalNumHs() == 1 and a.GetFormalCharge() == 0:
+ c = a.GetNeighbors()[0]
+ if c.GetSymbol() == "C" and self.order(i, c.GetIdx()) == 1 and not any(g.hetero == i for g in out) and not self._carbonyl(c.GetIdx()):
+ out.append(Group("alcohol" if sym == "O" else "thiol", c.GetIdx(), {i}, [c.GetIdx()], i))
+ for a in self.mol.GetAtoms():
+ i = a.GetIdx()
+ if a.GetSymbol() == "N" and not a.IsInRing() and a.GetFormalCharge() == 0 and not a.GetIsAromatic():
+ if any(i in g.atoms for g in out):
+ continue
+ ns = a.GetNeighbors()
+ if all(n.GetSymbol() == "C" and self.order(i, n.GetIdx()) == 1 and not self._carbonyl(n.GetIdx()) for n in ns) and ns:
+ out.append(Group("amine", -1, {i}, [n.GetIdx() for n in ns], i))
+ return out
+
+ def _carbonyl(self, c: int) -> bool:
+ return any(n.GetSymbol() in ("O", "S", "N") and self.order(c, n.GetIdx()) >= 2 for n in self.atom(c).GetNeighbors())
+
+ def sub_name(self, b: int, a: int, order: int, seen: frozenset = frozenset()) -> Sub:
+ atom = self.atom(b)
+ sym = atom.GetSymbol()
+ others = [x for x in self.nbrs(b) if x != a]
+ seen = seen | {a}
+ if atom.GetIsotope() or atom.GetNumRadicalElectrons():
+ raise Unsupported("isotopes and radicals are not named yet")
+ if sym in lx.HALO:
+ if order == 1 and not others:
+ return Sub(lx.HALO[sym])
+ raise Unsupported("hypervalent halogens are not named")
+ if sym == "N" and atom.GetFormalCharge() == 1:
+ ox = [self.atom(x) for x in others]
+ if order == 1 and len(ox) == 2 and sorted((o.GetSymbol(), o.GetFormalCharge(), o.GetDegree()) for o in ox) == [("O", -1, 1), ("O", 0, 1)]:
+ return Sub("nitro")
+ raise Unsupported("charged nitrogen groups other than nitro are not named yet")
+ if atom.GetFormalCharge():
+ raise Unsupported("charged atoms are not named yet")
+ if sym == "O":
+ if order == 2 and self.atom(a).GetSymbol() != "C":
+ raise Unsupported("oxides of sulfur, nitrogen and phosphorus are not named yet")
+ if order == 2 and not others:
+ return Sub("oxo")
+ if order == 1 and not others:
+ return Sub("hydroxy")
+ if order == 1 and len(others) == 1 and self.order(b, others[0]) == 1:
+ inner = self.sub_name(others[0], b, 1, seen)
+ return self._oxy(inner)
+ raise Unsupported("this oxygen group is not named yet")
+ if sym == "S":
+ if order == 2 and not others:
+ return Sub("thioxo")
+ if order == 1 and not others:
+ return Sub("sulfanyl")
+ if order == 1 and len(others) == 1 and self.order(b, others[0]) == 1:
+ inner = self.sub_name(others[0], b, 1, seen)
+ return Sub(f"({inner.text})sulfanyl" if inner.compound else f"{inner.text}sulfanyl", True)
+ raise Unsupported("sulfoxides, sulfones and other sulfur groups are not named yet")
+ if sym == "N":
+ if atom.IsInRing():
+ return self.ring_sub(b, a, order, seen)
+ if order != 1 or any(self.order(b, x) != 1 for x in others):
+ raise Unsupported("imines, azo and similar nitrogen groups are not named yet")
+ subs = [(None, self.sub_name(x, b, 1, seen)) for x in others]
+ if not subs:
+ return Sub("amino")
+ return Sub(assemble(subs) + "amino", True)
+ if sym != "C":
+ raise Unsupported(f"{sym} is not named yet")
+ if atom.IsInRing():
+ return self.ring_sub(b, a, order, seen)
+ return self.carbon_sub(b, a, order, seen)
+
+ def _oxy(self, inner: Sub) -> Sub:
+ if inner.text in SHORT_OXY:
+ return Sub(SHORT_OXY[inner.text])
+ m = re.fullmatch(r"(.+)(meth|eth|prop|but)yl", inner.text)
+ if m and inner.compound:
+ return Sub(f"{m.group(1)}{m.group(2)}oxy", True)
+ if inner.compound and inner.text.endswith("phenyl") and not inner.text.endswith("-phenyl"):
+ return Sub(inner.text[:-6] + "phenoxy", True)
+ return Sub(f"{wrap(inner.text)}oxy" if inner.compound else f"{inner.text}oxy", True)
+
+ def _special_carbon(self, c: int, a: int) -> Sub | None:
+ atom = self.atom(c)
+ others = [x for x in self.nbrs(c) if x != a]
+ dO = [x for x in others if self.atom(x).GetSymbol() == "O" and self.order(c, x) == 2 and self.atom(x).GetDegree() == 1]
+ tN = [x for x in others if self.atom(x).GetSymbol() == "N" and self.order(c, x) == 3]
+ if tN and len(others) == 1:
+ return Sub("cyano")
+ if len(dO) != 1:
+ return None
+ rest = [x for x in others if x != dO[0]]
+ if not rest:
+ return Sub("formyl") if atom.GetTotalNumHs() == 1 else None
+ if len(rest) != 1:
+ return None
+ r = self.atom(rest[0])
+ if r.GetSymbol() == "O" and r.GetDegree() == 1:
+ return Sub("carboxy")
+ if r.GetSymbol() == "N" and r.GetDegree() == 1:
+ return Sub("carbamoyl")
+ if r.GetSymbol() == "O" and r.GetDegree() == 2:
+ inner = self.sub_name(rest[0], c, 1)
+ plain = re.fullmatch(r"[a-z]+", inner.text) is not None
+ return Sub(f"{inner.text}carbonyl" if plain else f"{wrap(inner.text)}carbonyl", True)
+ return None
+
+ def _tree(self, start: int, block: set[int]) -> dict[int, list[int]]:
+ nodes, stack = {start}, [start]
+ while stack:
+ x = stack.pop()
+ for y in self.nbrs(x):
+ if y in nodes or y in block or y in self.ring_atoms or self.atom(y).GetSymbol() != "C":
+ continue
+ if self._terminal_special(y) and self._special_carbon(y, x) is not None:
+ continue
+ nodes.add(y)
+ stack.append(y)
+ return {x: [y for y in self.nbrs(x) if y in nodes] for x in nodes}
+
+ def _terminal_special(self, c: int) -> bool:
+ carbons = [x for x in self.nbrs(c) if self.atom(x).GetSymbol() == "C"]
+ return len(carbons) <= 1
+
+ def _paths_from(self, start: int, adj: dict[int, list[int]]) -> list[list[int]]:
+ out = []
+
+ def walk(path: list[int]) -> None:
+ out.append(list(path))
+ for y in adj.get(path[-1], []):
+ if y not in path:
+ path.append(y)
+ walk(path)
+ path.pop()
+
+ walk([start])
+ return out
+
+ def carbon_sub(self, b: int, a: int, order: int, seen: frozenset) -> Sub:
+ if order == 1:
+ special = self._special_carbon(b, a)
+ if special is not None:
+ return special
+ acyl = order == 1 and any(self.atom(x).GetSymbol() == "O" and self.order(b, x) == 2 for x in self.nbrs(b) if x != a)
+ adj = self._tree(b, set(seen) | {a})
+ best = None
+ for path in self._paths_from(b, adj):
+ mult = [(path[k], path[k + 1], self.order(path[k], path[k + 1])) for k in range(len(path) - 1)]
+ unsat = [(k + 1, o) for k, (_, _, o) in enumerate(mult) if o > 1]
+ items = []
+ inpath = set(path)
+ for k, x in enumerate(path):
+ for y in self.nbrs(x):
+ if y in inpath or y == a or (acyl and x == b and self.atom(y).GetSymbol() == "O" and self.order(x, y) == 2):
+ continue
+ items.append((str(k + 1), self.sub_name(y, x, self.order(x, y), seen | inpath)))
+ key = (-len(path), -len(unsat), -sum(1 for _, o in unsat if o == 2), [u for u, _ in unsat], -len(items),
+ sorted(loc_key(l) for l, _ in items), [loc_key(l) for l, s in sorted(items, key=lambda t: t[1].key())])
+ if best is None or key < best[0]:
+ best = (key, path, unsat, items)
+ _, path, unsat, items = best
+ n = len(path)
+ if n > lx.MAX_CHAIN:
+ raise Unsupported("substituent chains longer than 20 carbons are not named")
+ if n == 1:
+ items = [(None, s) for _, s in items]
+ stem = lx.STEM_OF[n]
+ if acyl:
+ if unsat:
+ raise Unsupported("unsaturated acyl groups are not named yet")
+ if n == 2 and not items:
+ return Sub("acetyl")
+ if n == 1 and [s.text for _, s in items] == ["phenyl"]:
+ return Sub("benzoyl")
+ return Sub(assemble(items) + f"{stem}anoyl", bool(items))
+ if order > 1:
+ if unsat or items:
+ raise Unsupported("substituted ylidene groups are not named yet")
+ return Sub(f"{stem}ylidene" if order == 2 else f"{stem}ylidyne")
+ if not unsat:
+ if [l for l, s in items] == ["1"] and items[0][1].text == "methyl" and n <= 19:
+ return Sub(f"{lx.STEM_OF[n + 1]}an-2-yl", True)
+ if n == 2 and [l for l, s in items] == ["1", "1"] and all(s.text == "methyl" for _, s in items):
+ return Sub("tert-butyl")
+ return Sub(assemble(items) + f"{stem}yl", bool(items))
+ en = [str(k) for k, o in sorted(unsat) if o == 2]
+ yn = [str(k) for k, o in sorted(unsat) if o == 3]
+ text = stem + ("a" if len(en) > 1 or len(yn) > 1 else "")
+ if n == 2:
+ text += ("en" if en else "") + ("yn" if yn else "") + "yl"
+ return Sub(assemble(items) + text, bool(items))
+ if en:
+ text += f"-{','.join(en)}-{lx.MULT_OF.get(len(en), '')}en"
+ if yn:
+ text += f"-{','.join(yn)}-{lx.MULT_OF.get(len(yn), '')}yn"
+ return Sub(assemble(items) + text + "-1-yl", True)
+
+ def ring_sub(self, b: int, a: int, order: int, seen: frozenset) -> Sub:
+ k = self.system_of[b]
+ parent = self.ring_parent(k)
+ if order != 1:
+ raise Unsupported("ring ylidene groups are not named yet")
+ atoms = set(self.systems[k])
+ branches = []
+ for x in atoms:
+ for y in self.nbrs(x):
+ if y in atoms or (x == b and y == a):
+ continue
+ if y == a:
+ raise Unsupported("rings attached twice are not named yet")
+ branches.append((x, self.sub_name(y, x, self.order(x, y), seen | atoms)))
+ best = None
+ for num in parent.numberings:
+ if parent.kind == "cyclo" or parent.rid == "benzene":
+ if num[b] != "1":
+ continue
+ if parent.kind == "cyclo":
+ cyc_unsat = self._ring_unsat(parent, num)
+ else:
+ cyc_unsat = []
+ key = (loc_key(num[b]), [u for u, _ in cyc_unsat], sorted(loc_key(num[x]) for x, _ in branches),
+ [loc_key(num[x]) for x, s in sorted(branches, key=lambda t: t[1].key())])
+ if best is None or key < best[0]:
+ best = (key, num, cyc_unsat)
+ if best is None:
+ raise Unsupported("no numbering found for a ring substituent")
+ _, num, cyc_unsat = best
+ items = [(num[x], s) for x, s in branches]
+ pre = assemble(items)
+ if parent.kind == "cyclo":
+ stem = "cyclo" + lx.STEM_OF[len(parent.atoms)]
+ if not cyc_unsat:
+ return Sub(f"{pre}{stem}yl", bool(items))
+ en = [str(u) for u, o in cyc_unsat if o == 2]
+ yn = [str(u) for u, o in cyc_unsat if o == 3]
+ text = stem + ("a" if len(en) > 1 or len(yn) > 1 else "")
+ if en:
+ text += f"-{','.join(en)}-{lx.MULT_OF.get(len(en), '')}en"
+ if yn:
+ text += f"-{','.join(yn)}-{lx.MULT_OF.get(len(yn), '')}yn"
+ return Sub(f"{pre}{text}-1-yl", True)
+ ring = rings.RINGS[parent.rid]
+ if parent.rid == "benzene":
+ return Sub(f"{pre}phenyl", bool(items))
+ head = f"{ring.indicated}-" if ring.indicated else ""
+ return Sub(f"{pre}{head}{ring.stem}-{num[b]}-yl", True)
+
+ def _ring_unsat(self, parent: Parent, num: dict[int, str]) -> list[tuple[int, int]]:
+ out = []
+ n = len(parent.atoms)
+ inv = {int(v): k for k, v in num.items()}
+ for k in range(1, n + 1):
+ x, y = inv[k], inv[k % n + 1]
+ o = self.order(x, y)
+ if o > 1:
+ out.append((k, o))
+ return out
+
+ def name(self) -> str:
+ groups = self.groups()
+ principal = max((g.kind for g in groups), key=lambda k: RANK[k], default=None)
+ pg = [g for g in groups if g.kind == principal]
+ excluded: set[int] = set()
+ words: list[Sub] = []
+ if principal == "ester":
+ for g in pg:
+ r = [x for x in self.nbrs(g.hetero) if x != g.c][0]
+ side = self._side(r, g.hetero)
+ excluded |= side
+ words.append(self.sub_name(r, g.hetero, 1))
+ if len({w.text for w in words}) != 1:
+ raise Unsupported("esters with different alcohol parts are not named yet")
+ blocked = set(excluded)
+ for g in groups:
+ if g.kind in CHAIN_IN and g.kind != principal:
+ blocked.add(g.c)
+ candidates = self._candidates(pg, principal, blocked)
+ if not candidates:
+ raise Unsupported("no parent chain or ring found")
+ top = max(c[0] for c in candidates)
+ finalists = [c for c in candidates if c[0] == top]
+ best: Choice | None = None
+ for _, parent in finalists:
+ choice = self._best_numbering(parent, pg, principal, excluded)
+ if best is None or choice.key < best.key:
+ best = choice
+ text = best.text
+ if principal == "ester":
+ w = words[0]
+ n = len(words)
+ if n == 1:
+ word = w.text
+ elif w.compound:
+ word = f"{lx.BIS_OF[n]}({w.text})"
+ else:
+ word = f"{lx.MULT_OF[n]}{w.text}"
+ text = f"{word} {text}"
+ return text
+
+ def _side(self, start: int, block: int) -> set[int]:
+ seen, stack = {start}, [start]
+ while stack:
+ x = stack.pop()
+ for y in self.nbrs(x):
+ if y != block and y not in seen:
+ seen.add(y)
+ stack.append(y)
+ if block in seen:
+ raise Unsupported("cyclic esters (lactones) are not named yet")
+ return seen
+
+ def _on(self, g: Group, parent_atoms: set[int], kind: str) -> bool:
+ if g.kind in CHAIN_IN:
+ if kind == "chain":
+ return g.c in parent_atoms
+ return any(x in parent_atoms for x in g.anchors)
+ return any(x in parent_atoms for x in g.anchors)
+
+ def _candidates(self, pg: list[Group], principal: str | None, blocked: set[int]) -> list[tuple[tuple, Parent]]:
+ out = []
+ for k, s in enumerate(self.systems):
+ if s & blocked:
+ continue
+ p = self.ring_parent(k)
+ count = sum(1 for g in pg if self._on(g, s, "ring"))
+ hetero = [self.atom(a).GetSymbol() for a in s if self.atom(a).GetSymbol() != "C"]
+ mult = sum(1 for b in self.mol.GetBonds() if b.GetBeginAtomIdx() in s and b.GetEndAtomIdx() in s and (b.GetIsAromatic() or b.GetBondType() != SINGLE))
+ nrings = sum(1 for r in self.mol.GetRingInfo().AtomRings() if set(r) <= s)
+ out.append(((count, 1, "N" in hetero, len(hetero), nrings, len(s), mult, 0), p))
+ acyclic = [a.GetIdx() for a in self.mol.GetAtoms() if a.GetSymbol() == "C" and not a.IsInRing() and a.GetIdx() not in blocked]
+ cset = set(acyclic)
+ adj = {a: [y for y in self.nbrs(a) if y in cset] for a in acyclic}
+ for s in acyclic:
+ for path in self._paths_between(s, adj):
+ pset = set(path)
+ count = sum(1 for g in pg if self._on(g, pset, "chain"))
+ bonds = [self.order(path[i], path[i + 1]) for i in range(len(path) - 1)]
+ if len(path) > lx.MAX_CHAIN:
+ continue
+ nums = [{x: str(i + 1) for i, x in enumerate(path)}]
+ if len(path) > 1:
+ nums.append({x: str(i + 1) for i, x in enumerate(reversed(path))})
+ key = (count, 0, False, 0, 0, len(path), sum(1 for o in bonds if o > 1), sum(1 for o in bonds if o == 2))
+ out.append((key, Parent("chain", path, nums)))
+ return out
+
+ def _paths_between(self, s: int, adj: dict[int, list[int]]) -> list[list[int]]:
+ out, prev, order = [], {s: None}, [s]
+ for x in order:
+ for y in adj[x]:
+ if y not in prev:
+ prev[y] = x
+ order.append(y)
+ for t in order:
+ if t < s:
+ continue
+ path, x = [], t
+ while x is not None:
+ path.append(x)
+ x = prev[x]
+ out.append(path[::-1])
+ return out
+
+ def _best_numbering(self, parent: Parent, pg: list[Group], principal: str | None, excluded: set[int]) -> Choice:
+ patoms = set(parent.atoms)
+ kind = "chain" if parent.kind == "chain" else "ring"
+ on = [g for g in pg if self._on(g, patoms, kind)]
+ absorbed: set[int] = set(excluded)
+ suffix_at: list[int] = []
+ nsubs: list[tuple[str, Sub]] = []
+ n_groups = 0
+ for g in on:
+ if g.kind in CHAIN_IN and kind == "chain":
+ absorbed |= g.atoms - {g.c}
+ suffix_at.append(g.c)
+ elif g.kind in CHAIN_IN:
+ absorbed |= g.atoms
+ suffix_at.append(next(x for x in g.anchors if x in patoms))
+ elif g.kind == "amine":
+ absorbed |= g.atoms
+ anchor = next(x for x in g.anchors if x in patoms)
+ suffix_at.append(anchor)
+ else:
+ absorbed |= g.atoms
+ suffix_at.append(g.anchors[0])
+ if g.kind in ("amine", "amide") and g.hetero is not None:
+ skip = {g.c} if g.kind == "amide" else {suffix_at[-1]}
+ extra = [x for x in self.nbrs(g.hetero) if x not in skip]
+ if extra:
+ n_groups += 1
+ for x in extra:
+ nsubs.append(("N", self.sub_name(x, g.hetero, 1, frozenset(patoms | absorbed))))
+ if n_groups > 1:
+ raise Unsupported("substituents on more than one amine or amide nitrogen are not named yet")
+ branches = []
+ for x in parent.atoms:
+ for y in self.nbrs(x):
+ if y in patoms or y in absorbed:
+ continue
+ branches.append((x, self.sub_name(y, x, self.order(x, y), frozenset(patoms | absorbed))))
+ labels_a, labels_b = self._stereo()
+ for a, d in labels_a.items():
+ if a not in patoms:
+ raise Unsupported("stereocentres outside the parent chain or ring are not named yet")
+ for (x, y), d in labels_b.items():
+ if x not in patoms or y not in patoms:
+ raise Unsupported("double bond geometry outside the parent chain is not named yet")
+ best: Choice | None = None
+ for num in parent.numberings:
+ if parent.kind == "chain":
+ unsat = [(min(int(num[parent.atoms[i]]), int(num[parent.atoms[i + 1]])), self.order(parent.atoms[i], parent.atoms[i + 1]))
+ for i in range(len(parent.atoms) - 1) if self.order(parent.atoms[i], parent.atoms[i + 1]) > 1]
+ elif parent.kind == "cyclo":
+ unsat = self._ring_unsat(parent, num)
+ else:
+ unsat = []
+ items = [(num[x], s) for x, s in branches]
+ key = (sorted(loc_key(num[x]) for x in suffix_at), sorted(u for u, _ in unsat), sorted(u for u, o in unsat if o == 2),
+ -len(items), sorted(loc_key(l) for l, _ in items), [loc_key(l) for l, s in sorted(items, key=lambda t: t[1].key())])
+ if best is None or key < best.key:
+ best = Choice(key, "", {"num": num, "unsat": unsat, "items": items})
+ num, unsat, items = best.extra["num"], best.extra["unsat"], best.extra["items"]
+ text = self._compose(parent, num, unsat, items, nsubs, suffix_at, principal if on else None)
+ stereo = self._stereo_text(num, labels_a, labels_b)
+ return Choice((best.key[0], best.key[1], best.key[2], best.key[3], best.key[4], best.key[5], text), stereo + text)
+
+ def _stereo(self) -> tuple[dict[int, str], dict[tuple[int, int], str]]:
+ m = Chem.Mol(self.mol)
+ rdCIPLabeler.AssignCIPLabels(m)
+ atoms = {}
+ for a in m.GetAtoms():
+ if a.HasProp("_CIPCode"):
+ code = a.GetProp("_CIPCode")
+ if code not in ("R", "S"):
+ raise Unsupported("pseudo-asymmetric centres are not named yet")
+ atoms[a.GetIdx()] = code
+ bonds = {}
+ for b in m.GetBonds():
+ if b.HasProp("_CIPCode"):
+ code = b.GetProp("_CIPCode")
+ if code not in ("E", "Z"):
+ raise Unsupported("this double bond geometry is not named yet")
+ bonds[(b.GetBeginAtomIdx(), b.GetEndAtomIdx())] = code
+ return atoms, bonds
+
+ def _stereo_text(self, num: dict[int, str], atoms: dict[int, str], bonds: dict[tuple[int, int], str]) -> str:
+ items = [(num[a], d) for a, d in atoms.items()]
+ for (x, y), d in bonds.items():
+ items.append((min(num[x], num[y], key=loc_key), d))
+ if not items:
+ return ""
+ items.sort(key=lambda t: loc_key(t[0]))
+ return "(" + ",".join(f"{l}{d}" for l, d in items) + ")-"
+
+ def _compose(self, parent: Parent, num: dict[int, str], unsat: list[tuple[int, int]], items: list[tuple[str, Sub]],
+ nsubs: list[tuple[str, Sub]], suffix_at: list[int], principal: str | None) -> str:
+ n_suffix = len(suffix_at)
+ suffix_locs = sorted((num[x] for x in suffix_at), key=loc_key)
+ size = len(parent.atoms)
+ retained = None
+ if principal and parent.kind == "ring" and parent.rid == "benzene" and n_suffix == 1 and principal in BENZENE_RETAINED:
+ retained = BENZENE_RETAINED[principal]
+ if principal and parent.kind == "chain" and n_suffix == 1 and not unsat:
+ if size == 1 and principal in C1_RETAINED:
+ retained = C1_RETAINED[principal]
+ elif size == 2 and principal in C2_RETAINED:
+ retained = C2_RETAINED[principal]
+ symmetric = (parent.kind == "ring" and parent.rid == "benzene") or (parent.kind == "cyclo" and not unsat) or (parent.kind == "chain" and size <= 2 and not unsat)
+ omit = size == 1 or (symmetric and len(items) + n_suffix == 1) or retained in ("acetic acid", "acetate")
+ shown = [(None if omit else l, s) for l, s in items] + list(nsubs)
+ prefix = assemble(shown) if shown else ""
+ if retained:
+ core = retained
+ else:
+ core = self._parent_text(parent, num, unsat, principal, n_suffix, suffix_locs, omit)
+ if prefix and core[0].isdigit():
+ return f"{prefix}-{core}"
+ return prefix + core
+
+ def _parent_text(self, parent: Parent, num: dict[int, str], unsat: list[tuple[int, int]], principal: str | None,
+ n_suffix: int, suffix_locs: list[str], omit: bool) -> str:
+ if parent.kind == "ring":
+ ring = rings.RINGS[parent.rid]
+ base = ring.name
+ if not principal:
+ return base
+ word = SUFFIX_RING[principal]
+ else:
+ size = len(parent.atoms)
+ if size > lx.MAX_CHAIN:
+ raise Unsupported("chains longer than 20 carbons are not named")
+ stem = ("cyclo" if parent.kind == "cyclo" else "") + lx.STEM_OF[size]
+ en = [str(u) for u, o in sorted(unsat) if o == 2]
+ yn = [str(u) for u, o in sorted(unsat) if o == 3]
+ base = stem + ("a" if len(en) > 1 or len(yn) > 1 else "")
+ if not unsat:
+ base += "an"
+ else:
+ bare = parent.kind == "chain" and size == 2
+ if en:
+ base += ("" if bare else f"-{','.join(en)}-") + lx.MULT_OF.get(len(en), "") + "en"
+ if yn:
+ base += ("" if bare else f"-{','.join(yn)}-") + lx.MULT_OF.get(len(yn), "") + "yn"
+ base += "e"
+ if not principal:
+ return base
+ word = SUFFIX_RING[principal] if parent.kind == "cyclo" else SUFFIX_CHAIN[principal]
+ mult = lx.MULT_OF.get(n_suffix, "") if n_suffix > 1 else ""
+ if n_suffix > 1 and not mult:
+ raise Unsupported("too many identical groups")
+ terminal = parent.kind == "chain" and principal in CHAIN_IN
+ first = (mult or word)[0]
+ if first in VOWELS and base.endswith("e"):
+ base = base[:-1]
+ if terminal or omit:
+ return f"{base}{mult}{word}"
+ return f"{base}-{','.join(suffix_locs)}-{mult}{word}"
+
+
+def name(mol: Chem.Mol) -> str:
+ if mol is None or mol.GetNumAtoms() == 0:
+ raise Unsupported("there is no structure")
+ mol = Chem.Mol(mol)
+ try:
+ Chem.SanitizeMol(mol)
+ except Exception:
+ raise Unsupported("the structure has valence errors") from None
+ mol = Chem.RemoveHs(mol)
+ if len(Chem.GetMolFrags(mol)) != 1:
+ raise Unsupported("salts and mixtures are not named systematically yet")
+ if mol.GetNumAtoms() > MAX_ATOMS:
+ raise Unsupported(f"structures with more than {MAX_ATOMS} heavy atoms are not named systematically yet")
+ for a in mol.GetAtoms():
+ if a.GetSymbol() not in lx.ELEMENTS:
+ raise Unsupported(f"compounds of {a.GetSymbol()} are not named systematically yet")
+ if a.GetIsotope() or a.GetNumRadicalElectrons():
+ raise Unsupported("isotopes and radicals are not named yet")
+ if a.HasQuery() or a.GetAtomicNum() == 0:
+ raise Unsupported("query atoms and R groups have no name")
+ namer = Namer(mol)
+ if mol.GetNumAtoms() == 1 and mol.GetAtomWithIdx(0).GetSymbol() != "C":
+ raise Unsupported("single heteroatom hydrides are named from the dictionary only")
+ return namer.name()
diff --git a/backend/app/services/names/offline.py b/backend/app/services/names/offline.py
new file mode 100644
index 00000000..a906f543
--- /dev/null
+++ b/backend/app/services/names/offline.py
@@ -0,0 +1,147 @@
+import re
+import threading
+
+from rdkit import Chem
+from rdkit.Chem import inchi
+
+from app.services.names import build as builder
+from app.services.names import dictionary, parser, stereo
+from app.services.names.base import HIGH, MEDIUM, NONE, SYSTEMATIC, TRIVIAL, NameItem, NameResult, StructureResult, note
+
+VERSION = "0.9.0"
+MAX_NAME = 300
+DICTIONARY = "dictionary"
+PARSER = "systematic parser"
+NAMER = "rule-based namer, round-trip checked"
+DL_PREFIX = re.compile(r"^(?:d|l|dl)-[a-z]", re.I)
+
+
+def _cas_inverted(text: str) -> bool:
+ if not re.search(r",\s+\S", text):
+ return False
+ tail = text.rsplit(",", 1)[1].strip().lower()
+ return text.rstrip().endswith("-") or tail.endswith("ester") or tail.endswith("salt") or tail.startswith(("compd", "monohydro", "hydrochloride"))
+
+
+def _bare(tree: parser.Tree) -> int:
+ def count(prefixes: list[parser.Prefix]) -> int:
+ return sum(int(p.sub.bare) + count(p.sub.prefixes) for p in prefixes)
+ return count(tree.main.prefixes if tree.main else []) + sum(count(w.sub.prefixes) + int(w.sub.bare) for w in tree.words)
+
+
+class Stats:
+ def __init__(self) -> None:
+ self.lock = threading.Lock()
+ self.named = 0
+ self.round_trip_ok = 0
+ self.round_trip_failed = 0
+ self.unsupported = 0
+
+ def as_dict(self) -> dict:
+ with self.lock:
+ tried = self.round_trip_ok + self.round_trip_failed
+ return {"named": self.named, "round_trip_ok": self.round_trip_ok, "round_trip_failed": self.round_trip_failed,
+ "unsupported": self.unsupported, "round_trip_rate": round(self.round_trip_ok / tried, 4) if tried else None}
+
+
+class OfflineEngine:
+ id = "formchem"
+ label = "FormChem offline names"
+ version = VERSION
+
+ def __init__(self) -> None:
+ self.stats = Stats()
+
+ def available(self) -> bool:
+ return True
+
+ def _refuse(self, name: str, code: str, text: str, **extra) -> StructureResult:
+ return StructureResult(name, None, NONE, PARSER, self.id, self.version, [], None, note(code, text, **extra))
+
+ def to_structure(self, name: str) -> StructureResult:
+ text = (name or "").strip()
+ if not text:
+ return self._refuse(text, "empty", "Type a chemical name first.")
+ if len(text) > MAX_NAME:
+ return self._refuse(text, "too_long", f"Names longer than {MAX_NAME} characters are not read.")
+ hit = dictionary.lookup(text)
+ if hit is not None:
+ mol = Chem.MolFromSmiles(hit.smiles)
+ return StructureResult(text, Chem.MolToSmiles(mol), HIGH, DICTIONARY, self.id, self.version, [], hit.inchikey)
+ if _cas_inverted(text):
+ return self._refuse(text, "cas_inverted", "Inverted index names (parent first, then a comma and the substituents) are not read; write the name in normal order, such as 1,2-dichlorobenzene.")
+ if DL_PREFIX.match(text):
+ return self._refuse(text, "dl_configuration", "D- and L- are read only for the amino acids and sugars in FormChem's dictionary; give R or S descriptors for other names.", position=0)
+ return self.systematic(text)
+
+ def systematic(self, text: str) -> StructureResult:
+ s, trees, far = parser.parse(text)
+ if not trees:
+ if far >= len(s):
+ return self._refuse(text, "incomplete", "FormChem read the whole name, but it does not make a complete structure name (a parent such as hexane or benzene, or a suffix, may be missing).", position=len(s))
+ return self._refuse(text, "not_understood", f"FormChem could not read the name from character {far + 1} (\"{s[far:far + 18]}\").", position=far)
+ built, errors = [], []
+ for t in trees:
+ try:
+ b = builder.build(t)
+ spec = t.main.stereo if t.main else parser.Stereo()
+ mol, notes = stereo.apply(b.mol, spec, b.locs)
+ if mol is None:
+ raise builder.BuildError("the structure could not be completed")
+ built.append(((len(b.assumed), _bare(t)), inchi.MolToInchiKey(mol), mol, b.assumed, notes, spec))
+ except (builder.BuildError, stereo.StereoError) as exc:
+ errors.append(str(exc))
+ if not built:
+ return self._refuse(text, "not_valid", f"FormChem read the name, but {errors[0]}.")
+ least = min(x[0] for x in built)
+ top = [x for x in built if x[0] == least]
+ keys = {x[1] for x in top}
+ _, key, mol, assumed, notes, spec = top[0]
+ warnings = [note("assumed", a[0].upper() + a[1:] + ".") for a in assumed] + list(notes)
+ if len(keys) > 1:
+ warnings.append(note("ambiguous", "The name can be read in more than one way; FormChem drew the reading with the fewest assumptions."))
+ if not spec.items and not spec.cis_trans and not spec.dropped:
+ atoms, bonds = stereo.potential(mol)
+ if atoms or bonds:
+ warnings.append(note("stereo_unspecified", "The name gives no stereo descriptors, so stereocentres and double bonds are drawn unspecified."))
+ confidence = HIGH if not assumed and len(keys) == 1 else MEDIUM
+ return StructureResult(text, Chem.MolToSmiles(mol), confidence, PARSER, self.id, self.version, warnings, key)
+
+ def round_trip(self, text: str, key: str) -> bool:
+ got = self.systematic(text)
+ return got.inchikey == key and got.confidence == HIGH
+
+ def to_name(self, mol: Chem.Mol) -> NameResult:
+ from app.services.names import namer
+ if mol is None or mol.GetNumAtoms() == 0:
+ return NameResult([], self.id, self.version, reason="There is no structure to name.")
+ key = inchi.MolToInchiKey(mol) or None
+ names: list[NameItem] = []
+ warnings: list[dict] = []
+ for e in dictionary.by_inchikey(key)[:1] if key else []:
+ names.append(NameItem(e.name, TRIVIAL, HIGH, DICTIONARY))
+ reason = None
+ try:
+ text = namer.name(mol)
+ except namer.Unsupported as exc:
+ detail = str(exc).rstrip(".")
+ text, reason = None, f"No systematic name: {detail}."
+ with self.stats.lock:
+ self.stats.unsupported += 1
+ if text is not None:
+ ok = key is not None and self.round_trip(text, key)
+ with self.stats.lock:
+ self.stats.named += 1
+ if ok:
+ self.stats.round_trip_ok += 1
+ else:
+ self.stats.round_trip_failed += 1
+ if ok:
+ if not any(n.text.lower() == text.lower() for n in names):
+ names.append(NameItem(text, SYSTEMATIC, HIGH, NAMER))
+ else:
+ reason = "The systematic name FormChem built did not read back to the same structure, so it is not shown."
+ warnings.append(note("round_trip", reason))
+ if reason and not any(n.kind == SYSTEMATIC for n in names) and not any(w["code"] == "round_trip" for w in warnings):
+ warnings.append(note("no_systematic_name", reason))
+ return NameResult(names, self.id, self.version, warnings, key, None if names else (reason or "FormChem has no name for this structure."))
diff --git a/backend/app/services/names/parser.py b/backend/app/services/names/parser.py
new file mode 100644
index 00000000..442c1658
--- /dev/null
+++ b/backend/app/services/names/parser.py
@@ -0,0 +1,522 @@
+import re
+import unicodedata
+from dataclasses import dataclass, field, replace
+
+from app.services.names import lexicon as lx
+from app.services.names import rings
+
+LOCANT = r"(?:\d+[a-c]?|n|o|s)'{0,2}"
+LOCS_RE = re.compile(rf"({LOCANT}(?:,{LOCANT})*)-")
+INDICATED_RE = re.compile(r"(\d+)h-")
+STEREO_RE = re.compile(r"\(([0-9a-z,' *]+)\)-?")
+DESCRIPTOR_RE = re.compile(r"(\d+[a-c]?)?(r|s|e|z)")
+DASHES = dict.fromkeys(map(ord, "‐‑‒–—―−﹣-"), "-")
+QUOTES = dict.fromkeys(map(ord, "‘’′´`"), "'")
+OPEN, CLOSE = "([{", ")]}"
+NO_CONFIG = ("(+)-", "(-)-", "(+/-)-", "(±)-", "rac-", "(rs)-", "(sr)-", "(r,s)-", "(r/s)-", "dl-")
+CIS_TRANS = ("cis-", "trans-")
+UNSAT_WORDS = (("en", 2), ("yn", 3))
+
+
+class TooHard(Exception):
+ pass
+
+
+def normalise(name: str) -> str:
+ s = unicodedata.normalize("NFKC", name or "").translate(DASHES).translate(QUOTES).strip()
+ s = re.sub(r"\s+", " ", s)
+ s = re.sub(r"\s*-\s*", "-", s)
+ s = re.sub(r"\s*,\s*", ",", s)
+ s = re.sub(r"([(\[{])\s+", r"\1", s)
+ s = re.sub(r"\s+([)\]}])", r"\1", s)
+ return s.lower().rstrip(".;")
+
+
+@dataclass
+class Unsat:
+ locants: list[str] | None
+ count: int
+ order: int
+
+
+@dataclass
+class Sub:
+ kind: str
+ key: str = ""
+ size: int = 0
+ cyclo: bool = False
+ unsat: list[Unsat] = field(default_factory=list)
+ attach: str | None = "1"
+ order: int = 1
+ oxy: bool = False
+ acyl: bool = False
+ indicated: str | None = None
+ prefixes: list["Prefix"] = field(default_factory=list)
+ bare: bool = False
+
+
+@dataclass
+class Prefix:
+ locants: list[str] | None
+ count: int
+ sub: Sub
+ omp: int | None = None
+ at: int = 0
+
+
+@dataclass
+class Parent:
+ kind: str
+ key: str = ""
+ size: int = 0
+ cyclo: bool = False
+ unsat: list[Unsat] = field(default_factory=list)
+ suffix: str | None = None
+ suffix_locants: list[str] | None = None
+ suffix_count: int = 1
+ indicated: str | None = None
+ lead: list[str] | None = None
+
+
+@dataclass
+class Stereo:
+ items: list[tuple[str | None, str]] = field(default_factory=list)
+ cis_trans: str | None = None
+ dropped: str | None = None
+
+
+@dataclass
+class Main:
+ stereo: Stereo
+ prefixes: list[Prefix]
+ parent: Parent
+
+
+@dataclass
+class Word:
+ count: int
+ sub: Sub
+
+
+@dataclass
+class Tree:
+ form: str
+ main: Main | None = None
+ words: list[Word] = field(default_factory=list)
+ cls: str | None = None
+ cation: str | None = None
+
+
+def _sorted_keys(d: dict) -> list[str]:
+ return sorted(d, key=len, reverse=True)
+
+
+GROUP_KEYS = _sorted_keys(lx.GROUPS)
+YL_KEYS = _sorted_keys(lx.YL_ALIASES)
+RETAINED_KEYS = _sorted_keys(lx.RETAINED)
+SUFFIX_KEYS = _sorted_keys(lx.SUFFIXES)
+STEM_KEYS = _sorted_keys(lx.STEMS)
+MULT_KEYS = _sorted_keys(lx.MULT)
+BIS_KEYS = _sorted_keys(lx.BIS)
+CATION_KEYS = _sorted_keys(lx.CATIONS)
+CLASS_KEYS = _sorted_keys(lx.CLASS_WORDS)
+ESTER_SUFFIXES = ("oate", "ate", "carboxylate")
+
+
+class Parser:
+ def __init__(self, text: str, limit: int = 20000, width: int = 200):
+ self.s = text
+ self.n = len(text)
+ self.far = 0
+ self.steps = 0
+ self.limit = limit
+ self.width = width
+ self.memo: dict = {}
+
+ def _tick(self) -> None:
+ self.steps += 1
+ if self.steps > self.limit:
+ raise TooHard
+
+ def _at(self, i: int, word: str) -> int | None:
+ if self.s.startswith(word, i):
+ j = i + len(word)
+ if j > self.far:
+ self.far = j
+ return j
+ return None
+
+ def _locs(self, i: int) -> tuple[list[str], int] | None:
+ m = LOCS_RE.match(self.s, i)
+ if not m:
+ return None
+ if m.end() > self.far:
+ self.far = m.end()
+ return m.group(1).split(","), m.end()
+
+ def _cached(self, key, fn):
+ if key not in self.memo:
+ out = []
+ for item in fn():
+ out.append(item)
+ self._tick()
+ if len(out) >= self.width:
+ break
+ self.memo[key] = out
+ return self.memo[key]
+
+ def stereo(self, i: int):
+ for word in NO_CONFIG:
+ j = self._at(i, word)
+ if j is not None:
+ yield Stereo(dropped=word.rstrip("-")), j
+ return
+ for word in CIS_TRANS:
+ j = self._at(i, word)
+ if j is not None:
+ yield Stereo(cis_trans=word.rstrip("-")), j
+ return
+ m = STEREO_RE.match(self.s, i)
+ if m:
+ items = []
+ for part in m.group(1).replace(" ", "").split(","):
+ d = DESCRIPTOR_RE.fullmatch(part)
+ if not d:
+ items = None
+ break
+ items.append((d.group(1), d.group(2)))
+ if items:
+ self.far = max(self.far, m.end())
+ yield Stereo(items=items), m.end()
+ return
+ yield Stereo(), i
+
+ def unsat(self, i: int):
+ j = self._at(i, "an")
+ if j is not None:
+ yield [], j
+ for first, k in self._unsat_group(i, ("en", "yn")):
+ yield [first], k
+ if first.order == 2:
+ for second, k2 in self._unsat_group(k, ("yn",)):
+ yield [first, second], k2
+
+ def _unsat_group(self, i: int, kinds: tuple[str, ...]):
+ starts = [i] + ([i + 1] if self.s.startswith("a", i) else [])
+ for st in starts:
+ options = [(None, st)]
+ if self.s.startswith("-", st):
+ got = self._locs(st + 1)
+ if got:
+ options.append(got)
+ for locants, k in options:
+ mults = [(1, k)] + [(lx.MULT[m], k + len(m)) for m in MULT_KEYS if self.s.startswith(m, k)]
+ for count, k2 in mults:
+ for word, order in UNSAT_WORDS:
+ if word not in kinds:
+ continue
+ k3 = self._at(k2, word)
+ if k3 is None:
+ continue
+ if locants is not None and len(locants) != count:
+ continue
+ if st != i and count == 1:
+ continue
+ yield Unsat(locants, count, order), k3
+
+ def suffix_part(self, i: int):
+ starts = [i] + ([i + 1] if self.s.startswith("e", i) else [])
+ for st in starts:
+ options = [(None, st)]
+ if self.s.startswith("-", st):
+ got = self._locs(st + 1)
+ if got:
+ options.append(got)
+ for locants, k in options:
+ mults = [(1, k)] + [(lx.MULT[m], k + len(m)) for m in MULT_KEYS if self.s.startswith(m, k)]
+ for count, k2 in mults:
+ for word in SUFFIX_KEYS:
+ if word in ("ic acid", "ate"):
+ continue
+ k3 = self._at(k2, word)
+ if k3 is None:
+ continue
+ if locants is not None and len(locants) != count:
+ continue
+ yield word, locants, count, k3
+
+ def _ring_starts(self, i: int):
+ yield None, i
+ m = INDICATED_RE.match(self.s, i)
+ if m:
+ self.far = max(self.far, m.end())
+ yield m.group(1) + "h", m.end()
+
+ def parent(self, i: int):
+ return self._cached(("parent", i), lambda: self._parent(i))
+
+ def _parent(self, i: int):
+ self._tick()
+ for key in RETAINED_KEYS:
+ j = self._at(i, key)
+ if j is not None:
+ yield Parent("retained", key), j
+ j = self._at(i, "amine")
+ if j is not None:
+ yield Parent("amine", "amine"), j
+ for ind, i2 in self._ring_starts(i):
+ for rid, k in rings.lookup(self.s, i2):
+ self.far = max(self.far, k)
+ base = Parent("ring", rid, indicated=ind)
+ form = self.s[i2:k]
+ if form in rings.names_for(rid):
+ yield base, k
+ if form.endswith("e"):
+ continue
+ for word, locants, count, j in self.suffix_part(k):
+ yield replace(base, suffix=word, suffix_locants=locants, suffix_count=count), j
+ cyclo = self._at(i, "cyclo")
+ for c, st in ((False, i), (True, cyclo)):
+ if st is None:
+ continue
+ for stem in STEM_KEYS:
+ k = self._at(st, stem)
+ if k is None:
+ continue
+ n = lx.STEMS[stem]
+ for uns, k2 in self.unsat(k):
+ base = Parent("chain", stem, size=n, cyclo=c, unsat=uns)
+ if self.s.startswith("e", k2):
+ yield base, k2 + 1
+ for word, locants, count, j in self.suffix_part(k2):
+ yield replace(base, suffix=word, suffix_locants=locants, suffix_count=count), j
+
+ def sub_core(self, i: int):
+ return self._cached(("core", i), lambda: self._sub_core(i))
+
+ def _yl_tail(self, k: int):
+ for word, order in (("ylidene", 2), ("ylidyne", 3), ("yl", 1)):
+ j = self._at(k, word)
+ if j is not None:
+ yield order, False, j
+ if order == 1:
+ j2 = self._at(j, "oxy")
+ if j2 is not None:
+ yield order, True, j2
+ return
+
+ def _located_yl(self, k: int):
+ if self.s.startswith("-", k):
+ got = self._locs(k + 1)
+ if got and len(got[0]) == 1:
+ for order, oxy, j in self._yl_tail(got[1]):
+ yield got[0][0], order, oxy, j
+ for order, oxy, j in self._yl_tail(k):
+ yield None, order, oxy, j
+
+ def _sub_core(self, i: int):
+ self._tick()
+ for key in GROUP_KEYS:
+ j = self._at(i, key)
+ if j is not None:
+ yield Sub("group", key, order=lx.GROUPS[key].order, attach=None), j
+ for key in YL_KEYS:
+ j = self._at(i, key)
+ if j is not None:
+ yield Sub("ring", lx.YL_ALIASES[key], attach=None), j
+ cyclo = self._at(i, "cyclo")
+ for c, st in ((False, i), (True, cyclo)):
+ if st is None:
+ continue
+ for stem in STEM_KEYS:
+ k = self._at(st, stem)
+ if k is None:
+ continue
+ n = lx.STEMS[stem]
+ for order, oxy, j in self._yl_tail(k):
+ yield Sub("chain", stem, size=n, cyclo=c, attach="1", order=order, oxy=oxy), j
+ if not c and stem in lx.SHORT_ALKOXY:
+ j = self._at(k, "oxy")
+ if j is not None:
+ yield Sub("chain", stem, size=n, attach="1", oxy=True), j
+ if not c:
+ for word in ("anoyl", "oyl"):
+ j = self._at(k, word)
+ if j is not None:
+ yield Sub("chain", stem, size=n, attach="1", acyl=True), j
+ for uns, k2 in self.unsat(k):
+ for loc, order, oxy, j in self._located_yl(k2):
+ if not uns and loc is None:
+ continue
+ yield Sub("chain", stem, size=n, cyclo=c, unsat=uns, attach=loc or "1", order=order, oxy=oxy), j
+ for ind, i2 in self._ring_starts(i):
+ for rid, k in rings.lookup(self.s, i2):
+ for loc, order, oxy, j in self._located_yl(k):
+ yield Sub("ring", rid, attach=loc, order=order, oxy=oxy, indicated=ind), j
+
+ def sub(self, i: int, depth: int):
+ return self._cached(("sub", i, depth), lambda: self._sub(i, depth))
+
+ def _sub(self, i: int, depth: int):
+ self._tick()
+ if i < self.n and self.s[i] in OPEN:
+ closer = CLOSE[OPEN.index(self.s[i])]
+ for sub, j in self.sub_full(i + 1, depth + 1):
+ if self.s.startswith(closer, j):
+ self.far = max(self.far, j + 1)
+ yield sub, j + 1
+ for core, k in self.sub_core(j + 1):
+ if core.kind == "group" and lx.GROUPS[core.key].prefixable:
+ yield replace(core, prefixes=[Prefix(None, 1, sub)]), k
+ return
+ yield from self.sub_core(i)
+ if depth < 3:
+ for sub, j in self.sub_full(i, depth + 1):
+ if sub.prefixes:
+ yield replace(sub, bare=True), j
+
+ def sub_full(self, i: int, depth: int):
+ return self._cached(("full", i, depth), lambda: self._sub_full(i, depth))
+
+ def _sub_full(self, i: int, depth: int):
+ self._tick()
+ for items, i1 in self.prefix_items(i, depth):
+ leads = [(None, i1)]
+ got = self._locs(i1)
+ if got and len(got[0]) == 1:
+ leads.append((got[0][0], got[1]))
+ for lead, i2 in leads:
+ for core, j in self.sub_core(i2):
+ if lead is not None:
+ open_ring = core.kind == "ring" and core.attach is None
+ plain_chain = not items and core.kind == "chain" and not core.unsat and core.attach == "1" and not core.oxy and not core.acyl and not core.cyclo
+ if not (open_ring or plain_chain):
+ continue
+ core = replace(core, attach=lead)
+ yield replace(core, prefixes=items), j
+
+ def prefix_items(self, i: int, depth: int):
+ return self._cached(("items", i, depth), lambda: self._prefix_items(i, depth))
+
+ def _prefix_items(self, i: int, depth: int):
+ self._tick()
+ yield [], i
+ for item, j in self.prefix_item(i, depth):
+ for rest, k in self.prefix_items(j, depth):
+ yield [item] + rest, k
+
+ def prefix_item(self, i: int, depth: int):
+ return self._cached(("item", i, depth), lambda: self._prefix_item(i, depth))
+
+ def _prefix_item(self, i: int, depth: int):
+ self._tick()
+ starts: list[tuple[list[str] | None, int | None, int]] = [(None, None, i)]
+ got = self._locs(i)
+ if got:
+ starts.append((got[0], None, got[1]))
+ for word, pos in lx.ORTHO_META_PARA.items():
+ j = self._at(i, word + "-")
+ if j is not None:
+ starts.append((None, pos, j))
+ for locants, omp, i1 in starts:
+ found = []
+ for m in MULT_KEYS:
+ k = self._at(i1, m)
+ if k is None:
+ continue
+ if k < self.n and self.s[k] in OPEN:
+ subs = self.sub(k, depth)
+ else:
+ subs = [(s, j) for s, j in self.sub_core(k)]
+ for sub, j in subs:
+ found.append((Prefix(locants, lx.MULT[m], sub, omp, i), j))
+ for b in BIS_KEYS:
+ k = self._at(i1, b)
+ if k is not None and k < self.n and self.s[k] in OPEN:
+ for sub, j in self.sub(k, depth):
+ found.append((Prefix(locants, lx.BIS[b], sub, omp, i), j))
+ for sub, j in self.sub(i1, depth):
+ found.append((Prefix(locants, 1, sub, omp, i), j))
+ for p, j in found:
+ if p.locants is not None and len(p.locants) != p.count:
+ continue
+ if p.omp is not None and p.count > 2:
+ continue
+ yield p, (j + 1 if self.s.startswith("-", j) and j + 1 < self.n else j)
+
+ def main(self, i: int):
+ return self._cached(("main", i), lambda: self._main(i))
+
+ def _main(self, i: int):
+ self._tick()
+ for st, i1 in self.stereo(i):
+ for items, i2 in self.prefix_items(i1, 0):
+ leads = [(None, i2)]
+ got = self._locs(i2)
+ if got:
+ leads.append(got)
+ for lead, i3 in leads:
+ for parent, j in self.parent(i3):
+ yield Main(st, items, replace(parent, lead=lead) if lead else parent), j
+
+ def words(self, i: int):
+ self._tick()
+ out = []
+ options = [(1, i)] + [(lx.MULT[m], i + len(m)) for m in MULT_KEYS if self.s.startswith(m, i)]
+ for count, k in options:
+ for sub, j in self.sub(k, 0):
+ if self.s.startswith(" ", j):
+ out.append((Word(count, sub), j + 1))
+ return out
+
+ def trees(self, cap: int = 60):
+ found = []
+ try:
+ for main, j in self.main(0):
+ if j == self.n:
+ found.append(Tree("main", main))
+ if len(found) >= cap:
+ return found
+ if " " in self.s:
+ for key in CATION_KEYS:
+ k = self._at(0, key + " ")
+ if k is None:
+ continue
+ for main, j in self.main(k):
+ if j == self.n and _ester_like(main):
+ found.append(Tree("salt", main, cation=key))
+ for w1, k1 in self.words(0):
+ for main, j in self.main(k1):
+ if j == self.n and _ester_like(main):
+ found.append(Tree("ester", main, [w1]))
+ for cls in CLASS_KEYS:
+ if self.s.startswith(cls, k1) and k1 + len(cls) == self.n:
+ self.far = self.n
+ found.append(Tree("class", None, [w1], cls))
+ for w2, k2 in self.words(k1):
+ for cls in CLASS_KEYS:
+ if self.s.startswith(cls, k2) and k2 + len(cls) == self.n:
+ self.far = self.n
+ found.append(Tree("class", None, [w1, w2], cls))
+ for main, j in self.main(k2):
+ if j == self.n and _ester_like(main):
+ found.append(Tree("ester", main, [w1, w2]))
+ if len(found) >= cap:
+ break
+ except TooHard:
+ pass
+ return found
+
+
+def _ester_like(main: Main) -> bool:
+ p = main.parent
+ if p.kind == "retained":
+ return lx.RETAINED[p.key].suffix in ESTER_SUFFIXES
+ return p.suffix in ESTER_SUFFIXES
+
+
+def parse(name: str) -> tuple[str, list[Tree], int]:
+ s = normalise(name)
+ p = Parser(s)
+ trees = p.trees()
+ return s, trees, p.far
diff --git a/backend/app/services/names/rings.py b/backend/app/services/names/rings.py
new file mode 100644
index 00000000..02ddd150
--- /dev/null
+++ b/backend/app/services/names/rings.py
@@ -0,0 +1,125 @@
+from dataclasses import dataclass
+from functools import lru_cache
+
+from rdkit import Chem
+
+
+@dataclass(frozen=True)
+class Ring:
+ id: str
+ smiles: str
+ locants: tuple[str, ...]
+ name: str
+ stem: str
+ indicated: str = ""
+ yl: str = ""
+
+
+def _plain(n: int) -> tuple[str, ...]:
+ return tuple(str(i + 1) for i in range(n))
+
+
+FUSED_10 = ("1", "2", "3", "4", "4a", "5", "6", "7", "8", "8a")
+FUSED_9 = ("1", "2", "3", "3a", "4", "5", "6", "7", "7a")
+
+RINGS: dict[str, Ring] = {r.id: r for r in (
+ Ring("benzene", "c1ccccc1", _plain(6), "benzene", "benzen", yl="phenyl"),
+ Ring("pyridine", "n1ccccc1", _plain(6), "pyridine", "pyridin"),
+ Ring("pyrimidine", "n1cnccc1", _plain(6), "pyrimidine", "pyrimidin"),
+ Ring("pyrazine", "n1ccncc1", _plain(6), "pyrazine", "pyrazin"),
+ Ring("pyridazine", "n1ncccc1", _plain(6), "pyridazine", "pyridazin"),
+ Ring("1,3,5-triazine", "n1cncnc1", _plain(6), "1,3,5-triazine", "1,3,5-triazin"),
+ Ring("furan", "o1cccc1", _plain(5), "furan", "furan"),
+ Ring("thiophene", "s1cccc1", _plain(5), "thiophene", "thiophen"),
+ Ring("pyrrole", "[nH]1cccc1", _plain(5), "1H-pyrrole", "pyrrol", "1H"),
+ Ring("imidazole", "[nH]1cncc1", _plain(5), "1H-imidazole", "imidazol", "1H"),
+ Ring("pyrazole", "[nH]1nccc1", _plain(5), "1H-pyrazole", "pyrazol", "1H"),
+ Ring("oxazole", "o1cncc1", _plain(5), "1,3-oxazole", "1,3-oxazol"),
+ Ring("isoxazole", "o1nccc1", _plain(5), "1,2-oxazole", "1,2-oxazol"),
+ Ring("thiazole", "s1cncc1", _plain(5), "1,3-thiazole", "1,3-thiazol"),
+ Ring("isothiazole", "s1nccc1", _plain(5), "1,2-thiazole", "1,2-thiazol"),
+ Ring("1,2,4-triazole", "[nH]1ncnc1", _plain(5), "1H-1,2,4-triazole", "1,2,4-triazol", "1H"),
+ Ring("tetrazole", "[nH]1nnnc1", _plain(5), "1H-tetrazole", "tetrazol", "1H"),
+ Ring("naphthalene", "c1cccc2ccccc12", FUSED_10, "naphthalene", "naphthalen"),
+ Ring("quinoline", "n1cccc2ccccc12", FUSED_10, "quinoline", "quinolin"),
+ Ring("isoquinoline", "c1nccc2ccccc12", FUSED_10, "isoquinoline", "isoquinolin"),
+ Ring("quinoxaline", "n1ccnc2ccccc12", FUSED_10, "quinoxaline", "quinoxalin"),
+ Ring("quinazoline", "c1ncnc2ccccc12", FUSED_10, "quinazoline", "quinazolin"),
+ Ring("indole", "[nH]1ccc2ccccc12", FUSED_9, "1H-indole", "indol", "1H"),
+ Ring("benzofuran", "o1ccc2ccccc12", FUSED_9, "1-benzofuran", "1-benzofuran"),
+ Ring("benzothiophene", "s1ccc2ccccc12", FUSED_9, "1-benzothiophene", "1-benzothiophen"),
+ Ring("benzimidazole", "[nH]1cnc2ccccc12", FUSED_9, "1H-benzimidazole", "benzimidazol", "1H"),
+ Ring("benzoxazole", "o1cnc2ccccc12", FUSED_9, "1,3-benzoxazole", "1,3-benzoxazol"),
+ Ring("benzothiazole", "s1cnc2ccccc12", FUSED_9, "1,3-benzothiazole", "1,3-benzothiazol"),
+ Ring("indazole", "[nH]1ncc2ccccc12", FUSED_9, "1H-indazole", "indazol", "1H"),
+ Ring("purine", "n1cnc2c(c1)nc[nH]2", ("1", "2", "3", "4", "5", "6", "7", "8", "9"), "9H-purine", "purin", "9H"),
+ Ring("piperidine", "N1CCCCC1", _plain(6), "piperidine", "piperidin"),
+ Ring("piperazine", "N1CCNCC1", _plain(6), "piperazine", "piperazin"),
+ Ring("morpholine", "O1CCNCC1", _plain(6), "morpholine", "morpholin"),
+ Ring("thiomorpholine", "S1CCNCC1", _plain(6), "thiomorpholine", "thiomorpholin"),
+ Ring("pyrrolidine", "N1CCCC1", _plain(5), "pyrrolidine", "pyrrolidin"),
+ Ring("imidazolidine", "N1CNCC1", _plain(5), "imidazolidine", "imidazolidin"),
+ Ring("oxolane", "O1CCCC1", _plain(5), "oxolane", "oxolan"),
+ Ring("thiolane", "S1CCCC1", _plain(5), "thiolane", "thiolan"),
+ Ring("oxane", "O1CCCCC1", _plain(6), "oxane", "oxan"),
+ Ring("1,4-dioxane", "O1CCOCC1", _plain(6), "1,4-dioxane", "1,4-dioxan"),
+ Ring("1,3-dioxane", "O1COCCC1", _plain(6), "1,3-dioxane", "1,3-dioxan"),
+ Ring("1,3-dioxolane", "O1COCC1", _plain(5), "1,3-dioxolane", "1,3-dioxolan"),
+ Ring("oxirane", "O1CC1", _plain(3), "oxirane", "oxiran"),
+ Ring("aziridine", "N1CC1", _plain(3), "aziridine", "aziridin"),
+ Ring("thiirane", "S1CC1", _plain(3), "thiirane", "thiiran"),
+ Ring("oxetane", "O1CCC1", _plain(4), "oxetane", "oxetan"),
+ Ring("azetidine", "N1CCC1", _plain(4), "azetidine", "azetidin"),
+ Ring("azepane", "N1CCCCCC1", _plain(7), "azepane", "azepan"),
+)}
+
+ALIASES: dict[str, str] = {
+ "1,3-oxazole": "oxazole", "1,2-oxazole": "isoxazole", "1,3-thiazole": "thiazole", "1,2-thiazole": "isothiazole",
+ "tetrahydrofuran": "oxolane", "thf": "oxolane", "tetrahydropyran": "oxane", "tetrahydrothiophene": "thiolane",
+ "dioxane": "1,4-dioxane", "p-dioxane": "1,4-dioxane", "1-benzofuran": "benzofuran", "1-benzothiophene": "benzothiophene",
+ "benzo[b]thiophene": "benzothiophene", "benzo[b]furan": "benzofuran", "1,3-benzoxazole": "benzoxazole",
+ "1,3-benzothiazole": "benzothiazole", "s-triazine": "1,3,5-triazine", "ethylene oxide": "oxirane",
+ "pyrrolidin": "pyrrolidine", "hexahydropyridine": "piperidine",
+}
+
+
+def names_for(ring_id: str) -> list[str]:
+ r = RINGS[ring_id]
+ out = {r.id, r.name.lower()}
+ out.update(a for a, target in ALIASES.items() if target == ring_id)
+ return sorted(out, key=len, reverse=True)
+
+
+@dataclass(frozen=True)
+class Template:
+ ring: Ring
+ mol: Chem.Mol
+ kekule: Chem.Mol
+ indicated_atoms: frozenset[int]
+
+
+@lru_cache(maxsize=None)
+def template(ring_id: str) -> Template:
+ r = RINGS[ring_id]
+ mol = Chem.MolFromSmiles(r.smiles)
+ if mol is None or mol.GetNumAtoms() != len(r.locants):
+ raise ValueError(f"ring template {ring_id} does not match its locants")
+ kek = Chem.RWMol(mol)
+ Chem.Kekulize(kek, clearAromaticFlags=True)
+ hs = frozenset(a.GetIdx() for a in mol.GetAtoms() if a.GetSymbol() == "N" and a.GetIsAromatic() and a.GetTotalNumHs() > 0)
+ return Template(r, mol, kek.GetMol(), hs)
+
+
+@lru_cache(maxsize=None)
+def _forms() -> tuple[tuple[str, str], ...]:
+ out = set()
+ for rid in RINGS:
+ for n in names_for(rid):
+ out.add((n, rid))
+ if n.endswith("e"):
+ out.add((n[:-1], rid))
+ return tuple(sorted(out, key=lambda x: -len(x[0])))
+
+
+def lookup(text: str, at: int = 0) -> list[tuple[str, int]]:
+ return [(rid, at + len(form)) for form, rid in _forms() if text.startswith(form, at)]
diff --git a/backend/app/services/names/stereo.py b/backend/app/services/names/stereo.py
new file mode 100644
index 00000000..b53173ae
--- /dev/null
+++ b/backend/app/services/names/stereo.py
@@ -0,0 +1,130 @@
+from rdkit import Chem
+from rdkit.Chem import rdCIPLabeler
+
+from app.services.names.base import note
+from app.services.names.parser import Stereo
+
+CW = Chem.ChiralType.CHI_TETRAHEDRAL_CW
+CCW = Chem.ChiralType.CHI_TETRAHEDRAL_CCW
+
+
+class StereoError(ValueError):
+ pass
+
+
+def potential(mol: Chem.Mol) -> tuple[list[int], list[int]]:
+ found = Chem.FindPotentialStereo(Chem.Mol(mol))
+ atoms = [s.centeredOn for s in found if s.type == Chem.StereoType.Atom_Tetrahedral]
+ bonds = [s.centeredOn for s in found if s.type == Chem.StereoType.Bond_Double]
+ return atoms, bonds
+
+
+def labels(mol: Chem.Mol) -> tuple[dict[int, str], dict[int, str]]:
+ m = Chem.Mol(mol)
+ rdCIPLabeler.AssignCIPLabels(m)
+ atoms = {a.GetIdx(): a.GetProp("_CIPCode") for a in m.GetAtoms() if a.HasProp("_CIPCode")}
+ bonds = {b.GetIdx(): b.GetProp("_CIPCode") for b in m.GetBonds() if b.HasProp("_CIPCode")}
+ return atoms, bonds
+
+
+def _ends(mol: Chem.Mol, bond: Chem.Bond) -> tuple[int, int]:
+ a, b = bond.GetBeginAtom(), bond.GetEndAtom()
+ na = [n.GetIdx() for n in a.GetNeighbors() if n.GetIdx() != b.GetIdx()]
+ nb = [n.GetIdx() for n in b.GetNeighbors() if n.GetIdx() != a.GetIdx()]
+ if not na or not nb:
+ raise StereoError("that double bond cannot be E or Z")
+ return na[0], nb[0]
+
+
+def _where(locs: dict[str, int], idx: int) -> str:
+ for k, v in locs.items():
+ if v == idx:
+ return k
+ return "?"
+
+
+def _bond_at(mol: Chem.Mol, locs: dict[str, int], loc: str, bonds: list[int]) -> int:
+ if loc not in locs:
+ raise StereoError(f"the descriptor locant {loc} is not a position of the parent")
+ a = locs[loc]
+ nxt = locs.get(str(int(loc) + 1)) if loc.isdigit() else None
+ options = [b for b in bonds if a in (mol.GetBondWithIdx(b).GetBeginAtomIdx(), mol.GetBondWithIdx(b).GetEndAtomIdx())]
+ if nxt is not None:
+ exact = [b for b in options if nxt in (mol.GetBondWithIdx(b).GetBeginAtomIdx(), mol.GetBondWithIdx(b).GetEndAtomIdx())]
+ options = exact or options
+ if len(options) != 1:
+ raise StereoError(f"position {loc} does not start a double bond that can be E or Z")
+ return options[0]
+
+
+def apply(mol: Chem.Mol, spec: Stereo, locs: dict[str, int]) -> tuple[Chem.Mol, list[dict]]:
+ notes: list[dict] = []
+ if spec.dropped:
+ notes.append(note("no_configuration", f"{spec.dropped} does not say which configuration is meant, so the structure is drawn without stereo."))
+ if not spec.items and not spec.cis_trans:
+ return mol, notes
+ mol = Chem.Mol(mol)
+ Chem.AssignStereochemistry(mol, cleanIt=True, force=True)
+ atoms, bonds = potential(mol)
+ want_atoms: dict[int, str] = {}
+ want_bonds: dict[int, str] = {}
+ if spec.cis_trans:
+ if len(bonds) != 1:
+ raise StereoError(f"{spec.cis_trans} needs exactly one double bond that can be cis or trans; this structure has {len(bonds)}")
+ bond = mol.GetBondWithIdx(bonds[0])
+ for end in (bond.GetBeginAtom(), bond.GetEndAtom()):
+ heavy = [n for n in end.GetNeighbors() if n.GetIdx() not in (bond.GetBeginAtomIdx(), bond.GetEndAtomIdx())]
+ if len(heavy) != 1:
+ raise StereoError(f"{spec.cis_trans} is unclear for this double bond; give E or Z instead")
+ x, y = _ends(mol, bond)
+ bond.SetStereoAtoms(x, y)
+ bond.SetStereo(Chem.BondStereo.STEREOCIS if spec.cis_trans == "cis" else Chem.BondStereo.STEREOTRANS)
+ for loc, d in spec.items:
+ if d in ("r", "s"):
+ if loc is None:
+ if len(atoms) != 1:
+ raise StereoError(f"({d.upper()}) needs a locant: the structure has {len(atoms)} stereocentres")
+ idx = atoms[0]
+ else:
+ if loc not in locs:
+ raise StereoError(f"the descriptor locant {loc} is not a position of the parent")
+ idx = locs[loc]
+ if idx not in atoms:
+ raise StereoError(f"position {loc} is not a stereocentre, so ({loc}{d.upper()}) cannot apply")
+ want_atoms[idx] = d.upper()
+ mol.GetAtomWithIdx(idx).SetChiralTag(CW)
+ else:
+ if loc is None:
+ if len(bonds) != 1:
+ raise StereoError(f"({d.upper()}) needs a locant: the structure has {len(bonds)} double bonds that can be E or Z")
+ b = bonds[0]
+ else:
+ b = _bond_at(mol, locs, loc, bonds)
+ want_bonds[b] = d.upper()
+ bond = mol.GetBondWithIdx(b)
+ x, y = _ends(mol, bond)
+ bond.SetStereoAtoms(x, y)
+ bond.SetStereo(Chem.BondStereo.STEREOTRANS)
+ for _ in range(4):
+ got_atoms, got_bonds = labels(mol)
+ wrong = False
+ for idx, d in want_atoms.items():
+ if got_atoms.get(idx) != d:
+ a = mol.GetAtomWithIdx(idx)
+ a.SetChiralTag(CCW if a.GetChiralTag() == CW else CW)
+ wrong = True
+ for b, d in want_bonds.items():
+ if got_bonds.get(b) != d:
+ bond = mol.GetBondWithIdx(b)
+ bond.SetStereo(Chem.BondStereo.STEREOCIS if bond.GetStereo() == Chem.BondStereo.STEREOTRANS else Chem.BondStereo.STEREOTRANS)
+ wrong = True
+ if not wrong:
+ break
+ got_atoms, got_bonds = labels(mol)
+ for idx, d in want_atoms.items():
+ if got_atoms.get(idx) != d:
+ raise StereoError(f"position {_where(locs, idx)} cannot be given {d}")
+ for b, d in want_bonds.items():
+ if got_bonds.get(b) != d:
+ raise StereoError(f"that double bond cannot be given {d}")
+ return Chem.MolFromSmiles(Chem.MolToSmiles(mol)), notes
diff --git a/backend/app/services/nmr/__init__.py b/backend/app/services/nmr/__init__.py
new file mode 100644
index 00000000..9a916264
--- /dev/null
+++ b/backend/app/services/nmr/__init__.py
@@ -0,0 +1,15 @@
+from app.services.nmr.base import NUCLEI, Registry, Shift
+
+METHOD = "FormChem increments"
+VERSION = "0.9.0"
+DESCRIPTION = (
+ "Additive increments and environment rules written for FormChem from general chemistry knowledge, with no shift database: "
+ "Grant-Paul style alpha, beta and gamma terms with branching and ring corrections for sp3 carbons; benzene and heteroaromatic "
+ "ring bases with ipso, ortho, meta and para substituent terms; alkene terms by side (and cis or trans for protons); carbonyl, "
+ "nitrile and alkyne classes; exchangeable protons as broad singlets with a range. The values are FormChem's own rounded "
+ "numbers, not a copy of any published table. Typical error: 13C 2 to 5 ppm, 1H 0.1 to 0.4 ppm; every atom carries a "
+ "confidence (high, medium, low) and an uncertainty in ppm from how well its environment is covered."
+)
+REGISTRY = Registry()
+
+__all__ = ["DESCRIPTION", "METHOD", "NUCLEI", "REGISTRY", "Shift", "VERSION"]
diff --git a/backend/app/services/nmr/accuracy.py b/backend/app/services/nmr/accuracy.py
new file mode 100644
index 00000000..317d98cc
--- /dev/null
+++ b/backend/app/services/nmr/accuracy.py
@@ -0,0 +1,118 @@
+import json
+import sys
+
+from rdkit import Chem
+
+from app.services.chem import convert
+from app.services.nmr import METHOD, VERSION, predict
+from app.services.nmr.reference import HOLDOUT, HOLDOUT_NOTE, NOTE, REFERENCE
+
+
+def fragment(smiles: str) -> dict:
+ mol = Chem.MolFromSmiles(smiles)
+ if mol is None:
+ raise ValueError(f"bad SMILES {smiles}")
+ frag = convert.from_mol(mol)
+ rename = {old: f"a{n:03d}" for n, old in enumerate(frag["atoms"])}
+ frag["atoms"] = {rename[k]: {**a, "id": rename[k]} for k, a in frag["atoms"].items()}
+ frag["bonds"] = {k: {**b, "a": rename[b["a"]], "b": rename[b["b"]]} for k, b in frag["bonds"].items()}
+ frag["id"] = "fref"
+ return frag
+
+
+def _signal(result: dict, sid: str) -> dict:
+ return next(s for s in result["signals"] if s["id"] == sid)
+
+
+def _rows(entry: dict, nucleus: str, result: dict, key: str) -> list[dict]:
+ rows = []
+ for idx, expected in (entry.get(key) or {}).items():
+ aid = f"a{idx:03d}"
+ found = result["atoms"].get(aid)
+ if found is None:
+ rows.append({"molecule": entry["name"], "nucleus": nucleus, "atom": idx, "expected": expected, "predicted": None,
+ "error": None, "class": "missing", "confidence": "low"})
+ continue
+ sigs = [_signal(result, s) for s in found["signals"]]
+ if isinstance(expected, list):
+ pairs = zip(sorted(expected), sorted(found["shifts"]) if len(found["shifts"]) == len(expected) else [found["shift"]] * len(expected))
+ else:
+ pairs = [(expected, found["shift"])]
+ for exp, got in pairs:
+ rows.append({"molecule": entry["name"], "nucleus": nucleus, "atom": idx, "expected": exp, "predicted": got,
+ "error": round(got - exp, 2), "class": "exchangeable" if key == "x" else sigs[0]["class"],
+ "confidence": found["confidence"]})
+ return rows
+
+
+SETS = {"calibration": (REFERENCE, NOTE), "holdout": (HOLDOUT, HOLDOUT_NOTE)}
+
+
+def evaluate(name: str = "calibration") -> dict:
+ entries, note = SETS[name]
+ rows: list[dict] = []
+ for entry in entries:
+ frag = fragment(entry["smiles"])
+ for nucleus, keys in (("13C", ("c",)), ("1H", ("h", "x"))):
+ result = predict.predict(frag, nucleus)
+ for key in keys:
+ rows.extend(_rows(entry, nucleus, result, key))
+
+ def mae(selected: list[dict]) -> dict:
+ errs = [abs(r["error"]) for r in selected if r["error"] is not None]
+ return {"n": len(errs), "mae": round(sum(errs) / len(errs), 3) if errs else None, "max": round(max(errs), 2) if errs else None}
+
+ summary: dict = {"set": name, "method": METHOD, "version": VERSION, "note": note, "molecules": len(entries)}
+ for nucleus in ("1H", "13C"):
+ mine = [r for r in rows if r["nucleus"] == nucleus and r["class"] != "exchangeable"]
+ summary[nucleus] = {
+ "overall": mae(mine),
+ "classes": {c: mae([r for r in mine if r["class"] == c]) for c in sorted({r["class"] for r in mine})},
+ "confidence": {c: mae([r for r in mine if r["confidence"] == c]) for c in ("high", "medium", "low")},
+ "molecules": {e["name"]: mae([r for r in mine if r["molecule"] == e["name"]]) for e in entries},
+ "worst": sorted((r for r in mine if r["error"] is not None), key=lambda r: -abs(r["error"]))[:10],
+ }
+ summary["exchangeable"] = mae([r for r in rows if r["class"] == "exchangeable"])
+ summary["rows"] = rows
+ return summary
+
+
+def report(summary: dict) -> str:
+ out = [f"{summary['method']} {summary['version']}, {summary['set']} set of {summary['molecules']} molecules", ""]
+ for nucleus in ("1H", "13C"):
+ part = summary[nucleus]
+ out.append(f"{nucleus}: MAE {part['overall']['mae']} ppm over {part['overall']['n']} shifts (max {part['overall']['max']})")
+ out.append("| Class | n | MAE | max |")
+ out.append("| --- | --- | --- | --- |")
+ for name, m in part["classes"].items():
+ out.append(f"| {name} | {m['n']} | {m['mae']} | {m['max']} |")
+ out.append("")
+ out.append("| Confidence | n | MAE |")
+ out.append("| --- | --- | --- |")
+ for name, m in part["confidence"].items():
+ out.append(f"| {name} | {m['n']} | {m['mae']} |")
+ out.append("")
+ out.append("Largest errors: " + "; ".join(f"{r['molecule']} {r['atom']} {r['expected']} vs {r['predicted']}" for r in part["worst"]))
+ out.append("")
+ ex = summary["exchangeable"]
+ out.append(f"Exchangeable 1H (reported apart): MAE {ex['mae']} ppm over {ex['n']}")
+ return "\n".join(out)
+
+
+def main(argv: list[str]) -> int:
+ names = [n for n in SETS if f"--{n}" in argv] or list(SETS)
+ for name in names:
+ summary = evaluate(name)
+ if "--json" in argv:
+ print(json.dumps({k: v for k, v in summary.items() if k != "rows" or "--rows" in argv}, indent=1))
+ continue
+ print(report(summary))
+ if "--molecules" in argv:
+ for nucleus in ("1H", "13C"):
+ print(nucleus, ", ".join(f"{k} {v['mae']}" for k, v in summary[nucleus]["molecules"].items()))
+ print()
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main(sys.argv[1:]))
diff --git a/backend/app/services/nmr/base.py b/backend/app/services/nmr/base.py
new file mode 100644
index 00000000..e10403bc
--- /dev/null
+++ b/backend/app/services/nmr/base.py
@@ -0,0 +1,60 @@
+from dataclasses import dataclass, field
+from typing import Protocol
+
+NUCLEI = ("1H", "13C")
+CONFIDENCE = ("high", "medium", "low")
+
+
+@dataclass
+class Shift:
+ value: float
+ uncertainty: float
+ confidence: str
+ rule: str
+ cls: str
+ terms: list[tuple[str, float]] = field(default_factory=list)
+ exchangeable: bool = False
+ range: tuple[float, float] | None = None
+ source: str = ""
+ side: int = 0
+
+ def add(self, name: str, amount: float) -> None:
+ self.terms.append((name, round(amount, 2)))
+ self.value += amount
+
+ def worst(self, confidence: str) -> None:
+ if CONFIDENCE.index(confidence) > CONFIDENCE.index(self.confidence):
+ self.confidence = confidence
+
+
+class Predictor(Protocol):
+ name: str
+ version: str
+ nuclei: tuple[str, ...]
+
+ def predict(self, env, nucleus: str) -> dict[int, Shift]:
+ ...
+
+
+@dataclass
+class Registry:
+ items: list = field(default_factory=list)
+
+ def register(self, predictor, first: bool = True) -> None:
+ self.items = [p for p in self.items if not (p.name == predictor.name and set(p.nuclei) & set(predictor.nuclei))]
+ if first:
+ self.items.insert(0, predictor)
+ else:
+ self.items.append(predictor)
+
+ def unregister(self, name: str, nucleus: str | None = None) -> None:
+ self.items = [p for p in self.items if not (p.name == name and (nucleus is None or nucleus in p.nuclei))]
+
+ def chain(self, nucleus: str, only: str | None = None) -> list:
+ found = [p for p in self.items if nucleus in p.nuclei]
+ if only:
+ found = [p for p in found if p.name == only]
+ return found
+
+ def listing(self) -> list[dict]:
+ return [{"name": p.name, "version": p.version, "nuclei": list(p.nuclei), "description": getattr(p, "description", "")} for p in self.items]
diff --git a/backend/app/services/nmr/carbon.py b/backend/app/services/nmr/carbon.py
new file mode 100644
index 00000000..906c0362
--- /dev/null
+++ b/backend/app/services/nmr/carbon.py
@@ -0,0 +1,569 @@
+from collections import deque
+
+from app.services.nmr.base import Shift
+from app.services.nmr.environment import Environment, ring_distance, ring_heteroatom
+from app.services.nmr.groups import HALOGENS, classify, is_acyl
+
+UNCERTAINTY = {"high": 2.0, "medium": 4.0, "low": 8.0}
+LOW_KEYS = {"R", "metal", "B", "P", "Si", "Se", "Sn", "Ge", "NX", "N=", "O-", "O+", "CS", "C=N", "COX", "COO-", "D"}
+
+ALKYL = (9.1, 9.4, -2.5, 0.3)
+BRANCH = {(1, 3): -1.0, (1, 4): -3.5, (2, 3): -2.5, (2, 4): -7.0, (3, 2): -3.5, (3, 3): -9.5, (3, 4): -15.0,
+ (4, 1): -1.5, (4, 2): -8.5, (4, 3): -15.0, (4, 4): -25.0}
+RING_SP3 = {3: -19.0, 4: -3.0, 5: -7.0, 6: -5.0, 7: -1.5}
+SIMPLE = {
+ "O": ((52.5, 50.5, 47.5, 48.5), 10.5, -5.5),
+ "N": ((31.0, 31.0, 27.0, 26.5), 11.0, -4.5),
+ "NCO": ((28.0, 27.5, 26.0, 26.0), 7.0, -3.5),
+ "N+": ((28.0, 28.0, 28.0, 28.0), 8.0, -5.0),
+ "S": ((11.0, 13.0, 17.0, 22.0), 11.0, -3.0),
+}
+TO_SIMPLE = {"OH": "O", "OR": "O", "OAr": "O", "OVinyl": "O", "NH2": "N", "NHR": "N", "NR2": "N", "NAr": "N",
+ "NCO": "NCO", "N+": "N+", "SH": "S", "SR": "S"}
+SP3_GROUPS = {
+ "F": ((76.0, 72.0, 70.0, 68.0), 8.0, -6.5),
+ "Cl": ((28.0, 33.0, 37.0, 42.0), 12.0, -4.5),
+ "Br": ((12.0, 21.0, 29.0, 40.0), 12.5, -3.5),
+ "I": ((-18.0, -8.0, 5.0, 22.0), 13.0, -1.5),
+ "OCOR": ((54.0, 53.0, 52.0, 58.0), 7.0, -3.5),
+ "O-": ((55.0, 52.0, 50.0, 50.0), 10.0, -4.0),
+ "O+": ((60.0, 58.0, 56.0, 56.0), 6.0, -4.0),
+ "Narom": ((32.0, 40.0, 50.0, 55.0), 9.0, -3.0),
+ "NO2": ((65.0, 64.0, 63.0, 63.0), 5.0, -4.5),
+ "N=": ((45.0, 48.0, 52.0, 55.0), 7.0, -4.0),
+ "NX": ((38.0, 40.0, 40.0, 40.0), 6.0, -4.0),
+ "SO": ((43.0, 47.0, 51.0, 55.0), 6.5, -3.0),
+ "SO2": ((44.0, 50.0, 54.0, 58.0), 6.5, -3.0),
+ "Sarom": ((15.0, 18.0, 22.0, 26.0), 8.0, -3.0),
+ "Ar": ((23.5, 22.0, 18.5, 14.5), 8.8, -2.2),
+ "vinyl": ((21.0, 20.0, 17.0, 14.0), 6.5, -2.0),
+ "alkyne": ((5.0, 5.5, 5.0, 4.0), 5.5, -3.5),
+ "CN": ((4.2, 4.0, 4.0, 4.0), 3.0, -3.0),
+ "COR": ((33.0, 29.5, 24.0, 21.0), 1.0, -2.5),
+ "CHO": ((33.5, 30.5, 25.5, 22.0), 0.0, -2.5),
+ "COOH": ((23.0, 20.8, 18.0, 18.0), 2.3, -2.5),
+ "COO-": ((26.0, 24.0, 22.0, 20.0), 3.0, -2.5),
+ "COOR": ((22.5, 20.0, 18.0, 17.0), 2.5, -2.5),
+ "CONR": ((24.5, 22.0, 19.5, 17.0), 2.5, -2.5),
+ "COX": ((36.0, 33.0, 30.0, 28.0), 0.0, -2.5),
+ "CS": ((36.0, 33.0, 30.0, 28.0), 1.0, -2.0),
+ "C=N": ((17.0, 16.0, 13.0, 10.0), 3.0, -2.0),
+ "CF3": ((16.0, 15.0, 13.0, 11.0), 1.0, -2.0),
+ "CX3": ((36.0, 33.0, 30.0, 28.0), 4.0, -2.0),
+ "Si": ((2.3, 3.0, 5.0, 8.0), 2.5, -2.0),
+ "P": ((10.0, 15.0, 20.0, 25.0), 3.0, -2.0),
+ "B": ((0.0, 5.0, 10.0, 15.0), 2.0, -2.0),
+ "R": ((9.0, 9.0, 9.0, 9.0), 9.0, -2.5),
+ "metal": ((0.0, 0.0, 0.0, 0.0), 0.0, 0.0),
+ "D": ((0.0, 0.0, 0.0, 0.0), 0.0, 0.0),
+}
+DAMP = {"F": 0.7, "Cl": 0.7, "Br": 0.7, "I": 0.7}
+BENZYLIC = {"acyl": (-10.5, 0.5, 0.0, 1.5), "O": (-3.5, -1.0, 0.0, 1.5), "N": (-3.5, -1.0, 0.0, 1.5), "S": (-4.0, 0.0, 0.0, 1.0),
+ "halogen": (-7.0, 0.5, 0.0, 2.5), "aryl": (-1.0, 0.5, 0.0, 0.0)}
+RING_ACYL = {"COR", "CHO", "COOR", "CONR", "COOH"}
+
+AROMATIC = {
+ "CH3": (9.5, 0.5, 0.0, -3.0), "CH2R": (15.5, -0.5, 0.0, -2.5), "CHR2": (20.0, -2.0, 0.0, -2.5), "CR3": (22.5, -3.5, -0.5, -3.0),
+ "CH2X": (12.0, -1.0, 0.0, -1.0), "CF3": (2.5, -3.0, 0.5, 3.5), "CX3": (16.0, -2.0, 0.0, 2.0),
+ "Ar": (13.0, -1.0, 0.5, -1.0), "vinyl": (9.0, -2.0, 0.0, -1.0), "alkyne": (-6.0, 3.5, -0.5, 0.0), "CN": (-16.0, 3.5, 0.5, 4.5),
+ "CHO": (8.0, 1.0, 0.5, 6.0), "COR": (9.0, 0.0, 0.0, 4.5), "COOH": (1.5, 1.5, 0.0, 5.0), "COOR": (2.0, 1.0, 0.0, 4.5),
+ "CONR": (5.0, -1.0, 0.0, 3.0), "COX": (5.0, 3.0, 1.0, 7.0), "COO-": (8.0, 1.0, 0.0, 3.0), "CS": (10.0, 0.0, 0.0, 4.0),
+ "C=N": (7.0, -1.5, 0.0, 2.0),
+ "OH": (27.0, -13.0, 1.5, -7.5), "OR": (31.5, -14.5, 1.0, -7.5), "OAr": (28.5, -9.5, 1.5, -5.0), "OCOR": (22.5, -7.0, 0.5, -3.0),
+ "OVinyl": (29.0, -11.0, 1.0, -5.0), "O-": (40.0, -8.0, 1.5, -12.0), "O+": (20.0, -5.0, 1.0, 0.0),
+ "NH2": (18.0, -13.5, 1.0, -10.0), "NHR": (21.0, -16.0, 1.0, -11.5), "NR2": (22.0, -16.0, 0.5, -12.0), "NAr": (14.5, -11.0, 1.0, -7.5),
+ "NCO": (10.0, -8.0, 0.5, -4.0), "Narom": (12.0, -8.0, 1.0, -3.0), "NO2": (20.0, -5.0, 1.0, 6.0), "N+": (20.0, -5.0, 1.5, 2.0),
+ "N=": (23.0, -6.0, 0.5, 2.0), "NX": (20.0, -12.0, 1.0, -8.0),
+ "F": (35.0, -13.0, 1.5, -4.5), "Cl": (6.0, 0.0, 1.5, -2.0), "Br": (-6.0, 3.5, 1.5, -1.5), "I": (-34.0, 9.0, 1.5, -1.0),
+ "SH": (2.0, 1.0, 0.5, -3.0), "SR": (10.0, -2.0, 0.5, -3.5), "SO": (17.0, -4.5, 1.0, 2.5), "SO2": (13.5, -1.5, 0.5, 4.5),
+ "Sarom": (8.0, 0.0, 0.5, -2.0),
+ "Si": (10.0, 5.0, -0.5, 0.5), "P": (8.0, 5.0, 0.0, 0.0), "B": (5.0, 6.0, -0.5, 3.0), "R": (10.0, 0.0, 0.0, -2.0),
+ "D": (0.0, 0.0, 0.0, 0.0), "metal": (10.0, 0.0, 0.0, 0.0), "fused": (5.0, -1.5, 0.0, -1.5), "oxo": (0.0, -8.0, 0.0, -1.0),
+}
+SIX_RING_HETERO = {"N": (21.5, -4.5, 7.5), "N+": (13.0, 0.0, 17.0), "NH": (10.0, -10.0, 5.0), "O+": (40.0, 0.0, 30.0),
+ "O": (30.0, -10.0, 5.0), "S": (20.0, -5.0, 5.0), "X": (5.0, 0.0, 0.0)}
+FIVE_RING_HETERO = {"NH": (18.0, 8.0), "N": (20.0, 2.0), "N+": (18.0, 8.0), "O": (43.0, 10.0), "S": (25.5, 27.0), "O+": (43.0, 10.0), "X": (20.0, 10.0)}
+
+ALKENE = {
+ "Ar": (12.5, -11.0), "vinyl": (13.5, -7.0), "alkyne": (-6.0, 5.0), "CN": (-15.5, 14.5), "CHO": (13.0, 13.0),
+ "COR": (14.0, 5.0), "COOH": (5.0, 9.5), "COOR": (6.0, 7.0), "CONR": (7.0, 4.5), "COX": (9.0, 13.0), "COO-": (9.0, 0.0),
+ "C=N": (12.0, -4.0), "CS": (12.0, 5.0),
+ "OH": (24.0, -35.0), "OR": (29.0, -38.0), "OAr": (23.0, -33.0), "OCOR": (18.0, -27.0), "OVinyl": (24.0, -30.0), "O-": (30.0, -40.0), "O+": (20.0, -10.0),
+ "NH2": (28.0, -32.0), "NHR": (28.0, -32.0), "NR2": (28.0, -32.0), "NAr": (22.0, -25.0), "NCO": (6.0, -28.0), "Narom": (6.0, -22.0),
+ "NO2": (22.0, -1.0), "N+": (20.0, -5.0), "N=": (15.0, -15.0), "NX": (15.0, -15.0),
+ "F": (24.5, -34.0), "Cl": (3.0, -6.0), "Br": (-8.0, -1.0), "I": (-38.0, 7.0),
+ "SH": (8.0, -9.0), "SR": (12.0, -13.0), "SO": (14.0, 0.0), "SO2": (14.0, 7.0), "Sarom": (10.0, -10.0),
+ "Si": (16.0, 7.5), "P": (10.0, 5.0), "B": (12.0, 10.0), "R": (10.0, -7.0), "D": (0.0, 0.0), "metal": (20.0, -10.0),
+ "CF3": (4.0, 3.0), "CX3": (12.0, -5.0),
+}
+ALKENE_CHAIN = (10.5, 7.0, -1.5)
+ALKENE_OTHER = (-8.0, -2.0, 1.5)
+RING_ALKENE = {5: -2.0, 6: -3.5}
+
+
+def _degree(env: Environment, i: int) -> int:
+ return max(1, min(4, len(env.heavy(i))))
+
+
+def _confidence(s: Shift, keys) -> None:
+ if any(k in LOW_KEYS for k in keys):
+ s.worst("low")
+
+
+def _kind(env: Environment, n: int, prev: int) -> str:
+ if env.sp3_carbon(n):
+ fluorines = sum(1 for m in env.heavy(n) if m != prev and env.element(m) == "F")
+ if fluorines >= 2:
+ return "CF3"
+ if sum(1 for m in env.heavy(n) if m != prev and env.element(m) in HALOGENS) >= 3:
+ return "CX3"
+ return "C"
+ key = classify(env, n, prev)
+ return TO_SIMPLE.get(key, key)
+
+
+def _fluorinated(env: Environment, i: int) -> Shift | None:
+ fluorines = sum(1 for n in env.heavy(i) if env.element(n) == "F")
+ if fluorines < 2:
+ return None
+ if fluorines >= 3:
+ return Shift(125.0 - (1.0 if any(env.aromatic(n) for n in env.heavy(i)) else 0.0), 3.0, "medium", "CF3 carbon", "sp3")
+ return Shift(116.0, 6.0, "low", "CHF2 or CF2 carbon", "sp3")
+
+
+def _across_carbonyl(env: Environment, i: int, head: int, dist: dict, s: Shift) -> None:
+ for m in env.heavy(head):
+ if m == i or env.element(m) != "C" or m in dist or env.same_ring(i, m):
+ continue
+ if env.aromatic(m):
+ s.add("aryl across the carbonyl", -4.0)
+ elif env.sp3_carbon(m):
+ far = [x for x in env.heavy(m) if x != head and env.element(x) == "C" and x not in dist]
+ if far:
+ s.add("gamma carbons across the carbonyl", -2.0 * len(far))
+
+
+def _sp3(env: Environment, i: int) -> Shift:
+ special = _fluorinated(env, i)
+ if special:
+ return special
+ s = Shift(-2.3, 0.0, "high", "sp3 carbon: alkyl alpha, beta, gamma terms with substituent, branching and ring corrections", "sp3")
+ s.terms.append(("base (methane)", -2.3))
+ deg = _degree(env, i)
+ dist = {i: 0}
+ hetero_path = {i: False}
+ queue = deque([i])
+ alphas: list[tuple[str, float]] = []
+ keys: list[str] = []
+ while queue:
+ cur = queue.popleft()
+ d = dist[cur]
+ if d >= 4:
+ continue
+ for n in env.heavy(cur):
+ if n in dist:
+ continue
+ dist[n] = d + 1
+ pos = d + 1
+ via = hetero_path[cur] or (cur != i and env.element(cur) != "C")
+ hetero_path[n] = via
+ key = _kind(env, n, cur)
+ keys.append(key)
+ if key == "C":
+ s.add(f"alkyl carbon {('alpha', 'beta', 'gamma', 'delta')[pos - 1]}", ALKYL[pos - 1])
+ if pos == 1:
+ s.add("branching", BRANCH.get((deg, _degree(env, n)), 0.0))
+ queue.append(n)
+ continue
+ table = SIMPLE.get(key) or SP3_GROUPS.get(key) or SP3_GROUPS["R"]
+ simple = key in SIMPLE
+ if pos == 1:
+ alphas.append((key if not simple else env.element(n), table[0][deg - 1], env.element(n)))
+ if simple:
+ s.add("branching", BRANCH.get((deg, _degree(env, n)), 0.0))
+ if key in ("COR", "CHO"):
+ _across_carbonyl(env, i, n, dist, s)
+ elif pos == 2 and key in RING_ACYL and env.same_ring(i, n):
+ s.add(f"{key} beta in the same ring", ALKYL[1])
+ elif pos == 2:
+ s.add(f"{key} beta", table[1] * (0.5 if via and not simple else 1.0))
+ elif pos == 3:
+ s.add(f"{key} gamma", table[2])
+ if simple:
+ queue.append(n)
+ hetero = sorted((a for a in alphas if a[2] != "C"), key=lambda t: -abs(t[1]))
+ for k, (name, value, el) in enumerate(hetero):
+ factor = 1.0 if k == 0 else DAMP.get(el, 0.6) ** k
+ s.add(f"{name} alpha", value * factor)
+ for name, value, el in alphas:
+ if el == "C":
+ s.add(f"{name} alpha", value * (0.75 if hetero else 1.0))
+ if len(hetero) >= 2:
+ s.worst("medium")
+ sizes = env.ring_sizes(i)
+ if sizes:
+ s.add(f"{sizes[0]}-ring", RING_SP3.get(sizes[0], 0.0))
+ if sizes[0] < 5:
+ s.worst("medium")
+ if env.atom(i).GetFormalCharge() or env.atom(i).GetNumRadicalElectrons():
+ s.worst("low")
+ _confidence(s, keys)
+ return s
+
+
+def _six_ring_base(env: Environment, i: int, ring: tuple[int, ...], s: Shift) -> None:
+ s.add("benzene ring", 128.5)
+ alpha_n = 0
+ for j in ring:
+ if env.element(j) == "C":
+ continue
+ kind = ring_heteroatom(env, j)
+ pos = ring_distance(ring, i, j)
+ terms = SIX_RING_HETERO.get(kind, SIX_RING_HETERO["X"])
+ s.add(f"ring {kind} {('alpha', 'beta', 'gamma')[pos - 1]}", terms[pos - 1])
+ if pos == 1 and kind == "N":
+ alpha_n += 1
+ if kind not in ("N",):
+ s.worst("medium")
+ if alpha_n >= 2:
+ s.add("two ring N alpha", -13.0)
+
+
+def _five_ring_base(env: Environment, i: int, ring: tuple[int, ...], s: Shift) -> None:
+ heteros = [j for j in ring if env.element(j) != "C"]
+ if not heteros:
+ s.add("five-ring carbocycle", 120.0)
+ s.worst("low")
+ return
+ s.add("five-ring heteroaromatic", 100.0)
+ for j in heteros:
+ kind = ring_heteroatom(env, j)
+ pos = ring_distance(ring, i, j)
+ terms = FIVE_RING_HETERO.get(kind, FIVE_RING_HETERO["X"])
+ s.add(f"ring {kind} {('alpha', 'beta')[pos - 1]}", terms[pos - 1])
+ s.worst("medium")
+ if len(heteros) >= 3:
+ s.worst("low")
+
+
+def _exocyclic_oxo(env: Environment, i: int) -> Shift | None:
+ oxo = [n for n, o in env.multiple(i) if env.element(n) in ("O", "S") and not env.aromatic(n)]
+ if not oxo:
+ return None
+ ring_n = sum(1 for n in env.heavy(i) if env.element(n) == "N" and env.aromatic(n))
+ ring_o = sum(1 for n in env.heavy(i) if env.element(n) == "O" and env.aromatic(n))
+ if ring_n + ring_o >= 2:
+ value, rule = 151.5, "aromatic urea-like carbonyl (two ring heteroatoms)"
+ elif ring_n + ring_o == 1:
+ value, rule = 160.0, "aromatic lactam or lactone carbonyl"
+ else:
+ value, rule = 180.0, "aromatic ring carbonyl (quinone-like)"
+ s = Shift(value, 0.0, "medium" if ring_n + ring_o else "low", rule, "carbonyl")
+ s.terms.append((rule, value))
+ return s
+
+
+def _benzylic(env: Environment, k: int, ring_atom: int) -> tuple[float, ...]:
+ rest = [m for m in env.heavy(k) if m != ring_atom]
+ terms = list(AROMATIC[("CH3", "CH2R", "CHR2", "CR3")[min(len(rest), 3)]])
+ for m in rest:
+ el = env.element(m)
+ if el in HALOGENS:
+ mod = BENZYLIC["halogen"]
+ elif el in ("O", "N", "S"):
+ mod = BENZYLIC[el]
+ elif el == "C" and (is_acyl(env, m) or any(o == 3 for _, o in env.multiple(m))):
+ mod = BENZYLIC["acyl"]
+ elif el == "C" and env.aromatic(m):
+ mod = BENZYLIC["aryl"]
+ else:
+ continue
+ terms = [t + d for t, d in zip(terms, mod)]
+ return tuple(terms)
+
+
+def _aromatic(env: Environment, i: int) -> Shift:
+ special = _exocyclic_oxo(env, i)
+ if special:
+ return special
+ ring = env.primary_ring(i)
+ s = Shift(0.0, 0.0, "high", "aromatic carbon: ring base with substituent terms", "aromatic")
+ if ring is None:
+ s.add("aromatic carbon outside a ring", 128.5)
+ s.worst("low")
+ return s
+ if len(ring) == 6:
+ _six_ring_base(env, i, ring, s)
+ elif len(ring) == 5:
+ _five_ring_base(env, i, ring, s)
+ else:
+ s.add("aromatic ring", 128.5)
+ s.worst("low")
+ ring_set = set(ring)
+ count = 0
+ keys = []
+ for j in ring:
+ pos = ring_distance(ring, i, j)
+ if len(ring) == 5 and pos > 2:
+ continue
+ for k in env.heavy(j):
+ if k in ring_set:
+ continue
+ fused = env.same_ring(j, k) is not None
+ if env.order(j, k) == 2 and env.element(k) in ("O", "S"):
+ key = "oxo"
+ elif fused and env.element(k) == "C":
+ key = "fused"
+ else:
+ key = classify(env, k, j)
+ keys.append(key)
+ terms = AROMATIC.get(key, AROMATIC["R"])
+ if key in ("CH3", "CH2R", "CHR2", "CR3", "CH2X"):
+ terms = _benzylic(env, k, j)
+ if pos > 3:
+ continue
+ s.add(f"{key} {('ipso', 'ortho', 'meta', 'para')[pos]}", terms[pos])
+ count += 1
+ if fused:
+ s.worst("medium")
+ if count >= 4:
+ s.worst("medium")
+ _confidence(s, keys)
+ return s
+
+
+def _chain(env: Environment, start: int, avoid: set[int], limit: int = 3) -> list[tuple[int, int]]:
+ out = []
+ seen = set(avoid) | {start}
+ frontier = [start]
+ for d in range(2, limit + 1):
+ nxt = []
+ for cur in frontier:
+ for n in env.heavy(cur):
+ if n in seen:
+ continue
+ seen.add(n)
+ out.append((n, d))
+ if env.sp3_carbon(n):
+ nxt.append(n)
+ frontier = nxt
+ return out
+
+
+def _alkene(env: Environment, i: int, p: int) -> Shift:
+ s = Shift(123.3, 0.0, "high", "alkene carbon: ethylene base with same-side and far-side substituent terms", "alkene")
+ s.terms.append(("base (ethylene)", 123.3))
+ keys = []
+ for side, centre, other, chain_terms in (("same", i, p, ALKENE_CHAIN), ("far", p, i, ALKENE_OTHER)):
+ for n in env.heavy(centre):
+ if n == other:
+ continue
+ key = classify(env, n, centre)
+ keys.append(key)
+ if env.sp3_carbon(n) and key not in ("CF3", "CX3"):
+ s.add(f"{side} alkyl alpha", chain_terms[0])
+ for m, d in _chain(env, n, {i, p}):
+ if env.sp3_carbon(m):
+ s.add(f"{side} alkyl {'beta' if d == 2 else 'gamma'}", chain_terms[d - 1])
+ elif d == 2:
+ s.add(f"{side} {classify(env, m, n)} beta", 2.5 if side == "same" else -1.0)
+ continue
+ terms = ALKENE.get(key, ALKENE["R"])
+ s.add(f"{side} {key}", terms[0] if side == "same" else terms[1])
+ ring = env.same_ring(i, p)
+ if ring:
+ s.add(f"{len(ring)}-ring alkene", RING_ALKENE.get(len(ring), -1.0))
+ if len(keys) >= 3:
+ s.worst("medium")
+ _confidence(s, keys)
+ if any(k not in ("CH3", "CH2R", "CHR2", "CR3", "CH2X", "Ar", "vinyl", "COOR", "COR", "CHO", "COOH", "CN", "OR", "OCOR", "Cl") for k in keys):
+ s.worst("medium")
+ return s
+
+
+def _beta_carbons(env: Environment, c: int, neighbour: int) -> float:
+ return sum(1.0 if env.sp3_carbon(m) else 0.2 for m in env.heavy(neighbour) if m != c and env.element(m) == "C")
+
+
+def _carbonyl(env: Environment, i: int) -> Shift:
+ rest = [n for n in env.heavy(i) if not (env.element(n) in ("O", "S") and env.order(i, n) == 2)]
+ s = Shift(0.0, 0.0, "high", "", "carbonyl")
+ o_single = [n for n in rest if env.element(n) == "O"]
+ n_single = [n for n in rest if env.element(n) == "N"]
+ halos = [n for n in rest if env.element(n) in HALOGENS]
+ carbons = [n for n in rest if env.element(n) == "C"]
+ others = [n for n in rest if n not in o_single + n_single + halos + carbons]
+
+ def side(base: float, aryl: float, vinyl: float, branch: float, h: float | None = None) -> None:
+ s.add("class base", base)
+ if h is not None and env.h_count[i] >= 1 and not carbons:
+ s.add("formyl (H on the carbonyl)", h)
+ for c in carbons:
+ if env.aromatic(c):
+ s.add("aryl on the carbonyl", aryl)
+ aryl = -1.5
+ elif env.multiple(c):
+ s.add("alkenyl or alkynyl on the carbonyl", vinyl)
+ elif env.sp3_carbon(c):
+ s.add("alpha branching", branch * min(_beta_carbons(env, i, c), 2) + (branch * 0.5 if _beta_carbons(env, i, c) >= 3 else 0.0))
+ hetero = sum(1 for m in env.heavy(c) if m != i and env.element(m) in ("O", "N", "Cl", "Br", "F", "S"))
+ if hetero:
+ s.add("heteroatom on the alpha carbon", -4.0 * hetero)
+ acyl = sum(1 for m in env.heavy(c) if m != i and (is_acyl(env, m) or any(o == 3 for _, o in env.multiple(m))))
+ if acyl:
+ s.add("1,3-dicarbonyl", -4.5 * acyl)
+
+ if len(o_single) >= 2:
+ s.rule = "carbonate"
+ s.add("class base", 155.5)
+ elif o_single and n_single:
+ s.rule = "carbamate"
+ s.add("class base", 156.5)
+ elif len(n_single) >= 2:
+ s.rule = "urea"
+ s.add("class base", 158.5)
+ elif o_single:
+ o = o_single[0]
+ partner = [m for m in env.heavy(o) if m != i]
+ if env.atom(o).GetFormalCharge() < 0:
+ s.rule = "carboxylate"
+ side(180.0, -5.0, -6.0, 2.5, -10.0)
+ elif env.h_count[o] >= 1:
+ s.rule = "carboxylic acid"
+ side(177.5, -5.0, -6.0, 2.8, -11.0)
+ elif partner and is_acyl(env, partner[0]):
+ s.rule = "anhydride"
+ side(167.0, -4.5, -5.0, 2.5, -7.0)
+ else:
+ s.rule = "ester"
+ side(171.0, -4.0, -4.5, 3.0, -10.0)
+ if partner and env.aromatic(partner[0]):
+ s.add("aryl ester oxygen", -1.5)
+ elif partner and env.multiple(partner[0]):
+ s.add("vinyl ester oxygen", -3.0)
+ elif n_single:
+ s.rule = "amide"
+ side(171.0, -2.0, -5.0, 2.5, -8.5)
+ nitrogen = n_single[0]
+ if any(env.aromatic(m) for m in env.heavy(nitrogen) if m != i):
+ s.add("N-aryl amide", -2.5)
+ elif halos:
+ s.rule = "acyl halide"
+ side(170.0, -2.0, -4.0, 2.0)
+ s.worst("medium")
+ elif env.h_count[i] >= 1:
+ s.rule = "aldehyde"
+ side(200.5, -8.0, -7.0, 2.2)
+ if env.h_count[i] >= 2:
+ s.add("formaldehyde", -6.0)
+ s.worst("low")
+ elif len(carbons) >= 2:
+ s.rule = "ketone"
+ side(206.7, -8.6, -8.0, 2.6)
+ else:
+ s.rule = "carbonyl with an unusual substituent"
+ s.add("class base", 190.0)
+ s.worst("low")
+ if others:
+ s.worst("low")
+ ring = next((r for r in sorted(env.rings, key=len) if i in r), None)
+ if ring:
+ s.add(f"{len(ring)}-ring carbonyl", {3: -10.0, 4: 2.0, 5: 7.5, 7: 3.0}.get(len(ring), 0.0))
+ if len(ring) < 5:
+ s.worst("medium")
+ if any(env.element(n) == "S" and env.order(i, n) == 2 for n in env.heavy(i)):
+ s.add("thiocarbonyl", 30.0)
+ s.worst("low")
+ s.rule = f"{s.rule} carbon"
+ return s
+
+
+def _nitrile(env: Environment, i: int) -> Shift:
+ s = Shift(117.5, 0.0, "high", "nitrile carbon", "nitrile")
+ s.terms.append(("base (alkyl nitrile)", 117.5))
+ for n in env.heavy(i):
+ if env.element(n) == "N" and env.order(i, n) == 3:
+ continue
+ if env.aromatic(n):
+ s.add("aryl nitrile", 1.2)
+ elif env.multiple(n):
+ s.add("conjugated nitrile", 0.0)
+ elif env.sp3_carbon(n):
+ s.add("alpha branching", 2.8 * min(_beta_carbons(env, i, n), 2))
+ else:
+ s.worst("medium")
+ return s
+
+
+def _alkyne(env: Environment, i: int, p: int) -> Shift:
+ s = Shift(71.9, 0.0, "medium", "alkyne carbon: ethyne base with same-side and far-side terms", "alkyne")
+ s.terms.append(("base (ethyne)", 71.9))
+ for side, centre, other in (("same", i, p), ("far", p, i)):
+ for n in env.heavy(centre):
+ if n == other:
+ continue
+ if env.sp3_carbon(n):
+ if side == "same":
+ s.add("same alkyl", 7.5 + 5.0 * min(_beta_carbons(env, centre, n), 1))
+ else:
+ s.add("far alkyl", -4.0)
+ elif env.aromatic(n):
+ s.add(f"{side} aryl", 12.0 if side == "same" else 5.5)
+ else:
+ key = classify(env, n, centre)
+ s.add(f"{side} {key}", 5.0 if side == "same" else 3.0)
+ s.worst("low")
+ return s
+
+
+def _imine(env: Environment, i: int, n: int) -> Shift:
+ s = Shift(0.0, 0.0, "low", "imine carbon", "imine")
+ beyond = [m for m in env.heavy(n) if m != i]
+ if any(env.element(m) == "O" for m in beyond):
+ s.add("oxime", 152.0)
+ elif any(env.element(m) == "N" for m in beyond):
+ s.add("hydrazone", 145.0)
+ else:
+ s.add("imine", 160.0 if env.h_count[i] else 168.0)
+ if sum(1 for m in env.heavy(i) if env.element(m) == "N" and m != n) >= 1:
+ s.add("amidine or guanidine", -5.0)
+ s.rule = "amidine carbon"
+ return s
+
+
+def shift(env: Environment, i: int) -> Shift:
+ if env.aromatic(i):
+ s = _aromatic(env, i)
+ elif env.sp3(i):
+ s = _sp3(env, i)
+ else:
+ mult = env.multiple(i)
+ triple = [n for n, o in mult if o == 3]
+ doubles = [n for n, o in mult if o == 2]
+ if triple:
+ s = _nitrile(env, i) if env.element(triple[0]) == "N" else _alkyne(env, i, triple[0])
+ elif len(doubles) >= 2:
+ s = Shift(205.0 if all(env.element(n) == "C" for n in doubles) else 125.0, 0.0, "low", "cumulated carbon (allene, ketene, isocyanate)", "other")
+ elif doubles and env.element(doubles[0]) in ("O", "S"):
+ s = _carbonyl(env, i)
+ elif doubles and env.element(doubles[0]) == "N":
+ s = _imine(env, i, doubles[0])
+ elif doubles and env.element(doubles[0]) == "C":
+ s = _alkene(env, i, doubles[0])
+ else:
+ s = Shift(120.0, 0.0, "low", "unusual carbon", "other")
+ if env.atom(i).GetFormalCharge():
+ s.worst("low")
+ s.value = round(s.value, 1)
+ s.uncertainty = UNCERTAINTY[s.confidence]
+ return s
+
+
+class IncrementCarbon:
+ name = "increments"
+ version = ""
+ nuclei = ("13C",)
+ description = "FormChem's own 13C increment rules"
+
+ def predict(self, env: Environment, nucleus: str) -> dict[int, Shift]:
+ return {i: shift(env, i) for i in range(env.mol.GetNumAtoms()) if env.element(i) == "C"}
diff --git a/backend/app/services/nmr/coupling.py b/backend/app/services/nmr/coupling.py
new file mode 100644
index 00000000..6b093beb
--- /dev/null
+++ b/backend/app/services/nmr/coupling.py
@@ -0,0 +1,165 @@
+from dataclasses import dataclass, field
+
+from app.services.nmr.base import Shift
+from app.services.nmr.environment import Environment, ring_distance
+
+J_ALKYL = 7.0
+J_ALLYLIC = 6.5
+J_ALDEHYDE = 2.5
+J_DIENE = 10.0
+J_CIS = 10.5
+J_TRANS = 16.5
+J_GEMINAL_SP2 = 1.5
+J_ORTHO = 8.0
+J_ORTHO_NEXT_TO_N = 5.0
+J_META = 2.0
+J_FIVE_RING = {"S": 4.5, "O": 2.5, "N": 3.0}
+J_PROPARGYLIC = 2.5
+LETTERS = {1: "d", 2: "t", 3: "q", 4: "quint", 5: "sext", 6: "sept"}
+
+Site = tuple[int, int]
+
+
+@dataclass
+class Coupling:
+ j: float
+ n: int
+ partners: list[int] = field(default_factory=list)
+ kind: str = "3J"
+
+
+@dataclass
+class Multiplicity:
+ kind: str
+ couplings: list[Coupling]
+ notes: list[str] = field(default_factory=list)
+
+
+def proton_count(env: Environment, sites: dict[Site, Shift], site: Site) -> int:
+ i, _ = site
+ halves = sum(1 for (a, _p) in sites if a == i)
+ return 1 if halves > 1 else env.h_count[i]
+
+
+def _vinyl(env: Environment, i: int) -> bool:
+ return env.element(i) == "C" and not env.aromatic(i) and any(o == 2 and env.element(n) == "C" for n, o in env.multiple(i))
+
+
+def _aldehyde(env: Environment, i: int) -> bool:
+ return env.element(i) == "C" and any(o == 2 and env.element(n) in ("O", "S") for n, o in env.multiple(i))
+
+
+def _vicinal(env: Environment, i: int, n: int) -> float | None:
+ if env.aromatic(i) or env.aromatic(n) or env.element(i) != "C" or env.element(n) != "C":
+ return None
+ if env.sp3(i) and env.sp3(n):
+ return J_ALKYL
+ if _aldehyde(env, i) or _aldehyde(env, n):
+ return J_ALDEHYDE if (env.sp3(i) or env.sp3(n)) else 7.5
+ if (_vinyl(env, i) and env.sp3(n)) or (_vinyl(env, n) and env.sp3(i)):
+ return J_ALLYLIC
+ if _vinyl(env, i) and _vinyl(env, n) and env.order(i, n) == 1:
+ return J_DIENE
+ if env.element(i) == "C" and env.element(n) == "C":
+ return J_ALKYL if (env.sp3(i) or env.sp3(n)) else None
+ return None
+
+
+def _ortho(env: Environment, i: int, n: int) -> float | None:
+ ring = env.same_ring(i, n)
+ aromatic = next((r for r in env.aromatic_rings if i in r and n in r), None)
+ if aromatic is None or ring is None:
+ return None
+ if len(aromatic) == 6:
+ near_n = any(env.element(m) == "N" for x in (i, n) for m in env.heavy(x) if m in aromatic)
+ return J_ORTHO_NEXT_TO_N if near_n else J_ORTHO
+ hetero = [env.element(m) for m in aromatic if env.element(m) != "C"]
+ return J_FIVE_RING.get(hetero[0], 3.5) if hetero else 3.5
+
+
+def partners(env: Environment, sites: dict[Site, Shift], site: Site) -> list[tuple[Site, float, str]]:
+ i, part = site
+ me = sites[site]
+ out: list[tuple[Site, float, str]] = []
+ if me.exchangeable:
+ return out
+ for n in env.heavy(i):
+ others = [s for s in sites if s[0] == n and not sites[s].exchangeable]
+ if not others:
+ continue
+ order = env.order(i, n)
+ if order == 2 and _vinyl(env, i) and _vinyl(env, n):
+ for o in others:
+ side, other_side = me.side, sites[o].side
+ if side and other_side:
+ out.append((o, J_CIS if side == other_side else J_TRANS, "3J cis" if side == other_side else "3J trans"))
+ else:
+ out.append((o, (J_CIS + J_TRANS) / 2, "3J cis or trans"))
+ continue
+ if order == 1.5:
+ j = _ortho(env, i, n)
+ if j:
+ out.extend((o, j, "3J ortho") for o in others)
+ continue
+ if order == 3:
+ continue
+ j = _vicinal(env, i, n)
+ if j:
+ out.extend((o, j, "3J") for o in others)
+ for o in sites:
+ if o[0] == i and o != site and not sites[o].exchangeable and _vinyl(env, i):
+ out.append((o, J_GEMINAL_SP2, "2J geminal"))
+ if env.aromatic(i):
+ ring = env.primary_ring(i)
+ if ring and len(ring) == 6:
+ for j in ring:
+ if j != i and ring_distance(ring, i, j) == 2:
+ out.extend((o, J_META, "4J meta") for o in sites if o[0] == j)
+ if any(o == 3 for _, o in env.multiple(i)):
+ far = next(n for n, o in env.multiple(i) if o == 3)
+ for m in env.heavy(far):
+ if m != i and env.sp3_carbon(m):
+ out.extend((o, J_PROPARGYLIC, "4J propargylic") for o in sites if o[0] == m)
+ if env.sp3(i):
+ for n in env.heavy(i):
+ for far, o in env.multiple(n):
+ if o == 3 and env.element(far) == "C":
+ out.extend((s, J_PROPARGYLIC, "4J propargylic") for s in sites if s[0] == far)
+ return out
+
+
+def _label(couplings: list[Coupling]) -> str:
+ if not couplings:
+ return "s"
+ lines = 1
+ for c in couplings:
+ lines *= c.n + 1
+ if len(couplings) > 3 or lines > 36 or any(c.n > 6 for c in couplings):
+ return "m"
+ if len(couplings) == 1:
+ return LETTERS[couplings[0].n]
+ if any(c.n > 3 for c in couplings):
+ return "m"
+ return "".join(LETTERS[c.n] for c in couplings)
+
+
+def multiplicity(env: Environment, sites: dict[Site, Shift], site: Site, group: set[Site]) -> Multiplicity:
+ me = sites[site]
+ if me.exchangeable:
+ return Multiplicity("br s", [], ["exchangeable: no resolved coupling"])
+ merged: list[Coupling] = []
+ for other, j, kind in partners(env, sites, site):
+ if other in group:
+ continue
+ count = proton_count(env, sites, other)
+ found = next((c for c in merged if abs(c.j - j) <= 0.75), None)
+ if found:
+ found.n += count
+ found.partners.append(other[0])
+ else:
+ merged.append(Coupling(j, count, [other[0]], kind))
+ merged.sort(key=lambda c: -c.j)
+ notes = []
+ if any(c.kind == "3J cis or trans" for c in merged):
+ notes.append("alkene geometry not drawn: cis and trans couplings averaged")
+ return Multiplicity(_label(merged), merged, notes)
diff --git a/backend/app/services/nmr/document.py b/backend/app/services/nmr/document.py
new file mode 100644
index 00000000..f329c2ee
--- /dev/null
+++ b/backend/app/services/nmr/document.py
@@ -0,0 +1,171 @@
+from app.services import model
+from app.services.agent_out import free_spot, page_of
+from app.services.chem import DEFAULT_BOND_LENGTH, geometry
+from app.services.chem.reactions import fresh_id, used_ids
+from app.services.nmr import METHOD, VERSION, predict, simulate
+
+WIDTH_BONDS = 25.0
+HEIGHT_BONDS = 13.0
+GAP_BONDS = 2.0
+LABEL_ROOM_BONDS = (0.5, 1.5, 0.5, 3.0)
+
+
+class DocumentError(ValueError):
+ def __init__(self, message: str, status: int = 422) -> None:
+ super().__init__(message)
+ self.status = status
+
+
+def _bond(doc: dict) -> float:
+ return float(model.resolve_style(doc).get("bond_length") or DEFAULT_BOND_LENGTH)
+
+
+def fragment(doc: dict, fid: str) -> dict:
+ frag = (doc.get("objects") or {}).get(fid)
+ if not isinstance(frag, dict):
+ raise DocumentError(f"{fid} is not an object of this drawing.", 404)
+ if frag.get("kind") != "fragment":
+ raise DocumentError(f"{fid} is a {frag.get('kind')}, not a structure.")
+ if not frag.get("atoms"):
+ raise DocumentError(f"{fid} has no atoms.")
+ return frag
+
+
+def _labelled(box: geometry.Box, bond: float) -> geometry.Box:
+ left, top, right, bottom = LABEL_ROOM_BONDS
+ return (box[0] - left * bond, box[1] - top * bond, box[2] + right * bond, box[3] + bottom * bond)
+
+
+def _clear(doc: dict, page: dict, box: geometry.Box, style: dict, skip: set[str]) -> bool:
+ bond = _bond(doc)
+ want = _labelled(box, bond)
+ objects = doc.get("objects") or {}
+ for oid in page.get("order") or []:
+ if not isinstance(oid, str) or oid in skip:
+ continue
+ b = geometry.object_box(doc, oid, style)
+ if b and (objects.get(oid) or {}).get("kind") == "spectrum":
+ b = _labelled(b, bond)
+ if b and b[0] < want[2] and want[0] < b[2] and b[1] < want[3] and want[1] < b[3]:
+ return False
+ return True
+
+
+def _page_width(page: dict) -> float:
+ size = page.get("size")
+ return float(size["w"]) if isinstance(size, dict) and isinstance(size.get("w"), (int, float)) else float("inf")
+
+
+def _on_page(page: dict, x: float, w: float, margin: float) -> bool:
+ return x + w <= _page_width(page) - margin
+
+
+def place(doc: dict, page: dict, fid: str, w: float, h: float) -> tuple[float, float]:
+ style = model.resolve_style(doc)
+ gap = GAP_BONDS * _bond(doc)
+ box = geometry.object_box(doc, fid, style)
+ if box is None:
+ return free_spot(doc, page.get("id"), w, h)
+ margin = float(page.get("margins", 36) or 0)
+ middle = (box[1] + box[3]) / 2
+ left = max(margin, min(box[0], _page_width(page) - margin - w))
+ below = [(left, box[3] + gap)]
+ below += [(left, b[3] + LABEL_ROOM_BONDS[3] * _bond(doc) + gap) for b in _spectra_below(doc, page, box, style)]
+ for x, y in [(box[2] + gap, max(margin, middle - h / 2))] + below:
+ if _on_page(page, x, w, margin) and _clear(doc, page, (x, y, x + w, y + h), style, {fid}):
+ return round(x, 3), round(y, 3)
+ return free_spot(doc, page.get("id"), w, h)
+
+
+def _spectra_below(doc: dict, page: dict, box: geometry.Box, style: dict) -> list[geometry.Box]:
+ objects = doc.get("objects") or {}
+ found = [geometry.object_box(doc, oid, style) for oid in page.get("order") or [] if isinstance(oid, str) and (objects.get(oid) or {}).get("kind") == "spectrum"]
+ return sorted((b for b in found if b and b[3] >= box[1]), key=lambda b: b[3])
+
+
+def annotations(result: dict, fid: str, used: set[str], old: dict | None = None) -> dict:
+ old = old or {}
+ prior = {(key, tuple((m.get("atoms") or {}).get("atoms") or [])): m.get("id")
+ for key in ("multiplets", "peaks", "integrals") for m in old.get(key) or [] if isinstance(m, dict)}
+
+ def ident(atoms: list[str], key: str) -> str:
+ found = prior.get((key, tuple(atoms)))
+ if found and found not in used:
+ used.add(found)
+ return found
+ return fresh_id(used, "k")
+
+ out: dict = {}
+ marks = simulate.multiplets(result, fid)
+ if result["nucleus"] == "1H":
+ out["multiplets"] = [{"id": ident(m["atoms"]["atoms"], "multiplets"), "from": m["from"], "to": m["to"], "shift": m["shift"], "kind": m["kind"],
+ "j": m["j"], "atoms": m["atoms"]} for m in marks]
+ out["integrals"] = [{"id": ident(m["atoms"]["atoms"], "integrals"), "from": m["integral"][0], "to": m["integral"][1], "value": m["count"],
+ "atoms": m["atoms"]} for m in marks]
+ else:
+ heights = simulate.spectrum(result)
+ tops = {}
+ for ln in heights["lines"]:
+ tops[ln["signal"]] = max(tops.get(ln["signal"], 0.0), ln["height"])
+ out["peaks"] = [{"id": ident(m["atoms"]["atoms"], "peaks"), "x": m["shift"], "y": round(min(100.0, tops.get(m["id"], 0.0)), 2),
+ "label": f"{m['shift']:.1f}", "atoms": m["atoms"]} for m in marks]
+ return out
+
+
+def spectrum_ops(doc: dict, fid: str, nucleus: str = "1H", frequency: float | None = None, x: float | None = None, y: float | None = None,
+ w: float | None = None, h: float | None = None, name: str | None = None) -> tuple[list[dict], dict, dict]:
+ frag = fragment(doc, fid)
+ try:
+ result = predict.predict(frag, nucleus, frequency, doc.get("expansions"))
+ except predict.PredictError as exc:
+ raise DocumentError(str(exc)) from exc
+ page = page_of(doc, [fid])
+ if page is None:
+ raise DocumentError("The drawing has no page.")
+ bond = _bond(doc)
+ width = float(w) if w else round(WIDTH_BONDS * bond, 2)
+ height = float(h) if h else round(HEIGHT_BONDS * bond, 2)
+ if width <= 0 or height <= 0:
+ raise DocumentError("w and h must be positive")
+ if x is None or y is None:
+ px, py = place(doc, page, fid, width, height)
+ x = px if x is None else x
+ y = py if y is None else y
+ used = used_ids(doc)
+ oid = fresh_id(used, "o")
+ obj = {
+ "id": oid, "kind": "spectrum", "name": name or f"Predicted {nucleus} NMR",
+ "x": float(x), "y": float(y), "w": width, "h": height,
+ "technique": "nmr", "nucleus": nucleus,
+ "source": {"predicted": {"fragment": fid, "method": METHOD, "version": VERSION, "frequency": result["frequency"]}},
+ **annotations(result, fid, used),
+ }
+ ops = [{"op": "set", "path": ["objects", oid], "value": obj},
+ {"op": "ins", "path": ["pages", {"id": page["id"]}, "order"], "value": oid}]
+ return ops, obj, result
+
+
+def refresh_ops(doc: dict, oid: str) -> tuple[list[dict], dict, dict]:
+ obj = (doc.get("objects") or {}).get(oid)
+ if not isinstance(obj, dict) or obj.get("kind") != "spectrum":
+ raise DocumentError(f"{oid} is not a spectrum of this drawing.", 404)
+ src = (obj.get("source") or {}).get("predicted")
+ if not isinstance(src, dict):
+ raise DocumentError(f"{oid} is a measured spectrum; only predicted spectra are recomputed.")
+ frag = fragment(doc, src.get("fragment"))
+ try:
+ result = predict.predict(frag, obj.get("nucleus") or "1H", src.get("frequency"), doc.get("expansions"))
+ except predict.PredictError as exc:
+ raise DocumentError(str(exc)) from exc
+ used = used_ids(doc) - {m.get("id") for key in ("multiplets", "peaks", "integrals") for m in obj.get(key) or []}
+ fresh = annotations(result, src["fragment"], used, obj)
+ ops = []
+ base = ["objects", oid]
+ for key in ("multiplets", "integrals", "peaks"):
+ if key in fresh and fresh[key] != obj.get(key):
+ ops.append({"op": "set", "path": base + [key], "value": fresh[key]})
+ elif key not in fresh and key in obj:
+ ops.append({"op": "set", "path": base + [key]})
+ if src.get("version") != VERSION or src.get("method") != METHOD:
+ ops.append({"op": "set", "path": base + ["source"], "value": {"predicted": {**src, "method": METHOD, "version": VERSION}}})
+ return ops, fresh, result
diff --git a/backend/app/services/nmr/environment.py b/backend/app/services/nmr/environment.py
new file mode 100644
index 00000000..ee832414
--- /dev/null
+++ b/backend/app/services/nmr/environment.py
@@ -0,0 +1,181 @@
+from dataclasses import dataclass, field
+
+from rdkit import Chem
+from rdkit.Chem import rdDepictor
+
+from app.services.chem import perceive, warning
+
+SRC = "nmr_src"
+BT = Chem.BondType
+SAN = Chem.SanitizeFlags
+
+
+@dataclass
+class Environment:
+ fragment: str
+ mol: Chem.Mol
+ owner: list[str]
+ drawn: list[bool]
+ h_count: list[int]
+ h_ids: dict[int, list[str]]
+ ranks: list[int]
+ rings: list[tuple[int, ...]]
+ aromatic_rings: list[tuple[int, ...]]
+ coords: list[tuple[float, float]]
+ centres: set[int]
+ warnings: list[dict] = field(default_factory=list)
+
+ def atom(self, i: int) -> Chem.Atom:
+ return self.mol.GetAtomWithIdx(i)
+
+ def element(self, i: int) -> str:
+ return self.mol.GetAtomWithIdx(i).GetSymbol()
+
+ def neighbours(self, i: int) -> list[int]:
+ return [n.GetIdx() for n in self.mol.GetAtomWithIdx(i).GetNeighbors()]
+
+ def heavy(self, i: int) -> list[int]:
+ return [n for n in self.neighbours(i) if self.mol.GetAtomWithIdx(n).GetAtomicNum() > 1]
+
+ def bond(self, i: int, j: int) -> Chem.Bond | None:
+ return self.mol.GetBondBetweenAtoms(i, j)
+
+ def order(self, i: int, j: int) -> float:
+ b = self.bond(i, j)
+ if b is None:
+ return 0.0
+ if b.GetIsAromatic() or b.GetBondType() == BT.AROMATIC:
+ return 1.5
+ return {BT.SINGLE: 1.0, BT.DOUBLE: 2.0, BT.TRIPLE: 3.0}.get(b.GetBondType(), 1.0)
+
+ def aromatic(self, i: int) -> bool:
+ return self.mol.GetAtomWithIdx(i).GetIsAromatic()
+
+ def multiple(self, i: int) -> list[tuple[int, float]]:
+ return [(n, self.order(i, n)) for n in self.neighbours(i) if self.order(i, n) >= 2]
+
+ def sp3(self, i: int) -> bool:
+ return not self.aromatic(i) and not self.multiple(i)
+
+ def sp3_carbon(self, i: int) -> bool:
+ return self.element(i) == "C" and self.sp3(i) and self.atom(i).GetFormalCharge() == 0
+
+ def ring_sizes(self, i: int) -> list[int]:
+ return sorted(len(r) for r in self.rings if i in r)
+
+ def same_ring(self, i: int, j: int) -> tuple[int, ...] | None:
+ return next((r for r in sorted(self.rings, key=len) if i in r and j in r), None)
+
+ def primary_ring(self, i: int) -> tuple[int, ...] | None:
+ found = [r for r in self.aromatic_rings if i in r]
+ if not found:
+ return None
+ found.sort(key=lambda r: (len(r) != 6, sum(1 for a in r if self.element(a) != "C"), len(r)))
+ return found[0]
+
+ def atom_ids(self, idxs) -> list[str]:
+ return sorted({self.owner[i] for i in idxs})
+
+ def proton_ids(self, idxs) -> list[str]:
+ out: set[str] = set()
+ for i in idxs:
+ out.update(self.h_ids.get(i, []))
+ out.add(self.owner[i])
+ return sorted(out)
+
+
+def ring_distance(ring: tuple[int, ...], i: int, j: int) -> int:
+ d = abs(ring.index(i) - ring.index(j))
+ return min(d, len(ring) - d)
+
+
+def ring_heteroatom(env: Environment, j: int) -> str:
+ a = env.atom(j)
+ el = a.GetSymbol()
+ connections = a.GetDegree() + env.h_count[j]
+ if el == "N":
+ if a.GetFormalCharge() > 0:
+ return "N+"
+ return "N" if connections == 2 else "NH"
+ if el in ("O", "S", "Se"):
+ return "O+" if a.GetFormalCharge() > 0 else ("S" if el == "Se" else el)
+ return "X"
+
+
+def _rings(mol: Chem.Mol) -> list[tuple[int, ...]]:
+ try:
+ return [tuple(r) for r in mol.GetRingInfo().AtomRings()]
+ except Exception:
+ return []
+
+
+def _clean(mol: Chem.Mol) -> None:
+ failed = Chem.SanitizeMol(mol, SAN.SANITIZE_ALL ^ SAN.SANITIZE_PROPERTIES, catchErrors=True)
+ if failed != SAN.SANITIZE_NONE:
+ Chem.SanitizeMol(mol, SAN.SANITIZE_SYMMRINGS | SAN.SANITIZE_SETCONJUGATION | SAN.SANITIZE_SETHYBRIDIZATION, catchErrors=True)
+ mol.UpdatePropertyCache(strict=False)
+ try:
+ mol.GetRingInfo().NumRings()
+ except RuntimeError:
+ Chem.FastFindRings(mol)
+
+
+def _coords(mol: Chem.Mol) -> list[tuple[float, float]]:
+ if mol.GetNumConformers():
+ conf = mol.GetConformer()
+ pts = [(conf.GetAtomPosition(i).x, conf.GetAtomPosition(i).y) for i in range(mol.GetNumAtoms())]
+ else:
+ pts = [(0.0, 0.0)] * mol.GetNumAtoms()
+ return pts
+
+
+def redraw(env: Environment) -> list[tuple[float, float]]:
+ copy = Chem.Mol(env.mol)
+ try:
+ rdDepictor.Compute2DCoords(copy)
+ except Exception:
+ return env.coords
+ conf = copy.GetConformer()
+ return [(conf.GetAtomPosition(i).x, conf.GetAtomPosition(i).y) for i in range(copy.GetNumAtoms())]
+
+
+def _centres(mol: Chem.Mol) -> set[int]:
+ try:
+ return {i for i, _ in Chem.FindMolChiralCenters(mol, includeUnassigned=True, useLegacyImplementation=False)}
+ except Exception:
+ return set()
+
+
+def build(frag: dict, expansions: dict | None = None) -> Environment:
+ conv = perceive.prepare(frag, expansions)
+ full = Chem.Mol(conv.mol)
+ for a in full.GetAtoms():
+ a.SetIntProp(SRC, a.GetIdx())
+ drawn_h: dict[int, list[str]] = {}
+ for a in full.GetAtoms():
+ if a.GetAtomicNum() == 1 and a.GetIsotope() in (0, 1) and a.GetDegree() == 1 and conv.drawn[a.GetIdx()]:
+ drawn_h.setdefault(a.GetNeighbors()[0].GetIdx(), []).append(conv.owner[a.GetIdx()])
+ try:
+ mol = Chem.RemoveHs(full, sanitize=False)
+ except Exception:
+ mol = full
+ _clean(mol)
+ owner, drawn, h_count, h_ids = [], [], [], {}
+ for a in mol.GetAtoms():
+ src = a.GetIntProp(SRC)
+ owner.append(conv.owner[src])
+ drawn.append(conv.drawn[src])
+ h_count.append(a.GetTotalNumHs() if a.GetAtomicNum() > 1 else 0)
+ if src in drawn_h:
+ h_ids[a.GetIdx()] = drawn_h[src]
+ ranks = list(Chem.CanonicalRankAtoms(mol, breakTies=False, includeChirality=True))
+ rings = _rings(mol)
+ aromatic = [r for r in rings if all(mol.GetAtomWithIdx(i).GetIsAromatic() for i in r)]
+ notes = [w for w in conv.warnings if w.get("code") in ("unknown_label", "abbreviation_bonds", "bad_expansion", "cannot_kekulise")]
+ dummies = sorted({owner[a.GetIdx()] for a in mol.GetAtoms() if a.GetAtomicNum() == 0})
+ if dummies:
+ notes.append(warning("nmr_generic", "Generic labels and R-groups are read as an unknown substituent; shifts next to them are low confidence.", dummies))
+ radicals = sorted({owner[a.GetIdx()] for a in mol.GetAtoms() if a.GetNumRadicalElectrons()})
+ if radicals:
+ notes.append(warning("nmr_radical", "Radicals are paramagnetic; the predicted shifts treat them as closed-shell atoms and are low confidence.", radicals))
+ return Environment(frag.get("id") or "", mol, owner, drawn, h_count, h_ids, ranks, rings, aromatic, _coords(mol), _centres(mol), notes)
diff --git a/backend/app/services/nmr/groups.py b/backend/app/services/nmr/groups.py
new file mode 100644
index 00000000..ff3671d0
--- /dev/null
+++ b/backend/app/services/nmr/groups.py
@@ -0,0 +1,140 @@
+from app.services.nmr.environment import Environment
+
+HALOGENS = ("F", "Cl", "Br", "I")
+HETERO = ("N", "O", "S", "F", "Cl", "Br", "I", "P", "Si", "B", "Se")
+
+
+def _others(env: Environment, head: int, parent: int) -> list[int]:
+ return [n for n in env.heavy(head) if n != parent]
+
+
+def _double_o(env: Environment, i: int) -> int:
+ return sum(1 for n, o in env.multiple(i) if o == 2 and env.element(n) in ("O", "S"))
+
+
+def acyl_kind(env: Environment, c: int, parent: int) -> str:
+ rest = [n for n in _others(env, c, parent) if not (env.element(n) == "O" and env.order(c, n) == 2)]
+ if env.h_count[c] >= 1 and not rest:
+ return "CHO"
+ for n in rest:
+ el = env.element(n)
+ if el == "O":
+ if env.atom(n).GetFormalCharge() < 0:
+ return "COO-"
+ if env.h_count[n] >= 1:
+ return "COOH"
+ return "COOR"
+ if el == "N":
+ return "CONR"
+ if el in ("Cl", "Br", "F", "I"):
+ return "COX"
+ return "COR"
+
+
+def is_acyl(env: Environment, c: int) -> bool:
+ return env.element(c) == "C" and not env.aromatic(c) and any(env.element(n) in ("O", "S") and o == 2 for n, o in env.multiple(c))
+
+
+def _carbon(env: Environment, head: int, parent: int) -> str:
+ if env.aromatic(head):
+ return "Ar"
+ mult = env.multiple(head)
+ if not mult:
+ rest = _others(env, head, parent)
+ fluorines = sum(1 for n in rest if env.element(n) == "F")
+ if fluorines >= 3:
+ return "CF3"
+ halos = sum(1 for n in rest if env.element(n) in HALOGENS)
+ if halos >= 2:
+ return "CX3"
+ if any(env.element(n) in HETERO for n in rest):
+ return "CH2X"
+ return ("CH3", "CH2R", "CHR2", "CR3")[min(len(rest), 3)]
+ if any(env.element(n) == "O" and o == 2 for n, o in mult):
+ return acyl_kind(env, head, parent)
+ if any(o == 3 for _, o in mult):
+ return "CN" if any(env.element(n) == "N" for n, o in mult if o == 3) else "alkyne"
+ if any(env.element(n) == "S" and o == 2 for n, o in mult):
+ return "CS"
+ if any(env.element(n) == "N" and o == 2 for n, o in mult):
+ return "C=N"
+ return "vinyl"
+
+
+def _nitrogen(env: Environment, head: int, parent: int) -> str:
+ a = env.atom(head)
+ rest = _others(env, head, parent)
+ if a.GetFormalCharge() > 0:
+ return "NO2" if sum(1 for n in rest if env.element(n) == "O") >= 2 else "N+"
+ if env.aromatic(head):
+ return "Narom"
+ if env.multiple(head):
+ return "N="
+ if any(env.element(n) in ("N", "O") for n in rest):
+ return "NX"
+ if any(is_acyl(env, n) or (env.element(n) == "S" and _double_o(env, n) >= 1) for n in rest):
+ return "NCO"
+ if any(env.aromatic(n) or env.multiple(n) for n in rest):
+ return "NAr"
+ return ("NR2", "NHR", "NH2", "NH2")[min(env.h_count[head], 3)]
+
+
+def _oxygen(env: Environment, head: int, parent: int) -> str:
+ a = env.atom(head)
+ if a.GetFormalCharge() < 0:
+ return "O-"
+ if a.GetFormalCharge() > 0:
+ return "O+"
+ if env.h_count[head] >= 1:
+ return "OH"
+ rest = _others(env, head, parent)
+ if any(is_acyl(env, n) for n in rest):
+ return "OCOR"
+ if any(env.element(n) in ("S", "P", "N") and _double_o(env, n) >= 1 for n in rest):
+ return "OCOR"
+ if any(env.aromatic(n) for n in rest):
+ return "OAr"
+ if any(env.multiple(n) for n in rest):
+ return "OVinyl"
+ return "OR"
+
+
+def _sulfur(env: Environment, head: int, parent: int) -> str:
+ if env.aromatic(head):
+ return "Sarom"
+ oxo = _double_o(env, head)
+ if oxo >= 2:
+ return "SO2"
+ if oxo == 1:
+ return "SO"
+ if env.h_count[head] >= 1:
+ return "SH"
+ return "SR"
+
+
+def classify(env: Environment, head: int, parent: int) -> str:
+ el = env.element(head)
+ if el in HALOGENS:
+ return el
+ if el == "C":
+ return _carbon(env, head, parent)
+ if el == "N":
+ return _nitrogen(env, head, parent)
+ if el == "O":
+ return _oxygen(env, head, parent)
+ if el == "S":
+ return _sulfur(env, head, parent)
+ if el in ("Si", "P", "B", "Se", "Sn", "Ge"):
+ return el
+ if env.atom(head).GetAtomicNum() == 0:
+ return "R"
+ if env.atom(head).GetAtomicNum() == 1:
+ return "D"
+ return "metal"
+
+
+ALKYL = ("CH3", "CH2R", "CHR2", "CR3")
+
+
+def is_alkyl(key: str) -> bool:
+ return key in ALKYL
diff --git a/backend/app/services/nmr/predict.py b/backend/app/services/nmr/predict.py
new file mode 100644
index 00000000..dc0f6b6a
--- /dev/null
+++ b/backend/app/services/nmr/predict.py
@@ -0,0 +1,201 @@
+import time
+
+from app.services.chem import warning
+from app.services.nmr import DESCRIPTION, METHOD, NUCLEI, REGISTRY, VERSION, coupling, environment
+from app.services.nmr.base import Shift
+from app.services.nmr.carbon import IncrementCarbon
+from app.services.nmr.proton import IncrementProton
+
+DEFAULT_FREQUENCY = {"1H": 400.0, "13C": 100.0}
+CARBON_PER_PROTON = 0.2515
+CONFIDENCE_ORDER = ("high", "medium", "low")
+
+REGISTRY.register(IncrementCarbon(), first=False)
+REGISTRY.register(IncrementProton(), first=False)
+
+
+class PredictError(ValueError):
+ pass
+
+
+def frequency_for(nucleus: str, frequency: float | None) -> float:
+ if frequency is None:
+ return DEFAULT_FREQUENCY[nucleus]
+ try:
+ value = float(frequency)
+ except (TypeError, ValueError):
+ raise PredictError("frequency must be a number in MHz") from None
+ if not 10.0 <= value <= 1500.0:
+ raise PredictError("frequency must be between 10 and 1500 MHz")
+ return value
+
+
+def _sites(env: environment.Environment, nucleus: str, only: str | None) -> tuple[dict, list[dict]]:
+ chain = REGISTRY.chain(nucleus, only)
+ if not chain:
+ raise PredictError(f"No predictor named {only} handles {nucleus}." if only else f"No predictor handles {nucleus}.")
+ sites: dict[tuple[int, int], Shift] = {}
+ used = []
+ for p in chain:
+ found = p.predict(env, nucleus) or {}
+ added = 0
+ for key, s in found.items():
+ site = key if isinstance(key, tuple) else (key, 0)
+ if site in sites or s is None:
+ continue
+ s.source = s.source or p.name
+ sites[site] = s
+ added += 1
+ if added:
+ used.append({"name": p.name, "method": getattr(p, "method", "") or METHOD, "version": getattr(p, "version", "") or VERSION, "sites": added})
+ return sites, used
+
+
+def _groups(env: environment.Environment, sites: dict) -> list[list[tuple[int, int]]]:
+ by_key: dict[tuple, list] = {}
+ for site, s in sorted(sites.items()):
+ key = (env.ranks[site[0]], round(s.value, 2), s.exchangeable)
+ by_key.setdefault(key, []).append(site)
+ return sorted(by_key.values(), key=lambda g: (-sites[g[0]].value, g[0]))
+
+
+def _fmt(value: float, nucleus: str) -> str:
+ return f"{value:.2f}" if nucleus == "1H" else f"{value:.1f}"
+
+
+def _label(sig: dict, nucleus: str) -> str:
+ shift = _fmt(sig["shift"], nucleus)
+ if nucleus != "1H":
+ return shift
+ parts = [sig["multiplicity"]]
+ js = [c["j"] for c in sig["couplings"]]
+ if js and sig["multiplicity"] not in ("m", "br s", "s"):
+ parts.append("J = " + ", ".join(f"{j:.1f}" for j in js) + " Hz")
+ parts.append(f"{sig['count']}H")
+ return f"{shift} ({', '.join(parts)})"
+
+
+def _worst(values) -> str:
+ return max(values, key=CONFIDENCE_ORDER.index)
+
+
+def _notes(env: environment.Environment, nucleus: str, signals: list[dict], sites: dict, groups, frequency: float) -> list[dict]:
+ notes = list(env.warnings)
+ if not signals:
+ notes.append(warning("nmr_empty", f"The structure has no {nucleus} nuclei to predict."))
+ return notes
+ if nucleus == "1H":
+ diastereotopic = []
+ for g in groups:
+ i = g[0][0]
+ nbrs = env.heavy(i)
+ if env.h_count[i] == 2 and env.sp3(i) and env.centres and len(nbrs) == 2 and env.ranks[nbrs[0]] != env.ranks[nbrs[1]]:
+ diastereotopic.extend(env.owner[a] for a, _ in g)
+ if diastereotopic:
+ notes.append(warning("nmr_diastereotopic", "CH2 protons near a stereocentre are diastereotopic and may give two signals with a geminal coupling of about 12 to 15 Hz; this first-order prediction treats each pair as equivalent.", diastereotopic))
+ exchange = [a for sig in signals if sig["exchangeable"] for a in sig["atoms"]]
+ if exchange:
+ notes.append(warning("nmr_exchangeable", "OH, NH and SH protons exchange: their shift depends on solvent, concentration and temperature, they appear as broad singlets and may not be seen in D2O or CD3OD.", exchange))
+ close = set()
+ for sig in signals:
+ for c in sig["couplings"]:
+ for other in signals:
+ if other is sig or not set(c["partners"]) & set(other["atoms"]):
+ continue
+ if abs(sig["shift"] - other["shift"]) * frequency < 3 * c["j"]:
+ close.update(sig["atoms"])
+ close.update(other["atoms"])
+ if close:
+ notes.append(warning("nmr_second_order", f"Coupled signals closer than three times their coupling at {frequency:g} MHz show roofing or second-order patterns; the simulation is first order.", sorted(close)))
+ amide = []
+ for i in range(env.mol.GetNumAtoms()):
+ if env.element(i) == "N" and not env.aromatic(i) and len(env.heavy(i)) == 3 and any(
+ env.element(n) == "C" and any(o == 2 and env.element(m) == "O" for m, o in env.multiple(n)) for n in env.heavy(i)):
+ amide.append(env.owner[i])
+ if amide:
+ notes.append(warning("nmr_rotamer", "Slow rotation about the amide C-N bond makes the two N-substituents different on the NMR time scale (two N-methyl signals in DMF); topological symmetry treats them alike.", amide))
+ low = sorted({a for sig in signals if sig["confidence"] == "low" and not sig["exchangeable"] for a in sig["atoms"]})
+ if low:
+ notes.append(warning("nmr_low_confidence", "Some environments are outside the rules FormChem knows well; their shifts are rough estimates.", low))
+ return notes
+
+
+def predict(frag: dict, nucleus: str = "1H", frequency: float | None = None, expansions: dict | None = None,
+ predictor: str | None = None) -> dict:
+ if nucleus not in NUCLEI:
+ raise PredictError(f"nucleus must be one of {', '.join(NUCLEI)}")
+ mhz = frequency_for(nucleus, frequency)
+ started = time.perf_counter()
+ if not (frag.get("atoms") or {}):
+ raise PredictError("The fragment has no atoms.")
+ env = environment.build(frag, expansions)
+ sites, used = _sites(env, nucleus, predictor)
+ methods = {u["name"]: (u["method"], u["version"]) for u in used}
+ groups = _groups(env, sites)
+ signals = []
+ for n, g in enumerate(groups):
+ rep = sites[g[0]]
+ heavy = sorted({i for i, _ in g})
+ count = sum(coupling.proton_count(env, sites, site) for site in g) if nucleus == "1H" else len(g)
+ sig = {
+ "id": f"s{n + 1}",
+ "shift": round(sum(sites[s].value for s in g) / len(g), 2 if nucleus == "1H" else 1),
+ "count": count,
+ "atoms": env.atom_ids(heavy),
+ "class": rep.cls,
+ "confidence": _worst(sites[s].confidence for s in g),
+ "uncertainty": max(sites[s].uncertainty for s in g),
+ "rule": rep.rule,
+ "terms": [{"name": k, "value": v} for k, v in rep.terms],
+ "source": rep.source,
+ "method": methods.get(rep.source, (METHOD, VERSION))[0],
+ "version": methods.get(rep.source, (METHOD, VERSION))[1],
+ "exchangeable": rep.exchangeable,
+ "range": list(rep.range) if rep.range else None,
+ }
+ if nucleus == "1H":
+ sig["hydrogens"] = sorted({h for i in heavy for h in env.h_ids.get(i, [])})
+ mult = coupling.multiplicity(env, sites, g[0], set(g))
+ sig["multiplicity"] = mult.kind
+ sig["couplings"] = [{"j": c.j, "n": c.n, "kind": c.kind, "partners": env.atom_ids(c.partners)} for c in mult.couplings]
+ sig["j"] = [c.j for c in mult.couplings]
+ sig["notes"] = mult.notes
+ else:
+ sig["multiplicity"] = "s"
+ sig["couplings"] = []
+ sig["j"] = []
+ sig["hydrogens_attached"] = env.h_count[heavy[0]]
+ sig["label"] = _label(sig, nucleus)
+ signals.append(sig)
+ atoms: dict[str, dict] = {}
+ for sig in signals:
+ for a in sig["atoms"]:
+ entry = atoms.setdefault(a, {"shifts": [], "signals": [], "confidence": sig["confidence"], "uncertainty": sig["uncertainty"],
+ "method": sig["method"], "version": sig["version"]})
+ entry["shifts"].append(sig["shift"])
+ entry["signals"].append(sig["id"])
+ entry["confidence"] = _worst((entry["confidence"], sig["confidence"]))
+ entry["uncertainty"] = max(entry["uncertainty"], sig["uncertainty"])
+ for entry in atoms.values():
+ entry["shift"] = round(sum(entry["shifts"]) / len(entry["shifts"]), 2)
+ head = f"{nucleus} NMR ({mhz:g} MHz, predicted, {METHOD} {VERSION}): δ "
+ journal = head + ", ".join(sig["label"] for sig in signals) + "." if signals else ""
+ return {
+ "fragment": frag.get("id"),
+ "nucleus": nucleus,
+ "frequency": mhz,
+ "method": METHOD,
+ "version": VERSION,
+ "description": DESCRIPTION,
+ "predictors": used,
+ "signals": signals,
+ "atoms": atoms,
+ "journal": journal,
+ "warnings": _notes(env, nucleus, signals, sites, groups, mhz),
+ "timing_ms": round((time.perf_counter() - started) * 1000, 1),
+ }
+
+
+def predict_both(frag: dict, frequency: float | None = None, expansions: dict | None = None) -> dict:
+ proton_mhz = frequency_for("1H", frequency)
+ return {"1H": predict(frag, "1H", proton_mhz, expansions), "13C": predict(frag, "13C", round(proton_mhz * CARBON_PER_PROTON, 1), expansions)}
diff --git a/backend/app/services/nmr/proton.py b/backend/app/services/nmr/proton.py
new file mode 100644
index 00000000..c2e3d4cb
--- /dev/null
+++ b/backend/app/services/nmr/proton.py
@@ -0,0 +1,411 @@
+from app.services.nmr.base import Shift
+from app.services.nmr.environment import Environment, redraw, ring_distance, ring_heteroatom
+from app.services.nmr.groups import classify, is_acyl
+
+UNCERTAINTY = {"high": 0.15, "medium": 0.3, "low": 0.6}
+LOW_KEYS = {"R", "metal", "B", "P", "Si", "Se", "Sn", "Ge", "NX", "N=", "N+", "O-", "O+", "CS", "C=N", "COX", "COO-", "CX3", "D", "Sarom"}
+ALKYL = ("CH3", "CH2R", "CHR2", "CR3", "CH2X")
+
+SP3_BASE = {4: 0.23, 3: 0.90, 2: 1.30, 1: 1.50}
+SP3_ALPHA = {
+ "Ar": (1.45, 1.35, 1.40), "vinyl": (0.80, 0.75, 0.75), "alkyne": (0.90, 0.85, 0.90), "CN": (1.10, 1.05, 1.10),
+ "CHO": (1.30, 1.15, 1.00), "COR": (1.25, 1.15, 1.10), "COOH": (1.20, 1.05, 1.05), "COOR": (1.15, 1.00, 1.00),
+ "CONR": (1.10, 0.95, 0.95), "COX": (1.75, 1.60, 1.50), "COO-": (1.00, 0.90, 0.90), "CS": (1.60, 1.50, 1.40), "C=N": (1.00, 1.00, 1.00),
+ "OH": (2.50, 2.40, 2.45), "OR": (2.40, 2.20, 2.10), "OAr": (2.90, 2.75, 3.00), "OVinyl": (2.60, 2.50, 2.50), "OCOR": (2.75, 2.80, 3.45),
+ "O-": (2.30, 2.20, 2.20), "O+": (3.00, 3.00, 3.00),
+ "NH2": (1.55, 1.45, 1.40), "NHR": (1.50, 1.35, 1.35), "NR2": (1.30, 1.25, 1.25), "NAr": (1.95, 1.85, 2.10), "NCO": (2.00, 2.00, 2.40),
+ "Narom": (2.75, 2.75, 3.00), "NO2": (3.40, 3.10, 3.10), "N+": (2.30, 2.10, 2.00), "N=": (2.40, 2.20, 2.00), "NX": (1.70, 1.70, 1.70),
+ "F": (3.35, 3.20, 3.30), "Cl": (2.15, 2.25, 2.55), "Br": (1.80, 2.10, 2.70), "I": (1.25, 1.90, 2.75),
+ "SH": (1.20, 1.25, 1.40), "SR": (1.20, 1.20, 1.30), "SO": (1.70, 1.40, 1.40), "SO2": (2.10, 1.70, 1.60), "Sarom": (1.60, 1.60, 1.60),
+ "CF3": (0.70, 0.90, 1.00), "CX3": (1.80, 1.80, 1.80), "Si": (-0.90, -0.80, -0.70), "P": (0.60, 0.60, 0.60), "B": (-0.50, -0.50, -0.50),
+ "R": (0.00, 0.00, 0.00), "metal": (-1.00, -1.00, -1.00), "D": (0.00, 0.00, 0.00),
+}
+SP3_BETA = {
+ "Ar": 0.30, "vinyl": 0.15, "alkyne": 0.25, "CN": 0.40, "CHO": 0.20, "COR": 0.15, "COOH": 0.25, "COOR": 0.25, "CONR": 0.20, "COX": 0.40,
+ "OH": 0.30, "OR": 0.25, "OAr": 0.45, "OCOR": 0.35, "OVinyl": 0.30, "NH2": 0.15, "NHR": 0.15, "NR2": 0.10, "NAr": 0.30, "NCO": 0.25,
+ "Narom": 0.50, "NO2": 0.60, "N+": 0.40, "F": 0.40, "Cl": 0.55, "Br": 0.75, "I": 0.95, "SH": 0.40, "SR": 0.35, "SO": 0.40, "SO2": 0.45,
+ "CF3": 0.25,
+}
+RING_SP3 = {3: -1.10, 4: 0.65, 5: 0.20, 6: 0.13}
+ALPHA_DAMP = (1.0, 0.8, 0.45)
+
+ALKENE = {
+ "alkyl": (0.45, -0.22, -0.28), "CH2X": (0.65, 0.00, -0.05), "CF3": (0.65, 0.40, 0.55), "CX3": (0.70, 0.20, 0.10),
+ "Ar": (1.35, 0.37, -0.10), "vinyl": (1.00, -0.09, -0.23), "alkyne": (0.45, 0.35, 0.55), "CN": (0.27, 0.75, 0.55),
+ "CHO": (1.02, 0.95, 1.17), "COR": (1.10, 1.12, 0.87), "COOH": (0.97, 1.41, 0.71), "COOR": (0.80, 1.18, 0.55),
+ "CONR": (1.37, 0.98, 0.46), "COX": (1.10, 1.40, 1.00), "COO-": (0.80, 0.40, 0.20), "C=N": (1.00, 0.80, 0.60), "CS": (1.10, 1.10, 0.90),
+ "OH": (1.20, -1.10, -1.25), "OR": (1.22, -1.07, -1.21), "OAr": (1.25, -0.90, -0.70), "OCOR": (2.11, -0.35, -0.64), "OVinyl": (1.20, -1.00, -1.10),
+ "O-": (1.00, -1.50, -1.50), "NH2": (0.80, -1.26, -1.21), "NHR": (0.80, -1.26, -1.21), "NR2": (0.80, -1.26, -1.21), "NAr": (0.90, -1.00, -1.00),
+ "NCO": (2.08, -0.57, -0.72), "Narom": (1.65, -0.40, -0.75), "NO2": (1.87, 1.32, 0.62), "N+": (1.50, 0.50, 0.50), "N=": (1.00, -0.50, -0.50),
+ "NX": (1.00, -0.50, -0.50), "F": (1.54, -0.40, -1.02), "Cl": (1.08, 0.18, 0.13), "Br": (1.07, 0.45, 0.55), "I": (1.14, 0.81, 0.88),
+ "SH": (1.00, -0.20, -0.10), "SR": (1.11, -0.29, -0.13), "SO": (1.27, 0.67, 0.41), "SO2": (1.55, 1.16, 0.93), "Sarom": (1.10, 0.00, 0.00),
+ "Si": (0.90, 0.90, 0.60), "P": (0.70, 0.50, 0.40), "B": (1.00, 0.90, 0.70), "R": (0.45, -0.22, -0.28), "metal": (1.00, 0.00, 0.00), "D": (0.0, 0.0, 0.0),
+}
+RING_ALKENE = {5: 0.30, 6: 0.25}
+
+AROMATIC = {
+ "CH3": (-0.20, -0.10, -0.20), "CH2R": (-0.15, -0.05, -0.20), "CHR2": (-0.15, -0.05, -0.20), "CR3": (0.00, -0.10, -0.25),
+ "CH2X": (-0.05, -0.05, -0.05), "CF3": (0.30, 0.15, 0.20), "CX3": (0.60, 0.10, 0.10), "Ar": (0.35, 0.15, 0.05), "vinyl": (0.05, -0.05, -0.10),
+ "alkyne": (0.15, -0.05, -0.05), "CN": (0.35, 0.20, 0.30), "CHO": (0.55, 0.20, 0.30), "COR": (0.60, 0.10, 0.20), "COOH": (0.85, 0.15, 0.25),
+ "COOR": (0.70, 0.10, 0.20), "CONR": (0.50, 0.10, 0.15), "COX": (0.85, 0.20, 0.35), "COO-": (0.60, 0.00, 0.05), "C=N": (0.45, 0.10, 0.10),
+ "CS": (0.60, 0.10, 0.20),
+ "OH": (-0.55, -0.10, -0.45), "OR": (-0.45, -0.05, -0.40), "OAr": (-0.30, -0.05, -0.25), "OCOR": (-0.25, 0.05, -0.15),
+ "OVinyl": (-0.30, -0.05, -0.25), "O-": (-0.80, -0.30, -0.90), "O+": (0.30, 0.10, 0.10),
+ "NH2": (-0.75, -0.25, -0.65), "NHR": (-0.80, -0.20, -0.70), "NR2": (-0.65, -0.20, -0.65), "NAr": (-0.25, -0.05, -0.35),
+ "NCO": (0.15, -0.05, -0.25), "Narom": (0.10, 0.10, -0.05), "NO2": (0.95, 0.25, 0.40), "N+": (0.60, 0.30, 0.40), "N=": (-0.10, 0.05, -0.05),
+ "NX": (-0.50, -0.10, -0.40),
+ "F": (-0.25, 0.00, -0.20), "Cl": (0.05, 0.00, -0.10), "Br": (0.20, -0.10, -0.05), "I": (0.40, -0.20, 0.00),
+ "SH": (-0.10, -0.15, -0.20), "SR": (-0.10, -0.10, -0.25), "SO": (0.35, 0.20, 0.20), "SO2": (0.60, 0.25, 0.30), "Sarom": (0.10, 0.00, 0.00),
+ "Si": (0.20, 0.00, 0.00), "P": (0.30, 0.10, 0.10), "B": (0.50, 0.00, 0.10), "R": (0.00, 0.00, 0.00), "metal": (0.30, 0.00, 0.00), "D": (0.0, 0.0, 0.0),
+ "oxo": (-0.60, 0.00, 0.00), "fused": (0.45, 0.10, 0.07),
+}
+SIX_RING_HETERO = {"N": (1.30, -0.05, 0.35), "N+": (1.50, 0.70, 1.10), "NH": (0.10, -0.90, 0.00), "O+": (2.00, 1.00, 1.50),
+ "O": (0.50, -0.50, 0.00), "S": (0.50, 0.00, 0.00), "X": (0.30, 0.00, 0.00)}
+FIVE_RING_HETERO = {"NH": (0.70, 0.20), "N": (1.00, 0.30), "N+": (1.30, 0.60), "O": (1.42, 0.38), "S": (1.31, 1.10), "O+": (1.50, 0.50), "X": (1.00, 0.50)}
+
+
+def _shift(value: float, confidence: str, rule: str, cls: str) -> Shift:
+ s = Shift(0.0, 0.0, confidence, rule, cls)
+ s.add(rule.split(":")[0], value)
+ return s
+
+
+def _finish(s: Shift, keys=()) -> Shift:
+ if any(k in LOW_KEYS for k in keys):
+ s.worst("low")
+ s.value = round(s.value, 2)
+ if not s.uncertainty:
+ s.uncertainty = UNCERTAINTY[s.confidence]
+ return s
+
+
+def _carbonyl_aryl(env: Environment, head: int, parent: int) -> bool:
+ return any(env.aromatic(m) for m in env.heavy(head) if m != parent)
+
+
+def _sp3(env: Environment, i: int) -> Shift:
+ n_h = env.h_count[i]
+ s = Shift(0.0, 0.0, "high", "sp3 CH: base by hydrogen count with alpha and beta substituent terms", "sp3")
+ s.add(f"base CH{n_h if n_h > 1 else ''}", SP3_BASE.get(n_h, 1.5))
+ col = {3: 0, 2: 1, 1: 2}.get(n_h, 0)
+ alphas: list[tuple[str, float]] = []
+ betas: list[tuple[str, float]] = []
+ keys = []
+ for n in env.heavy(i):
+ key = classify(env, n, i)
+ keys.append(key)
+ if key in ALKYL[:4]:
+ for m in env.heavy(n):
+ if m == i:
+ continue
+ k2 = "C" if env.sp3_carbon(m) and classify(env, m, n) in ALKYL else classify(env, m, n)
+ if k2 != "C":
+ betas.append((k2, SP3_BETA.get(k2, 0.2)))
+ continue
+ if key == "CH2X":
+ for m in env.heavy(n):
+ if m != i and not env.sp3_carbon(m):
+ k2 = classify(env, m, n)
+ betas.append((k2, SP3_BETA.get(k2, 0.2)))
+ continue
+ value = SP3_ALPHA.get(key, SP3_ALPHA["R"])[col]
+ if key == "COR" and _carbonyl_aryl(env, n, i):
+ value += 0.40
+ if key == "OCOR":
+ acyl = [m for m in env.heavy(n) if m != i and is_acyl(env, m)]
+ if acyl and _carbonyl_aryl(env, acyl[0], n):
+ value += 0.25
+ if key == "COOR":
+ ester_o = [m for m in env.heavy(n) if m != i and env.element(m) == "O" and env.order(n, m) == 1]
+ if ester_o and any(env.aromatic(x) for x in env.heavy(ester_o[0]) if x != n):
+ value += 0.25
+ alphas.append((key, value))
+ alphas.sort(key=lambda t: -t[1])
+ for k, (key, value) in enumerate(alphas):
+ s.add(f"{key} alpha", value * ALPHA_DAMP[min(k, len(ALPHA_DAMP) - 1)])
+ for k, (key, value) in enumerate(sorted(betas, key=lambda t: -t[1])):
+ s.add(f"{key} beta", value * (1.0 if k == 0 else 0.8))
+ if alphas:
+ s.cls = "sp3 next to a group"
+ if len(alphas) >= 2:
+ s.worst("medium")
+ sizes = env.ring_sizes(i)
+ if sizes:
+ s.add(f"{sizes[0]}-ring", RING_SP3.get(sizes[0], 0.1))
+ if sizes[0] < 5:
+ s.worst("medium")
+ if n_h == 2 and env.centres and len(set(env.ranks[n] for n in env.heavy(i))) == len(env.heavy(i)) == 2:
+ s.worst("medium")
+ return _finish(s, keys)
+
+
+def _side(p0, p1, q) -> float:
+ return (p1[0] - p0[0]) * (q[1] - p0[1]) - (p1[1] - p0[1]) * (q[0] - p0[0])
+
+
+def _alkene_terms(env: Environment, n: int, centre: int) -> tuple[str, tuple[float, float, float]]:
+ key = classify(env, n, centre)
+ if key in ("CH3", "CH2R", "CHR2", "CR3"):
+ return key, ALKENE["alkyl"]
+ return key, ALKENE.get(key, ALKENE["R"])
+
+
+def _alkene(env: Environment, i: int, p: int, coords) -> list[Shift]:
+ own = [n for n in env.heavy(i) if n != p]
+ far = [n for n in env.heavy(p) if n != i]
+ base = Shift(0.0, 0.0, "high", "alkene CH: ethylene base with geminal, cis and trans terms", "alkene")
+ base.add("base (ethylene)", 5.25)
+ keys = []
+ for n in own:
+ key, terms = _alkene_terms(env, n, i)
+ keys.append(key)
+ base.add(f"geminal {key}", terms[0])
+ ci, cp = coords[i], coords[p]
+ sides = {n: _side(ci, cp, coords[n]) for n in own + far}
+ if any(abs(v) < 1e-3 for v in sides.values()):
+ return []
+ if own:
+ h_sides = [-1.0 if sides[own[0]] > 0 else 1.0]
+ else:
+ h_sides = [1.0, -1.0][: env.h_count[i]]
+ out = []
+ for hs in h_sides:
+ s = Shift(base.value, 0.0, base.confidence, base.rule, base.cls, list(base.terms))
+ s.side = int(hs) if i < p else -int(hs)
+ for n in far:
+ key, terms = _alkene_terms(env, n, p)
+ keys.append(key)
+ if (sides[n] > 0) == (hs > 0):
+ s.add(f"cis {key}", terms[1])
+ else:
+ s.add(f"trans {key}", terms[2])
+ ring = env.same_ring(i, p)
+ if ring:
+ s.add(f"{len(ring)}-ring alkene", RING_ALKENE.get(len(ring), 0.1))
+ out.append(_finish(s, keys))
+ return out
+
+
+def _alkene_any(env: Environment, i: int, p: int) -> list[Shift]:
+ found = _alkene(env, i, p, env.coords)
+ if found:
+ return found
+ found = _alkene(env, i, p, redraw(env))
+ if found:
+ for s in found:
+ s.worst("medium")
+ return found
+ s = Shift(0.0, 0.0, "medium", "alkene CH: ethylene base, cis and trans averaged (geometry not drawn)", "alkene")
+ s.add("base (ethylene)", 5.25)
+ keys = []
+ for centre, other, col in ((i, p, None), (p, i, "far")):
+ for n in env.heavy(centre):
+ if n == other:
+ continue
+ key, terms = _alkene_terms(env, n, centre)
+ keys.append(key)
+ s.add(f"{'geminal' if col is None else 'cis or trans'} {key}", terms[0] if col is None else (terms[1] + terms[2]) / 2)
+ return [_finish(s, keys)]
+
+
+def _aromatic(env: Environment, i: int) -> Shift:
+ ring = env.primary_ring(i)
+ s = Shift(0.0, 0.0, "high", "aromatic CH: ring base with ortho, meta and para substituent terms", "aromatic")
+ if ring is None:
+ s.add("aromatic CH outside a ring", 7.3)
+ s.worst("low")
+ return _finish(s)
+ if len(ring) == 6:
+ s.add("benzene ring", 7.30)
+ alpha_n = 0
+ for j in ring:
+ if env.element(j) == "C":
+ continue
+ kind = ring_heteroatom(env, j)
+ pos = ring_distance(ring, i, j)
+ s.add(f"ring {kind} {('alpha', 'beta', 'gamma')[pos - 1]}", SIX_RING_HETERO.get(kind, SIX_RING_HETERO["X"])[pos - 1])
+ alpha_n += 1 if (pos == 1 and kind == "N") else 0
+ if kind != "N":
+ s.worst("medium")
+ if alpha_n >= 2:
+ s.add("two ring N alpha", -0.6)
+ elif len(ring) == 5:
+ heteros = [j for j in ring if env.element(j) != "C"]
+ s.add("five-ring base", 6.0 if heteros else 6.8)
+ for j in heteros:
+ kind = ring_heteroatom(env, j)
+ pos = ring_distance(ring, i, j)
+ s.add(f"ring {kind} {('alpha', 'beta')[pos - 1]}", FIVE_RING_HETERO.get(kind, FIVE_RING_HETERO["X"])[pos - 1])
+ s.worst("medium" if heteros else "low")
+ else:
+ s.add("aromatic ring", 7.3)
+ s.worst("low")
+ ring_set = set(ring)
+ keys = []
+ count = 0
+ for j in ring:
+ pos = ring_distance(ring, i, j)
+ if pos == 0 or (len(ring) == 5 and pos > 2):
+ continue
+ for k in env.heavy(j):
+ if k in ring_set:
+ continue
+ if env.order(j, k) == 2 and env.element(k) in ("O", "S"):
+ key = "oxo"
+ elif env.same_ring(j, k) is not None and env.element(k) == "C":
+ key = "fused"
+ else:
+ key = classify(env, k, j)
+ keys.append(key)
+ s.add(f"{key} {('ortho', 'meta', 'para')[pos - 1]}", AROMATIC.get(key, AROMATIC["R"])[pos - 1])
+ count += 1
+ if key in ("fused", "oxo"):
+ s.worst("medium")
+ if count >= 4:
+ s.worst("medium")
+ return _finish(s, keys)
+
+
+def _aldehyde(env: Environment, i: int) -> Shift:
+ rest = [n for n in env.heavy(i) if not (env.element(n) in ("O", "S") and env.order(i, n) == 2)]
+ if any(env.element(n) == "O" for n in rest):
+ return _finish(_shift(8.05, "medium", "formate CH", "aldehyde"))
+ if any(env.element(n) == "N" for n in rest):
+ return _finish(_shift(8.05, "medium", "formamide CH", "aldehyde"))
+ if any(env.aromatic(n) for n in rest):
+ return _finish(_shift(9.98, "high", "aryl aldehyde CH", "aldehyde"))
+ if any(env.multiple(n) for n in rest):
+ return _finish(_shift(9.55, "high", "conjugated aldehyde CH", "aldehyde"))
+ if not rest:
+ return _finish(_shift(9.6, "low", "formaldehyde", "aldehyde"))
+ return _finish(_shift(9.75, "high", "alkyl aldehyde CH", "aldehyde"))
+
+
+def _alkyne(env: Environment, i: int, p: int) -> Shift:
+ far = [n for n in env.heavy(p) if n != i]
+ if any(env.aromatic(n) for n in far):
+ return _finish(_shift(3.05, "high", "aryl alkyne CH", "alkyne"))
+ if any(env.multiple(n) for n in far):
+ return _finish(_shift(2.90, "medium", "conjugated alkyne CH", "alkyne"))
+ if any(not env.sp3_carbon(n) for n in far):
+ return _finish(_shift(2.40, "low", "alkyne CH next to a heteroatom", "alkyne"))
+ return _finish(_shift(1.93 if far else 1.80, "high", "alkyl alkyne CH", "alkyne"))
+
+
+EXCHANGE = {
+ "acid": (11.5, (10.0, 13.0), "carboxylic acid OH"),
+ "phenol": (5.5, (4.0, 8.0), "phenol OH"),
+ "enol": (12.0, (10.0, 16.0), "enol OH"),
+ "oxime": (9.0, (8.0, 11.0), "oxime OH"),
+ "alcohol": (2.0, (0.5, 5.0), "alcohol OH"),
+ "aryl amine": (3.6, (3.0, 5.0), "aryl amine NH"),
+ "amine": (1.3, (0.5, 3.0), "amine NH"),
+ "amide": (6.0, (5.0, 8.0), "amide NH"),
+ "anilide": (7.6, (7.0, 10.0), "aryl amide NH"),
+ "imide": (9.0, (8.0, 11.0), "imide NH"),
+ "sulfonamide": (5.0, (4.5, 7.5), "sulfonamide NH"),
+ "aromatic NH": (8.1, (7.5, 11.5), "aromatic NH (pyrrole, indole)"),
+ "azole NH": (11.0, (9.0, 13.5), "azole NH (imidazole, pyrazole)"),
+ "lactam NH": (11.0, (9.0, 12.5), "ring amide NH (pyridone, uracil)"),
+ "ammonium": (7.5, (6.0, 9.0), "ammonium NH"),
+ "thiol": (1.4, (1.0, 2.0), "thiol SH"),
+ "aryl thiol": (3.4, (3.0, 4.0), "aryl thiol SH"),
+ "water": (1.6, (1.0, 5.0), "water"),
+ "other": (3.0, (0.5, 10.0), "exchangeable H"),
+}
+
+
+def _exchange_kind(env: Environment, i: int) -> str:
+ el = env.element(i)
+ nbrs = env.heavy(i)
+ if el == "O":
+ if not nbrs:
+ return "water"
+ n = nbrs[0]
+ if is_acyl(env, n):
+ return "acid"
+ if env.aromatic(n):
+ return "phenol"
+ if env.element(n) == "N":
+ return "oxime" if env.multiple(n) else "other"
+ if env.multiple(n):
+ return "enol"
+ return "alcohol" if env.element(n) == "C" else "other"
+ if el == "N":
+ if env.atom(i).GetFormalCharge() > 0:
+ return "ammonium"
+ if env.aromatic(i):
+ ring = env.primary_ring(i)
+ if ring and len(ring) == 6:
+ return "lactam NH"
+ others = [j for j in (ring or ()) if j != i and env.element(j) != "C"]
+ return "azole NH" if others else "aromatic NH"
+ acyls = [n for n in nbrs if is_acyl(env, n)]
+ if len(acyls) >= 2:
+ return "imide"
+ if acyls:
+ return "anilide" if any(env.aromatic(n) for n in nbrs) else "amide"
+ if any(env.element(n) == "S" and any(env.element(m) == "O" and o == 2 for m, o in env.multiple(n)) for n in nbrs):
+ return "sulfonamide"
+ if any(env.aromatic(n) for n in nbrs):
+ return "aryl amine"
+ return "amine"
+ if el == "S":
+ return "aryl thiol" if any(env.aromatic(n) for n in nbrs) else "thiol"
+ return "other"
+
+
+def _exchangeable(env: Environment, i: int) -> Shift:
+ kind = _exchange_kind(env, i)
+ value, rng, rule = EXCHANGE[kind]
+ s = _shift(value, "low", f"{rule}: exchangeable, broad; the shift depends on solvent, concentration and temperature", "exchangeable")
+ s.exchangeable = True
+ s.range = rng
+ s.uncertainty = round((rng[1] - rng[0]) / 2, 2)
+ return _finish(s)
+
+
+def _other(env: Environment, i: int) -> Shift:
+ el = env.element(i)
+ value = {"Si": 4.0, "P": 7.0, "B": 2.0, "Sn": 5.0, "Ge": 4.5}.get(el, 0.0)
+ return _finish(_shift(value, "low", f"{el}-H", "other"))
+
+
+def shifts(env: Environment, i: int) -> list[Shift]:
+ el = env.element(i)
+ if env.h_count[i] == 0:
+ return []
+ if el in ("O", "N", "S", "Se"):
+ return [_exchangeable(env, i)]
+ if el != "C":
+ return [_other(env, i)]
+ if env.aromatic(i):
+ return [_aromatic(env, i)]
+ if env.sp3(i):
+ return [_sp3(env, i)]
+ mult = env.multiple(i)
+ triple = [n for n, o in mult if o == 3]
+ doubles = [n for n, o in mult if o == 2]
+ if triple:
+ return [_alkyne(env, i, triple[0])]
+ if doubles and env.element(doubles[0]) in ("O", "S"):
+ return [_aldehyde(env, i)]
+ if doubles and env.element(doubles[0]) == "N":
+ return [_finish(_shift(8.2, "medium", "imine CH", "imine"))]
+ if len(doubles) == 1 and env.element(doubles[0]) == "C":
+ return _alkene_any(env, i, doubles[0])
+ return [_finish(_shift(4.6, "low", "cumulated CH (allene)", "other"))]
+
+
+class IncrementProton:
+ name = "increments"
+ version = ""
+ nuclei = ("1H",)
+ description = "FormChem's own 1H increment rules"
+
+ def predict(self, env: Environment, nucleus: str) -> dict[tuple[int, int], Shift]:
+ out = {}
+ for i in range(env.mol.GetNumAtoms()):
+ for part, s in enumerate(shifts(env, i)):
+ out[(i, part)] = s
+ return out
diff --git a/backend/app/services/nmr/reference.py b/backend/app/services/nmr/reference.py
new file mode 100644
index 00000000..1ee21286
--- /dev/null
+++ b/backend/app/services/nmr/reference.py
@@ -0,0 +1,95 @@
+NOTE = (
+ "Typical shifts of common compounds written from general chemistry knowledge for checking FormChem's increment rules; "
+ "approximate (about 0.05 ppm for 1H and 0.5 ppm for 13C), mostly CDCl3 (paracetamol DMSO-d6), not taken from a database. "
+ "Keys are heavy-atom indices in the SMILES; h gives the shift of the protons on that atom (a pair for the two halves of a "
+ "terminal =CH2), x the exchangeable protons, which are reported apart. DMF's two N-methyl values are averaged because "
+ "topological symmetry cannot split amide rotamers."
+)
+
+REFERENCE = [
+ {"name": "ethanol", "smiles": "CCO", "c": {0: 18.3, 1: 58.2}, "h": {0: 1.23, 1: 3.70}, "x": {2: 2.6}},
+ {"name": "ethyl acetate", "smiles": "CC(=O)OCC", "c": {0: 21.0, 1: 171.1, 4: 60.5, 5: 14.2}, "h": {0: 2.04, 4: 4.12, 5: 1.26}},
+ {"name": "toluene", "smiles": "Cc1ccccc1", "c": {0: 21.4, 1: 137.9, 2: 129.1, 3: 128.3, 4: 125.4}, "h": {0: 2.35, 2: 7.17, 3: 7.25, 4: 7.15}},
+ {"name": "acetophenone", "smiles": "CC(=O)c1ccccc1", "c": {0: 26.6, 1: 198.1, 3: 137.1, 4: 128.3, 5: 128.6, 6: 133.1},
+ "h": {0: 2.61, 4: 7.96, 5: 7.46, 6: 7.56}},
+ {"name": "anisole", "smiles": "COc1ccccc1", "c": {0: 55.1, 2: 159.6, 3: 113.9, 4: 129.5, 5: 120.7}, "h": {0: 3.80, 3: 6.90, 4: 7.29, 5: 6.94}},
+ {"name": "pyridine", "smiles": "n1ccccc1", "c": {1: 149.9, 2: 123.7, 3: 135.9}, "h": {1: 8.61, 2: 7.27, 3: 7.66}},
+ {"name": "acetone", "smiles": "CC(C)=O", "c": {0: 30.8, 1: 206.7}, "h": {0: 2.17}},
+ {"name": "acetic acid", "smiles": "CC(=O)O", "c": {0: 20.8, 1: 178.0}, "h": {0: 2.10}, "x": {3: 11.4}},
+ {"name": "isopropanol", "smiles": "CC(C)O", "c": {0: 25.3, 1: 64.3}, "h": {0: 1.20, 1: 4.02}, "x": {3: 2.0}},
+ {"name": "cyclohexanone", "smiles": "O=C1CCCCC1", "c": {1: 212.0, 2: 42.0, 3: 27.1, 4: 25.1}, "h": {2: 2.33, 3: 1.86, 4: 1.72}},
+ {"name": "styrene", "smiles": "C=Cc1ccccc1", "c": {0: 113.8, 1: 136.9, 2: 137.6, 3: 126.2, 4: 128.5, 5: 127.8},
+ "h": {0: [5.24, 5.75], 1: 6.72, 3: 7.41, 4: 7.33, 5: 7.26}},
+ {"name": "benzaldehyde", "smiles": "O=Cc1ccccc1", "c": {1: 192.4, 2: 136.4, 3: 129.7, 4: 129.0, 5: 134.5}, "h": {1: 10.02, 3: 7.88, 4: 7.53, 5: 7.63}},
+ {"name": "nitrobenzene", "smiles": "O=[N+]([O-])c1ccccc1", "c": {3: 148.3, 4: 123.5, 5: 129.4, 6: 134.7}, "h": {4: 8.23, 5: 7.56, 6: 7.71}},
+ {"name": "chlorobenzene", "smiles": "Clc1ccccc1", "c": {1: 134.3, 2: 128.6, 3: 129.7, 4: 126.4}, "h": {2: 7.34, 3: 7.29, 4: 7.23}},
+ {"name": "aniline", "smiles": "Nc1ccccc1", "c": {1: 146.4, 2: 115.1, 3: 129.3, 4: 118.5}, "h": {2: 6.70, 3: 7.17, 4: 6.77}, "x": {0: 3.6}},
+ {"name": "phenol", "smiles": "Oc1ccccc1", "c": {1: 155.0, 2: 115.3, 3: 129.7, 4: 120.8}, "h": {2: 6.84, 3: 7.25, 4: 6.94}, "x": {0: 5.3}},
+ {"name": "diethyl ether", "smiles": "CCOCC", "c": {0: 15.3, 1: 65.9}, "h": {0: 1.21, 1: 3.48}},
+ {"name": "tetrahydrofuran", "smiles": "C1CCOC1", "c": {0: 25.7, 2: 67.9}, "h": {0: 1.85, 2: 3.75}},
+ {"name": "N,N-dimethylformamide", "smiles": "CN(C)C=O", "c": {0: 33.9, 3: 162.6}, "h": {0: 2.92, 3: 8.02}},
+ {"name": "acetonitrile", "smiles": "CC#N", "c": {0: 1.9, 1: 116.4}, "h": {0: 2.10}},
+ {"name": "methyl benzoate", "smiles": "COC(=O)c1ccccc1", "c": {0: 52.1, 2: 167.1, 4: 130.2, 5: 129.6, 6: 128.4, 7: 132.9},
+ "h": {0: 3.91, 5: 8.04, 6: 7.43, 7: 7.54}},
+ {"name": "ibuprofen", "smiles": "CC(C)Cc1ccc(cc1)C(C)C(=O)O",
+ "c": {0: 22.4, 1: 30.2, 3: 45.0, 4: 140.9, 5: 129.4, 6: 127.3, 7: 137.0, 10: 45.0, 11: 18.1, 12: 181.0},
+ "h": {0: 0.90, 1: 1.85, 3: 2.45, 5: 7.10, 6: 7.22, 10: 3.71, 11: 1.50}, "x": {14: 11.0}},
+ {"name": "aspirin", "smiles": "CC(=O)Oc1ccccc1C(=O)O",
+ "c": {0: 21.0, 1: 169.8, 4: 151.3, 5: 124.0, 6: 134.9, 7: 126.2, 8: 132.5, 9: 122.3, 10: 170.2},
+ "h": {0: 2.36, 5: 7.14, 6: 7.62, 7: 7.35, 8: 8.12}, "x": {12: 11.0}},
+ {"name": "caffeine", "smiles": "Cn1cnc2c1c(=O)n(C)c(=O)n2C",
+ "c": {0: 33.6, 2: 141.4, 4: 148.7, 5: 107.6, 6: 155.4, 9: 27.9, 10: 151.7, 13: 29.7}, "h": {0: 3.99, 2: 7.51, 9: 3.41, 13: 3.57}},
+ {"name": "paracetamol", "smiles": "CC(=O)Nc1ccc(O)cc1", "solvent": "DMSO-d6",
+ "c": {0: 23.8, 1: 167.6, 4: 131.1, 5: 120.9, 6: 115.1, 7: 153.2}, "h": {0: 1.98, 5: 7.34, 6: 6.68}, "x": {3: 9.65, 8: 9.15}},
+ {"name": "1-propanol", "smiles": "CCCO", "c": {0: 10.2, 1: 25.9, 2: 64.2}, "h": {0: 0.94, 1: 1.57, 2: 3.58}},
+ {"name": "2-butanone", "smiles": "CCC(C)=O", "c": {0: 7.9, 1: 36.9, 2: 209.3, 3: 29.4}, "h": {0: 1.06, 1: 2.44, 3: 2.14}},
+ {"name": "propanal", "smiles": "CCC=O", "c": {0: 6.0, 1: 37.3, 2: 203.1}, "h": {0: 1.13, 1: 2.46, 2: 9.79}},
+ {"name": "benzene", "smiles": "c1ccccc1", "c": {0: 128.4}, "h": {0: 7.36}},
+ {"name": "cyclohexane", "smiles": "C1CCCCC1", "c": {0: 26.9}, "h": {0: 1.43}},
+ {"name": "dichloromethane", "smiles": "ClCCl", "c": {1: 53.5}, "h": {1: 5.30}},
+ {"name": "chloroform", "smiles": "ClC(Cl)Cl", "c": {1: 77.2}, "h": {1: 7.26}},
+ {"name": "triethylamine", "smiles": "CCN(CC)CC", "c": {0: 11.8, 1: 46.4}, "h": {0: 1.03, 1: 2.53}},
+ {"name": "benzonitrile", "smiles": "N#Cc1ccccc1", "c": {1: 118.7, 2: 112.4, 3: 132.1, 4: 129.1, 5: 132.8}, "h": {3: 7.66, 4: 7.48, 5: 7.61}},
+ {"name": "methyl acrylate", "smiles": "C=CC(=O)OC", "c": {0: 130.6, 1: 128.3, 2: 166.5, 5: 51.5}, "h": {0: [5.82, 6.40], 1: 6.13, 5: 3.76}},
+ {"name": "thiophene", "smiles": "c1ccsc1", "c": {0: 127.2, 2: 125.4}, "h": {0: 7.12, 2: 7.33}},
+ {"name": "furan", "smiles": "c1ccoc1", "c": {0: 109.6, 2: 142.8}, "h": {0: 6.38, 2: 7.42}},
+ {"name": "pyrrole", "smiles": "c1cc[nH]c1", "c": {0: 108.2, 2: 117.9}, "h": {0: 6.24, 2: 6.74}, "x": {3: 8.1}},
+ {"name": "ethylbenzene", "smiles": "CCc1ccccc1", "c": {0: 15.6, 1: 28.9, 2: 144.2, 3: 127.9, 4: 128.4, 5: 125.7},
+ "h": {0: 1.24, 1: 2.65, 3: 7.20, 4: 7.29, 5: 7.18}},
+ {"name": "1-hexene", "smiles": "C=CCCCC", "c": {0: 114.1, 1: 139.2, 2: 33.6, 3: 31.2, 4: 22.4, 5: 14.0},
+ "h": {0: [4.93, 4.99], 1: 5.81, 2: 2.05, 3: 1.38, 4: 1.33, 5: 0.90}},
+]
+
+HOLDOUT_NOTE = (
+ "A second set the rules were never tuned on: the calibration set above shares parent compounds with the increments "
+ "(a monosubstituted benzene is where an ipso to para term comes from), so its error is optimistic and this one is the fair check."
+)
+
+HOLDOUT = [
+ {"name": "p-xylene", "smiles": "Cc1ccc(C)cc1", "c": {0: 21.0, 1: 134.7, 2: 129.0}, "h": {0: 2.30, 2: 7.05}},
+ {"name": "4-nitrotoluene", "smiles": "Cc1ccc(cc1)[N+](=O)[O-]", "c": {0: 21.6, 1: 145.9, 2: 129.8, 3: 123.5, 4: 146.2},
+ "h": {0: 2.46, 2: 7.31, 3: 8.10}},
+ {"name": "cyclopentanone", "smiles": "O=C1CCCC1", "c": {1: 219.9, 2: 38.3, 3: 23.3}, "h": {2: 2.14, 3: 1.98}},
+ {"name": "N,N-dimethylacetamide", "smiles": "CC(=O)N(C)C", "c": {0: 21.5, 1: 170.6, 4: 36.5}, "h": {0: 2.09, 4: 2.98}},
+ {"name": "tert-butyl methyl ether", "smiles": "COC(C)(C)C", "c": {0: 49.4, 2: 72.7, 3: 27.0}, "h": {0: 3.22, 3: 1.19}},
+ {"name": "ethyl benzoate", "smiles": "CCOC(=O)c1ccccc1", "c": {0: 14.3, 1: 60.9, 3: 166.6, 5: 130.6, 6: 129.5, 7: 128.3, 8: 132.8},
+ "h": {0: 1.39, 1: 4.38, 6: 8.05, 7: 7.43, 8: 7.54}},
+ {"name": "benzyl alcohol", "smiles": "OCc1ccccc1", "c": {1: 65.2, 2: 140.9, 3: 127.0, 4: 128.6, 5: 127.6},
+ "h": {1: 4.67, 3: 7.35, 4: 7.35, 5: 7.29}, "x": {0: 2.0}},
+ {"name": "1-butanol", "smiles": "CCCCO", "c": {0: 13.9, 1: 19.1, 2: 35.0, 3: 62.4}, "h": {0: 0.93, 1: 1.38, 2: 1.55, 3: 3.63}},
+ {"name": "pinacolone", "smiles": "CC(=O)C(C)(C)C", "c": {0: 24.6, 1: 213.9, 3: 44.3, 4: 26.5}, "h": {0: 2.13, 4: 1.14}},
+ {"name": "2-picoline", "smiles": "Cc1ccccn1", "c": {0: 24.5, 1: 158.3, 2: 123.3, 3: 136.3, 4: 120.8, 5: 149.2},
+ "h": {0: 2.55, 2: 7.13, 3: 7.55, 4: 7.06, 5: 8.49}},
+ {"name": "4-methoxyacetophenone", "smiles": "CC(=O)c1ccc(OC)cc1", "c": {0: 26.3, 1: 196.8, 3: 130.3, 4: 130.6, 5: 113.7, 6: 163.5, 8: 55.5},
+ "h": {0: 2.55, 4: 7.93, 5: 6.93, 8: 3.87}},
+ {"name": "cyclohexene", "smiles": "C1=CCCCC1", "c": {0: 127.3, 2: 25.3, 3: 22.9}, "h": {0: 5.67, 2: 1.99, 3: 1.61}},
+ {"name": "diethyl malonate", "smiles": "CCOC(=O)CC(=O)OCC", "c": {0: 14.0, 1: 61.5, 3: 166.8, 5: 41.6}, "h": {0: 1.28, 1: 4.20, 5: 3.36}},
+ {"name": "benzylamine", "smiles": "NCc1ccccc1", "c": {1: 46.5, 2: 143.3, 3: 127.1, 4: 128.5, 5: 126.8},
+ "h": {1: 3.85, 3: 7.30, 4: 7.32, 5: 7.24}, "x": {0: 1.5}},
+ {"name": "acetanilide", "smiles": "CC(=O)Nc1ccccc1", "c": {0: 24.5, 1: 168.5, 4: 138.0, 5: 120.0, 6: 128.9, 7: 124.3},
+ "h": {0: 2.17, 5: 7.50, 6: 7.31, 7: 7.10}, "x": {3: 7.4}},
+ {"name": "trans-cinnamic acid", "smiles": "OC(=O)/C=C/c1ccccc1", "c": {1: 172.7, 3: 117.3, 4: 147.1, 5: 134.1, 6: 128.4, 7: 129.0, 8: 130.8},
+ "h": {3: 6.46, 4: 7.80, 6: 7.56, 7: 7.41, 8: 7.42}, "x": {0: 12.0}},
+ {"name": "methyl methacrylate", "smiles": "C=C(C)C(=O)OC", "c": {0: 125.6, 1: 136.3, 2: 18.3, 3: 167.8, 6: 51.8},
+ "h": {0: [5.56, 6.10], 2: 1.95, 6: 3.75}},
+]
diff --git a/backend/app/services/nmr/simulate.py b/backend/app/services/nmr/simulate.py
new file mode 100644
index 00000000..59f14529
--- /dev/null
+++ b/backend/app/services/nmr/simulate.py
@@ -0,0 +1,136 @@
+from dataclasses import dataclass
+from math import comb
+
+import numpy as np
+
+DEFAULT_LINEWIDTH = {"1H": 1.0, "13C": 1.0}
+EXCHANGE_LINEWIDTH = 12.0
+DEFAULT_RANGE = {"1H": (12.0, -0.5), "13C": (220.0, -5.0)}
+DEFAULT_POINTS = 4000
+MAX_POINTS = 20000
+LINES_CAP = 512
+INTEGRAL_PAD = 3.5
+
+
+@dataclass
+class Line:
+ x: float
+ intensity: float
+ width: float
+ signal: str
+
+
+def split(shift: float, couplings: list[dict], frequency: float) -> list[tuple[float, float]]:
+ pattern = [(0.0, 1.0)]
+ for c in couplings:
+ n, j = int(c["n"]), float(c["j"])
+ weights = [comb(n, k) / 2 ** n for k in range(n + 1)]
+ pattern = [(off + (k - n / 2) * j, w * weights[k]) for off, w in pattern for k in range(n + 1)]
+ if len(pattern) > LINES_CAP:
+ break
+ merged: dict[float, float] = {}
+ for off, w in pattern:
+ key = round(off, 4)
+ merged[key] = merged.get(key, 0.0) + w
+ return [(shift + off / frequency, w) for off, w in sorted(merged.items(), reverse=True)]
+
+
+def lines(result: dict, linewidth: float | None = None) -> list[Line]:
+ nucleus, freq = result["nucleus"], float(result["frequency"])
+ width_hz = float(linewidth) if linewidth else DEFAULT_LINEWIDTH.get(nucleus, 1.0)
+ out = []
+ for sig in result["signals"]:
+ if nucleus == "1H":
+ wide = EXCHANGE_LINEWIDTH if sig["exchangeable"] else width_hz
+ for x, w in split(sig["shift"], sig["couplings"], freq):
+ out.append(Line(x, w * sig["count"], wide / freq, sig["id"]))
+ else:
+ out.append(Line(sig["shift"], float(sig["count"]), width_hz / freq, sig["id"]))
+ return out
+
+
+def full_range(result: dict) -> tuple[float, float]:
+ hi, lo = DEFAULT_RANGE.get(result["nucleus"], (12.0, -0.5))
+ shifts = [s["shift"] for s in result["signals"]]
+ if shifts:
+ pad = 0.5 if result["nucleus"] == "1H" else 5.0
+ hi, lo = max(hi, max(shifts) + pad), min(lo, min(shifts) - pad)
+ return hi, lo
+
+
+def _grid(found: list[Line], lo: float, hi: float, n: int) -> np.ndarray:
+ base = max(64, n // 2)
+ xs = [np.linspace(lo, hi, base)]
+ inside = [ln for ln in found if lo - 10 * ln.width <= ln.x <= hi + 10 * ln.width]
+ if inside:
+ per = int(max(7, min(61, (n - base) // len(inside)))) | 1
+ offsets = np.sinh(np.linspace(-3.0, 3.0, per)) / np.sinh(3.0) * 12.0
+ for ln in inside:
+ xs.append(ln.x + offsets * ln.width)
+ grid = np.unique(np.concatenate(xs))
+ grid = grid[(grid >= lo) & (grid <= hi)]
+ if grid.size > n:
+ keep = np.linspace(0, grid.size - 1, n).round().astype(int)
+ peaks = np.searchsorted(grid, [ln.x for ln in inside]).clip(0, grid.size - 1)
+ grid = grid[np.unique(np.concatenate([keep, peaks]))]
+ return grid[::-1]
+
+
+def evaluate(found: list[Line], xs: np.ndarray) -> np.ndarray:
+ y = np.zeros_like(xs)
+ for ln in found:
+ g = ln.width / 2
+ y += ln.intensity * (g / np.pi) / ((xs - ln.x) ** 2 + g * g)
+ return y
+
+
+def spectrum(result: dict, linewidth: float | None = None, x_from: float | None = None, x_to: float | None = None,
+ n: int | None = None) -> dict:
+ found = lines(result, linewidth)
+ hi, lo = full_range(result)
+ a = hi if x_from is None else float(x_from)
+ b = lo if x_to is None else float(x_to)
+ lo_r, hi_r = min(a, b), max(a, b)
+ count = int(min(MAX_POINTS, max(16, n or DEFAULT_POINTS)))
+ xs = _grid(found, lo_r, hi_r, count)
+ top = float(evaluate(found, np.array([ln.x for ln in found])).max()) if found else 1.0
+ ys = evaluate(found, xs) / (top or 1.0) * 100.0 if found else np.zeros_like(xs)
+ return {
+ "x": [round(float(v), 5) for v in xs],
+ "y": [round(float(v), 4) for v in ys],
+ "range": {"from": hi_r, "to": lo_r},
+ "full": {"x_min": lo, "x_max": hi, "y_min": 0.0, "y_max": 100.0},
+ "lines": [{"x": round(ln.x, 5), "area": round(ln.intensity, 4), "height": round(float(h) / (top or 1.0) * 100.0, 3), "signal": ln.signal}
+ for ln, h in zip(found, evaluate(found, np.array([ln.x for ln in found])) if found else [])],
+ "linewidth_hz": float(linewidth) if linewidth else DEFAULT_LINEWIDTH.get(result["nucleus"], 1.0),
+ "scale": 100.0 / (top or 1.0),
+ }
+
+
+def multiplets(result: dict, fragment: str, linewidth: float | None = None) -> list[dict]:
+ found = lines(result, linewidth)
+ out = []
+ for sig in result["signals"]:
+ mine = [ln for ln in found if ln.signal == sig["id"]]
+ if not mine:
+ continue
+ pad = max(ln.width for ln in mine) * 3
+ entry = {
+ "id": sig["id"],
+ "from": round(max(ln.x for ln in mine) + pad, 4),
+ "to": round(min(ln.x for ln in mine) - pad, 4),
+ "integral": [round(max(ln.x for ln in mine) + pad * INTEGRAL_PAD, 4), round(min(ln.x for ln in mine) - pad * INTEGRAL_PAD, 4)],
+ "shift": sig["shift"],
+ "kind": sig["multiplicity"],
+ "j": sig["j"],
+ "count": sig["count"],
+ "label": sig["label"],
+ "confidence": sig["confidence"],
+ "uncertainty": sig["uncertainty"],
+ "atoms": {"object": fragment, "atoms": sig["atoms"]},
+ "lines": [round(ln.x, 5) for ln in mine],
+ }
+ if sig.get("hydrogens"):
+ entry["hydrogens"] = sig["hydrogens"]
+ out.append(entry)
+ return out
diff --git a/backend/app/services/nmr/source.py b/backend/app/services/nmr/source.py
new file mode 100644
index 00000000..6f5187e1
--- /dev/null
+++ b/backend/app/services/nmr/source.py
@@ -0,0 +1,76 @@
+from app.services.nmr import METHOD, VERSION, predict, simulate
+
+HOOK_POINTS = 16000
+
+
+class SourceError(ValueError):
+ def __init__(self, message: str, status: int = 422) -> None:
+ super().__init__(message)
+ self.status = status
+
+
+def settings(doc: dict, obj: dict) -> tuple[dict, str, float | None, dict]:
+ src = (obj.get("source") or {}).get("predicted")
+ if not isinstance(src, dict):
+ raise SourceError("The spectrum is not a prediction.")
+ fid = src.get("fragment")
+ frag = (doc.get("objects") or {}).get(fid) if isinstance(fid, str) else None
+ if not isinstance(frag, dict) or frag.get("kind") != "fragment":
+ raise SourceError(f"The structure {fid} this prediction belongs to is no longer in the drawing.", 409)
+ nucleus = obj.get("nucleus") or "1H"
+ if nucleus not in predict.DEFAULT_FREQUENCY:
+ raise SourceError(f"FormChem predicts 1H and 13C spectra, not {nucleus}.", 409)
+ return frag, nucleus, src.get("frequency"), src
+
+
+def series(doc: dict, obj: dict, n: int | None = None, linewidth: float | None = None,
+ x_from: float | None = None, x_to: float | None = None) -> tuple[dict, dict]:
+ frag, nucleus, frequency, _ = settings(doc, obj)
+ try:
+ result = predict.predict(frag, nucleus, frequency, doc.get("expansions"))
+ except predict.PredictError as exc:
+ raise SourceError(str(exc), 409) from exc
+ return result, simulate.spectrum(result, linewidth, x_from, x_to, n)
+
+
+def metadata(result: dict, src: dict) -> dict:
+ meta = {
+ "METHOD": f"{METHOD} {VERSION}",
+ ".OBSERVE NUCLEUS": result["nucleus"],
+ ".OBSERVE FREQUENCY": result["frequency"],
+ "FRAGMENT": result["fragment"],
+ "DECOUPLED": "1H" if result["nucleus"] == "13C" else "no",
+ }
+ asked = src.get("version")
+ if asked and asked != VERSION:
+ meta["STORED VERSION"] = asked
+ return meta
+
+
+def hook(doc: dict, obj: dict):
+ from app.services.spectra import source as spectra_source
+
+ try:
+ result, sp = series(doc, obj, HOOK_POINTS)
+ except SourceError as exc:
+ raise spectra_source.SourceError(str(exc), exc.status) from exc
+ _, _, _, src = settings(doc, obj)
+ nucleus = result["nucleus"]
+ title = f"Predicted {nucleus} NMR, {result['frequency']:g} MHz"
+ found = spectra_source.synthetic("nmr", list(reversed(sp["x"])), list(reversed(sp["y"])), title=title, nucleus=nucleus,
+ frequency=result["frequency"], metadata=metadata(result, src), method=f"{METHOD} {VERSION}")
+ asked = src.get("version")
+ if asked and asked != VERSION:
+ found.issues.info("predicted_version", f"Stored as {METHOD} {asked}; recomputed with {VERSION}.")
+ for w in result["warnings"]:
+ found.issues.info(w["code"], w["text"])
+ return found
+
+
+def register() -> bool:
+ try:
+ from app.services.spectra import source as spectra_source
+ except ImportError:
+ return False
+ spectra_source.PREDICTORS[METHOD] = hook
+ return True
diff --git a/backend/app/services/package.py b/backend/app/services/package.py
index 109d793c..4a83da08 100644
--- a/backend/app/services/package.py
+++ b/backend/app/services/package.py
@@ -24,6 +24,11 @@
"image/tiff": ".tif",
"image/bmp": ".bmp",
"application/pdf": ".pdf",
+ "chemical/x-jcamp-dx": ".jdx",
+ "chemical/x-pdb": ".pdb",
+ "chemical/x-mmcif": ".cif",
+ "chemical/x-mdl-sdfile": ".sdf",
+ "chemical/x-mdl-molfile": ".mol",
}
diff --git a/backend/app/services/spectra/__init__.py b/backend/app/services/spectra/__init__.py
new file mode 100644
index 00000000..39cc9ccc
--- /dev/null
+++ b/backend/app/services/spectra/__init__.py
@@ -0,0 +1,5 @@
+from app import __version__
+
+READER = f"FormChem JCAMP-DX reader {__version__}"
+MIME = "chemical/x-jcamp-dx"
+SUFFIXES = (".jdx", ".dx", ".jcamp")
diff --git a/backend/app/services/spectra/asdf.py b/backend/app/services/spectra/asdf.py
new file mode 100644
index 00000000..c9d2e54f
--- /dev/null
+++ b/backend/app/services/spectra/asdf.py
@@ -0,0 +1,121 @@
+import math
+import re
+from dataclasses import dataclass
+
+SQZ = {"@": 0, **{c: i + 1 for i, c in enumerate("ABCDEFGHI")}, **{c: -(i + 1) for i, c in enumerate("abcdefghi")}}
+DIF = {"%": 0, **{c: i + 1 for i, c in enumerate("JKLMNOPQR")}, **{c: -(i + 1) for i, c in enumerate("jklmnopqr")}}
+DUP = {**{c: i + 1 for i, c in enumerate("STUVWXYZ")}, "s": 9}
+
+_DIGITS = r"(?:\d+\.?\d*|\.\d+)"
+_TOKEN = re.compile(
+ rf"(?P[+-]?{_DIGITS}(?:[eE][+-]\d+)?)"
+ rf"|(?P[@A-Ia-i](?:\d+\.?\d*|\.\d+)?)"
+ rf"|(?P[%J-Rj-r](?:\d+\.?\d*|\.\d+)?)"
+ rf"|(?P[S-Zs]\d*)"
+ r"|(?P\?)"
+ r"|(?P[\s,;]+)"
+ r"|(?P.)"
+)
+
+ABS, DIFF, DUPL, MISSING = "abs", "dif", "dup", "missing"
+
+
+@dataclass
+class Line:
+ x: float | None
+ ys: list[float]
+ ended_dif: bool
+ forms: set[str]
+ bad: int
+ dif_start: bool = False
+ toks: tuple = ()
+
+
+def _lead(table: dict[str, int], token: str) -> float:
+ head, rest = table[token[0]], token[1:]
+ digits = f"{abs(head)}{rest}"
+ value = float(digits) if digits else float(abs(head))
+ return -value if head < 0 else value
+
+
+def tokens(text: str) -> tuple[list[tuple[str, float]], set[str], int]:
+ out: list[tuple[str, float]] = []
+ forms: set[str] = set()
+ bad = 0
+ prev = "sep"
+ for m in _TOKEN.finditer(text):
+ kind = m.lastgroup
+ t = m.group()
+ packed = prev not in ("sep", "bad")
+ prev = kind
+ if kind == "affn":
+ out.append((ABS, float(t)))
+ forms.add("PAC" if packed and t[0] in "+-" else "AFFN")
+ elif kind == "sqz":
+ out.append((ABS, _lead(SQZ, t)))
+ forms.add("SQZ")
+ elif kind == "dif":
+ out.append((DIFF, _lead(DIF, t)))
+ forms.add("DIF")
+ elif kind == "dup":
+ out.append((DUPL, float(f"{DUP[t[0]]}{t[1:]}")))
+ forms.add("DUP")
+ elif kind == "miss":
+ out.append((MISSING, math.nan))
+ elif kind == "bad":
+ bad += 1
+ return out, forms, bad
+
+
+def expand(toks: list[tuple[str, float]], before: float | None = None) -> tuple[list[float], bool, bool, int]:
+ values: list[float] = []
+ last = ABS
+ step = 0.0
+ dif_start = False
+ lost = 0
+ for kind, v in toks:
+ if kind == ABS or kind == MISSING:
+ values.append(v)
+ last = ABS
+ elif kind == DIFF:
+ base = values[-1] if values else before
+ if base is None:
+ lost += 1
+ continue
+ if not values:
+ dif_start = True
+ values.append(base + v)
+ step = v
+ last = DIFF
+ elif kind == DUPL:
+ n = int(v)
+ if not values or n < 1:
+ lost += 1
+ continue
+ for _ in range(n - 1):
+ values.append(values[-1] + step if last == DIFF else values[-1])
+ return values, last == DIFF, dif_start, lost
+
+
+def line(text: str, before: float | None = None) -> Line:
+ toks, forms, bad = tokens(text)
+ if not toks:
+ return Line(None, [], False, forms, bad)
+ head_kind, head = toks[0]
+ if head_kind != ABS:
+ return Line(None, [], False, forms, bad + 1)
+ ys, ended, dif_start, lost = expand(toks[1:], before)
+ return Line(head, ys, ended, forms, bad + lost, dif_start, tuple(toks[1:]))
+
+
+def rebase(ln: Line, start: float) -> list[float]:
+ if not ln.toks or ln.toks[0][0] != ABS:
+ return ln.ys
+ found, _, _, _ = expand([(ABS, start), *ln.toks[1:]])
+ return found
+
+
+def values(text: str) -> tuple[list[float], set[str], int]:
+ toks, forms, bad = tokens(text)
+ found, _, _, lost = expand(toks)
+ return found, forms, bad + lost
diff --git a/backend/app/services/spectra/display.py b/backend/app/services/spectra/display.py
new file mode 100644
index 00000000..f8884e39
--- /dev/null
+++ b/backend/app/services/spectra/display.py
@@ -0,0 +1,137 @@
+import math
+
+import numpy as np
+
+from app.services.spectra import technique as tech
+
+N_DEFAULT, N_MIN, N_MAX = 2000, 16, 20000
+FLOOR = 1e-6
+
+
+def clamp_n(n: int | None) -> int:
+ return N_DEFAULT if n is None else max(N_MIN, min(N_MAX, int(n)))
+
+
+def convert(y: np.ndarray, frm: str, to: str | None) -> np.ndarray:
+ if not to or frm == to:
+ return y
+ if frm == tech.TRANSMITTANCE and to == tech.ABSORBANCE:
+ return -np.log10(np.clip(y / 100.0, FLOOR, None))
+ if frm == tech.ABSORBANCE and to == tech.TRANSMITTANCE:
+ return 100.0 * np.power(10.0, -y)
+ return y
+
+
+def mode(s, wanted: str | None) -> str:
+ modes = s.y_modes()
+ return wanted if wanted in modes else s.y_quantity
+
+
+def hz_to_ppm(hz, mhz: float):
+ return np.asarray(hz, dtype=float) / mhz
+
+
+def ppm_to_hz(ppm, mhz: float):
+ return np.asarray(ppm, dtype=float) * mhz
+
+
+def _finite_range(a: np.ndarray) -> tuple[float, float] | None:
+ f = a[np.isfinite(a)]
+ return (float(f.min()), float(f.max())) if f.size else None
+
+
+def auto_view(s, y_mode: str | None = None) -> dict:
+ q = mode(s, y_mode)
+ xr = _finite_range(s.x) or (0.0, 1.0)
+ if s.kind == tech.STICKS:
+ pad = max(1.0, 0.05 * (xr[1] - xr[0]))
+ xr = (max(0.0, xr[0] - pad) if xr[0] >= 0 else xr[0] - pad, xr[1] + pad)
+ y = convert(s.y, s.y_quantity, q)
+ lo, hi = _finite_range(y) or (0.0, 1.0)
+ span = (hi - lo) or abs(hi) or 1.0
+ if q == tech.TRANSMITTANCE:
+ y_from, y_to = min(0.0, lo), max(100.0, hi)
+ elif s.kind == tech.STICKS or q in (tech.ABSORBANCE, "abundance"):
+ y_from, y_to = min(0.0, lo - 0.05 * span if lo < 0 else 0.0), hi + 0.05 * span
+ else:
+ y_from, y_to = lo - 0.05 * span, hi + 0.05 * span
+ left, right = (xr[1], xr[0]) if s.direction == tech.DECREASING else (xr[0], xr[1])
+ return {"x_from": left, "x_to": right, "y_from": y_from, "y_to": y_to}
+
+
+def merged_view(s, view: dict | None, y_mode: str | None) -> dict:
+ out = auto_view(s, y_mode)
+ for key in ("x_from", "x_to", "y_from", "y_to"):
+ v = (view or {}).get(key)
+ if isinstance(v, (int, float)) and not isinstance(v, bool) and math.isfinite(v):
+ out[key] = float(v)
+ return out
+
+
+def window(x: np.ndarray, lo: float, hi: float, pad: bool) -> np.ndarray:
+ a, b = min(lo, hi), max(lo, hi)
+ idx = np.flatnonzero((x >= a) & (x <= b))
+ if not pad or not idx.size:
+ return idx
+ first, last = int(idx[0]), int(idx[-1])
+ if last - first + 1 == idx.size:
+ return np.arange(max(0, first - 1), min(x.size, last + 2))
+ return idx
+
+
+def minmax(idx: np.ndarray, y: np.ndarray, n: int) -> np.ndarray:
+ m = idx.size
+ if m <= n:
+ return idx
+ buckets = max(1, n // 2)
+ edges = np.linspace(0, m, buckets + 1).astype(int)
+ seg_y = y[idx]
+ low = np.where(np.isfinite(seg_y), seg_y, np.inf)
+ high = np.where(np.isfinite(seg_y), seg_y, -np.inf)
+ keep = np.empty(2 * buckets, dtype=np.int64)
+ k = 0
+ for a, b in zip(edges[:-1], edges[1:]):
+ if b <= a:
+ continue
+ keep[k] = a + int(np.argmin(low[a:b]))
+ keep[k + 1] = a + int(np.argmax(high[a:b]))
+ k += 2
+ return idx[np.unique(np.concatenate(([0, m - 1], keep[:k])))]
+
+
+def tallest(idx: np.ndarray, y: np.ndarray, n: int) -> np.ndarray:
+ if idx.size <= n:
+ return idx
+ order = np.argsort(-np.nan_to_num(y[idx], nan=-np.inf), kind="stable")[:n]
+ return np.sort(idx[order])
+
+
+def _list(a: np.ndarray) -> list:
+ return [None if not math.isfinite(v) else v for v in a.astype(float).tolist()]
+
+
+def points(s, lo: float | None, hi: float | None, n: int, y_mode: str | None = None, want_imag: bool = False) -> dict:
+ q = mode(s, y_mode)
+ y = convert(s.y, s.y_quantity, q)
+ full = _finite_range(s.x) or (0.0, 0.0)
+ a = full[0] if lo is None else lo
+ b = full[1] if hi is None else hi
+ sticks = s.kind == tech.STICKS
+ idx = window(s.x, a, b, not sticks)
+ total = int(idx.size)
+ chosen = tallest(idx, y, n) if sticks else minmax(idx, y, n)
+ order = np.argsort(s.x[chosen], kind="stable")
+ if s.direction == tech.DECREASING:
+ order = order[::-1]
+ chosen = chosen[order]
+ left, right = (max(a, b), min(a, b)) if s.direction == tech.DECREASING else (min(a, b), max(a, b))
+ yr = _finite_range(y) or (0.0, 0.0)
+ return {
+ "x": _list(s.x[chosen]), "y": _list(y[chosen]),
+ "imag": _list(s.imag[chosen]) if want_imag and s.imag is not None else None,
+ "n": int(chosen.size), "total": total, "decimated": int(chosen.size) < total,
+ "range": {"from": left, "to": right},
+ "full": {"x_min": full[0], "x_max": full[1], "y_min": yr[0], "y_max": yr[1]},
+ "direction": s.direction, "y_mode": q if s.y_modes() else None, "y_modes": s.y_modes(),
+ "axis": {"x": s.x_axis(), "y": s.y_axis(q)},
+ }
diff --git a/backend/app/services/spectra/document.py b/backend/app/services/spectra/document.py
new file mode 100644
index 00000000..c9346a4f
--- /dev/null
+++ b/backend/app/services/spectra/document.py
@@ -0,0 +1,122 @@
+import base64
+from pathlib import Path
+
+from app import __version__
+from app.core import config, files
+from app.services import model
+from app.services.spectra import MIME, SUFFIXES, jcamp, source
+
+READ_LIMIT = 64 * 1024 * 1024
+ASPECT = 0.55
+MIN_H = 150.0
+GAP = 18.0
+
+
+class SpectrumFileError(ValueError):
+ pass
+
+
+def is_spectrum_file(path: str | Path) -> bool:
+ return Path(path).suffix.lower() in SUFFIXES
+
+
+def sniff(data: bytes) -> bool:
+ head = data[:4096].lstrip(b"\xef\xbb\xbf \t\r\n")
+ return head.startswith(b"##") and b"##TITLE" in head.upper().replace(b" ", b"")
+
+
+def media_entry(name: str, data: bytes) -> dict:
+ return {"name": files.safe_name(name, "Spectrum.jdx"), "mime": MIME, "bytes": len(data), "sha256": source.digest(data)}
+
+
+def _locale() -> str | None:
+ found = config.read_settings().get("locale")
+ return found if isinstance(found, str) and found else None
+
+
+def boxes(page: dict, count: int) -> list[tuple[float, float, float, float]]:
+ size = page.get("size") if isinstance(page.get("size"), dict) else model.page_size_for(None)
+ margin = float(page.get("margins", 36))
+ w = max(100.0, size["w"] - 2 * margin)
+ room = size["h"] - 2 * margin
+ h = max(MIN_H, min(w * ASPECT, (room - GAP * (count - 1)) / max(1, count)))
+ return [(margin, margin + i * (h + GAP), w, h) for i in range(count)]
+
+
+def spectrum_object(s: jcamp.Spectrum, media_id: str, object_id: str, box: tuple[float, float, float, float]) -> dict:
+ x, y, w, h = box
+ obj: dict = {"id": object_id, "kind": "spectrum", "x": round(x, 2), "y": round(y, 2), "w": round(w, 2), "h": round(h, 2),
+ "technique": s.technique, "source": {"media": media_id, "block": s.index}, "peaks": []}
+ if s.nucleus:
+ obj["nucleus"] = s.nucleus
+ if s.y_modes():
+ obj["view"] = {"y_mode": s.y_quantity}
+ if s.technique == "nmr":
+ obj["integrals"] = []
+ return obj
+
+
+def report_items(f: jcamp.JcampFile) -> list[dict]:
+ items = f.report()
+ for k in f.skipped:
+ if k.get("data_type") == "LINK":
+ continue
+ items.append({"code": "block_skipped", "severity": "info", "count": 1,
+ "text": f"Block \"{k.get('title') or 'untitled'}\" was not drawn: {k.get('reason')}."})
+ return items
+
+
+def read(path: str | Path) -> tuple[Path, bytes]:
+ p = Path(path).expanduser()
+ try:
+ with open(p, "rb") as fh:
+ data = fh.read(READ_LIMIT + 1)
+ except OSError as exc:
+ raise SpectrumFileError(f"Could not read {p.name}: {exc.strerror or exc}.") from exc
+ if len(data) > READ_LIMIT:
+ raise SpectrumFileError(f"{p.name} is larger than {READ_LIMIT // (1024 * 1024)} MB.")
+ return p, data
+
+
+def drawing(name: str, data: bytes) -> tuple[dict, dict[str, bytes], list[dict]]:
+ try:
+ f = source.parsed(data)
+ except jcamp.JcampError as exc:
+ raise SpectrumFileError(f"Could not read {name} as JCAMP-DX: {exc}") from exc
+ doc = model.empty_document(Path(name).stem or "Spectrum", _locale(), f"formchem {__version__}")
+ page = doc["pages"][0]
+ used = {doc["id"], page["id"]}
+
+ def fresh(prefix: str) -> str:
+ found = model.new_id(prefix)
+ while found in used:
+ found = model.new_id(prefix)
+ used.add(found)
+ return found
+
+ mid = fresh("m")
+ doc["media"] = {mid: media_entry(name, data)}
+ for s, box in zip(f.spectra, boxes(page, len(f.spectra))):
+ oid = fresh("o")
+ doc["objects"][oid] = spectrum_object(s, mid, oid, box)
+ page["order"].append(oid)
+ items = report_items(f)
+ doc["meta"]["imported"] = {"name": name, "format": "JCAMP-DX", "report": items}
+ errors = model.validate(doc)
+ if errors:
+ raise SpectrumFileError(f"{name} could not be turned into a FormChem drawing: {errors[0]}.")
+ return doc, {mid: data}, items
+
+
+def open_file(path: str | Path) -> tuple[dict, dict[str, bytes], list[dict]]:
+ p, data = read(path)
+ return drawing(p.name, data)
+
+
+def for_insert(path: str | Path) -> dict:
+ p, data = read(path)
+ doc, media, items = drawing(p.name, data)
+ urls = {mid: f"data:{MIME};base64,{base64.b64encode(raw).decode('ascii')}" for mid, raw in media.items()}
+ count = len(doc["pages"][0]["order"])
+ return {"name": p.name, "format": "JCAMP-DX", "document": doc, "media": urls, "keep_style": True, "structures": 0,
+ "spectra": count, "report": items, "warnings": [i["text"] for i in items if i.get("severity") != "info"]}
diff --git a/backend/app/services/spectra/export.py b/backend/app/services/spectra/export.py
new file mode 100644
index 00000000..98d11e56
--- /dev/null
+++ b/backend/app/services/spectra/export.py
@@ -0,0 +1,137 @@
+import math
+
+import numpy as np
+
+from app.services.spectra import READER, display
+from app.services.spectra import technique as tech
+
+LINE = 80
+X_UNITS_OUT = {"cm-1": "1/CM", "nm": "NANOMETERS", "um": "MICROMETERS", "ppm": "PPM", "Hz": "HZ", "m/z": "M/Z", "s": "SECONDS"}
+Y_UNITS_OUT = {tech.TRANSMITTANCE: "TRANSMITTANCE", tech.ABSORBANCE: "ABSORBANCE", "reflectance": "REFLECTANCE",
+ "kubelka-munk": "KUBELKA-MUNK", "abundance": "RELATIVE ABUNDANCE", "intensity": "ARBITRARY UNITS"}
+DATA_TYPES = {"ir": "INFRARED SPECTRUM", "raman": "RAMAN SPECTRUM", "uvvis": "UV/VIS SPECTRUM", "ms": "MASS SPECTRUM", "nmr": "NMR SPECTRUM"}
+REWRITTEN = frozenset({"TITLE", "JCAMP-DX", "DATA TYPE", "DATA CLASS", "XUNITS", "YUNITS", "XFACTOR", "YFACTOR", "FIRSTX", "LASTX",
+ "NPOINTS", "FIRSTY", "DELTAX", "MINX", "MAXX", "MINY", "MAXY", "NTUPLES", "BLOCK_ID", "BLOCKS",
+ ".SHIFT REFERENCE", "END"})
+
+
+def num(v: float) -> str:
+ if not math.isfinite(v):
+ return "?"
+ text = format(float(v) + 0.0, ".10g")
+ return text[:-2] if text.endswith(".0") else text
+
+
+def _clean(text: str) -> str:
+ return " ".join(str(text).replace("##", "#").split())
+
+
+def _slice(s, lo: float | None, hi: float | None) -> np.ndarray:
+ if lo is None and hi is None:
+ return np.arange(s.x.size)
+ full = (float(np.nanmin(s.x)), float(np.nanmax(s.x)))
+ return display.window(s.x, full[0] if lo is None else lo, full[1] if hi is None else hi, False)
+
+
+def _equidistant(x: np.ndarray) -> bool:
+ if x.size < 3:
+ return False
+ d = np.diff(x)
+ return bool(np.allclose(d, d[0], rtol=1e-6, atol=1e-12 * max(1.0, abs(float(x[0])))))
+
+
+def _header(s, y_mode: str, data_class: str, block_id: int | None) -> list[str]:
+ out = [f"##TITLE={_clean(s.title)}", "##JCAMP-DX=5.01 $$ " + READER, f"##DATA TYPE={s.data_type or DATA_TYPES.get(s.technique, 'SPECTRUM')}",
+ f"##DATA CLASS={data_class}"]
+ if block_id is not None:
+ out.append(f"##BLOCK_ID={block_id}")
+ for label, value in s.metadata.items():
+ if label.upper() in REWRITTEN or label.replace(" ", "").upper() in ("JCAMPDX", "DATATYPE", "DATACLASS", "BLOCKID"):
+ continue
+ lines = str(value).splitlines() or [""]
+ out.append(f"##{label}={lines[0]}")
+ out.extend(line.replace("##", "#") for line in lines[1:])
+ out.append(f"##XUNITS={X_UNITS_OUT.get(s.x_unit, s.x_unit.upper() or 'ARBITRARY UNITS')}")
+ out.append(f"##YUNITS={Y_UNITS_OUT.get(y_mode, 'ARBITRARY UNITS')}")
+ return out
+
+
+def _xydata(x: np.ndarray, y: np.ndarray) -> list[str]:
+ step = (float(x[-1]) - float(x[0])) / (x.size - 1)
+ out = [f"##FIRSTX={num(float(x[0]))}", f"##LASTX={num(float(x[-1]))}", f"##DELTAX={num(step)}", f"##NPOINTS={x.size}",
+ "##XFACTOR=1", "##YFACTOR=1", f"##FIRSTY={num(float(y[0]))}", "##XYDATA=(X++(Y..Y))"]
+ i = 0
+ while i < x.size:
+ line = num(float(x[i]))
+ j = i
+ while j < x.size:
+ token = " " + num(float(y[j]))
+ if len(line) + len(token) > LINE and j > i:
+ break
+ line += token
+ j += 1
+ out.append(line)
+ i = j
+ return out
+
+
+def _pairs(label: str, x: np.ndarray, y: np.ndarray) -> list[str]:
+ return [f"##NPOINTS={x.size}", "##XFACTOR=1", "##YFACTOR=1", f"##{label}=(XY..XY)"] + [f"{num(float(a))}, {num(float(b))}" for a, b in zip(x, y)]
+
+
+def _block(s, idx: np.ndarray, y_mode: str, block_id: int | None) -> list[str]:
+ x = s.x[idx]
+ y = display.convert(s.y, s.y_quantity, y_mode)[idx]
+ if s.kind == tech.STICKS:
+ return _header(s, y_mode, "PEAK TABLE", block_id) + _pairs("PEAK TABLE", x, y) + ["##END="]
+ if _equidistant(x):
+ return _header(s, y_mode, "XYDATA", block_id) + _xydata(x, y) + ["##END="]
+ return _header(s, y_mode, "XYPOINTS", block_id) + _pairs("XYPOINTS", x, y) + ["##END="]
+
+
+def jdx(s, peaks: list[dict] | None = None, y_mode: str | None = None, lo: float | None = None, hi: float | None = None) -> tuple[str, list[str]]:
+ q = display.mode(s, y_mode)
+ idx = _slice(s, lo, hi)
+ notes: list[str] = []
+ if s.imag is not None:
+ notes.append("The imaginary NMR channel is not written; only the real spectrum is.")
+ if not idx.size:
+ raise ValueError("There are no points in the chosen range.")
+ marks = [p for p in (peaks or []) if isinstance(p.get("x"), (int, float)) and not isinstance(p.get("x"), bool)]
+ if not marks:
+ return "\n".join(_block(s, idx, q, None)) + "\n", notes
+ px = np.asarray([float(p["x"]) for p in marks])
+ py = np.asarray([float(p["y"]) if isinstance(p.get("y"), (int, float)) else math.nan for p in marks])
+ out = [f"##TITLE={_clean(s.title)} with peaks", "##JCAMP-DX=5.01 $$ " + READER, "##DATA TYPE=LINK", "##BLOCKS=2"]
+ out += _block(s, idx, q, 1)
+ out += [f"##TITLE={_clean(s.title)} peaks", "##JCAMP-DX=5.01", f"##DATA TYPE={s.data_type or DATA_TYPES.get(s.technique, 'SPECTRUM')}",
+ "##DATA CLASS=PEAK TABLE", "##BLOCK_ID=2", "##CROSS REFERENCE=BLOCK_ID= 1",
+ f"##XUNITS={X_UNITS_OUT.get(s.x_unit, s.x_unit.upper())}", f"##YUNITS={Y_UNITS_OUT.get(q, 'ARBITRARY UNITS')}"]
+ out += _pairs("PEAK TABLE", px, py)
+ named = [f"{num(float(p['x']))}, {_clean(p['label'])}" for p in marks if isinstance(p.get("label"), str) and p["label"].strip()]
+ if named:
+ out += ["##$FORMCHEM PEAK LABELS=(X, LABEL)"] + named
+ out += ["##END=", "##END="]
+ return "\n".join(out) + "\n", notes
+
+
+def _cell(text: str) -> str:
+ return f'"{text.replace(chr(34), chr(34) * 2)}"' if any(c in text for c in ',"\n') else text
+
+
+def csv(s, y_mode: str | None = None, lo: float | None = None, hi: float | None = None) -> str:
+ q = display.mode(s, y_mode)
+ idx = _slice(s, lo, hi)
+ order = np.argsort(s.x[idx], kind="stable")
+ if s.direction == tech.DECREASING:
+ order = order[::-1]
+ idx = idx[order]
+ y = display.convert(s.y, s.y_quantity, q)
+ head = [s.x_axis()["label"], s.y_axis(q)["label"]] + (["Imaginary"] if s.imag is not None else [])
+ rows = [",".join(_cell(h) for h in head)]
+ for i in idx.tolist():
+ row = [num(float(s.x[i])), num(float(y[i]))]
+ if s.imag is not None:
+ row.append(num(float(s.imag[i])))
+ rows.append(",".join(row))
+ return "\r\n".join(rows) + "\r\n"
diff --git a/backend/app/services/spectra/issues.py b/backend/app/services/spectra/issues.py
new file mode 100644
index 00000000..34ea55b8
--- /dev/null
+++ b/backend/app/services/spectra/issues.py
@@ -0,0 +1,50 @@
+INFO, WARN, ERROR = "info", "warn", "error"
+LINES_KEPT = 8
+
+
+class Issues:
+ def __init__(self, block: int | None = None) -> None:
+ self.block = block
+ self.items: list[dict] = []
+ self._by: dict[tuple[str, str], dict] = {}
+
+ def add(self, code: str, text: str, severity: str = WARN, line: int | None = None, count: int = 1) -> None:
+ key = (code, text)
+ found = self._by.get(key)
+ if found is None:
+ found = {"code": code, "severity": severity, "count": 0, "text": text}
+ if self.block is not None:
+ found["block"] = self.block
+ self._by[key] = found
+ self.items.append(found)
+ found["count"] += max(1, int(count))
+ if line is not None:
+ lines = found.setdefault("lines", [])
+ if len(lines) < LINES_KEPT:
+ lines.append(int(line))
+
+ def info(self, code: str, text: str, line: int | None = None, count: int = 1) -> None:
+ self.add(code, text, INFO, line, count)
+
+ def warn(self, code: str, text: str, line: int | None = None, count: int = 1) -> None:
+ self.add(code, text, WARN, line, count)
+
+ def error(self, code: str, text: str, line: int | None = None, count: int = 1) -> None:
+ self.add(code, text, ERROR, line, count)
+
+ def extend(self, other: "Issues") -> None:
+ for item in other.items:
+ self.add(item["code"], item["text"], item["severity"], None, item["count"])
+ for line in item.get("lines", []):
+ lines = self._by[(item["code"], item["text"])].setdefault("lines", [])
+ if len(lines) < LINES_KEPT:
+ lines.append(line)
+
+ def worst(self) -> str | None:
+ order = {ERROR: 0, WARN: 1, INFO: 2}
+ found = sorted((order[i["severity"]] for i in self.items if i["severity"] in order))
+ return [ERROR, WARN, INFO][found[0]] if found else None
+
+ def as_list(self) -> list[dict]:
+ order = {ERROR: 0, WARN: 1, INFO: 2}
+ return sorted((dict(i) for i in self.items), key=lambda i: order.get(i["severity"], 1))
diff --git a/backend/app/services/spectra/jcamp.py b/backend/app/services/spectra/jcamp.py
new file mode 100644
index 00000000..893c7bd4
--- /dev/null
+++ b/backend/app/services/spectra/jcamp.py
@@ -0,0 +1,294 @@
+import re
+from dataclasses import dataclass, field
+
+import numpy as np
+
+from app.services.spectra import READER, ldr, tables
+from app.services.spectra import technique as tech
+from app.services.spectra.issues import Issues
+
+DATA_KEYS = ("XYDATA", "XYPOINTS", "PEAKTABLE", "NTUPLES")
+STRUCTURE_KEYS = ("MOLFORM", "ATOMLIST", "BONDLIST", "CHARGE", "RADICAL")
+NTUPLE_KEYS = frozenset({"VARNAME", "SYMBOL", "VARTYPE", "VARFORM", "VARDIM", "UNITS", "FIRST", "LAST", "MIN", "MAX", "FACTOR",
+ "PAGE", "DATATABLE", "ENDNTUPLES", "POSITION", "NPOINTS", "NUMDIM"})
+MAX_POINTS = 4_000_000
+
+
+class JcampError(ValueError):
+ pass
+
+
+@dataclass
+class Spectrum:
+ index: int
+ title: str
+ data_type: str
+ technique: str
+ kind: str
+ x: np.ndarray
+ y: np.ndarray
+ issues: Issues
+ imag: np.ndarray | None = None
+ x_unit: str = ""
+ y_quantity: str = "intensity"
+ y_units: str = ""
+ nucleus: str | None = None
+ frequency: float | None = None
+ metadata: dict = field(default_factory=dict)
+ comments: list = field(default_factory=list)
+ forms: set = field(default_factory=set)
+ extra: dict = field(default_factory=dict)
+ block_id: str | None = None
+ data_class: str = ""
+ line: int = 0
+
+ @property
+ def direction(self) -> str:
+ return tech.direction(self.technique, self.x_unit, self.kind)
+
+ def x_axis(self) -> dict:
+ return tech.x_axis(self.technique, self.x_unit)
+
+ def y_axis(self, mode: str | None = None) -> dict:
+ return tech.y_axis(mode or self.y_quantity)
+
+ def y_modes(self) -> list[str]:
+ return tech.y_modes(self.technique, self.y_quantity)
+
+ def report(self) -> list[dict]:
+ return self.issues.as_list()
+
+ def summary(self) -> dict:
+ finite = np.isfinite(self.y)
+ return {
+ "index": self.index, "title": self.title, "data_type": self.data_type, "data_class": self.data_class,
+ "technique": self.technique, "nucleus": self.nucleus, "kind": self.kind, "points": int(self.x.size),
+ "x_range": [float(np.min(self.x)), float(np.max(self.x))] if self.x.size else None,
+ "y_range": [float(np.min(self.y[finite])), float(np.max(self.y[finite]))] if finite.any() else None,
+ "direction": self.direction, "axis": {"x": self.x_axis(), "y": self.y_axis()},
+ "y_mode": self.y_quantity if self.y_modes() else None, "y_modes": self.y_modes(),
+ "frequency": self.frequency, "block_id": self.block_id, "forms": sorted(self.forms),
+ "has_imag": self.imag is not None, "report": self.report(),
+ }
+
+
+@dataclass
+class JcampFile:
+ version: str
+ spectra: list[Spectrum]
+ skipped: list[dict]
+ issues: Issues
+ link: bool = False
+
+ def report(self) -> list[dict]:
+ out = self.issues.as_list()
+ for s in self.spectra:
+ out.extend(s.report())
+ return out
+
+
+def _label(rec: ldr.Record) -> str:
+ return re.sub(r"\s+", " ", rec.label).strip()
+
+
+def _metadata(blk: ldr.RawBlock, issues: Issues) -> tuple[dict, list[str]]:
+ meta: dict[str, str] = {}
+ comments: list[str] = []
+ inside = False
+ for r in blk.records:
+ comments.extend(r.comments if r.key else [])
+ if not r.key:
+ comments.append(r.value)
+ continue
+ if r.key == "NTUPLES":
+ inside = True
+ if r.key == "ENDNTUPLES":
+ inside = False
+ continue
+ if r.key in DATA_KEYS[:3] or (inside and r.key in NTUPLE_KEYS):
+ continue
+ name = _label(r)
+ if name in meta:
+ if meta[name] != r.text():
+ issues.info("duplicate_label", f"##{name}= appears more than once; the first value was kept.", r.line)
+ continue
+ meta[name] = r.text()
+ return meta, [c for c in comments if c]
+
+
+def _equidistant_header(blk: ldr.RawBlock) -> tables.Equidistant:
+ n = tables.number(blk.value("NPOINTS"))
+ return tables.Equidistant(
+ tables.number(blk.value("FIRSTX")), tables.number(blk.value("LASTX")), int(n) if n else None,
+ tables.number(blk.value("XFACTOR")) or 1.0, tables.number(blk.value("YFACTOR")) or 1.0,
+ tables.number(blk.value("DELTAX")), tables.number(blk.value("FIRSTY")),
+ )
+
+
+def _xy(blk: ldr.RawBlock, rec: ldr.Record, issues: Issues) -> tuple[np.ndarray, np.ndarray, set, dict, str]:
+ vl = tables.var_list(rec.value)
+ p = _equidistant_header(blk)
+ if rec.key == "XYDATA" and vl.form != tables.GROUPED:
+ if vl.form != tables.EQUIDISTANT:
+ issues.warn("variable_list", f"##XYDATA={rec.value} is not a known variable list; it was read as (X++(Y..Y)).", rec.line)
+ x, y, forms = tables.equidistant(rec.lines, p, issues)
+ return x, y, forms, {}, tech.CONTINUOUS
+ symbols = vl.symbols if vl.form == tables.GROUPED else ["X", "Y"]
+ if vl.form != tables.GROUPED:
+ issues.warn("variable_list", f"##{_label(rec)}={rec.value} is not a known variable list; it was read as (XY..XY).", rec.line)
+ cols, forms = tables.grouped(rec.lines, len(symbols), issues, _label(rec))
+ x = cols[0] * p.xfactor
+ y = cols[1] * p.yfactor if len(cols) > 1 else np.ones_like(x)
+ extra = {s.lower(): c for s, c in zip(symbols[2:], cols[2:])}
+ kind = tech.STICKS if rec.key == "PEAKTABLE" else tech.CONTINUOUS
+ return x, y, forms, extra, kind
+
+
+def _ordered(x: np.ndarray, y: np.ndarray, extra: dict, issues: Issues) -> tuple[np.ndarray, np.ndarray, dict]:
+ if x.size < 2:
+ return x, y, extra
+ d = np.diff(x)
+ if (d >= 0).all() or (d <= 0).all():
+ return x, y, extra
+ order = np.argsort(x, kind="stable")
+ issues.info("sorted", "The points were not in x order and were sorted.")
+ return x[order], y[order], {k: v[order] for k, v in extra.items()}
+
+
+def _shift_reference(raw: str, x: np.ndarray, issues: Issues) -> np.ndarray:
+ parts = [p.strip() for p in raw.strip().strip("()").split(",")]
+ point = tables.number(parts[2]) if len(parts) > 2 else None
+ value = tables.number(parts[3]) if len(parts) > 3 else None
+ if point is None or value is None:
+ issues.warn("shift_reference", f"##.SHIFT REFERENCE={raw} could not be read; shifts were not referenced.")
+ return x
+ i = int(point) - 1
+ if not 0 <= i < x.size:
+ issues.warn("shift_reference", f"##.SHIFT REFERENCE names point {int(point)}, outside the {x.size} points; shifts were not referenced.")
+ return x
+ offset = value - float(x[i])
+ if abs(offset) > 1e-9:
+ issues.info("shift_reference", f"Shifts were referenced so point {int(point)} reads {value:g} ppm ({parts[1] if len(parts) > 1 else 'reference'}).")
+ return x + offset
+
+
+def finish(s: Spectrum, blk_meta: dict) -> Spectrum:
+ issues = s.issues
+ if s.technique == "nmr":
+ s.frequency = tables.number(blk_meta.get(".OBSERVE FREQUENCY"))
+ s.nucleus = tech.nucleus(blk_meta.get(".OBSERVE NUCLEUS", ""))
+ if s.nucleus is None:
+ issues.info("no_nucleus", "The file does not name the observed nucleus.")
+ if s.x_unit == "s" or "FID" in s.data_type.upper():
+ s.kind = tech.FID
+ issues.info("fid", "This is time-domain NMR data (an FID); it is shown as acquired, without a Fourier transform.")
+ elif s.x_unit == "Hz":
+ if s.frequency:
+ s.x = s.x / s.frequency
+ s.x_unit = "ppm"
+ issues.info("hz_to_ppm", f"Frequencies in Hz were divided by the observe frequency ({s.frequency:g} MHz) to give ppm.")
+ ref = blk_meta.get(".SHIFT REFERENCE")
+ if ref:
+ s.x = _shift_reference(ref, s.x, issues)
+ else:
+ issues.info("no_shift_reference", "There is no ##.SHIFT REFERENCE; 0 Hz was taken as 0 ppm.")
+ else:
+ issues.warn("no_observe_frequency", "There is no ##.OBSERVE FREQUENCY, so the shift axis stays in Hz.")
+ if s.y_quantity == tech.TRANSMITTANCE and s.y.size:
+ top = np.nanmax(s.y) if np.isfinite(s.y).any() else 0
+ if 0 < top <= 1.5:
+ s.y = s.y * 100.0
+ issues.info("transmittance_percent", "Transmittance was stored as a fraction and is shown as percent.")
+ if s.technique == "ms" and s.kind == tech.CONTINUOUS and "PEAK" in s.data_class.upper():
+ s.kind = tech.STICKS
+ if s.x.size > MAX_POINTS:
+ raise JcampError(f"Block {s.index + 1} holds more than {MAX_POINTS} points.")
+ return s
+
+
+def _structure(blk: ldr.RawBlock) -> bool:
+ return any(blk.first(k) is not None for k in STRUCTURE_KEYS[:3]) or "STRUCTURE" in blk.value("DATATYPE").upper()
+
+
+def build(blk: ldr.RawBlock, index: int) -> Spectrum | dict:
+ issues = Issues(index)
+ title = blk.value("TITLE") or f"Block {index + 1}"
+ dtype = blk.value("DATATYPE").strip().upper()
+ meta, comments = _metadata(blk, issues)
+ data = next((r for r in blk.records if r.key in DATA_KEYS), None)
+ if data is None:
+ reason = ("a structure block (JCAMP-CS); it is kept in the file but not drawn" if _structure(blk)
+ else "it holds no XYDATA, XYPOINTS, PEAK TABLE or NTUPLES")
+ return {"title": title, "data_type": dtype, "line": blk.line, "reason": reason}
+ unit = tech.x_unit(blk.value("XUNITS"))
+ if data.key == "NTUPLES":
+ from app.services.spectra import ntuples
+ return ntuples.build(blk, data, index, title, dtype, meta, comments, issues)
+ x, y, forms, extra, kind = _xy(blk, data, issues)
+ if not x.size:
+ return {"title": title, "data_type": dtype, "line": blk.line, "reason": "its data table holds no points", "report": issues.as_list()}
+ x, y, extra = _ordered(x, y, extra, issues) if data.key != "XYDATA" else (x, y, extra)
+ found = tech.of(dtype, unit)
+ if found is None:
+ found = "uvvis"
+ issues.warn("unknown_technique", f"##DATA TYPE={dtype or '(none)'} with x units {unit or '(none)'} names no known technique; it is drawn as a plain spectrum.")
+ y_units = blk.value("YUNITS")
+ s = Spectrum(index, title, dtype, found, kind, x, y, issues, None, unit, tech.y_quantity(y_units, found), y_units.strip(),
+ metadata=meta, comments=comments, forms=forms, extra=extra, block_id=blk.value("BLOCKID") or None,
+ data_class=blk.value("DATACLASS").strip().upper() or {"XYDATA": "XYDATA", "XYPOINTS": "XYPOINTS"}.get(data.key, "PEAK TABLE"),
+ line=blk.line)
+ if data.key == "PEAKTABLE" or (found == "ms" and data.key == "XYPOINTS"):
+ s.kind = tech.STICKS
+ return finish(s, meta)
+
+
+def _walk(blocks: list[ldr.RawBlock], out: JcampFile, version: list[str]) -> None:
+ for blk in blocks:
+ dtype = blk.value("DATATYPE").strip().upper()
+ if not version[0]:
+ version[0] = blk.value("JCAMPDX").split("$$")[0].strip()
+ if blk.children or dtype == "LINK":
+ out.link = True
+ want = tables.number(blk.value("BLOCKS"))
+ if want is not None and int(want) != len(blk.children):
+ out.issues.warn("blocks", f"##BLOCKS={int(want)} but the LINK block holds {len(blk.children)} blocks; all blocks found were read.")
+ out.skipped.append({"title": blk.value("TITLE"), "data_type": dtype or "LINK", "line": blk.line,
+ "reason": "a LINK block; its blocks are listed one by one"})
+ if any(r.key in DATA_KEYS for r in blk.records):
+ _one(blk, out)
+ _walk(blk.children, out, version)
+ continue
+ _one(blk, out)
+
+
+def _one(blk: ldr.RawBlock, out: JcampFile) -> None:
+ found = build(blk, len(out.spectra))
+ if isinstance(found, Spectrum):
+ out.spectra.append(found)
+ else:
+ out.skipped.append(found)
+
+
+def parse(data: bytes) -> JcampFile:
+ issues = Issues()
+ roots = ldr.read(data, issues)
+ if not roots:
+ raise JcampError("This is not a JCAMP-DX file: it has no ##TITLE= record.")
+ out = JcampFile("", [], [], issues)
+ version = [""]
+ _walk(roots, out, version)
+ out.version = version[0]
+ if len(roots) > 1 and not out.link:
+ issues.info("several_blocks", f"The file holds {len(roots)} blocks one after another without a LINK block; each was read.")
+ ids = [s.block_id for s in out.spectra if s.block_id]
+ if len(ids) != len(set(ids)):
+ issues.warn("block_id", "Two blocks share one ##BLOCK_ID.")
+ if not out.spectra:
+ reasons = "; ".join(f"{k['title'] or 'untitled'}: {k['reason']}" for k in out.skipped if k.get("data_type") != "LINK")
+ raise JcampError(f"The file holds no spectrum FormChem can draw{f' ({reasons})' if reasons else ''}.")
+ return out
+
+
+def describe(f: JcampFile, name: str | None = None) -> dict:
+ return {"format": "JCAMP-DX", "version": f.version, "name": name, "method": READER, "link": f.link,
+ "blocks": [s.summary() for s in f.spectra], "skipped": f.skipped, "report": f.issues.as_list()}
diff --git a/backend/app/services/spectra/ldr.py b/backend/app/services/spectra/ldr.py
new file mode 100644
index 00000000..e55003fa
--- /dev/null
+++ b/backend/app/services/spectra/ldr.py
@@ -0,0 +1,135 @@
+import re
+from dataclasses import dataclass, field
+
+from app.services.spectra.issues import Issues
+
+_START = re.compile(r"^\s*##([^=]*)=?(.*)$")
+_IGNORED = re.compile(r"[\s\-/_]")
+
+
+def norm(label: str) -> str:
+ return _IGNORED.sub("", label).upper()
+
+
+def strip_comment(line: str) -> tuple[str, str]:
+ at = line.find("$$")
+ if at < 0:
+ return line.rstrip(), ""
+ return line[:at].rstrip(), line[at + 2:].strip()
+
+
+@dataclass
+class Record:
+ label: str
+ key: str
+ value: str
+ line: int
+ lines: list[tuple[int, str]] = field(default_factory=list)
+ comments: list[str] = field(default_factory=list)
+
+ def text(self) -> str:
+ parts = [self.value] + [t for _, t in self.lines]
+ return "\n".join(p for p in parts if p.strip()).strip()
+
+ @property
+ def private(self) -> bool:
+ return self.label.startswith("$")
+
+ @property
+ def technique(self) -> bool:
+ return self.label.startswith(".")
+
+
+@dataclass
+class RawBlock:
+ line: int
+ records: list[Record] = field(default_factory=list)
+ children: list["RawBlock"] = field(default_factory=list)
+ closed: bool = False
+
+ def first(self, key: str) -> Record | None:
+ for r in self.records:
+ if r.key == key:
+ return r
+ return None
+
+ def value(self, key: str, default: str = "") -> str:
+ found = self.first(key)
+ return found.text() if found is not None else default
+
+
+def decode(data: bytes, issues: Issues) -> str:
+ try:
+ text = data.decode("ascii")
+ except UnicodeDecodeError:
+ try:
+ text = data.decode("utf-8")
+ issues.info("not_ascii", "The file holds characters outside ASCII; it was read as UTF-8.")
+ except UnicodeDecodeError:
+ text = data.decode("latin-1")
+ issues.warn("not_ascii", "The file holds bytes that are not ASCII or UTF-8; it was read as Latin-1.")
+ return text.lstrip("")
+
+
+def records(text: str, issues: Issues) -> list[Record]:
+ out: list[Record] = []
+ current: Record | None = None
+ stray = 0
+ for n, raw in enumerate(text.splitlines(), 1):
+ if "\x00" in raw:
+ raw = raw.replace("\x00", "")
+ body, comment = strip_comment(raw)
+ found = _START.match(body)
+ if found and body.lstrip().startswith("##"):
+ label = found.group(1).strip()
+ if not label:
+ current = None
+ note = " ".join(p for p in (found.group(2).strip(), comment) if p)
+ if note:
+ out.append(Record("", "", note, n))
+ continue
+ current = Record(label.upper(), norm(label), found.group(2).strip(), n)
+ if comment:
+ current.comments.append(comment)
+ out.append(current)
+ continue
+ if current is None:
+ if body.strip():
+ stray += 1
+ continue
+ if comment:
+ current.comments.append(comment)
+ if body.strip():
+ current.lines.append((n, body))
+ if stray:
+ issues.info("stray_text", "Lines outside any labelled data record were ignored.", count=stray)
+ return out
+
+
+def tree(found: list[Record], issues: Issues) -> list[RawBlock]:
+ roots: list[RawBlock] = []
+ stack: list[RawBlock] = []
+ outside = 0
+ for r in found:
+ if r.key == "TITLE":
+ blk = RawBlock(r.line, [r])
+ (stack[-1].children if stack else roots).append(blk)
+ stack.append(blk)
+ elif r.key == "END":
+ if stack:
+ stack.pop().closed = True
+ else:
+ issues.info("stray_end", "An ##END= without a block before it was ignored.", r.line)
+ elif stack:
+ stack[-1].records.append(r)
+ elif r.key:
+ outside += 1
+ if outside:
+ issues.warn("outside_block", "Records before the first ##TITLE= or after the last ##END= were ignored.", count=outside)
+ if stack:
+ issues.warn("missing_end", "The file ends without ##END=; the open blocks were closed.", count=len(stack))
+ return roots
+
+
+def read(data: bytes, issues: Issues) -> list[RawBlock]:
+ return tree(records(decode(data, issues), issues), issues)
diff --git a/backend/app/services/spectra/measure.py b/backend/app/services/spectra/measure.py
new file mode 100644
index 00000000..15d95471
--- /dev/null
+++ b/backend/app/services/spectra/measure.py
@@ -0,0 +1,170 @@
+import math
+
+import numpy as np
+
+from app.services.spectra import display
+from app.services.spectra import technique as tech
+
+MAX_PEAKS = 500
+STICK_FLOOR = 0.01
+NMR_SIGMA = 6.0
+
+
+def noise(y: np.ndarray) -> float:
+ f = y[np.isfinite(y)]
+ if f.size < 4:
+ return 0.0
+ d = np.diff(f)
+ mad = float(np.median(np.abs(d - np.median(d)))) * 1.4826 / math.sqrt(2)
+ if mad > 0:
+ return mad
+ return float(np.std(f)) * 0.01
+
+
+def _greater(a: np.ndarray, reverse: bool) -> np.ndarray:
+ n = a.size
+ out = np.full(n, n if reverse else -1, dtype=np.int64)
+ stack: list[int] = []
+ rng = range(n - 1, -1, -1) if reverse else range(n)
+ values = a.tolist()
+ for i in rng:
+ v = values[i]
+ while stack and values[stack[-1]] <= v:
+ stack.pop()
+ if stack:
+ out[i] = stack[-1]
+ stack.append(i)
+ return out
+
+
+def maxima(a: np.ndarray) -> np.ndarray:
+ if a.size < 3:
+ return np.zeros(0, dtype=np.int64)
+ mid = a[1:-1]
+ return np.flatnonzero((mid > a[:-2]) & (mid >= a[2:])) + 1
+
+
+def prominences(a: np.ndarray, peaks: np.ndarray) -> np.ndarray:
+ if not peaks.size:
+ return np.zeros(0)
+ left, right = _greater(a, False), _greater(a, True)
+ out = np.empty(peaks.size)
+ for k, i in enumerate(peaks.tolist()):
+ lo = float(a[left[i] + 1:i + 1].min())
+ hi = float(a[i:right[i]].min())
+ out[k] = a[i] - max(lo, hi)
+ return out
+
+
+def _refine(x: np.ndarray, y: np.ndarray, i: int) -> float:
+ if i <= 0 or i >= x.size - 1:
+ return float(x[i])
+ a, b, c = float(y[i - 1]), float(y[i]), float(y[i + 1])
+ denom = a - 2 * b + c
+ if denom == 0 or not math.isfinite(denom):
+ return float(x[i])
+ p = max(-0.5, min(0.5, 0.5 * (a - c) / denom))
+ return float(x[i] + p * (x[i + 1] - x[i - 1]) / 2)
+
+
+def label(s, x: float) -> str:
+ digits = tech.label_digits(s.technique, s.x_unit)
+ if s.technique == "ms" and abs(x - round(x)) > 0.05:
+ digits = 1
+ return f"{x:.{digits}f}"
+
+
+def peaks(s, lo: float | None = None, hi: float | None = None, y_mode: str | None = None, limit: int = 50,
+ prominence: float | None = None, threshold: float | None = None) -> list[dict]:
+ limit = max(1, min(MAX_PEAKS, int(limit)))
+ q = display.mode(s, y_mode)
+ y = display.convert(s.y, s.y_quantity, q)
+ full = (float(np.nanmin(s.x)), float(np.nanmax(s.x))) if s.x.size else (0.0, 0.0)
+ idx = display.window(s.x, full[0] if lo is None else lo, full[1] if hi is None else hi, False)
+ if not idx.size:
+ return []
+ if s.kind == tech.STICKS:
+ ys = y[idx]
+ top = float(np.nanmax(ys)) if np.isfinite(ys).any() else 0.0
+ floor = threshold if threshold is not None else STICK_FLOOR * top
+ found = [int(i) for i in idx[np.argsort(-np.nan_to_num(ys, nan=-np.inf), kind="stable")] if y[i] >= floor][:limit]
+ return [{"x": float(s.x[i]), "y": float(y[i]), "label": label(s, float(s.x[i]))} for i in sorted(found, key=lambda i: s.x[i])]
+ down = q == tech.TRANSMITTANCE or q == "reflectance"
+ seg_x, seg_y = s.x[idx], y[idx]
+ sig = np.nan_to_num(-seg_y if down else seg_y, nan=float(np.nanmin(-seg_y if down else seg_y)))
+ cand = maxima(sig)
+ if s.technique == "nmr":
+ sigma = noise(s.y)
+ floor = threshold if threshold is not None else float(np.median(s.y[np.isfinite(s.y)])) + NMR_SIGMA * sigma
+ cand = cand[seg_y[cand] > floor]
+ need = prominence if prominence is not None else 3.0 * sigma
+ else:
+ span = float(sig.max() - sig.min()) if sig.size else 0.0
+ need = prominence if prominence is not None else 0.05 * span
+ if threshold is not None:
+ cand = cand[(seg_y[cand] <= threshold) if down else (seg_y[cand] >= threshold)]
+ prom = prominences(sig, cand)
+ keep = cand[prom >= need] if cand.size else cand
+ order = np.argsort(-prom[prom >= need], kind="stable")[:limit] if keep.size else []
+ out = []
+ for i in sorted((int(keep[k]) for k in order), key=lambda i: seg_x[i]):
+ x = _refine(seg_x, sig, i)
+ out.append({"x": round(x, 6), "y": float(seg_y[i]), "label": label(s, x)})
+ if s.direction == tech.DECREASING:
+ out.reverse()
+ return out
+
+
+def area(s, lo: float, hi: float, baseline: bool = True) -> float:
+ idx = display.window(s.x, lo, hi, False)
+ if idx.size < 2:
+ return 0.0
+ xs, ys = s.x[idx], np.nan_to_num(s.y[idx])
+ total = float(np.trapezoid(ys, xs))
+ if xs[-1] < xs[0]:
+ total = -total
+ if baseline:
+ total -= 0.5 * (float(ys[0]) + float(ys[-1])) * abs(float(xs[-1] - xs[0]))
+ return total
+
+
+def integrals(s, items: list[dict], ref: str | None = None, value: float | None = None, baseline: bool = True) -> tuple[list[dict], float | None]:
+ raw = {it["id"]: area(s, float(it["from"]), float(it["to"]), baseline) for it in items}
+ scale = None
+ if ref is not None and value is not None and raw.get(ref):
+ scale = value / raw[ref]
+ else:
+ for it in items:
+ v = it.get("value")
+ if isinstance(v, (int, float)) and not isinstance(v, bool) and raw.get(it["id"]):
+ scale = float(v) / raw[it["id"]]
+ break
+ if scale is None:
+ first = next((raw[it["id"]] for it in items if raw.get(it["id"])), None)
+ scale = 1.0 / first if first else None
+ out = [{**it, "area": raw[it["id"]], "value": round(raw[it["id"]] * scale, 4) if scale is not None else None} for it in items]
+ return out, scale
+
+
+def baseline(s, degree: int = 3, rounds: int = 30) -> np.ndarray:
+ y = np.nan_to_num(s.y)
+ if y.size < degree + 2:
+ return np.zeros_like(y)
+ up = s.y_quantity == tech.TRANSMITTANCE
+ z = -y if up else y.copy()
+ t = (s.x - s.x.min()) / ((s.x.max() - s.x.min()) or 1.0)
+ fit = z
+ for _ in range(rounds):
+ coef = np.polyfit(t, z, degree)
+ fit = np.polyval(coef, t)
+ nz = np.minimum(z, fit)
+ if np.allclose(nz, z):
+ break
+ z = nz
+ return -fit if up else fit
+
+
+def corrected(s, base: np.ndarray) -> np.ndarray:
+ if s.y_quantity == tech.TRANSMITTANCE:
+ return np.where(base > 0, s.y * 100.0 / np.where(base > 0, base, 1.0), s.y)
+ return s.y - base
diff --git a/backend/app/services/spectra/ntuples.py b/backend/app/services/spectra/ntuples.py
new file mode 100644
index 00000000..1f9fac25
--- /dev/null
+++ b/backend/app/services/spectra/ntuples.py
@@ -0,0 +1,141 @@
+from dataclasses import dataclass
+
+import numpy as np
+
+from app.services.spectra import jcamp, ldr, tables
+from app.services.spectra import technique as tech
+from app.services.spectra.issues import Issues
+
+ATTRIBUTES = ("VARNAME", "SYMBOL", "VARTYPE", "VARFORM", "VARDIM", "UNITS", "FIRST", "LAST", "MIN", "MAX", "FACTOR")
+MAX_PAGES = 4096
+
+
+@dataclass
+class Page:
+ label: str
+ symbol: str
+ name: str
+ unit: str
+ x: np.ndarray
+ y: np.ndarray
+ grouped: bool
+ extra: dict
+ forms: set
+
+
+def _split(text: str) -> list[str]:
+ return [p.strip() for p in (text or "").split(",")]
+
+
+def _pick(values: list, i: int, default=None):
+ return values[i] if 0 <= i < len(values) and values[i] not in (None, "") else default
+
+
+def _sections(blk: ldr.RawBlock, start: ldr.Record) -> tuple[dict[str, ldr.Record], list[dict[str, ldr.Record]], bool]:
+ attrs: dict[str, ldr.Record] = {}
+ pages: list[dict[str, ldr.Record]] = []
+ inside = closed = False
+ for r in blk.records:
+ if r is start:
+ inside = True
+ continue
+ if not inside or not r.key:
+ continue
+ if r.key == "ENDNTUPLES":
+ closed = True
+ break
+ if r.key == "PAGE":
+ pages.append({"PAGE": r})
+ elif pages:
+ pages[-1].setdefault(r.key, r)
+ else:
+ attrs.setdefault(r.key, r)
+ return attrs, pages, closed
+
+
+def _page(recs: dict[str, ldr.Record], cols: dict[str, list], issues: Issues) -> Page | None:
+ table = recs.get("DATATABLE")
+ label = recs["PAGE"].text() or str(len(cols))
+ if table is None:
+ issues.warn("page_empty", f"NTUPLES page {label} has no ##DATA TABLE=; it was skipped.", recs["PAGE"].line)
+ return None
+ vl = tables.var_list(table.value)
+ symbols = cols["SYMBOL"]
+ if not vl.symbols or any(s not in symbols for s in vl.symbols):
+ issues.warn("page_symbols", f"NTUPLES page {label} uses symbols ({table.value}) not declared in ##SYMBOL=; it was skipped.", table.line)
+ return None
+ ix, iy = symbols.index(vl.symbols[0]), symbols.index(vl.symbols[1]) if len(vl.symbols) > 1 else -1
+ factor = [tables.number(f) or 1.0 for f in cols["FACTOR"]]
+ first, last = [tables.number(v) for v in cols["FIRST"]], [tables.number(v) for v in cols["LAST"]]
+ dims = [tables.number(v) for v in cols["VARDIM"]]
+ what = f"NTUPLES page {label}"
+ if vl.form == tables.EQUIDISTANT:
+ n = tables.number(recs["NPOINTS"].text()) if "NPOINTS" in recs else _pick(dims, ix)
+ p = tables.Equidistant(_pick(first, ix), _pick(last, ix), int(n) if n else None, _pick(factor, ix, 1.0), _pick(factor, iy, 1.0),
+ None, _pick(first, iy))
+ x, y, forms = tables.equidistant(table.lines, p, issues, what)
+ extra: dict = {}
+ grouped = False
+ elif vl.form == tables.GROUPED:
+ found, forms = tables.grouped(table.lines, len(vl.symbols), issues, what)
+ scaled = [c * _pick(factor, symbols.index(s), 1.0) for s, c in zip(vl.symbols, found)]
+ x = scaled[0]
+ y = scaled[1] if len(scaled) > 1 else np.ones_like(x)
+ extra = {s.lower(): c for s, c in zip(vl.symbols[2:], scaled[2:])}
+ grouped = True
+ else:
+ issues.warn("variable_list", f"{what} has a data table form FormChem does not read ({table.value}); it was skipped.", table.line)
+ return None
+ if not x.size:
+ return None
+ return Page(label, symbols[iy] if iy >= 0 else "", _pick(cols["VARNAME"], iy, ""), _pick(cols["UNITS"], iy, ""), x, y, grouped, extra, forms)
+
+
+def _role(page: Page, word: str, symbol: str) -> bool:
+ return word in page.name.upper() or page.symbol == symbol
+
+
+def build(blk: ldr.RawBlock, start: ldr.Record, index: int, title: str, dtype: str, meta: dict, comments: list, issues: Issues):
+ attrs, raw_pages, closed = _sections(blk, start)
+ skipped = {"title": title, "data_type": dtype or start.value.upper(), "line": blk.line}
+ if not closed:
+ issues.warn("missing_end_ntuples", "The NTUPLES table has no ##END NTUPLES=; it was read to the end of the block.")
+ cols = {k: _split(attrs[k].text()) if k in attrs else [] for k in ATTRIBUTES}
+ cols["SYMBOL"] = [s.upper() for s in cols["SYMBOL"]]
+ if not cols["SYMBOL"]:
+ issues.error("ntuples_symbols", "The NTUPLES table has no ##SYMBOL= list.")
+ return {**skipped, "reason": "its NTUPLES table declares no symbols", "report": issues.as_list()}
+ independent = sum(1 for t in cols["VARTYPE"] if t.upper() == "INDEPENDENT")
+ dims = tables.number(attrs["NUMDIM"].text()) if "NUMDIM" in attrs else None
+ if independent > 1 or (dims is not None and dims > 1):
+ issues.error("2d_unsupported", "This is a 2D spectrum (two independent variables); 2D spectra are not drawn in this version.")
+ return {**skipped, "reason": "2D NTUPLES spectra are not supported yet", "report": issues.as_list()}
+ if len(raw_pages) > MAX_PAGES:
+ issues.warn("pages", f"The NTUPLES table has {len(raw_pages)} pages; only the first {MAX_PAGES} were read.")
+ pages = [p for p in (_page(r, cols, issues) for r in raw_pages[:MAX_PAGES]) if p is not None]
+ if not pages:
+ return {**skipped, "reason": "its NTUPLES table has no readable pages", "report": issues.as_list()}
+ real = next((p for p in pages if _role(p, "REAL", "R")), pages[0])
+ imag = next((p for p in pages if p is not real and _role(p, "IMAG", "I")), None)
+ if imag is not None and (imag.x.size != real.x.size or not np.allclose(imag.x, real.x, rtol=0, atol=1e-6 * max(1.0, float(np.max(np.abs(real.x)))))):
+ issues.warn("imag_mismatch", "The imaginary page does not share the real page's x values; it was left out.")
+ imag = None
+ others = len(pages) - 1 - (imag is not None)
+ if others > 0:
+ issues.info("pages_left_out", f"The NTUPLES table holds {len(pages)} pages; page {real.label} is shown and {others} other pages were left out.")
+ symbols = cols["SYMBOL"]
+ ix = symbols.index("X") if "X" in symbols else 0
+ unit = tech.x_unit(_pick(cols["UNITS"], ix, "") or blk.value("XUNITS"))
+ kind_word = (dtype or start.value).upper()
+ found = tech.of(kind_word, unit) or "uvvis"
+ x_name = _pick(cols["VARNAME"], ix, "").upper()
+ s = jcamp.Spectrum(index, title, kind_word, found, tech.CONTINUOUS, real.x, real.y, issues,
+ imag.y if imag is not None else None, unit, tech.y_quantity(real.unit, found), real.unit,
+ metadata=meta, comments=comments, extra=real.extra, block_id=blk.value("BLOCKID") or None,
+ data_class="NTUPLES", line=blk.line)
+ s.forms = {"NTUPLES"} | real.forms | (imag.forms if imag is not None else set())
+ if real.grouped and (found == "ms" or "PEAK" in kind_word):
+ s.kind = tech.STICKS
+ if "TIME" in x_name and found == "nmr":
+ s.x_unit = "s"
+ return jcamp.finish(s, meta)
diff --git a/backend/app/services/spectra/source.py b/backend/app/services/spectra/source.py
new file mode 100644
index 00000000..bf1ede1a
--- /dev/null
+++ b/backend/app/services/spectra/source.py
@@ -0,0 +1,93 @@
+import hashlib
+import threading
+from collections import OrderedDict
+from typing import Callable
+
+import numpy as np
+
+from app.services.spectra import jcamp
+from app.services.spectra import technique as tech
+from app.services.spectra.issues import Issues
+
+CACHE_SIZE = 12
+PREDICTORS: dict[str, Callable[[dict, dict], jcamp.Spectrum]] = {}
+_cache: "OrderedDict[str, jcamp.JcampFile]" = OrderedDict()
+_lock = threading.Lock()
+
+
+class SourceError(ValueError):
+ def __init__(self, message: str, status: int = 422) -> None:
+ super().__init__(message)
+ self.status = status
+
+
+def digest(data: bytes) -> str:
+ return hashlib.sha256(data).hexdigest()
+
+
+def parsed(data: bytes) -> jcamp.JcampFile:
+ key = digest(data)
+ with _lock:
+ hit = _cache.get(key)
+ if hit is not None:
+ _cache.move_to_end(key)
+ return hit
+ found = jcamp.parse(data)
+ with _lock:
+ _cache[key] = found
+ while len(_cache) > CACHE_SIZE:
+ _cache.popitem(last=False)
+ return found
+
+
+def block_index(src: dict, count: int) -> int:
+ raw = src.get("block", 0)
+ if raw is None:
+ raw = 0
+ if isinstance(raw, bool) or not isinstance(raw, int) or not 0 <= raw < count:
+ raise SourceError(f"The spectrum asks for block {raw}, but its file holds {count} {'block' if count == 1 else 'blocks'}.")
+ return raw
+
+
+def resolve(doc: dict, obj: dict, media: Callable[[str], bytes | None]) -> tuple[jcamp.Spectrum, jcamp.JcampFile | None]:
+ src = obj.get("source")
+ if not isinstance(src, dict):
+ raise SourceError("The spectrum has no source.")
+ if isinstance(src.get("media"), str):
+ data = media(src["media"])
+ if data is None:
+ raise SourceError(f"The spectrum's file {src['media']} is not in the drawing.", 404)
+ try:
+ found = parsed(data)
+ except jcamp.JcampError as exc:
+ raise SourceError(str(exc)) from exc
+ return found.spectra[block_index(src, len(found.spectra))], found
+ predicted = src.get("predicted")
+ if isinstance(predicted, dict):
+ method = predicted.get("method")
+ fn = PREDICTORS.get(method) if isinstance(method, str) else None
+ fn = fn or PREDICTORS.get("*")
+ if fn is None:
+ raise SourceError(f"No predictor for {method or 'this method'} is available in this engine.", 409)
+ try:
+ return fn(doc, obj), None
+ except SourceError:
+ raise
+ except Exception as exc:
+ raise SourceError(f"The prediction failed: {exc}", 409) from exc
+ raise SourceError("The spectrum's source is neither a file nor a prediction.")
+
+
+def synthetic(technique: str, x, y, *, title: str = "Predicted spectrum", kind: str = tech.CONTINUOUS, x_unit: str | None = None,
+ y_quantity: str = "intensity", nucleus: str | None = None, frequency: float | None = None,
+ metadata: dict | None = None, method: str | None = None) -> jcamp.Spectrum:
+ units = {"ir": "cm-1", "raman": "cm-1", "uvvis": "nm", "ms": "m/z", "nmr": "ppm"}
+ meta = dict(metadata or {})
+ if method:
+ meta.setdefault("METHOD", method)
+ s = jcamp.Spectrum(0, title, f"{technique.upper()} PREDICTED", technique, kind, np.asarray(x, dtype=float), np.asarray(y, dtype=float),
+ Issues(0), None, x_unit or units.get(technique, ""), y_quantity, "", nucleus, frequency, meta,
+ data_class="PREDICTED")
+ if method:
+ s.issues.info("predicted", f"Predicted by {method}.")
+ return s
diff --git a/backend/app/services/spectra/tables.py b/backend/app/services/spectra/tables.py
new file mode 100644
index 00000000..9a9b95b3
--- /dev/null
+++ b/backend/app/services/spectra/tables.py
@@ -0,0 +1,168 @@
+import re
+from dataclasses import dataclass
+
+import numpy as np
+
+from app.services.spectra import asdf
+from app.services.spectra.issues import Issues
+
+EQUIDISTANT, GROUPED = "equidistant", "grouped"
+_EQUI = re.compile(r"^\((\w)\+\+\((\w)\.\.\w\)\)")
+_GROUP = re.compile(r"^\((\w+)\.\.\w+\)")
+_NUMBER = re.compile(r"[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?")
+
+
+@dataclass
+class VarList:
+ form: str
+ symbols: list[str]
+ plot: str
+
+
+def var_list(value: str) -> VarList:
+ v = re.sub(r"\s+", "", value or "").upper()
+ m = _EQUI.match(v)
+ if m:
+ return VarList(EQUIDISTANT, [m.group(1), m.group(2)], v[m.end():].lstrip(","))
+ m = _GROUP.match(v)
+ if m:
+ return VarList(GROUPED, list(m.group(1)), v[m.end():].lstrip(","))
+ return VarList("", [], v)
+
+
+def number(text: str | None) -> float | None:
+ m = _NUMBER.search(text or "")
+ return float(m.group()) if m else None
+
+
+def numbers(text: str | None) -> list[float | None]:
+ return [number(part) for part in (text or "").split(",")]
+
+
+@dataclass
+class Equidistant:
+ first: float | None
+ last: float | None
+ npoints: int | None
+ xfactor: float = 1.0
+ yfactor: float = 1.0
+ deltax: float | None = None
+ firsty: float | None = None
+
+
+def _close(a: float, b: float) -> bool:
+ if a != a and b != b:
+ return True
+ return abs(a - b) <= 1e-6 * max(1.0, abs(a), abs(b))
+
+
+def equidistant(lines: list[tuple[int, str]], p: Equidistant, issues: Issues, what: str = "XYDATA") -> tuple[np.ndarray, np.ndarray, set[str]]:
+ xf = p.xfactor or 1.0
+ yf = p.yfactor or 1.0
+ step = None
+ if p.first is not None and p.last is not None and p.npoints and p.npoints > 1:
+ step = (p.last - p.first) / (p.npoints - 1)
+ if p.deltax and abs(p.deltax - step) > 1e-3 * max(abs(step), 1e-12):
+ issues.info("deltax", f"##DELTAX={p.deltax:g} differs from (LASTX - FIRSTX) / (NPOINTS - 1) = {step:g}; the computed spacing is used.")
+ elif p.deltax:
+ step = p.deltax
+ issues.warn("header_missing", f"{what} has no complete FIRSTX, LASTX and NPOINTS; the spacing comes from ##DELTAX.")
+ ys: list[float] = []
+ marks: list[tuple[int, float, int]] = []
+ forms: set[str] = set()
+ prev_dif = False
+ bad = missing = 0
+ x0 = p.first
+ tol = max(0.5 * abs(step), 0.5 * abs(xf)) if step else 0.0
+
+ def near(xv: float, i: int) -> bool:
+ return step is not None and x0 is not None and abs(xv - (x0 + i * step)) <= tol
+
+ for n, text in lines:
+ ln = asdf.line(text, ys[-1] if ys else None)
+ forms |= ln.forms
+ bad += ln.bad
+ if ln.x is None:
+ continue
+ if ln.dif_start:
+ issues.warn("dif_start", "A data line began with a DIF value; it continues from the last value of the line before.", n)
+ xv = ln.x * xf
+ if x0 is None:
+ x0 = xv
+ vals = ln.ys
+ overlap = False
+ if ys and vals and not ln.dif_start:
+ same = _close(vals[0], ys[-1])
+ if prev_dif:
+ overlap = same or not (near(xv, len(ys)) and not near(xv, len(ys) - 1))
+ if not overlap:
+ missing += 1
+ else:
+ overlap = same and near(xv, len(ys) - 1) and not near(xv, len(ys))
+ if overlap and not same:
+ issues.warn("y_check", "A Y check value did not match the last value of the line before; the line was continued from the earlier value.", n)
+ vals = asdf.rebase(ln, ys[-1])
+ at = len(ys) - 1 if overlap else len(ys)
+ if overlap:
+ vals = vals[1:]
+ marks.append((at, xv, n))
+ ys.extend(vals)
+ prev_dif = ln.ended_dif
+ if bad:
+ issues.warn("bad_characters", f"{bad} characters in {what} could not be read and were skipped.", count=bad)
+ if missing:
+ issues.info("y_check_missing", f"{missing} DIF lines were not followed by a Y check value.", count=missing)
+ count = len(ys)
+ if not count:
+ issues.error("no_points", f"{what} holds no data points.")
+ return np.zeros(0), np.zeros(0), forms
+ if p.npoints and count != p.npoints:
+ refit = (p.last - p.first) / (count - 1) if p.first is not None and p.last is not None and count > 1 else None
+
+ def misses(s: float | None) -> int:
+ return sum(1 for i, xv, _ in marks if s is not None and abs(xv - (x0 + i * s)) > max(0.5 * abs(s), 0.5 * abs(xf)))
+
+ if refit is not None and misses(refit) < misses(step):
+ step = refit
+ issues.warn("npoints", f"{what} holds {count} points but ##NPOINTS={p.npoints}; the line X values fit {count} points from FIRSTX to LASTX, so that spacing was used.")
+ else:
+ issues.warn("npoints", f"{what} holds {count} points but ##NPOINTS={p.npoints}; the points read were kept.")
+ if step is not None and x0 is not None:
+ tol = max(0.5 * abs(step), 0.5 * abs(xf))
+ for i, xv, n in marks:
+ if abs(xv - (x0 + i * step)) > tol:
+ issues.warn("x_check", "A line's X value does not match its position from FIRSTX and the spacing; the position was used.", n)
+ if step is None:
+ if len(marks) > 1 and marks[1][0] > marks[0][0]:
+ step = (marks[1][1] - marks[0][1]) / (marks[1][0] - marks[0][0])
+ issues.warn("header_missing", f"{what} has no FIRSTX, LASTX and NPOINTS; the spacing was taken from the line X values.")
+ else:
+ step = 1.0
+ issues.error("header_missing", f"{what} gives no way to place its points on the x axis; they were numbered 0, 1, 2 and so on.")
+ if p.first is not None and marks and abs(marks[0][1] - p.first) > max(tol, 1e-9):
+ issues.warn("firstx", f"The first line starts at x = {marks[0][1]:g} but ##FIRSTX={p.first:g}; FIRSTX was used.")
+ x = x0 + np.arange(count, dtype=float) * step
+ y = np.asarray(ys, dtype=float) * yf
+ if p.firsty is not None and not _close(float(y[0]), p.firsty) and abs(float(y[0]) - p.firsty) > abs(yf):
+ issues.warn("firsty", f"The first Y value {float(y[0]):g} does not match ##FIRSTY={p.firsty:g}.")
+ return x, y, forms
+
+
+def grouped(lines: list[tuple[int, str]], width: int, issues: Issues, what: str = "PEAK TABLE") -> tuple[list[np.ndarray], set[str]]:
+ flat: list[float] = []
+ forms: set[str] = set()
+ bad = 0
+ for _, text in lines:
+ found, f, b = asdf.values(text)
+ flat.extend(found)
+ forms |= f
+ bad += b
+ if bad:
+ issues.warn("bad_characters", f"{bad} characters in {what} could not be read and were skipped.", count=bad)
+ width = max(1, width)
+ extra = len(flat) % width
+ if extra:
+ issues.warn("incomplete_group", f"{what} ends with an incomplete group of {extra} values; it was dropped.")
+ flat = flat[: len(flat) - extra]
+ table = np.asarray(flat, dtype=float).reshape(-1, width) if flat else np.zeros((0, width))
+ return [table[:, i].copy() for i in range(width)], forms
diff --git a/backend/app/services/spectra/technique.py b/backend/app/services/spectra/technique.py
new file mode 100644
index 00000000..f30e4069
--- /dev/null
+++ b/backend/app/services/spectra/technique.py
@@ -0,0 +1,116 @@
+import re
+
+TECHNIQUES = ("ir", "raman", "uvvis", "ms", "nmr")
+CONTINUOUS, STICKS, FID = "continuous", "sticks", "fid"
+INCREASING, DECREASING = "increasing", "decreasing"
+TRANSMITTANCE, ABSORBANCE = "transmittance", "absorbance"
+
+X_UNITS = {
+ "1/CM": "cm-1", "CM-1": "cm-1", "CM^-1": "cm-1", "WAVENUMBER": "cm-1", "WAVENUMBERS": "cm-1",
+ "NANOMETERS": "nm", "NANOMETER": "nm", "NM": "nm",
+ "MICROMETERS": "um", "MICROMETER": "um", "MICRONS": "um", "UM": "um",
+ "HZ": "Hz", "HERTZ": "Hz", "PPM": "ppm",
+ "M/Z": "m/z", "MZ": "m/z", "DALTONS": "m/z", "DA": "m/z", "AMU": "m/z",
+ "SECONDS": "s", "SECOND": "s", "SEC": "s", "S": "s",
+}
+
+Y_QUANTITY = (
+ ("TRANSMIT", TRANSMITTANCE), ("%T", TRANSMITTANCE), ("ABSORB", ABSORBANCE), ("REFLECT", "reflectance"),
+ ("KUBELKA", "kubelka-munk"), ("ABUNDANCE", "abundance"), ("RELATIVE INTENSITY", "abundance"),
+)
+
+Y_AXES = {
+ TRANSMITTANCE: ("Transmittance (%)", "%"),
+ ABSORBANCE: ("Absorbance", ""),
+ "reflectance": ("Reflectance", ""),
+ "kubelka-munk": ("Kubelka-Munk", ""),
+ "abundance": ("Relative abundance", ""),
+ "intensity": ("Intensity", ""),
+}
+
+X_AXES = {
+ ("ir", "cm-1"): ("Wavenumber (cm-1)", "wavenumber"),
+ ("ir", "um"): ("Wavelength (um)", "wavelength"),
+ ("ir", "nm"): ("Wavelength (nm)", "wavelength"),
+ ("raman", "cm-1"): ("Raman shift (cm-1)", "raman shift"),
+ ("uvvis", "nm"): ("Wavelength (nm)", "wavelength"),
+ ("uvvis", "um"): ("Wavelength (um)", "wavelength"),
+ ("uvvis", "cm-1"): ("Wavenumber (cm-1)", "wavenumber"),
+ ("ms", "m/z"): ("m/z", "m/z"),
+ ("nmr", "ppm"): ("Chemical shift (ppm)", "chemical shift"),
+ ("nmr", "Hz"): ("Frequency (Hz)", "frequency"),
+ ("nmr", "s"): ("Time (s)", "time"),
+}
+
+
+def x_unit(raw: str) -> str:
+ key = re.sub(r"\s+", "", raw or "").upper()
+ return X_UNITS.get(key, raw.strip() if raw else "")
+
+
+def y_quantity(raw: str, technique: str | None) -> str:
+ key = (raw or "").upper()
+ for mark, quantity in Y_QUANTITY:
+ if mark in key:
+ return quantity
+ return "abundance" if technique == "ms" else "intensity"
+
+
+def of(data_type: str, unit: str) -> str | None:
+ kind = (data_type or "").upper()
+ if "NMR" in kind:
+ return "nmr"
+ if "RAMAN" in kind:
+ return "raman"
+ if "MASS" in kind or kind.startswith("MS"):
+ return "ms"
+ if "UV" in kind or "VIS" in kind or "ULTRAVIOLET" in kind:
+ return "uvvis"
+ if "INFRARED" in kind or re.search(r"\bIR\b", kind) or "FTIR" in kind:
+ return "ir"
+ return {"cm-1": "ir", "um": "ir", "nm": "uvvis", "m/z": "ms", "ppm": "nmr", "Hz": "nmr"}.get(unit)
+
+
+def nucleus(raw: str) -> str | None:
+ found = re.sub(r"[\^\s]", "", raw or "")
+ m = re.fullmatch(r"(\d+)([A-Za-z]{1,2})", found)
+ if m:
+ return m.group(1) + m.group(2).capitalize()
+ m = re.fullmatch(r"([A-Za-z]{1,2})(\d+)", found)
+ return m.group(2) + m.group(1).capitalize() if m else None
+
+
+def direction(technique: str | None, unit: str, kind: str) -> str:
+ if kind == FID:
+ return INCREASING
+ if technique in ("ir", "raman") and unit == "cm-1":
+ return DECREASING
+ if technique == "nmr" and unit in ("ppm", "Hz"):
+ return DECREASING
+ return INCREASING
+
+
+def x_axis(technique: str | None, unit: str) -> dict:
+ label, quantity = X_AXES.get((technique or "", unit), (f"x ({unit})" if unit else "x", "x"))
+ return {"label": label, "unit": unit, "quantity": quantity}
+
+
+def y_axis(quantity: str) -> dict:
+ label, unit = Y_AXES.get(quantity, Y_AXES["intensity"])
+ return {"label": label, "unit": unit, "quantity": quantity if quantity in Y_AXES else "intensity"}
+
+
+def y_modes(technique: str | None, quantity: str) -> list[str]:
+ if technique in ("ir", "raman", "uvvis") and quantity in (TRANSMITTANCE, ABSORBANCE):
+ return [TRANSMITTANCE, ABSORBANCE]
+ return []
+
+
+def label_digits(technique: str | None, unit: str) -> int:
+ if technique == "nmr" and unit == "ppm":
+ return 2
+ if unit in ("Hz", "s"):
+ return 1 if unit == "Hz" else 4
+ if unit == "um":
+ return 2
+ return 0
diff --git a/backend/app/services/store.py b/backend/app/services/store.py
index bd3121ac..34c747f5 100644
--- a/backend/app/services/store.py
+++ b/backend/app/services/store.py
@@ -13,6 +13,7 @@
from app.services import ops as opsmod
from app.services import embedded_source
from app.services.hub import HUB
+from app.services.three_d import stale
HISTORY_LIMIT = 500
DRAWINGS = "Drawings"
@@ -107,6 +108,25 @@ def _locale() -> str | None:
return found if isinstance(found, str) and found else None
+def _spectrum_bytes(data: bytes) -> bool:
+ try:
+ from app.services.spectra.document import sniff
+ except Exception:
+ return False
+ return sniff(data)
+
+
+def _structure_file(data: bytes, name: str) -> dict | None:
+ try:
+ from app.services.three_d import ThreeDError, structure
+ except Exception:
+ return None
+ try:
+ return {"mime": structure.MIMES[structure.detect(data, name)]}
+ except (ThreeDError, KeyError):
+ return None
+
+
class Store:
def __init__(self) -> None:
self.sessions: dict[str, Session] = {}
@@ -147,8 +167,12 @@ def snapshot(self, doc_id: str) -> dict:
def add_media(self, doc_id: str, data: bytes, name: str) -> dict:
s = self.get(doc_id)
found = package.sniff_image(data)
+ if found is None and _spectrum_bytes(data):
+ found = {"mime": "chemical/x-jcamp-dx"}
if found is None:
- raise StoreError("FormChem places PNG, JPEG, GIF, WebP and SVG pictures.")
+ found = _structure_file(data, name)
+ if found is None:
+ raise StoreError("FormChem places PNG, JPEG, GIF, WebP and SVG pictures, JCAMP-DX spectra and PDB, mmCIF, SDF and MOL structure files.")
media = {"name": files.safe_name(name, "Image"), "mime": found["mime"], "bytes": len(data),
**({"w": found["w"], "h": found["h"]} if "w" in found else {}), "sha256": hashlib.sha256(data).hexdigest()}
with s.lock:
@@ -159,6 +183,17 @@ def add_media(self, doc_id: str, data: bytes, name: str) -> dict:
s.media[mid] = data
return {"id": mid, "media": media}
+ def add_file_media(self, doc_id: str, data: bytes, name: str, mime: str) -> dict:
+ s = self.get(doc_id)
+ media = {"name": files.safe_name(name, "Structure"), "mime": mime, "bytes": len(data), "sha256": hashlib.sha256(data).hexdigest()}
+ with s.lock:
+ listed = s.doc.get("media") if isinstance(s.doc.get("media"), dict) else {}
+ mid = model.new_id("m")
+ while mid in s.media or mid in listed:
+ mid = model.new_id("m")
+ s.media[mid] = data
+ return {"id": mid, "media": media}
+
def media_bytes(self, doc_id: str, media_id: str) -> tuple[bytes, str]:
s = self.get(doc_id)
with s.lock:
@@ -206,10 +241,10 @@ async def open(self, path: str | Path) -> dict:
return await self.recover(recovered)
if importers.can_import(p):
try:
- doc, warnings = await asyncio.to_thread(importers.import_file, p)
+ doc, media, warnings = await asyncio.to_thread(importers.import_with_media, p)
except importers.ImportFailed as exc:
raise StoreError(str(exc)) from exc
- s = self.add(doc, dirty=True)
+ s = self.add(doc, media, dirty=True)
_remember(p)
await self._announce("opened", s)
return {**self.info(s), "imported": str(p), "warnings": warnings, "report": doc["meta"]["imported"].get("report", [])}
@@ -380,7 +415,9 @@ def apply_now(self, doc_id: str, tx: object, origin: str) -> dict:
raise opsmod.OpError(f"origin {origin} cannot send a transaction")
s = self.get(doc_id)
with s.lock:
- done = opsmod.apply_transaction(s.doc, self._prepare(tx, origin))
+ prepared = self._prepare(tx, origin)
+ watched = stale.watch(s.doc, prepared["ops"])
+ done = stale.settle(s.doc, opsmod.apply_transaction(s.doc, prepared), watched)
if not done["ops"]:
return {"tx": done, "rev": s.rev, "changed": False, "merged": None}
s.rev += 1
diff --git a/backend/app/services/three_d/__init__.py b/backend/app/services/three_d/__init__.py
new file mode 100644
index 00000000..6f84012c
--- /dev/null
+++ b/backend/app/services/three_d/__init__.py
@@ -0,0 +1,37 @@
+from app.services.chem import ENGINE, warning
+
+EMBED = "ETKDGv3"
+METHODS = ("MMFF94", "MMFF94s", "UFF")
+MMFF_ELEMENTS = frozenset(("H", "C", "N", "O", "F", "Si", "P", "S", "Cl", "Br", "I", "Li", "Na", "K", "Mg", "Ca", "Fe", "Zn", "Cu"))
+SEED = 61453
+MAX_ITERS = 2000
+GRADIENT = 0.01
+MAX_ATOMS = 1500
+COORD_DIGITS = 4
+ENERGY_DIGITS = 4
+KCAL_K = 0.0019872041
+TEMPERATURE = 298.15
+
+__all__ = ["ENGINE", "EMBED", "METHODS", "SEED", "ThreeDError", "warning"]
+
+
+class ThreeDError(ValueError):
+ def __init__(self, message: str, status: int = 422):
+ super().__init__(message)
+ self.status = status
+
+
+def method_of(value: object, default: str = "MMFF94") -> str:
+ if value is None:
+ return default
+ if isinstance(value, str):
+ for name in METHODS:
+ if value.lower() == name.lower():
+ return name
+ raise ThreeDError(f"method must be one of {', '.join(METHODS)}")
+
+
+def rounded(value: float | None, digits: int = ENERGY_DIGITS) -> float | None:
+ if value is None:
+ return None
+ return round(float(value), digits)
diff --git a/backend/app/services/three_d/build.py b/backend/app/services/three_d/build.py
new file mode 100644
index 00000000..ff6b8d0c
--- /dev/null
+++ b/backend/app/services/three_d/build.py
@@ -0,0 +1,82 @@
+import time
+
+from rdkit.Chem import rdDistGeom
+
+from app.services.three_d import EMBED, ENGINE, GRADIENT, MAX_ITERS, SEED, ThreeDError, forcefield, molecule, verify, warning
+
+ATTEMPTS = 3
+
+
+def embed_params(seed: int, random_coords: bool = False) -> rdDistGeom.EmbedParameters:
+ p = rdDistGeom.ETKDGv3()
+ p.randomSeed = int(seed)
+ p.enforceChirality = True
+ p.useRandomCoords = random_coords
+ p.numThreads = 1
+ return p
+
+
+def embed(model: molecule.Model, seed: int) -> int:
+ for random_coords in (False, True):
+ try:
+ cid = rdDistGeom.EmbedMolecule(model.mol, embed_params(seed, random_coords))
+ except Exception as exc:
+ raise ThreeDError(f"The structure could not be embedded in 3D: {exc}") from exc
+ if cid >= 0:
+ return cid
+ raise ThreeDError("The structure could not be embedded in 3D; check its valences and stereo.")
+
+
+def _ms(t: float) -> float:
+ return round((time.perf_counter() - t) * 1000, 1)
+
+
+def build_model(model: molecule.Model, minimise: bool = True, method: str = "MMFF94", seed: int = SEED,
+ max_iters: int = MAX_ITERS, gradient: float = GRADIENT) -> tuple[int, dict]:
+ start = time.perf_counter()
+ want = verify.expected(model)
+ timing = {"embed": 0.0, "minimise": 0.0, "verify": 0.0}
+ tried: list[int] = []
+ mini, notes, check, cid = None, [], None, -1
+ for k in range(ATTEMPTS):
+ used = int(seed) + k
+ tried.append(used)
+ t = time.perf_counter()
+ cid = embed(model, used)
+ timing["embed"] += _ms(t)
+ if minimise:
+ t = time.perf_counter()
+ mini, notes = forcefield.minimise(model.mol, cid, method, max_iters, gradient)
+ timing["minimise"] += _ms(t)
+ t = time.perf_counter()
+ check = verify.stereo(model, cid, want)
+ timing["verify"] += _ms(t)
+ if check["kept"]:
+ break
+ t = time.perf_counter()
+ found = verify.clashes(model, cid)
+ timing["verify"] += _ms(t)
+ timing["total"] = _ms(start)
+ warnings = list(model.warnings) + notes + verify.stereo_warnings(check, verify.enhanced_note(model))
+ if len(tried) > 1:
+ warnings.append(warning("embed_retry", f"Embedded {len(tried)} times (seeds {', '.join(map(str, tried))}) to keep the drawn stereo."))
+ if found:
+ warnings.append(warning("clash", f"{len(found)} pair(s) of heavy atoms are closer than {verify.CLASH_SCALE} of their van der Waals contact.",
+ sorted({a for c in found for a in c["atoms"] if ':' not in a})))
+ report = {
+ "stereo": check, "clashes": found, "minimise": mini, "warnings": warnings,
+ "timing_ms": {k: round(v, 1) for k, v in timing.items()},
+ "atoms": model.mol.GetNumAtoms(), "heavy": model.heavy, "seed": tried[-1], "engine": ENGINE,
+ "method": f"{EMBED}+{mini['method']}" if mini else EMBED,
+ }
+ return cid, report
+
+
+def build(frag: dict, expansions: dict | None = None, minimise: bool = True, method: str = "MMFF94", seed: int = SEED,
+ max_iters: int = MAX_ITERS, gradient: float = GRADIENT) -> dict:
+ model = molecule.prepare(frag, expansions)
+ cid, report = build_model(model, minimise, method, seed, max_iters, gradient)
+ mini = report["minimise"]
+ conformer = molecule.record(model, cid, mini["method"] if mini else "ETKDG", mini["energy_after"] if mini else None,
+ mini["converged"] if mini else None)
+ return {"conformer": conformer, "report": report, "model": model, "conf_id": cid}
diff --git a/backend/app/services/three_d/conformers.py b/backend/app/services/three_d/conformers.py
new file mode 100644
index 00000000..478b7b85
--- /dev/null
+++ b/backend/app/services/three_d/conformers.py
@@ -0,0 +1,98 @@
+import math
+import time
+
+from rdkit import Chem
+from rdkit.Chem import rdDistGeom, rdMolAlign
+
+from app.services.three_d import EMBED, ENGINE, KCAL_K, MAX_ITERS, SEED, TEMPERATURE, ThreeDError, build, forcefield, molecule, rounded, verify, warning
+
+MAX_N = 1000
+MAX_KEEP = 200
+THREADS = 2
+
+
+def _best_rms(heavy: Chem.Mol, a: int, b: int) -> float:
+ try:
+ return float(rdMolAlign.GetBestRMS(heavy, heavy, a, b, maxMatches=10000))
+ except Exception:
+ return float(rdMolAlign.AlignMol(heavy, heavy, a, b))
+
+
+def populations(energies: list[float], temperature: float = TEMPERATURE) -> list[float]:
+ if not energies:
+ return []
+ low = min(energies)
+ kt = KCAL_K * temperature
+ weights = [math.exp(-(e - low) / kt) for e in energies]
+ total = sum(weights)
+ return [w / total for w in weights]
+
+
+def _embed_all(model: molecule.Model, n: int, rmsd: float, seed: int) -> list[int]:
+ for random_coords in (False, True):
+ p = build.embed_params(seed, random_coords)
+ p.pruneRmsThresh = rmsd
+ p.useSymmetryForPruning = True
+ p.onlyHeavyAtomsForRMS = True
+ p.numThreads = THREADS
+ try:
+ ids = list(rdDistGeom.EmbedMultipleConfs(model.mol, numConfs=n, params=p))
+ except Exception as exc:
+ raise ThreeDError(f"Conformers could not be embedded: {exc}") from exc
+ if ids:
+ return ids
+ raise ThreeDError("No conformer could be embedded; check the structure's valences and stereo.")
+
+
+def search(frag: dict, expansions: dict | None = None, n: int = 50, window: float = 10.0, keep: int = 10, rmsd: float = 0.5,
+ method: str = "MMFF94", seed: int = SEED, max_iters: int = MAX_ITERS) -> dict:
+ start = time.perf_counter()
+ model = molecule.prepare(frag, expansions)
+ want = verify.expected(model)
+ ids = _embed_all(model, n, rmsd, seed)
+ t_embed = time.perf_counter()
+ used, results, notes = forcefield.optimise_all(model.mol, method, max_iters)
+ t_min = time.perf_counter()
+ order = [c.GetId() for c in model.mol.GetConformers()]
+ rows, dropped = [], 0
+ for cid, (converged, energy) in zip(order, results):
+ if not verify.stereo(model, cid, want)["kept"]:
+ dropped += 1
+ continue
+ rows.append((energy, cid, converged))
+ if not rows:
+ raise ThreeDError("Every embedded conformer lost the drawn stereo after minimisation.")
+ rows.sort(key=lambda r: r[0])
+ low = rows[0][0]
+ heavy = Chem.RemoveHs(model.mol)
+ kept: list[tuple[float, int, bool]] = []
+ for row in rows:
+ if row[0] - low > window or len(kept) >= keep:
+ break
+ if all(_best_rms(heavy, row[1], k[1]) > rmsd for k in kept):
+ kept.append(row)
+ pops = populations([r[0] for r in kept])
+ records, table = [], []
+ for (energy, cid, converged), pop in zip(kept, pops):
+ rec = molecule.record(model, cid, used, energy, converged)
+ records.append(rec)
+ table.append({"id": rec["id"], "energy": rounded(energy), "relative": rounded(energy - low), "method": used,
+ "converged": converged, "rmsd_to_lowest": round(_best_rms(heavy, cid, kept[0][1]), 3) if cid != kept[0][1] else 0.0,
+ "population": round(pop, 4)})
+ warnings = list(model.warnings) + notes
+ if dropped:
+ warnings.append(warning("stereo_dropped", f"{dropped} conformer(s) changed the drawn stereo during minimisation and were left out."))
+ if model.heavy > 300:
+ warnings.append(warning("large_molecule", "More than 300 heavy atoms: conformer sampling quality falls at this size."))
+ note = verify.enhanced_note(model)
+ if note:
+ warnings.append(warning("enhanced_stereo", note))
+ end = time.perf_counter()
+ report = {
+ "asked": n, "embedded": len(ids), "minimised": len(results), "within_window": sum(1 for r in rows if r[0] - low <= window),
+ "kept": len(kept), "window": window, "rmsd": rmsd, "seed": seed, "temperature": TEMPERATURE, "warnings": warnings,
+ "timing_ms": {"embed": round((t_embed - start) * 1000, 1), "minimise": round((t_min - t_embed) * 1000, 1),
+ "total": round((end - start) * 1000, 1)},
+ "engine": ENGINE, "method": f"{EMBED}+{used}",
+ }
+ return {"conformers": records, "table": table, "report": report}
diff --git a/backend/app/services/three_d/document.py b/backend/app/services/three_d/document.py
new file mode 100644
index 00000000..ead4e4ff
--- /dev/null
+++ b/backend/app/services/three_d/document.py
@@ -0,0 +1,156 @@
+import base64
+import hashlib
+from pathlib import Path
+from types import SimpleNamespace
+
+from rdkit import Chem
+
+from app import __version__
+from app.core import config, files
+from app.services import model
+from app.services.chem import io
+from app.services.three_d import ThreeDError, molfile3d, readers, structure, warning
+
+READ_LIMIT = 64 * 1024 * 1024
+MODEL_FORMATS = {".pdb": "PDB", ".ent": "PDB", ".cif": "mmCIF", ".mmcif": "mmCIF"}
+MDL_SUFFIXES = {".mol": "mol", ".mdl": "mol", ".sdf": "sdf", ".sd": "sdf"}
+
+
+class StructureFileError(ValueError):
+ pass
+
+
+def is_model_file(path: str | Path) -> bool:
+ return Path(path).suffix.lower() in MODEL_FORMATS
+
+
+def _locale() -> str | None:
+ found = config.read_settings().get("locale")
+ return found if isinstance(found, str) and found else None
+
+
+def read(path: str | Path) -> tuple[Path, bytes]:
+ p = Path(path).expanduser()
+ try:
+ with open(p, "rb") as fh:
+ data = fh.read(READ_LIMIT + 1)
+ except OSError as exc:
+ raise StructureFileError(f"Could not read {p.name}: {exc.strerror or exc}.") from exc
+ if len(data) > READ_LIMIT:
+ raise StructureFileError(f"{p.name} is larger than {READ_LIMIT // (1024 * 1024)} MB.")
+ return p, data
+
+
+def media_entry(name: str, fmt: str, data: bytes) -> dict:
+ return {"name": files.safe_name(name, f"Structure.{fmt}"), "mime": structure.MIMES[fmt], "bytes": len(data),
+ "sha256": hashlib.sha256(data).hexdigest()}
+
+
+def describe(summary: dict) -> str:
+ parts = [f"chain {c['id']}: {c['polymer']}, {c['residues']} residue{'' if c['residues'] == 1 else 's'}" for c in summary.get("chains") or []]
+ ligands = [g for g in summary.get("ligands") or [] if not g.get("ion") and not g.get("additive")]
+ if ligands:
+ parts.append(f"ligand{'' if len(ligands) == 1 else 's'} " + ", ".join(g["key"] for g in ligands))
+ others = len(summary.get("ligands") or []) - len(ligands)
+ if others:
+ parts.append(f"{others} ion{'' if others == 1 else 's'} or additive{'' if others == 1 else 's'}")
+ waters = summary.get("waters") or 0
+ if waters:
+ parts.append(f"{waters} water{'' if waters == 1 else 's'} (hidden)")
+ return f"{summary.get('atoms', 0)} atoms; " + "; ".join(parts) if parts else f"{summary.get('atoms', 0)} atoms"
+
+
+def report_items(fmt_name: str, summary: dict) -> list[dict]:
+ from app.services.chem import report
+ items = [{"code": "structure_3d", "severity": "info", "count": 1, "text": f"{fmt_name} model placed as a 3D object: {describe(summary)}."}]
+ items.extend(w for w in summary.get("warnings") or [] if isinstance(w, dict))
+ return report.collect(items)
+
+
+def drawing(name: str, data: bytes) -> tuple[dict, dict[str, bytes], list[dict]]:
+ fmt_name = MODEL_FORMATS.get(Path(name).suffix.lower(), "3D structure")
+ try:
+ out = readers.read(data, name)
+ except ThreeDError as exc:
+ raise StructureFileError(f"Could not read {name} as {fmt_name}: {exc}") from exc
+ fmt = out["format"]
+ if fmt not in ("pdb", "cif"):
+ raise StructureFileError(f"{name} is not a PDB or mmCIF file.")
+ doc = model.empty_document(Path(name).stem or "Structure", _locale(), f"formchem {__version__}")
+ page = doc["pages"][0]
+ used = {doc["id"], page["id"]}
+
+ def fresh(prefix: str) -> str:
+ found = model.new_id(prefix)
+ while found in used:
+ found = model.new_id(prefix)
+ used.add(found)
+ return found
+
+ mid, oid = fresh("m"), fresh("o")
+ margin = float(page.get("margins", 36))
+ doc["media"] = {mid: media_entry(name, fmt, data)}
+ obj = readers.model_object(mid, fmt, out["summary"], margin, margin, oid)
+ doc["objects"][oid] = obj
+ page["order"].append(oid)
+ items = report_items(fmt_name, out["summary"])
+ doc["meta"]["imported"] = {"name": name, "format": fmt_name, "report": items}
+ errors = model.validate(doc)
+ if errors:
+ raise StructureFileError(f"{name} could not be turned into a FormChem drawing: {errors[0]}.")
+ return doc, {mid: data}, items
+
+
+def open_file(path: str | Path) -> tuple[dict, dict[str, bytes], list[dict]]:
+ p, data = read(path)
+ return drawing(p.name, data)
+
+
+def for_insert(path: str | Path) -> dict:
+ p, data = read(path)
+ doc, media, items = drawing(p.name, data)
+ listed = doc["media"]
+ urls = {mid: f"data:{listed[mid]['mime']};base64,{base64.b64encode(raw).decode('ascii')}" for mid, raw in media.items()}
+ return {"name": p.name, "format": doc["meta"]["imported"]["format"], "document": doc, "media": urls, "keep_style": True,
+ "structures": 0, "report": items, "warnings": [i["text"] for i in items if i.get("severity") != "info"]}
+
+
+def _has_depth(block: str) -> bool:
+ ctab, _ = io.sd_fields(block)
+ mol = Chem.MolFromMolBlock(ctab, sanitize=False, removeHs=False)
+ if mol is None or not mol.GetNumConformers():
+ return False
+ return any(abs(p[2]) > 1e-4 for p in mol.GetConformer().GetPositions())
+
+
+def mdl_with_conformers(path: str | Path, bond_length: float, used: set[str]) -> SimpleNamespace | None:
+ p = Path(path).expanduser()
+ fmt = MDL_SUFFIXES.get(p.suffix.lower())
+ if fmt is None:
+ return None
+ try:
+ _, data = read(p)
+ except StructureFileError:
+ return None
+ text = structure.decode(data)
+ blocks = list(io.sd_records(text)) if fmt == "sdf" else [text]
+ if not blocks or len(blocks) > molfile3d.MAX_RECORDS or not _has_depth(blocks[0]):
+ return None
+ frags: list[dict] = []
+ notes: list[dict] = []
+ kept = 0
+ for n, block in enumerate(blocks, start=1):
+ where = f"Record {n}" if len(blocks) > 1 else "The structure"
+ try:
+ got = molfile3d.record(block, where, bond_length, (72.0, 72.0), used)
+ except Exception as exc:
+ notes.append(warning("record_failed", f"{where} could not be read: {exc}"))
+ continue
+ frags.append(got["fragment"])
+ notes.extend(got["warnings"])
+ kept += 1 if got["three_d"] else 0
+ if not frags:
+ return None
+ notes.append({"code": "conformers_kept", "severity": "info", "count": kept,
+ "text": f"The file's 3D coordinates were kept as the conformer of {kept} structure{'' if kept == 1 else 's'}; Build 3D is not needed to view them."})
+ return SimpleNamespace(fragments=frags, warnings=notes, objects=None, reaction=None)
diff --git a/backend/app/services/three_d/export.py b/backend/app/services/three_d/export.py
new file mode 100644
index 00000000..1478c2fc
--- /dev/null
+++ b/backend/app/services/three_d/export.py
@@ -0,0 +1,75 @@
+from rdkit import Chem
+
+from app.core import files
+from app.services.three_d import ThreeDError, molecule
+
+FORMATS = {"mol": (".mol", "chemical/x-mdl-molfile"), "mol3000": (".mol", "chemical/x-mdl-molfile"), "sdf": (".sdf", "chemical/x-mdl-sdfile"),
+ "pdb": (".pdb", "chemical/x-pdb"), "xyz": (".xyz", "chemical/x-xyz")}
+V2000_LIMIT = 999
+
+
+def _chosen(frag: dict, which: str | None) -> list[dict]:
+ if which == "all":
+ found = [c for c in frag.get("conformers") or [] if isinstance(c, dict)]
+ if not found:
+ raise ThreeDError(f"{frag.get('id')} has no 3D coordinates yet; build 3D first.", 409)
+ return found
+ return [molecule.find_conformer(frag, which)]
+
+
+def _data(block: str, fields: dict) -> str:
+ out = block if block.endswith("\n") else block + "\n"
+ for key, value in fields.items():
+ if value is not None:
+ out += f"> <{key}>\n{value}\n\n"
+ return out + "$$$$\n"
+
+
+def atom_map(model: molecule.Model) -> list[dict]:
+ out = []
+ for label in model.labels:
+ parent = molecule.parent_of(label)
+ out.append({"id": label, "parent": parent} if parent else {"id": label})
+ return out
+
+
+def write(frag: dict, expansions: dict | None, fmt: str = "mol", which: str | None = None) -> dict:
+ if fmt not in FORMATS:
+ raise ThreeDError(f"format must be one of {', '.join(FORMATS)}")
+ chosen = _chosen(frag, which)
+ if len(chosen) > 1 and fmt in ("mol", "mol3000"):
+ fmt = "sdf"
+ model = molecule.prepare(frag, expansions)
+ ids = [molecule.load(model, c) for c in chosen]
+ mol = model.mol
+ name = frag.get("name") if isinstance(frag.get("name"), str) and frag.get("name") else frag.get("id", "structure")
+ mol.SetProp("_Name", name)
+ v3000 = fmt == "mol3000" or mol.GetNumAtoms() > V2000_LIMIT
+ try:
+ if fmt in ("mol", "mol3000"):
+ text = Chem.MolToMolBlock(mol, confId=ids[0], forceV3000=v3000)
+ elif fmt == "sdf":
+ text = ""
+ for cid, conf in zip(ids, chosen):
+ block = Chem.MolToMolBlock(mol, confId=cid, forceV3000=v3000)
+ text += _data(block, {"FORMCHEM_CONFORMER": conf.get("id"), "FORMCHEM_ENERGY": conf.get("energy"),
+ "FORMCHEM_METHOD": conf.get("method")})
+ elif fmt == "pdb":
+ out = Chem.Mol(mol)
+ out.RemoveAllConformers()
+ for cid in ids:
+ out.AddConformer(Chem.Conformer(mol.GetConformer(cid)), assignId=True)
+ text = Chem.MolToPDBBlock(out, confId=-1 if len(ids) > 1 else out.GetConformer().GetId())
+ else:
+ text = ""
+ for cid, conf in zip(ids, chosen):
+ energy = conf.get("energy")
+ mol.SetProp("_Name", f"{name} {conf.get('id')}" + (f" E={energy} kcal/mol {conf.get('method')}" if energy is not None else ""))
+ text += Chem.MolToXYZBlock(mol, confId=cid)
+ except Exception as exc:
+ raise ThreeDError(f"The 3D file could not be written: {exc}") from exc
+ first = chosen[0]
+ ext, mime = FORMATS[fmt]
+ return {"format": fmt, "text": text, "conformer": first.get("id") if len(chosen) == 1 else "all", "count": len(chosen),
+ "energy": first.get("energy") if len(chosen) == 1 else None, "method": first.get("method"), "atoms": atom_map(model),
+ "filename": files.safe_name(name, "structure") + ext, "mime": mime}
diff --git a/backend/app/services/three_d/forcefield.py b/backend/app/services/three_d/forcefield.py
new file mode 100644
index 00000000..431c2c10
--- /dev/null
+++ b/backend/app/services/three_d/forcefield.py
@@ -0,0 +1,108 @@
+import math
+from dataclasses import dataclass
+
+from rdkit import Chem
+from rdkit.Chem import rdForceFieldHelpers as ffh
+
+from app.services.three_d import GRADIENT, MAX_ITERS, MMFF_ELEMENTS, ThreeDError, rounded, warning
+
+PASSES = 4
+TIGHT = {"forceTol": 1e-6, "energyTol": 1e-9}
+
+
+@dataclass
+class Field:
+ ff: object
+ method: str
+ asked: str
+ fallback: str | None = None
+ reason: str | None = None
+
+
+def _missing_mmff(mol: Chem.Mol) -> list[str]:
+ return sorted({a.GetSymbol() for a in mol.GetAtoms() if a.GetSymbol() not in MMFF_ELEMENTS})
+
+
+def mmff_properties(mol: Chem.Mol, variant: str = "MMFF94"):
+ try:
+ return ffh.MMFFGetMoleculeProperties(mol, mmffVariant=variant)
+ except Exception:
+ return None
+
+
+def setup(mol: Chem.Mol, method: str, conf_id: int = -1) -> Field:
+ reason = None
+ if method in ("MMFF94", "MMFF94s"):
+ props = mmff_properties(mol, method)
+ ff = None
+ if props is not None:
+ try:
+ ff = ffh.MMFFGetMoleculeForceField(mol, props, confId=conf_id, ignoreInterfragInteractions=False)
+ except Exception:
+ ff = None
+ if ff is not None:
+ return Field(ff, method, method)
+ missing = _missing_mmff(mol)
+ reason = f"no {method} parameters for {', '.join(missing)}" if missing else f"{method} could not type every atom"
+ if not ffh.UFFHasAllMoleculeParams(mol):
+ bad = sorted({a.GetSymbol() for a in mol.GetAtoms()})
+ raise ThreeDError(f"No force field has parameters for this structure ({', '.join(bad)}).")
+ try:
+ ff = ffh.UFFGetMoleculeForceField(mol, confId=conf_id, ignoreInterfragInteractions=False)
+ except Exception as exc:
+ raise ThreeDError(f"The universal force field could not be set up: {exc}") from exc
+ if ff is None:
+ raise ThreeDError("The universal force field could not be set up.")
+ return Field(ff, "UFF", method, "UFF" if method != "UFF" else None, reason)
+
+
+def fallback_warning(field: Field) -> list[dict]:
+ if not field.fallback:
+ return []
+ return [warning("uff_fallback", f"Universal force field used: {field.reason}.")]
+
+
+def rms_gradient(ff) -> float:
+ grad = ff.CalcGrad()
+ if not grad:
+ return 0.0
+ return math.sqrt(sum(g * g for g in grad) / len(grad))
+
+
+def run(field: Field, max_iters: int = MAX_ITERS, gradient: float = GRADIENT) -> dict:
+ ff = field.ff
+ ff.Initialize()
+ before = ff.CalcEnergy()
+ budget = max(1, int(max_iters))
+ passes = 0
+ rms = rms_gradient(ff)
+ while budget > 0 and rms > gradient and passes < PASSES:
+ status = ff.Minimize(maxIts=budget, **(TIGHT if passes else {}))
+ passes += 1
+ rms = rms_gradient(ff)
+ if status != 0:
+ break
+ budget = budget // 2
+ after = ff.CalcEnergy()
+ return {"method": field.method, "asked": field.asked, "fallback": field.fallback,
+ "energy_before": rounded(before), "energy_after": rounded(after), "rms_gradient": rounded(rms, 6),
+ "passes": passes, "max_iters": int(max_iters), "gradient": gradient, "converged": rms <= gradient}
+
+
+def energy(field: Field) -> float:
+ field.ff.Initialize()
+ return float(field.ff.CalcEnergy())
+
+
+def minimise(mol: Chem.Mol, conf_id: int, method: str, max_iters: int = MAX_ITERS, gradient: float = GRADIENT) -> tuple[dict, list[dict]]:
+ field = setup(mol, method, conf_id)
+ return run(field, max_iters, gradient), fallback_warning(field)
+
+
+def optimise_all(mol: Chem.Mol, method: str, max_iters: int = MAX_ITERS) -> tuple[str, list[tuple[bool, float]], list[dict]]:
+ probe = setup(mol, method, mol.GetConformers()[0].GetId())
+ if probe.method == "UFF":
+ done = ffh.UFFOptimizeMoleculeConfs(mol, numThreads=1, maxIters=int(max_iters))
+ else:
+ done = ffh.MMFFOptimizeMoleculeConfs(mol, numThreads=1, maxIters=int(max_iters), mmffVariant=probe.method)
+ return probe.method, [(flag == 0, float(e)) for flag, e in done], fallback_warning(probe)
diff --git a/backend/app/services/three_d/ligand.py b/backend/app/services/three_d/ligand.py
new file mode 100644
index 00000000..865c57a0
--- /dev/null
+++ b/backend/app/services/three_d/ligand.py
@@ -0,0 +1,226 @@
+from itertools import combinations
+
+import numpy as np
+from rdkit import Chem
+from rdkit.Chem import AllChem, rdDetermineBonds
+
+from app.services.chem import DEFAULT_BOND_LENGTH, ENGINE, convert
+from app.services.three_d import ThreeDError, molecule, warning
+from app.services.three_d.structure import Atom, Structure, find_ligand
+
+TEMPLATES = {
+ "ATP": "Nc1ncnc2c1ncn2C1OC(COP(=O)(O)OP(=O)(O)OP(=O)(O)O)C(O)C1O",
+ "ADP": "Nc1ncnc2c1ncn2C1OC(COP(=O)(O)OP(=O)(O)O)C(O)C1O",
+ "AMP": "Nc1ncnc2c1ncn2C1OC(COP(=O)(O)O)C(O)C1O",
+ "ANP": "Nc1ncnc2c1ncn2C1OC(COP(=O)(O)OP(=O)(O)NP(=O)(O)O)C(O)C1O",
+ "GTP": "Nc1nc2n(C3OC(COP(=O)(O)OP(=O)(O)OP(=O)(O)O)C(O)C3O)cnc2c(=O)[nH]1",
+ "GDP": "Nc1nc2n(C3OC(COP(=O)(O)OP(=O)(O)O)C(O)C3O)cnc2c(=O)[nH]1",
+ "SAM": "C[S+](CCC(N)C(=O)O)CC1OC(n2cnc3c(N)ncnc32)C(O)C1O",
+ "SAH": "NC(CCSCC1OC(n2cnc3c(N)ncnc32)C(O)C1O)C(=O)O",
+ "PLP": "Cc1ncc(COP(=O)(O)O)c(C=O)c1O",
+ "FOL": "Nc1nc2ncc(CNc3ccc(C(=O)NC(CCC(=O)O)C(=O)O)cc3)nc2c(=O)[nH]1",
+ "MTX": "CN(Cc1cnc2nc(N)nc(N)c2n1)c1ccc(C(=O)NC(CCC(=O)O)C(=O)O)cc1",
+ "BEN": "NC(=N)c1ccccc1",
+ "STI": "Cc1ccc(NC(=O)c2ccc(CN3CCN(C)CC3)cc2)cc1Nc1nccc(-c2cccnc2)n1",
+ "NAG": "CC(=O)NC1C(O)OC(CO)C(O)C1O",
+ "GLC": "OCC1OC(O)C(O)C(O)C1O",
+ "MAN": "OCC1OC(O)C(O)C(O)C1O",
+ "GAL": "OCC1OC(O)C(O)C(O)C1O",
+ "GOL": "OCC(O)CO",
+ "EDO": "OCCO",
+ "ACT": "CC(=O)[O-]",
+ "ACY": "CC(=O)O",
+ "FMT": "OC=O",
+ "DMS": "CS(C)=O",
+ "SO4": "[O-]S(=O)(=O)[O-]",
+ "PO4": "[O-]P(=O)([O-])[O-]",
+ "TRS": "[NH3+]C(CO)(CO)CO",
+ "CIT": "OC(=O)CC(O)(CC(=O)O)C(=O)O",
+ "MES": "OS(=O)(=O)CCN1CCOCC1",
+ "EPE": "OCCN1CCN(CCS(=O)(=O)O)CC1",
+ "IMD": "c1c[nH]cn1",
+}
+MAX_VALENCE = {"C": 4, "N": 3, "O": 2, "S": 6, "P": 5, "B": 3, "F": 1, "Cl": 1, "Br": 1, "I": 1, "Se": 2}
+LENGTH_RULES = {
+ frozenset(("C", "O")): ((1.28, 2),), frozenset(("C", "N")): ((1.20, 3), (1.31, 2)), frozenset(("C",)): ((1.25, 3), (1.37, 2)),
+ frozenset(("N", "O")): ((1.26, 2),), frozenset(("S", "O")): ((1.55, 2),), frozenset(("P", "O")): ((1.55, 2),),
+ frozenset(("C", "S")): ((1.68, 2),), frozenset(("N",)): ((1.28, 2),),
+}
+BT = Chem.BondType
+ORDER = {1: BT.SINGLE, 2: BT.DOUBLE, 3: BT.TRIPLE}
+RING_LENGTHS = (1.22, 1.55)
+RING_MEAN = 1.44
+PLANAR_RMS = 0.12
+CARBONYL_MAX = 1.40
+MAX_TAUTOMER_TRIES = 512
+
+
+def _block(atoms: list[Atom], conect: dict[int, set[int]]) -> str:
+ lines, serials = [], {}
+ for k, a in enumerate(atoms, start=1):
+ serials[a.serial] = k
+ name = a.name if len(a.name) >= 4 or len(a.element) == 2 else f" {a.name}"
+ lines.append(f"HETATM{k:5d} {name[:4]:<4} {a.resname[:3]:>3} {(a.chain or 'A')[:1]}{a.resseq % 10000:4d} "
+ f"{a.x:8.3f}{a.y:8.3f}{a.z:8.3f}{1.0:6.2f}{0.0:6.2f} {a.element.upper():>2}")
+ for a in atoms:
+ partners = sorted(serials[p] for p in conect.get(a.serial, ()) if p in serials)
+ for start in range(0, len(partners), 4):
+ lines.append(f"CONECT{serials[a.serial]:5d}" + "".join(f"{p:5d}" for p in partners[start:start + 4]))
+ return "\n".join(lines) + "\nEND\n"
+
+
+def _planar(pos: np.ndarray) -> bool:
+ centred = pos - pos.mean(axis=0)
+ return float(np.linalg.svd(centred, compute_uv=False)[-1]) / np.sqrt(len(pos)) < PLANAR_RMS
+
+
+def _protonate(mol: Chem.RWMol) -> bool:
+ def lactam(a: Chem.Atom) -> bool:
+ return any(b.GetBondType() == BT.DOUBLE and b.GetOtherAtom(n).GetSymbol() == "O" for n in a.GetNeighbors() for b in n.GetBonds())
+
+ found = [a for a in mol.GetAtoms() if a.GetIsAromatic() and a.GetSymbol() == "N" and a.GetDegree() == 2 and not a.GetNumExplicitHs()]
+ sites = [a.GetIdx() for a in sorted(found, key=lambda a: (not lactam(a), a.GetIdx()))]
+ tried = 0
+ for k in range(len(sites) + 1):
+ for chosen in combinations(sites, k):
+ tried += 1
+ if tried > MAX_TAUTOMER_TRIES:
+ return False
+ work = Chem.RWMol(mol)
+ for i in chosen:
+ work.GetAtomWithIdx(i).SetNumExplicitHs(1)
+ try:
+ Chem.SanitizeMol(work)
+ except Exception:
+ continue
+ for i in chosen:
+ mol.GetAtomWithIdx(i).SetNumExplicitHs(1)
+ Chem.SanitizeMol(mol)
+ return True
+ return False
+
+
+def _from_lengths(mol: Chem.RWMol) -> None:
+ conf = mol.GetConformer()
+ pos = np.asarray(conf.GetPositions())
+ aromatic: set[int] = set()
+ for cycle in Chem.GetSymmSSSR(mol):
+ order = list(cycle)
+ ring = [mol.GetBondBetweenAtoms(p, q).GetIdx() for p, q in zip(order, order[1:] + order[:1])]
+ atoms = set(order)
+ if len(ring) not in (5, 6) or any(mol.GetAtomWithIdx(i).GetSymbol() not in ("C", "N", "O", "S") for i in atoms):
+ continue
+ lengths = [float(np.linalg.norm(pos[mol.GetBondWithIdx(b).GetBeginAtomIdx()] - pos[mol.GetBondWithIdx(b).GetEndAtomIdx()])) for b in ring]
+ if _planar(pos[sorted(atoms)]) and all(RING_LENGTHS[0] <= d <= RING_LENGTHS[1] for d in lengths) and sum(lengths) / len(lengths) <= RING_MEAN:
+ aromatic.update(ring)
+ for k in aromatic:
+ b = mol.GetBondWithIdx(k)
+ b.SetBondType(BT.AROMATIC)
+ b.SetIsAromatic(True)
+ b.GetBeginAtom().SetIsAromatic(True)
+ b.GetEndAtom().SetIsAromatic(True)
+ for b in mol.GetBonds():
+ if b.GetIdx() in aromatic:
+ continue
+ i, j = b.GetBeginAtomIdx(), b.GetEndAtomIdx()
+ ai, aj = mol.GetAtomWithIdx(i), mol.GetAtomWithIdx(j)
+ pair = frozenset((ai.GetSymbol(), aj.GetSymbol()))
+ if ai.GetIsAromatic() or aj.GetIsAromatic():
+ other = aj if ai.GetIsAromatic() else ai
+ if other.GetSymbol() not in ("O", "S") or other.GetDegree() != 1:
+ continue
+ d = float(np.linalg.norm(pos[i] - pos[j]))
+ for limit, order in LENGTH_RULES.get(pair, ()):
+ if d <= limit:
+ b.SetBondType(ORDER[order])
+ break
+ for a in mol.GetAtoms():
+ if a.GetSymbol() != "C" or a.GetIsAromatic() or a.GetDegree() != 3 or any(b.GetBondType() != BT.SINGLE for b in a.GetBonds()):
+ continue
+ ends = [b for b in a.GetBonds() if b.GetOtherAtom(a).GetSymbol() == "O" and b.GetOtherAtom(a).GetDegree() == 1]
+ near = [(float(np.linalg.norm(pos[a.GetIdx()] - pos[b.GetOtherAtomIdx(a.GetIdx())])), b) for b in ends]
+ near = [(d, b) for d, b in near if d <= CARBONYL_MAX and not any(x.GetBondType() != BT.SINGLE for x in b.GetOtherAtom(a).GetBonds())]
+ if near:
+ min(near, key=lambda t: t[0])[1].SetBondType(BT.DOUBLE)
+ for a in mol.GetAtoms():
+ top = MAX_VALENCE.get(a.GetSymbol())
+ if top is None or a.GetIsAromatic():
+ continue
+ while sum(b.GetBondTypeAsDouble() for b in a.GetBonds()) > top + 1e-6:
+ multiple = [b for b in a.GetBonds() if b.GetBondType() in (BT.DOUBLE, BT.TRIPLE)]
+ if not multiple:
+ break
+ worst = max(multiple, key=lambda b: float(np.linalg.norm(pos[b.GetBeginAtomIdx()] - pos[b.GetEndAtomIdx()])))
+ worst.SetBondType(BT.SINGLE if worst.GetBondType() == BT.DOUBLE else BT.DOUBLE)
+ if _protonate(mol):
+ return
+ for b in mol.GetBonds():
+ if b.GetBondType() == BT.AROMATIC:
+ b.SetBondType(BT.SINGLE)
+ b.SetIsAromatic(False)
+ for a in mol.GetAtoms():
+ a.SetIsAromatic(False)
+ Chem.SanitizeMol(mol, catchErrors=True)
+
+
+def bond_orders(mol: Chem.Mol, het: str) -> tuple[Chem.Mol, str, list[dict]]:
+ notes: list[dict] = []
+ heavy = Chem.RemoveHs(mol, sanitize=False)
+ smiles = TEMPLATES.get(het)
+ if smiles:
+ try:
+ done = AllChem.AssignBondOrdersFromTemplate(Chem.MolFromSmiles(smiles), heavy)
+ Chem.SanitizeMol(done)
+ return done, "template", notes
+ except Exception:
+ notes.append(warning("template_mismatch", f"The bundled template for {het} does not match the atoms in the file (missing or extra atoms)."))
+ has_h = any(a.GetAtomicNum() == 1 for a in mol.GetAtoms())
+ if has_h:
+ for charge in (0, -1, 1, -2, 2):
+ work = Chem.RWMol(mol)
+ try:
+ rdDetermineBonds.DetermineBondOrders(work, charge=charge)
+ Chem.SanitizeMol(work)
+ out = Chem.RemoveHs(work)
+ notes.append(warning("bond_orders_inferred", f"Bond orders inferred from the hydrogens and geometry (total charge {charge}); check them."))
+ return out, "perceived", notes
+ except Exception:
+ continue
+ work = Chem.RWMol(heavy)
+ _from_lengths(work)
+ notes.append(warning("bond_orders_inferred", "Bond orders inferred from bond lengths (the file has no hydrogens); check them."))
+ return work.GetMol(), "perceived", notes
+
+
+def extract(st: Structure, want: str, bond_length: float = DEFAULT_BOND_LENGTH, origin: tuple[float, float] = (72.0, 72.0),
+ used: set[str] | None = None) -> dict:
+ info, atoms = find_ligand(st, want)
+ if info["ion"] or len([a for a in atoms if a.element not in ("H", "D")]) < 1:
+ raise ThreeDError(f"{info['key']} is a single ion; there is no structure to extract.")
+ keep = [a for a in atoms if a.element != "D"]
+ conect = {k: v for k, v in st.conect.items()}
+ block = _block(keep, conect)
+ has_conect = any(conect.get(a.serial) for a in keep)
+ mol = Chem.MolFromPDBBlock(block, sanitize=False, removeHs=False, proximityBonding=not has_conect)
+ if mol is None or not mol.GetNumAtoms():
+ raise ThreeDError(f"The atoms of {info['key']} could not be read.")
+ notes = [] if has_conect else [warning("proximity_bonds", "Connectivity perceived from interatomic distances (the file has no CONECT records for this ligand).")]
+ heavy, source, more = bond_orders(mol, info["het"])
+ notes += more
+ heavy = Chem.Mol(heavy)
+ try:
+ Chem.AssignStereochemistryFrom3D(heavy)
+ except Exception:
+ notes.append(warning("stereo_from_3d_failed", "Stereo could not be read from the coordinates."))
+ if len(Chem.GetMolFrags(heavy)) > 1:
+ notes.append(warning("disconnected", "The ligand's atoms form more than one piece; check for missing atoms."))
+ frag = convert.from_mol(heavy, bond_length, origin, name=info["name"] or info["het"], used=used)
+ ids = list(frag["atoms"])
+ pos = heavy.GetConformer().GetPositions()
+ coords = {aid: [float(v) for v in pos[k]] for k, aid in enumerate(ids)}
+ model = molecule.prepare(frag, None, heavy_coords=coords)
+ conformer = molecule.record(model, model.mol.GetConformer().GetId(), "file")
+ frag["conformers"] = [conformer]
+ frag["conformer"] = conformer["id"]
+ frag["data"] = {"pdb_ligand": info["key"], "pdb_id": st.id_code} if st.id_code else {"pdb_ligand": info["key"]}
+ return {"fragment": frag, "ligand": info, "bonds": source, "smiles": Chem.MolToSmiles(heavy), "warnings": notes, "engine": ENGINE}
diff --git a/backend/app/services/three_d/measure.py b/backend/app/services/three_d/measure.py
new file mode 100644
index 00000000..3c691230
--- /dev/null
+++ b/backend/app/services/three_d/measure.py
@@ -0,0 +1,108 @@
+import math
+
+import numpy as np
+from rdkit.Chem import AllChem
+
+from app.services.three_d import ENGINE, ThreeDError, forcefield, molecule, warning
+
+UNIT = {"distance": "Å", "angle": "°", "dihedral": "°"}
+KINDS = {2: "distance", 3: "angle", 4: "dihedral"}
+CHARGE_KINDS = ("gasteiger", "mmff")
+ESP_LABEL = "approximate, from empirical charges"
+
+
+def point(conformer: dict, label: str) -> np.ndarray:
+ owner, tag = molecule.split(label)
+ if not tag:
+ found = (conformer.get("coords") or {}).get(owner)
+ else:
+ table = conformer.get("h" if tag[0] == molecule.H_TAG else "expanded") or {}
+ seq = table.get(owner) or []
+ try:
+ k = int(tag[1:])
+ except ValueError:
+ k = -1
+ found = seq[k] if 0 <= k < len(seq) else None
+ if not isinstance(found, list) or len(found) != 3:
+ raise ThreeDError(f"The conformer has no atom {label}.")
+ return np.array([float(v) for v in found])
+
+
+def distance(p: np.ndarray, q: np.ndarray) -> float:
+ return float(np.linalg.norm(p - q))
+
+
+def angle(p: np.ndarray, q: np.ndarray, r: np.ndarray) -> float:
+ u, v = p - q, r - q
+ nu, nv = np.linalg.norm(u), np.linalg.norm(v)
+ if nu < 1e-9 or nv < 1e-9:
+ raise ThreeDError("Two of the atoms sit on the same point.")
+ return math.degrees(math.acos(max(-1.0, min(1.0, float(np.dot(u, v) / (nu * nv))))))
+
+
+def dihedral(p: np.ndarray, q: np.ndarray, r: np.ndarray, s: np.ndarray) -> float:
+ b0, b1, b2 = q - p, r - q, s - r
+ n1, n2 = np.cross(b0, b1), np.cross(b1, b2)
+ if np.linalg.norm(n1) < 1e-9 or np.linalg.norm(n2) < 1e-9:
+ raise ThreeDError("Three of the atoms are on one line, so the dihedral is undefined.")
+ m1 = np.cross(n1, b1 / np.linalg.norm(b1))
+ return math.degrees(math.atan2(float(np.dot(m1, n2)), float(np.dot(n1, n2))))
+
+
+def measure(conformer: dict, ids: list[str]) -> dict:
+ kind = KINDS.get(len(ids))
+ if kind is None:
+ raise ThreeDError("Give two atoms for a distance, three for an angle or four for a dihedral.")
+ if len(set(ids)) != len(ids):
+ raise ThreeDError("The atoms must be different.")
+ pts = [point(conformer, a) for a in ids]
+ if kind == "distance":
+ value = round(distance(*pts), 3)
+ elif kind == "angle":
+ value = round(angle(*pts), 1)
+ else:
+ value = round(dihedral(*pts), 1)
+ value = 180.0 if value == -180.0 else value
+ return {"kind": kind, "value": value + 0.0, "unit": UNIT[kind], "atoms": ids, "conformer": conformer.get("id"),
+ "method": conformer.get("method")}
+
+
+def charges(frag: dict, expansions: dict | None, kind: str = "gasteiger") -> dict:
+ if kind not in CHARGE_KINDS:
+ raise ThreeDError(f"kind must be one of {', '.join(CHARGE_KINDS)}")
+ model = molecule.prepare(frag, expansions)
+ notes: list[dict] = []
+ values: list[float] | None = None
+ method = "Gasteiger-Marsili"
+ if kind == "mmff":
+ props = forcefield.mmff_properties(model.mol)
+ if props is None:
+ notes.append(warning("mmff_charges_unavailable", "MMFF94 has no parameters for this structure; Gasteiger charges are shown instead."))
+ else:
+ values = [float(props.GetMMFFPartialCharge(i)) for i in range(model.mol.GetNumAtoms())]
+ method = "MMFF94"
+ if values is None:
+ AllChem.ComputeGasteigerCharges(model.mol)
+ values = []
+ bad = []
+ for a in model.mol.GetAtoms():
+ q = a.GetDoubleProp("_GasteigerCharge") if a.HasProp("_GasteigerCharge") else float("nan")
+ if not math.isfinite(q):
+ bad.append(model.labels[a.GetIdx()])
+ q = 0.0
+ values.append(q)
+ if bad:
+ notes.append(warning("charges_missing", "No Gasteiger parameters for some atoms; they read 0.", [b for b in bad if ":" not in b]))
+ out_atoms: dict[str, float] = {}
+ groups: dict[str, dict[str, list[float]]] = {molecule.H_TAG: {}, molecule.X_TAG: {}}
+ for label, q in zip(model.labels, values):
+ owner, tag = molecule.split(label)
+ if tag:
+ groups[tag[0]].setdefault(owner, []).append(round(q, 4))
+ else:
+ out_atoms[owner] = round(q, 4)
+ out = {"kind": kind, "method": method, "engine": ENGINE, "charges": out_atoms, "h": groups[molecule.H_TAG],
+ "range": [round(min(values), 4), round(max(values), 4)] if values else [0.0, 0.0], "label": ESP_LABEL, "warnings": notes}
+ if groups[molecule.X_TAG]:
+ out["expanded"] = groups[molecule.X_TAG]
+ return out
diff --git a/backend/app/services/three_d/minimise.py b/backend/app/services/three_d/minimise.py
new file mode 100644
index 00000000..6dd3756d
--- /dev/null
+++ b/backend/app/services/three_d/minimise.py
@@ -0,0 +1,24 @@
+import time
+
+from app.services.three_d import ENGINE, GRADIENT, MAX_ITERS, build, forcefield, molecule, verify
+
+
+def minimise_conformer(frag: dict, expansions: dict | None = None, cid: str | None = None, method: str = "MMFF94",
+ max_iters: int = MAX_ITERS, gradient: float = GRADIENT) -> dict:
+ start = time.perf_counter()
+ if not frag.get("conformers"):
+ made = build.build(frag, expansions, True, method, max_iters=max_iters, gradient=gradient)
+ report = {**made["report"]["minimise"], "built": True, "stereo": made["report"]["stereo"],
+ "warnings": made["report"]["warnings"], "timing_ms": made["report"]["timing_ms"], "engine": ENGINE}
+ return {"conformer": made["conformer"], "report": report, "replace": False}
+ conformer = molecule.find_conformer(frag, cid)
+ model = molecule.prepare(frag, expansions)
+ want = verify.expected(model)
+ conf_id = molecule.load(model, conformer)
+ mini, notes = forcefield.minimise(model.mol, conf_id, method, max_iters, gradient)
+ check = verify.stereo(model, conf_id, want)
+ record = molecule.record(model, conf_id, mini["method"], mini["energy_after"], mini["converged"], cid=conformer["id"])
+ warnings = notes + verify.stereo_warnings({**check, "chosen": []})
+ report = {**mini, "built": False, "stereo": check, "warnings": warnings,
+ "timing_ms": {"total": round((time.perf_counter() - start) * 1000, 1)}, "engine": ENGINE}
+ return {"conformer": record, "report": report, "replace": True}
diff --git a/backend/app/services/three_d/mmcif.py b/backend/app/services/three_d/mmcif.py
new file mode 100644
index 00000000..b5eb14a4
--- /dev/null
+++ b/backend/app/services/three_d/mmcif.py
@@ -0,0 +1,215 @@
+import math
+import re
+
+from app.services.three_d import ThreeDError, warning
+from app.services.three_d.structure import Atom, Structure, element_of
+
+NULLS = (".", "?")
+ESD = re.compile(r"\(\d+\)$")
+
+
+def tokens(text: str):
+ lines = text.splitlines()
+ i, n = 0, len(lines)
+ while i < n:
+ line = lines[i]
+ if line.startswith(";"):
+ buf = [line[1:]]
+ i += 1
+ while i < n and not lines[i].startswith(";"):
+ buf.append(lines[i])
+ i += 1
+ i += 1
+ yield "\n".join(buf).strip(), True
+ continue
+ pos, size = 0, len(line)
+ while pos < size:
+ ch = line[pos]
+ if ch.isspace():
+ pos += 1
+ continue
+ if ch == "#":
+ break
+ if ch in "'\"":
+ end = pos + 1
+ while end < size and not (line[end] == ch and (end + 1 == size or line[end + 1].isspace())):
+ end += 1
+ yield line[pos + 1:end], True
+ pos = end + 1
+ continue
+ end = pos
+ while end < size and not line[end].isspace():
+ end += 1
+ yield line[pos:end], False
+ pos = end
+ i += 1
+
+
+def read_blocks(text: str) -> tuple[str, dict[str, str], list[tuple[list[str], list[list[str]]]]]:
+ name, items, loops = "", {}, []
+ stream = tokens(text)
+ pending: tuple[str, bool] | None = None
+
+ def take():
+ nonlocal pending
+ if pending is not None:
+ out, pending = pending, None
+ return out
+ return next(stream, None)
+
+ while True:
+ tok = take()
+ if tok is None:
+ break
+ value, quoted = tok
+ low = value.lower()
+ if not quoted and low.startswith("data_"):
+ if name:
+ break
+ name = value[5:]
+ elif not quoted and low == "loop_":
+ tags: list[str] = []
+ rows: list[list[str]] = []
+ row: list[str] = []
+ while True:
+ tok = take()
+ if tok is None:
+ break
+ if not tok[1] and tok[0].startswith("_") and not rows and not row:
+ tags.append(tok[0].lower())
+ continue
+ if not tok[1] and (tok[0].startswith("_") or tok[0].lower() in ("loop_", "stop_") or tok[0].lower().startswith(("data_", "save_"))):
+ pending = tok
+ break
+ row.append(tok[0])
+ if len(row) == len(tags):
+ rows.append(row)
+ row = []
+ if tags:
+ loops.append((tags, rows))
+ elif not quoted and value.startswith("_"):
+ tok = take()
+ if tok is None:
+ break
+ items[low] = tok[0]
+ return name, items, loops
+
+
+def _loop(loops: list, prefix: str) -> tuple[list[str], list[list[str]]] | None:
+ for tags, rows in loops:
+ if tags and tags[0].startswith(prefix):
+ return tags, rows
+ return None
+
+
+def _value(row: list[str], col: dict[str, int], *names: str) -> str | None:
+ for name in names:
+ k = col.get(name)
+ if k is not None and row[k] not in NULLS:
+ return row[k]
+ return None
+
+
+def _num(text: str | None) -> float | None:
+ if text is None:
+ return None
+ try:
+ return float(ESD.sub("", text))
+ except ValueError:
+ return None
+
+
+def _int(text: str | None, default: int = 0) -> int:
+ try:
+ return int(text) if text is not None else default
+ except ValueError:
+ return default
+
+
+def _macromolecular(st: Structure, tags: list[str], rows: list[list[str]]) -> None:
+ col = {t.split(".", 1)[1]: i for i, t in enumerate(tags)}
+ for k in ("cartn_x", "cartn_y", "cartn_z"):
+ if k not in col:
+ raise ThreeDError("The mmCIF atom_site table has no Cartn_x, Cartn_y and Cartn_z columns.")
+ models: set[int] = set()
+ bad = 0
+ for row in rows:
+ x, y, z = (_num(row[col[k]]) for k in ("cartn_x", "cartn_y", "cartn_z"))
+ if x is None or y is None or z is None:
+ bad += 1
+ continue
+ name = _value(row, col, "auth_atom_id", "label_atom_id") or ""
+ model = _int(_value(row, col, "pdbx_pdb_model_num"), 1)
+ models.add(model)
+ st.atoms.append(Atom(
+ serial=_int(_value(row, col, "id"), len(st.atoms) + 1), name=name,
+ resname=_value(row, col, "auth_comp_id", "label_comp_id") or "UNL",
+ chain=_value(row, col, "auth_asym_id", "label_asym_id") or "",
+ resseq=_int(_value(row, col, "auth_seq_id", "label_seq_id"), 0), x=x, y=y, z=z,
+ element=element_of(_value(row, col, "type_symbol") or "", name.ljust(4)),
+ het=(_value(row, col, "group_pdb") or "ATOM").upper() == "HETATM", altloc=_value(row, col, "label_alt_id") or "",
+ icode=_value(row, col, "pdbx_pdb_ins_code") or "", occupancy=_num(_value(row, col, "occupancy")) or 1.0,
+ bfactor=_num(_value(row, col, "b_iso_or_equiv")) or 0.0, model=model, charge=_int(_value(row, col, "pdbx_formal_charge"), 0)))
+ st.models = max(1, len(models))
+ if bad:
+ st.warnings.append(warning("cif_bad_rows", f"{bad} atom_site row(s) had unreadable coordinates and were skipped."))
+
+
+def _cell(items: dict[str, str]) -> list[list[float]]:
+ vals = [_num(items.get(f"_cell_{k}")) for k in ("length_a", "length_b", "length_c", "angle_alpha", "angle_beta", "angle_gamma")]
+ if any(v is None for v in vals):
+ raise ThreeDError("The CIF has fractional coordinates but no complete unit cell.")
+ a, b, c, al, be, ga = vals
+ al, be, ga = (math.radians(v) for v in (al, be, ga))
+ cy = (math.cos(al) - math.cos(be) * math.cos(ga)) / math.sin(ga)
+ cz = math.sqrt(max(0.0, 1 - math.cos(be) ** 2 - cy ** 2))
+ return [[a, b * math.cos(ga), c * math.cos(be)], [0.0, b * math.sin(ga), c * cy], [0.0, 0.0, c * cz]]
+
+
+def _small_molecule(st: Structure, items: dict[str, str], tags: list[str], rows: list[list[str]]) -> None:
+ m = _cell(items)
+ col = {t: i for i, t in enumerate(tags)}
+ for row in rows:
+ f = [_num(_value(row, col, f"_atom_site_fract_{k}")) for k in "xyz"]
+ if any(v is None for v in f):
+ continue
+ label = _value(row, col, "_atom_site_label") or f"X{len(st.atoms) + 1}"
+ symbol = _value(row, col, "_atom_site_type_symbol") or re.sub(r"[^A-Za-z].*$", "", label)
+ x, y, z = (sum(m[r][k] * f[k] for k in range(3)) for r in range(3))
+ st.atoms.append(Atom(serial=len(st.atoms) + 1, name=label[:4], resname="UNL", chain="A", resseq=1, x=x, y=y, z=z,
+ element=element_of(re.sub(r"[\d+\-]+$", "", symbol), label), het=True))
+ st.warnings.append(warning("cif_asymmetric_unit", "Small-molecule CIF: the asymmetric unit is read from fractional coordinates; symmetry mates are not generated."))
+
+
+def parse(text: str) -> Structure:
+ name, items, loops = read_blocks(text)
+ st = Structure("cif", id_code=(items.get("_entry.id") or name or "").strip())
+ st.title = " ".join((items.get("_struct.title") or "").split())
+ site = _loop(loops, "_atom_site.")
+ fract = _loop(loops, "_atom_site_label") or _loop(loops, "_atom_site_fract")
+ if site is not None:
+ _macromolecular(st, *site)
+ elif fract is not None and any(t.startswith("_atom_site_fract_") for t in fract[0]):
+ _small_molecule(st, items, *fract)
+ else:
+ raise ThreeDError("The CIF has no atom_site table.")
+ comps = _loop(loops, "_chem_comp.")
+ if comps is not None:
+ col = {t: i for i, t in enumerate(comps[0])}
+ for row in comps[1]:
+ cid, cname = _value(row, col, "_chem_comp.id"), _value(row, col, "_chem_comp.name")
+ if cid and cname:
+ st.het_names[cid] = cname
+ elif items.get("_chem_comp.id") and items.get("_chem_comp.name"):
+ st.het_names[items["_chem_comp.id"]] = items["_chem_comp.name"]
+ conf = _loop(loops, "_struct_conf.")
+ if conf is not None:
+ k = conf[0].index("_struct_conf.conf_type_id") if "_struct_conf.conf_type_id" in conf[0] else None
+ st.helices = sum(1 for row in conf[1] if k is None or row[k].upper().startswith("HELX"))
+ elif items.get("_struct_conf.conf_type_id", "").upper().startswith("HELX"):
+ st.helices = 1
+ sheet = _loop(loops, "_struct_sheet_range.")
+ st.sheets = len(sheet[1]) if sheet is not None else (1 if "_struct_sheet_range.id" in items else 0)
+ if not st.atoms:
+ raise ThreeDError("The CIF has no readable atoms.")
+ return st
diff --git a/backend/app/services/three_d/molecule.py b/backend/app/services/three_d/molecule.py
new file mode 100644
index 00000000..0a607da2
--- /dev/null
+++ b/backend/app/services/three_d/molecule.py
@@ -0,0 +1,202 @@
+import math
+from dataclasses import dataclass, field
+
+from rdkit import Chem
+from rdkit.Geometry import Point3D
+
+from app.services.chem import convert, perceive
+from app.services.model import new_id
+from app.services.three_d import COORD_DIGITS, MAX_ATOMS, ThreeDError, rounded
+
+H_TAG = "h"
+X_TAG = "x"
+
+
+@dataclass
+class Model:
+ conv: convert.Conversion
+ mol: Chem.Mol
+ labels: list[str]
+ heavy: int
+ warnings: list[dict] = field(default_factory=list)
+
+ def index(self) -> dict[str, int]:
+ return {label: i for i, label in enumerate(self.labels)}
+
+ def bond_id(self, idx: int) -> str | None:
+ b = self.mol.GetBondWithIdx(idx)
+ return b.GetProp(convert.ID_PROP) if b.HasProp(convert.ID_PROP) else None
+
+
+def split(label: str) -> tuple[str, str]:
+ owner, _, tag = label.partition(":")
+ return owner, tag
+
+
+def parent_of(label: str) -> str | None:
+ owner, tag = split(label)
+ return owner if tag else None
+
+
+def find_fragment(doc: dict, oid: object) -> dict:
+ if not isinstance(oid, str) or not oid:
+ raise ThreeDError("object must be the id of a structure on the page")
+ obj = (doc.get("objects") or {}).get(oid)
+ if not isinstance(obj, dict):
+ raise ThreeDError(f"The drawing has no object {oid}.", 404)
+ if obj.get("kind") != "fragment":
+ raise ThreeDError(f"{oid} is a {obj.get('kind')}, not a structure.")
+ return obj
+
+
+def find_conformer(frag: dict, cid: object = None) -> dict:
+ found = [c for c in frag.get("conformers") or [] if isinstance(c, dict)]
+ if not found:
+ raise ThreeDError(f"{frag.get('id')} has no 3D coordinates yet; build 3D first.", 409)
+ want = cid if isinstance(cid, str) and cid else frag.get("conformer")
+ if not want:
+ return found[0]
+ for c in found:
+ if c.get("id") == want:
+ return c
+ if cid:
+ raise ThreeDError(f"{frag.get('id')} has no conformer {cid}.", 404)
+ return found[0]
+
+
+def expansions_of(doc: dict) -> dict | None:
+ found = doc.get("expansions")
+ return found if isinstance(found, dict) else None
+
+
+def _labels(conv: convert.Conversion, mol: Chem.Mol, heavy: int) -> list[str]:
+ labels: list[str] = []
+ counts: dict[tuple[str, str], int] = {}
+
+ def tagged(owner: str, tag: str) -> str:
+ k = counts.get((owner, tag), 0)
+ counts[(owner, tag)] = k + 1
+ return f"{owner}:{tag}{k}"
+
+ for i in range(mol.GetNumAtoms()):
+ if i < heavy:
+ owner = conv.owner[i]
+ labels.append(owner if conv.index.get(owner) == i else tagged(owner, X_TAG))
+ continue
+ nbrs = mol.GetAtomWithIdx(i).GetNeighbors()
+ p = nbrs[0].GetIdx() if nbrs else -1
+ owner = conv.owner[p] if 0 <= p < heavy else conv.owner[-1]
+ labels.append(tagged(owner, H_TAG if conv.index.get(owner) == p else X_TAG))
+ return labels
+
+
+def heavy_labels(conv: convert.Conversion) -> list[str]:
+ return _labels(conv, conv.mol, conv.mol.GetNumAtoms())
+
+
+def prepare(frag: dict, expansions: dict | None = None, heavy_coords: dict[str, list[float]] | None = None) -> Model:
+ if not frag.get("atoms"):
+ raise ThreeDError("The structure has no atoms.")
+ conv = perceive.prepare(frag, expansions)
+ mol = conv.mol
+ dummies = sorted({conv.owner[a.GetIdx()] for a in mol.GetAtoms() if a.GetAtomicNum() == 0})
+ if dummies:
+ raise ThreeDError(f"3D needs real atoms: {len(dummies)} atom(s) are labels, R-groups or attachment points ({', '.join(dummies[:5])}).")
+ heavy = mol.GetNumAtoms()
+ try:
+ if heavy_coords is not None:
+ labels = heavy_labels(conv)
+ conf = Chem.Conformer(heavy)
+ for i, label in enumerate(labels):
+ p = heavy_coords.get(label)
+ if p is None:
+ raise ThreeDError(f"No 3D position for atom {label}.")
+ conf.SetAtomPosition(i, Point3D(*(float(v) for v in p)))
+ conf.Set3D(True)
+ work = Chem.Mol(mol)
+ work.RemoveAllConformers()
+ work.AddConformer(conf, assignId=True)
+ with_h = Chem.AddHs(work, addCoords=True)
+ else:
+ with_h = Chem.AddHs(mol)
+ with_h.RemoveAllConformers()
+ except ThreeDError:
+ raise
+ except Exception as exc:
+ raise ThreeDError(f"Hydrogens could not be added: {exc}") from exc
+ if with_h.GetNumAtoms() > MAX_ATOMS:
+ raise ThreeDError(f"The structure has {with_h.GetNumAtoms()} atoms with hydrogens; 3D handles up to {MAX_ATOMS}.")
+ return Model(conv, with_h, _labels(conv, with_h, heavy), heavy, list(conv.warnings))
+
+
+def _point(value: object) -> tuple[float, float, float] | None:
+ if not isinstance(value, (list, tuple)) or len(value) != 3:
+ return None
+ try:
+ out = tuple(float(v) for v in value)
+ except (TypeError, ValueError):
+ return None
+ return out if all(math.isfinite(v) for v in out) else None
+
+
+def positions(model: Model, conformer: dict) -> list[tuple[float, float, float]]:
+ coords = conformer.get("coords") if isinstance(conformer.get("coords"), dict) else {}
+ groups = {H_TAG: conformer.get("h"), X_TAG: conformer.get("expanded")}
+ out: list[tuple[float, float, float]] = []
+ used = {H_TAG: 0, X_TAG: 0}
+ for label in model.labels:
+ owner, tag = split(label)
+ if not tag:
+ p = _point(coords.get(owner))
+ else:
+ table = groups[tag[0]] if isinstance(groups[tag[0]], dict) else {}
+ seq = table.get(owner) if isinstance(table.get(owner), list) else []
+ k = int(tag[1:])
+ p = _point(seq[k]) if k < len(seq) else None
+ used[tag[0]] += 1
+ if p is None:
+ raise ThreeDError(f"The 3D coordinates do not fit this structure (nothing for {label}); build 3D again.", 409)
+ out.append(p)
+ for tag, n in used.items():
+ table = groups[tag] if isinstance(groups[tag], dict) else {}
+ have = sum(len(v) for v in table.values() if isinstance(v, list))
+ if have != n:
+ raise ThreeDError("The 3D coordinates do not fit this structure (hydrogen count changed); build 3D again.", 409)
+ return out
+
+
+def add_conformer(model: Model, points: list[tuple[float, float, float]]) -> int:
+ conf = Chem.Conformer(model.mol.GetNumAtoms())
+ for i, p in enumerate(points):
+ conf.SetAtomPosition(i, Point3D(*p))
+ conf.Set3D(True)
+ return model.mol.AddConformer(conf, assignId=True)
+
+
+def load(model: Model, conformer: dict) -> int:
+ return add_conformer(model, positions(model, conformer))
+
+
+def record(model: Model, conf_id: int, method: str, energy: float | None = None, converged: bool | None = None,
+ cid: str | None = None) -> dict:
+ pts = model.mol.GetConformer(conf_id).GetPositions()
+ coords: dict[str, list[float]] = {}
+ groups: dict[str, dict[str, list]] = {H_TAG: {}, X_TAG: {}}
+ for i, label in enumerate(model.labels):
+ p = [round(float(v), COORD_DIGITS) + 0.0 for v in pts[i]]
+ owner, tag = split(label)
+ if tag:
+ groups[tag[0]].setdefault(owner, []).append(p)
+ else:
+ coords[owner] = p
+ out: dict = {"id": cid or new_id("c"), "coords": coords}
+ if groups[H_TAG]:
+ out["h"] = groups[H_TAG]
+ if groups[X_TAG]:
+ out["expanded"] = groups[X_TAG]
+ if energy is not None:
+ out["energy"] = rounded(energy)
+ out["method"] = method
+ if converged is not None:
+ out["converged"] = bool(converged)
+ return out
diff --git a/backend/app/services/three_d/molfile3d.py b/backend/app/services/three_d/molfile3d.py
new file mode 100644
index 00000000..96e6cd45
--- /dev/null
+++ b/backend/app/services/three_d/molfile3d.py
@@ -0,0 +1,99 @@
+from rdkit import Chem
+from rdkit.Geometry import Point3D
+
+from app.services.chem import DEFAULT_BOND_LENGTH, convert, io
+from app.services.three_d import ThreeDError, molecule, warning
+
+SOURCE = "fc3d_src"
+MAX_RECORDS = 200
+GAP = 36.0
+
+
+def _is_3d(mol: Chem.Mol) -> bool:
+ if not mol.GetNumConformers():
+ return False
+ pos = mol.GetConformer().GetPositions()
+ return any(abs(p[2]) > 1e-4 for p in pos)
+
+
+def _energy(fields: dict) -> tuple[float | None, str]:
+ raw = fields.get("FORMCHEM_ENERGY")
+ method = fields.get("FORMCHEM_METHOD") or "file"
+ try:
+ return (float(raw), method) if raw is not None else (None, "file")
+ except ValueError:
+ return None, "file"
+
+
+def record(block: str, where: str, bond_length: float, origin: tuple[float, float], used: set[str]) -> dict:
+ ctab, fields = io.sd_fields(block)
+ notes: list[dict] = []
+ mol = Chem.MolFromMolBlock(ctab, removeHs=False, sanitize=True)
+ if mol is None:
+ mol = Chem.MolFromMolBlock(ctab, removeHs=False, sanitize=False)
+ if mol is None:
+ raise ThreeDError(f"{where} could not be read.")
+ notes.append(warning("not_sanitised", f"{where} has valence problems; it was read without sanitising."))
+ mol.UpdatePropertyCache(strict=False)
+ name = mol.GetProp("_Name").strip() if mol.HasProp("_Name") and mol.GetProp("_Name").strip() else None
+ for a in mol.GetAtoms():
+ a.SetIntProp(SOURCE, a.GetIdx())
+ three_d = _is_3d(mol)
+ if three_d:
+ Chem.AssignStereochemistryFrom3D(mol)
+ heavy = Chem.RemoveHs(mol, sanitize=False)
+ frag = convert.from_mol(heavy, bond_length, origin, name=name, used=used)
+ if not three_d:
+ notes.append(warning("flat_record", f"{where} has 2D coordinates only; no conformer was kept."))
+ return {"name": name, "fragment": frag, "warnings": notes, "three_d": False}
+ ids = list(frag["atoms"])
+ file_pos = mol.GetConformer().GetPositions()
+ coords = {aid: [float(v) for v in file_pos[heavy.GetAtomWithIdx(k).GetIntProp(SOURCE)]] for k, aid in enumerate(ids)}
+ model = molecule.prepare(frag, None, heavy_coords=coords)
+ kept = {a.GetIntProp(SOURCE) for a in heavy.GetAtoms()}
+ index = model.index()
+ conf = model.mol.GetConformer()
+ placed = 0
+ for k, aid in enumerate(ids):
+ src = heavy.GetAtomWithIdx(k).GetIntProp(SOURCE)
+ hs = [n.GetIdx() for n in mol.GetAtomWithIdx(src).GetNeighbors() if n.GetAtomicNum() == 1 and n.GetIdx() not in kept]
+ labels = [f"{aid}:h{j}" for j in range(len(hs))]
+ if len(hs) and all(label in index for label in labels) and f"{aid}:h{len(hs)}" not in index:
+ for label, h in zip(labels, hs):
+ conf.SetAtomPosition(index[label], Point3D(*(float(v) for v in file_pos[h])))
+ placed += 1
+ missing = sum(1 for label in model.labels if ":h" in label) - placed
+ if missing > 0:
+ notes.append(warning("hydrogens_placed", f"{missing} hydrogen(s) were not in the file and were placed from the geometry."))
+ energy, method = _energy(fields)
+ conformer = molecule.record(model, conf.GetId(), method, energy)
+ frag["conformers"] = [conformer]
+ frag["conformer"] = conformer["id"]
+ data = {k: v for k, v in fields.items() if not k.startswith("FORMCHEM_")}
+ if data:
+ frag["data"] = data
+ return {"name": name, "fragment": frag, "warnings": notes, "three_d": True}
+
+
+def read(text: str, fmt: str, bond_length: float = DEFAULT_BOND_LENGTH, origin: tuple[float, float] = (72.0, 72.0),
+ used: set[str] | None = None) -> list[dict]:
+ blocks = list(io.sd_records(text)) if fmt == "sdf" else [text]
+ if not blocks:
+ raise ThreeDError("The file has no records.")
+ if len(blocks) > MAX_RECORDS:
+ raise ThreeDError(f"The file has {len(blocks)} records; 3D import reads up to {MAX_RECORDS}.", 413)
+ out, x = [], origin[0]
+ used = used if used is not None else set()
+ for n, block in enumerate(blocks, start=1):
+ where = f"Record {n}" if len(blocks) > 1 else "The structure"
+ try:
+ got = record(block, where, bond_length, (x, origin[1]), used)
+ except ThreeDError as exc:
+ out.append({"name": None, "fragment": None, "warnings": [warning("record_failed", str(exc))], "three_d": False})
+ continue
+ atoms = got["fragment"]["atoms"].values()
+ x = max((a["x"] for a in atoms), default=x) + GAP
+ out.append(got)
+ if not any(r["fragment"] for r in out):
+ raise ThreeDError("No record of the file could be read.")
+ return out
diff --git a/backend/app/services/three_d/pdb.py b/backend/app/services/three_d/pdb.py
new file mode 100644
index 00000000..e07d3515
--- /dev/null
+++ b/backend/app/services/three_d/pdb.py
@@ -0,0 +1,92 @@
+from app.services.three_d import ThreeDError, warning
+from app.services.three_d.structure import Atom, Structure, element_of
+
+MAX_ATOMS = 2_000_000
+
+
+def _int(text: str, default: int = 0) -> int:
+ try:
+ return int(text.strip())
+ except ValueError:
+ return default
+
+
+def _float(text: str, default: float | None = None) -> float | None:
+ try:
+ return float(text.strip())
+ except ValueError:
+ return default
+
+
+def _charge(text: str) -> int:
+ t = text.strip()
+ if len(t) == 2 and t[0].isdigit() and t[1] in "+-":
+ return int(t[0]) * (1 if t[1] == "+" else -1)
+ if len(t) == 2 and t[1].isdigit() and t[0] in "+-":
+ return int(t[1]) * (1 if t[0] == "+" else -1)
+ return 0
+
+
+def _atom(line: str, model: int) -> Atom | None:
+ line = line.ljust(80)
+ x, y, z = _float(line[30:38]), _float(line[38:46]), _float(line[46:54])
+ if x is None or y is None or z is None:
+ return None
+ name = line[12:16]
+ return Atom(serial=_int(line[6:11]), name=name.strip(), altloc=line[16].strip(), resname=line[17:20].strip() or "UNL",
+ chain=line[21].strip(), resseq=_int(line[22:26]), icode=line[26].strip(), x=x, y=y, z=z,
+ occupancy=_float(line[54:60], 1.0), bfactor=_float(line[60:66], 0.0), element=element_of(line[76:78], name),
+ het=line.startswith("HETATM"), model=model, charge=_charge(line[78:80]))
+
+
+def parse(text: str) -> Structure:
+ st = Structure("pdb")
+ model, saw_model, bad = 1, False, 0
+ titles: list[str] = []
+ names: dict[str, list[str]] = {}
+ sheets: set[tuple[str, str]] = set()
+ for raw in text.splitlines():
+ rec = raw[:6]
+ if rec in ("ATOM ", "HETATM"):
+ a = _atom(raw, model)
+ if a is None:
+ bad += 1
+ continue
+ st.atoms.append(a)
+ if len(st.atoms) > MAX_ATOMS:
+ raise ThreeDError(f"The file has more than {MAX_ATOMS} atoms.", 413)
+ elif rec == "MODEL ":
+ if saw_model:
+ st.models += 1
+ saw_model = True
+ model = _int(raw[10:14], st.models) or st.models
+ elif rec == "HEADER":
+ st.id_code = raw[62:66].strip()
+ elif rec == "TITLE ":
+ titles.append(raw[10:80].strip())
+ elif rec == "HETNAM":
+ code = raw[11:14].strip()
+ if code:
+ names.setdefault(code, []).append(raw[15:70].strip())
+ elif rec == "HELIX ":
+ st.helices += 1
+ elif rec == "SHEET ":
+ sheets.add((raw[11:14].strip(), raw[7:10].strip()))
+ elif rec == "CONECT":
+ line = raw.ljust(31)
+ src = _int(line[6:11], -1)
+ if src < 0:
+ continue
+ for k in range(11, 31, 5):
+ dst = _int(line[k:k + 5], -1)
+ if dst > 0 and dst != src:
+ st.conect.setdefault(src, set()).add(dst)
+ st.conect.setdefault(dst, set()).add(src)
+ st.title = " ".join(t for t in titles if t)
+ st.het_names = {k: " ".join(v).replace("- ", "-").strip() for k, v in names.items()}
+ st.sheets = len(sheets)
+ if bad:
+ st.warnings.append(warning("pdb_bad_lines", f"{bad} ATOM or HETATM line(s) had unreadable coordinates and were skipped."))
+ if not st.atoms:
+ raise ThreeDError("The PDB file has no ATOM or HETATM records.")
+ return st
diff --git a/backend/app/services/three_d/readers.py b/backend/app/services/three_d/readers.py
new file mode 100644
index 00000000..7ea214b4
--- /dev/null
+++ b/backend/app/services/three_d/readers.py
@@ -0,0 +1,46 @@
+from app.services.chem import DEFAULT_BOND_LENGTH, ENGINE
+from app.services.model import new_id
+from app.services.three_d import mmcif, molfile3d, pdb, structure
+
+MODEL_SIZE = (240.0, 180.0)
+
+
+def read(data: bytes, name: str | None = None, fmt: str | None = None, bond_length: float = DEFAULT_BOND_LENGTH,
+ origin: tuple[float, float] = (72.0, 72.0), used: set[str] | None = None) -> dict:
+ fmt = structure.detect(data, name, fmt)
+ text = structure.decode(data)
+ if fmt in ("pdb", "cif"):
+ st = (pdb.parse if fmt == "pdb" else mmcif.parse)(text)
+ return {"format": fmt, "name": name or "", "title": st.title, "id_code": st.id_code, "structure": st,
+ "summary": structure.summary(st), "engine": ENGINE}
+ mols = molfile3d.read(text, fmt, bond_length, origin, used)
+ good = [m for m in mols if m["fragment"]]
+ summary = {"models": len(mols), "molecules": len(good), "atoms": sum(len(m["fragment"]["atoms"]) for m in good),
+ "three_d": sum(1 for m in good if m["three_d"]), "chains": [], "residues": 0, "ligands": [], "primary_ligand": None,
+ "waters": 0, "altlocs": [], "helices": 0, "sheets": 0, "warnings": [w for m in mols for w in m["warnings"]]}
+ title = next((m["name"] for m in good if m["name"]), "")
+ return {"format": fmt, "name": name or "", "title": title, "id_code": "", "molecules": mols, "summary": summary, "engine": ENGINE}
+
+
+def model_object(media_id: str, fmt: str, summary: dict, x: float = 72.0, y: float = 72.0, oid: str | None = None) -> dict:
+ protein = any(c.get("polymer") for c in summary.get("chains") or [])
+ obj = {"id": oid or new_id("o"), "kind": "model3d", "x": x, "y": y, "w": MODEL_SIZE[0], "h": MODEL_SIZE[1],
+ "source": {"media": media_id, "format": fmt}, "display": "cartoon" if protein else "ballstick"}
+ key = summary.get("primary_ligand")
+ if key:
+ obj["focus"] = {"ligand": key.split(":")[1], "residue": key}
+ return obj
+
+
+def used_ids(doc: dict) -> set[str]:
+ used: set[str] = set()
+ for page in doc.get("pages") or []:
+ if isinstance(page, dict) and isinstance(page.get("id"), str):
+ used.add(page["id"])
+ for oid, obj in (doc.get("objects") or {}).items():
+ used.add(oid)
+ if isinstance(obj, dict):
+ used.update(k for k in (obj.get("atoms") or {}) if isinstance(k, str))
+ used.update(k for k in (obj.get("bonds") or {}) if isinstance(k, str))
+ used.update(k for k in (doc.get("media") or {}) if isinstance(k, str))
+ return used
diff --git a/backend/app/services/three_d/scan.py b/backend/app/services/three_d/scan.py
new file mode 100644
index 00000000..9c657df9
--- /dev/null
+++ b/backend/app/services/three_d/scan.py
@@ -0,0 +1,103 @@
+import time
+
+from rdkit.Chem import rdMolTransforms
+
+from app.services.three_d import ENGINE, ThreeDError, build, forcefield, molecule, rounded, warning
+
+MAX_POINTS = 361
+RESTRAINT = 1.0e4
+SCAN_ITERS = 2000
+PASSES = 2
+
+
+def angles(start: float, end: float, step: float) -> list[float]:
+ if step <= 0:
+ raise ThreeDError("step must be a positive number of degrees")
+ if end < start:
+ raise ThreeDError("end must not be below start")
+ count = int((end - start) / step + 1e-9) + 1
+ if count > MAX_POINTS:
+ raise ThreeDError(f"The scan would have {count} points; at most {MAX_POINTS}.")
+ return [round(start + k * step, 6) for k in range(count)]
+
+
+def chain(model: molecule.Model, ids: list[str]) -> tuple[list[int], list[dict]]:
+ if len(ids) != 4:
+ raise ThreeDError("A dihedral scan needs four atoms.")
+ index = model.index()
+ missing = [a for a in ids if a not in index]
+ if missing:
+ raise ThreeDError(f"Unknown atom(s) {', '.join(missing)}; use fragment atom ids or a hydrogen as a1:h0.")
+ idx = [index[a] for a in ids]
+ if len(set(idx)) != 4:
+ raise ThreeDError("The four atoms must be different.")
+ for p, q in zip(idx, idx[1:]):
+ if model.mol.GetBondBetweenAtoms(p, q) is None:
+ raise ThreeDError("The four atoms must form a chain of bonds (a1-a2-a3-a4).")
+ notes = []
+ if model.mol.GetBondBetweenAtoms(idx[1], idx[2]).IsInRing():
+ notes.append(warning("ring_bond", "The central bond is in a ring; the ring is strained to follow the angle.", [ids[1], ids[2]]))
+ return idx, notes
+
+
+def _constrained(model: molecule.Model, conf_id: int, method: str, idx: list[int], angle: float):
+ field = forcefield.setup(model.mol, method, conf_id)
+ add = field.ff.UFFAddTorsionConstraint if field.method == "UFF" else field.ff.MMFFAddTorsionConstraint
+ add(idx[0], idx[1], idx[2], idx[3], False, angle, angle, RESTRAINT)
+ return field
+
+
+def run(frag: dict, expansions: dict | None, ids: list[str], start: float = -180.0, end: float = 180.0, step: float = 10.0,
+ method: str = "MMFF94", cid: str | None = None, store: bool = False, max_iters: int = SCAN_ITERS) -> dict:
+ began = time.perf_counter()
+ steps = angles(start, end, step)
+ model = molecule.prepare(frag, expansions)
+ idx, notes = chain(model, ids)
+ if frag.get("conformers"):
+ conf_id = molecule.load(model, molecule.find_conformer(frag, cid))
+ else:
+ conf_id = build.embed(model, build.SEED)
+ notes.append(warning("built", "The structure had no 3D coordinates; the scan started from a fresh embedding."))
+ ring = model.mol.GetBondBetweenAtoms(idx[1], idx[2]).IsInRing()
+ points, records, used, fallback = [], [], method, []
+ base = [tuple(p) for p in model.mol.GetConformer(conf_id).GetPositions()]
+ for angle in steps:
+ conf = model.mol.GetConformer(conf_id)
+ for i, p in enumerate(base):
+ conf.SetAtomPosition(i, p)
+ if not ring:
+ rdMolTransforms.SetDihedralDeg(conf, *idx, angle)
+ field = _constrained(model, conf_id, method, idx, angle)
+ field.ff.Initialize()
+ status = 1
+ for _ in range(PASSES):
+ status = field.ff.Minimize(maxIts=int(max_iters), **forcefield.TIGHT)
+ plain = forcefield.setup(model.mol, method, conf_id)
+ used = plain.method
+ fallback = forcefield.fallback_warning(plain)
+ energy = forcefield.energy(plain)
+ measured = rdMolTransforms.GetDihedralDeg(model.mol.GetConformer(conf_id), *idx)
+ points.append({"angle": angle, "measured": round(measured, 1), "energy": rounded(energy), "converged": status == 0})
+ if store:
+ pts = [tuple(p) for p in model.mol.GetConformer(conf_id).GetPositions()]
+ records.append((energy, status == 0, pts, angle))
+ low = min(p["energy"] for p in points)
+ for p in points:
+ p["relative"] = rounded(p["energy"] - low)
+ best = min(points, key=lambda p: p["energy"])
+ worst = max(points, key=lambda p: p["energy"])
+ out = {
+ "atoms": ids, "points": points, "minimum": {"angle": best["angle"], "energy": best["energy"]},
+ "maximum": {"angle": worst["angle"], "energy": worst["energy"]}, "method": used, "engine": ENGINE,
+ "relaxed": True, "warnings": notes + fallback, "timing_ms": {"total": round((time.perf_counter() - began) * 1000, 1)},
+ }
+ if store:
+ stored = []
+ for energy, converged, pts, angle in records:
+ sid = molecule.add_conformer(model, pts)
+ rec = molecule.record(model, sid, used, energy, converged)
+ rec["scan"] = {"atoms": ids, "angle": angle}
+ stored.append(rec)
+ out["conformers"] = stored
+ out["active"] = stored[points.index(best)]["id"]
+ return out
diff --git a/backend/app/services/three_d/stale.py b/backend/app/services/three_d/stale.py
new file mode 100644
index 00000000..c1c0d05d
--- /dev/null
+++ b/backend/app/services/three_d/stale.py
@@ -0,0 +1,100 @@
+import json
+
+from app.services import ops as opsmod
+
+ATOM_FIELDS = ("element", "charge", "isotope", "radical", "hydrogens", "label", "expansion", "generic", "rgroup", "query")
+BOND_FIELDS = ("order", "stereo", "query", "topology")
+DEFAULTS = {"charge": 0, "radical": "none", "order": 1, "stereo": "none"}
+DIRECTED = ("wedge", "hash", "hollow")
+OWN = ("conformers", "conformer")
+
+
+def _norm(field: str, value: object) -> object:
+ if value is None:
+ value = DEFAULTS.get(field)
+ if isinstance(value, (dict, list)):
+ return json.dumps(value, sort_keys=True)
+ if isinstance(value, bool) or value is None:
+ return value
+ if isinstance(value, (int, float)):
+ return float(value)
+ return value
+
+
+def signature(frag: dict) -> tuple:
+ atoms = frag.get("atoms") if isinstance(frag.get("atoms"), dict) else {}
+ bonds = frag.get("bonds") if isinstance(frag.get("bonds"), dict) else {}
+ a_sig = tuple(sorted((aid, tuple(_norm(f, a.get(f)) for f in ATOM_FIELDS)) for aid, a in atoms.items() if isinstance(a, dict)))
+ b_sig = []
+ for bid, b in bonds.items():
+ if not isinstance(b, dict):
+ continue
+ ends = (str(b.get("a")), str(b.get("b")))
+ if b.get("stereo") not in DIRECTED:
+ ends = tuple(sorted(ends))
+ b_sig.append((bid, ends, tuple(_norm(f, b.get(f)) for f in BOND_FIELDS)))
+ return a_sig, tuple(sorted(b_sig))
+
+
+def _touched(ops: list) -> tuple[set[str] | None, set[str]]:
+ hit: set[str] = set()
+ own: set[str] = set()
+ for op in ops if isinstance(ops, list) else []:
+ path = op.get("path") if isinstance(op, dict) else None
+ if not isinstance(path, list) or not path:
+ return None, own
+ if path[0] != "objects":
+ continue
+ if len(path) < 2 or not isinstance(path[1], str):
+ return None, own
+ fid = path[1]
+ if len(path) == 2:
+ hit.add(fid)
+ continue
+ part = path[2]
+ if part in OWN:
+ own.add(fid)
+ continue
+ if part not in ("atoms", "bonds") or len(path) == 3 or len(path) == 4:
+ if part in ("atoms", "bonds"):
+ hit.add(fid)
+ continue
+ fields = ATOM_FIELDS if part == "atoms" else BOND_FIELDS + ("a", "b")
+ if path[4] in fields:
+ hit.add(fid)
+ return hit, own
+
+
+def watch(doc: dict, ops: list) -> dict:
+ objects = doc.get("objects") if isinstance(doc.get("objects"), dict) else {}
+ hit, own = _touched(ops)
+ ids = objects.keys() if hit is None else hit
+ out = {}
+ for fid in ids:
+ if fid in own:
+ continue
+ frag = objects.get(fid)
+ if isinstance(frag, dict) and frag.get("kind") == "fragment" and frag.get("conformers"):
+ out[fid] = signature(frag)
+ return out
+
+
+def settle(doc: dict, done: dict, watched: dict) -> dict:
+ if not watched:
+ return done
+ objects = doc.get("objects") if isinstance(doc.get("objects"), dict) else {}
+ extra: list[dict] = []
+ for fid, before in watched.items():
+ frag = objects.get(fid)
+ if not isinstance(frag, dict) or frag.get("kind") != "fragment" or not frag.get("conformers"):
+ continue
+ if signature(frag) == before:
+ continue
+ extra.append({"op": "set", "path": ["objects", fid, "conformers"]})
+ if "conformer" in frag:
+ extra.append({"op": "set", "path": ["objects", fid, "conformer"]})
+ if not extra:
+ return done
+ applied = opsmod.apply_ops(doc, extra)
+ ops = list(done["ops"]) + applied
+ return {**done, "ops": ops, "inverse": opsmod.inverse_of(ops)}
diff --git a/backend/app/services/three_d/structure.py b/backend/app/services/three_d/structure.py
new file mode 100644
index 00000000..ecaf0f7d
--- /dev/null
+++ b/backend/app/services/three_d/structure.py
@@ -0,0 +1,190 @@
+from dataclasses import dataclass, field
+
+from app.services.model import ELEMENTS
+from app.services.three_d import ThreeDError
+
+PROTEIN = {
+ "ALA": "A", "ARG": "R", "ASN": "N", "ASP": "D", "CYS": "C", "GLN": "Q", "GLU": "E", "GLY": "G", "HIS": "H", "ILE": "I",
+ "LEU": "L", "LYS": "K", "MET": "M", "PHE": "F", "PRO": "P", "SER": "S", "THR": "T", "TRP": "W", "TYR": "Y", "VAL": "V",
+ "MSE": "M", "SEC": "U", "PYL": "O", "HID": "H", "HIE": "H", "HIP": "H", "HSD": "H", "HSE": "H", "HSP": "H", "CYX": "C",
+ "ASH": "D", "GLH": "E", "LYN": "K", "SEP": "S", "TPO": "T", "PTR": "Y",
+}
+NUCLEIC = {"A": "A", "C": "C", "G": "G", "U": "U", "I": "I", "DA": "A", "DC": "C", "DG": "G", "DT": "T", "DI": "I", "DU": "U"}
+WATER = {"HOH", "WAT", "DOD", "H2O", "TIP", "TIP3", "SOL"}
+ADDITIVES = {"GOL", "EDO", "SO4", "PO4", "PEG", "PGE", "PG4", "1PE", "P6G", "ACT", "ACY", "DMS", "FMT", "MPD", "EPE", "MES", "TRS",
+ "CIT", "BME", "IMD", "NO3", "SCN", "IOD", "BR", "CL", "NA", "K", "MG", "CA", "ZN", "MN", "NI", "CO", "CU", "FE", "CD", "HG"}
+FORMATS = ("pdb", "cif", "sdf", "mol")
+EXTENSIONS = {".pdb": "pdb", ".ent": "pdb", ".cif": "cif", ".mmcif": "cif", ".sdf": "sdf", ".sd": "sdf", ".mol": "mol"}
+MIMES = {"pdb": "chemical/x-pdb", "cif": "chemical/x-mmcif", "sdf": "chemical/x-mdl-sdfile", "mol": "chemical/x-mdl-molfile"}
+SYMBOLS = {e.upper(): e for e in ELEMENTS}
+
+
+@dataclass
+class Atom:
+ serial: int
+ name: str
+ resname: str
+ chain: str
+ resseq: int
+ x: float
+ y: float
+ z: float
+ element: str
+ het: bool = False
+ altloc: str = ""
+ icode: str = ""
+ occupancy: float = 1.0
+ bfactor: float = 0.0
+ model: int = 1
+ charge: int = 0
+
+
+@dataclass
+class Structure:
+ format: str
+ atoms: list[Atom] = field(default_factory=list)
+ title: str = ""
+ id_code: str = ""
+ conect: dict[int, set[int]] = field(default_factory=dict)
+ helices: int = 0
+ sheets: int = 0
+ het_names: dict[str, str] = field(default_factory=dict)
+ models: int = 1
+ warnings: list[dict] = field(default_factory=list)
+
+
+def element_of(raw: str, atom_name: str = "") -> str:
+ text = (raw or "").strip()
+ if text:
+ found = SYMBOLS.get(text.upper())
+ if found:
+ return found
+ name = atom_name.rstrip()
+ if not name:
+ return "C"
+ if len(name) == 4 and name[0].isalpha() and name[:2].upper() in SYMBOLS and name[0] not in "CHNOS":
+ return SYMBOLS[name[:2].upper()]
+ letters = "".join(ch for ch in name if ch.isalpha())
+ if not letters:
+ return "C"
+ if name[0] == " " or name[0].isdigit():
+ return SYMBOLS.get(letters[0].upper(), "C")
+ if len(letters) >= 2 and letters[:2].upper() in SYMBOLS and letters[0].upper() not in "CHNOS":
+ return SYMBOLS[letters[:2].upper()]
+ return SYMBOLS.get(letters[0].upper(), "C")
+
+
+def detect(data: bytes, name: str | None = None, given: str | None = None) -> str:
+ if given:
+ fmt = given.lower().lstrip(".")
+ fmt = {"mmcif": "cif", "ent": "pdb", "sd": "sdf"}.get(fmt, fmt)
+ if fmt not in FORMATS:
+ raise ThreeDError(f"format must be one of {', '.join(FORMATS)}")
+ return fmt
+ head = data[:65536].decode("utf-8", "replace")
+ stripped = head.lstrip(" \t\r\n")
+ lines = [line for line in head.splitlines()[:400]]
+ if stripped.startswith("data_") or ("_atom_site." in head and "loop_" in head) or "_atom_site_fract_x" in head:
+ return "cif"
+ if any(line[:6] in ("ATOM ", "HETATM", "HEADER", "CRYST1", "COMPND") for line in lines):
+ return "pdb"
+ if "$$$$" in head:
+ return "sdf"
+ if "V2000" in head or "V3000" in head or "M END" in head:
+ return "mol"
+ if name:
+ for ext, fmt in EXTENSIONS.items():
+ if name.lower().endswith(ext):
+ return fmt
+ raise ThreeDError("The file is not a PDB, mmCIF, SDF or MOL file that FormChem can read.", 415)
+
+
+def decode(data: bytes) -> str:
+ for codec in ("utf-8-sig", "latin-1"):
+ try:
+ return data.decode(codec)
+ except UnicodeDecodeError:
+ continue
+ return data.decode("utf-8", "replace")
+
+
+def residue_id(a: Atom) -> tuple[str, int, str, str]:
+ return (a.chain, a.resseq, a.icode, a.resname)
+
+
+def ligand_key(chain: str, resname: str, resseq: int, icode: str = "") -> str:
+ return f"{chain}:{resname}:{resseq}{icode}"
+
+
+def primary(st: Structure) -> list[Atom]:
+ first = min((a.model for a in st.atoms), default=1)
+ seen: set[tuple] = set()
+ out = []
+ for a in st.atoms:
+ if a.model != first:
+ continue
+ key = (residue_id(a), a.name)
+ if key in seen:
+ continue
+ seen.add(key)
+ out.append(a)
+ return out
+
+
+def residues(atoms: list[Atom]) -> dict[tuple, list[Atom]]:
+ out: dict[tuple, list[Atom]] = {}
+ for a in atoms:
+ out.setdefault(residue_id(a), []).append(a)
+ return out
+
+
+def is_polymer(resname: str) -> bool:
+ return resname in PROTEIN or resname in NUCLEIC
+
+
+def summary(st: Structure) -> dict:
+ atoms = primary(st)
+ groups = residues(atoms)
+ chains: dict[str, dict] = {}
+ ligands, waters = [], 0
+ for (chain, resseq, icode, resname), members in groups.items():
+ if resname in WATER:
+ waters += 1
+ continue
+ if is_polymer(resname) and not (len(members) == 1 and resname in NUCLEIC and members[0].het):
+ c = chains.setdefault(chain, {"id": chain, "residues": 0, "protein": 0, "nucleic": 0, "sequence": "", "first": resseq, "last": resseq})
+ c["residues"] += 1
+ kind = "protein" if resname in PROTEIN else "nucleic"
+ c[kind] += 1
+ c["sequence"] += PROTEIN.get(resname) or NUCLEIC.get(resname) or "X"
+ c["first"], c["last"] = min(c["first"], resseq), max(c["last"], resseq)
+ continue
+ heavy = [m for m in members if m.element not in ("H", "D")]
+ ion = len(heavy) == 1 and heavy[0].element not in ("C", "N", "O", "S", "P")
+ ligands.append({"het": resname, "chain": chain, "resseq": resseq, "icode": icode, "atoms": len(members), "heavy": len(heavy),
+ "name": st.het_names.get(resname, ""), "key": ligand_key(chain, resname, resseq, icode), "ion": ion,
+ "additive": resname in ADDITIVES})
+ chain_list = []
+ for c in chains.values():
+ polymer = "protein" if c["protein"] >= c["nucleic"] else "nucleic acid"
+ chain_list.append({"id": c["id"], "residues": c["residues"], "polymer": polymer, "sequence": c["sequence"], "first": c["first"], "last": c["last"]})
+ choice = [g for g in ligands if not g["ion"] and not g["additive"]]
+ main = max(choice, key=lambda g: g["heavy"])["key"] if choice else None
+ altlocs = sorted({a.altloc for a in st.atoms if a.altloc})
+ return {"models": st.models, "atoms": len(atoms), "chains": chain_list, "residues": sum(c["residues"] for c in chain_list),
+ "ligands": ligands, "primary_ligand": main, "waters": waters, "altlocs": altlocs, "helices": st.helices, "sheets": st.sheets,
+ "warnings": list(st.warnings)}
+
+
+def find_ligand(st: Structure, want: str) -> tuple[dict, list[Atom]]:
+ info = summary(st)
+ want = (want or "").strip()
+ if not want:
+ want = info["primary_ligand"] or ""
+ hits = [g for g in info["ligands"] if g["key"] == want] or [g for g in info["ligands"] if g["het"] == want.upper()]
+ if not hits:
+ known = ", ".join(g["key"] for g in info["ligands"][:12]) or "none"
+ raise ThreeDError(f"No ligand {want or '(none named)'} in the structure; ligands: {known}.", 404)
+ chosen = hits[0]
+ atoms = [a for a in primary(st) if ligand_key(a.chain, a.resname, a.resseq, a.icode) == chosen["key"]]
+ return chosen, atoms
diff --git a/backend/app/services/three_d/verify.py b/backend/app/services/three_d/verify.py
new file mode 100644
index 00000000..1c9125c0
--- /dev/null
+++ b/backend/app/services/three_d/verify.py
@@ -0,0 +1,99 @@
+import numpy as np
+from rdkit import Chem
+from rdkit.Chem import rdCIPLabeler
+
+from app.services.chem import convert, perceive
+from app.services.three_d import warning
+from app.services.three_d.molecule import Model
+
+PT = Chem.GetPeriodicTable()
+CLASH_SCALE = 0.65
+CT = Chem.ChiralType
+
+
+def _cip(mol: Chem.Mol) -> dict[str, str]:
+ probe = Chem.Mol(mol)
+ try:
+ rdCIPLabeler.AssignCIPLabels(probe, maxRecursiveIterations=perceive.CIP_MAX_ITERATIONS)
+ except Exception:
+ return {}
+ out: dict[str, str] = {}
+ for a in probe.GetAtoms():
+ if a.HasProp("_CIPCode") and a.HasProp(convert.ID_PROP):
+ out[a.GetProp(convert.ID_PROP)] = a.GetProp("_CIPCode")
+ for b in probe.GetBonds():
+ if b.HasProp("_CIPCode") and b.HasProp(convert.ID_PROP):
+ out[b.GetProp(convert.ID_PROP)] = b.GetProp("_CIPCode")
+ return out
+
+
+def expected(model: Model) -> dict[str, str]:
+ return _cip(model.conv.mol)
+
+
+def from_3d(model: Model, conf_id: int) -> dict[str, str]:
+ probe = Chem.Mol(model.mol, confId=conf_id)
+ for a in probe.GetAtoms():
+ a.SetChiralTag(CT.CHI_UNSPECIFIED)
+ for b in probe.GetBonds():
+ if b.GetBondType() == Chem.BondType.DOUBLE:
+ b.SetStereo(Chem.BondStereo.STEREONONE)
+ try:
+ Chem.AssignStereochemistryFrom3D(probe, replaceExistingTags=True)
+ except Exception:
+ return {}
+ return _cip(probe)
+
+
+def stereo(model: Model, conf_id: int, wanted: dict[str, str] | None = None) -> dict:
+ want = expected(model) if wanted is None else wanted
+ found = from_3d(model, conf_id)
+ lost = sorted(k for k, v in want.items() if found.get(k) != v)
+ chosen = sorted(k for k in found if k not in want)
+ return {"kept": not lost, "expected": want, "found": found, "lost": lost, "chosen": chosen}
+
+
+def stereo_warnings(report: dict, groups_note: str | None = None) -> list[dict]:
+ out: list[dict] = []
+ if report["lost"]:
+ atoms = [k for k in report["lost"] if not k.startswith("b")]
+ bonds = [k for k in report["lost"] if k.startswith("b")]
+ out.append(warning("stereo_lost", f"{len(report['lost'])} stereo label(s) of the drawing are not reproduced in 3D.", atoms, bonds))
+ if report["chosen"]:
+ atoms = [k for k in report["chosen"] if not k.startswith("b")]
+ bonds = [k for k in report["chosen"] if k.startswith("b")]
+ out.append(warning("unspecified_stereo", f"{len(report['chosen'])} stereocentre(s) or double bond(s) were unspecified; one configuration was chosen.", atoms, bonds))
+ if groups_note:
+ out.append(warning("enhanced_stereo", groups_note))
+ return out
+
+
+def enhanced_note(model: Model) -> str | None:
+ groups = [g for g in model.mol.GetStereoGroups() if g.GetGroupType() != Chem.StereoGroupType.STEREO_ABSOLUTE]
+ if not groups:
+ return None
+ names = []
+ for g in groups:
+ kind = "AND" if g.GetGroupType() == Chem.StereoGroupType.STEREO_AND else "OR"
+ names.append(f"{kind}{g.GetReadId() or ''}")
+ return (f"Built the drawn member of the enhanced stereo group(s) {', '.join(names)}; the 3D model is one stereoisomer of the mixture "
+ f"(relative or racemic) the drawing describes.")
+
+
+def clashes(model: Model, conf_id: int) -> list[dict]:
+ mol = model.mol
+ heavy = [a.GetIdx() for a in mol.GetAtoms() if a.GetAtomicNum() > 1]
+ if len(heavy) < 2:
+ return []
+ pos = np.asarray(mol.GetConformer(conf_id).GetPositions())[heavy]
+ topo = Chem.GetDistanceMatrix(mol)[np.ix_(heavy, heavy)]
+ radii = np.array([PT.GetRvdw(mol.GetAtomWithIdx(i).GetAtomicNum()) for i in heavy])
+ diff = pos[:, None, :] - pos[None, :, :]
+ dist = np.sqrt((diff * diff).sum(-1))
+ limit = CLASH_SCALE * (radii[:, None] + radii[None, :])
+ bad = np.argwhere(np.triu((dist < limit) & (topo > 2), 1))
+ out = []
+ for i, j in bad[:50]:
+ out.append({"atoms": [model.labels[heavy[i]], model.labels[heavy[j]]], "distance": round(float(dist[i, j]), 3),
+ "limit": round(float(limit[i, j]), 3)})
+ return out
diff --git a/backend/requirements.txt b/backend/requirements.txt
index 0e7b766c..2ecbe41c 100644
--- a/backend/requirements.txt
+++ b/backend/requirements.txt
@@ -6,5 +6,6 @@ ptyprocess==0.7.0; sys_platform != "win32"
pywinpty==3.0.5; sys_platform == "win32"
keyring==25.7.0
rdkit==2025.9.3
+numpy==2.5.5
epam.indigo==1.49.0
fonttools==4.69.1
diff --git a/backend/requirements_macos.txt b/backend/requirements_macos.txt
index 78b7accb..90a90a02 100644
--- a/backend/requirements_macos.txt
+++ b/backend/requirements_macos.txt
@@ -6,5 +6,6 @@ ptyprocess==0.7.0
pywinpty==3.0.5; sys_platform == "win32"
keyring==25.7.0
rdkit==2025.9.3
+numpy==2.5.5
epam.indigo==1.49.0
fonttools==4.69.1
diff --git a/docs/3D.md b/docs/3D.md
new file mode 100644
index 00000000..de2fae2d
--- /dev/null
+++ b/docs/3D.md
@@ -0,0 +1,180 @@
+# FormChem in 3D
+
+How FormChem builds 3D structures from drawings, searches conformers, minimises, scans dihedrals, measures, draws surfaces, reads PDB, mmCIF and 3D SD files, extracts ligands and exports 3D files, built from 0.10.0. What a drawing stores (a fragment's `conformers` and `conformer`, and the `model3d` object) is defined in [FORMAT.md](FORMAT.md), which wins over this page; this page describes the services behind the 3D menu, the 3D View panel and the agent tools, and their HTTP routes.
+
+## Contents
+
+- Where the code lives
+- The 3D View
+- Building 3D from 2D
+- Conformers
+- Minimisation
+- Dihedral scans
+- Measurements
+- Surfaces and ESP
+- Structure files
+- Extracting a ligand
+- Conformers follow the structure
+- 3D objects on the page
+- Exports
+- Methods, versions and accuracy
+- HTTP API
+- Agent tools
+- Known limits
+
+## Where the code lives
+
+| Path | What it holds |
+| --- | --- |
+| `backend/app/services/three_d/` | `molecule.py` (fragments to hydrogen-complete molecules and atom labels), `forcefield.py`, `build.py`, `verify.py` (stereo from 3D and clashes), `conformers.py`, `minimise.py`, `scan.py`, `measure.py` (geometry and partial charges), `export.py`, `structure.py` (the structure model and summary), `pdb.py`, `mmcif.py`, `molfile3d.py` (3D SD and MOL records), `ligand.py`, `readers.py`, `document.py` (structure files as drawings), `stale.py` (the stale-conformer rule) |
+| `backend/app/routers/three_d.py` | every 3D route |
+| `frontend/src/engine/three-api.ts`, `engine/stale.ts` | the window's only caller of those routes, and the stale-conformer rule for the window's own edits |
+| `frontend/src/ui/view3d-lib.ts`, `view3d-viewer.ts`, `view3d-panel.ts` | the lazy 3Dmol.js loader, the viewer wrapper and the 3D View panel |
+| `frontend/src/ui/view3d-dialogs.ts`, `scan-plot.ts`, `structure3d-dialogs.ts` | the Conformers, Dihedral Scan, Export 3D Structure and Extract Ligand dialogs |
+| `frontend/src/canvas/render/model3d.ts` | the 3D object on the page |
+| `frontend/src/io/glb.ts`, `chem/elements3d.ts`, `chem/geom3d.ts`, `chem/conformer-mol.ts` | the glTF writer, the 3D palette and radii, measurement maths, a local molfile of a stored conformer |
+| `frontend/src/app/view3d-commands.ts` | the 3D commands |
+
+The reasons behind each choice are in `backend/HASHOUT_LOG.md` entries 199 to 222 and `frontend/HASHOUT_LOG.md` entries 222 to 244.
+
+## The 3D View
+
+3D > 3D View (`Mod+3`) opens a floating panel on the selected structure, or on the selected 3D object on the page, and follows the selection. The viewer is 3Dmol.js 3.0.0 (BSD-3-Clause), loaded the first time a 3D view opens; starting FormChem loads none of it. Without WebGL the panel says so.
+
+| Control | What it does |
+| --- | --- |
+| Display | Wire, Stick, Ball and Stick, Space Filling, Cartoon (proteins and nucleic acids; off for small molecules) |
+| Surface, ESP | no surface, van der Waals, solvent accessible, solvent excluded; ESP colours the surface by partial charges |
+| Build 3D | builds a conformer from the drawing |
+| Minimise, force field | minimises the shown conformer with MMFF94, MMFF94s or UFF |
+| Conformers..., Scan... | the conformer search and the dihedral scan dialogs |
+| Focus the ligand, Reset view, Spin | Spin is off, with the reason, when the system asks for reduced motion |
+| Export | PNG, PNG with a transparent background, glTF binary |
+| Conformers list | energy relative to the lowest, population, method; click a row to show that conformer |
+| Measure | Distance, Angle, Dihedral; click atoms in the view |
+
+PDB and mmCIF models show the polymer as cartoon and ligands as ball and stick with green carbons; waters are hidden in every style. The panel's background follows the theme.
+
+## Building 3D from 2D
+
+3D > Build 3D from 2D, or Build 3D in the panel, makes one conformer and stores it in the structure as one undo step:
+
+1. The structure is read as the 2D chemistry reads it, abbreviations expanded, hydrogens added.
+2. ETKDGv3 embeds it with a fixed seed (61453), keeping the wedges, the double-bond geometry as drawn, charges, and for an enhanced stereo group the drawn member.
+3. The force field minimises it (below), unless asked not to.
+4. The stereo is read back from the 3D coordinates and every CIP label is compared with the drawing by atom and bond id. A lost label makes the build try the next two seeds. Heavy atoms more than two bonds apart and closer than 0.65 of their van der Waals sum are reported as clashes.
+
+The report says which labels were expected, found and lost, the clashes, the energy before and after, the RMS gradient and the timing. Warnings name unspecified stereocentres (`unspecified_stereo`), the enhanced stereo groups built as drawn (`enhanced_stereo`), a retried seed (`embed_retry`) and a force field fallback (`uff_fallback`). Atoms that are labels, R-groups or attachment points cannot be built, and a structure may have at most 1500 atoms with hydrogens.
+
+Results: ethanol C-O 1.420 Å after MMFF94; Taxol (11 stereocentres) keeps 11 of 11 labels with 0 clashes in 0.6 to 2.4 s.
+
+## Conformers
+
+3D > Conformers... (or Conformers... in the panel) generates `n` conformers (1 to 1000, default 50) with ETKDGv3, prunes near duplicates by symmetry-aware heavy-atom RMSD (0.5 Å), minimises each, and keeps those within an energy window of the lowest (default 10 kcal/mol), at most `keep` (default 10). The lowest becomes the shown conformer. Each kept conformer has its energy, its energy relative to the lowest, its RMSD to the lowest and its Boltzmann population at 298.15 K over the kept set. Conformers whose minimisation changed the drawn stereo are left out (`stereo_dropped`).
+
+Pruning uses heavy atoms only, so ethanol gives one conformer (its rotamers differ only in hydrogens); butan-1-ol keeps 6 from 30. Taxol with `n` 10 takes about 10 s.
+
+## Minimisation
+
+3D > Minimise Energy minimises the shown conformer (a structure with none is built first, in the same undo step) until the RMS gradient over every coordinate is below 0.01 kcal/mol/Å, or 2000 steps. `converged` means that target was reached; RDKit's own stop on a small energy change is not taken as convergence, so the minimiser restarts with tight tolerances when the gradient is still too large. The stereo is checked again afterwards.
+
+MMFF94 is the default, MMFF94s and UFF can be chosen. When MMFF94 has no parameters for the structure (tin, for example) UFF is used and the warning says why: "Universal force field used: no MMFF94 parameters for Sn."
+
+## Dihedral scans
+
+3D > Dihedral Scan... scans the dihedral of four bonded atoms in a row (picked in the panel, or the last dihedral measured; a hydrogen may end the chain). At each angle from start to end (default -180 to 180 in steps of 10, at most 361 points) the dihedral is held by a restraint and everything else is minimised; every angle starts from the same geometry, so the profile is not dragged into one basin. The reported energy is the force field's without the restraint. A ring bond in the middle is allowed, with a warning.
+
+The dialog plots angle against relative energy and names the minimum and the barrier. Butane C-C-C-C with MMFF94: anti at 180 degrees, gauche minima near plus or minus 65 degrees, the eclipsed maximum at 0 degrees, barrier about 5.1 kcal/mol. The scan changes nothing unless Keep each point as a conformer is ticked: then one conformer per angle is stored (each with `scan: { atoms, angle }`) as one undo step, and clicking a point shows its geometry.
+
+## Measurements
+
+Choose Distance, Angle or Dihedral in the panel and click two, three or four atoms, or use 3D > Measure in 3D. Distances are in ångström with three decimals, angles and dihedrals in degrees with one decimal; a dihedral is signed from -180 to 180. Atoms are named by fragment atom id, hydrogens as `a1:h0` (the first hydrogen of `a1`), atoms of an expanded abbreviation as `a5:x0`, and atoms of a PDB or mmCIF model by serial number. On a 3D object on the page the measurements are kept in its `labels`; on a structure shown without one they last while the panel is open. The window and `GET .../3d/measure` use the same formulas.
+
+## Surfaces and ESP
+
+Van der Waals, solvent accessible (probe 1.4 Å) and solvent excluded surfaces are drawn by 3Dmol.js at 72 percent opacity. ESP colours the surface by an approximate electrostatic potential: Gasteiger-Marsili partial charges from the engine, red negative to blue positive, symmetric about zero. The legend says "approximate, from empirical charges" and names the method, the engine version and the charge range, for example "Gasteiger-Marsili, rdkit 2025.09.3, red -0.40 e to blue +0.21 e". ESP is for structures; PDB and mmCIF models have no charges. Surfaces are computed on the main thread.
+
+## Structure files
+
+| Format | Extensions | In | What it becomes |
+| --- | --- | --- | --- |
+| PDB | `.pdb`, `.ent` | File > Open, File > Import, 3D > 3D Structure File..., drop on Home | one 3D object over the file kept byte for byte (`chemical/x-pdb`, saved as `media/[id].pdb`) |
+| mmCIF | `.cif`, `.mmcif` | as PDB | as PDB (`chemical/x-mmcif`, `media/[id].cif`) |
+| 3D SD, 3D MOL | `.sdf`, `.sd`, `.mol`, `.mdl` | File > Open, File > Import, 3D > 3D Structure File... | one structure per record with a 2D layout and the file's coordinates as its conformer (method `file`) |
+
+The PDB and mmCIF readers are FormChem's own. PDB: ATOM, HETATM, MODEL, HETNAM, HELIX, SHEET, CONECT, TITLE and the id code. mmCIF: `atom_site` (auth columns first, label columns as fallback), models, alternate locations, `chem_comp` names, `struct_conf` helices and `struct_sheet_range`; a small-molecule CIF with fractional coordinates is placed in its unit cell without symmetry mates. The summary lists each chain with its residues and one-letter sequence, the ligands (`chain:het:number` with their names), ions and additives (sulfate, glycerol and others) apart from the ligands, waters, alternate locations, helices and sheets. The largest ligand that is neither ion nor additive is the primary ligand: the 3D object focuses it. A protein shows as cartoon, anything else as ball and stick. The import report gives the summary in one line, for example "PDB model placed as a 3D object: 3041 atoms; chain A: protein, 5 residues; ligand A:ACT:301; 1 water (hidden)."
+
+An SD or MOL file is read this way when its first record has 3D coordinates and it holds at most 200 records; otherwise it is read as a 2D drawing as before. The report says `conformers_kept`. Timings: 1DRF (186 residues with folate) reads in 37 ms; an entry of 18448 atoms in 1.15 s.
+
+## Extracting a ligand
+
+3D > Extract Ligand... turns a ligand of a PDB or mmCIF model into a structure beside the model, as one undo step. With several ligands a dialog asks which, with the focused one chosen. PDB files carry no bond orders, so:
+
+- For 30 common ligands (nucleotides such as ATP, ADP, AMP, GTP and GDP, SAM and SAH, PLP, folate and methotrexate, benzamidine, imatinib, the sugars NAG, GLC, MAN and GAL, and buffers and additives such as glycerol, acetate, DMSO, sulfate, phosphate, Tris, citrate, MES and HEPES) the bond orders come from a built-in table written for FormChem.
+- Any other ligand gets bond orders inferred from its geometry (planar rings with aromatic bond lengths, carbonyls, valences), and the answer says "bond orders inferred". Check those.
+
+The ligand's atoms come from its HETATM records and CONECT bonds (by distance when it has none, with a warning). Stereo is read from the 3D coordinates, a 2D layout is made, and the file's coordinates, with hydrogens added, become its conformer (method `file`). Benzamidine extracts as `N=C(N)c1ccccc1`, folate from 1DRF as folic acid.
+
+## Conformers follow the structure
+
+A conformer is valid only for the graph it was made from. Any edit to a structure's atoms or bonds other than positions and display (element, charge, isotope, radical, hydrogens, label, abbreviation, generic or R-group atom, query, bond ends, order, wedge or topology, adding or removing atoms or bonds) removes its `conformers` and `conformer` in the same undo step. The engine and the window apply the same rule, so both agree at once; Undo brings the conformers back with the old structure. Moving atoms, colours, notes, map numbers and the placement of a double bond keep them. A change that sets conformers itself (a build, a paste) is taken as written.
+
+## 3D objects on the page
+
+3D > Insert 3D View places a 3D object (`model3d`) beside the selected structure, building 3D coordinates first when there are none, and binds the panel to it. The object shows a picture of the view (its `snapshot`), so exports, print and thumbnails need no 3D renderer. Turning or zooming the view, changing the style or surface, or adding a measurement writes a new picture, the camera and the style into the drawing about 0.7 s after the last change, as one undo step for the whole burst; the old picture stays on screen until the new one has loaded, and the old picture's media entry is removed. Spinning never writes. Double-click the object to open it in the panel again. A PDB or mmCIF file opened as a model is a 3D object over its file.
+
+The object moves, resizes and scales like a picture. Copy, paste and Duplicate carry it; a copied structure's conformers move to the new atom ids, and a model over a PDB file pastes into another drawing with its file.
+
+## Exports
+
+| Command | Output |
+| --- | --- |
+| 3D > Export 3D View as PNG... | the view at its on-screen size, opaque or transparent |
+| 3D > Export 3D View as glTF... | binary glTF 2.0 (`.glb`): atoms as spheres and bonds as cylinders (double and triple as parallel cylinders) in element colours, radii from the display style, centred, 1 Å = 1 cm; no surfaces or cartoons |
+| File > Export > Export 3D Structure... | MDL molfile (the shown conformer), SD file (every conformer, with `FORMCHEM_ENERGY`, `FORMCHEM_METHOD` and `FORMCHEM_CONFORMER` data fields), PDB or XYZ (the shown conformer, or every conformer as MODEL records or frames); every hydrogen is written. A PDB or mmCIF model saves its original file |
+
+The molfile is V2000 unless the structure has more than 999 atoms. The glTF files passed the Khronos glTF Validator with no errors or warnings.
+
+## Methods, versions and accuracy
+
+Every computed number names its method and engine version: the panel's status line ("Built: ETKDGv3+MMFF94, rdkit 2025.09.3 · -1.34 kcal/mol"), the conformer list, the scan dialog ("barrier 5.10 kcal/mol · MMFF94, rdkit 2025.09.3"), the ESP legend, and every route and agent answer (`engine` and `method`). Conformers store `method` (`ETKDG` for an embedding without minimisation, `MMFF94`, `MMFF94s`, `UFF`, or `file` for coordinates read from a file) and `energy` in kcal/mol for that method.
+
+These are force-field results. MMFF94 energies compare conformers of one structure; they are not heats of formation and are not comparable between structures of different composition or between force fields. Populations are Boltzmann weights over the kept conformers only. ESP colours are a picture of empirical charges, not a computed potential. The exit check for geometry was ethanol's C-O bond: 1.420 Å after MMFF94, inside the expected 1.41 to 1.44 Å; no wider benchmark against experimental structures was run. Tight-binding methods (xtb, CREST) are not offered: plan question Q9 is unanswered, so the default applies (a program the person installs and points to), and that is not built yet.
+
+## HTTP API
+
+Every changing route needs the window key header (`x-formchem-window-key`); the reading routes are open to the local window. Errors: 404 unknown drawing or object, 409 the transaction was refused or the structure changed while the engine worked, 413 a file over a limit, 422 bad input, each with one sentence in `detail`. A changed drawing answers `{ "changed": true, "tx", "rev", ... }`; the window waits for that revision before redrawing.
+
+| Route | Body or query | Answer |
+| --- | --- | --- |
+| `POST /api/documents/{id}/3d/build` | `object`, `minimise?` (true), `method?` (`MMFF94`, `MMFF94s`, `UFF`), `seed?`, `max_iters?` | `conformer` (`id`, `energy`, `method`, `converged`), `report` (`stereo`, `clashes`, `minimise`, `warnings`, `timing_ms`, `atoms`, `heavy`, `seed`, `engine`, `method`) |
+| `POST .../3d/conformers` | `object`, `n?` (50), `window?` (10), `keep?` (10), `rmsd?` (0.5), `method?`, `seed?`, `max_iters?` | `conformers` (each `id`, `energy`, `relative`, `method`, `converged`, `rmsd_to_lowest`, `population`), `active`, `report` |
+| `POST .../3d/active` | `object`, `conformer` | sets the shown conformer |
+| `POST .../3d/minimise` | `object`, `conformer?`, `method?`, `max_iters?`, `gradient?` | `conformer`, `report` (`energy_before`, `energy_after`, `rms_gradient`, `passes`, `converged`, `fallback`, `stereo`, `built`) |
+| `POST .../3d/scan` | `object`, `atoms` (four), `start?`, `end?`, `step?`, `method?`, `conformer?`, `store?`, `max_iters?` | `points` (`angle`, `measured`, `energy`, `relative`, `converged`), `minimum`, `maximum`, `method`, `engine`, `warnings` |
+| `GET .../3d/measure` | `object`, `atoms` (two to four, comma separated), `conformer?` | `kind`, `value`, `unit`, `atoms`, `conformer`, `method` |
+| `GET .../3d/charges` | `object`, `kind?` (`gasteiger` or `mmff`) | `charges`, `h`, `range`, `method`, `label`, `engine`, `warnings` |
+| `GET .../3d/molblock` | `object`, `conformer?` (or `all`), `format?` (`mol`, `mol3000`, `sdf`, `pdb`, `xyz`), `as?` (`json` or `file`) | the text with its atom map (`atoms[i].id`, `parent`), or the file |
+| `POST /api/3d/parse` | multipart `file`, or JSON `text` or `base64` with `name` and `format?` | `format`, `title`, `id_code`, `summary`, and for SD and MOL the `molecules` |
+| `POST .../3d/open` | as parse, plus `place`, `page?`, `x?`, `y?`, `as?` (`model` or `fragment`) | the model3d object with its media and summary, or the new fragments; with `place`, one transaction |
+| `GET .../3d/structure` | `object` (a model3d) | the summary of its file, or the atom and conformer counts of its structure |
+| `POST .../3d/extract-ligand` | `object` (a model3d) or `media`, `ligand?` (`A:ATP:301` or `ATP`), `page?`, `x?`, `y?` | `fragment`, `ligand`, `bonds` (`template` or `perceived`), `smiles`, `warnings` |
+
+`POST /api/documents/{id}/media` also takes PDB, mmCIF, SDF and MOL bytes (FORMAT.md).
+
+## Agent tools
+
+`build_3d`, `conformers_3d`, `minimise_3d`, `scan_dihedral`, `measure_3d`, `open_3d_structure`, `extract_ligand` and `export_3d`, with every argument and result, are in [AGENTS.md](AGENTS.md). They call the same route functions in process and commit under the agent's name.
+
+## Known limits
+
+- No tight-binding or quantum method; every energy is a force-field energy (see Methods, versions and accuracy).
+- Atropisomers and allene axial chirality are not perceived, so they are neither kept nor checked.
+- Surfaces are computed on the main thread: a surface on a large protein holds the window for a while. glTF holds atoms and bonds only.
+- ESP is off for PDB and mmCIF models.
+- Measurements on a structure without a 3D object on the page last only while the panel is open.
+- Ligands outside the 30-entry table get inferred bond orders. Small-molecule CIF files are read without symmetry mates.
+- A 3D route checks that the structure did not change while it computed and then applies, without one lock around both; an edit landing in between could keep conformers made for the old structure.
+- The model summary in the import report is English in every language.
+- File > Import of a very large PDB carries the file to the window and back (64 MB read limit, 50 MB upload limit); File > Open does not.
+- MMFF94s and UFF were exercised but not compared with reference energies; mmCIF was checked in the engine, not in the panel; the desktop save dialogs and WebGL in the desktop app were not run.
diff --git a/docs/AGENTS.md b/docs/AGENTS.md
index bc01b310..3315e5b0 100644
--- a/docs/AGENTS.md
+++ b/docs/AGENTS.md
@@ -1,6 +1,6 @@
# FormChem for agents
-From 0.8.0 an agent draws in FormChem directly. The engine's MCP server has 42 tools: it opens and makes drawings, draws structures and reaction schemes from SMILES or molfiles, builds and edits them atom by atom by id, reads every structure back in machine form, checks its own work with a picture drawn by the window's own renderer, and converts files with the same code as the command line. The person watches every change land in the FormChem window, can undo any agent call in one step, and can stop an agent at any time.
+From 0.8.0 an agent draws in FormChem directly. The engine's MCP server has 60 tools: it opens and makes drawings, draws structures and reaction schemes from SMILES, molfiles or (from 0.9.0) chemical names, builds and edits them atom by atom by id, reads every structure back in machine form and names it, checks its own work with a picture drawn by the window's own renderer, predicts 1H and 13C NMR spectra, opens JCAMP-DX spectra and picks their peaks and integrals, (from 0.10.0) builds 3D conformers, minimises, scans and measures them, opens PDB, mmCIF and 3D SD files, extracts ligands and exports 3D files, and converts files with the same code as the command line. The person watches every change land in the FormChem window, can undo any agent call in one step, and can stop an agent at any time.
This page is the reference for agent authors and for anyone wiring a client. The generated list of every argument is `.claude/skills/formchem-harness/references/tools.md` (`./formchem agents sync` writes it from the server); how to set a client up step by step is in the wiki's Agents page.
@@ -17,6 +17,8 @@ This page is the reference for agent authors and for anyone wiring a client. The
- The agent call log
- Example: draw aspirin and check it
- Example: build acetic acid atom by atom
+- Example: a name, its names and its NMR (0.9.0)
+- Example: ethanol in 3D, and a ligand from a PDB file (0.10.0)
- Where the code lives
- Known limits
@@ -95,7 +97,7 @@ The values come from the engine's derived cache after the transaction, never ech
## Which drawing a tool uses
-`doc` when given; else the only open drawing; else the drawing the FormChem window shows; else the tool asks for `doc` (an id from `list_open_documents`). `draw_from_smiles`, `draw_from_molfile`, `add_atom` and `add_reaction` make a new drawing when none is open, show it in the window, and close it again when their input cannot be read. The 0.5.0 and 0.6.0 tools (the reaction and analysis tools) still need `doc` when several drawings are open.
+`doc` when given; else the only open drawing; else the drawing the FormChem window shows; else the tool asks for `doc` (an id from `list_open_documents`). `draw_from_smiles`, `draw_from_molfile`, `draw_from_name`, `add_atom` and `add_reaction` make a new drawing when none is open, show it in the window, and close it again when their input cannot be read (`draw_from_name` refuses an unread name before any drawing is made). `open_spectrum` always opens a new drawing. `open_3d_structure` opens into the drawing chosen by the rule above, makes one when none is open, and closes that new drawing again when the file cannot be read. The 0.9.0 NMR and spectrum tools and the 0.10.0 3D tools follow the same rule as the 0.8.0 tools. The 0.5.0 and 0.6.0 tools (the reaction and analysis tools) still need `doc` when several drawings are open.
Coordinates are points, x to the right and y down, on the page; the default bond length is 14.4 points. Ids are the ones the tools return (`fragment`, `atom`, `bond`, `arrow` and so on); they never change while the object exists.
@@ -165,6 +167,54 @@ Every edit tool answers with a write result whose `edit` field says what it did
Both run the code behind `./formchem convert` and `./formchem batch` ([CLI.md](CLI.md)), so the output is byte for byte the same. Neither writes over an existing file or into a folder that already holds files. A long batch answers when it is done; there is no progress stream.
+### Names (0.9.0)
+
+| Tool | Arguments | Result |
+| --- | --- | --- |
+| `draw_from_name` | `name` (a common or systematic name, up to 300 characters), `doc?`, `x?`, `y?`, `label?` (the new structure's name; default the name read) | the `draw_from_smiles` write result, its text starting with how the name was read, plus `read`: `smiles`, `inchikey`, `confidence`, `method` (`dictionary` or `systematic parser`), `engine`, `version`, `warnings` |
+| `name_structure` | `smiles?`, or `doc?` with `object?` (a fragment or group id) or `selection?` (true: what the person selected); default every fragment | `doc` and `structures`: per structure `id`, `smiles`, `names` (each `text`, `kind` trivial or systematic, `confidence`, `method`), `engine`, `version`, `inchikey`, `warnings`, and `reason` when there is no name. Reads only |
+
+Names are read offline by FormChem's own engine: its dictionary of 629 common names first, then its systematic parser. Confidence is `high` for a dictionary hit or a full parse with one reading, `medium` when a locant had to be assumed or the name has two readings (the warning says which), and the name is refused otherwise, with the character where reading stopped. Inverted index names and D- or L- outside the dictionary are refused rather than guessed. A systematic name from `name_structure` comes from the rule-based namer and is listed only when it parses back to the same standard InChIKey; otherwise the answer gives the reason. Prefer `draw_from_smiles` when you know the SMILES. How names work and what they cover: [NAMES.md](NAMES.md).
+
+### NMR prediction (0.9.0)
+
+| Tool | Arguments | Result |
+| --- | --- | --- |
+| `predict_nmr` | `doc?` with `object?` (a fragment id; may be left out when the drawing has one), or `smiles`; `nucleus?` (`1H`, `13C` or `both`, default `1H`), `frequency?` (MHz, default 400 for 1H and 100 for 13C) | the journal line and the warnings as text; `signals` (each `shift`, `count`, `atoms`, `hydrogens`, `class`, `confidence`, `uncertainty`, `multiplicity`, `j`, `couplings`, `terms`, `label`, `method`, `version`), `atoms` (per fragment atom id), `journal`, `warnings`, `method`, `version`; with `both`, a `1H` and a `13C` part. Reads only |
+| `predict_spectrum` | `object` (a fragment id), `doc?`, `nucleus?` (`1H` or `13C`), `frequency?`, `x?`, `y?` | adds one spectrum object beside the structure (one undo step, "Predict 1H NMR Spectrum"): `doc`, `id`, `rev`, `object` (with `source.predicted` naming the fragment, method, version and frequency, and its multiplets and integrals or peaks linked to atoms), `journal`, `warnings` |
+
+The method is FormChem increments 0.9.0, FormChem's own additive rules with no shift database; its accuracy and limits are in [SPECTRA.md](SPECTRA.md). The spectrum object stores only its settings and links; `spectrum_data` reads its points, computed from the structure on every call.
+
+### Spectra (0.9.0)
+
+| Tool | Arguments | Result |
+| --- | --- | --- |
+| `open_spectrum` | `text` (the JCAMP-DX file, starting with `##TITLE=`), or `base64`, or `path` (absolute, `.jdx`, `.dx` or `.jcamp`); `name?` (a file name for the title) | a new drawing with one spectrum object per data block, shown in the window: `doc`, `title`, `spectra` (each `id`, `technique`, `nucleus`, `name`), `shown`, `report` |
+| `spectrum_data` | `doc?`, `object?` (may be left out when the drawing has one spectrum), `from?`, `to?` (in the x unit), `points?` (16 to 2000, default 200), `y_mode?` (`transmittance` or `absorbance`) | `technique`, `nucleus`, `kind` (`continuous`, `sticks` or `fid`), `title`, `frequency`, `x`, `y`, `n`, `total`, `decimated`, `range`, `full`, `direction`, `view`, `axis`, `y_mode`, `y_modes`, `report`, `method`, `predicted`. Reads only |
+| `spectrum_peaks` | `doc?`, `object?`, `detect?` (true: also run the peak picker), `from?`, `to?` | `peaks`, `integrals`, `multiplets` with their ids and atom links; with `detect`, `detected` and `already` (found but not added). Reads only |
+| `spectrum_pick_peaks` | `doc?`, `object?`, `from?`, `to?`, `max?` (default 50), `threshold?` (NMR floor), `prominence?`, `replace?` | adds the peaks found as one undo step ("Pick Peaks"): `rev`, `peaks`, `skipped` (already there), `y_mode` |
+| `spectrum_integrate` | `doc?`, `object?`, and `from` with `to` (ppm), or `ranges` (several `[from, to]` pairs), or `id` (an existing integral); `value?` | adds or renormalises NMR integrals as one undo step ("Integrate"): `rev`, `integrals` (each `from`, `to`, `value`), `scale` |
+| `spectrum_export` | `doc?`, `object?`, `format?` (`jdx` or `csv`), `original?` (with `jdx`: the imported file untouched) | the file as text, with `name` and `format`. Reads only |
+
+`direction: decreasing` means the largest x is at the left edge (IR and Raman wavenumber, NMR shift), as the window draws it. Peaks are minima in transmittance and maxima otherwise, MS sticks above 1 percent of the base peak, NMR lines above six times the noise. A value on an integral rescales every integral of the spectrum. `open_spectrum` cannot insert a spectrum into an existing drawing; the window's Insert > Spectrum from File can. File support and the spectrum object: [SPECTRA.md](SPECTRA.md).
+
+### 3D (0.10.0)
+
+`object` is a fragment id, or a 3D object bound to one, and may be left out when the drawing has one structure. `method` is `MMFF94` (default), `MMFF94s` or `UFF`; UFF is used, with a note saying why, when MMFF94 has no parameters. Atoms are fragment atom ids from `get_atoms`; a hydrogen is `a1:h0` (the first hydrogen of `a1`).
+
+| Tool | Arguments | Result |
+| --- | --- | --- |
+| `build_3d` | `doc?`, `object?`, `minimise?` (default true), `method?` | one conformer built from the 2D drawing (ETKDGv3 with a fixed seed, then the force field), stored as one undo step ("Build 3D"): `object`, `rev`, `conformer` (`id`, `energy`, `method`, `converged`), `report` (`stereo` with `expected`, `found`, `kept`, `lost`; `clashes`; `minimise`; `warnings`; `timing_ms`; `atoms`; `engine`; `method`). The text says whether every stereo label was kept |
+| `conformers_3d` | `doc?`, `object?`, `n?` (1 to 1000, default 50), `window?` (kcal/mol, default 10), `keep?` (1 to 200, default 10), `method?` | replaces the conformers with those kept, the lowest shown, as one undo step ("Conformers"): `conformers` (each `id`, `energy`, `relative`, `method`, `converged`, `rmsd_to_lowest`, `population`), `active`, `report` (`embedded`, `within_window`, `kept`, `temperature`, `warnings`) |
+| `minimise_3d` | `doc?`, `object?`, `conformer?` (default the shown one), `method?` | minimises and replaces that conformer as one undo step ("Minimise"); a structure without one is built first: `conformer`, `report` (`energy_before`, `energy_after`, `rms_gradient`, `converged`, `fallback`, `stereo`, `built`) |
+| `scan_dihedral` | `atoms` (four bonded atom ids in a row), `doc?`, `object?`, `start?` (default -180), `end?` (180), `step?` (10), `method?`, `store?` (default false) | a relaxed scan: `points` (each `angle`, `measured`, `energy`, `relative`, `converged`), `minimum`, `maximum`, `method`, `engine`, `warnings`; the text gives the barrier. Reads only, unless `store` keeps one conformer per angle as one undo step ("Dihedral scan") |
+| `measure_3d` | `atoms` (two to four), `doc?`, `object?`, `conformer?` | `kind` (`distance`, `angle`, `dihedral`), `value`, `unit` (Å or °), `atoms`, `conformer`, `method`. Reads only |
+| `open_3d_structure` | `path` (absolute: `.pdb`, `.ent`, `.cif`, `.mmcif`, `.sdf` or `.mol`), `doc?`, `as?` (`model`, default for PDB and mmCIF, or `fragment`, default for SDF and MOL), `x?`, `y?` (default free space) | one undo step ("Open 3D structure"). A model: `object` (the model3d: cartoon for a protein, ligands ball and stick, waters hidden, the primary ligand focused), `media`, `format`, `summary` (`atoms`, `chains`, `ligands` with `key`, `waters`, `warnings`); SDF and MOL: `fragments`, each with the file coordinates as its conformer. Also `created` and `shown` |
+| `extract_ligand` | `doc?`, `object?` (the model3d; may be left out when the drawing has one), `ligand?` (`A:ATP:301` or a het code; default the primary ligand) | a structure beside the model as one undo step ("Extract ligand"): `fragment`, `ligand`, `bonds` (`template` or `perceived`), `smiles`, `warnings` |
+| `export_3d` | `doc?`, `object?`, `format?` (`mol`, `sdf` default, `pdb`, `xyz`), `conformer?` (an id or `all`; default `all` for sdf, else the shown one), `output?` (absolute path of a new file) | the text with every hydrogen, `format`, `count`, `conformer`, `filename`; with `output`, `written` instead. Never writes over an existing file |
+
+The 3D tools answer with the method and the engine version (`rdkit 2025.09.3`) next to every energy and measurement. `build_3d` compares the CIP labels read back from the 3D coordinates with the drawing's and says which were kept; check that line before using the geometry. A later edit to a structure's atoms or bonds removes its conformers in the same undo step (moves do not), so build again after editing. `extract_ligand` takes bond orders from a table of 30 common ligands and otherwise infers them from the geometry, and the answer says "inferred from the geometry"; check such a ligand's SMILES. `build_3d`, `conformers_3d`, `minimise_3d`, `open_3d_structure` and `extract_ligand` ask the person the first time; `scan_dihedral` only with `store: true`, `export_3d` only with an `output` outside the temporary folder. Methods, limits and the routes behind the tools: [3D.md](3D.md).
+
### Window commands, extensions and handoffs
| Tool | Arguments | Result |
@@ -259,11 +309,53 @@ Edit tools by id, in the same drawing (each answer also carries a window-drawn P
Five calls, five undo steps: Undo in Agent activity five times walked back through CC(=O)O, CCO, CC and C to an empty page, and every row ended Undone. The same flow can be written with `add_bond` (ethanol plus an O at `x, y`, then `add_bond {atom1: "", atom2: "", order: 2}`), and `get_atoms` lists the ids when an agent has lost them.
+## Example: a name, its names and its NMR (0.9.0)
+
+From the integration run, in process as an in-app agent (so no consent question). The names, journal lines and values are as recorded; the surrounding text follows the handlers' format, shortened with "...":
+
+```
+> draw_from_name {"name": "2-methylpropan-1-ol"}
+< Read "2-methylpropan-1-ol" by systematic parser (high confidence, formchem names 0.9.0) as ... then the draw_from_smiles answer, one undo step
+> draw_from_name {"name": "benzoic acdi"}
+< isError: Could not read the name: ... Check the spelling and locants, or use draw_from_smiles.
+> name_structure {"smiles": "CC(=O)Oc1ccccc1C(=O)O"}
+< aspirin (trivial, dictionary, high); 2-(acetyloxy)benzoic acid (systematic, rule-based namer, round-trip checked, high) [formchem 0.9.0]
+> predict_nmr {"smiles": "CCOC(C)=O", "nucleus": "both"}
+< 1H NMR (400 MHz, predicted, FormChem increments 0.9.0): δ 4.10 (q, J = 7.0 Hz, 2H), 2.05 (s, 3H), 1.25 (t, J = 7.0 Hz, 3H).
+ 13C NMR (100.6 MHz, predicted, FormChem increments 0.9.0): δ 171.0, 59.8, 20.2, 13.8.
+```
+
+`predict_spectrum {object}` on the drawn ethyl acetate added one spectrum object as one undo step; `open_spectrum` of an IR JCAMP-DX file followed by `spectrum_pick_peaks` added 2984, 1742, 1446, 1373, 1241, 1048, 938, 848 and 636; `spectrum_integrate` with `from` 1.4, `to` 1.0 and `value` 3 on an ethanol 1H spectrum, then 3.8 to 3.55, gave 1.9869 for the CH2.
+
+## Example: ethanol in 3D, and a ligand from a PDB file (0.10.0)
+
+From the integration run, in process as an in-app agent. The values are as recorded; the surrounding text follows the handlers' format, with ids shortened to `f...`, `c...` and `o...`:
+
+```
+> draw_from_smiles {"smiles": "CCO"}
+> build_3d {}
+< Built 3D for f...: conformer c..., -1.34 kcal/mol, ETKDGv3+MMFF94 (rdkit 2025.09.3), 9 atoms with hydrogens; no stereocentres or stereo double bonds; 0 clashes. One undo step (rev ...).
+> measure_3d {"atoms": ["", ""]}
+< Distance - of f...: 1.42 Å (conformer c..., MMFF94).
+> scan_dihedral {"atoms": [":h0", "", "", ""], "step": 60}
+< Scanned ... of f...: 7 points, minimum at ... degrees, barrier 3.56 kcal/mol at ... degrees, MMFF94 (rdkit 2025.09.3); nothing stored.
+> open_3d_structure {"path": "/.../gasfk-ligands.pdb"}
+< Opened gasfk-ligands.pdb (pdb) into ... as 3D object o...: ... atoms, chain A protein 5 residues; ligands A:BEN:301, A:TYL:302; 3 waters (hidden). One undo step (rev ...).
+> extract_ligand {"ligand": "A:BEN:301"}
+< Extracted ligand A:BEN:301 of o... as fragment f...: N=C(N)c1ccccc1 (bond orders from the template table). One undo step (rev ...).
+```
+
+The C-C bond measured 1.515 Å. `minimise_3d`, `conformers_3d` (one conformer kept: ethanol's rotamers differ only in hydrogens) and `export_3d` as XYZ text and as an SD file ran in the same session, and Agent activity listed every call with the agent's name, each changing call one undo step.
+
## Where the code lives
| Path | What it holds |
| --- | --- |
| `backend/app/routers/mcp.py` | the server: `TOOLS`, `MUTATING`, the `t_` handlers, `call_tool`, the token check, `INSTRUCTIONS` and `GUIDE` |
+| `backend/app/services/names/`, `routers/names.py` | the name engine registry, the offline engine and the names routes behind `draw_from_name` and `name_structure` |
+| `backend/app/services/nmr/`, `routers/nmr.py` | the increment predictor and the predicted spectrum object behind `predict_nmr` and `predict_spectrum` |
+| `backend/app/services/spectra/`, `routers/spectra.py` | the JCAMP-DX reader, data, peaks, integrals and export behind the spectrum tools |
+| `backend/app/services/three_d/`, `routers/three_d.py` | building, conformers, minimisation, scans, measurements, structure files, ligands and 3D export behind the 3D tools |
| `backend/app/services/agent_out.py` | the write result, `render` through the window and its engine fallback, free space |
| `backend/app/services/agent_draw.py` | structures and reaction schemes from text as one set of ops |
| `backend/app/services/agent_edits.py` | the edit tools as pure builders `fn(doc, args) -> (ops, info)` |
@@ -274,13 +366,17 @@ Five calls, five undo steps: Undo in Agent activity five times walked back throu
| `frontend/src/app/agent-activity.ts`, `ui/agent-activity.ts`, `ui/agent-chip.ts`, `canvas/agent-marks.ts` | Agent activity, the editing chip and the marks |
| `setup/mcp_stdio.py`, `setup/agents.py` | the stdio relay, `./formchem agents install`, `sync` and `token` |
-The reasons behind these choices are in `backend/HASHOUT_LOG.md` (entries 133 to 164) and `frontend/HASHOUT_LOG.md` (187 to 200).
+The reasons behind these choices are in `backend/HASHOUT_LOG.md` (entries 133 to 164 for the 0.8.0 tools, 165 to 198 for names, NMR and spectra, 199 to 222 for 3D) and `frontend/HASHOUT_LOG.md` (187 to 200, 201 to 221, and 222 to 244).
## Known limits
- The reaction and analysis tools of 0.5.0 and 0.6.0 still need `doc` when several drawings are open.
- Read-only calls show no drawing in Agent activity.
-- There is no `draw_from_name` yet; names wait for the decision on how name to structure ships.
+- `draw_from_name` reads FormChem's dictionary and the common systematic classes; hydro prefixes, spiro and bridged parents, peptide and sugar systematic names are refused, and a misspelt name is refused from its first character rather than at the misspelt word. `name_structure` gives no systematic name for salts, unlisted ring systems and stereocentres outside the parent chain.
+- `open_spectrum` opens a new drawing; there is no tool that inserts a spectrum file into an existing drawing.
+- After the structure behind a predicted spectrum changes, its curve follows at once but its links move only with the window's Refresh Predicted Spectrum; no agent tool refreshes yet. The window command `nmr-refresh` does (`run_command`), and it is on while a predicted spectrum is selected or open in the Spectrum editor.
- Agents cannot type amounts into the Stoichiometry panel. The export and copy commands hand their file to the person; use `convert` for text the agent can read.
- `perceive_reactions` lists the conditions below an arrow before those above it.
-- Not run for 0.8.0: the macOS desktop app, and real Claude Code or Codex clients (the tools were checked with the stdio transport, curl and a browser window).
+- Not run for 0.8.0: the macOS desktop app, and real Claude Code or Codex clients (the tools were checked with the stdio transport, curl and a browser window). The ten 0.9.0 tools and the eight 0.10.0 tools were checked in process only, as an in-app agent.
+- There is no tool to choose the shown conformer, add a surface or style a 3D object; `run_command` with `style-ballstick`, `surface-vdw` and the other 3D commands does it while the 3D View is open. `export_3d` writes chemistry files; the PNG and glTF exports of the view are window commands that hand their file to the person.
+- No tight-binding method (xtb, CREST): every energy is a force-field energy.
diff --git a/docs/FORMAT.md b/docs/FORMAT.md
index bc49a8c3..3201fc29 100644
--- a/docs/FORMAT.md
+++ b/docs/FORMAT.md
@@ -46,6 +46,7 @@ Ids are short random strings: a one-letter kind prefix and 8 characters from `[a
| `m` | media file |
| `r` | reaction and reaction step |
| `l` | TLC lane and other list items that need an id (spots, table rows) |
+| `c` | conformer of a fragment (from 0.10.0) |
| `x` | transaction |
The prefix is a hint for people reading the JSON. Readers never parse it and accept any id matching `^[A-Za-z0-9_-]{1,64}$` (imported files bring their own). Writers never renumber ids. Built-in style preset ids are fixed names (below) and are not document records.
@@ -202,6 +203,8 @@ Readers keep objects of a kind they do not know, draw nothing for them, and writ
| `image` | 0.5.0 | an embedded picture |
| `tlc` | 0.5.0 | a TLC plate with lanes and spots |
| `orbital` | 0.5.0 | s, p, d and hybrid orbital lobes |
+| `spectrum` | 0.9.0 | an IR, UV-Vis, mass or NMR spectrum, measured or predicted, with peaks linked to atoms |
+| `model3d` | 0.10.0 | a 3D view of a structure or a PDB or CIF file placed on the page |
## Fragments: atoms and bonds
@@ -221,6 +224,8 @@ A fragment may hold several disconnected pieces (a salt is one fragment). Fields
| `chiral` | optional whole-molecule stereo flag: `"absolute"`, `"relative"` or `"racemic"` (built from 0.6.0). For chemistry, `relative` puts every stereocentre that is in no stereo group into one OR group and `racemic` puts them into one AND group, each with the next free group number; `absolute` (and absent) leaves them absolute. `absolute` also sets the molfile chiral flag |
| `stereo_groups` | optional enhanced stereo groups `[ { "kind": "abs" }, { "kind": "and", "n": 1, "atoms": ["a4", "a9"] } ]`, kind `abs`, `and` or `or` (built from 0.6.0) |
| `rgroups` | optional R-group definitions keyed by number as a string: `{ "1": { "members": ["f..."], "occurrence": ">0", "rest_h": false, "if_then": 2 } }`, `members` naming fragment objects that hold one member each (built from 0.6.0). A definition may carry `attach`, a map of member fragment id to that member's attachment atom ids in order (first, then second attachment point): `{ "f...": ["a..."] }`. A member without an `attach` entry uses its atoms whose `data.attach` is 1 or 2 (V3000 import writes these), else its attachment stubs: `"*"` atoms with no label, no `generic` and exactly one bond, in id order. An attachment atom that is such a stub stands for the R-group atom: its neighbour bonds to the scaffold and the stub is not part of the member; any other attachment atom bonds to the scaffold itself. A member with none of these attaches at its first atom by id |
+| `conformers` | optional 3D coordinates (built from 0.10.0): `[ { "id": "c...", "coords": { "a1": [0.0, 1.2, -0.4] }, "h": { "a1": [[0.5, 1.9, 0.1]] }, "energy": -12.3, "method": "MMFF94", "converged": true } ]`. `coords` holds every atom of the fragment in ångström; `h` holds the positions of each atom's implicit hydrogens in the order RDKit adds them; `energy` is in kcal/mol for the named `method` (`"ETKDG"` when only embedded, `"MMFF94"`, `"MMFF94s"`, `"UFF"`, `"xtb"`, or `"file"` for coordinates read from a file, where `energy` is absent unless the file gave one). `expanded` (optional) holds, for an atom that stands for an abbreviation, the positions of the abbreviation's other atoms (heavy atoms, then hydrogens) in the order the engine expands it. `scan` (optional, on conformers kept from a dihedral scan) is `{ "atoms": ["a1", "a2", "a3", "a4"], "angle": -60.0 }`, the four atoms of the scanned dihedral and the angle held in degrees. A hydrogen is addressed as `a1:h0`, `a1:h1` (an index into `h["a1"]`) and an atom of an expanded abbreviation as `a5:x0` (an index into `expanded["a5"]`) wherever the 3D routes, measurements and labels name atoms. A conformer is valid only for the graph it was made from: any change to the fragment's atoms or bonds other than 2D positions and display fields drops `conformers` (and `conformer`) in the same transaction. The changes that count are an atom's `element`, `charge`, `isotope`, `radical`, `hydrogens`, `label`, `expansion`, `generic`, `rgroup` or `query`, a bond's ends, `order`, `stereo`, `query` or `topology`, and adding or removing atoms or bonds; the window and the engine apply the same rule, and a transaction that itself sets `conformers` or `conformer` is taken as written |
+| `conformer` | optional id of the conformer the 3D view shows; absent means the first |
### Atoms
@@ -322,7 +327,7 @@ A text object (same fields) attached to a structure: `target` (a fragment or gro
`media` (a media id), `x`, `y`, `w`, `h`, `rot`, `crop` (`{ "l": 0, "t": 0, "r": 0, "b": 0 }` as fractions), `opacity`.
-Media bytes reach a drawing in two steps. `POST /api/documents/{id}/media` (multipart field `file`, up to 50 MB, PNG, JPEG, GIF, WebP or SVG recognised from the bytes, anything else 415) keeps the bytes in the open drawing under a fresh `m` id and answers `{ "id": "m...", "media": { "name", "mime", "bytes", "w", "h", "sha256" } }` (`w` and `h` in pixels when the engine can read them); it does not change document.json. The window then commits one transaction that sets `media[id]` to that record and adds the image object, so placing a picture is one undo step. `GET /api/documents/{id}/media/{media_id}` serves the bytes with their mime type. Bytes whose id is not listed in `media` when the drawing is saved are not written to the package.
+Media bytes reach a drawing in two steps. `POST /api/documents/{id}/media` (multipart field `file`, up to 50 MB, PNG, JPEG, GIF, WebP or SVG recognised from the bytes, from 0.9.0 JCAMP-DX text, and from 0.10.0 PDB, mmCIF, SDF and MOL structure files for 3D objects, anything else 415) keeps the bytes in the open drawing under a fresh `m` id and answers `{ "id": "m...", "media": { "name", "mime", "bytes", "w", "h", "sha256" } }` (`w` and `h` in pixels when the engine can read them); it does not change document.json. The window then commits one transaction that sets `media[id]` to that record and adds the image object, so placing a picture is one undo step. `GET /api/documents/{id}/media/{media_id}` serves the bytes with their mime type. Bytes whose id is not listed in `media` when the drawing is saved are not written to the package.
### group (built from 0.4.0)
@@ -336,6 +341,20 @@ Media bytes reach a drawing in two steps. `POST /api/documents/{id}/media` (mult
`type` (`"s"`, `"p"`, `"d"`, `"dz2"`, `"sp"`, `"sigma"`, `"pi"`), `x`, `y`, `size` (points), `rot`, `fill` (`"filled"`, `"hollow"`, `"shaded"`), `phase` (true swaps which lobe is filled), `atom` (`{ "object": "f...", "atom": "a..." }` when attached).
+### spectrum (built from 0.9.0)
+
+`x`, `y`, `w`, `h` (the plot box on the page), `technique` (`"ir"`, `"raman"`, `"uvvis"`, `"ms"`, `"nmr"`), `nucleus` (NMR only: `"1H"`, `"13C"`, `"19F"`, `"31P"` and so on), `source`, `view` and the annotation lists below.
+
+`source` is one of `{ "media": "m..." }` (a measured spectrum: the original JCAMP-DX file kept byte for byte in the package, `mime` `chemical/x-jcamp-dx`; `block` picks one block of a multi-block file by index, default 0; the file may be named `.jdx`, `.dx` or `.jcamp` and is stored in the package as `media/[id].jdx`) or `{ "predicted": { "fragment": "f...", "method": "...", "version": "...", "frequency": 400 } }` (a prediction for a fragment on the page; the engine recomputes it when the fragment changes, so only these settings are stored). The engine parses the source; the parsed points are derived values and never stored.
+
+`view`: `{ "x_from": 4000, "x_to": 400, "y_from": 0, "y_to": 100, "y_mode": "transmittance" }`, all optional. `x_from` is the value at the left edge, so IR and NMR spectra run from high to low without a flag; absent values mean the source's full range in the technique's usual direction (IR wavenumber and NMR shift decreasing left to right, UV-Vis wavelength and m/z increasing). `y_mode` (IR and UV-Vis) is `"transmittance"` or `"absorbance"`.
+
+`peaks`: `[ { "id": "k...", "x": 1715.2, "y": 12.5, "label": "C=O", "atoms": { "object": "f...", "atoms": ["a3", "a4"] } } ]`, `y` in the y mode shown when the peak was picked (transmittance in percent for IR by default). `integrals` (NMR): `[ { "id": "k...", "from": 7.45, "to": 7.20, "value": 5, "atoms": { ... } } ]`, `value` the area normalised so the person's chosen integral reads as typed; normalising one integral rewrites `value` on every integral of the spectrum in the same transaction. `multiplets` (NMR, optional): `[ { "id": "k...", "from": ..., "to": ..., "shift": 3.71, "kind": "q", "j": [7.1], "atoms": { ... } } ]`. `overlays`: other spectrum object ids drawn in the same plot box (a predicted spectrum over a measured one). Peak, integral and multiplet ids share the object id space of the document.
+
+### model3d (built from 0.10.0)
+
+`x`, `y`, `w`, `h`, `source` (`{ "fragment": "f..." }` for a structure on the page, using its active conformer, or `{ "media": "m...", "format": "pdb" }` for a PDB, mmCIF or 3D SDF/MOL file kept byte for byte in the package; `format` is `pdb`, `cif`, `sdf` or `mol`, the media `mime` is `chemical/x-pdb`, `chemical/x-mmcif`, `chemical/x-mdl-sdfile` or `chemical/x-mdl-molfile`, and the package stores the bytes as `.pdb`, `.cif`, `.sdf` or `.mol`), `display` (`"wire"`, `"stick"`, `"ballstick"`, `"spacefill"`, `"cartoon"`; a PDB defaults to cartoon with ligands as ball and stick; named `display` because `style` is the object's style sheet override), `surface` (optional: `{ "kind": "vdw" | "sas" | "ses", "color": "esp" | "uniform", "opacity": 0.7 }`), `camera` (the view as a 4 by 4 matrix in column order plus `zoom`, so the page shows the angle the person chose, where the matrix is the model rotation times the model translation and `zoom` is the camera distance in ångström along the view axis (larger is further)), `focus` (optional: residue or ligand selection, e.g. `{ "ligand": "ATP", "residue": "A:ATP:301" }`; `residue` names one residue as chain, residue name and number joined by colons, with an insertion code appended to the number when the file has one), `snapshot` (a media id of a PNG of the current view, written by the window whenever the view changes so exports, print and thumbnails show the 3D view without a 3D renderer; a window that replaces `snapshot` removes the old media entry in the same transaction when no other object refers to it), and `labels` (optional measurements `[ { "id": "k...", "kind": "distance" | "angle" | "dihedral", "atoms": ["a1", "a2"], "value": 1.43 } ]`, atoms by fragment atom id (a hydrogen of a fragment atom is named `a1:h0` as in `conformers.h`) or, for PDB sources, by serial number as a string).
+
## Reactions on a page
Built from 0.5.0. `page.reactions` lists reactions; each is `{ "id": "r...", "steps": [ ... ] }` and each step is:
diff --git a/docs/FORMATS.md b/docs/FORMATS.md
index 004d1580..079f6b5e 100644
--- a/docs/FORMATS.md
+++ b/docs/FORMATS.md
@@ -8,6 +8,7 @@ How FormChem reads and writes chemistry files and pictures, what each format kee
- The formats
- What each format keeps
- Pictures and the drawing inside them
+- 3D files (0.10.0)
- Reports
- HTTP API
- The window
@@ -89,6 +90,34 @@ The drawing inside a picture is a plain document.json (FORMAT.md) holding one pa
Scope is Whole page (everything on the page, cropped to the drawing plus the margin, 6 pt by default), Selection (partly selected structures keep only the selected atoms and the bonds between them) or Each structure (one file per structure, named after the structure's name or the drawing's title and a number). Scale is a percent of real size: at 100 percent one point of the drawing is one point in the file. Gradients become their mean colour in PDF and EPS, and EPS has no transparency; a warning says so.
+## 3D files (0.10.0)
+
+Structure files with 3D coordinates are read by the 3D services (`backend/app/services/three_d/`), not by the formats table, because what they become is a 3D object or a conformer rather than a 2D drawing. The details are in [3D.md](3D.md).
+
+| Format | Extensions | In | Out |
+| --- | --- | --- | --- |
+| PDB | `.pdb`, `.ent` | File > Open (a new drawing), File > Import and 3D > 3D Structure File... (into the open drawing), dropped on Home: one 3D object over the file kept byte for byte, cartoon for a protein, ligands as ball and stick, waters hidden, the primary ligand focused | the original file (Export 3D Structure on the model), or a structure's conformers as PDB with MODEL records |
+| mmCIF | `.cif`, `.mmcif` | as PDB | the original file |
+| SD file with 3D coordinates | `.sdf`, `.sd` | File > Open, File > Import, 3D > 3D Structure File...: one structure per record with a 2D layout and the record's coordinates as its conformer (method `file`) | Export 3D Structure: every conformer as a record with `FORMCHEM_ENERGY`, `FORMCHEM_METHOD` and `FORMCHEM_CONFORMER` data fields, every hydrogen written |
+| Molfile with 3D coordinates | `.mol`, `.mdl` | as SD | Export 3D Structure: the shown conformer, V2000 (V3000 above 999 atoms), every hydrogen written |
+| XYZ | `.xyz` | not read | Export 3D Structure: the shown conformer, or every conformer as frames |
+| glTF binary | `.glb` | not read | 3D > Export 3D View as glTF: atoms and bonds of the 3D View as one mesh in element colours, 1 Å = 1 cm |
+
+An SD or MOL file is read for 3D when its first record has z coordinates that are not all zero and the file holds at most 200 records; any other SD or MOL file goes through the 2D reader as before, and its 3D coordinates are flattened (`coordinates_flattened`). PDB and mmCIF files are read up to 64 MB. The PNG of the 3D View is a plain picture of the view, opaque or transparent, without the drawing inside.
+
+Report items of 3D files:
+
+| Code | Severity | Meaning |
+| --- | --- | --- |
+| `structure_3d` | info | the PDB or mmCIF model placed as a 3D object, with its atoms, chains, ligands and hidden waters |
+| `conformers_kept` | info | the file's 3D coordinates kept as the conformers of its structures |
+| `pdb_bad_lines`, `cif_bad_rows` | warn | ATOM or HETATM lines, or `atom_site` rows, with unreadable coordinates were skipped |
+| `cif_asymmetric_unit` | warn | a small-molecule CIF read in its unit cell; symmetry mates are not generated |
+| `flat_record` | warn | an SD record with 2D coordinates only; no conformer was kept |
+| `hydrogens_placed` | warn | hydrogens missing from the file were placed from the geometry |
+| `not_sanitised` | warn | a record with valence problems, read without sanitising |
+| `record_failed` | error | a record could not be read and was skipped |
+
## Reports
Every reader and writer returns report items of one shape:
@@ -250,6 +279,6 @@ Timings on a two-core Linux machine: the whole corpus to every format and back i
- CDXML and CDX go through Indigo, which does not carry colours, fonts (it writes Arial and Times), the bond length (it writes 30), line breaks in text (read back as spaces), curved arrows (written straight), shapes, brackets, tables, TLC plates and images, structure names and data, or R-group members on reading. Query structures cannot be written as CDX. Only files written by Indigo were tested, not files from the program that made the format.
- Enhanced stereo is lost in CML, SMILES, InChI and SMARTS, conditions in SMILES, and every step after the first in RXN: these are limits of the formats. Abbreviations are written as their full structures in every format but `.fchem`.
-- Chemical names are not read: a name pasted as text becomes a text object.
+- From 0.9.0 a chemical name pasted as text opens Structure from Name with its structure (see [NAMES.md](NAMES.md)); a name the engine cannot read still becomes a text object. JCAMP-DX spectra (`.jdx`, `.dx`, `.jcamp`) open and import as spectrum objects, not structures; they are described in [SPECTRA.md](SPECTRA.md). From 0.10.0 PDB and mmCIF files open as 3D objects and 3D SD and MOL files keep their coordinates as conformers (above, and [3D.md](3D.md)); XYZ and glTF are written, not read, and mmCIF is written back only as the original file.
- EPS was checked by reopening its drawing, not by drawing it in a PostScript viewer.
- In the desktop app the engine writes where the window says the person chose; it cannot prove a save dialog produced the path, and relies on the window key and its list of extensions.
diff --git a/docs/NAMES.md b/docs/NAMES.md
new file mode 100644
index 00000000..bf74cede
--- /dev/null
+++ b/docs/NAMES.md
@@ -0,0 +1,141 @@
+# FormChem names
+
+How FormChem reads chemical names into structures and writes names for structures, built from 0.9.0. Everything runs offline in the engine on this computer, with no account and no lookup service; every answer says which method and engine version made it. This page describes the engine behind Insert > Structure from Name, the Analysis panel's Name section, Edit > Copy Name, pasting a name, and the agent tools `draw_from_name` and `name_structure`, and their HTTP routes.
+
+## Contents
+
+- Where the code lives
+- Name to structure
+- Confidence
+- Refusals
+- Structure to name
+- What is covered
+- The engine is pluggable
+- HTTP API
+- Agent tools
+- The window
+- Known limits
+
+## Where the code lives
+
+| Path | What it holds |
+| --- | --- |
+| `backend/app/services/names/base.py` | the `NameEngine` protocol and the result shapes (`StructureResult`, `NameResult`, `NameItem`) |
+| `backend/app/services/names/__init__.py` | the engine registry: `register`, `engine`, `engines`, `listing` |
+| `backend/app/services/names/offline.py` | `OfflineEngine`, FormChem's own engine (id `formchem`, version 0.9.0) |
+| `backend/app/services/names/dictionary.py`, `backend/app/data/names/` | the dictionary of common names, seven JSON files |
+| `backend/app/services/names/lexicon.py`, `rings.py`, `parser.py`, `build.py`, `stereo.py` | the systematic parser and the structure builder |
+| `backend/app/services/names/namer.py` | the rule-based namer |
+| `backend/app/routers/names.py` | the routes |
+| `frontend/src/engine/names-api.ts`, `ui/name-dialog.ts`, `ui/analysis-name.ts`, `app/name-commands.ts` | the window side |
+
+The reasons behind the design are in `backend/HASHOUT_LOG.md` (entries 165 to 175) and `frontend/HASHOUT_LOG.md` (201 to 205).
+
+## Name to structure
+
+A name goes through three steps, in this order:
+
+1. **The dictionary.** 629 common names, each stored with its SMILES and its InChIKey: solvents (73), reagents (153), amino acids (46), biochemistry (67), drugs (126), everyday organics (114) and natural products (50). Abbreviations and brand-like names are entries too (THF, DMF, DMSO, DCM, Taxol, L-DOPA). Dictionary names match loosely: spaces, hyphens, commas, apostrophes and brackets are ignored, so "acetyl salicylic acid" finds aspirin. A bare biochemical name means the natural form ("alanine" is L-alanine, "glucose" D-glucose as the pyranose with the anomeric centre left open); racemic drugs carry no stereo.
+2. **Refusals.** Names that a systematic reading would get wrong are refused before the parser sees them (see Refusals).
+3. **The systematic parser.** A backtracking grammar over FormChem's lexicon of stems, multipliers, prefixes, suffixes, retained parents and ring parents, then a builder that assembles the structure with a valence check at every step, and stereo descriptors set and checked with RDKit's CIP labeller.
+
+The structure is laid out with FormChem's scored 2D layout, exactly as pasted SMILES is, and named with the text you typed.
+
+## Confidence
+
+| Confidence | When |
+| --- | --- |
+| `high` | a dictionary hit, or a full systematic parse with one reading and nothing assumed |
+| `medium` | a locant had to be filled in ("propanol" drawn as propan-1-ol, warning `assumed`), or the name has two readings that give different structures (warning `ambiguous`, for example "chloromethylbenzene" read as benzyl chloride) |
+| `low` | reserved for engines that guess; the offline engine refuses instead |
+| `none` | the name was not read |
+
+A name without stereo descriptors for a structure with stereocentres keeps `high` with a note (`stereo_unspecified`): it is a correct name for the unspecified structure. (+), (-), rac and (RS) draw without stereo with the note `no_configuration`, because optical rotation does not fix a configuration.
+
+## Refusals
+
+A name that is not read answers `confidence: none` with an error code, a sentence and, where it applies, the 0-based `position` of the character where reading stopped (the dialog marks the unread part).
+
+| Code | Example | Why |
+| --- | --- | --- |
+| `empty`, `too_long` | "", a name over 300 characters | nothing to read, or a paragraph pasted by mistake |
+| `cas_inverted` | "Benzene, 1,2-dichloro-" | inverted index names are not read; write 1,2-dichlorobenzene |
+| `dl_configuration` | "D-threonine" outside the dictionary | D and L describe a relationship to glyceraldehyde, not a CIP configuration; the dictionary holds the common ones |
+| `not_understood` | "benzoic acdi" | a part of the name is not in the lexicon |
+| `incomplete` | a name that stops mid-way | the grammar needs more |
+| `not_valid` | "2,2,2-trimethylpropane", "propan-4-ol" | the structure would break valence, or a locant does not exist |
+
+The offline engine never returns a structure it is unsure of under a high confidence, and never silently changes a name into a different one.
+
+## Structure to name
+
+For a structure, FormChem gives up to two names:
+
+- **Common name** (`kind: trivial`, method `dictionary`): the dictionary entry with the same standard InChIKey, when there is one.
+- **Systematic name** (`kind: systematic`, method `rule-based namer, round-trip checked`): FormChem's namer follows the IUPAC 2013 recommendations for what it covers: principal characteristic group by seniority (acid, ester, amide, nitrile, aldehyde, ketone, alcohol, thiol, amine), parent by most principal groups then ring over chain, ring seniority, chain length then unsaturation, lowest locants in the rule order, prefixes in alphabetical order with compound prefixes bracketed, retained names where IUPAC keeps them (phenol, aniline, benzoic acid, acetic acid and others), R and S, E and Z.
+
+Every systematic name is parsed back by the parser and shown only when it gives the same standard InChIKey at high confidence. When the namer cannot name a structure, or the round trip fails, there is no systematic name and the answer gives the reason, for example "No systematic name: salts and mixtures are not named systematically yet." At 0.9.0 the namer named 352 of the 629 dictionary structures, and all 352 round-tripped; the rest are mostly ring systems outside the table (118), salts and mixtures (44), sulfur oxides (16), stereocentres outside the parent (13), phosphorus (12), imines and azo compounds (11).
+
+Fragments with atom labels, R-groups or any-atoms have no name.
+
+## What is covered
+
+The parser reads:
+
+- alkanes to C20 with branched and compound substituents, bracketed or bare, nested with (), [] and {}; cycloalkanes and cycloalkenes; alkenes, alkynes and enynes with locants, including the older forms ("2-butanol", "1,3-butadiene", "3-buten-2-one")
+- haloalkanes, alcohols, thiols, ethers (alkoxy, -yloxy), sulfides (alkylsulfanyl), amines (suffix, N-locants, "triethylamine" style), aldehydes, ketones, carboxylic acids, carboxylic and sulfonic acids on rings, esters (alkyl ...oate, ...carboxylate, diesters), salts (sodium, potassium, lithium, caesium, ammonium ...ate), acid halides, amides (N-substituted, carboxamide, sulfonamide), nitriles
+- retained parents (phenol, aniline, toluene, anisole, benzoic acid, benzaldehyde, benzonitrile, benzamide, acetic and formic acid and their derivatives) and ortho, meta, para
+- 49 ring parents with their -yl forms and aliases ("2-pyridyl"): benzene, pyridine, the diazines, triazine, furan, thiophene, pyrrole, the azoles, triazole, tetrazole, naphthalene, quinoline, isoquinoline, quinoxaline, quinazoline, indole, benzofuran, benzothiophene, benzimidazole, benzoxazole, benzothiazole, indazole, purine, and the saturated rings from oxirane to azepane, including piperidine, piperazine, morpholine and the dioxanes
+- multipliers di to deca and bis to hexakis; functional class names (benzyl alcohol, diethyl ether, ethyl methyl ketone, methyl iodide, benzoyl chloride)
+- R, S, E, Z, cis and trans with locants
+
+Measured at 0.9.0: a corpus of 50 systematic names across these classes and 20 trivial names all read to the expected InChIKey offline (the expected keys computed from SMILES written independently of the parser), and the 5 expected refusals were refused with the expected code; the whole corpus took 0.09 s. The slowest name tried answers in about 140 ms, because the parser has a step budget.
+
+## The engine is pluggable
+
+Names are read and written through a registry of engines that all meet one protocol (`services/names/base.py`):
+
+```python
+class NameEngine(Protocol):
+ id: str
+ label: str
+ version: str
+ def available(self) -> bool: ...
+ def to_structure(self, name: str) -> StructureResult: ...
+ def to_name(self, mol) -> NameResult: ...
+```
+
+`names.engine()` answers the first available engine; the routes, the window and the MCP tools call only that, and every result carries its `engine` and `version`. Another engine is added without touching any of them:
+
+1. Write `backend/app/services/names/opsin.py` with a class that meets the protocol. OPSIN is a Java program: run it as a separate process (a small server or a command per batch), so its runtime and its licence stay apart from the engine, as the licence rules require for anything that is not permissive.
+2. Register it in front at startup: `names.register(OpsinEngine(), first=True)`.
+3. If it reads names but does not write them, its `to_name` returns `NameResult([], ..., reason="...")`, and the offline namer stays the one that writes names (an engine may be strong in one direction only).
+
+`/api/names/engines` lists the engines with their availability and, per run, how many structures were named and how many round trips passed or failed. An online lookup would be registered the same way, and its results would say so in `method` and `engine`.
+
+## HTTP API
+
+| Route | Needs the window key | What it does |
+| --- | --- | --- |
+| `POST /api/names/to-structure` | no | `{name, bond_length?, x?, y?, engine?}` answers `{name, smiles, inchikey, confidence, method, engine, version, warnings, error?, fragment, fragments, formula, layout}`. A refused name is a 200 with `error` and `fragment: null`, so a live preview needs no error path; 422 only for a missing name or bad numbers, 404 for an unknown engine |
+| `POST /api/names/to-name` | no | `{smiles}` or `{fragment, expansions?}`, optional `engine`, answers `{names: [{text, kind, confidence, method}], engine, version, inchikey, warnings, reason?}` |
+| `POST /api/documents/{id}/names/insert` | yes | `{name, x?, y?, page?, engine?, origin?, client?}` reads the name and adds the structure in free space (or at x, y) as one transaction labelled "Insert [name]"; answers the to-structure fields plus `{changed, tx, rev, objects}`, 422 when the name is not read |
+| `GET /api/names/engines` | no | `{engines: [{id, label, version, available, stats?}]}` |
+
+## Agent tools
+
+`draw_from_name {name, doc?, x?, y?, label?}` draws a name as one undo step and says how it was read; `name_structure {smiles? | doc?, object? | selection?}` names structures without changing anything. Both are described with their result fields in [AGENTS.md](AGENTS.md).
+
+## The window
+
+- **Insert > Structure from Name** reads the name as you type and shows the structure, the formula, the confidence, the method and "FormChem names 0.9.0", or the refusal with the unread part marked. Insert or Enter draws it as one undo step.
+- **Pasting** a name on the canvas opens the same dialog filled in; text that is not a name, or a name that is not read, pastes as text.
+- **The Analysis panel's Name section** shows the common and the systematic name of the selection with their methods, or the reason there is no systematic name.
+- **Edit > Copy Name** copies the first name.
+
+## Known limits
+
+- Not read: hydro prefixes and added hydrogen ("3,7-dihydro-1H-purine-2,6-dione", "pyridin-2(1H)-one"), multipliers above deca, bis and tris in functional class words ("bis(2-chloroethyl) ether"), spiro and bridged parents, ring parents not in the table (anthracene numbering, carbazole and others), stereo descriptors inside substituents, peptide and sugar systematic names. Their common names come from the dictionary where it has them.
+- Not named: tautomer-sensitive heterocycles with an exocyclic C=O (pyridones, uracils, caffeine) get only their common name; salts and charged species, sulfoxides and sulfones, phosphorus, metals, imines and azo compounds, isotopes and radicals, pseudo-asymmetric centres and structures over 80 heavy atoms get no systematic name.
+- A misspelt name ("benzoic acdi") is refused from the first character rather than at the misspelt word.
+- The dictionary is FormChem's own and holds 629 names; a name outside it and outside the parser's classes is refused. OPSIN can be added as an engine later (above).
diff --git a/docs/SPECTRA.md b/docs/SPECTRA.md
new file mode 100644
index 00000000..73df057c
--- /dev/null
+++ b/docs/SPECTRA.md
@@ -0,0 +1,179 @@
+# FormChem spectra and NMR prediction
+
+How FormChem reads JCAMP-DX spectra, keeps spectra in a drawing, measures peaks and integrals, and predicts 1H and 13C NMR spectra, built from 0.9.0. What a drawing stores for a spectrum is defined in [FORMAT.md](FORMAT.md) (the `spectrum` object), which wins over this page; this page describes the services behind File > Open of spectrum files, Insert > Spectrum from File, the Spectrum editor, the Analysis > Spectrum and predict commands and the agent tools, and their HTTP routes.
+
+## Contents
+
+- Where the code lives
+- JCAMP-DX support
+- Checks, repairs and the report
+- The spectrum object
+- Opening, importing and saving
+- Drawing a spectrum
+- Peaks, integrals and links to atoms
+- Export
+- NMR prediction
+- Accuracy
+- Adding a predictor
+- HTTP API
+- Agent tools
+- Known limits
+
+## Where the code lives
+
+| Path | What it holds |
+| --- | --- |
+| `backend/app/services/spectra/` | the JCAMP-DX reader (`ldr.py` records, `asdf.py` compression, `tables.py` data tables, `ntuples.py`, `jcamp.py`), `technique.py` (units and directions), `issues.py` (the report), `display.py` (decimation, absorbance, views), `measure.py` (peaks, integrals, baselines), `export.py`, `document.py` (opening and inserting), `source.py` (parse cache and the predictor registry) |
+| `backend/app/routers/spectra.py` | data, peaks, integrals, export and parse routes |
+| `backend/app/services/nmr/` | the increment predictor: `environment.py`, `groups.py`, `carbon.py`, `proton.py`, `coupling.py`, `predict.py`, `simulate.py`, `document.py` (the predicted spectrum object), `source.py` (the data hook), `reference.py` and `accuracy.py` |
+| `backend/app/routers/nmr.py` | the prediction routes |
+| `frontend/src/engine/spectra-api.ts`, `engine/nmr-api.ts` | the window's only callers of those routes |
+| `frontend/src/canvas/render/spectrum.ts`, `spectrum-axes.ts`, `spectrum-data.ts`, `canvas/spectrum-links.ts` | the page plot, its data cache and the atom links |
+| `frontend/src/ui/spectrum-panel.ts`, `app/spectrum-commands.ts`, `app/spectrum-import.ts`, `app/nmr-commands.ts` | the Spectrum editor and the commands |
+
+The reasons behind the design are in `backend/HASHOUT_LOG.md` (entries 176 to 196) and `frontend/HASHOUT_LOG.md` (206 to 221).
+
+## JCAMP-DX support
+
+FormChem's reader was written from the published JCAMP-DX rules (4.24 for IR, 5.0 for NMR, 5.01 for MS, 6.0 for the 2D markers), without reading any existing parser. Every computed value it serves names "FormChem JCAMP-DX reader" and the version.
+
+| Feature | Status |
+| --- | --- |
+| Techniques | IR, Raman, UV-Vis, mass spectra and 1D NMR, from `##DATA TYPE` or, failing that, the units |
+| Data tables | `##XYDATA=(X++(Y..Y))`, `##XYPOINTS=(XY..XY)`, `##PEAK TABLE=(XY..XY)`, `(XYW..XYW)` and `(XYM..XYM)` (W and M kept) |
+| Compression | AFFN (with `E+nn` exponents and `?` for missing values), PAC, SQZ, DIF and DUP, mixed freely on one line |
+| NTUPLES | `##PAGE` and `##DATA TABLE` with per-symbol FIRST, LAST, FACTOR and VAR_DIM; NMR real and imaginary pages as one spectrum with its imaginary channel |
+| NMR | `##.OBSERVE FREQUENCY` (Hz to ppm), `##.OBSERVE NUCLEUS`, `##.SHIFT REFERENCE` (moves the axis so the named point reads its value); an FID is read in seconds and shown as acquired |
+| Several blocks | every data block of a `##DATA TYPE=LINK` file becomes its own spectrum; `##BLOCKS`, `##BLOCK_ID` and `##CROSS REFERENCE` are checked or kept |
+| Units | XUNITS 1/CM, NANOMETERS, MICROMETERS, HZ, PPM, M/Z, SECONDS; YUNITS TRANSMITTANCE (a fraction is shown in percent), ABSORBANCE, REFLECTANCE, KUBELKA-MUNK, RELATIVE ABUNDANCE, ARBITRARY |
+| Labels and comments | labels match ignoring spaces, dashes, slashes, underscores and case; `$$` comments are kept; `##$` private and `##.` technique labels are kept in the metadata as written |
+| Encoding | ASCII, then UTF-8, then Latin-1 (reported) |
+| Not drawn, reported | 2D NTUPLES (`2d_unsupported`), the pages after the first of a GC-MS file (`pages_left_out`), JCAMP-CS structure blocks, the ASSIGNMENTS data class and vendor processing labels (kept as metadata) |
+
+## Checks, repairs and the report
+
+The reader checks a file as it reads it and says what it found, in the same report shape as every other import (code, severity, count, text, line):
+
+- every DIF Y check value is verified and dropped; a wrong one restarts its line from the trusted value (`y_check`), and a file written without checks stays readable (`y_check_missing`)
+- the X value of each line, FIRSTX against the first line, FIRSTY, DELTAX against the computed spacing and NPOINTS against the count are checked (`x_check`, `npoints`); FIRSTX and LASTX are trusted, and a wrong NPOINTS is replaced when the line X values fit the real count
+- transmittance stored as a fraction is shown in percent (`transmittance_percent`); XYPOINTS out of order are sorted; a missing `##END` or text outside blocks is repaired and reported
+
+300 random 20-byte corruptions of a compressed file either parsed with a report or failed with a clean error. Damaged, absorbance-stored, fraction-stored and every compressed form of the same IR spectrum read back identical to the plain AFFN file (within 0.0015 %T for absorbance).
+
+## The spectrum object
+
+A spectrum in a drawing is a `spectrum` object (FORMAT.md): its box on the page, `technique`, `nucleus` for NMR, `source`, `view`, and the annotation lists `peaks`, `integrals` (NMR), `multiplets` (NMR) and `overlays`. The source is either
+
+- `{media: "m...", block?}`, a measured spectrum whose original JCAMP-DX file is kept byte for byte as media in the drawing (`chemical/x-jcamp-dx`, saved in the `.fchem` package as `media/[id].jdx`), or
+- `{predicted: {fragment, method, version, frequency}}`, a prediction for a structure on the page.
+
+The points are never stored: the engine parses or computes them when asked. A peak's `y` is in the y mode shown when it was picked (transmittance in percent for IR by default); normalising one integral rewrites the value of every integral of that spectrum in the same transaction. Spectrum object ids start with `o`, peaks, integrals and multiplets with `k`, media with `m`.
+
+## Opening, importing and saving
+
+- **File > Open** of a `.jdx`, `.dx` or `.jcamp` file makes a drawing with one spectrum object per data block, stacked down the page, and shows the import report.
+- **Insert > Spectrum from File** adds the spectra of a file to the open drawing: the engine reads the file without opening it, answers the media as a data URL, and the window uploads it and pastes the objects as one undo step.
+- **Saving** keeps the original file in the package; Export Spectrum with Original gives it back untouched.
+- **Copy and paste** carry a spectrum with its file; pasted peaks, integrals and multiplets get fresh ids and their atom links follow the pasted structures.
+
+## Drawing a spectrum
+
+The window draws a spectrum in its box on the page and in the Spectrum editor from the engine's data route, never from stored points. IR and Raman wavenumber and NMR shift decrease from left to right; UV-Vis wavelength and m/z increase; FID time increases. The y axis is labelled from the file: Transmittance (%), Absorbance, Reflectance, Relative abundance, Intensity or Kubelka-Munk. IR, Raman and UV-Vis switch between transmittance and absorbance (A = -log10(T/100)).
+
+Continuous data is reduced to about the plot's width in pixels with min-max buckets: each bucket keeps its lowest and highest point, so no peak disappears at any zoom. Zooming the page or the editor asks for finer data once per doubling. MS and peak tables are drawn as sticks.
+
+## Peaks, integrals and links to atoms
+
+- **Pick Peaks** finds peaks in a range (default the visible range): minima in transmittance and reflectance (bands point down), maxima otherwise, by prominence (default 5 percent of the y span); NMR lines above the median plus six times a noise estimate; MS sticks above 1 percent of the base peak. Peaks already there are skipped. One undo step.
+- **A peak by hand**: in the Spectrum editor, click to add a peak (it snaps to the local extremum within 8 px) or click a peak's label to remove it.
+- **Integrate** (NMR): a trapezoid area over a range after a straight baseline between its ends. The first integral reads 1 unless you type a value; typing a value into any integral rescales them all. One undo step.
+- **Link Peak to Atoms**: a peak, integral or multiplet links to atoms of one structure. Hover an atom to light its peaks in every spectrum on the page; hover a peak, integral or multiplet to light its atoms.
+
+## Export
+
+Analysis > Spectrum > Export Spectrum, or the export route:
+
+| Format | What you get |
+| --- | --- |
+| `jdx` | a fresh JCAMP-DX 5.01 file of the block: AFFN `##XYDATA=(X++(Y..Y))` when x is evenly spaced, XYPOINTS otherwise, PEAK TABLE for sticks; with peaks, a LINK file with a second PEAK TABLE block. Every written file re-reads with an empty report |
+| `jdx` with Original | the imported file, byte for byte, all blocks |
+| `csv` | `x,y` (and `imag` when present) with a header row naming the axes, every point in left-to-right order, in the displayed y mode |
+
+The imaginary NMR channel is not written to a fresh JCAMP-DX file; the export report says so.
+
+## NMR prediction
+
+Analysis > Predict 1H NMR Spectrum and Predict 13C NMR Spectrum, the prediction routes and the agent tools all use one method: **FormChem increments 0.9.0**. It is FormChem's own set of additive increments and environment rules, written for FormChem from general chemistry knowledge, with no shift database and no copied table.
+
+- **13C**: sp3 carbons from a methane base with alpha, beta, gamma and delta terms walked outwards through the structure, branching and ring corrections; aromatic carbons from the six-ring or five-ring base with ring heteroatom terms and ipso, ortho, meta and para terms for about 50 substituent classes; alkenes from ethylene with same-side and far-side terms; carbonyls by class (ketone, aldehyde, acid, carboxylate, ester, anhydride, amide, acyl halide, carbonate, carbamate, urea); nitriles, alkynes, imines and relatives. 13C is predicted proton-decoupled.
+- **1H**: sp3 protons from a base by hydrogen count with alpha and beta terms per neighbouring group; aromatic protons from benzene (7.30) with ortho, meta and para terms and their own heteroaromatic bases; alkene protons with geminal, cis and trans terms read from the drawn geometry; aldehyde, alkyne and imine protons by class; OH, NH and SH protons with a typical value and a range by kind, always low confidence, drawn as broad singlets.
+- **Signals**: atoms are grouped by symmetry; couplings are first order (vicinal 7.0 Hz, alkene cis 10.5 and trans 16.5 Hz, aromatic ortho 8.0 and meta 2.0 Hz and others) and give labels from d to sept and combinations up to three letters (dd, td, ddt, qd), else m. The simplifications are reported as warnings: diastereotopic CH2 treated as equivalent (`nmr_diastereotopic`), signals closer than three times J (`nmr_second_order`), amide rotamers merged (`nmr_rotamer`), exchangeable protons (`nmr_exchangeable`).
+- **Why**: every signal lists the `terms` that built its shift (the base value and each increment), so a prediction can be explained, not only stated.
+- **Confidence**: each atom is `high` (an environment the rules cover well), `medium` (several heteroatoms on one carbon, small rings, heteroaromatic and fused rings, crowded rings, undrawn alkene geometry, diastereotopic CH2) or `low` (unknown labels, R-groups, metals, B, P, Si, charged or radical atoms, exchangeable protons), with an uncertainty in ppm (1H 0.15, 0.3 or 0.6; 13C 2, 4 or 8).
+- **Spectrum**: Lorentzian lines normalised by area (1 Hz wide, 12 Hz for exchangeable protons), so the integral of a multiplet reads its proton count; 13C intensity by carbon count (NOE and relaxation are not modelled). Default frequencies are 400 MHz for 1H and 100 MHz for 13C.
+
+A predicted spectrum is placed beside its structure, clear of other spectra's labels and inside the page width, as one undo step. It stores only its settings and its multiplets, integrals or peaks linked to the atoms; its title on the page reads, for example, "Predicted ¹H NMR, 400 MHz (FormChem increments 0.9.0)". The curve is recomputed from the structure each time it is drawn; after you change the structure, Refresh Predicted Spectrum moves the links to match, as one undo step.
+
+## Accuracy
+
+`python -m app.services.nmr.accuracy [--calibration|--holdout] [--molecules] [--json]`, run from `backend/`, prints these tables. Exchangeable protons are reported apart.
+
+The holdout set (17 molecules that were never used to tune the rules: p-xylene, 4-nitrotoluene, cyclopentanone, N,N-dimethylacetamide, tert-butyl methyl ether, ethyl benzoate, benzyl alcohol, 1-butanol, pinacolone, 2-picoline, 4-methoxyacetophenone, cyclohexene, diethyl malonate, benzylamine, acetanilide, trans-cinnamic acid, methyl methacrylate) is the fair figure:
+
+| Nucleus | Class | n | MAE (ppm) | Largest error |
+| --- | --- | --- | --- | --- |
+| 1H | all | 58 | 0.092 | 0.51 |
+| 1H | alkene | 5 | 0.082 | 0.21 |
+| 1H | aromatic | 24 | 0.066 | 0.22 |
+| 1H | sp3 | 9 | 0.091 | 0.33 |
+| 1H | sp3 next to a group | 20 | 0.126 | 0.51 |
+| 1H | exchangeable (apart) | 4 | 0.23 | |
+| 13C | all | 80 | 1.12 | 4.4 |
+| 13C | alkene | 5 | 1.72 | 3.5 |
+| 13C | aromatic | 35 | 0.70 | 3.4 |
+| 13C | carbonyl | 9 | 0.68 | 1.3 |
+| 13C | sp3 | 31 | 1.61 | 4.4 |
+
+The calibration set (40 common molecules, from ethanol and ethyl acetate to ibuprofen, aspirin, caffeine and paracetamol) shares parent compounds with the increments, so its figures are optimistic: 1H 0.055 ppm over 119 protons (largest 0.34), 13C 0.63 ppm over 152 carbons (largest 4.6).
+
+What these numbers mean and do not mean:
+
+- The reference shifts are approximate typical values (mostly in CDCl3) written from general knowledge, not taken from a cited data set; they are good to about 0.05 ppm for 1H and 0.5 ppm for 13C. A measured data set with an acceptable licence would give a firmer number.
+- The largest errors are in fused lactam rings (caffeine), ring CH2 protons of cyclic ketones, THF C3, triethylamine's CH2, and allylic carbons in rings, where the ring corrections are crude.
+- Expect larger errors on crowded or unusual structures; each atom's confidence and uncertainty say where to trust less. Predicted values are never measured data.
+
+## Adding a predictor
+
+Prediction runs through a registry (`services/nmr/base.py`). A predictor is any object with `name`, `version`, `method`, `nuclei` and `predict(env, nucleus) -> {site: Shift}`. `REGISTRY.register(predictor)` puts it first; for each site the first predictor that answers wins, and the increments fill the rest. So a data-backed predictor (a HOSE code lookup or a model) can answer what its data knows and leave the rest to the increments, and every signal and atom says which method and version produced it. A predictor that stores its own method name on a spectrum registers a data hook with `app.services.spectra.source.PREDICTORS[method]`, as `services/nmr/source.py` does, and the data, peaks, integrals and export routes then serve its spectra unchanged.
+
+## HTTP API
+
+Every POST needs the window key. Errors are `{"detail": "text"}`, or `{"detail": {"message", "errors"}}` with 409 for a refused transaction.
+
+| Route | What it does |
+| --- | --- |
+| `GET /api/documents/{doc}/spectra/{obj}/data?from=&to=&n=&y_mode=&imag=&baseline=` | the points (at most `n`, default 2000), `kind`, `direction`, `view`, `axis`, `y_mode`, `y_modes`, `frequency` (MHz, NMR), `metadata`, `report`, `method` and `predicted` |
+| `POST /api/documents/{doc}/spectra/{obj}/peaks` | `{from?, to?, max?, prominence?, threshold?, replace?, dry_run?}` picks peaks as one transaction ("Pick Peaks"); `dry_run` answers without changing anything |
+| `POST /api/documents/{doc}/spectra/{obj}/integrals` | `{from, to, value?}`, `{ranges, value?}` or `{id, value}`, one transaction ("Integrate") |
+| `GET /api/documents/{doc}/spectra/{obj}/export?format=&original=&from=&to=` | `format` `jdx` or `csv`; the file, with `x-formchem-filename` and `x-formchem-format` headers |
+| `POST /api/spectra/parse` | `{text}` or `{base64}` answers the blocks with a preview and the report, without a drawing |
+| `GET /api/nmr/predictors` | the method, version, description and registered predictors |
+| `POST /api/nmr/predict` | a fragment, `{doc, object}` or `{smiles}`, with `nucleus` (1H, 13C or both), `frequency`, `predictor?` and `spectrum?`; answers signals, atoms, the journal line and warnings, read only |
+| `POST /api/documents/{id}/nmr/predict-spectrum` | `{object, nucleus, frequency?, x?, y?, w?, h?, name?}` adds the predicted spectrum object as one transaction |
+| `POST /api/documents/{id}/nmr/refresh` | `{object}` (a predicted spectrum) rewrites its links after the structure changed; `changed: false` when nothing moved |
+
+Opening uses the existing document routes (`/api/documents/open`, `/upload`, `/import`); the media route accepts JCAMP-DX text.
+
+## Agent tools
+
+`predict_nmr`, `predict_spectrum`, `open_spectrum`, `spectrum_data`, `spectrum_peaks`, `spectrum_pick_peaks`, `spectrum_integrate` and `spectrum_export`, with their arguments and results in [AGENTS.md](AGENTS.md).
+
+## Known limits
+
+- 2D NMR is not drawn, an FID is shown as acquired (no Fourier transform or phasing), and of a GC-MS file only the first scan is drawn.
+- The reader was checked on a synthetic corpus written for FormChem (every compression form, damaged files, LINK files, NTUPLES); vendor files with quirks beyond the published rules have not been tried.
+- The predictor is first order only, treats diastereotopic protons as equivalent, ignores solvent, concentration and temperature, and does not model NOE in 13C intensities. Its accuracy figures rest on approximate reference values (above).
+- After a structure edit, a predicted spectrum's links move only with Refresh Predicted Spectrum.
+- Predicted spectra are placed inside the page width but not its height.
+- The Analysis panel has no NMR table yet; predictions show on the page, in the Spectrum editor and through the agent tools.
+- 1H multiplet labels can crowd at the default spectrum size.
diff --git a/frontend/HASHOUT_LOG.md b/frontend/HASHOUT_LOG.md
index 866b72e4..cfbbd495 100644
--- a/frontend/HASHOUT_LOG.md
+++ b/frontend/HASHOUT_LOG.md
@@ -1,6 +1,6 @@
# frontend HASHOUT_LOG
-Living log for the FormChem frontend and its desktop shell (src-tauri), _v0.1.0 to _v0.8.0. For 0.1.0 and 0.2.0 it follows the family template (formdeck's window and formvis's title bar), so most reasons there are about what was kept, what was dropped, and why. From 0.3.0 it records the document client, the window's own chemistry, from 0.4.0 the canvas: renderer, tools, view and tool rail, and from 0.5.0 the drawn objects (arrows, symbols, brackets, shapes, tables, TLC, orbitals, images, captions, groups), their tools and handles, the stoichiometry panel, the template library and the Reaction commands, and from 0.6.0 the analysis client, the chemistry marks layer, the stereo, query, R-group and abbreviation commands and dialogs, the structure check panel, the properties section with the isotope plot, Set Reaction Roles, and the Tauri CLI pin, and from 0.7.0 the one-folder engine start, the dark page, scaling on the sheet, the wrapping panel rows, the folding menu row, grids and snapping, picture export, print and the shared save path, the embedded source, the clipboard, the import report, Standardise and the quick command state mirror, and from 0.8.0 the window tools that render, report the selection and show drawings for agents, Agent activity, the editing chip with Stop, the agent marks and the token in the Agents dialog. The code carries almost no comments; the reasons live here, anchored by file and symbol. Read the map and the TOC first.
+Living log for the FormChem frontend and its desktop shell (src-tauri), _v0.1.0 to _v0.10.0. For 0.1.0 and 0.2.0 it follows the family template (formdeck's window and formvis's title bar), so most reasons there are about what was kept, what was dropped, and why. From 0.3.0 it records the document client, the window's own chemistry, from 0.4.0 the canvas: renderer, tools, view and tool rail, and from 0.5.0 the drawn objects (arrows, symbols, brackets, shapes, tables, TLC, orbitals, images, captions, groups), their tools and handles, the stoichiometry panel, the template library and the Reaction commands, and from 0.6.0 the analysis client, the chemistry marks layer, the stereo, query, R-group and abbreviation commands and dialogs, the structure check panel, the properties section with the isotope plot, Set Reaction Roles, and the Tauri CLI pin, and from 0.7.0 the one-folder engine start, the dark page, scaling on the sheet, the wrapping panel rows, the folding menu row, grids and snapping, picture export, print and the shared save path, the embedded source, the clipboard, the import report, Standardise and the quick command state mirror, and from 0.8.0 the window tools that render, report the selection and show drawings for agents, Agent activity, the editing chip with Stop, the agent marks and the token in the Agents dialog, and from 0.9.0 Structure from Name, the Name section, Copy Name and pasting a name, the spectrum object kind with its data cache and page plot, atom links, the Spectrum editor, the spectrum and NMR prediction commands, and from 0.10.0 the 3D View panel over a lazily loaded 3Dmol.js, the model3d page object with its snapshots, measurements, surfaces with ESP, the Conformers and Dihedral Scan dialogs, the glTF writer, structure files in Open and Import, Extract Ligand and Export 3D Structure, and the stale-conformer rule mirrored in the client. The code carries almost no comments; the reasons live here, anchored by file and symbol. Read the map and the TOC first.
## Org navi map
@@ -53,6 +53,23 @@ src/app/ also agent-window.ts (the render, selection and show
src/ui/ also agent-activity.ts (the Agent activity panel), agent-chip.ts (who is editing, with Stop) (0.8.0)
src/canvas/agent-marks.ts the keyed layer that flashes what an agent call changed (0.8.0)
src/styles/ also agent-activity.css (0.8.0)
+src/engine/ also names-api.ts, nmr-api.ts, spectra-api.ts (the only callers of /api/names, /api/nmr and the spectra routes, 0.9.0)
+src/ui/ also name-dialog.ts (Structure from Name, offerName), analysis-name.ts (the Name section),
+ spectrum-panel.ts (the Spectrum editor) (0.9.0)
+src/app/ also name-commands.ts, nmr-commands.ts, spectrum-commands.ts, spectrum-import.ts (0.9.0)
+src/canvas/render/ also spectrum.ts (the spectrum kind and plot specs), spectrum-axes.ts, spectrum-data.ts (the data cache) (0.9.0)
+src/canvas/spectrum-links.ts the atom and peak link store and its overlay layer (0.9.0)
+src/chem/spectrum-ops.ts op builders for peaks, links, view and y mode (0.9.0)
+src/styles/ also names.css, spectrum.css (0.9.0)
+src/engine/ also three-api.ts (the only caller of the 3D routes), stale.ts (the stale-conformer rule) (0.10.0)
+src/ui/ also view3d-lib.ts (lazy 3Dmol.js), view3d-viewer.ts, view3d-panel.ts (the 3D View),
+ view3d-dialogs.ts, scan-plot.ts, structure3d-dialogs.ts (0.10.0)
+src/app/view3d-commands.ts the 3D commands, Insert 3D View, structure files, Extract Ligand, exports (0.10.0)
+src/canvas/render/model3d.ts the model3d page object (0.10.0)
+src/io/glb.ts glTF 2.0 binary writer (0.10.0)
+src/chem/ also elements3d.ts, geom3d.ts, conformer-mol.ts (0.10.0)
+src/types/3dmol.d.ts the shorthand module for 3Dmol's ES build (0.10.0)
+src/styles/ also view3d.css, imported by the panel so it loads with it (0.10.0)
src-tauri/src/ main.rs (windows, chrome), traffic_lights.rs, reveal.rs, engine_start.rs, packaged.rs (0.7.0)
src-tauri/ tauri.conf.json, tauri.macos.conf.json (0.7.0), capabilities, Info.plist, entitlements.plist, flatpak/
assets/ formchem_mark.svg, icon_src/build.py, icon set
@@ -260,6 +277,50 @@ assets/ formchem_mark.svg, icon_src/build.py, icon set
198. Engine messages after a translated prefix are translated too · app.ts errText and the module errText helpers
199. Analysis warnings and Standardise details translate one by one · ui/analysis-properties.ts, ui/standardise-dialog.ts
200. The agent activity stylesheet and the strings of 0.8.0 · styles/agent-activity.css, index.html
+201. names-api is the only caller of the names routes · engine/names-api.ts namesApi
+202. Structure from Name previews live in a dialog of fixed height · ui/name-dialog.ts NameDialog, DEBOUNCE_MS, PX_PER_POINT
+203. The window inserts a name through its own client · ui/name-dialog.ts insertStructureFromName, insertName
+204. A pasted name is offered, not inserted · ui/name-dialog.ts offerName, app/clipboard.ts pasteName
+205. The Name section and Copy Name · ui/analysis-name.ts mountAnalysisName, app/name-commands.ts copyName
+206. A spectrum is an object kind that knows the zoom · canvas/render/objects.ts ObjectCtx.scale, scaled, watch; renderer.ts
+207. Spectrum data is cached by range and points, never stored · canvas/render/spectrum-data.ts SpectrumCache, pointsFor
+208. The plot is keyed groups, and the trace keeps its node · canvas/render/spectrum.ts plotSpecs, canvas/render/spectrum-axes.ts
+209. Peak labels follow the technique · canvas/render/spectrum.ts peakSpecs, multipletSpecs, msAutoLabels
+210. Atom links both ways, in an overlay layer · canvas/spectrum-links.ts SpectrumLinkLayer, spectrumLinks
+211. The Spectrum editor docks beside the canvas and patches its plot · ui/spectrum-panel.ts mountSpectrumPanel
+212. Linking a peak: the selection first, else clicks on atoms · ui/spectrum-panel.ts, chem/spectrum-ops.ts linkOps
+213. The engine picks and integrates; the window commits views and links · engine/spectra-api.ts, chem/spectrum-ops.ts, app/spectrum-commands.ts
+214. Spectrum files come in through Open and Insert · app/spectrum-import.ts, app/documents.ts OPEN_EXTENSIONS, ui/home.ts STRUCTURE_ACCEPT
+215. Exports and copies wait for spectrum data · app/picture.ts spectraReady, canvas/render/spectrum.ts preloadSpectrum
+216. Copy and paste carry spectra · app/clip-data.ts extractClip, pastePlan
+217. The NMR commands find the structure and wait for the new object · app/nmr-commands.ts, engine/nmr-api.ts
+218. Predicted spectra name their method on the page and in the editor · canvas/render/spectrum-axes.ts spectrumTitle, ui/spectrum-panel.ts
+219. Menus and the spectrum context menu · app/menus.ts, canvas/context.ts
+220. The dialog text rule stays off canvas text · styles/dialogs.css p.fc-text
+221. Stylesheets, icons and strings of 0.9.0 · styles/names.css, styles/spectrum.css, index.html, ui/icons.ts
+222. 3Dmol.js loads only when a 3D view opens · ui/view3d-lib.ts load3dmol, types/3dmol.d.ts
+223. One client for every 3D route · engine/three-api.ts threeApi, untilRev, methodLabel
+224. The viewer wraps 3Dmol and maps its camera · ui/view3d-viewer.ts Scene3dViewer, viewToCamera, cameraToView
+225. The molblock route first, a local molfile when it is missing · chem/conformer-mol.ts conformerMolblock
+226. The panel floats over the canvas and patches itself · ui/view3d-panel.ts View3dPanel, styles/view3d.css
+227. Display follows the source; waters stay hidden · ui/view3d-viewer.ts atomStyle
+228. Surfaces, and ESP that says what it is · ui/view3d-panel.ts setSurface, setEsp
+229. Measurements are computed from what is shown · chem/geom3d.ts, ui/view3d-panel.ts measureAtoms
+230. The Conformers and Dihedral Scan dialogs · ui/view3d-dialogs.ts, ui/scan-plot.ts ScanPlot
+231. model3d is a page object like an image · canvas/render/model3d.ts, canvas/tools
+232. A snapshot is written only after the person changes the view · ui/view3d-panel.ts model3dViewOps, WRITE_DELAY_MS
+233. The page keeps the old snapshot until the new one loads · canvas/render/model3d.ts snapshotHref, ui/view3d-panel.ts applyObject
+234. Spin respects reduced motion; the background follows the theme · ui/view3d-panel.ts, ui/view3d-viewer.ts
+235. FormChem writes glTF itself · io/glb.ts writeGlb, sceneMesh, chem/elements3d.ts
+236. PNG of the view, opaque or transparent · ui/view3d-panel.ts export, app/view3d-commands.ts exportView
+237. The 3D commands and menus · app/view3d-commands.ts, app/canvas.ts, app/commands-shell.ts, app/menus.ts
+238. Extract Ligand and Export 3D Structure · app/view3d-commands.ts, ui/structure3d-dialogs.ts
+239. Structure files in Open, Import and the 3D menu · app/documents.ts OPEN_EXTENSIONS, ui/home.ts STRUCTURE_ACCEPT
+240. The window applies the stale-conformer rule to its own edits · engine/stale.ts, engine/client.ts commit, confirm
+241. Copy, paste and Duplicate carry conformers and 3D objects · app/clip-data.ts
+242. Picture exports wait for 3D snapshots · app/picture.ts
+243. 3D strings go to t() as whole sentences · ui/view3d-panel.ts, i18n/keys/part14.json
+244. 3dmol is the one new dependency · package.json, package-lock.json
## 1. Dependencies are the template's, nothing more · _v0.1.0 (package.json)
@@ -1061,6 +1122,182 @@ A joined sentence of several warnings has no key, so it never translated. The An
agent-activity.css (linked in index.html after standardise.css) styles the panel, the chip, the stage edge and the marks from tokens only (`--z-local-5` for the panel, accent mixes for the chip and the edge) with one `prefers-reduced-motion` block. No icon was missing: `agent`, `close`, `undo`, `stop` and `history` existed. The chip and panel strings use the named placeholders `{agent}`, `{tool}`, `{n}` and `{total}`, replaced after `t()`, so their keys keep the names as written; `./formchem i18n scan` does not see them and they are listed in the integration notes for the keys. The undo labels of agent calls (Draw from SMILES, Add atom and the rest) come from the engine and show in Edit > Undo.
+## 201. names-api is the only caller of the names routes · _v0.9.0 (engine/names-api.ts namesApi, NAMES, StructureFromName, NamesOfStructure, NameItem, confidence, notes)
+
+As with reactions-api and analysis-api, one module owns the shapes of `/api/names/to-structure`, `/to-name`, `/engines` and the insert route, and normalises what comes back (unknown confidence values read as `none`, missing notes as an empty list), so the dialog, the Name section, Copy Name and the paste path never parse engine JSON themselves. `insert` exists for completeness; the window's own inserts go through its client (entry 203).
+
+## 202. Structure from Name previews live in a dialog of fixed height · _v0.9.0 (ui/name-dialog.ts NameDialog, nameDialog, resolveName, confidenceLabel, methodLabel, engineLabel, DEBOUNCE_MS, PX_PER_POINT; styles/names.css)
+
+The dialog resolves the name 220 ms after typing pauses (requests that come back out of order are dropped) and shows the preview, the formula, the confidence, the method and "FormChem names 0.9.0", the notes (what was assumed) or the refusal with the unread part marked. The preview reuses the template library's SVG thumbnail renderer (`templateThumb`, `thumbBounds`) instead of mounting a canvas, scaled by the fragment's own bounds at 2.6 px per point and capped by the box, so a small molecule is not blown up and a large one fits. The message area is reserved, so the dialog stays 504 px tall through every state (measured): the empty prompt, a preview, a refusal and the medium-confidence note do not move the buttons. Method and confidence labels are translated through `t()`; the engine's note and refusal texts are passed through `t()` too, with their English as the key.
+
+## 203. The window inserts a name through its own client · _v0.9.0 (ui/name-dialog.ts insertStructureFromName, insertName; ui/template-dialog.ts placeTemplateOps, TemplateHooks)
+
+The resolved fragment is placed with `placeTemplateOps` and the same hooks object Insert Template uses, so selection and placement match Insert Template exactly, and the change is one undo step labelled "Insert Structure from Name: [name]". The engine's insert route (with the 0.8.0 agent placement in free space) is for agents and other clients; the window wants the person's view, not free space somewhere on the page.
+
+## 204. A pasted name is offered, not inserted · _v0.9.0 (ui/name-dialog.ts offerName; app/clipboard.ts ClipboardDeps.pasteName, pasteFlavours; app/clip-formats.ts looksLikeName; app.ts)
+
+Spec 16.3 asks for a one-line confirmation before a pasted name becomes a structure, because a pasted word that happens to be a name ("caffeine" in a sentence) should not silently turn into a drawing. `offerName` resolves the text first; when it reads, it opens Structure from Name pre-filled with the preview, confidence and method, and Enter draws it as one undo step; when it does not, it answers false and the text pastes as text with the short note. The 0.8.0 toast that said names were not read yet left the code; its locale entries can go.
+
+## 205. The Name section and Copy Name · _v0.9.0 (ui/analysis-name.ts mountAnalysisName, NameSection, nameSource, nameTitle, currentNameSection, DEBOUNCE_MS; ui/analysis-panel.ts; app/name-commands.ts registerNameCommands, nameCommandDefs, copyName, namedFragments)
+
+The section is mounted once above Properties and patched with `patchList` per name row (Common name, Systematic, each with its method label), debounced 160 ms behind the selection, with its pending state on the existing nodes, so opening the panel or changing the selection removes no node (checked with a MutationObserver). A structure the namer refuses shows the engine's reason instead of a blank. `copy-name` (Edit > Copy Name) copies the first name (`kind` trivial or systematic picks one), and every copied name was checked to read back to the same InChIKey for aspirin, isobutanol, benzoic acid and cholesterol. `insert-name` replaced the 0.9.0 placeholder in commands-shell.ts, since the registry throws on a duplicate id.
+
+## 206. A spectrum is an object kind that knows the zoom · _v0.9.0 (canvas/render/objects.ts ObjectCtx.scale, ObjectKindDef.scaled, watch; canvas/render/renderer.ts setViewport; canvas/render/spectrum.ts spectrumKind)
+
+Every other object kind draws the same at any zoom, so the renderer never told kinds the zoom. A spectrum must ask for finer data when the person zooms in, so the context gained `scale` (a power-of-two bucket, 2 to the power of round(log2(zoom x device pixel ratio))), kinds can declare `scaled` (re-render when the bucket changes, not on every wheel tick) and `watch` (a subscription the renderer holds for the kind and drops on destroy; spectra subscribe to their data cache). The bucket keeps wheel zoom to one re-request per doubling. `docCtx` (bounds and hit testing) has no scale, so those paths read the cache and never request.
+
+## 207. Spectrum data is cached by range and points, never stored · _v0.9.0 (canvas/render/spectrum-data.ts SpectrumCache, spectrumCache, pointsFor, sourceSig, shown, otherModes, MIN_POINTS, MAX_POINTS, MAX_ENTRIES)
+
+Points come from the engine's data route and are never written to the document (FORMAT.md). The cache key is the drawing, the object, a signature of its source, the y mode, the range and the points bucket (the plot width times the scale, 64 to 8192); 96 entries are kept. While a finer request is in flight the best cached resolution is drawn, and one `epoch` bump per settle (microtask-batched) re-renders. At integration a y-mode toggle or an edit of the structure behind a predicted spectrum still changed the key and drew "Loading spectrum" for a moment; the cache now keeps the last points per object and y mode as a fallback (`shown`) and fetches the other y mode ahead (`otherModes`), so neither adds a status node and the trace keeps its node.
+
+## 208. The plot is keyed groups, and the trace keeps its node · _v0.9.0 (canvas/render/spectrum.ts plotSpecs, pagePaint, wantFor, tracePath; canvas/render/spectrum-axes.ts frameOf, ticks, niceStep, decreasingX, defaultX, xTitle, yTitle)
+
+A spectrum renders as `g.fc-spec-axes`, a clip path, `g.fc-spec-traces` (overlays, then the main trace, one path each), `g.fc-spec-ann` and `g.fc-spec-status`, so when finer data arrives only the trace path's `d` changes (checked: the same node before and after a canvas zoom, `d` from 7586 to 60588 characters). `plotSpecs` is shared by the page and the editor, so both draw the same plot. Ticks are nice steps (1, 2, 2.5, 5 times a power of ten); the default direction per technique (IR, Raman and NMR decreasing, UV-Vis and MS increasing) is only a fallback, because the engine's `view.x_from` already says which value is at the left. Axis titles prefer the engine's labels and show cm-1 as cm⁻¹. The axes group is patched by position, not by key: a y-mode toggle re-creates the tick labels, tick path and title in one frame; not visible, but not keyed either (known).
+
+## 209. Peak labels follow the technique · _v0.9.0 (canvas/render/spectrum.ts peakSpecs, integralSpecs, integralCurve, multipletSpecs, msAutoLabels, rotated, MS_LABELS)
+
+NMR peak and multiplet labels sit in a top row with kinked leaders, as journals print them, because NMR lines crowd; IR labels in transmittance hang under the dips, since bands point down; an MS spectrum without picked peaks labels its 8 strongest sticks that do not collide. Integral curves are cumulative sums over the decimated points in the range, for display only; the values shown are the engine's. Labels use the class `fc-spec-text`, not `fc-text` (entry 220). At the default 360 by 187 pt size, 1H multiplet labels can touch (known).
+
+## 210. Atom links both ways, in an overlay layer · _v0.9.0 (canvas/spectrum-links.ts spectrumLinks, LinkStore, SpectrumLinkLayer, mountSpectrumLinks, focusForAtom, focusForMark, marksOf, pageSpectra, PAD_PT)
+
+Hovering an atom lights every peak, integral and multiplet linked to it in every spectrum on the page; hovering a mark's label on the page or a row in the editor rings its atoms. The highlights live in their own document layer (`fc-spec-links`), not in the object specs, so they never reach exports or the object renderer's keys, and the store holds only the focused marks and atoms and the atoms pending a link. A mark links to atoms of one structure (`{object, atoms}`), as FORMAT.md defines.
+
+## 211. The Spectrum editor docks beside the canvas and patches its plot · _v0.9.0 (ui/spectrum-panel.ts mountSpectrumPanel, openSpectrumEditor, closeSpectrumEditor, setSpectrumEditorMode, spectrumEditorTarget, spectrumEditorRange, MODES, PEAK_SNAP_PX, IDLE_MS; canvas/tools/select.ts OBJECT_OPEN_EVENT)
+
+The editor is a third workspace column built once, with its own plot from `plotSpecs` in `currentColor` so it follows the UI theme (the page plot follows the dark page filter like structures). Double-clicking a spectrum on the canvas dispatches `formchem:object-open`, which the editor listens for, so the select tool knows nothing about spectra. Modes: wheel zoom on x, drag to pan, Shift-drag or the box tool to zoom, double-click or Fit to reset, pick peaks over a dragged range, click to add a peak (snapping to the local extremum within 8 px) or a label to remove it, integrate a dragged range (NMR), type an integral's value. "Show this range on the page" commits `view.x_from` and `x_to`, or clears them at the full range. Opening it removes no node from the workspace (checked), and the plot's trace node is kept through zoom and pan.
+
+## 212. Linking a peak: the selection first, else clicks on atoms · _v0.9.0 (ui/spectrum-panel.ts link mode; chem/spectrum-ops.ts linkOps, removeMarkOps, marksLinkedTo, findMark)
+
+Link to Atoms links at once when the selected atoms lie in one structure, which is the quick path. Otherwise the editor waits for clicks on atoms in the drawing: they are captured before the active tool sees them, toggle with dashed rings, and Done or Enter commits one transaction ("Link Peak to Atoms"), Esc cancels. Capturing before the tool means a click to link never draws a bond by accident.
+
+## 213. The engine picks and integrates; the window commits views and links · _v0.9.0 (engine/spectra-api.ts spectraApi, readSpectrumData, sourceDoc, editOf; chem/spectrum-ops.ts addPeakOps, viewOps, yModeOps, setList; app/spectrum-commands.ts registerSpectrumCommands, SPECTRUM_COMMAND_IDS)
+
+Peak picking and integration need the full-resolution points, which only the engine holds, so `pick-peaks` and `integrate` call the routes and the engine applies the transaction (one undo step, sent with `client` so the window recognises its own change); a hand-placed peak, links, the view range and the y mode are plain document edits the window commits itself. During development a local stub (`engine/spectra-stub.ts`, behind a localStorage switch) stood in for the routes; at integration it was deleted with its branches in spectra-api.ts and the op builders only it used (`pickedPeakOps`, `integralScale`, `addIntegralOps`, `integralValueOps`). Every spectrum command takes `object` and otherwise uses the selected spectrum, then the one open in the editor, then the only spectrum on the page.
+
+## 214. Spectrum files come in through Open and Insert · _v0.9.0 (app/spectrum-import.ts importSpectrumFile, SPECTRUM_EXTENSIONS; app/documents.ts OPEN_EXTENSIONS; ui/home.ts STRUCTURE_ACCEPT)
+
+File > Open needs nothing new: the engine opens `.jdx`, `.dx` and `.jcamp` by extension. But the desktop Open dialog's filter listed no spectrum type at all and Home's accept list lacked `.jcamp`, so both gained them. Insert > Spectrum from File (`open-spectrum`) runs `/api/documents/import` (upload in the browser, a path from the desktop dialog) and then the clipboard's insert path, like File > Import, so the media data URL is uploaded and the paste plan remaps the ids.
+
+## 215. Exports and copies wait for spectrum data · _v0.9.0 (app/picture.ts spectraReady, pictureSvg; canvas/render/spectrum.ts preloadSpectrum; engine/spectra-api.ts sourceDoc)
+
+The off-screen export renderer draws synchronously, but spectrum points arrive asynchronously, so `spectraReady` preloads every spectrum at the export scale (with a time limit) and then sets the renderer's viewport at that scale, so the cache hit is exact and the exported SVG or PNG carries the trace. Copy as picture and selection exports render a subset document with its own id; `sourceDoc` asks `meta.embedded.from` or `meta.clipboard.from` first so the engine finds the object (object ids are unchanged in those subsets).
+
+## 216. Copy and paste carry spectra · _v0.9.0 (app/clip-data.ts extractClip, pastePlan)
+
+Copying a measured spectrum carries its media entry like an image. Pasting remaps `source.media`, a predicted source's fragment, and every peak, integral and multiplet atom link to the pasted ids, and gives the marks fresh `k` ids, because FORMAT.md puts them in the document's id space and pasting into the same drawing would otherwise duplicate them. The jcamp and specview branches made the same change; the integration kept one, the one with fresh mark ids.
+
+## 217. The NMR commands find the structure and wait for the new object · _v0.9.0 (app/nmr-commands.ts registerNmrCommands, structureOf, predictedOf, arrived, ARRIVE_MS; engine/nmr-api.ts nmrApi)
+
+`predict-nmr-1h`, `predict-nmr-13c` and `nmr-refresh` (Analysis menu; refresh also on a predicted spectrum's context menu) post to the engine's document routes, which apply the transaction. The structure is the `object` parameter, else the fragments of the selection (a selected predicted spectrum stands for its own fragment, so predicting 13C right after 1H still works), else the only fragment on the page; with two structures and none selected the commands are off. After the engine applies the change the command waits up to 3 s for the object to reach the mirror, then selects and reveals it, and toasts the method and version. Refresh says so when nothing changed.
+
+## 218. Predicted spectra name their method on the page and in the editor · _v0.9.0 (canvas/render/spectrum-axes.ts spectrumTitle, nucleusText; ui/spectrum-panel.ts)
+
+Every computed number the person sees shows its method and version (turn brief). The page title of a predicted spectrum reads "Predicted ¹H NMR, 400 MHz (FormChem increments 0.9.0)", and the editor header "1H NMR · Predicted · FormChem increments 0.9.0 · 400 MHz", also as its tooltip; a predicted overlay over a measured spectrum is drawn in its own colour with a legend row.
+
+## 219. Menus and the spectrum context menu · _v0.9.0 (app/menus.ts SPECTRUM; canvas/context.ts)
+
+Edit gains Copy Name after Copy As; Insert gains Structure from Name after Structure from SMILES and, last, Spectrum from File; Analysis gains Predict 1H NMR Spectrum, Predict 13C NMR Spectrum and Refresh Predicted Spectrum, and a Spectrum submenu (Edit Spectrum; Pick Peaks, Integrate; Link Peak to Atoms, Unlink Peak; Transmittance or Absorbance, Export Spectrum). Right-clicking a spectrum puts the commands that apply to it above the selection items: Integrate for NMR, the y-mode toggle for IR, Raman and UV-Vis, Refresh for a predicted one. No 0.9.0 placeholder is left in commands-shell.ts; the 0.10.0 ones stay.
+
+## 220. The dialog text rule stays off canvas text · _v0.9.0 (styles/dialogs.css p.fc-text)
+
+`.fc-text { font-size: var(--fc-13) }` in dialogs.css also matched SVG text with the class `fc-text` on the canvas (the default class of `label()`, TLC Rf and lane labels, captions) and overrode their font-size attribute on screen; exports were fine because classes are stripped there. Every HTML user is a `p.fc-text` (updates, the help dialogs), so the rule became `p.fc-text` (and `p.fc-text a`, `p.fc-text .fc-key`); `.fc-canvas .fc-text` in canvas.css is untouched.
+
+## 221. Stylesheets, icons and strings of 0.9.0 · _v0.9.0 (styles/names.css, styles/spectrum.css; index.html; ui/icons.ts spectrum, peakPick, integral, boxZoom)
+
+names.css (after templates.css) and spectrum.css (after stoich.css) use tokens only. Four icons were added, `spectrum`, `peakPick`, `integral` and `boxZoom`; the rest (hand, add, zoomFit, fitView, download, link, unlink, delete, close) existed. New window strings are listed per file in the integration notes for the keys; the axis titles, "Predicted", "Loading spectrum" and "Spectrum unavailable:" are drawn into the drawing and, like other drawing labels, are not translated. The engine's NMR and spectra warning and error texts are English sources passed through `t()`.
+
+## 222. 3Dmol.js loads only when a 3D view opens · _v0.10.0 (ui/view3d-lib.ts load3dmol, webglAvailable, Lib3d, Viewer3d, Model3d, Atom3d; types/3dmol.d.ts)
+
+The startup budget does not allow 581 kB of viewer for people who never open 3D. `load3dmol` imports `3dmol/build/3Dmol.es6-min.js` dynamically, so Vite gives it its own chunk, and the panel with its stylesheet is a second lazy chunk; the startup chunk grew by about 26 kB (the commands, `three-api.ts`, the model3d renderer). The package ships types for its main entry, not for the ES path, so `types/3dmol.d.ts` declares that path as a shorthand module and `view3d-lib.ts` casts it to a small typed interface of what FormChem calls; tsc passes with and without the package installed. `webglAvailable` is checked before loading, and the panel says "3D needs WebGL" instead of failing. Vite warns about a direct `eval` inside 3Dmol (its string callbacks, which FormChem never passes); `csp` is null in tauri.conf.json, so nothing breaks.
+
+## 223. One client for every 3D route · _v0.10.0 (engine/three-api.ts threeApi, untilRev, methodLabel, FORCE_FIELDS, BuildAnswer, ConformersAnswer, MinimiseAnswer, ScanAnswer, ChargesAnswer, MolblockAnswer, StructureSummary, OpenAnswer, LigandAnswer, FileAnswer)
+
+As with names, NMR and spectra, one module calls the engine's 3D routes (build, conformers, active, minimise, scan, measure, charges, molblock, structure, parse, open, extract-ligand, the file export and media text), with typed answers. The engine commits its own transaction and answers with `rev`; `untilRev(client, rev)` waits until that revision reaches the window's mirror over the live channel (4 s at most), so the panel redraws from the document, never from the answer, and an undo right after a build undoes the build. `methodLabel` joins method and engine version for every number the panel shows.
+
+## 224. The viewer wraps 3Dmol and maps its camera · _v0.10.0 (ui/view3d-viewer.ts Scene3dViewer, Source3d, BlockRef, Surface3d, Mark3d, Camera3d, ViewerHooks, viewToCamera, cameraToView)
+
+`Scene3dViewer` is the only code that touches 3Dmol: models from a molblock (with the atom map) or from PDB and mmCIF text (3Dmol's own `pdb` and `mcif` parsers for display), styles, surfaces, labels, picking by atom index, PNG capture and the scene for glTF. FORMAT.md asks for the camera as a 4 by 4 matrix plus zoom. 3Dmol's view is `[p.x, p.y, p.z, rz, q.x, q.y, q.z, q.w]` (model translation, camera distance, rotation quaternion), so `camera.matrix` is R(q) times T(p) in column order and `camera.zoom` is `rz`, the camera distance in ångström (larger is further, not a scale factor). The round trip is lossless; the integration wrote that meaning into FORMAT.md.
+
+## 225. The molblock route first, a local molfile when it is missing · _v0.10.0 (chem/conformer-mol.ts conformerMolblock, activeConformer, LocalBlock; engine/three-api.ts molblock)
+
+The panel shows a structure from `GET .../3d/molblock?format=mol` with its atom map. When the route answers 404 or 405 or the network fails, `conformerMolblock` writes the same V2000 block from document.json (atom ids identical, hydrogens `a1:h0`), so a drawing opened by an older engine or a disconnected window still shows its stored conformers. Picking the shown conformer uses `POST .../3d/active` and falls back to a local `set` commit the same way.
+
+## 226. The panel floats over the canvas and patches itself · _v0.10.0 (ui/view3d-panel.ts View3dPanel, view3dPanel, isView3dOpen, View3dHost, View3dTarget, markup, open, close, bind, followSelection, queueSync, paintControls, paintConformers, paintMarks; styles/view3d.css)
+
+The panel renders into `#overlay-root` at `--z-companion`, with a draggable header and CSS resize, so it sits over the drawing without taking canvas width (the Spectrum editor docks instead, because it works on the page's own plot). The markup is built once; selection changes rebind the viewer and patch the controls, the conformer list (keyed rows) and the measurement list, and the stage reserves its size so loading the viewer never moves the panel. With nothing to show it says why ("No 3D coordinates yet: Build 3D makes a conformer from the drawing."). It follows the selection unless bound to a model3d object; double-clicking one binds to it. The status line names the method and version after each run.
+
+## 227. Display follows the source; waters stay hidden · _v0.10.0 (ui/view3d-viewer.ts atomStyle; ui/view3d-panel.ts setDisplay, DISPLAYS)
+
+PDB and mmCIF models default to cartoon for the polymer, with ligands (hetero residues that are not water) as ball and stick with green carbons, so the ligand stands out from the protein; waters (HOH, WAT, DOD, H2O, TIP, TIP3, SOL) are hidden in every style and left out of glTF, because a few hundred red dots hide the binding site. Cartoon is disabled for a small molecule, which has no backbone to draw. Element colours come from `elements3d.ts`, shared with the glTF writer.
+
+## 228. Surfaces, and ESP that says what it is · _v0.10.0 (ui/view3d-panel.ts setSurface, setEsp, SURFACES, SURFACE_OPACITY; engine/three-api.ts charges)
+
+Van der Waals, solvent accessible and solvent excluded surfaces are 3Dmol's, at 0.72 opacity. ESP asks the engine for Gasteiger charges, maps them onto the block atoms (hydrogens from `h`), and colours the surface red (negative) to blue (positive) symmetric about zero; the legend names the route's label ("approximate, from empirical charges"), the method, the engine version and the range. ESP is off for PDB and mmCIF sources, because the charges route takes fragments. In the ES build `$3Dmol.SurfaceWorker` is undefined, so surfaces are computed on the main thread: instant for small molecules, a pause on a large protein.
+
+## 229. Measurements are computed from what is shown · _v0.10.0 (chem/geom3d.ts distance, angle, dihedral, measure, formatMeasure, kindFor, MEASURE_ATOMS; ui/view3d-panel.ts pick, measureAtoms, marksNow, removeMark, setMeasure)
+
+Picking atoms measures in the window with the engine's formulas (distance 3 decimals, angle and IUPAC-signed dihedral 1 decimal), so no round trip is needed and the numbers match `measure_3d`. Atoms are stored by block id (fragment atom id, `a1:h0`) or PDB serial as a string, as FORMAT.md says. On a bound model3d the measurements persist as its `labels`; on an unbound fragment they live in the panel for the session, because a fragment has no place for them in the format.
+
+## 230. The Conformers and Dihedral Scan dialogs · _v0.10.0 (ui/view3d-dialogs.ts askConformers, openScan, scanKeepsConformers, ScanHost, ConformerAsk, ScanAsk; ui/scan-plot.ts ScanPlot)
+
+Conformers asks for the count, the energy window and the force field, with a note that the ensemble is ETKDG with RMSD pruning. Dihedral Scan uses the four picked atoms, else the last dihedral measurement, and takes from, to and step; "Keep each point as a conformer (one undo step)" sends `store: true`, and then clicking a plot point shows that conformer. `ScanPlot` is a keyed SVG: axes, the curve and the minimum marker are patched in place as points arrive, so the plot never blinks between runs.
+
+## 231. model3d is a page object like an image · _v0.10.0 (canvas/render/model3d.ts model3dKind, model3dView, model3dDeps, placeholder; canvas/render/objects.ts; canvas/tools/transform.ts, scale.ts, common.ts, handles.ts)
+
+On the page a model3d is its snapshot PNG, drawn as an `image` (class `fc-model3d-snapshot`), or a dashed box with a cube and "3D" while it has none. It moves, resizes and scales with the image code paths (corner handles, the scale tool), which is why the four tool files changed by a line or two each. The dark page "undarks" it as it does pictures, so the 3D colours read the same in both.
+
+## 232. A snapshot is written only after the person changes the view · _v0.10.0 (ui/view3d-panel.ts viewChanged, scheduleWrite, flushWrite, model3dViewOps, ViewState, WRITE_DELAY_MS)
+
+Write-back happens after the person turns or zooms the viewer (pointer or wheel on it), changes the display, surface or measurements, or when a bound object has no snapshot yet; never on a programmatic redraw, and never while spinning (stopping the spin writes once). After 700 ms of quiet the panel captures a transparent PNG trimmed to the drawn pixels with 6 percent padding, uploads it through `POST .../media`, preloads it, and commits one transaction setting `media[id]`, `snapshot`, `camera`, `display`, `surface` and `labels`, removing the previous snapshot's media entry unless another object uses it. `coalesce: model3d-view:` folds a burst of turns into one undo step. Exports, print and thumbnails then need no 3D renderer.
+
+## 233. The page keeps the old snapshot until the new one loads · _v0.10.0 (canvas/render/model3d.ts snapshotHref, shown; ui/view3d-panel.ts applyObject)
+
+`snapshotHref` remembers the last href shown per object, and while the new media is still loading the old one stays, so the page never shows the placeholder between two pictures. At integration a menu style command reopened the panel and its queued sync re-applied the stored `display` before the write-back, so the written snapshot kept the old style; `applyObject` now leaves display and surface alone while a write is pending or running. The integration's MutationObserver then saw the one image's href change twice, straight from the old media URL to the new one, with no placeholder, no removed image and no empty href.
+
+## 234. Spin respects reduced motion; the background follows the theme · _v0.10.0 (ui/view3d-panel.ts setSpin, REDUCED; ui/view3d-viewer.ts)
+
+Spin is disabled with a title that says why when `prefers-reduced-motion: reduce`, and turning reduced motion on stops a running spin. The viewer's background is the panel stage's computed colour (the theme surface), updated by a MutationObserver on the root element when the theme changes. Computed colours from `color-mix` arrive as `color(srgb r g b)` with channels from 0 to 1, which the parser handles alongside `rgb()`.
+
+## 235. FormChem writes glTF itself · _v0.10.0 (io/glb.ts writeGlb, sceneMesh, srgbToLinear, Scene3d, SceneAtom, SceneBond, GlbOptions; chem/elements3d.ts colour3d, rgb3d, vdwRadius, ELEMENT_COLOURS_3D)
+
+3Dmol has no glTF export, and a converter library would be a dependency for 215 lines. `writeGlb` builds one mesh with one primitive (POSITION, NORMAL, COLOR_0 as linear float RGB from the sRGB palette, uint32 indices), an unlit-looking PBR material (metallic 0, roughness 0.55), centred on the atom centroid, 1 Å = 1 cm (scale 0.01 m), which suits slides and 3D printing. Radii follow the display (space filling: van der Waals; ball and stick: 0.24 of van der Waals and 0.1 bonds; stick 0.14; wire 0.05); double and triple bonds are thinner parallel cylinders in the plane of a neighbour. Surfaces and cartoons are not exported. The file passed the Khronos glTF Validator with 0 errors and 0 warnings.
+
+## 236. PNG of the view, opaque or transparent · _v0.10.0 (ui/view3d-panel.ts png, scene, title, toggleMenu; app/view3d-commands.ts exportView)
+
+Export the 3D View offers PNG, PNG with a transparent background, and glTF; the PNG is the viewer's canvas at its on-screen size. Files go through the shared `saveFile` (desktop save dialog or browser download), named after the structure.
+
+## 237. The 3D commands and menus · _v0.10.0 (app/view3d-commands.ts registerView3dCommands, VIEW3D_COMMAND_IDS, VIEW3D_MENU, show, insertView, openStructure; app/canvas.ts; app/commands-shell.ts; app/menus.ts DISPLAY_3D, SURFACE_3D)
+
+22 commands in group 3D: `view-3d` (`Mod+3`, checked while open), `insert-3d-view`, `open-3d-structure`, `extract-ligand`, `build-3d`, `minimize-3d`, `conformers` (params `n`, `window`, `method`; no params opens the dialog), `dihedral-scan`, `measure-3d` (param `atoms`), five `style-` and five `surface-` commands, `export-3d-png` (param `transparent`), `export-gltf` and `export-3d-file`. The four reserved placeholders (`view-3d`, `build-3d`, `minimize-3d`, `conformers`) were deleted from commands-shell.ts, since the shell registers after the canvas and a duplicate id throws; `registerView3dCommands` also unregisters a placeholder it finds, for the other order. Engine3d's proposed `scan-3d`, `open-3d-file` and `export-3d` were not used: `dihedral-scan`, `open-3d-structure` and `export-3d-file` cover them. The 3D menu holds them all with Display and Surface submenus; Insert gains Insert 3D View and 3D Structure File..., File > Export gains Export 3D Structure....
+
+## 238. Extract Ligand and Export 3D Structure · _v0.10.0 (app/view3d-commands.ts extractLigand, exportFile, fileModel, FILE_MIME, FILE_KIND; ui/structure3d-dialogs.ts askFile3d, askLigand, File3dAsk)
+
+Extract Ligand works on the selected model3d, else the one the panel is bound to, and only on PDB or mmCIF sources. Without a `ligand` param it reads `GET .../3d/structure`: one ligand is taken at once, several open the Ligand dialog with `focus.residue` preselected. The fragment lands right of the model (x + w + 24 pt) and is selected; the toast gives the SMILES and "bond orders inferred" when the engine perceived them. Export 3D Structure uses the molblock route with `as=json`, so the text goes through `saveFile` like every other export; without `format` it opens a dialog (SDF preselected with several conformers, with Every conformer for SD records, PDB models and XYZ frames). A selected structure wins over the panel's PDB model; a selected PDB or mmCIF model saves its original bytes.
+
+## 239. Structure files in Open, Import and the 3D menu · _v0.10.0 (app/documents.ts OPEN_EXTENSIONS; ui/home.ts STRUCTURE_ACCEPT; app/view3d-commands.ts openStructure)
+
+`.pdb`, `.ent`, `.cif` and `.mmcif` joined the Open dialogs and Home's accept list; the engine decides what a file becomes. 3D Structure File... asks for a PDB, mmCIF, SDF or MOL file and sends it to `POST .../3d/open` with `place`, then shows it in the panel. Import of a PDB inserts through the clipboard path with the bytes as a data URI, which needed the media route to take structure files (backend log). The desktop file associations (tauri.conf.json) were left alone: bundle config.
+
+## 240. The window applies the stale-conformer rule to its own edits · _v0.10.0 (engine/stale.ts graphSignature, watchConformers, staleConformerOps, isConformerDrop; engine/client.ts commit, confirm)
+
+The engine appends conformer drops to transactions that change a graph, but `confirm()` applied the window's own ops on the echo, so the mirror kept stale conformers until a resync. Two fixes, both in: `stale.ts` mirrors `three_d/stale.py` field for field, and `client.commit` appends the `conformers` and `conformer` unsets to the window's own transaction before sending, so the engine trusts it and both sides agree at once; and `confirm()` takes the engine's echoed transaction and applies a trailing tail of conformer drops it did not send (only when every extra op is such a drop), emitting a rebase so the canvas and the panel see it. Add Explicit Hydrogens after a build sends one live frame with the unsets; Undo restores the conformers and the panel shows the model again.
+
+## 241. Copy, paste and Duplicate carry conformers and 3D objects · _v0.10.0 (app/clip-data.ts extractClip, pastePlan)
+
+Paste and Duplicate give atoms new ids, so a conformer's `coords`, `h`, `expanded` and `scan` atoms are re-keyed to the new ids, and a model3d bound to a copied fragment is bound to the copy. A model3d over a PDB file carries its media, so it pastes into another drawing with its file.
+
+## 242. Picture exports wait for 3D snapshots · _v0.10.0 (app/picture.ts)
+
+The export preload, which waited for image media, now also waits for each model3d's `snapshot`, so a PNG, SVG or PDF of a page with a 3D object never has an empty frame.
+
+## 243. 3D strings go to t() as whole sentences · _v0.10.0 (ui/view3d-panel.ts, ui/view3d-dialogs.ts, ui/scan-plot.ts, ui/structure3d-dialogs.ts, app/view3d-commands.ts; i18n/keys/part14.json)
+
+The keying step turned status lines and hints built from pieces (`Picked`, `Click`, `of`, `red`, `to blue`, `Extracted`) into whole templates passed to `t()` (`Picked {0} / {1}: {2}`, `ESP ({0}): {1}, red {2} e to blue +{3} e`, `Distance {0}: {1}`, `{0} conformers kept of {1}`, `Extracted {0}: {1} (bond orders inferred)`), wrote the five style descriptions out instead of lower-casing the label, and passes every engine warning through `t()` before joining a status line with ` · `, so a pattern key with a leading `{0}` cannot swallow untranslated parts. part14 holds 142 window strings, part15 66 engine texts. No new icons: `model3d`, `magic`, `layers`, `chartLine`, `orbit`, `ruler`, `search`, `fitView` and `download` existed.
+
+## 244. 3dmol is the one new dependency · _v0.10.0 (package.json, package-lock.json)
+
+`3dmol` 3.0.0 (BSD-3-Clause) with `pako` 2.2.0 and 1.0.11 (MIT AND Zlib), `upng-js` 2.1.0, `iobuffer` 5.4.0 and `netcdfjs` 3.0.0 (MIT); only `build/3Dmol.es6-min.js` ships (581 kB, 170 kB gzip). Its engines field asks for Node 24 and npm prints EBADENGINE on Node 22, a warning only. 2.5.5 was the fallback and was not needed. Installing in a worktree replaced the shared `node_modules` symlink with a real folder; the integration copied the five new packages into the shared tree, removed the folder and restored the link, so `npm ci` after merging the lock gives the same tree.
+
## Not verified at 0.4.0
The lasso tool in the real window (its band path is the marquee's), touch pinch and Safari gesture events, the Tauri webview (dialogs, native accelerators, `contenteditable="plaintext-only"` in older WebKit), light themes, the rotate handle on dark pages, extensions against a real package, and socket drop with resync during an edit. The title field collapses to a sliver at 1280 px wide because the menu bar takes the room; it predates this work.
@@ -1080,3 +1317,11 @@ No macOS build was made, so none of the macOS paths ran: the one-folder engine i
## Not verified at 0.8.0
The desktop window was not run: the chip in the macOS overlay title bar, a `render` answered by a minimised or hidden WKWebView (the setTimeout path was chosen for it, untried), and WebKitGTK beyond `cargo check`. The agent UI strings were checked in English only; the errText path was checked in German with the 0.7.0 keys. Windows WebView2 was not run. Entries 187 to 200 were exercised in the built window in headless Chromium under 4x CPU throttling (the aspirin and acetic acid runs, Stop and Allow again, undo from the panel, the flashes into a new drawing), with no console errors and no live container rebuilt.
+
+## Not verified at 0.9.0
+
+The desktop window was not run: the Tauri file dialog of Insert > Spectrum from File and of File > Open with the spectrum filter, the native menus with Copy Name, Structure from Name, the predict commands and the Spectrum submenu, the export-spectrum download in WKWebView, and pasting a name from the system clipboard there. Copy as picture of a spectrum and Export Spectrum as a browser download were not exercised; multiplet labels were seen only on predicted spectra. The new strings were checked in English only; the translations land separately. Windows WebView2 and Firefox were not run. Entries 201 to 221 were exercised in the built window served by the engine in headless Chromium under 4x CPU throttling (ten names drawn and their InChIKeys compared, the Name section and Copy Name round trip, a pasted name, two IR files opened, predicted 1H and 13C of ethyl acetate with hover links both ways, a structure edit and Refresh, the y-mode toggle, the editor's zoom, peaks, integrals and links), with no console errors and a MutationObserver showing no live container rebuilt.
+
+## Not verified at 0.10.0
+
+The desktop window was not run: the save dialogs of Export 3D View as PNG and glTF and Export 3D Structure (only the browser download ran; `SUFFIXES` in routers/files.py lacked `.glb`, `.cif`, `.mmcif` and `.ent`, found by reading the code and added before the release, so those desktop saves should now pass), WebGL in WKWebView and WebKitGTK, the native 3D menu, and Open of `.pdb` and `.cif` from the Finder (the file associations do not list them). WebGL ran only as Chromium's SwiftShader software renderer, so speed on a real GPU and driver quirks are unknown. mmCIF was not opened in the panel (3Dmol's `mcif` parser); large proteins (main-thread surfaces, cartoon of thousands of residues) were not timed; undo of a coalesced snapshot write while the panel is open was reasoned about, not exercised (the panel re-applies the object's camera only when the person has not moved the view). The new strings were checked in English, with a lookup check of 68 rendered samples against the keys; the translations land separately. Windows WebView2 and Firefox were not run. Entries 222 to 244 were exercised in the built window served by the engine in headless Chromium with SwiftShader WebGL under 4x CPU throttling (ethanol build, minimise and the C-O measurement, butanol conformers, the butane scan, the three surfaces and ESP, PNG and glTF exports, Insert 3D View with restyling and turning, a PDB through Import and through 3D Structure File..., Extract Ligand, Export 3D Structure, a 3D SD file, the stale rule with undo, light theme and reduced motion), with only SwiftShader driver messages in the console.
diff --git a/frontend/index.html b/frontend/index.html
index df5ccd9d..06010707 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -102,10 +102,12 @@
+
+
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 1c7ec3bc..7b28db9b 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -1,17 +1,18 @@
{
"name": "formchem",
- "version": "0.8.0",
+ "version": "0.10.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "formchem",
- "version": "0.8.0",
+ "version": "0.10.0",
"license": "Apache-2.0",
"dependencies": {
"@tauri-apps/api": "2.12.1",
"@xterm/addon-fit": "0.11.0",
- "@xterm/xterm": "6.0.0"
+ "@xterm/xterm": "6.0.0",
+ "3dmol": "3.0.0"
},
"devDependencies": {
"@tauri-apps/cli": "2.12.6",
@@ -962,6 +963,22 @@
"addons/*"
]
},
+ "node_modules/3dmol": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/3dmol/-/3dmol-3.0.0.tgz",
+ "integrity": "sha512-GP7Q9w3zLe+MQh9M5uHWGpz8sTp23g9G0f+bCMGCchzy5/4TgjRMY7du+XWYYSNzu9YCJ1jUFJZYIM6ja0/c0Q==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "iobuffer": "^5.0.0",
+ "netcdfjs": "^3.0.0",
+ "pako": "^2.1.0",
+ "upng-js": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=24.0.0",
+ "npm": ">=10"
+ }
+ },
"node_modules/detect-libc": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
@@ -1005,6 +1022,12 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
+ "node_modules/iobuffer": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/iobuffer/-/iobuffer-5.4.0.tgz",
+ "integrity": "sha512-DRebOWuqDvxunfkNJAlc3IzWIPD5xVxwUNbHr7xKB8E6aLJxIPfNX3CoMJghcFjpv6RWQsrcJbghtEwSPoJqMA==",
+ "license": "MIT"
+ },
"node_modules/lightningcss": {
"version": "1.33.0",
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",
@@ -1285,6 +1308,31 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
+ "node_modules/netcdfjs": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/netcdfjs/-/netcdfjs-3.0.0.tgz",
+ "integrity": "sha512-LOvT8KkC308qtpUkcBPiCMBtii7ZQCN6LxcVheWgyUeZ6DQWcpSRFV9dcVXLj/2eHZ/bre9tV5HTH4Sf93vrFw==",
+ "license": "MIT",
+ "dependencies": {
+ "iobuffer": "^5.3.2"
+ }
+ },
+ "node_modules/pako": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-2.2.0.tgz",
+ "integrity": "sha512-zJq6RP/5q+TO2OpFV3FHzlPnFjmkb7Nc99a5SNjJE+uu/PkpChs+NIZSSzbBoD+6kjiISXjfYdwj1ZRQ81dz/w==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/puzrin"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/nodeca"
+ }
+ ],
+ "license": "(MIT AND Zlib)"
+ },
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -1439,6 +1487,21 @@
"@typescript/typescript-win32-x64": "7.0.2"
}
},
+ "node_modules/upng-js": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/upng-js/-/upng-js-2.1.0.tgz",
+ "integrity": "sha512-d3xzZzpMP64YkjP5pr8gNyvBt7dLk/uGI67EctzDuVp4lCZyVMo0aJO6l/VDlgbInJYDY6cnClLoBp29eKWI6g==",
+ "license": "MIT",
+ "dependencies": {
+ "pako": "^1.0.5"
+ }
+ },
+ "node_modules/upng-js/node_modules/pako": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
+ "license": "(MIT AND Zlib)"
+ },
"node_modules/vite": {
"version": "8.3.5",
"resolved": "https://registry.npmjs.org/vite/-/vite-8.3.5.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index d4ae9411..5c526152 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "formchem",
"private": true,
- "version": "0.8.0",
+ "version": "0.10.0",
"description": "FormChem · chemical structure drawing in the FormAI family",
"license": "Apache-2.0",
"type": "module",
@@ -17,7 +17,8 @@
"dependencies": {
"@tauri-apps/api": "2.12.1",
"@xterm/addon-fit": "0.11.0",
- "@xterm/xterm": "6.0.0"
+ "@xterm/xterm": "6.0.0",
+ "3dmol": "3.0.0"
},
"devDependencies": {
"@tauri-apps/cli": "2.12.6",
diff --git a/frontend/src/app.ts b/frontend/src/app.ts
index a11ad4c6..9deada60 100644
--- a/frontend/src/app.ts
+++ b/frontend/src/app.ts
@@ -7,9 +7,13 @@ import { mountClipboard } from './app/clipboard';
import { commandStateChanged, FIELD_NATIVE, registerShellCommands } from './app/commands-shell';
import { DocumentActions } from './app/documents';
import { mountImport } from './app/import-files';
+import { registerSpectrumCommands } from './app/spectrum-commands';
+import { mountSpectrumLinks } from './canvas/spectrum-links';
import { session } from './engine/session';
import { showHandoffs } from './app/handoffs';
import { buildMenus } from './app/menus';
+import { registerNameCommands } from './app/name-commands';
+import { registerNmrCommands } from './app/nmr-commands';
import { answerWindowTools } from './app/window-tools';
import { commands } from './commands/registry';
import { Dock } from './dock/dock';
@@ -27,8 +31,10 @@ import { inTauri, isMac, mountOnce, q, revealApp, setClass } from './ui/dom';
import { aboutDialog, helpDialog, openGitHub, reportIssueDialog, shortcutsDialog, systemInfoDialog, watchErrors, whatsNewDialog } from './ui/help-dialogs';
import { Home, type Library, type LibraryItem, type ListKind } from './ui/home';
import { MenuBar } from './ui/menu';
+import { offerName } from './ui/name-dialog';
import { menusInWindow, NativeMenus, setMenusInWindow, wantsNativeMenus } from './ui/native-menu';
import { preferencesDialog } from './ui/prefs';
+import { mountSpectrumPanel } from './ui/spectrum-panel';
import { mountStatus } from './ui/status';
import { insertStoichTable, isStoichOpen, mountStoichPanel, toggleStoich } from './ui/stoich-panel';
import { insertTemplate, templateDialog, type TemplateHooks } from './ui/template-dialog';
@@ -209,14 +215,18 @@ export function startApp(): ShellHosts {
inserted: (c, frags) => canvas.inserted(c, frags),
createOptions: () => { const preset = canvas.preset(); return { ...(preset ? { preset } : {}), style: canvas.style() }; },
};
- const clip = mountClipboard({ view: canvas.view, homeOpen: () => !!home?.isOpen(), createOptions: () => tplHooks.createOptions?.() ?? {} });
+ const clip = mountClipboard({ view: canvas.view, homeOpen: () => !!home?.isOpen(), createOptions: () => tplHooks.createOptions?.() ?? {}, pasteName: (text) => offerName(text, tplHooks) });
const imports = mountImport({ clip, reveal: (c, box) => { if (canvas.view.client === c) canvas.view.reveal(box); }, leaveHome: () => leaveHome() });
+ registerSpectrumCommands({ view: canvas.view, homeOpen: () => !!home?.isOpen(), clip, reveal: (c, box) => { if (canvas.view.client === c) canvas.view.reveal(box); }, leaveHome: () => leaveHome() });
+ registerNmrCommands({ view: canvas.view, homeOpen: () => !!home?.isOpen() });
+ mountSpectrumLinks(canvas.view);
let native: NativeMenus | null = null;
let recentIds: string[] = [];
let recentOff: () => void = () => undefined;
let exportClosedAt = 0;
const rebuildNative = (): void => { if (native) void native.build().catch(() => undefined); };
const leaveHome = (): void => { if (home?.isOpen()) home.close(); };
+ registerNameCommands({ host: canvas.view, hooks: tplHooks, homeOpen: () => !!home?.isOpen(), leaveHome: () => leaveHome() });
reserveDock();
const dock: Dock<'antigravity'> = new Dock(formchemDock({
@@ -311,6 +321,7 @@ export function startApp(): ShellHosts {
const tools = mountTitleTools(h.titleTools, commands);
mountAnalysisPanel(h.panel);
mountStoichPanel(h.workspace);
+ mountSpectrumPanel(h.workspace, canvas.view);
mountStatus(h, live);
mountPalette();
diff --git a/frontend/src/app/canvas.ts b/frontend/src/app/canvas.ts
index 9570e4ce..6f9f9558 100644
--- a/frontend/src/app/canvas.ts
+++ b/frontend/src/app/canvas.ts
@@ -22,6 +22,7 @@ import { registerGridCommands } from './grid-commands';
import { objectCommandDefs } from './object-commands';
import { registerReactionCommands } from './reaction-commands';
import { registerStandardiseCommand } from './standardise-command';
+import { registerView3dCommands } from './view3d-commands';
export interface CanvasHosts { stage: HTMLElement; stageCol: HTMLElement }
@@ -64,6 +65,7 @@ export function mountCanvas(h: CanvasHosts, homeOpen: () => boolean): MountedCan
registerChemCommands({ host: view, homeOpen });
registerExportCommands({ view, homeOpen, display });
registerStandardiseCommand({ host: view, homeOpen });
+ registerView3dCommands({ view, homeOpen });
onMarksView(() => view.setDisplay(display()));
view.setDisplay(display());
diff --git a/frontend/src/app/clip-data.ts b/frontend/src/app/clip-data.ts
index cbea863f..f51fa76b 100644
--- a/frontend/src/app/clip-data.ts
+++ b/frontend/src/app/clip-data.ts
@@ -153,7 +153,13 @@ export function extractClip(doc: FormChemDocument, page: Page, sel: Selection):
const expansions: Record = {};
for (const o of Object.values(objects)) if (isFragment(o)) expansionsUsed(doc, Object.values(o.atoms), expansions);
const media: Record = {};
- for (const o of Object.values(objects)) if (o.kind === 'image' && doc.media?.[o.media]) media[o.media] = clone(doc.media[o.media]);
+ for (const o of Object.values(objects)) {
+ const ids = o.kind === 'image' ? [o.media]
+ : o.kind === 'model3d' ? [o.snapshot, 'media' in o.source ? o.source.media : undefined]
+ : o.kind === 'spectrum' && 'media' in o.source ? [o.source.media]
+ : [];
+ for (const m of ids) if (m && doc.media?.[m]) media[m] = clone(doc.media[m]);
+ }
const reactions: Reaction[] = [];
const objectIds = new Set(Object.keys(objects));
for (const r of page.reactions ?? []) {
@@ -349,6 +355,14 @@ export function pastePlan(target: FormChemDocument, pageId: Id, clip: FormChemDo
}
o.atoms = atoms;
o.bonds = bonds;
+ if (o.conformers) {
+ const keys = (rec: Record): Record => Object.fromEntries(Object.entries(rec).map(([a, v]) => [map(a), v]));
+ const named = (ref: string): string => { const at = ref.indexOf(':'); return at < 0 ? map(ref) : `${map(ref.slice(0, at))}${ref.slice(at)}`; };
+ o.conformers = o.conformers.map((c) => ({
+ ...c, coords: keys(c.coords), ...(c.h ? { h: keys(c.h) } : {}), ...(c.expanded ? { expanded: keys(c.expanded) } : {}),
+ ...(c.scan ? { scan: { ...c.scan, atoms: c.scan.atoms.map(named) } } : {}),
+ }));
+ }
if (o.stereo_groups) o.stereo_groups = o.stereo_groups.map((g) => ({ ...g, atoms: (g.atoms ?? []).map(map) }));
if (o.rgroups) {
for (const def of Object.values(o.rgroups)) {
@@ -390,6 +404,42 @@ export function pastePlan(target: FormChemDocument, pageId: Id, clip: FormChemDo
else if (!target.media?.[o.media]) { skipped.add(id); continue; }
break;
}
+ case 'spectrum': {
+ if ('media' in o.source) {
+ const m = media[o.source.media];
+ if (m) o.source = { ...o.source, media: m.id };
+ else if (!target.media?.[o.source.media]) { skipped.add(id); continue; }
+ } else if (has(o.source.predicted.fragment)) o.source = { predicted: { ...o.source.predicted, fragment: map(o.source.predicted.fragment) } };
+ const refs = (list: T[] | undefined): T[] | undefined => list?.map((k) => {
+ const next = { ...k, id: newId('k') };
+ if (k.atoms) { if (has(k.atoms.object)) next.atoms = { object: map(k.atoms.object), atoms: k.atoms.atoms.map(map) }; else delete next.atoms; }
+ return next;
+ });
+ if (o.peaks) o.peaks = refs(o.peaks);
+ if (o.integrals) o.integrals = refs(o.integrals);
+ if (o.multiplets) o.multiplets = refs(o.multiplets);
+ if (o.overlays) o.overlays = o.overlays.filter((v) => has(v)).map(map);
+ break;
+ }
+ case 'model3d': {
+ if ('fragment' in o.source) {
+ const f = o.source.fragment;
+ if (has(f)) {
+ o.source = { fragment: map(f) };
+ if (o.labels) o.labels = o.labels.map((l) => ({ ...l, atoms: l.atoms.map((a) => { const [atom, h] = a.split(':'); return h ? `${map(atom)}:${h}` : map(atom); }) }));
+ } else if (target.objects[f]?.kind !== 'fragment') { skipped.add(id); continue; }
+ } else {
+ const m = media[o.source.media];
+ if (m) o.source = { ...o.source, media: m.id };
+ else if (!target.media?.[o.source.media]) { skipped.add(id); continue; }
+ }
+ if (o.snapshot) {
+ const s = media[o.snapshot];
+ if (s) o.snapshot = s.id;
+ else if (!target.media?.[o.snapshot]) delete o.snapshot;
+ }
+ break;
+ }
default:
break;
}
diff --git a/frontend/src/app/clipboard.ts b/frontend/src/app/clipboard.ts
index 36765420..aaa50af2 100644
--- a/frontend/src/app/clipboard.ts
+++ b/frontend/src/app/clipboard.ts
@@ -33,6 +33,7 @@ export interface ClipboardDeps {
view: CanvasView;
homeOpen(): boolean;
createOptions(): { preset?: string; style?: StyleOverride };
+ pasteName?(text: string): Promise;
}
export interface InsertOptions {
@@ -338,8 +339,8 @@ export function mountClipboard(deps: ClipboardDeps): ClipboardApi {
}
if (!payload) continue;
if (payload.kind === 'text') {
- const named = looksLikeName(payload.text);
- toast(named ? t('No structure was found in the text, so it was pasted as text. Chemical names such as aspirin are not read yet; name to structure arrives in a later version.') : t('No structure was found in the text, so it was pasted as text.'));
+ if (looksLikeName(payload.text) && deps.pasteName && await deps.pasteName(payload.text)) return true;
+ toast(t('No structure was found in the text, so it was pasted as text.'));
}
return run(payload);
}
diff --git a/frontend/src/app/commands-shell.ts b/frontend/src/app/commands-shell.ts
index 0211f7fc..d2ea2d44 100644
--- a/frontend/src/app/commands-shell.ts
+++ b/frontend/src/app/commands-shell.ts
@@ -123,8 +123,6 @@ const LATER: Record = {
'0.3.0': 'Arrives in 0.3.0 with documents',
'0.4.0': 'Arrives in 0.4.0 with the drawing canvas',
'0.5.0': 'Arrives in 0.5.0 with reactions and annotations',
- '0.9.0': 'Arrives in 0.9.0 with names and spectra',
- '0.10.0': 'Arrives in 0.10.0 with 3D',
'0.13.0': 'Arrives in 0.13.0 with the demos',
};
@@ -152,7 +150,7 @@ export function registerShellCommands(deps: ShellCommandDeps): () => void {
{ id: 'save', label: () => t('Save'), group: 'File', keys: ['Mod+S'], icon: 'save', when: NO_DRAWING, enabled: () => deps.hasDocument(), run: () => deps.saveDocument() },
{ id: 'save-as', label: () => t('Save As...'), group: 'File', keys: ['Shift+Mod+S'], when: NO_DRAWING, enabled: () => deps.hasDocument(), run: () => deps.saveAs() },
{ id: 'save-copy', label: () => t('Save a Copy...'), group: 'File', when: NO_DRAWING, enabled: () => deps.hasDocument(), run: () => deps.saveCopy() },
- { id: 'import', label: () => t('Import...'), group: 'File', icon: 'upload', mutates: true, description: 'Inserts the structures, reactions and objects of chemistry files (molfile, SD, RXN, RD, SMILES, CXSMILES, SMARTS, InChI, CML, CDXML, CDX), FormChem drawings, or PNG, SVG, PDF and EPS pictures that carry their FormChem drawing into the active drawing (a new one when none is open): in free space to the right of or below what is there, selected, one undo step per file, with the import report. An SD file brings at most 50 structures in a grid and the report says how many were left out. Without path it asks the person to pick one or more files.', params: { path: { type: 'string', description: 'Absolute path of a file on this computer to import; leave it out to ask the person', example: '/Users/me/Documents/ligands.sdf' } }, run: (params) => deps.importFiles(typeof params?.path === 'string' ? params.path : undefined) },
+ { id: 'import', label: () => t('Import...'), group: 'File', icon: 'upload', mutates: true, description: 'Inserts the structures, reactions and objects of chemistry files (molfile, SD, RXN, RD, SMILES, CXSMILES, SMARTS, InChI, CML, CDXML, CDX), 3D structure files (PDB and mmCIF as a 3D object with the file kept; a 3D SD or MOL file keeps its coordinates as each structure\'s conformer), FormChem drawings, or PNG, SVG, PDF and EPS pictures that carry their FormChem drawing into the active drawing (a new one when none is open): in free space to the right of or below what is there, selected, one undo step per file, with the import report. An SD file brings at most 50 structures in a grid and the report says how many were left out. Without path it asks the person to pick one or more files.', params: { path: { type: 'string', description: 'Absolute path of a file on this computer to import; leave it out to ask the person', example: '/Users/me/Documents/ligands.sdf' } }, run: (params) => deps.importFiles(typeof params?.path === 'string' ? params.path : undefined) },
{ id: 'preferences', label: preferencesLabel, group: 'File', keys: ['Mod+,'], icon: 'settings', run: () => deps.preferences() },
{ id: 'close-document', label: () => t('Close Drawing'), group: 'File', when: NO_DRAWING, enabled: () => deps.hasDocument(), run: () => deps.closeDocument() },
@@ -174,16 +172,10 @@ export function registerShellCommands(deps: ShellCommandDeps): () => void {
{ id: 'menus-in-window', label: () => t('Menus in Window'), group: 'View', when: 'macOS desktop only', enabled: () => inTauri() && IS_MAC, checked: menusInWindowOn, run: () => deps.menusInWindow() },
{ id: 'insert-smiles', label: () => t('Structure from SMILES...'), group: 'Insert', mutates: true, description: 'Adds the structure of a SMILES string to the active drawing (a new one when none is open) at the middle of the visible page, selected, as one undo step. With smiles it inserts that string; without it asks the person for one.', params: { smiles: { type: 'string', description: 'SMILES to insert, such as c1ccccc1O; leave it out to ask the person', example: 'c1ccccc1O' } }, run: (params) => deps.insertSmiles(typeof params?.smiles === 'string' ? params.smiles : undefined) },
- later('insert-name', 'Structure from Name...', 'Insert', '0.9.0'),
{ id: 'insert-template', label: () => t('Template...'), group: 'Insert', icon: 'template', mutates: true, description: 'Opens the template library; with id it inserts that template (fresh ids, scaled to the drawing bond length) centred in the view of the active drawing, or a new one, as one undo step. GET /api/templates lists the ids.', params: { id: { type: 'string', description: 'Template id from GET /api/templates, such as benzene or l-alanine; leave it out to open the library', example: 'benzene' } }, run: (params) => deps.insertTemplate(typeof params?.id === 'string' ? params.id : undefined) },
{ id: 'stoichiometry-grid', label: () => t('Insert Stoichiometry Table'), group: 'Reaction', icon: 'table', mutates: true, description: 'Inserts the stoichiometry grid of the selected reaction step as a table under the reaction, or refreshes the table already bound to that step, as one undo step.', when: 'Draw a reaction with an arrow first', enabled: () => deps.hasDocument(), run: () => deps.insertStoichTable() },
- later('view-3d', '3D View', '3D', '0.10.0', 'model3d'),
- later('build-3d', 'Build 3D from 2D', '3D', '0.10.0', 'model3d'),
- later('minimize-3d', 'Minimise Energy', '3D', '0.10.0'),
- later('conformers', 'Conformers...', '3D', '0.10.0'),
-
{ id: 'next-window', label: () => t('Next Window'), group: 'Window', run: () => deps.nextWindow() },
{ id: 'agents', label: () => t('Agents and MCP...'), group: 'Window', icon: 'agent', run: () => deps.agents() },
diff --git a/frontend/src/app/documents.ts b/frontend/src/app/documents.ts
index 50764442..fa39846a 100644
--- a/frontend/src/app/documents.ts
+++ b/frontend/src/app/documents.ts
@@ -27,7 +27,7 @@ export interface DocumentHooks {
interface ParseAnswer { fragments?: Fragment[]; warnings?: { text?: string }[] }
-const OPEN_EXTENSIONS = ['fchem', 'mol', 'mdl', 'sdf', 'sd', 'rxn', 'rdf', 'rd', 'smi', 'smiles', 'cxsmi', 'cxsmiles', 'sma', 'smarts', 'inchi', 'cml', 'cdxml', 'cdx', 'svg', 'png', 'pdf', 'eps'];
+const OPEN_EXTENSIONS = ['fchem', 'mol', 'mdl', 'sdf', 'sd', 'rxn', 'rdf', 'rd', 'smi', 'smiles', 'cxsmi', 'cxsmiles', 'sma', 'smarts', 'inchi', 'cml', 'cdxml', 'cdx', 'pdb', 'ent', 'cif', 'mmcif', 'jdx', 'dx', 'jcamp', 'svg', 'png', 'pdf', 'eps'];
const UPLOAD_URL = '/api/documents/upload';
const PARSE_URL = '/api/chem/parse';
diff --git a/frontend/src/app/menus.ts b/frontend/src/app/menus.ts
index d3dff388..e0000f0c 100644
--- a/frontend/src/app/menus.ts
+++ b/frontend/src/app/menus.ts
@@ -6,12 +6,15 @@ export type MenuSource = () => MenuItem[] | null | undefined;
const EXTENSIONS_FALLBACK: MenuItem[] = ['ext-panel', 'ext-reload', 'ext-manage'];
-const EXPORT: MenuItem = { label: 'Export', items: ['export-png', 'export-svg', 'export-pdf', 'export-eps', '-', 'export-cdxml', 'export-mol', 'export-smiles'] };
+const EXPORT: MenuItem = { label: 'Export', items: ['export-png', 'export-svg', 'export-pdf', 'export-eps', '-', 'export-cdxml', 'export-mol', 'export-smiles', '-', 'export-3d-file'] };
const COPY_AS: MenuItem = { label: 'Copy As', items: ['copy-smiles', 'copy-cxsmiles', 'copy-molfile', 'copy-inchi', 'copy-inchikey', 'copy-smarts', '-', 'copy-svg', 'copy-png', '-', 'copy-cdxml'] };
const REACTION_COPY: MenuItem = { label: 'Copy Reaction As', items: ['copy-reaction-smiles', 'copy-reaction-rxn'] };
const REACTION_EXPORT: MenuItem = { label: 'Export Reaction', items: ['export-reaction-smiles', 'export-reaction-rxn'] };
const GRID: MenuItem = { label: 'Grid', items: ['show-grid', 'snap-to-grid', '-', 'grid-lines', 'grid-dots', 'grid-crosses', 'grid-isometric', 'grid-isometric-dots', 'grid-hex', 'grid-hex-dots', '-', 'grid-settings'] };
const ALIGN: MenuItem ={ label: 'Align', items: ['align-left', 'align-center', 'align-right', '-', 'align-top', 'align-middle', 'align-bottom'] };
+const SPECTRUM: MenuItem = { label: 'Spectrum', items: ['edit-spectrum', '-', 'pick-peaks', 'integrate', '-', 'link-peak-to-atoms', 'unlink', '-', 'spectrum-y-mode', 'export-spectrum'] };
+const DISPLAY_3D: MenuItem = { label: 'Display', items: ['style-wire', 'style-stick', 'style-ballstick', 'style-spacefill', 'style-cartoon'] };
+const SURFACE_3D: MenuItem = { label: 'Surface', items: ['surface-none', 'surface-vdw', 'surface-sas', 'surface-ses', 'surface-esp'] };
export function buildMenus(extensionItems?: MenuSource, recentItems?: MenuSource): MenuDef[] {
const recent = (): MenuItem => {
@@ -20,14 +23,14 @@ export function buildMenus(extensionItems?: MenuSource, recentItems?: MenuSource
};
return [
{ label: 'File', items: () => ['home', 'new-document', 'open', recent(), '-', 'new-window', 'close-window', 'close-document', '-', 'save', 'save-as', 'save-copy', '-', 'import', EXPORT, 'print', '-', 'preferences'] },
- { label: 'Edit', items: ['undo', 'redo', '-', 'cut', 'copy', COPY_AS, 'paste', 'paste-special', 'duplicate', 'delete', '-', 'select-all', '-', 'find', 'find-next', 'find-previous', 'replace', ...CHEM_MENU_ITEMS.edit] },
+ { label: 'Edit', items: ['undo', 'redo', '-', 'cut', 'copy', COPY_AS, 'copy-name', 'paste', 'paste-special', 'duplicate', 'delete', '-', 'select-all', '-', 'find', 'find-next', 'find-previous', 'replace', ...CHEM_MENU_ITEMS.edit] },
{ label: 'View', items: () => ['zoom-in', 'zoom-out', 'zoom-fit', 'zoom-100', '-', GRID, 'dark-page', 'show-rulers', 'clear-guides', '-', ...CHEM_MENU_ITEMS.view, '-', 'toggle-analysis', 'show-stoichiometry', '-', 'view-terminal', 'new-terminal', 'claude-code', 'agent-chat', 'command-palette', ...(isMacDesktop() ? ['-', 'menus-in-window'] : [])] },
- { label: 'Insert', items: ['insert-smiles', 'insert-name', 'insert-template', '-', 'insert-text', 'insert-arrow', 'insert-shape', 'insert-table', 'insert-image'] },
+ { label: 'Insert', items: ['insert-smiles', 'insert-name', 'insert-template', '-', 'insert-text', 'insert-arrow', 'insert-shape', 'insert-table', 'insert-image', '-', 'open-spectrum', 'insert-3d-view', 'open-3d-structure'] },
{ label: 'Structure', items: ['clean-structure', 'layout-structure', '-', ...CHEM_MENU_ITEMS.structure, '-', 'check-structure', 'standardise', 'compute-properties', '-', 'flip-horizontal', 'flip-vertical'] },
{ label: 'Reaction', items: ['add-reaction-arrow', 'perceive-reactions', 'set-reaction-roles', '-', 'map-atoms', 'clear-mapping', '-', 'check-reaction', 'balance-reaction', '-', 'show-stoichiometry', 'stoichiometry-grid', '-', 'paste-reaction', REACTION_COPY, REACTION_EXPORT] },
{ label: 'Arrange', items: ['bring-front', 'bring-forward', 'send-backward', 'send-back', '-', ALIGN, 'distribute-h', 'distribute-v', '-', 'rotate-90', '-', 'scale-selection', 'scale-up', 'scale-down', 'scale-labels', '-', 'group', 'ungroup'] },
- { label: 'Analysis', items: ['show-analysis', ...CHEM_MENU_ITEMS.analysis] },
- { label: '3D', items: ['view-3d', '-', 'build-3d', 'minimize-3d', 'conformers'] },
+ { label: 'Analysis', items: ['show-analysis', ...CHEM_MENU_ITEMS.analysis, '-', 'predict-nmr-1h', 'predict-nmr-13c', 'nmr-refresh', '-', SPECTRUM] },
+ { label: '3D', items: ['view-3d', 'insert-3d-view', 'open-3d-structure', 'extract-ligand', '-', 'build-3d', 'minimize-3d', 'conformers', 'dihedral-scan', 'measure-3d', '-', DISPLAY_3D, SURFACE_3D, '-', 'export-3d-png', 'export-gltf', 'export-3d-file'] },
{ label: 'Window', items: ['next-window', '-', 'agents', 'agent-activity'] },
{ label: 'Extensions', items: () => { const own = extensionItems?.(); return own?.length ? own : EXTENSIONS_FALLBACK; } },
{ label: 'Help', items: ['help', 'whats-new', 'shortcuts', 'demos', '-', 'help-github', 'report-issue', '-', 'check-for-updates', 'system-info', 'about'] },
diff --git a/frontend/src/app/name-commands.ts b/frontend/src/app/name-commands.ts
new file mode 100644
index 00000000..c5857bbe
--- /dev/null
+++ b/frontend/src/app/name-commands.ts
@@ -0,0 +1,110 @@
+import { fragmentsTouched, isEmpty } from '../canvas/selection';
+import { commands, type CommandDef } from '../commands/registry';
+import type { FormChemDocument, Fragment, Id } from '../engine/model';
+import { namesApi, type NameItem } from '../engine/names-api';
+import { t } from '../i18n';
+import { currentNameSection, nameSource } from '../ui/analysis-name';
+import { copyText } from '../ui/dialogs';
+import { insertName, methodLabel, nameDialog } from '../ui/name-dialog';
+import type { TemplateHooks } from '../ui/template-dialog';
+import { toast } from '../ui/toast';
+import type { ChemHost } from './chem-commands';
+
+export interface NameCommandDeps {
+ host: ChemHost;
+ hooks: TemplateHooks;
+ homeOpen(): boolean;
+ leaveHome?(): void;
+}
+
+const errText = (e: unknown): string => t(e instanceof Error ? e.message : String(e));
+
+function fragmentsIn(doc: FormChemDocument, ids: Iterable, out: Fragment[] = [], seen = new Set()): Fragment[] {
+ for (const id of ids) {
+ if (seen.has(id)) continue;
+ seen.add(id);
+ const o = doc.objects[id];
+ if (o?.kind === 'fragment' && Object.keys(o.atoms).length) out.push(o);
+ else if (o?.kind === 'group') fragmentsIn(doc, o.children, out, seen);
+ }
+ return out;
+}
+
+export function namedFragments(host: ChemHost): Fragment[] {
+ const doc = host.client?.doc;
+ if (!doc) return [];
+ const sel = host.selection();
+ if (!isEmpty(sel)) {
+ const picked = fragmentsIn(doc, [...fragmentsTouched(sel), ...sel.objects]);
+ if (picked.length) return picked;
+ }
+ return fragmentsIn(doc, host.page()?.order ?? []);
+}
+
+function pick(names: NameItem[], kind: unknown): NameItem | undefined {
+ if (kind === 'trivial' || kind === 'systematic') return names.find((n) => n.kind === kind);
+ return names[0];
+}
+
+export async function copyName(host: ChemHost, kind?: unknown, fromAgent = false): Promise {
+ const refuse = (text: string): undefined => {
+ toast(text, 'error');
+ if (fromAgent) throw new Error(text);
+ return undefined;
+ };
+ const doc = host.client?.doc;
+ const frags = namedFragments(host);
+ const src = doc ? nameSource(doc, frags) : null;
+ if (!src) return refuse(t('Draw or select a structure to name.'));
+ const shown = currentNameSection()?.current();
+ let found = shown && frags.length === 1 && kind === undefined ? shown : null;
+ if (!found) {
+ try {
+ found = await namesApi.toName(src);
+ } catch (e) {
+ return refuse(`${t('Names could not be computed')}: ${errText(e)}`);
+ }
+ }
+ const item = pick(found.names, kind);
+ if (!item) return refuse(found.reason ? t(found.reason) : t('FormChem has no name for this structure.'));
+ const ok = await copyText(item.text);
+ if (!ok && !fromAgent) return refuse(t('Could not copy to the clipboard'));
+ toast(t(`Copied name: ${item.text}`));
+ return `${ok ? 'Copied' : 'Named'} "${item.text}" (${item.kind}, ${methodLabel(item.method)}, ${item.confidence} confidence, ${found.engine} ${found.version})`;
+}
+
+export function nameCommandDefs(deps: NameCommandDeps): CommandDef[] {
+ const { host, hooks } = deps;
+ const hasStructure = (): boolean => !deps.homeOpen() && namedFragments(host).length > 0;
+ return [
+ {
+ id: 'insert-name',
+ label: () => t('Structure from Name...'),
+ group: 'Insert',
+ icon: 'fileText',
+ mutates: true,
+ description: 'Adds the structure of a chemical name (a common name such as aspirin or DMSO, or a systematic name such as 2-methylpropan-1-ol) to the active drawing (a new one when none is open), centred in the view, selected, as one undo step. Names are read offline: FormChem\'s dictionary first, then its systematic name parser; the answer gives the method, confidence and version. With name it inserts that name; without it opens the Structure from Name dialog.',
+ params: { name: { type: 'string', description: 'Chemical name to insert; leave it out to open the dialog', example: '2-methylpropan-1-ol' } },
+ run: (p) => {
+ deps.leaveHome?.();
+ const name = typeof p?.name === 'string' ? p.name.trim() : '';
+ return name ? insertName(name, hooks, true) : nameDialog(hooks);
+ },
+ },
+ {
+ id: 'copy-name',
+ label: () => t('Copy Name'),
+ group: 'Edit',
+ icon: 'copy',
+ description: 'Copies the name of the selected structure (or of the structures on the page) as plain text: the common name when FormChem knows one, otherwise its systematic name, which is only offered when it reads back to the same structure.',
+ params: { kind: { type: 'string', description: 'trivial or systematic to choose which name to copy; leave it out for the first one', example: 'systematic' } },
+ when: 'Draw or select a structure first',
+ enabled: hasStructure,
+ run: (p) => copyName(host, p?.kind, typeof p?.kind === 'string'),
+ },
+ ];
+}
+
+export function registerNameCommands(deps: NameCommandDeps): () => void {
+ return commands.register(...nameCommandDefs(deps));
+}
diff --git a/frontend/src/app/nmr-commands.ts b/frontend/src/app/nmr-commands.ts
new file mode 100644
index 00000000..dc585b00
--- /dev/null
+++ b/frontend/src/app/nmr-commands.ts
@@ -0,0 +1,130 @@
+import { objectBounds } from '../canvas/hit';
+import { fragmentsTouched, isEmpty, makeSelection } from '../canvas/selection';
+import type { CanvasView } from '../canvas/view';
+import { spectrumOf } from '../chem/spectrum-ops';
+import { commands, type CommandDef } from '../commands/registry';
+import type { DocumentClient } from '../engine/client-api';
+import { isFragment, type Id, type SpectrumObject } from '../engine/model';
+import { nmrApi, type NmrNucleus, type NmrPrediction } from '../engine/nmr-api';
+import { t } from '../i18n';
+import { spectrumEditorTarget } from '../ui/spectrum-panel';
+import { toast } from '../ui/toast';
+
+export interface NmrCommandDeps {
+ view: CanvasView;
+ homeOpen(): boolean;
+}
+
+const NEED_STRUCTURE = 'Select one structure first';
+const NEED_PREDICTED = 'Select a predicted spectrum first';
+const ARRIVE_MS = 3000;
+const errText = (e: unknown): string => t(e instanceof Error ? e.message : String(e));
+const str = (v: unknown): string | undefined => (typeof v === 'string' && v ? v : undefined);
+
+function structureOf(view: CanvasView, params?: Record): Id | null {
+ const doc = view.client?.doc;
+ if (!doc) return null;
+ const asked = str(params?.object);
+ if (asked) return isFragment(doc.objects[asked]) ? asked : null;
+ const sel = view.selection();
+ if (!isEmpty(sel)) {
+ const ids = new Set(fragmentsTouched(sel));
+ for (const id of sel.objects) {
+ const o = doc.objects[id];
+ if (isFragment(o)) ids.add(id);
+ else if (o?.kind === 'spectrum' && 'predicted' in o.source && isFragment(doc.objects[o.source.predicted.fragment])) ids.add(o.source.predicted.fragment);
+ }
+ if (ids.size) return ids.size === 1 ? [...ids][0] : null;
+ }
+ const all = (view.page()?.order ?? []).filter((id) => { const o = doc.objects[id]; return isFragment(o) && Object.keys(o.atoms).length > 0; });
+ return all.length === 1 ? all[0] : null;
+}
+
+const isPredicted = (o: SpectrumObject | null): o is SpectrumObject => !!o && 'predicted' in o.source;
+
+function predictedOf(view: CanvasView, params?: Record): SpectrumObject | null {
+ const doc = view.client?.doc;
+ if (!doc) return null;
+ const asked = str(params?.object);
+ if (asked) { const o = spectrumOf(doc, asked); return isPredicted(o) ? o : null; }
+ const picked = [...view.selection().objects].map((id) => spectrumOf(doc, id)).filter(isPredicted);
+ if (picked.length === 1) return picked[0];
+ const open = spectrumOf(doc, spectrumEditorTarget());
+ return isPredicted(open) ? open : null;
+}
+
+function arrived(client: DocumentClient, id: Id): Promise {
+ if (client.doc.objects[id]) return Promise.resolve(true);
+ return new Promise((resolve) => {
+ const timer = window.setTimeout(() => { off(); resolve(false); }, ARRIVE_MS);
+ const off = client.on(() => {
+ if (!client.doc.objects[id]) return;
+ window.clearTimeout(timer);
+ off();
+ resolve(true);
+ });
+ });
+}
+
+const how = (p: NmrPrediction): string => `${p.method} ${p.version}`;
+
+async function predict(view: CanvasView, nucleus: NmrNucleus, params?: Record): Promise {
+ const client = view.client;
+ const frag = structureOf(view, params);
+ if (!client || !frag) throw new Error(NEED_STRUCTURE);
+ const frequency = typeof params?.frequency === 'number' && Number.isFinite(params.frequency) ? params.frequency : undefined;
+ const done = await nmrApi.predictSpectrum(client.id, frag, nucleus, frequency);
+ if (view.client === client && await arrived(client, done.id)) {
+ view.setSelection(makeSelection([], [], [done.id]));
+ const box = objectBounds(client.doc, done.id);
+ if (box) view.reveal(box);
+ }
+ const p = done.prediction;
+ toast(nucleus === '1H' ? t(`Predicted 1H NMR spectrum added (${how(p)})`) : t(`Predicted 13C NMR spectrum added (${how(p)})`));
+ return [`Added predicted ${nucleus} NMR spectrum ${done.id} for ${frag} (${how(p)}, ${p.frequency} MHz).`, p.journal, ...p.warnings.map((w) => `Note: ${w.text}`)].join('\n');
+}
+
+async function refresh(view: CanvasView, params?: Record): Promise {
+ const client = view.client;
+ const obj = predictedOf(view, params);
+ if (!client || !obj) throw new Error(NEED_PREDICTED);
+ const done = await nmrApi.refresh(client.id, obj.id);
+ const text = done.changed ? t(`Predicted spectrum refreshed (${how(done.prediction)})`) : t('The predicted spectrum is up to date.');
+ toast(text);
+ return done.changed ? `Refreshed ${obj.id} (${how(done.prediction)}).\n${done.prediction.journal}` : `${obj.id} was already up to date.`;
+}
+
+export function registerNmrCommands(deps: NmrCommandDeps): () => void {
+ const { view } = deps;
+ const open = (): boolean => !!view.client && !deps.homeOpen();
+ const run = (what: string, fn: (p?: Record) => Promise) => (params?: Record): Promise =>
+ fn(params).catch((e: unknown) => {
+ toast(`${t(what)}: ${errText(e)}`, 'error');
+ if (params) throw e;
+ return undefined;
+ });
+ const params = {
+ object: { type: 'string' as const, description: 'Fragment id of the structure; default the selected structure, or the only one on the page' },
+ frequency: { type: 'number' as const, description: 'Spectrometer frequency in MHz (default 400 for 1H, 100 for 13C)' },
+ };
+ const predictDef = (nucleus: NmrNucleus, id: string, label: string): CommandDef => ({
+ id, label: () => t(label), group: 'Analysis', icon: 'spectrum', mutates: true,
+ description: nucleus === '1H'
+ ? 'Adds a predicted 1H NMR spectrum of the selected structure beside it, as one undo step: a spectrum object computed by FormChem\'s own increment rules (no shift database), whose multiplets and integrals are linked to the structure\'s atoms, titled with the method, version and frequency. The curve is recomputed from the structure, never stored.'
+ : 'Adds a predicted 13C NMR spectrum of the selected structure beside it, as one undo step: a spectrum object computed by FormChem\'s own increment rules (no shift database), whose peaks are linked to the structure\'s atoms, titled with the method, version and frequency. The curve is recomputed from the structure, never stored.',
+ params, when: NEED_STRUCTURE, enabled: () => open() && !!structureOf(view),
+ run: run('Could not predict the spectrum', (p) => predict(view, nucleus, p)),
+ });
+ const defs: CommandDef[] = [
+ predictDef('1H', 'predict-nmr-1h', 'Predict 1H NMR Spectrum'),
+ predictDef('13C', 'predict-nmr-13c', 'Predict 13C NMR Spectrum'),
+ {
+ id: 'nmr-refresh', label: () => t('Refresh Predicted Spectrum'), group: 'Analysis', icon: 'refresh', mutates: true,
+ description: 'Recomputes the multiplets, integrals or peaks of a predicted spectrum after its structure changed, with the running predictor version, as one undo step; nothing changes when it is up to date.',
+ params: { object: { type: 'string', description: 'Predicted spectrum id; default the selected one or the one open in the Spectrum editor' } },
+ when: NEED_PREDICTED, enabled: () => open() && !!predictedOf(view),
+ run: run('Could not refresh the spectrum', (p) => refresh(view, p)),
+ },
+ ];
+ return commands.register(...defs);
+}
diff --git a/frontend/src/app/picture.ts b/frontend/src/app/picture.ts
index 269fd0cd..34debf6a 100644
--- a/frontend/src/app/picture.ts
+++ b/frontend/src/app/picture.ts
@@ -1,9 +1,10 @@
import { mediaCache } from '../canvas/render/image';
+import { preloadSpectrum } from '../canvas/render/spectrum';
import { createRenderer } from '../canvas/render';
import { union, type Box } from '../canvas/render/geom';
import { EMPTY_SELECTION } from '../canvas/selection';
import type { RenderDisplay } from '../canvas/types';
-import type { Derived, FormChemDocument, Id } from '../engine/model';
+import type { Derived, FormChemDocument, Id, SpectrumObject } from '../engine/model';
import { post } from '../io/api';
import { embedInPng, embedInSvg } from './embedded-source';
import { toBase64 } from './save-file';
@@ -73,7 +74,7 @@ async function fontsReady(): Promise {
}
async function mediaReady(doc: FormChemDocument): Promise {
- const media = Object.values(doc.objects).filter((o) => o.kind === 'image').map((o) => (o as { media: Id }).media);
+ const media = Object.values(doc.objects).flatMap((o) => (o.kind === 'image' ? [o.media] : o.kind === 'model3d' && o.snapshot ? [o.snapshot] : []));
const pending = (): boolean => media.some((m) => { const r = mediaCache.ref(doc, m); return !r.href && !r.failed; });
if (!pending()) return;
await new Promise((resolve) => {
@@ -83,6 +84,13 @@ async function mediaReady(doc: FormChemDocument): Promise {
});
}
+async function spectraReady(doc: FormChemDocument, scale: number): Promise {
+ const list = Object.values(doc.objects).filter((o): o is SpectrumObject => o.kind === 'spectrum' && !o.hidden);
+ if (!list.length) return;
+ const wait = new Promise((resolve) => window.setTimeout(resolve, MEDIA_WAIT));
+ await Promise.race([wait, Promise.all(list.map((o) => preloadSpectrum(doc, o, scale).catch(() => undefined)))]);
+}
+
function hiddenHost(): HTMLDivElement {
const host = document.createElement('div');
host.setAttribute('aria-hidden', 'true');
@@ -225,6 +233,8 @@ export async function pictureSvg(doc: FormChemDocument, derived: Derived | null,
const warnings: string[] = [];
await fontsReady();
await mediaReady(doc);
+ const spectrumScale = 2 ** Math.ceil(Math.log2(Math.max(2, (opts.scale > 0 ? opts.scale : 1) * 2)));
+ await spectraReady(doc, spectrumScale);
const page = doc.pages[0];
const host = hiddenHost();
const stage = document.createElementNS(SVG_NS, 'svg');
@@ -232,6 +242,7 @@ export async function pictureSvg(doc: FormChemDocument, derived: Derived | null,
const renderer = createRenderer();
try {
renderer.mount(stage);
+ renderer.setViewport({ x: 0, y: 0, zoom: spectrumScale / (window.devicePixelRatio || 1) });
renderer.update({ doc, rev: derived?.rev ?? 0, display: opts.display ? { ...opts.display, ...NO_WARNINGS } : undefined, derived, selection: EMPTY_SELECTION, hover: { kind: 'none' }, preview: null });
const root = stage.querySelector('.fc-root') as SVGGElement | null;
if (!root || !page) throw new Error('nothing to draw');
diff --git a/frontend/src/app/spectrum-commands.ts b/frontend/src/app/spectrum-commands.ts
new file mode 100644
index 00000000..48d3854c
--- /dev/null
+++ b/frontend/src/app/spectrum-commands.ts
@@ -0,0 +1,217 @@
+import { atomsOfSelection } from '../canvas/tools/common';
+import type { CanvasView } from '../canvas/view';
+import { findMark, linkOps, spectrumOf, yModeOps } from '../chem/spectrum-ops';
+import { commands, type CommandDef } from '../commands/registry';
+import type { DocumentClient } from '../engine/client-api';
+import { isFragment, type Id, type SpectrumObject } from '../engine/model';
+import { spectraApi, type SpectrumExportFormat, type YMode } from '../engine/spectra-api';
+import { t } from '../i18n';
+import { post } from '../io/api';
+import { linkSpectrumMark, openSpectrumEditor, setSpectrumEditorMode, spectrumEditorMark, spectrumEditorRange, spectrumEditorTarget } from '../ui/spectrum-panel';
+import { toast } from '../ui/toast';
+import { safeFileName, saveFile } from './save-file';
+import { importSpectrumFile, type SpectrumImportDeps } from './spectrum-import';
+
+export interface SpectrumCommandDeps extends SpectrumImportDeps {
+ view: CanvasView;
+ homeOpen(): boolean;
+}
+
+const NEED_SPECTRUM = 'Select a spectrum first';
+const errText = (e: unknown): string => t(e instanceof Error ? e.message : String(e));
+const fail = (what: string) => (e: unknown): void => { toast(`${t(what)}: ${errText(e)}`, 'error'); };
+const str = (v: unknown): string | undefined => (typeof v === 'string' && v ? v : undefined);
+const numOf = (v: unknown): number | undefined => (typeof v === 'number' && Number.isFinite(v) ? v : typeof v === 'string' && v.trim() && Number.isFinite(Number(v)) ? Number(v) : undefined);
+
+function chosen(view: CanvasView, params?: Record): { client: DocumentClient; obj: SpectrumObject } | null {
+ const client = view.client;
+ if (!client) return null;
+ const asked = str(params?.object);
+ if (asked) {
+ const o = spectrumOf(client.doc, asked);
+ if (!o) throw new Error(`no spectrum with id ${asked}`);
+ return { client, obj: o };
+ }
+ const sel = view.selection();
+ const picked = [...sel.objects].map((id) => spectrumOf(client.doc, id)).filter((o): o is SpectrumObject => !!o);
+ if (picked.length === 1) return { client, obj: picked[0] };
+ const open = spectrumOf(client.doc, spectrumEditorTarget());
+ if (open) return { client, obj: open };
+ if (!picked.length) {
+ const page = view.page();
+ const all = (page?.order ?? []).map((id) => spectrumOf(client.doc, id)).filter((o): o is SpectrumObject => !!o);
+ if (all.length === 1) return { client, obj: all[0] };
+ }
+ return null;
+}
+
+function need(view: CanvasView, params?: Record): { client: DocumentClient; obj: SpectrumObject } {
+ const c = chosen(view, params);
+ if (!c) throw new Error(NEED_SPECTRUM);
+ return c;
+}
+
+function rangeOf(params: Record | undefined, obj: SpectrumObject): { from: number; to: number } | null {
+ const from = numOf(params?.from), to = numOf(params?.to);
+ if (from !== undefined && to !== undefined) return { from, to };
+ if (spectrumEditorTarget() === obj.id) return spectrumEditorRange();
+ const v = obj.view;
+ return v?.x_from !== undefined && v.x_to !== undefined ? { from: v.x_from, to: v.x_to } : null;
+}
+
+async function pickPeaks(view: CanvasView, params?: Record): Promise {
+ const { client, obj } = need(view, params);
+ const done = await spectraApi.pickPeaks(client, obj, rangeOf(params, obj), { threshold: numOf(params?.threshold), replace: params?.replace === true });
+ const text = !done.changed ? t('No new peaks in that range.') : done.skipped ? t(`Peaks picked: ${done.count} (already there: ${done.skipped})`) : t(`Peaks picked: ${done.count}`);
+ toast(text);
+ return text;
+}
+
+async function integrate(view: CanvasView, params?: Record): Promise {
+ const { client, obj } = need(view, params);
+ if (obj.technique !== 'nmr') throw new Error('Integrals are for NMR spectra');
+ const from = numOf(params?.from), to = numOf(params?.to);
+ if (from === undefined || to === undefined) {
+ openSpectrumEditor(obj.id);
+ setSpectrumEditorMode('integrate');
+ toast(t('Drag across a range in the Spectrum editor to integrate it.'));
+ return undefined;
+ }
+ const done = await spectraApi.integrate(client, obj, { from, to }, numOf(params?.value));
+ return done.changed ? `Integrated ${from} to ${to}` : 'Nothing to integrate in that range';
+}
+
+function linkPeak(view: CanvasView, params?: Record): string | undefined {
+ const { client, obj } = need(view, params);
+ const mark = str(params?.peak) ?? str(params?.mark) ?? spectrumEditorMark();
+ if (!mark || !findMark(obj, mark)) throw new Error('Select a peak, integral or multiplet in the Spectrum editor first');
+ const atoms = Array.isArray(params?.atoms) ? params.atoms.filter((a): a is string => typeof a === 'string') : null;
+ let frag = str(params?.fragment);
+ if (atoms?.length) {
+ if (!frag) frag = Object.values(client.doc.objects).find((o) => isFragment(o) && atoms.every((a) => a in o.atoms))?.id;
+ const f = frag ? client.doc.objects[frag] : undefined;
+ if (!isFragment(f) || !atoms.every((a) => a in f.atoms)) throw new Error('The atoms must all belong to one structure');
+ client.commit(t('Link Peak to Atoms'), linkOps(obj, mark, { object: f.id, atoms }));
+ return `Linked ${mark} to ${atoms.length} atoms of ${f.id}`;
+ }
+ const groups = [...atomsOfSelection(client.doc, view.selection(), false).entries()].filter(([, s]) => s.size);
+ if (groups.length === 1) {
+ const [fid, set] = groups[0];
+ client.commit(t('Link Peak to Atoms'), linkOps(obj, mark, { object: fid, atoms: [...set] }));
+ return `Linked ${mark} to ${set.size} atoms of ${fid}`;
+ }
+ openSpectrumEditor(obj.id);
+ linkSpectrumMark(mark);
+ return undefined;
+}
+
+function unlink(view: CanvasView, params?: Record): string {
+ const { client, obj } = need(view, params);
+ const mark = str(params?.peak) ?? str(params?.mark) ?? spectrumEditorMark();
+ const found = mark ? findMark(obj, mark) : null;
+ if (!mark || !found) throw new Error('Select a peak, integral or multiplet in the Spectrum editor first');
+ if (!found.mark.atoms) return 'It was not linked';
+ client.commit(t('Unlink Peak'), linkOps(obj, mark, null));
+ return `Unlinked ${mark}`;
+}
+
+function yMode(view: CanvasView, params?: Record): string {
+ const { client, obj } = need(view, params);
+ if (obj.technique !== 'ir' && obj.technique !== 'uvvis' && obj.technique !== 'raman') throw new Error('Only IR, Raman and UV-Vis spectra switch between transmittance and absorbance');
+ const asked = params?.mode === 'transmittance' || params?.mode === 'absorbance' ? (params.mode as YMode) : null;
+ const now = obj.view?.y_mode ?? (obj.technique === 'ir' ? 'transmittance' : 'absorbance');
+ const next: YMode = asked ?? (now === 'transmittance' ? 'absorbance' : 'transmittance');
+ const ops = yModeOps(obj, next);
+ if (ops.length) client.commit(t('Spectrum Y Axis'), ops);
+ return `Y axis: ${next}`;
+}
+
+async function exportSpectrum(view: CanvasView, params?: Record): Promise {
+ const { client, obj } = need(view, params);
+ const format: SpectrumExportFormat = params?.format === 'csv' ? 'csv' : 'jdx';
+ const file = await spectraApi.exportFile(client.doc, obj, format, params?.original === true);
+ const path = str(params?.path);
+ if (path) {
+ const out = await post<{ path: string }>('/api/files/write', { path, text: file.text });
+ return `Exported the spectrum to ${out.path}`;
+ }
+ const ext = format === 'csv' ? 'csv' : 'jdx';
+ const base = safeFileName(file.name.replace(/\.[^.]+$/, '') || client.doc.title || 'Spectrum', 'Spectrum');
+ const done = await saveFile({ name: `${base}.${ext}`, mime: file.mime, data: file.text, kind: format === 'csv' ? 'CSV' : 'JCAMP-DX' });
+ if (done.saved) toast(t(`Exported: ${done.name}`));
+ return done.saved ? `Exported the spectrum as ${done.path ?? done.name}` : undefined;
+}
+
+export function registerSpectrumCommands(deps: SpectrumCommandDeps): () => void {
+ const { view } = deps;
+ const open = (): boolean => !!view.client && !deps.homeOpen();
+ const has = (): boolean => {
+ if (!open()) return false;
+ try { return !!chosen(view); } catch { return false; }
+ };
+ const run = (what: string, fn: (v: CanvasView, p?: Record) => unknown) => (params?: Record): unknown => {
+ try {
+ const out = fn(view, params);
+ if (out instanceof Promise) return out.catch((e: unknown) => { fail(what)(e); throw e; });
+ return out;
+ } catch (e) {
+ fail(what)(e);
+ if (params) throw e;
+ return undefined;
+ }
+ };
+ const objectParam = { object: { type: 'string' as const, description: 'Spectrum object id; default the selected spectrum or the one open in the Spectrum editor' } };
+ const defs: CommandDef[] = [
+ {
+ id: 'open-spectrum', label: () => t('Spectrum from File...'), group: 'Insert', icon: 'spectrum', mutates: true,
+ description: 'Imports a JCAMP-DX spectrum file into the active drawing (one spectrum object per data block, the file kept byte for byte), as one undo step per file. Without path it opens a file dialog.',
+ params: { path: { type: 'string', description: 'Absolute path of a .jdx, .dx or .jcamp file' } },
+ run: (params) => importSpectrumFile(deps, str(params?.path)).catch((e: unknown) => { fail('Could not import the spectrum')(e); if (params?.path) throw e; return undefined; }),
+ },
+ {
+ id: 'edit-spectrum', label: () => t('Edit Spectrum...'), group: 'Edit', icon: 'spectrum',
+ description: 'Opens the Spectrum editor for the selected spectrum (the same as double-clicking it).',
+ params: objectParam, when: NEED_SPECTRUM, enabled: has,
+ run: run('Could not open the spectrum', (v, p) => { const c = need(v, p); openSpectrumEditor(c.obj.id); return `Opened ${c.obj.id}`; }),
+ },
+ {
+ id: 'pick-peaks', label: () => t('Pick Peaks'), group: 'Spectrum', icon: 'peakPick', mutates: true,
+ description: 'Finds the peaks of a spectrum in a range (default the range shown) and adds them to its peak list, skipping peaks already there, as one undo step.',
+ params: { ...objectParam, from: { type: 'number', description: 'Range start in the x unit (cm-1, nm, m/z, ppm)' }, to: { type: 'number', description: 'Range end in the x unit' }, threshold: { type: 'number', description: 'Optional detection threshold in y units' }, replace: { type: 'boolean', description: 'Replace the peak list instead of adding to it' } },
+ when: NEED_SPECTRUM, enabled: has, run: run('Could not pick peaks', pickPeaks),
+ },
+ {
+ id: 'integrate', label: () => t('Integrate'), group: 'Spectrum', icon: 'integral', mutates: true,
+ description: 'Adds an NMR integral over a range, scaled like the existing integrals (or to value, rescaling the rest), as one undo step. Without from and to it switches the Spectrum editor to its integrate tool.',
+ params: { ...objectParam, from: { type: 'number', description: 'Range start in ppm' }, to: { type: 'number', description: 'Range end in ppm' }, value: { type: 'number', description: 'Value this integral should read, for example a proton count' } },
+ when: NEED_SPECTRUM, enabled: has, run: run('Could not integrate', integrate),
+ },
+ {
+ id: 'link-peak-to-atoms', label: () => t('Link Peak to Atoms'), group: 'Spectrum', icon: 'link', mutates: true,
+ description: 'Links a peak, integral or multiplet to atoms of a structure, as one undo step. Without atoms it uses the selected atoms, or waits for the person to click atoms in the drawing.',
+ params: { ...objectParam, peak: { type: 'string', description: 'Peak, integral or multiplet id; default the one selected in the Spectrum editor' }, fragment: { type: 'string', description: 'Structure (fragment) id the atoms belong to' }, atoms: { type: 'array', description: 'Atom ids' } },
+ when: NEED_SPECTRUM, enabled: has, run: run('Could not link the peak', linkPeak),
+ },
+ {
+ id: 'unlink', label: () => t('Unlink Peak'), group: 'Spectrum', icon: 'unlink', mutates: true,
+ description: 'Removes the atom link of a peak, integral or multiplet, as one undo step.',
+ params: { ...objectParam, peak: { type: 'string', description: 'Peak, integral or multiplet id; default the one selected in the Spectrum editor' } },
+ when: NEED_SPECTRUM, enabled: has, run: run('Could not unlink the peak', unlink),
+ },
+ {
+ id: 'spectrum-y-mode', label: () => t('Transmittance or Absorbance'), group: 'Spectrum',
+ description: 'Shows an IR, Raman or UV-Vis spectrum as transmittance or absorbance (toggles without mode), as one undo step.',
+ params: { ...objectParam, mode: { type: 'string', enum: ['transmittance', 'absorbance'], description: 'Y axis to show; leave out to toggle' } },
+ when: NEED_SPECTRUM, enabled: has, run: run('Could not change the y axis', yMode),
+ },
+ {
+ id: 'export-spectrum', label: () => t('Export Spectrum...'), group: 'Spectrum', icon: 'download',
+ description: 'Saves a spectrum as JCAMP-DX (with its peak table when it has peaks) or as CSV of every point, through the engine.',
+ params: { ...objectParam, format: { type: 'string', enum: ['jdx', 'csv'], description: 'File format, default jdx' }, original: { type: 'boolean', description: 'With jdx: the original imported file untouched' }, path: { type: 'string', description: 'Absolute path to write; leave out to ask' } },
+ when: NEED_SPECTRUM, enabled: has, run: run('Could not export the spectrum', exportSpectrum),
+ },
+ ];
+ return commands.register(...defs);
+}
+
+export const SPECTRUM_COMMAND_IDS: readonly Id[] = ['open-spectrum', 'edit-spectrum', 'pick-peaks', 'integrate', 'link-peak-to-atoms', 'unlink', 'spectrum-y-mode', 'export-spectrum'];
diff --git a/frontend/src/app/spectrum-import.ts b/frontend/src/app/spectrum-import.ts
new file mode 100644
index 00000000..b0baa3c8
--- /dev/null
+++ b/frontend/src/app/spectrum-import.ts
@@ -0,0 +1,75 @@
+import type { DocumentClient } from '../engine/client-api';
+import { session } from '../engine/session';
+import { resolveStyle } from '../engine/model';
+import { t } from '../i18n';
+import { post, upload } from '../io/api';
+import { inTauri } from '../ui/dom';
+import { showImportReport } from '../ui/import-report';
+import { flashHint } from '../ui/status';
+import { toast } from '../ui/toast';
+import { clipBounds, clipPage, readClip, CLIP_KIND, type Bounds } from './clip-data';
+import type { ClipboardApi } from './clipboard';
+import { freeSpot } from './import-files';
+
+export interface SpectrumImportDeps {
+ clip: ClipboardApi;
+ reveal(client: DocumentClient, box: Bounds): void;
+ leaveHome(): void;
+}
+
+interface ImportAnswer { name?: string; format?: string; document?: unknown; media?: Record; keep_style?: boolean; report?: unknown[] }
+
+const IMPORT_URL = '/api/documents/import';
+export const SPECTRUM_EXTENSIONS = ['jdx', 'dx', 'jcamp'];
+const ACCEPT = SPECTRUM_EXTENSIONS.map((e) => `.${e}`).join(',');
+
+const baseName = (path: string): string => path.split(/[\\/]/).pop() || path;
+
+function chooseInBrowser(): Promise {
+ return new Promise((resolve) => {
+ const input = document.createElement('input');
+ input.type = 'file';
+ input.accept = ACCEPT;
+ input.addEventListener('change', () => resolve(input.files?.[0] ?? null), { once: true });
+ input.addEventListener('cancel', () => resolve(null), { once: true });
+ input.click();
+ });
+}
+
+async function chooseInDesktop(): Promise {
+ const { invoke } = await import('@tauri-apps/api/core');
+ const found = await invoke('plugin:dialog|open', {
+ options: { multiple: false, directory: false, title: t('Insert Spectrum from File'), filters: [{ name: 'JCAMP-DX', extensions: SPECTRUM_EXTENSIONS }] },
+ });
+ return (Array.isArray(found) ? found[0] : found) || null;
+}
+
+export async function importSpectrumFile(deps: SpectrumImportDeps, given?: string): Promise {
+ if (given !== undefined && !/^(\/|[A-Za-z]:[\\/]|~[\\/])/.test(given.trim())) throw new Error(t('Give the absolute path of the file to import.'));
+ let source: { name: string; path: string } | { name: string; file: File } | null = null;
+ if (given) source = { name: baseName(given.trim()), path: given.trim() };
+ else if (inTauri()) { const p = await chooseInDesktop(); if (p) source = { name: baseName(p), path: p }; }
+ else { const f = await chooseInBrowser(); if (f) source = { name: f.name, file: f }; }
+ if (!source) return undefined;
+ deps.leaveHome();
+ const target = session.active;
+ const bond = target ? resolveStyle(target.doc).bond_length : undefined;
+ const opts = { limit: 50, ...(bond ? { bond_length: bond } : {}) };
+ const answer = 'path' in source
+ ? await post(IMPORT_URL, { path: source.path, ...opts })
+ : await upload(`${IMPORT_URL}?${new URLSearchParams(Object.entries(opts).map(([k, v]) => [k, String(v)]))}`, [source.file], 'file');
+ const doc = readClip(JSON.stringify(answer.document ?? null));
+ const page = doc ? clipPage(doc) : null;
+ if (!doc || !page || !page.order.some((id) => doc.objects[id]?.kind === 'spectrum')) throw new Error(t('The file holds no spectrum FormChem can draw'));
+ if (answer.media && Object.keys(answer.media).length) doc.meta = { ...doc.meta, clipboard: { kind: CLIP_KIND, from: '', page: page.id, media: answer.media } };
+ const name = answer.name || source.name;
+ const got = await deps.clip.insert(doc, { label: `${t('Insert Spectrum')} ${name}`, keepStyle: !!answer.keep_style, spot: freeSpot });
+ if (!got) throw new Error(t('the drawing did not accept it'));
+ const box = clipBounds(got.client.doc, { id: '', size: 'auto', order: got.plan.top });
+ if (box) deps.reveal(got.client, box);
+ showImportReport(name, answer.format ?? 'JCAMP-DX', answer.report, true);
+ const n = got.plan.objects.filter((id) => got.client.doc.objects[id]?.kind === 'spectrum').length;
+ flashHint(t(`Inserted spectra: ${n}`));
+ if (!n) toast(t('The spectrum could not be placed: its file did not reach the drawing.'), 'error');
+ return `Inserted ${n} spectrum object${n === 1 ? '' : 's'} from ${name} into "${got.client.doc.title || 'Untitled'}" (${got.client.id}), one undo step`;
+}
diff --git a/frontend/src/app/view3d-commands.ts b/frontend/src/app/view3d-commands.ts
new file mode 100644
index 00000000..156f218e
--- /dev/null
+++ b/frontend/src/app/view3d-commands.ts
@@ -0,0 +1,381 @@
+import { fragmentSelection, fragmentsTouched, isEmpty } from '../canvas/selection';
+import type { CanvasView } from '../canvas/view';
+import { commands, type CommandDef } from '../commands/registry';
+import { fragmentBounds, newId, type Id, type Model3dObject, type Model3dStyle } from '../engine/model';
+import { threeApi, untilRev, type StructureFormat } from '../engine/three-api';
+import { t } from '../i18n';
+import type { File3dFormat } from '../ui/structure3d-dialogs';
+import { toast } from '../ui/toast';
+import type { ExportKind, SurfaceChoice, View3dHost, View3dPanel, View3dTarget } from '../ui/view3d-panel';
+import { VERSION } from '../version';
+import { commandStateChanged } from './commands-shell';
+import { safeFileName, saveFile } from './save-file';
+
+export interface View3dDeps { view: CanvasView; homeOpen(): boolean }
+
+export const VIEW3D_COMMAND_IDS: readonly string[] = [
+ 'view-3d', 'build-3d', 'minimize-3d', 'conformers', 'insert-3d-view', 'open-3d-structure', 'extract-ligand', 'dihedral-scan', 'measure-3d', 'export-3d-png', 'export-gltf', 'export-3d-file',
+ 'surface-none', 'surface-vdw', 'surface-sas', 'surface-ses', 'surface-esp',
+ 'style-wire', 'style-stick', 'style-ballstick', 'style-spacefill', 'style-cartoon',
+];
+
+export const VIEW3D_MENU: readonly (string | '-')[] = [
+ 'view-3d', 'insert-3d-view', 'open-3d-structure', 'extract-ligand', '-', 'build-3d', 'minimize-3d', 'conformers', 'dihedral-scan', 'measure-3d', '-',
+ 'style-wire', 'style-stick', 'style-ballstick', 'style-spacefill', 'style-cartoon', '-', 'surface-none', 'surface-vdw', 'surface-sas', 'surface-ses', 'surface-esp', '-', 'export-3d-png', 'export-gltf', 'export-3d-file',
+];
+
+const FILE_MIME: Record = { mol: 'chemical/x-mdl-molfile', sdf: 'chemical/x-mdl-sdfile', pdb: 'chemical/x-pdb', xyz: 'chemical/x-xyz' };
+const FILE_KIND: Record = { mol: 'MDL Molfile', sdf: 'SD File', pdb: 'PDB', xyz: 'XYZ' };
+
+const MODEL_PT = 180;
+const GAP_PT = 24;
+const STRUCTURE_ACCEPT = '.pdb,.ent,.cif,.mmcif,.sdf,.mol,chemical/x-pdb,chemical/x-mmcif';
+const errText = (e: unknown): string => t(e instanceof Error ? e.message : String(e));
+
+let panel: View3dPanel | null = null;
+let loading: Promise | null = null;
+
+function loadPanel(): Promise {
+ loading ??= import('../ui/view3d-panel').then((m) => {
+ panel = m.view3dPanel();
+ panel.exporter = (kind) => exportView(kind);
+ return panel;
+ }).catch((e: unknown) => { loading = null; throw e; });
+ return loading;
+}
+
+const panelOpen = (): boolean => !!panel?.isOpen;
+
+function formatOf(name: string): StructureFormat | null {
+ const ext = name.toLowerCase().split('.').pop() ?? '';
+ return ext === 'pdb' || ext === 'ent' ? 'pdb' : ext === 'cif' || ext === 'mmcif' ? 'cif' : ext === 'sdf' ? 'sdf' : ext === 'mol' ? 'mol' : null;
+}
+
+function pickFile(): Promise {
+ return new Promise((resolve) => {
+ const input = document.createElement('input');
+ input.type = 'file';
+ input.accept = STRUCTURE_ACCEPT;
+ input.addEventListener('change', () => resolve(input.files?.[0] ?? null), { once: true });
+ input.addEventListener('cancel', () => resolve(null), { once: true });
+ input.click();
+ });
+}
+
+async function exportView(kind: ExportKind): Promise {
+ const p = panel;
+ if (!p) return;
+ const base = safeFileName(p.title(), 'Molecule');
+ try {
+ if (kind === 'glb') {
+ const scene = p.scene();
+ if (!scene?.atoms.length) { toast(t('Nothing to export: the 3D view is empty.')); return; }
+ const { writeGlb } = await import('../io/glb');
+ const data = writeGlb(scene, { generator: `FormChem ${VERSION}`, name: base });
+ const r = await saveFile({ name: `${base}.glb`, mime: 'model/gltf-binary', data, kind: 'glTF' });
+ if (r.saved) toast(t(`Exported ${r.name}`));
+ return;
+ }
+ const uri = p.png(kind === 'png-clear');
+ if (!uri) { toast(t('Nothing to export: the 3D view is empty.')); return; }
+ const bytes = new Uint8Array(await (await fetch(uri)).arrayBuffer());
+ const r = await saveFile({ name: `${base}-3d.png`, mime: 'image/png', data: bytes, kind: 'PNG' });
+ if (r.saved) toast(t(`Exported ${r.name}`));
+ } catch (e) {
+ toast(`${t('Export failed')}: ${errText(e)}`, 'error');
+ }
+}
+
+export function registerView3dCommands(deps: View3dDeps): () => void {
+ const { view } = deps;
+ const open = (): boolean => !!view.client && !deps.homeOpen();
+
+ const selectedFragment = (): Id | null => {
+ if (!view.client) return null;
+ const doc = view.doc;
+ const sel = view.selection();
+ if (!isEmpty(sel)) {
+ for (const id of [...fragmentsTouched(sel), ...sel.objects]) {
+ const o = doc.objects[id];
+ if (o?.kind === 'fragment' && Object.keys(o.atoms).length) return id;
+ if (o?.kind === 'model3d' && 'fragment' in o.source) return o.source.fragment;
+ }
+ }
+ const frags = (view.page()?.order ?? []).filter((id) => doc.objects[id]?.kind === 'fragment');
+ return frags.length === 1 ? frags[0] : null;
+ };
+
+ const selectedModel = (): Id | null => {
+ if (!view.client) return null;
+ const sel = view.selection();
+ if (sel.atoms.size || sel.bonds.size || sel.objects.size !== 1) return null;
+ const id = [...sel.objects][0];
+ return view.doc.objects[id]?.kind === 'model3d' ? id : null;
+ };
+
+ const host: View3dHost = {
+ client: () => (deps.homeOpen() ? null : view.client),
+ selectedFragment,
+ onSelection: (fn) => view.on('selection', fn),
+ };
+
+ const show = async (target?: View3dTarget): Promise => {
+ const p = await loadPanel();
+ const model = selectedModel();
+ await p.open(host, target ?? (model ? { object: model } : {}));
+ commandStateChanged();
+ return p;
+ };
+
+ const withPanel = (fn: (p: View3dPanel) => unknown) => async (): Promise => fn(await show(panel?.isOpen ? currentTarget() : undefined));
+ const currentTarget = (): View3dTarget | undefined => (panel?.boundObject ? { object: panel.boundObject } : undefined);
+
+ async function insertView(): Promise {
+ const client = view.client, page = view.page();
+ const fid = selectedFragment();
+ if (!client || !page || !fid) { toast(t('Select a structure to show in 3D.')); return null; }
+ let frag = client.doc.objects[fid];
+ if (frag?.kind !== 'fragment') return null;
+ if (!frag.conformers?.length) {
+ try {
+ const a = await threeApi.build(client.id, fid, { minimise: true });
+ await untilRev(client, a.rev);
+ } catch (e) {
+ toast(`${t('Build 3D')}: ${errText(e)}`, 'error');
+ return null;
+ }
+ frag = client.doc.objects[fid];
+ if (frag?.kind !== 'fragment') return null;
+ }
+ const b = fragmentBounds(frag);
+ const obj: Model3dObject = {
+ id: newId('o'), kind: 'model3d',
+ x: (b ? b.x + b.w : 0) + GAP_PT, y: (b ? b.y + b.h / 2 : 0) - MODEL_PT / 2, w: MODEL_PT, h: MODEL_PT,
+ source: { fragment: fid }, display: 'ballstick',
+ };
+ const tx = client.commit(t('Insert 3D View'), [
+ { op: 'set', path: ['objects', obj.id], value: obj },
+ { op: 'ins', path: ['pages', { id: page.id }, 'order'], value: obj.id },
+ ]);
+ if (!tx) return null;
+ await show({ object: obj.id });
+ return obj.id;
+ }
+
+ async function openStructure(): Promise {
+ const file = await pickFile();
+ if (!file) return null;
+ const format = formatOf(file.name);
+ if (!format) { toast(t('Choose a PDB, mmCIF, SDF or MOL file.'), 'error'); return null; }
+ const client = view.client, page = view.page();
+ if (client && page && !deps.homeOpen()) {
+ const r = view.root.getBoundingClientRect();
+ const at = view.toDoc(r.left + r.width / 2, r.top + r.height / 2);
+ try {
+ const a = await threeApi.open(client.id, file, { page: page.id, x: at[0] - MODEL_PT / 2, y: at[1] - MODEL_PT / 2 });
+ await untilRev(client, a.rev);
+ const id = a.object?.id ?? null;
+ if (id && client.doc.objects[id]) { await show({ object: id }); return id; }
+ } catch (e) {
+ toast(`${t('Could not place the 3D structure on the page')}: ${errText(e)}`, 'error');
+ }
+ }
+ const p = await loadPanel();
+ await p.showLocal(host, await file.text(), format, file.name);
+ return null;
+ }
+
+ const fileModel = (): Id | null => {
+ if (!view.client) return null;
+ const id = selectedModel() ?? panel?.boundObject ?? null;
+ const o = id ? view.doc.objects[id] : null;
+ return o?.kind === 'model3d' && 'media' in o.source && (o.source.format === 'pdb' || o.source.format === 'cif') ? id : null;
+ };
+
+ async function extractLigand(given?: string): Promise {
+ const client = view.client;
+ const id = fileModel();
+ const o = client && id ? client.doc.objects[id] : null;
+ if (!client || !id || o?.kind !== 'model3d') { toast(t('Select a 3D object opened from a PDB or mmCIF file.')); return null; }
+ try {
+ let ligand = given;
+ if (ligand === undefined) {
+ const all = (await threeApi.structure(client.id, id)).summary.ligands;
+ if (!all.length) { toast(t('This model has no ligands.')); return null; }
+ ligand = all.length === 1 ? all[0].key : (await (await import('../ui/structure3d-dialogs')).askLigand(all, o.focus?.residue)) ?? undefined;
+ if (!ligand) return null;
+ }
+ const a = await threeApi.extractLigand(client.id, id, { ligand, x: o.x + o.w + GAP_PT, y: o.y });
+ await untilRev(client, a.rev);
+ const f = a.fragment ? client.doc.objects[a.fragment] : null;
+ if (f?.kind === 'fragment' && view.client === client) view.setSelection(fragmentSelection(f));
+ const key = a.ligand?.key ?? ligand;
+ toast(a.bonds === 'perceived' ? t(`Extracted ${key}: ${a.smiles} (bond orders inferred)`) : t(`Extracted ${key}: ${a.smiles}`));
+ return { fragment: a.fragment, ligand: key, smiles: a.smiles, bonds: a.bonds, warnings: a.warnings.map((w) => w.text) };
+ } catch (e) {
+ toast(`${t('Could not extract the ligand')}: ${errText(e)}`, 'error');
+ throw e;
+ }
+ }
+
+ async function exportFile(params?: Record): Promise {
+ const client = view.client;
+ if (!client) return null;
+ const model = selectedModel() || !selectedFragment() ? fileModel() : null;
+ const m = model ? client.doc.objects[model] : null;
+ try {
+ if (m?.kind === 'model3d' && 'media' in m.source) {
+ const fmt = m.source.format === 'pdb' ? 'pdb' : 'cif';
+ const name = client.doc.media?.[m.source.media]?.name || `${safeFileName(client.doc.title, 'Structure')}.${fmt}`;
+ const text = await threeApi.mediaText(client.id, m.source.media);
+ const r = await saveFile({ name, mime: fmt === 'pdb' ? 'chemical/x-pdb' : 'chemical/x-mmcif', data: text, kind: fmt === 'pdb' ? 'PDB' : 'mmCIF' });
+ if (r.saved) toast(t(`Exported ${r.name}`));
+ return r.saved ? `Saved the original ${fmt} file to ${r.path ?? r.name}` : 'Cancelled';
+ }
+ const fid = selectedFragment();
+ const frag = fid ? client.doc.objects[fid] : null;
+ if (!fid || frag?.kind !== 'fragment') { toast(t('Select a structure to show in 3D.')); return null; }
+ const count = frag.conformers?.length ?? 0;
+ if (!count) { toast(t('No 3D coordinates yet: Build 3D makes a conformer from the drawing.')); return null; }
+ const given = (['mol', 'sdf', 'pdb', 'xyz'] as const).find((f) => f === params?.format) ?? null;
+ const ask = given ?{ format: given, all: typeof params?.all === 'boolean' ? params.all : given === 'sdf' } : await (await import('../ui/structure3d-dialogs')).askFile3d(count);
+ if (!ask) return null;
+ const a = await threeApi.file(client.id, fid, ask.format, ask.all && ask.format !== 'mol' ? 'all' : undefined);
+ const name = a.filename || `${safeFileName(client.doc.title, 'Structure')}.${ask.format}`;
+ const r = await saveFile({ name, mime: FILE_MIME[ask.format], data: a.text, kind: FILE_KIND[ask.format] });
+ if (r.saved) toast(t(`Exported ${r.name}`));
+ return r.saved ? `Saved ${a.count} conformer${a.count === 1 ? '' : 's'} as ${ask.format} to ${r.path ?? r.name}` : 'Cancelled';
+ } catch (e) {
+ toast(`${t('Export failed')}: ${errText(e)}`, 'error');
+ throw e;
+ }
+ }
+
+ view.root.addEventListener('dblclick', (e) => {
+ if (!open()) return;
+ const at = view.toDoc(e.clientX, e.clientY);
+ const hit = view.hitTest(at);
+ const id = hit.kind === 'object' ? hit.object : null;
+ const o = id ? view.doc.objects[id] : null;
+ if (!id || o?.kind !== 'model3d') return;
+ e.preventDefault();
+ view.setSelection({ atoms: new Set(), bonds: new Set(), objects: new Set([id]) });
+ void show({ object: id });
+ });
+
+ const needDrawing = 'Open or create a drawing first';
+ const needView = 'Open the 3D View first';
+ const style = (key: Model3dStyle, label: string, description: string): CommandDef => ({
+ id: `style-${key}`, label: () => t(label), group: '3D', mutates: true, description,
+ when: needView, enabled: panelOpen, run: withPanel((p) => p.setDisplay(key)),
+ });
+ const surface = (key: SurfaceChoice | 'esp', label: string, description: string): CommandDef => ({
+ id: `surface-${key}`, label: () => t(label), group: '3D', mutates: true, description, when: needView, enabled: panelOpen,
+ run: withPanel((p) => (key === 'esp' ? p.setEsp(true) : p.setSurface(key))),
+ });
+
+ const defs: CommandDef[] = [
+ {
+ id: 'view-3d', label: () => t('3D View'), group: '3D', icon: 'model3d', keys: ['Mod+3'],
+ description: 'Opens the 3D View panel on the selected structure (or the selected 3D object on the page) and follows the selection. A structure needs 3D coordinates first: Build 3D makes them.',
+ checked: panelOpen,
+ run: async () => { if (panel?.isOpen && !selectedModel()) { panel.close(); commandStateChanged(); return; } await show(); },
+ },
+ {
+ id: 'build-3d', label: () => t('Build 3D from 2D'), group: '3D', icon: 'model3d', mutates: true,
+ description: 'Builds a 3D conformer of the selected structure from its 2D drawing (wedges, double-bond geometry and charges kept), minimises it with the chosen force field and stores it in the drawing as one undo step; the 3D View shows it.',
+ when: needDrawing, enabled: open, run: withPanel((p) => p.build()),
+ },
+ {
+ id: 'minimize-3d', label: () => t('Minimise Energy'), group: '3D', mutates: true,
+ description: 'Minimises the shown conformer of the selected structure with the force field chosen in the 3D View (MMFF94 by default, UFF when MMFF94 has no parameters) and reports the energy before and after, as one undo step.',
+ when: needDrawing, enabled: open, run: withPanel((p) => p.minimise()),
+ },
+ {
+ id: 'conformers', label: () => t('Conformers...'), group: '3D', mutates: true,
+ description: 'Generates a conformer ensemble of the selected structure (ETKDG, RMSD pruned, each minimised) and keeps those within an energy window; with n, window and method it runs without the dialog.',
+ params: {
+ n: { type: 'integer', min: 1, max: 1000, description: 'Conformers to generate', example: '50' },
+ window: { type: 'number', min: 0.1, max: 100, description: 'Energy window in kcal/mol', example: '10' },
+ method: { type: 'string', enum: ['MMFF94', 'MMFF94s', 'UFF'], description: 'Force field' },
+ },
+ when: needDrawing, enabled: open,
+ run: async (params) => {
+ const p = await show(panel?.isOpen ? currentTarget() : undefined);
+ const n = typeof params?.n === 'number' ? params.n : undefined;
+ if (n === undefined) return p.conformers();
+ const method = params?.method === 'UFF' || params?.method === 'MMFF94s' ? params.method : 'MMFF94';
+ return p.conformers({ n, window: typeof params?.window === 'number' ? params.window : 10, method });
+ },
+ },
+ {
+ id: 'insert-3d-view', label: () => t('Insert 3D View'), group: '3D', icon: 'model3d', mutates: true,
+ description: 'Places a 3D view of the selected structure on the page beside it (building 3D coordinates first when it has none) and opens the 3D View panel bound to it; turning or restyling the model updates the picture on the page.',
+ when: needDrawing, enabled: open, run: () => insertView(),
+ },
+ {
+ id: 'open-3d-structure', label: () => t('3D Structure File...'), group: '3D', icon: 'folderOpen', mutates: true,
+ description: 'Opens a PDB, mmCIF, SDF or MOL file as a 3D object on the page (proteins as cartoon with ligands as ball and stick, waters hidden, the ligand focused) and shows it in the 3D View.',
+ run: () => openStructure(),
+ },
+ {
+ id: 'extract-ligand', label: () => t('Extract Ligand...'), group: '3D', icon: 'model3d', mutates: true,
+ description: 'Turns a ligand of the selected 3D object (opened from a PDB or mmCIF file) into a 2D structure beside it as one undo step: bond orders from a built-in template for common ligands, otherwise inferred from the geometry and reported; the file coordinates become its conformer. With ligand it takes that one; without it asks when the model has several.',
+ params: { ligand: { type: 'string', description: 'Ligand key chain:het:number, or a het code', example: 'A:ATP:301' } },
+ when: 'Select a 3D object opened from a PDB or mmCIF file', enabled: () => open() && !!fileModel(),
+ run: (params) => extractLigand(typeof params?.ligand === 'string' && params.ligand ? params.ligand : undefined),
+ },
+ {
+ id: 'export-3d-file', label: () => t('Export 3D Structure...'), group: '3D', icon: 'download',
+ description: 'Saves the 3D coordinates of the selected structure with every hydrogen: MDL molfile (the shown conformer), SD file (every conformer, with energy and method data fields), PDB or XYZ (the shown conformer, or every conformer as models or frames); a 3D object opened from a PDB or mmCIF file saves its original file. Without format it asks.',
+ params: {
+ format: { type: 'string', enum: ['mol', 'sdf', 'pdb', 'xyz'], description: 'File format' },
+ all: { type: 'boolean', description: 'Every conformer instead of the shown one (default true for sdf)' },
+ },
+ when: needDrawing, enabled: open, run: (params) => exportFile(params),
+ },
+ {
+ id: 'dihedral-scan', label: () => t('Dihedral Scan...'), group: '3D', icon: 'chartLine',
+ description: 'Scans the dihedral of the four atoms picked in the 3D View (or its last dihedral measurement) with relaxed minimisation and plots angle against energy.',
+ when: needView, enabled: panelOpen, run: withPanel((p) => p.scan()),
+ },
+ {
+ id: 'measure-3d', label: () => t('Measure in 3D'), group: '3D', icon: 'ruler', mutates: true,
+ description: 'Measures a distance (two atoms), angle (three) or dihedral (four) in the 3D View and lists it; with atoms (fragment atom ids such as a1, hydrogens as a1:h0, or PDB serial numbers) it measures those, else it switches to picking.',
+ params: { atoms: { type: 'array', description: 'Two to four atom ids', example: '["a1", "a2"]' } },
+ when: needView, enabled: panelOpen,
+ run: async (params) => {
+ const p = await show(currentTarget());
+ const atoms = Array.isArray(params?.atoms) ? params.atoms.map(String) : [];
+ const kind = atoms.length === 2 ? 'distance' : atoms.length === 3 ? 'angle' : atoms.length === 4 ? 'dihedral' : null;
+ if (!kind) { p.setMeasure('distance'); return { measurements: p.marksNow() }; }
+ const m = p.measureAtoms(kind, atoms);
+ return m ? { kind: m.kind, value: m.value, atoms: m.atoms } : { error: 'those atoms are not in the 3D View' };
+ },
+ },
+ {
+ id: 'export-3d-png', label: () => t('Export 3D View as PNG...'), group: '3D', icon: 'download',
+ description: 'Saves the 3D View as a PNG picture at its on-screen size; transparent leaves out the background.',
+ params: { transparent: { type: 'boolean', description: 'Transparent background' } },
+ when: needView, enabled: panelOpen, run: (params) => exportView(params?.transparent === true ? 'png-clear' : 'png'),
+ },
+ {
+ id: 'export-gltf', label: () => t('Export 3D View as glTF...'), group: '3D', icon: 'download',
+ description: 'Saves the 3D View as a binary glTF 2.0 file (.glb): atoms as spheres and bonds as cylinders with element colours, 1 angstrom = 1 cm, for 3D viewers, slides and printing.',
+ when: needView, enabled: panelOpen, run: () => exportView('glb'),
+ },
+ surface('none', 'No Surface', 'Removes the molecular surface from the 3D View.'),
+ surface('vdw', 'Van der Waals Surface', 'Shows the van der Waals surface in the 3D View.'),
+ surface('sas', 'Solvent Accessible Surface', 'Shows the solvent accessible surface (probe 1.4 angstrom) in the 3D View.'),
+ surface('ses', 'Solvent Excluded Surface', 'Shows the solvent excluded surface in the 3D View.'),
+ surface('esp', 'ESP-Mapped Surface', 'Colours the surface by an approximate electrostatic potential from the engine\'s empirical partial charges (red negative, blue positive), with a legend naming the method.'),
+ style('wire', 'Wire', 'Shows the 3D View in wire style; on a 3D object on the page the choice is saved with it.'),
+ style('stick', 'Stick', 'Shows the 3D View in stick style; on a 3D object on the page the choice is saved with it.'),
+ style('ballstick', 'Ball and Stick', 'Shows the 3D View in ball and stick style; on a 3D object on the page the choice is saved with it.'),
+ style('spacefill', 'Space Filling', 'Shows the 3D View in space filling style; on a 3D object on the page the choice is saved with it.'),
+ style('cartoon', 'Cartoon', 'Shows the 3D View in cartoon style (proteins and nucleic acids; ligands stay ball and stick); on a 3D object on the page the choice is saved with it.'),
+ ];
+
+ for (const id of VIEW3D_COMMAND_IDS) if (commands.get(id)?.enabled?.() === false && commands.get(id)?.description?.startsWith('Arrives in')) commands.unregister(id);
+ return commands.register(...defs);
+}
diff --git a/frontend/src/canvas/context.ts b/frontend/src/canvas/context.ts
index ed595551..004288cb 100644
--- a/frontend/src/canvas/context.ts
+++ b/frontend/src/canvas/context.ts
@@ -270,7 +270,11 @@ export function canvasMenuItems(host: CanvasMenuHost, hit: Hit): { items: MenuIt
else if (hit.kind === 'bond') items = [...bondItems(host, hit.frag, hit.bond, temp), ...chem()];
else if (hit.kind === 'object') {
if (!hasHit(sel, hit)) host.setSelection(selectHit(hit));
- items = selectionItems(host, temp);
+ const o = host.doc.objects[hit.object];
+ const spectrum: MenuItem[] = o?.kind === 'spectrum'
+ ? ['edit-spectrum', 'pick-peaks', o.technique === 'nmr' ? 'integrate' : 'spectrum-y-mode', ...('predicted' in o.source ? ['nmr-refresh'] : []), 'export-spectrum', '-']
+ : [];
+ items = [...spectrum, ...selectionItems(host, temp)];
} else items = backgroundItems(host, temp);
return { items, temp };
}
diff --git a/frontend/src/canvas/render/model3d.ts b/frontend/src/canvas/render/model3d.ts
new file mode 100644
index 00000000..191c7b07
--- /dev/null
+++ b/frontend/src/canvas/render/model3d.ts
@@ -0,0 +1,58 @@
+import type { FormChemDocument, Id, Model3dObject } from '../../engine/model';
+import { fmt } from './geom';
+import { mediaCache } from './image';
+import type { ObjectCtx, ObjectKindDef, ObjectView } from './objects';
+import { label } from './paint';
+import type { Attrs, NodeSpec } from './svg';
+
+const shown = new Map();
+
+function snapshotHref(obj: Model3dObject, ctx: ObjectCtx): string | null {
+ if (obj.snapshot) {
+ const ref = ctx.media(obj.snapshot);
+ if (ref.href) {
+ shown.set(obj.id, ref.href);
+ return ref.href;
+ }
+ if (!ref.failed) return shown.get(obj.id) ?? null;
+ }
+ return null;
+}
+
+function placeholder(obj: Model3dObject, ctx: ObjectCtx): NodeSpec[] {
+ const { x, y, w, h } = obj;
+ const c = ctx.colour;
+ const lw = fmt(ctx.style.line_width);
+ const a: Attrs = { fill: 'none', stroke: c, 'stroke-opacity': '0.4', 'stroke-width': lw, class: 'fc-ln fc-model3d-empty' };
+ const s = Math.min(w, h) * 0.22;
+ const cx = x + w / 2, cy = y + h / 2 - (h > 40 ? s * 0.35 : 0);
+ const k = (dx: number, dy: number): string => `${fmt(cx + dx * s)} ${fmt(cy + dy * s)}`;
+ const cube = `M${k(0, -1)}L${k(0.87, -0.5)}L${k(0.87, 0.5)}L${k(0, 1)}L${k(-0.87, 0.5)}L${k(-0.87, -0.5)}Z M${k(0, 0)}L${k(0, 1)} M${k(0, 0)}L${k(-0.87, -0.5)} M${k(0, 0)}L${k(0.87, -0.5)}`;
+ const out: NodeSpec[] = [
+ { tag: 'rect', a: { ...a, x: fmt(x), y: fmt(y), width: fmt(w), height: fmt(h), 'stroke-dasharray': `${fmt(3)} ${fmt(2)}` } },
+ { tag: 'path', a: { ...a, d: cube, 'stroke-linejoin': 'round' } },
+ ];
+ if (h > 40 && w > 40) {
+ const font = ctx.style.caption_font;
+ const size = Math.min(font.size, h / 8);
+ const lab = label('3D', [cx, cy + s + size * 1.4], font, size, c, 'middle');
+ lab.spec.a['fill-opacity'] = '0.55';
+ out.push(lab.spec);
+ }
+ return out;
+}
+
+function model3dView(obj: Model3dObject, ctx: ObjectCtx): ObjectView {
+ const { x, y, w, h } = obj;
+ const href = snapshotHref(obj, ctx);
+ const specs: NodeSpec[] = href
+ ? [{ tag: 'image', a: { href, x: fmt(x), y: fmt(y), width: fmt(w), height: fmt(h), preserveAspectRatio: 'xMidYMid meet', class: 'fc-model3d-snapshot' } }]
+ : placeholder(obj, ctx);
+ return { specs, box: { x, y, w, h } };
+}
+
+function model3dDeps(obj: Model3dObject, doc: FormChemDocument): unknown[] {
+ return [doc.id, obj.snapshot ? doc.media?.[obj.snapshot] : null, mediaCache.epoch];
+}
+
+export const model3dKind: ObjectKindDef<'model3d'> = { view: model3dView, deps: model3dDeps };
diff --git a/frontend/src/canvas/render/objects.ts b/frontend/src/canvas/render/objects.ts
index 27a6cff2..159a4b75 100644
--- a/frontend/src/canvas/render/objects.ts
+++ b/frontend/src/canvas/render/objects.ts
@@ -9,6 +9,8 @@ import { tableKind } from './table';
import { imageKind } from './image';
import { tlcKind } from './tlc';
import { orbitalKind } from './orbital';
+import { model3dKind } from './model3d';
+import { spectrumKind } from './spectrum';
import { groupKind } from './group';
import { captionKind, textKind } from './caption';
import type { Box, V } from './geom';
@@ -30,6 +32,7 @@ export interface ObjectCtx {
derived: Derived | null;
boxOf(id: Id): Box | null;
media(id: Id): MediaRef;
+ scale?: number;
}
export interface ObjectView { specs: NodeSpec[]; box: Box | null }
@@ -40,6 +43,8 @@ export interface ObjectKindDef {
view(obj: ObjectOf, ctx: ObjectCtx): ObjectView;
deps?(obj: ObjectOf, doc: FormChemDocument): unknown[];
derived?: boolean;
+ scaled?: boolean;
+ watch?(changed: () => void): () => void;
}
type Registry = { [K in ObjectKind]?: ObjectKindDef };
@@ -54,6 +59,8 @@ export const OBJECT_KINDS: Registry = {
image: imageKind,
tlc: tlcKind,
orbital: orbitalKind,
+ spectrum: spectrumKind,
+ model3d: model3dKind,
group: groupKind,
text: textKind,
caption: captionKind,
diff --git a/frontend/src/canvas/render/renderer.ts b/frontend/src/canvas/render/renderer.ts
index b20da7d3..00c0c056 100644
--- a/frontend/src/canvas/render/renderer.ts
+++ b/frontend/src/canvas/render/renderer.ts
@@ -8,7 +8,7 @@ import { fmt, union, type Box, type V } from './geom';
import { mediaCache } from './image';
import type { Neighbour, ShownStyle } from './label';
import { measure } from './measure';
-import { docChem, kindDef, objectDeps, type ChemGeometry, type ObjectCtx } from './objects';
+import { docChem, kindDef, objectDeps, OBJECT_KINDS, type ChemGeometry, type ObjectCtx } from './objects';
import { MarkLayer, type Geometry, type Mark } from './overlay';
import { perceive, type Topology } from './rings';
import { Keyed, setAttrs, svgEl, type NodeSpec } from './svg';
@@ -162,6 +162,8 @@ export function createRenderer(): FormChemRenderer {
let objNodes: Keyed | null = null;
let derivedNow: Derived | null = null;
let mediaWatch: (() => void) | null = null;
+ let kindWatch: (() => void)[] = [];
+ let scaleNow = 1;
let selection: MarkLayer | null = null;
let hover: MarkLayer | null = null;
let warnings: MarkLayer | null = null;
@@ -410,6 +412,7 @@ export function createRenderer(): FormChemRenderer {
derived: derivedNow,
boxOf: (id) => geometry.objectBox(id),
media: (m) => mediaCache.ref(doc!, m),
+ scale: scaleNow,
});
function syncObject(id: Id, obj: DocObject, recs: Map, nodes: Keyed): number {
@@ -423,6 +426,7 @@ export function createRenderer(): FormChemRenderer {
const st = styleFor(doc!, obj, prev);
const deps = objectDeps(obj, doc!);
if (def.derived) deps.push(derivedNow);
+ if (def.scaled) deps.push(scaleNow);
if (prev && prev.ref === obj && prev.styleKey === st.styleKey && prev.epoch === measure.epoch && sameList(prev.deps, deps)) return 0;
let view: { specs: NodeSpec[]; box: Box | null };
try {
@@ -667,6 +671,9 @@ export function createRenderer(): FormChemRenderer {
mediaWatch = mediaCache.subscribe(() => {
if (last) render(last);
});
+ for (const def of Object.values(OBJECT_KINDS)) {
+ if (def?.watch) kindWatch.push(def.watch(() => { if (last) render(last); }));
+ }
chemMarks = new ChemMarks(layers.stereo);
selection = new MarkLayer(layers.selection, 'fc-sel');
hover = new MarkLayer(layers.hover, 'fc-hover');
@@ -689,6 +696,11 @@ export function createRenderer(): FormChemRenderer {
const zoom = String(v.zoom * (window.devicePixelRatio || 1));
svg.style.setProperty('--fc-zoom', zoom);
marksSvg?.style.setProperty('--fc-zoom', zoom);
+ const scale = 2 ** Math.round(Math.log2(Math.max(1e-3, v.zoom * (window.devicePixelRatio || 1))));
+ if (scale !== scaleNow) {
+ scaleNow = scale;
+ if (last) render(last);
+ }
},
labelBox(frag: Id, atom: Id) {
const b = frags.get(frag)?.atoms.get(atom)?.view.box;
@@ -716,6 +728,8 @@ export function createRenderer(): FormChemRenderer {
fontWatch = null;
mediaWatch?.();
mediaWatch = null;
+ for (const off of kindWatch) off();
+ kindWatch = [];
root?.remove();
svg?.classList.remove('fc-canvas');
svg?.style.removeProperty('--fc-zoom');
diff --git a/frontend/src/canvas/render/spectrum-axes.ts b/frontend/src/canvas/render/spectrum-axes.ts
new file mode 100644
index 00000000..0189165f
--- /dev/null
+++ b/frontend/src/canvas/render/spectrum-axes.ts
@@ -0,0 +1,174 @@
+import type { SpectrumObject, SpectrumTechnique } from '../../engine/model';
+import type { SpectrumData, YMode } from '../../engine/spectra-api';
+import type { Box } from './geom';
+
+export interface Range { from: number; to: number }
+export interface Tick { v: number; text: string }
+
+export interface PlotFrame {
+ box: Box;
+ x: Range;
+ y: Range;
+ yMode: YMode | null;
+ percent: boolean;
+}
+
+const DEFAULT_X: Record = {
+ ir: { from: 4000, to: 400 },
+ raman: { from: 3500, to: 100 },
+ uvvis: { from: 190, to: 800 },
+ ms: { from: 0, to: 200 },
+ nmr: { from: 12, to: -0.5 },
+};
+
+const NMR_X: Record = {
+ '1H': { from: 12, to: -0.5 },
+ '13C': { from: 220, to: -10 },
+ '19F': { from: 50, to: -250 },
+ '31P': { from: 250, to: -250 },
+};
+
+export const decreasingX = (t: SpectrumTechnique): boolean => t === 'ir' || t === 'raman' || t === 'nmr';
+
+export function defaultX(obj: Pick): Range {
+ return obj.technique === 'nmr' ? NMR_X[obj.nucleus ?? '1H'] ?? DEFAULT_X.nmr : DEFAULT_X[obj.technique];
+}
+
+export function hasYAxis(t: SpectrumTechnique): boolean {
+ return t !== 'nmr';
+}
+
+export function yModeOf(obj: SpectrumObject, data: SpectrumData | null): YMode | null {
+ if (obj.technique !== 'ir' && obj.technique !== 'uvvis' && obj.technique !== 'raman') return null;
+ return obj.view?.y_mode ?? data?.yMode ?? (obj.technique === 'ir' ? 'transmittance' : obj.technique === 'uvvis' ? 'absorbance' : null);
+}
+
+export function fullX(obj: SpectrumObject, data: SpectrumData | null): Range {
+ if (!data) return defaultX(obj);
+ const [lo, hi] = data.sticks && data.x.length ? [Math.max(0, Math.floor((Math.min(...data.x) - 5) / 10) * 10), Math.ceil((Math.max(...data.x) + 5) / 10) * 10] : [Math.min(...data.xRange), Math.max(...data.xRange)];
+ return decreasingX(obj.technique) ? { from: hi, to: lo } : { from: lo, to: hi };
+}
+
+export function xRangeOf(obj: SpectrumObject, data: SpectrumData | null): Range {
+ const full = fullX(obj, data);
+ const v = obj.view;
+ return { from: v?.x_from ?? full.from, to: v?.x_to ?? full.to };
+}
+
+export function yRangeOf(obj: SpectrumObject, data: SpectrumData | null, yMode: YMode | null): { range: Range; percent: boolean } {
+ const [lo, hi] = data ? data.yRange : [0, 100];
+ const percent = yMode === 'transmittance' && hi > 1.5;
+ let range: Range;
+ if (yMode === 'transmittance') range = { from: Math.min(0, lo), to: percent ? Math.max(100, hi) : Math.max(1, hi) };
+ else if (obj.technique === 'ms') range = { from: 0, to: (hi || 100) * 1.08 };
+ else if (obj.technique === 'nmr') range = { from: lo - (hi - lo) * 0.04, to: hi + (hi - lo) * 0.28 };
+ else range = { from: Math.min(0, lo), to: hi + (hi - lo) * 0.08 || 1 };
+ const v = obj.view;
+ return { range: { from: v?.y_from ?? range.from, to: v?.y_to ?? range.to }, percent };
+}
+
+export function frameOf(obj: SpectrumObject, data: SpectrumData | null, box: Box = obj): PlotFrame {
+ const yMode = yModeOf(obj, data);
+ const y = yRangeOf(obj, data, yMode);
+ return { box: { x: box.x, y: box.y, w: box.w, h: box.h }, x: xRangeOf(obj, data), y: y.range, yMode, percent: y.percent };
+}
+
+export const sx = (f: PlotFrame, v: number): number => f.box.x + ((v - f.x.from) / (f.x.to - f.x.from || 1)) * f.box.w;
+export const sy = (f: PlotFrame, v: number): number => f.box.y + f.box.h - ((v - f.y.from) / (f.y.to - f.y.from || 1)) * f.box.h;
+export const vx = (f: PlotFrame, px: number): number => f.x.from + ((px - f.box.x) / (f.box.w || 1)) * (f.x.to - f.x.from);
+export const vy = (f: PlotFrame, py: number): number => f.y.from + ((f.box.y + f.box.h - py) / (f.box.h || 1)) * (f.y.to - f.y.from);
+
+export function niceStep(span: number, count: number): number {
+ const raw = Math.abs(span) / Math.max(1, count);
+ if (!Number.isFinite(raw) || raw <= 0) return 1;
+ const p = Math.pow(10, Math.floor(Math.log10(raw)));
+ const m = raw / p;
+ return (m <= 1 ? 1 : m <= 2 ? 2 : m <= 2.5 ? 2.5 : m <= 5 ? 5 : 10) * p;
+}
+
+function decimals(step: number): number {
+ const d = Math.max(0, Math.min(6, -Math.floor(Math.log10(step) + 1e-9)));
+ const scaled = step * Math.pow(10, d);
+ return Math.abs(scaled - Math.round(scaled)) > 1e-6 ? d + 1 : d;
+}
+
+export function ticks(r: Range, count: number): Tick[] {
+ const step = niceStep(r.to - r.from, count);
+ const lo = Math.min(r.from, r.to), hi = Math.max(r.from, r.to);
+ const d = decimals(step);
+ const out: Tick[] = [];
+ for (let v = Math.ceil(lo / step - 1e-9) * step; v <= hi + step * 1e-9 && out.length < 200; v += step) {
+ const q = Math.abs(v) < step * 1e-9 ? 0 : v;
+ out.push({ v: q, text: q.toFixed(d) });
+ }
+ return out;
+}
+
+const SUP_MINUS_ONE = 'cm⁻¹';
+
+const prettyUnits = (s: string): string => s.replace(/cm-1|1\/cm/gi, SUP_MINUS_ONE).replace(/\bum\b/g, 'µm');
+
+export function xTitle(obj: SpectrumObject, data: SpectrumData | null): string {
+ if (data?.xLabel) return prettyUnits(data.xLabel);
+ const u = (data?.xUnit ?? '').toUpperCase();
+ switch (obj.technique) {
+ case 'ir':
+ return u === 'MICROMETERS' ? 'Wavelength (µm)' : 'Wavenumber (cm⁻¹)';
+ case 'raman':
+ return 'Raman shift (cm⁻¹)';
+ case 'uvvis':
+ return 'Wavelength (nm)';
+ case 'ms':
+ return 'm/z';
+ default:
+ return u === 'HZ' ? 'Frequency (Hz)' : 'δ (ppm)';
+ }
+}
+
+export function yTitle(obj: SpectrumObject, data: SpectrumData | null, f: PlotFrame): string {
+ if (data?.yLabel && (!f.yMode || f.yMode === data.yMode)) return prettyUnits(data.yLabel);
+ if (f.yMode === 'transmittance') return f.percent ? 'Transmittance (%)' : 'Transmittance';
+ if (f.yMode === 'absorbance') return 'Absorbance';
+ if (obj.technique === 'ms') return 'Relative abundance (%)';
+ const u = data?.yUnit ?? '';
+ return u && !/ARBITRARY/i.test(u) ? u.charAt(0) + u.slice(1).toLowerCase() : 'Intensity';
+}
+
+const SUPER: Record = { '0': '⁰', '1': '¹', '2': '²', '3': '³', '4': '⁴', '5': '⁵', '6': '⁶', '7': '⁷', '8': '⁸', '9': '⁹' };
+
+export function nucleusText(nucleus: string | undefined): string {
+ const m = /^(\d+)([A-Za-z]+)$/.exec(nucleus ?? '');
+ return m ? `${[...m[1]].map((c) => SUPER[c] ?? c).join('')}${m[2]}` : nucleus ?? '';
+}
+
+export function spectrumTitle(obj: SpectrumObject, data: SpectrumData | null): string {
+ const pred = 'predicted' in obj.source ? obj.source.predicted : null;
+ const kind = obj.technique === 'nmr' ? `${nucleusText(obj.nucleus ?? data?.nucleus ?? '1H')} NMR` : obj.technique === 'ms' ? 'MS' : obj.technique === 'uvvis' ? 'UV-Vis' : obj.technique === 'raman' ? 'Raman' : 'IR';
+ const mhz = pred?.frequency ?? data?.frequency ?? null;
+ const f = obj.technique === 'nmr' && mhz ? Math.round(mhz) : null;
+ if (pred) {
+ const how = [pred.method || data?.method, pred.version || data?.version].filter(Boolean).join(' ');
+ if (f !== null) return how ?`Predicted ${kind}, ${f} MHz (${how})` : `Predicted ${kind}, ${f} MHz`;
+ return how ? `Predicted ${kind} (${how})` : `Predicted ${kind}`;
+ }
+ const head = data?.title || kind;
+ return f !== null ? `${head}, ${f} MHz` : head;
+}
+
+export function formatX(obj: SpectrumObject, v: number): string {
+ switch (obj.technique) {
+ case 'ir':
+ case 'raman':
+ return Math.round(v).toString();
+ case 'ms':
+ return Math.abs(v - Math.round(v)) < 0.05 ? Math.round(v).toString() : v.toFixed(1);
+ case 'uvvis':
+ return v.toFixed(0);
+ default:
+ return obj.nucleus && obj.nucleus !== '1H' ? v.toFixed(1) : v.toFixed(2);
+ }
+}
+
+export function within(r: Range, v: number): boolean {
+ return (v - r.from) * (v - r.to) <= 0;
+}
diff --git a/frontend/src/canvas/render/spectrum-data.ts b/frontend/src/canvas/render/spectrum-data.ts
new file mode 100644
index 00000000..b29c5e84
--- /dev/null
+++ b/frontend/src/canvas/render/spectrum-data.ts
@@ -0,0 +1,151 @@
+import { isFragment, type FormChemDocument, type SpectrumObject } from '../../engine/model';
+import { spectraApi, type SpectrumData, type YMode } from '../../engine/spectra-api';
+
+export interface SpectrumWant { from?: number; to?: number; points: number; yMode?: YMode | null }
+export interface SpectrumHave { data: SpectrumData | null; loading: boolean; error: string | null; exact: boolean }
+
+type State = 'loading' | 'ok' | 'error';
+interface Entry { base: string; span: string; points: number; state: State; data: SpectrumData | null; error: string | null; used: number }
+
+const MIN_POINTS = 64;
+const MAX_POINTS = 8192;
+const MAX_ENTRIES = 96;
+
+export function pointsFor(widthPt: number, scale: number): number {
+ const px = Math.max(1, widthPt * Math.max(scale, 0.05));
+ return Math.min(MAX_POINTS, Math.max(MIN_POINTS, 2 ** Math.ceil(Math.log2(px))));
+}
+
+function sourceSig(doc: FormChemDocument, obj: SpectrumObject): string {
+ const src = obj.source;
+ if (!('predicted' in src)) return JSON.stringify(src);
+ const frag = doc.objects[src.predicted.fragment];
+ if (!isFragment(frag)) return JSON.stringify(src);
+ const atoms = Object.values(frag.atoms).map((a) => `${a.id}:${a.element}${a.charge ?? ''}${a.isotope ?? ''}${a.hydrogens ?? ''}${a.label ?? ''}`).join(',');
+ const bonds = Object.values(frag.bonds).map((b) => `${b.a}-${b.b}:${b.order ?? 1}`).join(',');
+ return `${JSON.stringify(src)}|${atoms}|${bonds}`;
+}
+
+export class SpectrumCache {
+ epoch = 0;
+ private entries = new Map();
+ private latest = new Map();
+ private shown = new Map();
+ private listeners = new Set<() => void>();
+ private clock = 0;
+ private queued = false;
+
+ baseKey(doc: FormChemDocument, obj: SpectrumObject, yMode: YMode | null | undefined): string {
+ return `${doc.id}|${obj.id}|${obj.technique}|${obj.nucleus ?? ''}|${yMode ?? ''}|${sourceSig(doc, obj)}`;
+ }
+
+ private ownerKey(doc: FormChemDocument, obj: SpectrumObject, yMode: YMode | null | undefined): string {
+ return `${doc.id}|${obj.id}|${yMode ?? ''}`;
+ }
+
+ have(doc: FormChemDocument, obj: SpectrumObject, want: SpectrumWant, request = true): SpectrumHave {
+ const base = this.baseKey(doc, obj, want.yMode);
+ const span = `${want.from ?? ''}:${want.to ?? ''}`;
+ let best: Entry | null = null, loading = false, error: string | null = null;
+ for (const e of this.entries.values()) {
+ if (e.base !== base || e.span !== span) continue;
+ if (e.state === 'loading' && e.points >= want.points) loading = true;
+ if (e.state === 'error' && e.points >= want.points) error = e.error;
+ if (e.state === 'ok' && (!best || (best.points < want.points ? e.points > best.points : e.points >= want.points && e.points < best.points))) best = e;
+ }
+ const exact = !!best && best.points >= want.points;
+ if (!exact && !loading && !error && request) {
+ this.load(doc, obj, base, span, want);
+ loading = true;
+ }
+ const pick = best ?? this.latest.get(base) ?? this.shown.get(this.ownerKey(doc, obj, want.yMode)) ?? null;
+ if (pick) pick.used = ++this.clock;
+ return { data: pick?.data ?? null, loading, error, exact };
+ }
+
+ async ready(doc: FormChemDocument, obj: SpectrumObject, want: SpectrumWant): Promise {
+ const now = this.have(doc, obj, want);
+ if (now.exact || now.error) return now;
+ return new Promise((resolve) => {
+ const off = this.subscribe(() => {
+ const h = this.have(doc, obj, want, false);
+ if (h.exact || h.error || !h.loading) { off(); resolve(h); }
+ });
+ });
+ }
+
+ subscribe(fn: () => void): () => void {
+ this.listeners.add(fn);
+ return () => { this.listeners.delete(fn); };
+ }
+
+ clear(): void {
+ this.entries.clear();
+ this.latest.clear();
+ this.shown.clear();
+ this.bump();
+ }
+
+ private holds(base: string, span: string, points: number): boolean {
+ for (const e of this.entries.values()) if (e.base === base && e.span === span && e.points >= points && e.state !== 'error') return true;
+ return false;
+ }
+
+ private otherModes(doc: FormChemDocument, obj: SpectrumObject, span: string, want: SpectrumWant, entry: Entry, data: SpectrumData): void {
+ for (const mode of data.yModes) {
+ const base = this.baseKey(doc, obj, mode);
+ if (this.holds(base, span, want.points)) continue;
+ if (mode === data.yMode) {
+ const same: Entry = { ...entry, base };
+ this.entries.set(`${base}#${span}#${want.points}`, same);
+ if (want.from === undefined && want.to === undefined) { this.latest.set(base, same); this.shown.set(this.ownerKey(doc, obj, mode), same); }
+ } else if (mode !== want.yMode) {
+ this.load(doc, obj, base, span, { ...want, yMode: mode }, true);
+ }
+ }
+ }
+
+ private load(doc: FormChemDocument, obj: SpectrumObject, base: string, span: string, want: SpectrumWant, ahead = false): void {
+ const key = `${base}#${span}#${want.points}`;
+ const entry: Entry = { base, span, points: want.points, state: 'loading', data: null, error: null, used: ++this.clock };
+ this.entries.set(key, entry);
+ this.trim();
+ spectraApi.data(doc, obj, { from: want.from, to: want.to, points: want.points, yMode: want.yMode ?? undefined }).then(
+ (data) => {
+ entry.state = 'ok';
+ entry.data = data;
+ const whole = want.from === undefined && want.to === undefined;
+ if (whole) this.latest.set(base, entry);
+ else if (!this.latest.has(base)) this.latest.set(base, entry);
+ const owner = this.ownerKey(doc, obj, want.yMode);
+ if (whole || !this.shown.has(owner)) this.shown.set(owner, entry);
+ if (!ahead) this.otherModes(doc, obj, span, want, entry, data);
+ this.bump();
+ },
+ (e: unknown) => {
+ entry.state = 'error';
+ entry.error = e instanceof Error ? e.message : String(e);
+ this.bump();
+ },
+ );
+ }
+
+ private trim(): void {
+ if (this.entries.size <= MAX_ENTRIES) return;
+ const keep = new Set([...this.latest.values(), ...this.shown.values()]);
+ const old = [...this.entries.entries()].filter(([, e]) => e.state !== 'loading' && !keep.has(e)).sort((a, b) => a[1].used - b[1].used);
+ for (const [k] of old.slice(0, this.entries.size - MAX_ENTRIES)) this.entries.delete(k);
+ }
+
+ private bump(): void {
+ if (this.queued) return;
+ this.queued = true;
+ queueMicrotask(() => {
+ this.queued = false;
+ this.epoch++;
+ for (const fn of [...this.listeners]) fn();
+ });
+ }
+}
+
+export const spectrumCache = new SpectrumCache();
diff --git a/frontend/src/canvas/render/spectrum.ts b/frontend/src/canvas/render/spectrum.ts
new file mode 100644
index 00000000..c8d19ae4
--- /dev/null
+++ b/frontend/src/canvas/render/spectrum.ts
@@ -0,0 +1,403 @@
+import type { AtomRef, Font, FormChemDocument, Id, SpectrumObject } from '../../engine/model';
+import type { SpectrumData } from '../../engine/spectra-api';
+import { fmt, union, type Box, type V } from './geom';
+import { measure } from './measure';
+import type { ObjectCtx, ObjectKindDef, ObjectView } from './objects';
+import { label } from './paint';
+import { formatX, frameOf, hasYAxis, spectrumTitle, sx, sy, ticks, within, xTitle, yTitle, type PlotFrame, type Range } from './spectrum-axes';
+import { pointsFor, spectrumCache, type SpectrumHave, type SpectrumWant } from './spectrum-data';
+import type { Attrs, NodeSpec } from './svg';
+
+export interface PlotPaint {
+ ink: string;
+ overlay: readonly string[];
+ integral: string;
+ lineWidth: number;
+ font: Font;
+ size: number;
+}
+
+export interface OverlayTrace { obj: SpectrumObject; data: SpectrumData | null; title: string }
+
+export interface PlotInput {
+ obj: SpectrumObject;
+ data: SpectrumData | null;
+ frame: PlotFrame;
+ overlays: OverlayTrace[];
+ status: string | null;
+ paint: PlotPaint;
+ clipId: string;
+}
+
+export type MarkKind = 'peak' | 'integral' | 'multiplet';
+export interface PlotMark { kind: MarkKind; id: Id; at: V; hit: Box; atoms?: AtomRef }
+export interface PlotOutput { specs: NodeSpec[]; box: Box; marks: PlotMark[] }
+
+export const OVERLAY_COLOURS = ['#d9480f', '#1971c2', '#2b8a3e', '#9c36b5'];
+const INTEGRAL_COLOUR = '#1971c2';
+const MS_LABELS = 8;
+
+function nearestIndex(d: SpectrumData, x: number): number {
+ let best = -1, bd = Infinity;
+ for (let i = 0; i < d.x.length; i++) {
+ const e = Math.abs(d.x[i] - x);
+ if (e < bd) { bd = e; best = i; }
+ }
+ return best;
+}
+
+export function valueAt(d: SpectrumData | null, x: number): number | null {
+ if (!d || !d.x.length) return null;
+ const i = nearestIndex(d, x);
+ return i >= 0 ? d.y[i] : null;
+}
+
+function tracePath(f: PlotFrame, d: SpectrumData, map: (y: number) => number = (y) => y): string {
+ const lo = Math.min(f.x.from, f.x.to), hi = Math.max(f.x.from, f.x.to);
+ const pad = (hi - lo) * 0.01;
+ let out = '';
+ let pen = false;
+ if (d.sticks) {
+ const base = sy(f, Math.max(f.y.from, Math.min(0, f.y.to)));
+ for (let i = 0; i < d.x.length; i++) {
+ if (d.x[i] < lo || d.x[i] > hi) continue;
+ out += `M${fmt(sx(f, d.x[i]))} ${fmt(base)}V${fmt(sy(f, map(d.y[i])))}`;
+ }
+ return out;
+ }
+ for (let i = 0; i < d.x.length; i++) {
+ const x = d.x[i], y = d.y[i];
+ if (!Number.isFinite(x) || !Number.isFinite(y) || x < lo - pad || x > hi + pad) { pen = false; continue; }
+ out += `${pen ? 'L' : 'M'}${fmt(sx(f, x))} ${fmt(sy(f, map(y)))}`;
+ pen = true;
+ }
+ return out;
+}
+
+function overlayMap(main: SpectrumData | null, o: SpectrumData): (y: number) => number {
+ if (!main) return (y) => y;
+ const [a0, a1] = main.yRange, [b0, b1] = o.yRange;
+ const k = (a1 - a0) / (b1 - b0 || 1);
+ return (y) => a0 + (y - b0) * k;
+}
+
+function rotated(text: string, at: V, paint: PlotPaint, anchor: 'start' | 'middle' | 'end', colour: string, cls = 'fc-spec-text fc-spec-peak'): { spec: NodeSpec; box: Box; w: number } {
+ const lab = label(text, [0, 0], paint.font, paint.size, colour, anchor, { cls });
+ const face = measure.face(paint.font.family, !!paint.font.bold, !!paint.font.italic);
+ const tx = at[0] + face.cap * paint.size * 0.5;
+ lab.spec.a.transform = `translate(${fmt(tx)} ${fmt(at[1])}) rotate(-90)`;
+ delete lab.spec.a.x;
+ delete lab.spec.a.y;
+ const asc = face.ascent * paint.size, desc = face.descent * paint.size;
+ const y0 = anchor === 'start' ? at[1] - lab.w : anchor === 'middle' ? at[1] - lab.w / 2 : at[1];
+ return { spec: lab.spec, box: { x: tx - asc, y: y0, w: asc + desc, h: lab.w }, w: lab.w };
+}
+
+function axisSpecs(inp: PlotInput, boxes: Box[]): NodeSpec[] {
+ const { obj, frame: f, paint } = inp;
+ const { box } = f;
+ const c = paint.ink, lw = fmt(paint.lineWidth);
+ const out: NodeSpec[] = [];
+ const line = (d: string, cls = 'fc-ln fc-spec-axis'): NodeSpec => ({ tag: 'path', a: { d, fill: 'none', stroke: c, 'stroke-width': lw, 'stroke-linecap': 'square', class: cls } });
+ const yAxis = hasYAxis(obj.technique);
+ const framed = obj.technique === 'ir' || obj.technique === 'raman' || obj.technique === 'uvvis';
+ const x0 = box.x, x1 = box.x + box.w, y0 = box.y, y1 = box.y + box.h;
+ if (framed) out.push({ tag: 'rect', a: { x: fmt(x0), y: fmt(y0), width: fmt(box.w), height: fmt(box.h), fill: 'none', stroke: c, 'stroke-width': lw, class: 'fc-ln fc-spec-axis' } });
+ else out.push(line(yAxis ? `M${fmt(x0)} ${fmt(y0)}V${fmt(y1)}H${fmt(x1)}` : `M${fmt(x0)} ${fmt(y1)}H${fmt(x1)}`));
+ const tl = paint.size * 0.35;
+ const xt = ticks(f.x, Math.max(2, Math.floor(box.w / (paint.size * 4.2))));
+ let td = '';
+ for (const t of xt) {
+ const px = sx(f, t.v);
+ td += `M${fmt(px)} ${fmt(y1)}V${fmt(y1 + tl)}`;
+ const lab = label(t.text, [px, y1 + tl + paint.size * 0.95], paint.font, paint.size, c, 'middle', { cls: 'fc-spec-text fc-spec-tick' });
+ out.push(lab.spec);
+ boxes.push(lab);
+ }
+ const ints = obj.technique === 'nmr' && (obj.integrals?.length ?? 0) > 0;
+ const titleY = y1 + tl + paint.size * (ints ? 4.0 : 2.45);
+ const xl = label(xTitle(obj, inp.data), [x0 + box.w / 2, titleY], paint.font, paint.size * 1.05, c, 'middle', { cls: 'fc-spec-text fc-spec-title' });
+ out.push(xl.spec);
+ boxes.push(xl);
+ if (yAxis) {
+ const yt = ticks(f.y, Math.max(2, Math.floor(box.h / (paint.size * 2.6))));
+ let widest = 0;
+ for (const t of yt) {
+ const py = sy(f, t.v);
+ td += `M${fmt(x0)} ${fmt(py)}H${fmt(x0 - tl)}`;
+ const lab = label(t.text, [x0 - tl - paint.size * 0.3, py + paint.size * 0.35], paint.font, paint.size, c, 'end', { cls: 'fc-spec-text fc-spec-tick' });
+ widest = Math.max(widest, lab.w);
+ out.push(lab.spec);
+ boxes.push(lab);
+ }
+ const r = rotated(yTitle(obj, inp.data, f), [x0 - tl - paint.size * 1.45 - widest, y0 + box.h / 2], { ...paint, size: paint.size * 1.05 }, 'middle', c, 'fc-spec-text fc-spec-title');
+ out.push(r.spec);
+ boxes.push(r.box);
+ }
+ if (td) out.push(line(td, 'fc-ln fc-spec-ticks'));
+ return out;
+}
+
+function headerSpecs(inp: PlotInput, boxes: Box[]): NodeSpec[] {
+ const { frame: f, paint, obj, data } = inp;
+ const out: NodeSpec[] = [];
+ const y = f.box.y - paint.size * 0.55;
+ const size = paint.size * 1.05;
+ if (!inp.overlays.length) {
+ const lab = label(spectrumTitle(obj, data), [f.box.x, y], paint.font, size, paint.ink, 'start', { cls: 'fc-spec-text fc-spec-name' });
+ out.push(lab.spec);
+ boxes.push(lab);
+ return out;
+ }
+ const entries = [{ title: spectrumTitle(obj, data), colour: paint.ink }, ...inp.overlays.map((o, i) => ({ title: o.title, colour: paint.overlay[i % paint.overlay.length] }))];
+ let x = f.box.x + f.box.w;
+ for (let i = entries.length - 1; i >= 0; i--) {
+ const e = entries[i];
+ const w = measure.width(e.title, size, paint.font.family);
+ const lab = label(e.title, [x, y], paint.font, size, paint.ink, 'end', { cls: 'fc-spec-text fc-spec-legend' });
+ out.push(lab.spec);
+ boxes.push(lab);
+ x -= w + paint.size * 0.4;
+ const sample = paint.size * 1.6;
+ out.push({ tag: 'path', a: { d: `M${fmt(x - sample)} ${fmt(y - size * 0.32)}h${fmt(sample)}`, stroke: e.colour, 'stroke-width': fmt(paint.lineWidth * 1.6), fill: 'none', class: 'fc-ln fc-spec-key' } });
+ x -= sample + paint.size * 1.2;
+ }
+ return out;
+}
+
+function msAutoLabels(inp: PlotInput, specs: NodeSpec[], boxes: Box[]): void {
+ const { data: d, frame: f, paint } = inp;
+ if (!d || !d.sticks || inp.obj.peaks?.length) return;
+ const idx = d.x.map((_, i) => i).filter((i) => within(f.x, d.x[i])).sort((a, b) => d.y[b] - d.y[a]);
+ const taken: Box[] = [];
+ let n = 0;
+ for (const i of idx) {
+ if (n >= MS_LABELS) break;
+ const px = sx(f, d.x[i]), py = sy(f, d.y[i]);
+ const lab = label(formatX(inp.obj, d.x[i]), [px, Math.max(f.box.y + paint.size, py - paint.size * 0.3)], paint.font, paint.size, paint.ink, 'middle', { cls: 'fc-spec-text fc-spec-mz' });
+ if (taken.some((b) => b.x < lab.x + lab.w + 1 && lab.x < b.x + b.w + 1 && b.y < lab.y + lab.h && lab.y < b.y + b.h)) continue;
+ taken.push(lab);
+ specs.push(lab.spec);
+ boxes.push(lab);
+ n++;
+ }
+}
+
+function peakSpecs(inp: PlotInput, specs: NodeSpec[], boxes: Box[], marks: PlotMark[], top: number): void {
+ const { obj, data, frame: f, paint } = inp;
+ const peaks = (obj.peaks ?? []).filter((p) => within(f.x, p.x)).map((p) => ({ p, px: sx(f, p.x), y: p.y ?? valueAt(data, p.x) ?? f.y.to }));
+ if (!peaks.length) return;
+ peaks.sort((a, b) => a.px - b.px);
+ const dips = f.yMode === 'transmittance';
+ const step = paint.size * 1.12;
+ const lx: number[] = [];
+ for (let i = 0; i < peaks.length; i++) lx.push(Math.max(peaks[i].px, i ? lx[i - 1] + step : -Infinity));
+ const over = lx.length ? lx[lx.length - 1] - (f.box.x + f.box.w - paint.size * 0.3) : 0;
+ if (over > 0) for (let i = lx.length - 1; i >= 0; i--) lx[i] = Math.min(lx[i] - over, i < lx.length - 1 ? lx[i + 1] - step : Infinity);
+ const texts = peaks.map(({ p }) => p.label ?? formatX(obj, p.x));
+ const widest = Math.max(...texts.map((t) => measure.width(t, paint.size, paint.font.family)));
+ const row = obj.technique === 'nmr';
+ const rowBase = top + widest + paint.size * 0.3;
+ let leaders = '';
+ peaks.forEach(({ p, px, y }, i) => {
+ const py = Math.max(f.box.y, Math.min(f.box.y + f.box.h, sy(f, y)));
+ const at: V = [px, py];
+ const x = lx[i];
+ let r;
+ if (row) {
+ r = rotated(texts[i], [x, rowBase], paint, 'start', paint.ink);
+ const k1 = rowBase + paint.size * 0.35, k2 = k1 + paint.size * 0.9;
+ leaders += `M${fmt(x)} ${fmt(k1)}L${fmt(px)} ${fmt(k2)}`;
+ if (py - paint.size * 0.3 > k2) leaders += `V${fmt(py - paint.size * 0.3)}`;
+ } else if (dips) {
+ const base = Math.min(py + paint.size * 0.4, f.box.y + f.box.h - 1);
+ const w = measure.width(texts[i], paint.size, paint.font.family);
+ const end = Math.min(base, f.box.y + f.box.h - w - 1);
+ r = rotated(texts[i], [x, end], paint, 'end', paint.ink);
+ if (Math.abs(x - px) > 0.2) leaders += `M${fmt(px)} ${fmt(py + 0.6)}L${fmt(x)} ${fmt(end - 0.6)}`;
+ } else {
+ const w = measure.width(texts[i], paint.size, paint.font.family);
+ const base = Math.max(py - paint.size * 0.4, f.box.y + w + 1);
+ r = rotated(texts[i], [x, base], paint, 'start', paint.ink);
+ if (Math.abs(x - px) > 0.2 || base < py - paint.size * 0.6) leaders += `M${fmt(px)} ${fmt(py - 0.6)}L${fmt(x)} ${fmt(base + 0.6)}`;
+ }
+ r.spec.a['data-mark'] = p.id;
+ specs.push(r.spec);
+ boxes.push(r.box);
+ marks.push({ kind: 'peak', id: p.id, at, hit: union([r.box, { x: px - 2, y: py - 2, w: 4, h: 4 }])!, atoms: p.atoms });
+ });
+ if (leaders) specs.push({ tag: 'path', a: { d: leaders, fill: 'none', stroke: paint.ink, 'stroke-width': fmt(paint.lineWidth * 0.6), class: 'fc-ln fc-spec-leader' } });
+}
+
+function integralCurve(f: PlotFrame, d: SpectrumData | null, r: Range, y0: number, height: number): string {
+ const x0 = sx(f, r.from), x1 = sx(f, r.to);
+ if (!d || d.sticks) return `M${fmt(x0)} ${fmt(y0)}L${fmt(x1)} ${fmt(y0 - height)}`;
+ const pts: [number, number][] = [];
+ for (let i = 0; i < d.x.length; i++) if (within(r, d.x[i])) pts.push([sx(f, d.x[i]), d.y[i]]);
+ if (pts.length < 2) return `M${fmt(x0)} ${fmt(y0)}L${fmt(x1)} ${fmt(y0 - height)}`;
+ pts.sort((a, b) => a[0] - b[0]);
+ const base = Math.min(...pts.map((p) => p[1]));
+ let total = 0;
+ const cum = pts.map((p) => (total += Math.max(0, p[1] - base)));
+ const k = total > 0 ? height / total : 0;
+ return pts.map((p, i) => `${i ? 'L' : 'M'}${fmt(p[0])} ${fmt(y0 - cum[i] * k)}`).join('');
+}
+
+function integralSpecs(inp: PlotInput, specs: NodeSpec[], boxes: Box[], marks: PlotMark[]): void {
+ const { obj, data, frame: f, paint } = inp;
+ const list = (obj.integrals ?? []).filter((g) => within(f.x, g.from) || within(f.x, g.to));
+ if (!list.length) return;
+ const maxV = Math.max(...list.map((g) => g.value ?? 1), 1e-9);
+ const y0 = f.box.y + f.box.h * 0.86;
+ const rowY = f.box.y + f.box.h + paint.size * 0.35 + paint.size * 2.6;
+ const c = paint.integral;
+ for (const g of list) {
+ const h = ((g.value ?? 1) / maxV) * f.box.h * 0.42;
+ const d = integralCurve(f, data, { from: g.from, to: g.to }, y0, h);
+ specs.push({ tag: 'path', a: { d, fill: 'none', stroke: c, 'stroke-width': fmt(paint.lineWidth * 1.1), class: 'fc-ln fc-spec-integral', 'data-mark': g.id } });
+ const a = sx(f, g.from), b = sx(f, g.to);
+ const lo = Math.max(f.box.x, Math.min(a, b)), hi = Math.min(f.box.x + f.box.w, Math.max(a, b));
+ const br = rowY - paint.size * 0.95;
+ specs.push({ tag: 'path', a: { d: `M${fmt(lo)} ${fmt(br - paint.size * 0.25)}V${fmt(br)}H${fmt(hi)}V${fmt(br - paint.size * 0.25)}`, fill: 'none', stroke: c, 'stroke-width': fmt(paint.lineWidth * 0.8), class: 'fc-ln fc-spec-ibracket' } });
+ const text = g.value === undefined ? '' : g.value >= 10 ? g.value.toFixed(1) : g.value.toFixed(2);
+ const lab = label(text, [(lo + hi) / 2, rowY], paint.font, paint.size, c, 'middle', { cls: 'fc-spec-text fc-spec-ivalue' });
+ if (text) {
+ lab.spec.a['data-mark'] = g.id;
+ specs.push(lab.spec);
+ boxes.push(lab);
+ }
+ marks.push({ kind: 'integral', id: g.id, at: [(lo + hi) / 2, y0 - h / 2], hit: { x: lo, y: Math.min(y0 - h, br - paint.size * 0.3), w: Math.max(2, hi - lo), h: Math.max(rowY, y0) - Math.min(y0 - h, br - paint.size * 0.3) + 1 }, atoms: g.atoms });
+ }
+}
+
+function multipletSpecs(inp: PlotInput, specs: NodeSpec[], boxes: Box[], marks: PlotMark[]): number {
+ const { obj, frame: f, paint } = inp;
+ const list = (obj.multiplets ?? []).filter((m) => within(f.x, m.shift));
+ if (!list.length) return f.box.y;
+ const y = f.box.y + paint.size * 1.6;
+ let d = '';
+ for (const m of list) {
+ const a = sx(f, m.from), b = sx(f, m.to);
+ const lo = Math.max(f.box.x, Math.min(a, b)), hi = Math.min(f.box.x + f.box.w, Math.max(a, b));
+ d += `M${fmt(lo)} ${fmt(y + paint.size * 0.3)}V${fmt(y)}H${fmt(hi)}V${fmt(y + paint.size * 0.3)}`;
+ const j = m.j?.length ? `, J = ${m.j.map((v) => v.toFixed(1)).join(', ')}` : '';
+ const text = `${formatX(obj, m.shift)} (${m.kind ?? 'm'}${j})`;
+ const lab = label(text, [(lo + hi) / 2, y - paint.size * 0.3], paint.font, paint.size * 0.9, paint.ink, 'middle', { cls: 'fc-spec-text fc-spec-mult' });
+ lab.spec.a['data-mark'] = m.id;
+ specs.push(lab.spec);
+ boxes.push(lab);
+ marks.push({ kind: 'multiplet', id: m.id, at: [(lo + hi) / 2, y], hit: union([lab, { x: lo, y, w: hi - lo, h: paint.size * 0.3 }])!, atoms: m.atoms });
+ }
+ specs.push({ tag: 'path', a: { d, fill: 'none', stroke: paint.ink, 'stroke-width': fmt(paint.lineWidth * 0.8), class: 'fc-ln fc-spec-mbracket' } });
+ return y + paint.size * 0.5;
+}
+
+export function plotSpecs(inp: PlotInput): PlotOutput {
+ const { frame: f, paint, data } = inp;
+ const boxes: Box[] = [{ x: f.box.x - paint.lineWidth, y: f.box.y - paint.lineWidth, w: f.box.w + 2 * paint.lineWidth, h: f.box.h + 2 * paint.lineWidth }];
+ const marks: PlotMark[] = [];
+ const axes = axisSpecs(inp, boxes);
+ const head = headerSpecs(inp, boxes);
+ const traces: NodeSpec[] = [];
+ const lw = fmt(paint.lineWidth * (data?.sticks ? 1.1 : 0.9));
+ inp.overlays.forEach((o, i) => {
+ traces.push({ tag: 'path', a: { d: o.data ? tracePath(f, o.data, overlayMap(data, o.data)) : '', fill: 'none', stroke: paint.overlay[i % paint.overlay.length], 'stroke-width': lw, 'stroke-linejoin': 'round', class: 'fc-ln fc-spec-overlay', 'data-overlay': o.obj.id } });
+ });
+ traces.push({ tag: 'path', a: { d: data ? tracePath(f, data) : '', fill: 'none', stroke: paint.ink, 'stroke-width': lw, 'stroke-linejoin': 'round', class: 'fc-ln fc-spec-trace' } });
+ const ann: NodeSpec[] = [];
+ const top = multipletSpecs(inp, ann, boxes, marks);
+ integralSpecs(inp, ann, boxes, marks);
+ peakSpecs(inp, ann, boxes, marks, top + paint.size * 0.2);
+ msAutoLabels(inp, ann, boxes);
+ const status: NodeSpec[] = [];
+ if (inp.status) {
+ const lab = label(inp.status, [f.box.x + f.box.w / 2, f.box.y + f.box.h / 2], paint.font, paint.size * 1.05, paint.ink, 'middle', { cls: 'fc-spec-text fc-spec-status' });
+ lab.spec.a['fill-opacity'] = '0.5';
+ status.push(lab.spec);
+ }
+ const clip: NodeSpec = { tag: 'clipPath', a: { id: inp.clipId }, kids: [{ tag: 'rect', a: { x: fmt(f.box.x), y: fmt(f.box.y - 0.5), width: fmt(f.box.w), height: fmt(f.box.h + 1) } }] };
+ const specs: NodeSpec[] = [
+ { tag: 'g', a: { class: 'fc-spec-axes' }, kids: [...axes, ...head] },
+ clip,
+ { tag: 'g', a: { class: 'fc-spec-traces', 'clip-path': `url(#${inp.clipId})` }, kids: traces },
+ { tag: 'g', a: { class: 'fc-spec-ann' }, kids: ann },
+ { tag: 'g', a: { class: 'fc-spec-status' }, kids: status },
+ ];
+ return { specs, box: union(boxes)!, marks };
+}
+
+export function pagePaint(ctx: Pick): PlotPaint {
+ const font = ctx.style.caption_font;
+ return { ink: ctx.colour, overlay: OVERLAY_COLOURS, integral: INTEGRAL_COLOUR, lineWidth: ctx.style.line_width, font, size: font.size * 0.72 };
+}
+
+export const wantFor = (obj: SpectrumObject, points: number): SpectrumWant => ({ from: obj.view?.x_from, to: obj.view?.x_to, points, yMode: obj.view?.y_mode ?? null });
+
+export interface SpectrumState { data: SpectrumData | null; have: SpectrumHave | null; frame: PlotFrame; overlays: OverlayTrace[] }
+
+export function spectrumState(doc: FormChemDocument, obj: SpectrumObject, scale: number | undefined, box: Box = obj): SpectrumState {
+ const request = scale !== undefined;
+ const points = pointsFor(box.w, scale ?? 1);
+ const have = spectrumCache.have(doc, obj, wantFor(obj, points), request);
+ const frame = frameOf(obj, have.data, box);
+ const overlays: OverlayTrace[] = [];
+ for (const o of overlayObjects(doc, obj)) {
+ const oh = spectrumCache.have(doc, o, overlayWant(o, obj, frame, points), request);
+ overlays.push({ obj: o, data: oh.data, title: spectrumTitle(o, oh.data) });
+ }
+ return { data: have.data, have, frame, overlays };
+}
+
+function overlayObjects(doc: FormChemDocument, obj: SpectrumObject): SpectrumObject[] {
+ const out: SpectrumObject[] = [];
+ for (const id of obj.overlays ?? []) {
+ const o = doc.objects[id];
+ if (o?.kind === 'spectrum' && o.id !== obj.id) out.push(o);
+ }
+ return out;
+}
+
+const overlayWant = (o: SpectrumObject, obj: SpectrumObject, frame: PlotFrame, points: number): SpectrumWant =>
+ ({ from: frame.x.from, to: frame.x.to, points, yMode: o.technique === obj.technique ? frame.yMode : o.view?.y_mode ?? null });
+
+export async function preloadSpectrum(doc: FormChemDocument, obj: SpectrumObject, scale: number, box: Box = obj): Promise {
+ const points = pointsFor(box.w, scale);
+ const main = await spectrumCache.ready(doc, obj, wantFor(obj, points));
+ const frame = frameOf(obj, main.data, box);
+ await Promise.all(overlayObjects(doc, obj).map((o) => spectrumCache.ready(doc, o, overlayWant(o, obj, frame, points))));
+}
+
+function statusText(s: SpectrumState): string | null {
+ if (s.data) return null;
+ if (s.have?.error) return `Spectrum unavailable: ${s.have.error}`;
+ return 'Loading spectrum';
+}
+
+export function spectrumPlot(doc: FormChemDocument, obj: SpectrumObject, paint: PlotPaint, scale: number | undefined, box: Box = obj, clipId = `fc-spec-clip-${obj.id}`): PlotOutput & { state: SpectrumState } {
+ const state = spectrumState(doc, obj, scale, box);
+ const out = plotSpecs({ obj, data: state.data, frame: state.frame, overlays: state.overlays, status: statusText(state), paint, clipId });
+ return { ...out, state };
+}
+
+function spectrumView(obj: SpectrumObject, ctx: ObjectCtx): ObjectView {
+ const out = spectrumPlot(ctx.doc, obj, pagePaint(ctx), ctx.scale);
+ return { specs: out.specs, box: out.box };
+}
+
+function spectrumDeps(obj: SpectrumObject, doc: FormChemDocument): unknown[] {
+ const deps: unknown[] = [doc.id, spectrumCache.epoch];
+ if ('predicted' in obj.source) deps.push(doc.objects[obj.source.predicted.fragment]);
+ for (const id of obj.overlays ?? []) deps.push(doc.objects[id]);
+ return deps;
+}
+
+export function spectrumMarks(doc: FormChemDocument, obj: SpectrumObject, style: ObjectCtx['style'], colour: string): PlotMark[] {
+ return spectrumPlot(doc, obj, pagePaint({ style, colour }), undefined).marks;
+}
+
+export const spectrumKind: ObjectKindDef<'spectrum'> = {
+ view: spectrumView,
+ deps: spectrumDeps,
+ scaled: true,
+ watch: (fn) => spectrumCache.subscribe(fn),
+};
diff --git a/frontend/src/canvas/spectrum-links.ts b/frontend/src/canvas/spectrum-links.ts
new file mode 100644
index 00000000..7209406c
--- /dev/null
+++ b/frontend/src/canvas/spectrum-links.ts
@@ -0,0 +1,189 @@
+import { isFragment, resolveStyle, type FormChemDocument, type Id, type SpectrumObject } from '../engine/model';
+import { marksLinkedTo } from '../chem/spectrum-ops';
+import { fmt, inflate } from './render/geom';
+import { spectrumMarks, type PlotMark } from './render/spectrum';
+import { spectrumCache } from './render/spectrum-data';
+import { patchChildren, specKey, type NodeSpec } from './render/svg';
+import type { CanvasView } from './view';
+
+export interface MarkRef { spectrum: Id; mark: Id }
+export interface AtomGroup { frag: Id; atoms: Id[] }
+export type FocusSource = 'page' | 'panel' | 'link';
+export interface LinkFocus { marks: MarkRef[]; atoms: AtomGroup[]; source: FocusSource }
+
+const NONE: LinkFocus = { marks: [], atoms: [], source: 'page' };
+const PAD_PT = 1.2;
+
+class LinkStore {
+ private now: LinkFocus = NONE;
+ private pendingAtoms: AtomGroup | null = null;
+ private listeners = new Set<() => void>();
+
+ get focus(): LinkFocus { return this.now; }
+ get pending(): AtomGroup | null { return this.pendingAtoms; }
+
+ set(next: LinkFocus | null): void {
+ const f = next ?? NONE;
+ if (JSON.stringify(f) === JSON.stringify(this.now)) return;
+ this.now = f;
+ this.emit();
+ }
+
+ clear(source: FocusSource): void {
+ if (this.now.source === source && (this.now.marks.length || this.now.atoms.length)) this.set(null);
+ }
+
+ setPending(group: AtomGroup | null): void {
+ if (JSON.stringify(group) === JSON.stringify(this.pendingAtoms)) return;
+ this.pendingAtoms = group;
+ this.emit();
+ }
+
+ subscribe(fn: () => void): () => void {
+ this.listeners.add(fn);
+ return () => { this.listeners.delete(fn); };
+ }
+
+ private emit(): void {
+ for (const fn of [...this.listeners]) fn();
+ }
+}
+
+export const spectrumLinks = new LinkStore();
+
+const markCache = new WeakMap();
+
+export function marksOf(doc: FormChemDocument, obj: SpectrumObject): PlotMark[] {
+ const hit = markCache.get(obj);
+ if (hit && hit.epoch === spectrumCache.epoch && hit.doc === doc) return hit.marks;
+ const style = resolveStyle(doc, obj);
+ const marks = spectrumMarks(doc, obj, style, obj.color ?? style.foreground);
+ markCache.set(obj, { epoch: spectrumCache.epoch, doc, marks });
+ return marks;
+}
+
+export function pageSpectra(doc: FormChemDocument, page: { order: Id[] } | null): SpectrumObject[] {
+ const out: SpectrumObject[] = [];
+ const walk = (ids: readonly Id[], depth: number): void => {
+ for (const id of ids) {
+ const o = doc.objects[id];
+ if (!o || o.hidden || depth > 32) continue;
+ if (o.kind === 'spectrum') out.push(o);
+ else if (o.kind === 'group') walk(o.children, depth + 1);
+ }
+ };
+ if (page) walk(page.order, 0);
+ return out;
+}
+
+export function focusForAtom(spectra: SpectrumObject[], frag: Id, atom: Id, source: FocusSource): LinkFocus {
+ const marks: MarkRef[] = [];
+ for (const s of spectra) {
+ for (const m of marksLinkedTo(s, frag, atom)) marks.push({ spectrum: s.id, mark: m });
+ }
+ return { marks, atoms: [{ frag, atoms: [atom] }], source };
+}
+
+export function focusForMark(obj: SpectrumObject, mark: Id, atoms: { object: Id; atoms: Id[] } | undefined, source: FocusSource): LinkFocus {
+ return { marks: [{ spectrum: obj.id, mark }], atoms: atoms ? [{ frag: atoms.object, atoms: atoms.atoms }] : [], source };
+}
+
+export class SpectrumLinkLayer {
+ private readonly layer: SVGGElement;
+ private key = '';
+ private readonly offs: (() => void)[] = [];
+ private overSpectrum: Id | null = null;
+
+ constructor(private readonly view: CanvasView) {
+ this.layer = view.docLayer('fc-spec-links');
+ this.offs.push(spectrumLinks.subscribe(() => this.draw()));
+ this.offs.push(view.on('hover', () => this.hovered()));
+ this.offs.push(view.on('client', () => { spectrumLinks.set(null); this.draw(); }));
+ this.offs.push(spectrumCache.subscribe(() => this.draw()));
+ const move = (e: PointerEvent): void => this.pointer(e);
+ const leave = (): void => { this.overSpectrum = null; spectrumLinks.clear('page'); };
+ view.root.addEventListener('pointermove', move, { passive: true });
+ view.root.addEventListener('pointerleave', leave);
+ this.offs.push(() => { view.root.removeEventListener('pointermove', move); view.root.removeEventListener('pointerleave', leave); });
+ }
+
+ private doc(): FormChemDocument | null {
+ return this.view.client ? this.view.doc : null;
+ }
+
+ private hovered(): void {
+ const doc = this.doc();
+ const h = this.view.hover();
+ if (!doc) return;
+ if (h.kind === 'object' && doc.objects[h.object]?.kind === 'spectrum') {
+ this.overSpectrum = h.object;
+ return;
+ }
+ this.overSpectrum = null;
+ if (h.kind === 'atom') {
+ const f = focusForAtom(pageSpectra(doc, this.view.page()), h.frag, h.atom, 'page');
+ if (f.marks.length) { spectrumLinks.set(f); return; }
+ }
+ spectrumLinks.clear('page');
+ }
+
+ private pointer(e: PointerEvent): void {
+ const doc = this.doc();
+ const id = this.overSpectrum;
+ if (!doc || !id) return;
+ const obj = doc.objects[id];
+ if (obj?.kind !== 'spectrum') return;
+ const p = this.view.toDoc(e.clientX, e.clientY);
+ const tol = 2 / Math.max(this.view.viewport().zoom, 0.05);
+ const found = marksOf(doc, obj).find((m) => {
+ const b = inflate(m.hit, tol);
+ return p[0] >= b.x && p[0] <= b.x + b.w && p[1] >= b.y && p[1] <= b.y + b.h;
+ });
+ if (found) spectrumLinks.set(focusForMark(obj, found.id, found.atoms, 'page'));
+ else spectrumLinks.clear('page');
+ }
+
+ draw(): void {
+ const doc = this.doc();
+ const specs: NodeSpec[] = [];
+ if (doc) {
+ const f = spectrumLinks.focus;
+ const ring = (frag: Id, ids: Id[], cls: string): void => {
+ const fr = doc.objects[frag];
+ if (!isFragment(fr)) return;
+ const r = resolveStyle(doc, fr).bond_length * 0.34;
+ for (const a of ids) {
+ const at = fr.atoms[a];
+ if (at) specs.push({ tag: 'circle', a: { cx: fmt(at.x), cy: fmt(at.y), r: fmt(r), class: cls } });
+ }
+ };
+ for (const g of f.atoms) ring(g.frag, g.atoms, 'fc-spec-link-atom');
+ const pend = spectrumLinks.pending;
+ if (pend) ring(pend.frag, pend.atoms, 'fc-spec-link-atom is-pending');
+ const page = this.view.page();
+ const shown = new Set(pageSpectra(doc, page).map((s) => s.id));
+ for (const m of f.marks) {
+ const obj = doc.objects[m.spectrum];
+ if (obj?.kind !== 'spectrum' || !shown.has(obj.id)) continue;
+ const mk = marksOf(doc, obj).find((k) => k.id === m.mark);
+ if (!mk) continue;
+ const b = inflate(mk.hit, PAD_PT);
+ specs.push({ tag: 'rect', a: { x: fmt(b.x), y: fmt(b.y), width: fmt(b.w), height: fmt(b.h), rx: fmt(PAD_PT), class: 'fc-spec-link-mark' } });
+ }
+ }
+ const key = specKey(specs);
+ if (key === this.key) return;
+ this.key = key;
+ patchChildren(this.layer, specs);
+ }
+
+ destroy(): void {
+ for (const off of this.offs) off();
+ this.offs.length = 0;
+ this.layer.remove();
+ }
+}
+
+export function mountSpectrumLinks(view: CanvasView): SpectrumLinkLayer {
+ return new SpectrumLinkLayer(view);
+}
diff --git a/frontend/src/canvas/tools/common.ts b/frontend/src/canvas/tools/common.ts
index ba3e5f01..6226da88 100644
--- a/frontend/src/canvas/tools/common.ts
+++ b/frontend/src/canvas/tools/common.ts
@@ -126,6 +126,8 @@ export function objectBounds(doc: FormChemDocument, obj: DocObject, depth = 0):
case 'image':
case 'bracket':
case 'tlc':
+ case 'spectrum':
+ case 'model3d':
return { x: obj.x, y: obj.y, w: obj.w, h: obj.h };
default:
return null;
diff --git a/frontend/src/canvas/tools/handles.ts b/frontend/src/canvas/tools/handles.ts
index e8ef394a..0353d99d 100644
--- a/frontend/src/canvas/tools/handles.ts
+++ b/frontend/src/canvas/tools/handles.ts
@@ -14,7 +14,7 @@ export interface ObjectHandle { object: Id; kind: HandleKind; at: Point; index?:
export interface HandleDrag { shift: boolean; alt: boolean }
-const BOXED = new Set(['shape', 'image', 'bracket', 'tlc', 'table']);
+const BOXED = new Set(['shape', 'image', 'bracket', 'tlc', 'table', 'spectrum', 'model3d']);
const BOX_HANDLES: [BoxHandle, number, number][] = [
['nw', 0, 0], ['n', 0.5, 0], ['ne', 1, 0], ['e', 1, 0.5], ['se', 1, 1], ['s', 0.5, 1], ['sw', 0, 1], ['w', 0, 0.5],
];
diff --git a/frontend/src/canvas/tools/scale.ts b/frontend/src/canvas/tools/scale.ts
index 7ffacecc..d6a13ee7 100644
--- a/frontend/src/canvas/tools/scale.ts
+++ b/frontend/src/canvas/tools/scale.ts
@@ -164,6 +164,8 @@ function resizeObject(d: Draft, base: FormChemDocument, id: Id, k: number, label
case 'image':
case 'bracket':
case 'tlc':
+ case 'spectrum':
+ case 'model3d':
case 'table': {
const r = objectBounds(d.doc, cur);
if (!r) break;
diff --git a/frontend/src/canvas/tools/select.ts b/frontend/src/canvas/tools/select.ts
index 2c911ae8..fe3b5bb2 100644
--- a/frontend/src/canvas/tools/select.ts
+++ b/frontend/src/canvas/tools/select.ts
@@ -19,6 +19,9 @@ export const HANDLE_SLOP_PX = 8;
export const DOUBLE_CLICK_MS = 400;
export const NUDGE = { plain: 1, shift: 10, alt: 0.1 };
const MARQUEE_ID = 'o_preview_marquee';
+export const OBJECT_OPEN_EVENT = 'formchem:object-open';
+export interface ObjectOpenDetail { object: Id; kind: string }
+const OPENABLE = new Set(['spectrum']);
type Mode =
| { kind: 'move'; start: ToolPointer; sel: Selection; dragging: boolean; duplicate: boolean }
@@ -210,6 +213,12 @@ export class SelectTool implements Tool {
this.mode = null;
return;
}
+ if (dbl && h.kind === 'object' && OPENABLE.has(ctx.client.doc.objects[h.object]?.kind ?? '')) {
+ ctx.setSelection(hitSelection(h));
+ document.dispatchEvent(new CustomEvent(OBJECT_OPEN_EVENT, { detail: { object: h.object, kind: ctx.client.doc.objects[h.object].kind } }));
+ this.mode = null;
+ return;
+ }
let next = sel;
if (p.shift) next = toggle(sel, h);
else if (!hitSelected(sel, h)) next = hitSelection(h);
diff --git a/frontend/src/canvas/tools/transform.ts b/frontend/src/canvas/tools/transform.ts
index ceb67638..2de9a06b 100644
--- a/frontend/src/canvas/tools/transform.ts
+++ b/frontend/src/canvas/tools/transform.ts
@@ -117,12 +117,16 @@ function mapObject(d: Draft, obj: DocObject, f: Mapper, o: MapOpts, depth = 0):
if (r) boxed(r.x, r.y, r.w, r.h);
return;
}
+ case 'spectrum':
+ boxed(obj.x, obj.y, obj.w, obj.h);
+ return;
case 'shape':
case 'image':
case 'bracket':
- case 'tlc': {
+ case 'tlc':
+ case 'model3d': {
boxed(obj.x, obj.y, obj.w, obj.h);
- if (obj.kind !== 'tlc' && (o.rotate || (o.mirror && obj.rot))) {
+ if (obj.kind !== 'tlc' && obj.kind !== 'model3d' && (o.rotate || (o.mirror && obj.rot))) {
const r = rot(obj.rot);
if (r !== undefined) set('rot', r);
}
diff --git a/frontend/src/chem/conformer-mol.ts b/frontend/src/chem/conformer-mol.ts
new file mode 100644
index 00000000..0aa8ce8e
--- /dev/null
+++ b/frontend/src/chem/conformer-mol.ts
@@ -0,0 +1,55 @@
+import type { Conformer, Fragment, Id } from '../engine/model';
+
+export interface BlockAtom { id: string; parent?: string }
+export interface LocalBlock { text: string; atoms: BlockAtom[]; conformer: Id; energy: number | null; method: string }
+
+const BOND_CODE: Record = { '1': 1, '2': 2, '3': 3, '4': 4, '1.5': 4 };
+
+const f = (n: number): string => n.toFixed(4).padStart(10);
+const i3 = (n: number): string => String(n).padStart(3);
+
+export function activeConformer(frag: Fragment): Conformer | null {
+ const list = frag.conformers ?? [];
+ if (!list.length) return null;
+ return list.find((c) => c.id === frag.conformer) ?? list[0];
+}
+
+export function conformerMolblock(frag: Fragment, conf: Conformer = activeConformer(frag) as Conformer): LocalBlock | null {
+ if (!conf) return null;
+ const atoms: BlockAtom[] = [];
+ const lines: string[] = [];
+ const index = new Map();
+ const charges: string[] = [];
+ for (const a of Object.values(frag.atoms)) {
+ const p = conf.coords[a.id];
+ if (!p) continue;
+ atoms.push({ id: a.id });
+ index.set(a.id, atoms.length);
+ const sym = (a.element || 'C').slice(0, 3);
+ lines.push(`${f(p[0])}${f(p[1])}${f(p[2])} ${sym.padEnd(3)} 0 0 0 0 0 0 0 0 0 0 0 0`);
+ if (a.charge) charges.push(`${i3(atoms.length)} ${String(a.charge).padStart(3)}`);
+ }
+ const bonds: string[] = [];
+ for (const b of Object.values(frag.bonds)) {
+ const ia = index.get(b.a), ib = index.get(b.b);
+ if (!ia || !ib) continue;
+ bonds.push(`${i3(ia)}${i3(ib)}${i3(BOND_CODE[String(b.order ?? 1)] ?? 1)} 0`);
+ }
+ for (const [parent, hs] of Object.entries(conf.h ?? {})) {
+ const ip = index.get(parent);
+ if (!ip) continue;
+ hs.forEach((p, k) => {
+ atoms.push({ id: `${parent}:h${k}`, parent });
+ lines.push(`${f(p[0])}${f(p[1])}${f(p[2])} H 0 0 0 0 0 0 0 0 0 0 0 0`);
+ bonds.push(`${i3(ip)}${i3(atoms.length)} 1 0`);
+ });
+ }
+ if (atoms.length > 999 || bonds.length > 999) return null;
+ const out = [frag.name ?? '', ' FormChem 3D', '', `${i3(atoms.length)}${i3(bonds.length)} 0 0 0 0 0 0 0 0999 V2000`, ...lines, ...bonds];
+ for (let k = 0; k < charges.length; k += 8) {
+ const chunk = charges.slice(k, k + 8);
+ out.push(`M CHG${i3(chunk.length)} ${chunk.join(' ')}`);
+ }
+ out.push('M END');
+ return { text: out.join('\n') + '\n', atoms, conformer: conf.id, energy: conf.energy ?? null, method: conf.method ?? '' };
+}
diff --git a/frontend/src/chem/elements3d.ts b/frontend/src/chem/elements3d.ts
new file mode 100644
index 00000000..c17836ea
--- /dev/null
+++ b/frontend/src/chem/elements3d.ts
@@ -0,0 +1,30 @@
+const COLOURS: Readonly> = Object.freeze({
+ H: '#f2f2f2', He: '#d9ffff', Li: '#cc80ff', Be: '#c2ff00', B: '#ffb5b5', C: '#909090', N: '#3050f8', O: '#ff0d0d', F: '#90e050', Ne: '#b3e3f5',
+ Na: '#ab5cf2', Mg: '#8aff00', Al: '#bfa6a6', Si: '#f0c8a0', P: '#ff8000', S: '#e6c619', Cl: '#1ff01f', Ar: '#80d1e3',
+ K: '#8f40d4', Ca: '#3dff00', Ti: '#bfc2c7', Cr: '#8a99c7', Mn: '#9c7ac7', Fe: '#e06633', Co: '#f090a0', Ni: '#50d050', Cu: '#c88033', Zn: '#7d80b0',
+ Ga: '#c28f8f', Ge: '#668f8f', As: '#bd80e3', Se: '#ffa100', Br: '#a62929', Kr: '#5cb8d1', Rb: '#702eb0', Sr: '#00ff00',
+ Ru: '#248f8f', Rh: '#0a7d8c', Pd: '#006985', Ag: '#c0c0c0', Cd: '#ffd98f', Sn: '#668080', Sb: '#9e63b5', Te: '#d47a00', I: '#940094', Xe: '#429eb0',
+ Cs: '#57178f', Ba: '#00c900', Pt: '#d0d0e0', Au: '#ffd123', Hg: '#b8b8d0', Pb: '#575961', Bi: '#9e4fb5',
+});
+
+const VDW: Readonly> = Object.freeze({
+ H: 1.2, He: 1.4, Li: 1.82, B: 1.92, C: 1.7, N: 1.55, O: 1.52, F: 1.47, Ne: 1.54, Na: 2.27, Mg: 1.73, Al: 1.84, Si: 2.1, P: 1.8, S: 1.8, Cl: 1.75, Ar: 1.88,
+ K: 2.75, Ca: 2.31, Ni: 1.63, Cu: 1.4, Zn: 1.39, Ga: 1.87, Ge: 2.11, As: 1.85, Se: 1.9, Br: 1.85, Kr: 2.02, Pd: 1.63, Ag: 1.72, Cd: 1.58,
+ Sn: 2.17, Sb: 2.06, Te: 2.06, I: 1.98, Xe: 2.16, Pt: 1.75, Au: 1.66, Hg: 1.55, Pb: 2.02, Bi: 2.07,
+});
+
+const OTHER = '#ff1493';
+const OTHER_RADIUS = 2.0;
+
+export const ELEMENT_COLOURS_3D = COLOURS;
+
+export const canonicalSymbol = (raw: string): string => (raw ? raw[0].toUpperCase() + raw.slice(1).toLowerCase() : raw);
+
+export const colour3d = (symbol: string): string => COLOURS[canonicalSymbol(symbol)] ?? OTHER;
+
+export const vdwRadius = (symbol: string): number => VDW[canonicalSymbol(symbol)] ?? OTHER_RADIUS;
+
+export function rgb3d(symbol: string): [number, number, number] {
+ const hex = colour3d(symbol).slice(1);
+ return [parseInt(hex.slice(0, 2), 16) / 255, parseInt(hex.slice(2, 4), 16) / 255, parseInt(hex.slice(4, 6), 16) / 255];
+}
diff --git a/frontend/src/chem/geom3d.ts b/frontend/src/chem/geom3d.ts
new file mode 100644
index 00000000..a3c8e877
--- /dev/null
+++ b/frontend/src/chem/geom3d.ts
@@ -0,0 +1,46 @@
+export type P3 = { x: number; y: number; z: number };
+export type MeasureKind = 'distance' | 'angle' | 'dihedral';
+
+const v = (a: P3, b: P3): [number, number, number] => [b.x - a.x, b.y - a.y, b.z - a.z];
+const dot = (a: number[], b: number[]): number => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+const cross = (a: number[], b: number[]): [number, number, number] => [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
+const norm = (a: number[]): number => Math.hypot(a[0], a[1], a[2]);
+const DEG = 180 / Math.PI;
+
+export const distance = (a: P3, b: P3): number => norm(v(a, b));
+
+export function angle(a: P3, b: P3, c: P3): number {
+ const u = v(b, a), w = v(b, c);
+ const d = norm(u) * norm(w);
+ return d > 0 ? Math.acos(Math.max(-1, Math.min(1, dot(u, w) / d))) * DEG : 0;
+}
+
+export function dihedral(a: P3, b: P3, c: P3, d: P3): number {
+ const b1 = v(a, b), b2 = v(b, c), b3 = v(c, d);
+ return Math.atan2(norm(b2) * dot(b1, cross(b2, b3)), dot(cross(b1, b2), cross(b2, b3))) * DEG;
+}
+
+export const MEASURE_ATOMS: Record = { distance: 2, angle: 3, dihedral: 4 };
+
+export function kindFor(count: number): MeasureKind | null {
+ return count === 2 ? 'distance' : count === 3 ? 'angle' : count === 4 ? 'dihedral' : null;
+}
+
+export function measure(points: P3[]): { kind: MeasureKind; value: number } | null {
+ const kind = kindFor(points.length);
+ if (!kind) return null;
+ const [a, b, c, d] = points;
+ const value = kind === 'distance' ? distance(a, b) : kind === 'angle' ? angle(a, b, c) : dihedral(a, b, c, d);
+ return { kind, value };
+}
+
+export function formatMeasure(kind: MeasureKind, value: number): string {
+ return kind === 'distance' ? `${value.toFixed(3)} Å` : `${value.toFixed(1)}°`;
+}
+
+export function centroid(points: P3[]): P3 {
+ const n = Math.max(1, points.length);
+ let x = 0, y = 0, z = 0;
+ for (const p of points) { x += p.x; y += p.y; z += p.z; }
+ return { x: x / n, y: y / n, z: z / n };
+}
diff --git a/frontend/src/chem/spectrum-ops.ts b/frontend/src/chem/spectrum-ops.ts
new file mode 100644
index 00000000..2ee66bf8
--- /dev/null
+++ b/frontend/src/chem/spectrum-ops.ts
@@ -0,0 +1,84 @@
+import { newId, type AtomRef, type FormChemDocument, type Id, type SpectrumIntegral, type SpectrumMultiplet, type SpectrumObject, type SpectrumPeak } from '../engine/model';
+import { objectPath, type Op } from '../engine/ops';
+import type { YMode } from '../engine/spectra-api';
+
+export type MarkList = 'peaks' | 'integrals' | 'multiplets';
+export type AnyMark = SpectrumPeak | SpectrumIntegral | SpectrumMultiplet;
+export interface FoundMark { list: MarkList; index: number; mark: AnyMark }
+
+const LISTS: readonly MarkList[] = ['peaks', 'integrals', 'multiplets'];
+const round = (v: number, d = 4): number => Math.round(v * 10 ** d) / 10 ** d;
+
+export function spectrumOf(doc: FormChemDocument, id: Id | null | undefined): SpectrumObject | null {
+ const o = id ? doc.objects[id] : undefined;
+ return o?.kind === 'spectrum' ? o : null;
+}
+
+export function findMark(obj: SpectrumObject, id: Id): FoundMark | null {
+ for (const list of LISTS) {
+ const arr = (obj[list] ?? []) as AnyMark[];
+ const index = arr.findIndex((m) => m.id === id);
+ if (index >= 0) return { list, index, mark: arr[index] };
+ }
+ return null;
+}
+
+export function marksLinkedTo(obj: SpectrumObject, frag: Id, atom: Id): Id[] {
+ const out: Id[] = [];
+ for (const list of LISTS) for (const m of (obj[list] ?? []) as AnyMark[]) if (m.atoms?.object === frag && m.atoms.atoms.includes(atom)) out.push(m.id);
+ return out;
+}
+
+const setKey = (obj: SpectrumObject, key: string, value: unknown): Op => ({ op: 'set', path: objectPath(obj.id, key), value });
+
+export function setList(obj: SpectrumObject, list: MarkList, items: AnyMark[]): Op {
+ return items.length ? setKey(obj, list, items) : { op: 'set', path: objectPath(obj.id, list) };
+}
+
+const sortPeaks = (list: SpectrumPeak[]): SpectrumPeak[] => [...list].sort((a, b) => b.x - a.x);
+
+export function addPeakOps(obj: SpectrumObject, x: number, y: number | null): { ops: Op[]; id: Id } {
+ const id = newId('k');
+ const peak: SpectrumPeak = y === null ? { id, x: round(x) } : { id, x: round(x), y: round(y) };
+ return { ops: [setList(obj, 'peaks', sortPeaks([...(obj.peaks ?? []), peak]))], id };
+}
+
+export function removeMarkOps(obj: SpectrumObject, id: Id): Op[] {
+ const f = findMark(obj, id);
+ if (!f) return [];
+ const arr = (obj[f.list] ?? []) as AnyMark[];
+ return [setList(obj, f.list, arr.filter((m) => m.id !== id))];
+}
+
+export function linkOps(obj: SpectrumObject, id: Id, ref: AtomRef | null): Op[] {
+ const f = findMark(obj, id);
+ if (!f) return [];
+ const arr = ((obj[f.list] ?? []) as AnyMark[]).map((m) => {
+ if (m.id !== id) return m;
+ const next = { ...m };
+ if (ref && ref.atoms.length) next.atoms = { object: ref.object, atoms: [...new Set(ref.atoms)] };
+ else delete next.atoms;
+ return next;
+ });
+ return [setList(obj, f.list, arr)];
+}
+
+export function viewOps(obj: SpectrumObject, patch: Partial>): Op[] {
+ const next: Record = { ...(obj.view ?? {}) };
+ for (const [k, v] of Object.entries(patch)) {
+ if (v === undefined || v === null) delete next[k];
+ else next[k] = v;
+ }
+ if (JSON.stringify(next) === JSON.stringify(obj.view ?? {})) return [];
+ return [Object.keys(next).length ? setKey(obj, 'view', next) : { op: 'set', path: objectPath(obj.id, 'view') }];
+}
+
+export function yModeOps(obj: SpectrumObject, mode: YMode): Op[] {
+ return viewOps(obj, { y_mode: mode, y_from: undefined, y_to: undefined });
+}
+
+export function markLabel(obj: SpectrumObject, m: AnyMark): string {
+ if ('shift' in m) return `${m.shift.toFixed(2)} ${m.kind ?? 'm'}`;
+ if ('from' in m) return `${m.from.toFixed(2)} to ${m.to.toFixed(2)}`;
+ return obj.technique === 'ir' || obj.technique === 'raman' ? Math.round(m.x).toString() : m.x.toFixed(obj.technique === 'nmr' ? 2 : 1);
+}
diff --git a/frontend/src/engine/client.ts b/frontend/src/engine/client.ts
index 816a52c7..25109a05 100644
--- a/frontend/src/engine/client.ts
+++ b/frontend/src/engine/client.ts
@@ -3,6 +3,7 @@ import { live as sharedLive, type LiveClient, type LiveMessage, type LiveStatus
import type { DocEvent, DocumentClient } from './client-api';
import { newId, nowIso, type Derived, type FormChemDocument, type Id } from './model';
import { applyOps, applyTransaction, inverseOf, makeTransaction, OpError, resolvePath, sameValue, type Op, type Transaction } from './ops';
+import { isConformerDrop, staleConformerOps, watchConformers } from './stale';
export const DOCUMENTS = '/api/documents';
export const docUrl = (id: Id, tail = ''): string => `${DOCUMENTS}/${encodeURIComponent(id)}${tail ? `/${tail}` : ''}`;
@@ -116,7 +117,12 @@ export class EngineDocumentClient implements DocumentClient {
if (this.closed || !Array.isArray(ops) || !ops.length) return null;
let tx: Transaction | null = null;
try {
+ const watched = watchConformers(this.current, ops);
tx = makeTransaction(this.current, label, ops, { origin: 'user', coalesce: opts.coalesce });
+ if (watched.size) {
+ const drops = staleConformerOps(applyTransaction(this.current, tx, { validate: false }).doc, watched);
+ if (drops.length) tx = makeTransaction(this.current, label, [...ops, ...drops], { origin: 'user', coalesce: opts.coalesce, id: tx.id });
+ }
const done = applyTransaction(this.current, tx);
this.current = done.doc;
tx = done.tx;
@@ -398,7 +404,7 @@ export class EngineDocumentClient implements DocumentClient {
private take(tx: Transaction): boolean {
const i = this.pendingIndex(tx.id);
- if (i >= 0) return this.confirm(tx.id);
+ if (i >= 0) return this.confirm(tx.id, tx);
try {
this.confirmed = applyTransaction(this.confirmed, tx, { validate: false }).doc;
} catch {
@@ -415,17 +421,23 @@ export class EngineDocumentClient implements DocumentClient {
return true;
}
- private confirm(id: Id): boolean {
+ private confirm(id: Id, echoed?: Transaction): boolean {
const i = this.pendingIndex(id);
if (i < 0) return false;
const p = this.pending[i];
+ const tail = echoed && Array.isArray(echoed.ops) && echoed.ops.length > p.tx.ops.length ? echoed.ops.slice(p.tx.ops.length) : [];
+ let extra = tail.every(isConformerDrop) ? tail : [];
try {
- this.confirmed = applyOps(this.confirmed, p.tx.ops).doc;
+ const own = applyOps(this.confirmed, p.tx.ops).doc;
+ const more = extra.length ? applyOps(own, extra) : null;
+ this.confirmed = more ? more.doc : own;
+ extra = more ? more.ops : [];
} catch {
return false;
}
this.pending.splice(i, 1);
- if (i > 0) this.rebase(null);
+ if (extra.length) this.rebase({ ...p.tx, id: newId('x'), label: p.tx.label, origin: 'system', ops: extra, inverse: inverseOf(extra) });
+ else if (i > 0) this.rebase(null);
return true;
}
diff --git a/frontend/src/engine/model.ts b/frontend/src/engine/model.ts
index 711d71a1..7964dbed 100644
--- a/frontend/src/engine/model.ts
+++ b/frontend/src/engine/model.ts
@@ -173,6 +173,8 @@ export interface Fragment extends ObjectBase {
chiral?: 'absolute' | 'relative' | 'racemic';
stereo_groups?: StereoGroup[];
rgroups?: Record;
+ conformers?: Conformer[];
+ conformer?: Id;
}
export interface Run {
@@ -316,9 +318,54 @@ export interface OrbitalObject extends ObjectBase {
atom?: { object: Id; atom: Id };
}
+export interface AtomRef { object: Id; atoms: Id[] }
+export type SpectrumTechnique = 'ir' | 'raman' | 'uvvis' | 'ms' | 'nmr';
+export interface SpectrumPeak { id: Id; x: number; y?: number; label?: string; atoms?: AtomRef }
+export interface SpectrumIntegral { id: Id; from: number; to: number; value?: number; atoms?: AtomRef }
+export interface SpectrumMultiplet { id: Id; from: number; to: number; shift: number; kind?: string; j?: number[]; atoms?: AtomRef }
+export type SpectrumSource =
+ | { media: Id; block?: number }
+ | { predicted: { fragment: Id; method: string; version?: string; frequency?: number } };
+export interface SpectrumObject extends ObjectBase {
+ kind: 'spectrum';
+ x: number; y: number; w: number; h: number;
+ technique: SpectrumTechnique;
+ nucleus?: string;
+ source: SpectrumSource;
+ view?: { x_from?: number; x_to?: number; y_from?: number; y_to?: number; y_mode?: 'transmittance' | 'absorbance' };
+ peaks?: SpectrumPeak[];
+ integrals?: SpectrumIntegral[];
+ multiplets?: SpectrumMultiplet[];
+ overlays?: Id[];
+}
+
+export interface Conformer {
+ id: Id;
+ coords: Record;
+ h?: Record;
+ expanded?: Record;
+ energy?: number;
+ method?: string;
+ converged?: boolean;
+ scan?: { atoms: string[]; angle: number };
+}
+export type Model3dStyle = 'wire' | 'stick' | 'ballstick' | 'spacefill' | 'cartoon';
+export interface Model3dLabel { id: Id; kind: 'distance' | 'angle' | 'dihedral'; atoms: string[]; value?: number }
+export interface Model3dObject extends ObjectBase {
+ kind: 'model3d';
+ x: number; y: number; w: number; h: number;
+ source: { fragment: Id } | { media: Id; format: 'pdb' | 'cif' | 'sdf' | 'mol' };
+ display?: Model3dStyle;
+ surface?: { kind: 'vdw' | 'sas' | 'ses'; color?: 'esp' | 'uniform'; opacity?: number };
+ camera?: { matrix: number[]; zoom?: number };
+ focus?: Record;
+ snapshot?: Id;
+ labels?: Model3dLabel[];
+}
+
export type DocObject =
| Fragment | TextObject | CaptionObject | ArrowObject | PlusObject | BracketObject | ShapeObject
- | LineObject | TableObject | ImageObject | GroupObject | TlcObject | OrbitalObject;
+ | LineObject | TableObject | ImageObject | GroupObject | TlcObject | OrbitalObject | SpectrumObject | Model3dObject;
export type ObjectKind = DocObject['kind'];
export interface Expansion {
diff --git a/frontend/src/engine/names-api.ts b/frontend/src/engine/names-api.ts
new file mode 100644
index 00000000..51057264
--- /dev/null
+++ b/frontend/src/engine/names-api.ts
@@ -0,0 +1,110 @@
+import { get, post } from '../io/api';
+import type { Expansion, Fragment, Id } from './model';
+
+export type NameConfidence = 'high' | 'medium' | 'low' | 'none';
+export type NameKind = 'trivial' | 'systematic';
+
+export interface NameNote { code?: string; text: string; position?: number }
+
+export interface StructureFromName {
+ name: string;
+ smiles: string | null;
+ inchikey: string | null;
+ confidence: NameConfidence;
+ method: string;
+ engine: string;
+ version: string;
+ warnings: NameNote[];
+ error?: NameNote;
+ fragment: Fragment | null;
+ formula: string | null;
+ layout?: string;
+}
+
+export interface NameItem { text: string; kind: NameKind; confidence: NameConfidence; method: string }
+
+export interface NamesOfStructure {
+ names: NameItem[];
+ engine: string;
+ version: string;
+ inchikey: string | null;
+ warnings: NameNote[];
+ reason?: string;
+}
+
+export interface NameInsertResult extends Omit {
+ changed: boolean;
+ tx: unknown;
+ rev: number;
+ objects: Id[];
+}
+
+export interface NameEngineInfo { id: string; label: string; version: string; available: boolean; stats?: Record }
+
+export interface NameSource { fragment?: Fragment; expansions?: Record; smiles?: string }
+
+type Rec = Record;
+const isRec = (v: unknown): v is Rec => typeof v === 'object' && v !== null && !Array.isArray(v);
+const str = (v: unknown, fallback = ''): string => (typeof v === 'string' ? v : fallback);
+const CONFIDENCE: readonly NameConfidence[] = ['high', 'medium', 'low', 'none'];
+const confidence = (v: unknown): NameConfidence => (CONFIDENCE.includes(v as NameConfidence) ? (v as NameConfidence) : 'none');
+
+function notes(v: unknown): NameNote[] {
+ if (!Array.isArray(v)) return [];
+ return v.filter(isRec).filter((n) => typeof n.text === 'string').map((n) => ({
+ text: n.text as string,
+ ...(typeof n.code === 'string' ? { code: n.code } : {}),
+ ...(typeof n.position === 'number' ? { position: n.position } : {}),
+ }));
+}
+
+function structure(raw: unknown): StructureFromName {
+ const r = isRec(raw) ? raw : {};
+ const frag = isRec(r.fragment) && isRec(r.fragment.atoms) ? (r.fragment as unknown as Fragment) : null;
+ const error = notes(isRec(r.error) ? [r.error] : [])[0];
+ return {
+ name: str(r.name),
+ smiles: typeof r.smiles === 'string' ? r.smiles : null,
+ inchikey: typeof r.inchikey === 'string' ? r.inchikey : null,
+ confidence: confidence(r.confidence),
+ method: str(r.method),
+ engine: str(r.engine),
+ version: str(r.version),
+ warnings: notes(r.warnings),
+ ...(error ? { error } : {}),
+ fragment: frag,
+ formula: typeof r.formula === 'string' ? r.formula : null,
+ ...(typeof r.layout === 'string' ? { layout: r.layout } : {}),
+ };
+}
+
+function names(raw: unknown): NamesOfStructure {
+ const r = isRec(raw) ? raw : {};
+ const list = Array.isArray(r.names) ? r.names.filter(isRec) : [];
+ return {
+ names: list.filter((n) => typeof n.text === 'string' && n.text).map((n) => ({
+ text: n.text as string,
+ kind: n.kind === 'trivial' ? 'trivial' : 'systematic',
+ confidence: confidence(n.confidence),
+ method: str(n.method),
+ })),
+ engine: str(r.engine),
+ version: str(r.version),
+ inchikey: typeof r.inchikey === 'string' ? r.inchikey : null,
+ warnings: notes(r.warnings),
+ ...(typeof r.reason === 'string' && r.reason ? { reason: r.reason } : {}),
+ };
+}
+
+export const NAMES = '/api/names';
+
+export const namesApi = {
+ toStructure: (name: string, opts: { bondLength?: number; engine?: string } = {}, signal?: AbortSignal): Promise =>
+ post(`${NAMES}/to-structure`, { name, ...(opts.bondLength ? { bond_length: opts.bondLength } : {}), ...(opts.engine ? { engine: opts.engine } : {}) }, signal).then(structure),
+ toName: (source: NameSource, signal?: AbortSignal): Promise =>
+ post(`${NAMES}/to-name`, source, signal).then(names),
+ insert: (docId: Id, name: string, at?: { x: number; y: number; page?: Id }): Promise =>
+ post(`/api/documents/${encodeURIComponent(docId)}/names/insert`, { name, ...(at ?? {}) }),
+ engines: (): Promise =>
+ get<{ engines?: NameEngineInfo[] }>(`${NAMES}/engines`).then((r) => (Array.isArray(r.engines) ? r.engines : [])),
+};
diff --git a/frontend/src/engine/nmr-api.ts b/frontend/src/engine/nmr-api.ts
new file mode 100644
index 00000000..f072c04f
--- /dev/null
+++ b/frontend/src/engine/nmr-api.ts
@@ -0,0 +1,43 @@
+import { post } from '../io/api';
+import { live } from '../io/live';
+import { docUrl } from './client';
+import type { Id, SpectrumObject } from './model';
+import type { Transaction } from './ops';
+
+export type NmrNucleus = '1H' | '13C';
+
+export interface NmrWarning { code: string; text: string; atoms?: Id[] }
+
+export interface NmrPrediction {
+ nucleus: NmrNucleus;
+ frequency: number;
+ method: string;
+ version: string;
+ journal: string;
+ warnings: NmrWarning[];
+}
+
+export interface PredictedSpectrumAnswer {
+ changed: boolean;
+ tx: Transaction | null;
+ rev: number;
+ id: Id;
+ object: SpectrumObject;
+ prediction: NmrPrediction;
+}
+
+export interface RefreshAnswer {
+ changed: boolean;
+ tx: Transaction | null;
+ rev: number;
+ id: Id;
+ prediction: NmrPrediction;
+}
+
+const withClient = (body: Record): Record => (live.clientId ? { ...body, client: live.clientId } : body);
+
+export const nmrApi = {
+ predictSpectrum: (doc: Id, object: Id, nucleus: NmrNucleus, frequency?: number): Promise =>
+ post(docUrl(doc, 'nmr/predict-spectrum'), withClient({ object, nucleus, ...(frequency ? { frequency } : {}) })),
+ refresh: (doc: Id, object: Id): Promise => post(docUrl(doc, 'nmr/refresh'), withClient({ object })),
+};
diff --git a/frontend/src/engine/spectra-api.ts b/frontend/src/engine/spectra-api.ts
new file mode 100644
index 00000000..6e4e7698
--- /dev/null
+++ b/frontend/src/engine/spectra-api.ts
@@ -0,0 +1,147 @@
+import { get, post, request, ApiError } from '../io/api';
+import { live } from '../io/live';
+import { docUrl } from './client';
+import type { DocumentClient } from './client-api';
+import type { FormChemDocument, Id, SpectrumObject, SpectrumTechnique } from './model';
+
+export type YMode = 'transmittance' | 'absorbance';
+export type SpectrumExportFormat = 'jdx' | 'csv';
+
+export interface SpectrumRange { from: number; to: number }
+
+export interface SpectrumQuery {
+ from?: number;
+ to?: number;
+ points: number;
+ yMode?: YMode;
+}
+
+export interface SpectrumData {
+ technique: SpectrumTechnique;
+ nucleus: string;
+ title: string;
+ xUnit: string;
+ yUnit: string;
+ xLabel: string;
+ yLabel: string;
+ yMode: YMode | null;
+ yModes: YMode[];
+ sticks: boolean;
+ x: number[];
+ y: number[];
+ xRange: [number, number];
+ yRange: [number, number];
+ frequency: number | null;
+ method: string;
+ version: string;
+}
+
+export interface SpectrumEdit { changed: boolean; count: number; skipped: number }
+export interface SpectrumExport { name: string; mime: string; text: string }
+
+type Rec = Record;
+const isRec = (v: unknown): v is Rec => typeof v === 'object' && v !== null && !Array.isArray(v);
+const str = (v: unknown, d = ''): string => (typeof v === 'string' ? v : d);
+const num = (v: unknown): number | null => (typeof v === 'number' && Number.isFinite(v) ? v : typeof v === 'string' && v.trim() && Number.isFinite(Number(v)) ? Number(v) : null);
+const nums = (v: unknown): number[] => (Array.isArray(v) ? v.map((n) => (typeof n === 'number' ? n : Number.NaN)) : []);
+const mode = (v: unknown): YMode | null => (v === 'transmittance' || v === 'absorbance' ? v : null);
+
+const spectrumUrl = (doc: Id, object: Id, tail: string): string => docUrl(doc, `spectra/${encodeURIComponent(object)}/${tail}`);
+
+function sourceDoc(doc: FormChemDocument): Id {
+ const meta = (doc.meta ?? {}) as Record;
+ const from = (k: string): string => (isRec(meta[k]) && typeof (meta[k] as Rec).from === 'string' ? (meta[k] as Rec).from as string : '');
+ return from('embedded') || from('clipboard') || doc.id;
+}
+const withClient = (body: Rec): Rec => (live.clientId ? { ...body, client: live.clientId } : body);
+
+function extent(xs: number[]): [number, number] {
+ let lo = Infinity, hi = -Infinity;
+ for (const v of xs) if (Number.isFinite(v)) { if (v < lo) lo = v; if (v > hi) hi = v; }
+ return Number.isFinite(lo) ? [lo, hi] : [0, 1];
+}
+
+const TECHNIQUES: readonly SpectrumTechnique[] = ['ir', 'raman', 'uvvis', 'ms', 'nmr'];
+
+export function readSpectrumData(r: Rec, technique: SpectrumTechnique): SpectrumData {
+ let x = nums(r.x), y = nums(r.y);
+ const n = Math.min(x.length, y.length);
+ x = x.slice(0, n);
+ y = y.slice(0, n);
+ const full = isRec(r.full) ? r.full : {};
+ const axis = isRec(r.axis) ? r.axis : {};
+ const ax = isRec(axis.x) ? axis.x : {}, ay = isRec(axis.y) ? axis.y : {};
+ const meta = isRec(r.metadata) ? r.metadata : {};
+ const tech = str(r.technique) as SpectrumTechnique;
+ const [ex0, ex1] = extent(x), [ey0, ey1] = extent(y);
+ return {
+ technique: TECHNIQUES.includes(tech) ? tech : technique,
+ nucleus: str(r.nucleus),
+ title: str(r.title),
+ xUnit: str(ax.unit),
+ yUnit: str(ay.unit),
+ xLabel: str(ax.label),
+ yLabel: str(ay.label),
+ yMode: mode(r.y_mode),
+ yModes: Array.isArray(r.y_modes) ? r.y_modes.map(mode).filter((m): m is YMode => !!m) : [],
+ sticks: r.kind === 'sticks',
+ x,
+ y,
+ xRange: [num(full.x_min) ?? ex0, num(full.x_max) ?? ex1],
+ yRange: [num(full.y_min) ?? ey0, num(full.y_max) ?? ey1],
+ frequency: num(r.frequency) ?? num(meta['.OBSERVE FREQUENCY']),
+ method: str(r.method),
+ version: str(r.version),
+ };
+}
+
+function editOf(r: Rec, list: string): SpectrumEdit {
+ return { changed: r.changed === true, count: Array.isArray(r[list]) ? r[list].length : 0, skipped: num(r.skipped) ?? 0 };
+}
+
+export const spectraApi = {
+ async data(doc: FormChemDocument, obj: SpectrumObject, q: SpectrumQuery, signal?: AbortSignal): Promise {
+ const p = new URLSearchParams({ n: String(Math.max(16, Math.round(q.points))) });
+ if (q.from !== undefined) p.set('from', String(q.from));
+ if (q.to !== undefined) p.set('to', String(q.to));
+ if (q.yMode) p.set('y_mode', q.yMode);
+ const r = await get(`${spectrumUrl(sourceDoc(doc), obj.id, 'data')}?${p}`, signal);
+ return readSpectrumData(isRec(r) ? r : {}, obj.technique);
+ },
+
+ async pickPeaks(client: DocumentClient, obj: SpectrumObject, range: SpectrumRange | null, opts: { threshold?: number; replace?: boolean } = {}): Promise {
+ const body: Rec = range ? { from: range.from, to: range.to } : {};
+ if (opts.threshold !== undefined) body.threshold = opts.threshold;
+ if (opts.replace) body.replace = true;
+ return editOf(await post(spectrumUrl(client.id, obj.id, 'peaks'), withClient(body)), 'peaks');
+ },
+
+ async integrate(client: DocumentClient, obj: SpectrumObject, range: SpectrumRange, value?: number): Promise {
+ const body: Rec = { from: range.from, to: range.to };
+ if (value !== undefined) body.value = value;
+ return editOf(await post(spectrumUrl(client.id, obj.id, 'integrals'), withClient(body)), 'integrals');
+ },
+
+ async setIntegralValue(client: DocumentClient, obj: SpectrumObject, id: Id, value: number): Promise {
+ return editOf(await post(spectrumUrl(client.id, obj.id, 'integrals'), withClient({ id, value })), 'integrals');
+ },
+
+ async exportFile(doc: FormChemDocument, obj: SpectrumObject, format: SpectrumExportFormat, original = false): Promise {
+ const p = new URLSearchParams({ format });
+ if (original) p.set('original', '1');
+ const res = await request(`${spectrumUrl(sourceDoc(doc), obj.id, 'export')}?${p}`);
+ if (!res.ok) {
+ const body = await res.json().catch(() => ({})) as { detail?: unknown };
+ throw new ApiError(typeof body.detail === 'string' ? body.detail : res.statusText || `HTTP ${res.status}`, res.status);
+ }
+ const text = await res.text();
+ if (!text) throw new Error('the engine returned an empty file');
+ const fromDisposition = /filename\*?=(?:UTF-8'')?"?([^";]+)"?/i.exec(res.headers.get('content-disposition') ?? '')?.[1];
+ const name = res.headers.get('x-formchem-filename') ?? (fromDisposition ? decodeURIComponent(fromDisposition) : '');
+ return {
+ name: name || (format === 'csv' ? 'spectrum.csv' : 'spectrum.jdx'),
+ mime: res.headers.get('content-type')?.split(';')[0] || (format === 'csv' ? 'text/csv' : 'chemical/x-jcamp-dx'),
+ text,
+ };
+ },
+};
diff --git a/frontend/src/engine/stale.ts b/frontend/src/engine/stale.ts
new file mode 100644
index 00000000..e0989563
--- /dev/null
+++ b/frontend/src/engine/stale.ts
@@ -0,0 +1,74 @@
+import type { FormChemDocument, Fragment, Id } from './model';
+import type { Op } from './ops';
+
+const ATOM_FIELDS = ['element', 'charge', 'isotope', 'radical', 'hydrogens', 'label', 'expansion', 'generic', 'rgroup', 'query'] as const;
+const BOND_FIELDS = ['order', 'stereo', 'query', 'topology'] as const;
+const BOND_PATH_FIELDS: readonly string[] = [...BOND_FIELDS, 'a', 'b'];
+const DEFAULTS: Record = { charge: 0, radical: 'none', order: 1, stereo: 'none' };
+const DIRECTED: readonly unknown[] = ['wedge', 'hash', 'hollow'];
+const OWN: readonly unknown[] = ['conformers', 'conformer'];
+
+type Rec = Record;
+
+function stable(v: unknown): string {
+ if (Array.isArray(v)) return `[${v.map(stable).join(',')}]`;
+ if (v && typeof v === 'object') return `{${Object.keys(v).sort().map((k) => `${JSON.stringify(k)}:${stable((v as Rec)[k])}`).join(',')}}`;
+ return JSON.stringify(v ?? null);
+}
+
+const norm = (field: string, value: unknown): string => stable(value === undefined || value === null ? DEFAULTS[field] ?? null : value);
+
+export function graphSignature(frag: Fragment): string {
+ const atoms = Object.values(frag.atoms ?? {}).map((a) => `${a.id}|${ATOM_FIELDS.map((f) => norm(f, (a as unknown as Rec)[f])).join('|')}`).sort();
+ const bonds = Object.values(frag.bonds ?? {}).map((b) => {
+ const r = b as unknown as Rec;
+ const ends = [String(b.a), String(b.b)];
+ if (!DIRECTED.includes(r.stereo)) ends.sort();
+ return `${b.id}|${ends.join('>')}|${BOND_FIELDS.map((f) => norm(f, r[f])).join('|')}`;
+ }).sort();
+ return `${atoms.join(';')}#${bonds.join(';')}`;
+}
+
+function touched(ops: Op[]): { hit: Set | null; own: Set } {
+ const hit = new Set(), own = new Set();
+ for (const op of ops) {
+ const path = op.path;
+ if (!Array.isArray(path) || !path.length) return { hit: null, own };
+ if (path[0] !== 'objects') continue;
+ const fid = path[1];
+ if (typeof fid !== 'string') return { hit: null, own };
+ if (path.length === 2) { hit.add(fid); continue; }
+ const part = path[2];
+ if (OWN.includes(part)) { own.add(fid); continue; }
+ if (part !== 'atoms' && part !== 'bonds') continue;
+ if (path.length <= 4) { hit.add(fid); continue; }
+ const field = path[4];
+ if (typeof field === 'string' && (part === 'atoms' ? (ATOM_FIELDS as readonly string[]) : BOND_PATH_FIELDS).includes(field)) hit.add(fid);
+ }
+ return { hit, own };
+}
+
+export function watchConformers(doc: FormChemDocument, ops: Op[]): Map {
+ const { hit, own } = touched(ops);
+ const out = new Map();
+ for (const fid of hit ?? Object.keys(doc.objects)) {
+ if (own.has(fid)) continue;
+ const o = doc.objects[fid];
+ if (o?.kind === 'fragment' && o.conformers?.length) out.set(fid, graphSignature(o));
+ }
+ return out;
+}
+
+export const isConformerDrop = (op: Op): boolean =>
+ op.op === 'set' && op.value === undefined && op.path.length === 3 && op.path[0] === 'objects' && typeof op.path[1] === 'string' && OWN.includes(op.path[2]);
+
+export function staleConformerOps(doc: FormChemDocument, watched: Map): Op[] {
+ const extra: Op[] = [];
+ for (const [fid, before] of watched) {
+ const o = doc.objects[fid];
+ if (o?.kind !== 'fragment' || !o.conformers?.length || graphSignature(o) === before) continue;
+ extra.push({ op: 'set', path: ['objects', fid, 'conformers'] });
+ if ('conformer' in o) extra.push({ op: 'set', path: ['objects', fid, 'conformer'] });
+ }
+ return extra;
+}
diff --git a/frontend/src/engine/three-api.ts b/frontend/src/engine/three-api.ts
new file mode 100644
index 00000000..691108dd
--- /dev/null
+++ b/frontend/src/engine/three-api.ts
@@ -0,0 +1,281 @@
+import { get, post, request, upload } from '../io/api';
+import { live } from '../io/live';
+import { docUrl } from './client';
+import type { DocumentClient } from './client-api';
+import type { Id, Model3dObject } from './model';
+import type { Transaction } from './ops';
+
+export type ForceField = 'MMFF94' | 'MMFF94s' | 'UFF';
+export const FORCE_FIELDS: readonly ForceField[] = ['MMFF94', 'MMFF94s', 'UFF'];
+export type MolFormat = 'mol' | 'mol3000' | 'sdf' | 'pdb' | 'xyz';
+export type StructureFormat = 'pdb' | 'cif' | 'sdf' | 'mol';
+export type ChargeKind = 'gasteiger' | 'mmff';
+
+export interface Warning3d { code?: string; text: string; atoms?: string[] }
+export interface Changed3d { changed: boolean; tx: Transaction | null; rev: number }
+
+export interface ConformerInfo {
+ id: Id;
+ energy: number | null;
+ relative: number | null;
+ method: string;
+ converged: boolean | null;
+ rmsd: number | null;
+ population: number | null;
+}
+
+export interface MinimiseReport {
+ method: string;
+ asked: string;
+ fallback: string | null;
+ before: number | null;
+ after: number | null;
+ gradient: number | null;
+ iterations: number | null;
+ converged: boolean | null;
+ built: boolean;
+}
+
+export interface BuildAnswer extends Changed3d { conformer: ConformerInfo | null; minimise: MinimiseReport | null; method: string; engine: string; warnings: Warning3d[] }
+export interface ConformersAnswer extends Changed3d { conformers: ConformerInfo[]; active: Id | null; embedded: number | null; kept: number | null; method: string; engine: string; warnings: Warning3d[] }
+export interface MinimiseAnswer extends Changed3d { conformer: ConformerInfo | null; report: MinimiseReport | null; engine: string; warnings: Warning3d[] }
+
+export interface ScanPoint { angle: number; measured: number | null; energy: number; relative: number; converged: boolean | null }
+export interface ScanAnswer extends Changed3d { points: ScanPoint[]; minimum: { angle: number; energy: number } | null; maximum: { angle: number; energy: number } | null; method: string; engine: string; warnings: Warning3d[] }
+
+export interface MeasureAnswer { kind: 'distance' | 'angle' | 'dihedral'; value: number; unit: string; atoms: string[]; conformer: Id | null; method: string }
+
+export interface ChargesAnswer { kind: string; method: string; engine: string; charges: Record; h: Record; range: [number, number]; label: string; warnings: Warning3d[] }
+
+export interface BlockAtom { id: string; parent?: string }
+export interface MolblockAnswer { format: string; text: string; conformer: Id | null; energy: number | null; method: string; atoms: BlockAtom[] }
+
+export interface LigandInfo { het: string; chain: string; resseq: number; name: string; atoms: number; key: string }
+export interface ChainInfo { id: string; residues: number; polymer: string; sequence: string }
+export interface StructureSummary { models: number; atoms: number; residues: number; chains: ChainInfo[]; ligands: LigandInfo[]; waters: number; warnings: Warning3d[] }
+export interface ParseAnswer { format: string; name: string; title: string; idCode: string; summary: StructureSummary }
+export interface OpenAnswer extends Changed3d { media: Id | null; format: string; summary: StructureSummary | null; object: Model3dObject | null }
+export interface LigandAnswer extends Changed3d { fragment: Id | null; ligand: LigandInfo | null; bonds: string; smiles: string; engine: string; warnings: Warning3d[] }
+export interface FileAnswer { format: string; text: string; filename: string; count: number; conformer: string | null }
+
+type Rec = Record;
+const isRec = (v: unknown): v is Rec => typeof v === 'object' && v !== null && !Array.isArray(v);
+const str = (v: unknown, d = ''): string => (typeof v === 'string' ? v : d);
+const num = (v: unknown): number | null => (typeof v === 'number' && Number.isFinite(v) ? v : null);
+const bool = (v: unknown): boolean | null => (typeof v === 'boolean' ? v : null);
+const list = (v: unknown): unknown[] => (Array.isArray(v) ? v : []);
+const seg = encodeURIComponent;
+
+const base = (doc: Id, tail: string): string => docUrl(doc, `3d/${tail}`);
+const withClient = (body: Rec): Rec => (live.clientId ? { ...body, client: live.clientId } : body);
+
+function warning(w: unknown): Warning3d | null {
+ if (typeof w === 'string') return w ? { text: w } : null;
+ if (!isRec(w)) return null;
+ const text = str(w.text, str(w.code));
+ return text ? { code: str(w.code) || undefined, text, atoms: list(w.atoms).map(String) } : null;
+}
+
+const warnings = (v: unknown): Warning3d[] => list(v).map(warning).filter((w): w is Warning3d => w !== null);
+
+function changed(r: Rec): Changed3d {
+ return { changed: r.changed === true, tx: isRec(r.tx) ? (r.tx as unknown as Transaction) : null, rev: num(r.rev) ?? -1 };
+}
+
+function conformer(v: unknown): ConformerInfo | null {
+ if (!isRec(v) || typeof v.id !== 'string') return null;
+ return {
+ id: v.id,
+ energy: num(v.energy),
+ relative: num(v.relative),
+ method: str(v.method),
+ converged: bool(v.converged),
+ rmsd: num(v.rmsd_to_lowest),
+ population: num(v.population),
+ };
+}
+
+function minimiseReport(v: unknown): MinimiseReport | null {
+ if (!isRec(v)) return null;
+ return {
+ method: str(v.method),
+ asked: str(v.asked),
+ fallback: typeof v.fallback === 'string' ? v.fallback : null,
+ before: num(v.energy_before),
+ after: num(v.energy_after),
+ gradient: num(v.rms_gradient),
+ iterations: num(v.iterations),
+ converged: bool(v.converged),
+ built: v.built === true,
+ };
+}
+
+function summary(v: unknown): StructureSummary {
+ const s = isRec(v) ? v : {};
+ return {
+ models: num(s.models) ?? 1,
+ atoms: num(s.atoms) ?? 0,
+ residues: num(s.residues) ?? 0,
+ chains: list(s.chains).filter(isRec).map((c) => ({ id: str(c.id), residues: num(c.residues) ?? 0, polymer: str(c.polymer), sequence: str(c.sequence) })),
+ ligands: list(s.ligands).filter(isRec).map((l) => ({ het: str(l.het), chain: str(l.chain), resseq: num(l.resseq) ?? 0, name: str(l.name), atoms: num(l.atoms) ?? 0, key: str(l.key, str(l.het)) })),
+ waters: num(s.waters) ?? 0,
+ warnings: warnings(s.warnings),
+ };
+}
+
+export const threeApi = {
+ async build(doc: Id, object: Id, opts: { minimise?: boolean; method?: ForceField } = {}): Promise {
+ const r = await post(base(doc, 'build'), withClient({ object, ...opts }));
+ const rep = isRec(r.report) ? r.report : {};
+ return { ...changed(r), conformer: conformer(r.conformer), minimise: minimiseReport(rep.minimise), method: str(rep.method, str(r.method)), engine: str(rep.engine, str(r.engine)), warnings: warnings(rep.warnings) };
+ },
+
+ async conformers(doc: Id, object: Id, opts: { n?: number; window?: number; keep?: number; rmsd?: number; method?: ForceField } = {}): Promise {
+ const r = await post(base(doc, 'conformers'), withClient({ object, ...opts }));
+ const rep = isRec(r.report) ? r.report : {};
+ return {
+ ...changed(r),
+ conformers: list(r.conformers).map(conformer).filter((c): c is ConformerInfo => !!c),
+ active: typeof r.active === 'string' ? r.active : null,
+ embedded: num(rep.embedded),
+ kept: num(rep.kept),
+ method: str(rep.method),
+ engine: str(rep.engine),
+ warnings: warnings(rep.warnings),
+ };
+ },
+
+ async active(doc: Id, object: Id, id: Id): Promise {
+ return changed(await post(base(doc, 'active'), withClient({ object, conformer: id })));
+ },
+
+ async minimise(doc: Id, object: Id, opts: { conformer?: Id; method?: ForceField } = {}): Promise {
+ const r = await post(base(doc, 'minimise'), withClient({ object, ...opts }));
+ const rep = isRec(r.report) ? r.report : {};
+ return { ...changed(r), conformer: conformer(r.conformer), report: minimiseReport(rep), engine: str(rep.engine), warnings: warnings(rep.warnings) };
+ },
+
+ async scan(doc: Id, object: Id, atoms: string[], opts: { start: number; end: number; step: number; method?: ForceField; conformer?: Id; store?: boolean }, signal?: AbortSignal): Promise {
+ const r = await post(base(doc, 'scan'), withClient({ object, atoms, ...opts }), signal);
+ const pt = (v: unknown): { angle: number; energy: number } | null => (isRec(v) && num(v.angle) !== null && num(v.energy) !== null ? { angle: num(v.angle) as number, energy: num(v.energy) as number } : null);
+ return {
+ ...changed(r),
+ points: list(r.points).filter(isRec).map((p) => ({ angle: num(p.angle) ?? 0, measured: num(p.measured), energy: num(p.energy) ?? 0, relative: num(p.relative) ?? 0, converged: bool(p.converged) })),
+ minimum: pt(r.minimum),
+ maximum: pt(r.maximum),
+ method: str(r.method),
+ engine: str(r.engine),
+ warnings: warnings(r.warnings),
+ };
+ },
+
+ async measure(doc: Id, object: Id, atoms: string[], conformer?: Id): Promise {
+ const r = await get(`${base(doc, 'measure')}?object=${seg(object)}&atoms=${atoms.map(seg).join(',')}${conformer ? `&conformer=${seg(conformer)}` : ''}`);
+ const kind = r.kind === 'angle' || r.kind === 'dihedral' ? r.kind : 'distance';
+ return { kind, value: num(r.value) ?? 0, unit: str(r.unit), atoms: list(r.atoms).map(String), conformer: typeof r.conformer === 'string' ? r.conformer : null, method: str(r.method) };
+ },
+
+ async charges(doc: Id, object: Id, kind: ChargeKind = 'gasteiger'): Promise {
+ const r = await get(`${base(doc, 'charges')}?object=${seg(object)}&kind=${kind}`);
+ const ch: Record = {};
+ if (isRec(r.charges)) for (const [k, v] of Object.entries(r.charges)) if (num(v) !== null) ch[k] = v as number;
+ const h: Record = {};
+ if (isRec(r.h)) for (const [k, v] of Object.entries(r.h)) h[k] = list(v).map((x) => num(x) ?? 0);
+ const range = list(r.range).map((x) => num(x) ?? 0);
+ return {
+ kind: str(r.kind, kind),
+ method: str(r.method),
+ engine: str(r.engine),
+ charges: ch,
+ h,
+ range: range.length === 2 ? [range[0], range[1]] : [-0.5, 0.5],
+ label: str(r.label, 'approximate, from empirical charges'),
+ warnings: warnings(r.warnings),
+ };
+ },
+
+ async molblock(doc: Id, object: Id, opts: { conformer?: Id | 'all'; format?: MolFormat } = {}, signal?: AbortSignal): Promise {
+ const q = [`object=${seg(object)}`, `format=${opts.format ?? 'mol'}`, 'as=json'];
+ if (opts.conformer) q.push(`conformer=${seg(opts.conformer)}`);
+ const r = await get(`${base(doc, 'molblock')}?${q.join('&')}`, signal);
+ return {
+ format: str(r.format, opts.format ?? 'mol'),
+ text: str(r.text),
+ conformer: typeof r.conformer === 'string' ? r.conformer : null,
+ energy: num(r.energy),
+ method: str(r.method),
+ atoms: list(r.atoms).filter(isRec).map((a) => (typeof a.parent === 'string' ? { id: str(a.id), parent: a.parent } : { id: str(a.id) })),
+ };
+ },
+
+ async structure(doc: Id, object: Id): Promise<{ format: string; media: Id | null; summary: StructureSummary }> {
+ const r = await get(`${base(doc, 'structure')}?object=${seg(object)}`);
+ return { format: str(r.format), media: typeof r.media === 'string' ? r.media : null, summary: summary(r.summary) };
+ },
+
+ async mediaText(doc: Id, media: Id): Promise {
+ const res = await request(docUrl(doc, `media/${seg(media)}`));
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
+ return res.text();
+ },
+
+ async parse(file: File): Promise {
+ const r = await upload('/api/3d/parse', [file], 'file');
+ return { format: str(r.format), name: str(r.name, file.name), title: str(r.title), idCode: str(r.id_code), summary: summary(r.summary) };
+ },
+
+ async open(doc: Id, file: File, place: { page: Id; x: number; y: number } | null): Promise {
+ const fd = new FormData();
+ fd.append('file', file, file.name);
+ fd.append('as', 'model');
+ if (place) {
+ fd.append('place', '1');
+ fd.append('page', place.page);
+ fd.append('x', String(place.x));
+ fd.append('y', String(place.y));
+ }
+ if (live.clientId) fd.append('client', live.clientId);
+ const res = await request(base(doc, 'open'), { method: 'POST', body: fd });
+ const r = (await res.json().catch(() => ({}))) as Rec;
+ if (!res.ok) throw new Error(str(r.detail, `HTTP ${res.status}`));
+ return {
+ ...changed(r),
+ media: typeof r.id === 'string' ? r.id : null,
+ format: str(r.format),
+ summary: isRec(r.summary) ? summary(r.summary) : null,
+ object: isRec(r.object) ? (r.object as unknown as Model3dObject) : null,
+ };
+ },
+
+ async extractLigand(doc: Id, object: Id, opts: { ligand?: string; page?: Id; x?: number; y?: number } = {}): Promise {
+ const r = await post(base(doc, 'extract-ligand'), withClient({ object, ...opts }));
+ const l = isRec(r.ligand) ? r.ligand : null;
+ return {
+ ...changed(r),
+ fragment: typeof r.fragment === 'string' ? r.fragment : null,
+ ligand: l ? { het: str(l.het), chain: str(l.chain), resseq: num(l.resseq) ?? 0, name: str(l.name), atoms: num(l.atoms) ?? 0, key: str(l.key, str(l.het)) } : null,
+ bonds: str(r.bonds),
+ smiles: str(r.smiles),
+ engine: str(r.engine),
+ warnings: warnings(r.warnings),
+ };
+ },
+
+ async file(doc: Id, object: Id, format: MolFormat, conformer?: Id | 'all'): Promise {
+ const q = [`object=${seg(object)}`, `format=${format}`, 'as=json'];
+ if (conformer) q.push(`conformer=${seg(conformer)}`);
+ const r = await get(`${base(doc, 'molblock')}?${q.join('&')}`);
+ return { format: str(r.format, format), text: str(r.text), filename: str(r.filename), count: num(r.count) ?? 1, conformer: typeof r.conformer === 'string' ? r.conformer : null };
+ },
+};
+
+export function untilRev(client: DocumentClient, rev: number, ms = 4000): Promise {
+ if (rev < 0 || client.rev >= rev) return Promise.resolve(true);
+ return new Promise((resolve) => {
+ const done = (ok: boolean): void => { window.clearTimeout(timer); off(); resolve(ok); };
+ const off = client.on(() => { if (client.rev >= rev) done(true); });
+ const timer = window.setTimeout(() => done(client.rev >= rev), ms);
+ });
+}
+
+export const methodLabel = (method: string, engine: string): string => [method, engine].filter(Boolean).join(', ');
diff --git a/frontend/src/i18n/keys/part12.json b/frontend/src/i18n/keys/part12.json
new file mode 100644
index 00000000..b1ec977b
--- /dev/null
+++ b/frontend/src/i18n/keys/part12.json
@@ -0,0 +1,162 @@
+[
+"Spectrum",
+"Draw or select a structure to name.",
+"Names could not be computed",
+"FormChem has no name for this structure.",
+"Copy Name",
+"Copied name: {0}",
+"Chemical name to insert; leave it out to open the dialog",
+"Copies the name of the selected structure (or of the structures on the page) as plain text: the common name when FormChem knows one, otherwise its systematic name, which is only offered when it reads back to the same structure.",
+"trivial or systematic to choose which name to copy; leave it out for the first one",
+"The predicted spectrum is up to date.",
+"Refresh Predicted Spectrum",
+"Select one structure first",
+"Select a predicted spectrum first",
+"Predicted 1H NMR spectrum added ({0})",
+"Predicted 13C NMR spectrum added ({0})",
+"Predicted spectrum refreshed ({0})",
+"Fragment id of the structure; default the selected structure, or the only one on the page",
+"Spectrometer frequency in MHz (default 400 for 1H, 100 for 13C)",
+"Adds a predicted 1H NMR spectrum of the selected structure beside it, as one undo step: a spectrum object computed by FormChem's own increment rules (no shift database), whose multiplets and integrals are linked to the structure's atoms, titled with the method, version and frequency. The curve is recomputed from the structure, never stored.",
+"Adds a predicted 13C NMR spectrum of the selected structure beside it, as one undo step: a spectrum object computed by FormChem's own increment rules (no shift database), whose peaks are linked to the structure's atoms, titled with the method, version and frequency. The curve is recomputed from the structure, never stored.",
+"Could not predict the spectrum",
+"Predict 1H NMR Spectrum",
+"Predict 13C NMR Spectrum",
+"Recomputes the multiplets, integrals or peaks of a predicted spectrum after its structure changed, with the running predictor version, as one undo step; nothing changes when it is up to date.",
+"Predicted spectrum id; default the selected one or the one open in the Spectrum editor",
+"Could not refresh the spectrum",
+"No new peaks in that range.",
+"Drag across a range in the Spectrum editor to integrate it.",
+"Link Peak to Atoms",
+"Unlink Peak",
+"Spectrum Y Axis",
+"Spectrum from File...",
+"Edit Spectrum...",
+"Pick Peaks",
+"Integrate",
+"Transmittance or Absorbance",
+"Export Spectrum...",
+"Select a spectrum first",
+"no spectrum with id {0}",
+"Peaks picked: {0} (already there: {1})",
+"Peaks picked: {0}",
+"Integrals are for NMR spectra",
+"Select a peak, integral or multiplet in the Spectrum editor first",
+"The atoms must all belong to one structure",
+"Only IR, Raman and UV-Vis spectra switch between transmittance and absorbance",
+"Exported: {0}",
+"Spectrum object id; default the selected spectrum or the one open in the Spectrum editor",
+"Imports a JCAMP-DX spectrum file into the active drawing (one spectrum object per data block, the file kept byte for byte), as one undo step per file. Without path it opens a file dialog.",
+"Absolute path of a .jdx, .dx or .jcamp file",
+"Could not import the spectrum",
+"Opens the Spectrum editor for the selected spectrum (the same as double-clicking it).",
+"Could not open the spectrum",
+"Finds the peaks of a spectrum in a range (default the range shown) and adds them to its peak list, skipping peaks already there, as one undo step.",
+"Range start in the x unit (cm-1, nm, m/z, ppm)",
+"Range end in the x unit",
+"Optional detection threshold in y units",
+"Replace the peak list instead of adding to it",
+"Could not pick peaks",
+"Adds an NMR integral over a range, scaled like the existing integrals (or to value, rescaling the rest), as one undo step. Without from and to it switches the Spectrum editor to its integrate tool.",
+"Range start in ppm",
+"Range end in ppm",
+"Value this integral should read, for example a proton count",
+"Could not integrate",
+"Links a peak, integral or multiplet to atoms of a structure, as one undo step. Without atoms it uses the selected atoms, or waits for the person to click atoms in the drawing.",
+"Peak, integral or multiplet id; default the one selected in the Spectrum editor",
+"Structure (fragment) id the atoms belong to",
+"Atom ids",
+"Could not link the peak",
+"Removes the atom link of a peak, integral or multiplet, as one undo step.",
+"Could not unlink the peak",
+"Shows an IR, Raman or UV-Vis spectrum as transmittance or absorbance (toggles without mode), as one undo step.",
+"Y axis to show; leave out to toggle",
+"Could not change the y axis",
+"Saves a spectrum as JCAMP-DX (with its peak table when it has peaks) or as CSV of every point, through the engine.",
+"File format, default jdx",
+"With jdx: the original imported file untouched",
+"Absolute path to write; leave out to ask",
+"Could not export the spectrum",
+"Insert Spectrum from File",
+"The file holds no spectrum FormChem can draw",
+"Insert Spectrum",
+"The spectrum could not be placed: its file did not reach the drawing.",
+"Inserted spectra: {0}",
+"Wavelength (µm)",
+"Wavenumber (cm⁻¹)",
+"Raman shift (cm⁻¹)",
+"Wavelength (nm)",
+"Frequency (Hz)",
+"δ (ppm)",
+"Transmittance (%)",
+"Transmittance",
+"Absorbance",
+"Relative abundance (%)",
+"Intensity",
+"{0} NMR",
+"MS",
+"UV-Vis",
+"Raman",
+"IR",
+"Predicted {0}, {1} MHz ({2})",
+"Predicted {0}, {1} MHz",
+"Predicted {0} ({1})",
+"Predicted {0}",
+"{0}, {1} MHz",
+"Spectrum unavailable: {0}",
+"Loading spectrum",
+"Common name",
+"Systematic",
+"High confidence",
+"Medium confidence",
+"Low confidence",
+"Not read",
+"FormChem names",
+"Could not read the name",
+"Insert Structure from Name",
+"Structure from Name",
+"A name, such as aspirin or 2-methylpropan-1-ol",
+"Chemical name",
+"Type a name to see its structure.",
+"No structure for this name",
+"Dictionary",
+"Systematic parser",
+"Rule-based namer, round-trip checked",
+"Spectrum tools",
+"Show the whole spectrum",
+"Y axis",
+"Show this range on the page",
+"Double-click a spectrum in the drawing to edit it here.",
+"Peaks and integrals",
+"Predicted",
+"Integral value",
+"Link to Atoms",
+"Unlink",
+"1 atom",
+"Atoms to link",
+"Click more atoms, then Done.",
+"Click the atoms in the drawing that belong to this peak, then Done.",
+"Nothing to integrate in that range.",
+"Remove Peak",
+"Add Peak",
+"Linked to 1 atom",
+"Set Spectrum Range",
+"Type a positive number.",
+"Could not set the integral",
+"Pan and zoom: drag to pan, wheel to zoom, Shift-drag to zoom to a range",
+"Zoom to a range: drag across the plot",
+"Pick peaks: drag across a range",
+"Add or remove a peak: click near a peak",
+"Integrate: drag across a range",
+"Peak",
+"Integral",
+"Multiplet",
+"{0} atoms",
+"Linked to {0}",
+"Drag to pan, wheel to zoom, Shift-drag to zoom to a range. Click a label to select it.",
+"Drag across the plot to zoom to that range.",
+"Drag across a range to pick its peaks.",
+"Click near a peak to add it; click a peak label to remove it.",
+"Drag across a range to integrate it.",
+"Linked to {0} atoms"
+]
diff --git a/frontend/src/i18n/keys/part13.json b/frontend/src/i18n/keys/part13.json
new file mode 100644
index 00000000..c01f5406
--- /dev/null
+++ b/frontend/src/i18n/keys/part13.json
@@ -0,0 +1,190 @@
+[
+"the engine returned an empty file",
+"name is longer than {0} characters",
+"fragments over {0} atoms are not named",
+"The structure holds labels, R-groups or any-atoms, which have no name.",
+"The structure could not be read as a molecule (check valences).",
+"There is no structure to name.",
+"Inverted index names (parent first, then a comma and the substituents) are not read; write the name in normal order, such as 1,2-dichlorobenzene.",
+"D- and L- are read only for the amino acids and sugars in FormChem's dictionary; give R or S descriptors for other names.",
+"FormChem read the whole name, but it does not make a complete structure name (a parent such as hexane or benzene, or a suffix, may be missing).",
+"FormChem could not read the name from character {0} (\"{1}\").",
+"FormChem read the name, but {0}.",
+"the structure could not be completed",
+"The name can be read in more than one way; FormChem drew the reading with the fewest assumptions.",
+"The name gives no stereo descriptors, so stereocentres and double bonds are drawn unspecified.",
+"No systematic name: {0}.",
+"The systematic name FormChem built did not read back to the same structure, so it is not shown.",
+"that double bond cannot be E or Z",
+"the descriptor locant {0} is not a position of the parent",
+"position {0} does not start a double bond that can be E or Z",
+"{0} needs exactly one double bond that can be cis or trans; this structure has {1}",
+"{0} is unclear for this double bond; give E or Z instead",
+"({0}) needs a locant: the structure has {1} stereocentres",
+"position {0} is not a stereocentre, so ({1}) cannot apply",
+"({0}) needs a locant: the structure has {1} double bonds that can be E or Z",
+"position {0} cannot be given {1}",
+"that double bond cannot be given {0}",
+"{0} does not say which configuration is meant, so the structure is drawn without stereo.",
+"{0} has no attachment point",
+"there is no room for {0} at {1}",
+"{0} cannot bond there",
+"chains longer than {0} carbons are not read yet",
+"{0} is too small to be a ring",
+"{0}-{1} is a tautomer FormChem does not draw from a name yet",
+"locant {0} is not a position of {1}",
+"{0} is not a chain position",
+"a multiple bond cannot start at position {0} of {1}",
+"position {0} of {1} cannot carry that multiple bond",
+"there is no room for a multiple bond at position {0} of {1}",
+"there is no room for the multiple bonds of {0}",
+"The multiple bond positions of {0} were not given; drawn at the lowest positions.",
+"-{0} needs an open chain; on a ring the suffix is carbaldehyde, carboxylic acid, carbonitrile or carboxamide",
+"a chain has only two ends for -{0}",
+"{0} is too short for two -{1} groups",
+"there is no room for -{0} on {1}",
+"The position of -{0} on {1} was not given; drawn at the lowest position.",
+"-{0} must be at the end of the chain, not at {1}",
+"there is no room for -{0} at {1}",
+"ortho, meta and para need a benzene ring",
+"ortho, meta or para with a single group needs a parent such as phenol, aniline or toluene",
+"there is no room for {0} on {1}",
+"there is no room for {0} {1} groups on {2}",
+"The position of {0} on {1} was not given; drawn at the lowest free position.",
+"{0} cannot carry substituents",
+"an acyl group is attached at its carbonyl carbon",
+"{0} has no free position",
+"The attachment position of {0} was not given; position {1} assumed.",
+"{0} has no room left to attach",
+"the locants {0} before {1} are not used",
+"{0} cannot stand as a separate word",
+"\"{0}\" needs {1} group before it, the name gives {2}",
+"\"{0}\" needs {1} groups before it, the name gives {2}",
+"the name gives {0} alkyl group for {1} ester position",
+"the name gives {0} alkyl group for {1} ester positions",
+"the name gives {0} alkyl groups for {1} ester position",
+"the name gives {0} alkyl groups for {1} ester positions",
+"the structure it describes is not valid ({0})",
+"-one at {0} would be an aldehyde; an aldehyde is named with -al",
+"position {0} of {1}",
+"too many identical substituents",
+"mixed locants",
+"unusual bond types are not named yet",
+"a ring system FormChem cannot name yet",
+"aromatic rings with exocyclic double bonds (such as pyridones) are not named yet",
+"isotopes and radicals are not named yet",
+"hypervalent halogens are not named",
+"charged nitrogen groups other than nitro are not named yet",
+"charged atoms are not named yet",
+"oxides of sulfur, nitrogen and phosphorus are not named yet",
+"this oxygen group is not named yet",
+"sulfoxides, sulfones and other sulfur groups are not named yet",
+"imines, azo and similar nitrogen groups are not named yet",
+"{0} is not named yet",
+"substituent chains longer than 20 carbons are not named",
+"unsaturated acyl groups are not named yet",
+"substituted ylidene groups are not named yet",
+"ring ylidene groups are not named yet",
+"rings attached twice are not named yet",
+"no numbering found for a ring substituent",
+"esters with different alcohol parts are not named yet",
+"no parent chain or ring found",
+"cyclic esters (lactones) are not named yet",
+"substituents on more than one amine or amide nitrogen are not named yet",
+"stereocentres outside the parent chain or ring are not named yet",
+"double bond geometry outside the parent chain is not named yet",
+"pseudo-asymmetric centres are not named yet",
+"this double bond geometry is not named yet",
+"chains longer than 20 carbons are not named",
+"too many identical groups",
+"the structure has valence errors",
+"salts and mixtures are not named systematically yet",
+"structures with more than {0} heavy atoms are not named systematically yet",
+"compounds of {0} are not named systematically yet",
+"query atoms and R groups have no name",
+"single heteroatom hydrides are named from the dictionary only",
+"{0} is not an object of this drawing.",
+"{0} has no atoms.",
+"The fragment has no atoms.",
+"The drawing has no page.",
+"{0} is not a spectrum of this drawing.",
+"The structure {0} this prediction belongs to is no longer in the drawing.",
+"The drawing {0} was closed.",
+"Chemical shift (ppm)",
+"Time (s)",
+"Reflectance",
+"Relative abundance",
+"##{0}= appears more than once; the first value was kept.",
+"##XYDATA={0} is not a known variable list; it was read as (X++(Y..Y)).",
+"##{0}={1} is not a known variable list; it was read as (XY..XY).",
+"The points were not in x order and were sorted.",
+"##.SHIFT REFERENCE={0} could not be read; shifts were not referenced.",
+"##.SHIFT REFERENCE names point {0}, outside the {1} points; shifts were not referenced.",
+"Shifts were referenced so point {0} reads {1} ppm ({2}).",
+"The file does not name the observed nucleus.",
+"This is time-domain NMR data (an FID); it is shown as acquired, without a Fourier transform.",
+"Frequencies in Hz were divided by the observe frequency ({0} MHz) to give ppm.",
+"There is no ##.SHIFT REFERENCE; 0 Hz was taken as 0 ppm.",
+"There is no ##.OBSERVE FREQUENCY, so the shift axis stays in Hz.",
+"Transmittance was stored as a fraction and is shown as percent.",
+"Block {0} holds more than {1} points.",
+"##DATA TYPE={0} with x units {1} names no known technique; it is drawn as a plain spectrum.",
+"##BLOCKS={0} but the LINK block holds {1} blocks; all blocks found were read.",
+"This is not a JCAMP-DX file: it has no ##TITLE= record.",
+"The file holds {0} blocks one after another without a LINK block; each was read.",
+"Two blocks share one ##BLOCK_ID.",
+"The file holds no spectrum FormChem can draw ({0}).",
+"Block \"{0}\" was not drawn: {1}.",
+"a structure block (JCAMP-CS); it is kept in the file but not drawn",
+"it holds no XYDATA, XYPOINTS, PEAK TABLE or NTUPLES",
+"its data table holds no points",
+"its NTUPLES table declares no symbols",
+"2D NTUPLES spectra are not supported yet",
+"its NTUPLES table has no readable pages",
+"The file holds characters outside ASCII; it was read as UTF-8.",
+"The file holds bytes that are not ASCII or UTF-8; it was read as Latin-1.",
+"Lines outside any labelled data record were ignored.",
+"An ##END= without a block before it was ignored.",
+"Records before the first ##TITLE= or after the last ##END= were ignored.",
+"The file ends without ##END=; the open blocks were closed.",
+"NTUPLES page {0}",
+"NTUPLES page {0} has no ##DATA TABLE=; it was skipped.",
+"NTUPLES page {0} uses symbols ({1}) not declared in ##SYMBOL=; it was skipped.",
+"{0} has a data table form FormChem does not read ({1}); it was skipped.",
+"The NTUPLES table has no ##END NTUPLES=; it was read to the end of the block.",
+"The NTUPLES table has no ##SYMBOL= list.",
+"This is a 2D spectrum (two independent variables); 2D spectra are not drawn in this version.",
+"The NTUPLES table has {0} pages; only the first {1} were read.",
+"The imaginary page does not share the real page's x values; it was left out.",
+"The NTUPLES table holds {0} pages; page {1} is shown and {2} other pages were left out.",
+"##DELTAX={0} differs from (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; the computed spacing is used.",
+"{0} has no complete FIRSTX, LASTX and NPOINTS; the spacing comes from ##DELTAX.",
+"A data line began with a DIF value; it continues from the last value of the line before.",
+"A Y check value did not match the last value of the line before; the line was continued from the earlier value.",
+"{0} characters in {1} could not be read and were skipped.",
+"{0} DIF lines were not followed by a Y check value.",
+"{0} holds no data points.",
+"{0} holds {1} points but ##NPOINTS={2}; the line X values fit {3} points from FIRSTX to LASTX, so that spacing was used.",
+"{0} holds {1} points but ##NPOINTS={2}; the points read were kept.",
+"A line's X value does not match its position from FIRSTX and the spacing; the position was used.",
+"{0} has no FIRSTX, LASTX and NPOINTS; the spacing was taken from the line X values.",
+"{0} gives no way to place its points on the x axis; they were numbered 0, 1, 2 and so on.",
+"The first line starts at x = {0} but ##FIRSTX={1}; FIRSTX was used.",
+"The first Y value {0} does not match ##FIRSTY={1}.",
+"{0} ends with an incomplete group of {1} values; it was dropped.",
+"Could not read {0}: {1}.",
+"The spectrum asks for block {0}, but its file holds 1 block.",
+"The spectrum asks for block {0}, but its file holds {1} blocks.",
+"The spectrum has no source.",
+"The spectrum's file {0} is not in the drawing.",
+"No predictor for {0} is available in this engine.",
+"The prediction failed: {0}",
+"The spectrum's source is neither a file nor a prediction.",
+"The drawing has no spectrum {0}.",
+"Stick spectra have no areas to integrate.",
+"value must be greater than zero.",
+"from and to must be two different x values.",
+"The spectrum has no integral {0}.",
+"This spectrum has no original file; export it without original=1.",
+"FormChem places PNG, JPEG, GIF, WebP and SVG pictures and JCAMP-DX spectra."
+]
diff --git a/frontend/src/i18n/keys/part14.json b/frontend/src/i18n/keys/part14.json
new file mode 100644
index 00000000..83f0c223
--- /dev/null
+++ b/frontend/src/i18n/keys/part14.json
@@ -0,0 +1,144 @@
+[
+"Display",
+"Surface",
+"Nothing to export: the 3D view is empty.",
+"Export failed",
+"Select a structure to show in 3D.",
+"Build 3D",
+"Insert 3D View",
+"Choose a PDB, mmCIF, SDF or MOL file.",
+"Could not place the 3D structure on the page",
+"Select a 3D object opened from a PDB or mmCIF file.",
+"This model has no ligands.",
+"Could not extract the ligand",
+"No 3D coordinates yet: Build 3D makes a conformer from the drawing.",
+"3D Structure File...",
+"Extract Ligand...",
+"Export 3D Structure...",
+"Dihedral Scan...",
+"Measure in 3D",
+"Export 3D View as PNG...",
+"Export 3D View as glTF...",
+"Extracted {0}: {1} (bond orders inferred)",
+"Extracted {0}: {1}",
+"Open the 3D View first",
+"Opens the 3D View panel on the selected structure (or the selected 3D object on the page) and follows the selection. A structure needs 3D coordinates first: Build 3D makes them.",
+"Builds a 3D conformer of the selected structure from its 2D drawing (wedges, double-bond geometry and charges kept), minimises it with the chosen force field and stores it in the drawing as one undo step; the 3D View shows it.",
+"Minimises the shown conformer of the selected structure with the force field chosen in the 3D View (MMFF94 by default, UFF when MMFF94 has no parameters) and reports the energy before and after, as one undo step.",
+"Generates a conformer ensemble of the selected structure (ETKDG, RMSD pruned, each minimised) and keeps those within an energy window; with n, window and method it runs without the dialog.",
+"Conformers to generate",
+"Energy window in kcal/mol",
+"Places a 3D view of the selected structure on the page beside it (building 3D coordinates first when it has none) and opens the 3D View panel bound to it; turning or restyling the model updates the picture on the page.",
+"Opens a PDB, mmCIF, SDF or MOL file as a 3D object on the page (proteins as cartoon with ligands as ball and stick, waters hidden, the ligand focused) and shows it in the 3D View.",
+"Turns a ligand of the selected 3D object (opened from a PDB or mmCIF file) into a 2D structure beside it as one undo step: bond orders from a built-in template for common ligands, otherwise inferred from the geometry and reported; the file coordinates become its conformer. With ligand it takes that one; without it asks when the model has several.",
+"Ligand key chain:het:number, or a het code",
+"Select a 3D object opened from a PDB or mmCIF file",
+"Saves the 3D coordinates of the selected structure with every hydrogen: MDL molfile (the shown conformer), SD file (every conformer, with energy and method data fields), PDB or XYZ (the shown conformer, or every conformer as models or frames); a 3D object opened from a PDB or mmCIF file saves its original file. Without format it asks.",
+"File format",
+"Every conformer instead of the shown one (default true for sdf)",
+"Scans the dihedral of the four atoms picked in the 3D View (or its last dihedral measurement) with relaxed minimisation and plots angle against energy.",
+"Measures a distance (two atoms), angle (three) or dihedral (four) in the 3D View and lists it; with atoms (fragment atom ids such as a1, hydrogens as a1:h0, or PDB serial numbers) it measures those, else it switches to picking.",
+"Two to four atom ids",
+"Saves the 3D View as a PNG picture at its on-screen size; transparent leaves out the background.",
+"Saves the 3D View as a binary glTF 2.0 file (.glb): atoms as spheres and bonds as cylinders with element colours, 1 angstrom = 1 cm, for 3D viewers, slides and printing.",
+"No Surface",
+"Removes the molecular surface from the 3D View.",
+"Van der Waals Surface",
+"Shows the van der Waals surface in the 3D View.",
+"Solvent Accessible Surface",
+"Shows the solvent accessible surface (probe 1.4 angstrom) in the 3D View.",
+"Solvent Excluded Surface",
+"Shows the solvent excluded surface in the 3D View.",
+"ESP-Mapped Surface",
+"Colours the surface by an approximate electrostatic potential from the engine's empirical partial charges (red negative, blue positive), with a legend naming the method.",
+"Shows the 3D View in wire style; on a 3D object on the page the choice is saved with it.",
+"Shows the 3D View in stick style; on a 3D object on the page the choice is saved with it.",
+"Ball and Stick",
+"Shows the 3D View in ball and stick style; on a 3D object on the page the choice is saved with it.",
+"Space Filling",
+"Shows the 3D View in space filling style; on a 3D object on the page the choice is saved with it.",
+"Cartoon",
+"Shows the 3D View in cartoon style (proteins and nucleic acids; ligands stay ball and stick); on a 3D object on the page the choice is saved with it.",
+"Dihedral angle (degrees)",
+"Relative energy (kcal/mol)",
+"Minimum {0}°",
+"Export 3D Structure",
+"Every conformer (SDF records, PDB models, XYZ frames)",
+"1 conformer stored; every hydrogen is written with its 3D position.",
+"Extract Ligand",
+"Ligand",
+"The ligand becomes a 2D structure beside the model, with its coordinates from the file kept as its conformer.",
+"Extract",
+"SD File (.sdf)",
+"MDL Molfile (.mol)",
+"{0} conformers stored; every hydrogen is written with its 3D position.",
+"Conformers",
+"Energy window (kcal/mol)",
+"ETKDG embedding with a fixed seed, near duplicates pruned at 0.5 Å heavy-atom RMSD, each minimised; the lowest becomes the shown conformer.",
+"Generate",
+"Dihedral scan energy profile",
+"Dihedral Scan",
+"From (degrees)",
+"To (degrees)",
+"Step (degrees)",
+"Keep each point as a conformer (one undo step)",
+"Run Scan",
+"A relaxed scan: at each angle the dihedral is held and everything else is minimised.",
+"The end angle must be greater than the start angle.",
+"Scanning...",
+"Scan failed",
+"barrier {0} kcal/mol",
+"Display style",
+"Colour the surface by electrostatic potential from empirical partial charges",
+"ESP",
+"Minimise",
+"Scan...",
+"Focus the ligand",
+"Reset view",
+"Spin",
+"Export the 3D view",
+"Measure",
+"Measurements",
+"PNG Image",
+"PNG Image, Transparent",
+"glTF Binary (.glb)",
+"3D needs WebGL, which this window does not offer.",
+"Loading the 3D viewer...",
+"The 3D viewer could not load",
+"Open a drawing and select a structure to see it in 3D.",
+"Select a structure on the page to see it in 3D.",
+"Could not read the 3D structure",
+"This conformer cannot be written as a molfile",
+"Spin is off: the system asks for reduced motion",
+"A PDB or CIF model has no conformers.",
+"Energies relative to the lowest; click one to show it.",
+"Build 3D or Conformers... fill this list.",
+"Partial charges unavailable",
+"the engine has no 3D routes yet",
+"not converged",
+"Pick four bonded atoms in a row (a dihedral), then Scan.",
+"Tick Keep each point as a conformer to view the geometries.",
+"Show conformer",
+"Update 3D view",
+"Could not update the page snapshot",
+"No surface",
+"Van der Waals",
+"Solvent accessible",
+"Solvent excluded",
+"Distance",
+"Angle",
+"Dihedral",
+"{0} kcal/mol, {1}, not converged",
+"Picked {0} / {1}: {2}",
+"Click {0} atoms to measure",
+"ESP ({0}): {1}, red {2} e to blue +{3} e",
+"Distance {0}: {1}",
+"Angle {0}: {1}",
+"Dihedral {0}: {1}",
+"Built: {0}",
+"Minimised: {0}",
+"{0} conformers kept of {1}",
+"{0} conformers kept",
+"Dihedral {0}",
+"PNG encoding failed"
+]
diff --git a/frontend/src/i18n/keys/part15.json b/frontend/src/i18n/keys/part15.json
new file mode 100644
index 00000000..87e1c5af
--- /dev/null
+++ b/frontend/src/i18n/keys/part15.json
@@ -0,0 +1,68 @@
+[
+"approximate, from empirical charges",
+"{0} stereocentre(s) or double bond(s) were unspecified; one configuration was chosen.",
+"{0} stereo label(s) of the drawing are not reproduced in 3D.",
+"Built the drawn member of the enhanced stereo group(s) {0}; the 3D model is one stereoisomer of the mixture (relative or racemic) the drawing describes.",
+"Embedded {0} times (seeds {1}) to keep the drawn stereo.",
+"{0} pair(s) of heavy atoms are closer than {1} of their van der Waals contact.",
+"Universal force field used: {0}.",
+"no {0} parameters for {1}",
+"{0} could not type every atom",
+"{0} conformer(s) changed the drawn stereo during minimisation and were left out.",
+"More than 300 heavy atoms: conformer sampling quality falls at this size.",
+"The central bond is in a ring; the ring is strained to follow the angle.",
+"The structure had no 3D coordinates; the scan started from a fresh embedding.",
+"The structure changed while 3D was being computed; run the command again.",
+"The drawing has no object {0}.",
+"{0} has no 3D coordinates yet; build 3D first.",
+"{0} has no conformer {1}.",
+"The structure has no atoms.",
+"3D needs real atoms: {0} atom(s) are labels, R-groups or attachment points ({1}).",
+"Hydrogens could not be added: {0}",
+"The structure has {0} atoms with hydrogens; 3D handles up to {1}.",
+"The 3D coordinates do not fit this structure (nothing for {0}); build 3D again.",
+"The 3D coordinates do not fit this structure (hydrogen count changed); build 3D again.",
+"The structure could not be embedded in 3D: {0}",
+"The structure could not be embedded in 3D; check its valences and stereo.",
+"Conformers could not be embedded: {0}",
+"No conformer could be embedded; check the structure's valences and stereo.",
+"Every embedded conformer lost the drawn stereo after minimisation.",
+"No force field has parameters for this structure ({0}).",
+"The universal force field could not be set up: {0}",
+"The universal force field could not be set up.",
+"Unknown atom(s) {0}; use fragment atom ids or a hydrogen as a1:h0.",
+"The four atoms must be different.",
+"The four atoms must form a chain of bonds (a1-a2-a3-a4).",
+"The 3D file could not be written: {0}",
+"The file is not a PDB, mmCIF, SDF or MOL file that FormChem can read.",
+"The file has more than {0} atoms.",
+"The PDB file has no ATOM or HETATM records.",
+"The mmCIF atom_site table has no Cartn_x, Cartn_y and Cartn_z columns.",
+"The CIF has fractional coordinates but no complete unit cell.",
+"The CIF has no atom_site table.",
+"The CIF has no readable atoms.",
+"The file has no records.",
+"The file has {0} records; 3D import reads up to {1}.",
+"No record of the file could be read.",
+"{0} is not a PDB or mmCIF file.",
+"{0} could not be turned into a FormChem drawing: {1}.",
+"PDB model placed as a 3D object: {0}.",
+"mmCIF model placed as a 3D object: {0}.",
+"{0} ATOM or HETATM line(s) had unreadable coordinates and were skipped.",
+"{0} atom_site row(s) had unreadable coordinates and were skipped.",
+"Small-molecule CIF: the asymmetric unit is read from fractional coordinates; symmetry mates are not generated.",
+"{0} has valence problems; it was read without sanitising.",
+"{0} has 2D coordinates only; no conformer was kept.",
+"{0} hydrogen(s) were not in the file and were placed from the geometry.",
+"{0} could not be read: {1}",
+"{0} could not be read.",
+"Record {0}",
+"The structure",
+"The file's 3D coordinates were kept as the conformer of 1 structure; Build 3D is not needed to view them.",
+"The file's 3D coordinates were kept as the conformer of {0} structures; Build 3D is not needed to view them.",
+"{0} is a single ion; there is no structure to extract.",
+"The atoms of {0} could not be read.",
+"No ligand {0} in the structure; ligands: {1}.",
+"The drawing has no 3D model {0}.",
+"FormChem places PNG, JPEG, GIF, WebP and SVG pictures, JCAMP-DX spectra and PDB, mmCIF, SDF and MOL structure files."
+]
diff --git a/frontend/src/i18n/locales/cs/part12.json b/frontend/src/i18n/locales/cs/part12.json
new file mode 100644
index 00000000..8c49887d
--- /dev/null
+++ b/frontend/src/i18n/locales/cs/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spektrum",
+ "1": "Nakreslete nebo vyberte strukturu, kterou chcete pojmenovat.",
+ "2": "Názvy se nepodařilo vypočítat",
+ "3": "FormChem pro tuto strukturu nemá název.",
+ "4": "Kopírovat název",
+ "5": "Název zkopírován: {0}",
+ "6": "Chemický název, který se má vložit; vynechte jej, chcete-li otevřít dialog",
+ "7": "Zkopíruje název vybrané struktury (nebo struktur na stránce) jako prostý text: triviální název, pokud jej FormChem zná, jinak systematický název, který se nabízí jen tehdy, když se po přečtení vrátí na stejnou strukturu.",
+ "8": "trivial nebo systematic určuje, který název se zkopíruje; vynechte pro první",
+ "9": "Predikované spektrum je aktuální.",
+ "10": "Obnovit predikované spektrum",
+ "11": "Nejprve vyberte jednu strukturu",
+ "12": "Nejprve vyberte predikované spektrum",
+ "13": "Predikované spektrum NMR 1H přidáno ({0})",
+ "14": "Predikované spektrum NMR 13C přidáno ({0})",
+ "15": "Predikované spektrum obnoveno ({0})",
+ "16": "Id fragmentu struktury; výchozí je vybraná struktura nebo jediná na stránce",
+ "17": "Frekvence spektrometru v MHz (výchozí 400 pro 1H, 100 pro 13C)",
+ "18": "Přidá vedle vybrané struktury predikované spektrum NMR 1H jako jeden krok zpět: objekt spektra vypočtený vlastními inkrementálními pravidly FormChem (bez databáze posunů), jehož multiplety a integrály jsou propojeny s atomy struktury a jehož název uvádí metodu, verzi a frekvenci. Křivka se vždy počítá znovu ze struktury a nikdy se neukládá.",
+ "19": "Přidá vedle vybrané struktury predikované spektrum NMR 13C jako jeden krok zpět: objekt spektra vypočtený vlastními inkrementálními pravidly FormChem (bez databáze posunů), jehož píky jsou propojeny s atomy struktury a jehož název uvádí metodu, verzi a frekvenci. Křivka se vždy počítá znovu ze struktury a nikdy se neukládá.",
+ "20": "Spektrum se nepodařilo predikovat",
+ "21": "Predikovat spektrum NMR 1H",
+ "22": "Predikovat spektrum NMR 13C",
+ "23": "Znovu vypočte multiplety, integrály nebo píky predikovaného spektra poté, co se změnila jeho struktura, aktuální verzí prediktoru jako jeden krok zpět; pokud je spektrum aktuální, nic se nezmění.",
+ "24": "Id predikovaného spektra; výchozí je vybrané spektrum nebo to otevřené v editoru spekter",
+ "25": "Spektrum se nepodařilo obnovit",
+ "26": "V tomto rozsahu nejsou žádné nové píky.",
+ "27": "Přetažením přes rozsah v editoru spekter jej zintegrujete.",
+ "28": "Propojit pík s atomy",
+ "29": "Zrušit propojení píku",
+ "30": "Osa Y spektra",
+ "31": "Spektrum ze souboru...",
+ "32": "Upravit spektrum...",
+ "33": "Najít píky",
+ "34": "Integrovat",
+ "35": "Transmitance nebo absorbance",
+ "36": "Exportovat spektrum...",
+ "37": "Nejprve vyberte spektrum",
+ "38": "neexistuje spektrum s id {0}",
+ "39": "Nalezené píky: {0} (již existovaly: {1})",
+ "40": "Nalezené píky: {0}",
+ "41": "Integrály jsou určeny pro spektra NMR",
+ "42": "Nejprve vyberte pík, integrál nebo multiplet v editoru spekter",
+ "43": "Všechny atomy musí patřit k jedné struktuře",
+ "44": "Pouze spektra IR, Raman a UV-Vis se přepínají mezi transmitancí a absorbancí",
+ "45": "Exportováno: {0}",
+ "46": "Id objektu spektra; výchozí je vybrané spektrum nebo to otevřené v editoru spekter",
+ "47": "Importuje soubor spektra JCAMP-DX do aktivního výkresu (jeden objekt spektra na datový blok, soubor zachován bajt po bajtu) jako jeden krok zpět na soubor. Bez path otevře dialog pro výběr souboru.",
+ "48": "Absolutní cesta k souboru .jdx, .dx nebo .jcamp",
+ "49": "Spektrum se nepodařilo importovat",
+ "50": "Otevře editor spekter pro vybrané spektrum (stejné jako dvojité kliknutí na ně).",
+ "51": "Spektrum se nepodařilo otevřít",
+ "52": "Najde píky spektra v rozsahu (výchozí je zobrazený rozsah) a přidá je do seznamu píků, přičemž přeskočí píky, které tam již jsou, jako jeden krok zpět.",
+ "53": "Začátek rozsahu v jednotce osy x (cm-1, nm, m/z, ppm)",
+ "54": "Konec rozsahu v jednotce osy x",
+ "55": "Volitelný práh detekce v jednotkách osy y",
+ "56": "Nahradí seznam píků místo přidávání do něj",
+ "57": "Píky se nepodařilo najít",
+ "58": "Přidá integrál NMR přes rozsah, škálovaný stejně jako stávající integrály (nebo na value s přeškálováním ostatních), jako jeden krok zpět. Bez from a to přepne editor spekter na nástroj integrace.",
+ "59": "Začátek rozsahu v ppm",
+ "60": "Konec rozsahu v ppm",
+ "61": "Hodnota, kterou má tento integrál udávat, například počet protonů",
+ "62": "Integrovat se nepodařilo",
+ "63": "Propojí pík, integrál nebo multiplet s atomy struktury jako jeden krok zpět. Bez atoms použije vybrané atomy nebo počká, až uživatel klikne na atomy ve výkresu.",
+ "64": "Id píku, integrálu nebo multipletu; výchozí je ten vybraný v editoru spekter",
+ "65": "Id struktury (fragmentu), ke které atomy patří",
+ "66": "Id atomů",
+ "67": "Pík se nepodařilo propojit",
+ "68": "Odstraní propojení píku, integrálu nebo multipletu s atomy jako jeden krok zpět.",
+ "69": "Propojení píku se nepodařilo zrušit",
+ "70": "Zobrazí spektrum IR, Raman nebo UV-Vis jako transmitanci nebo absorbanci (bez mode přepíná) jako jeden krok zpět.",
+ "71": "Osa Y, která se má zobrazit; vynechte pro přepnutí",
+ "72": "Osu y se nepodařilo změnit",
+ "73": "Uloží spektrum jako JCAMP-DX (s tabulkou píků, pokud má píky) nebo jako CSV všech bodů prostřednictvím jádra.",
+ "74": "Formát souboru, výchozí jdx",
+ "75": "S jdx: původní importovaný soubor beze změn",
+ "76": "Absolutní cesta, kam se má zapsat; vynechte pro dotaz",
+ "77": "Spektrum se nepodařilo exportovat",
+ "78": "Vložit spektrum ze souboru",
+ "79": "Soubor neobsahuje žádné spektrum, které FormChem umí nakreslit",
+ "80": "Vložit spektrum",
+ "81": "Spektrum se nepodařilo umístit: jeho soubor se do výkresu nedostal.",
+ "82": "Vložená spektra: {0}",
+ "83": "Vlnová délka (µm)",
+ "84": "Vlnočet (cm⁻¹)",
+ "85": "Ramanův posun (cm⁻¹)",
+ "86": "Vlnová délka (nm)",
+ "87": "Frekvence (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmitance (%)",
+ "90": "Transmitance",
+ "91": "Absorbance",
+ "92": "Relativní zastoupení (%)",
+ "93": "Intenzita",
+ "94": "NMR {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Predikováno: {0}, {1} MHz ({2})",
+ "100": "Predikováno: {0}, {1} MHz",
+ "101": "Predikováno: {0} ({1})",
+ "102": "Predikováno: {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spektrum není k dispozici: {0}",
+ "105": "Načítání spektra",
+ "106": "Triviální název",
+ "107": "Systematický",
+ "108": "Vysoká jistota",
+ "109": "Střední jistota",
+ "110": "Nízká jistota",
+ "111": "Nepřečteno",
+ "112": "Názvy FormChem",
+ "113": "Název se nepodařilo přečíst",
+ "114": "Vložit strukturu z názvu",
+ "115": "Struktura z názvu",
+ "116": "Název, například aspirin nebo 2-methylpropan-1-ol",
+ "117": "Chemický název",
+ "118": "Zadejte název, aby se zobrazila jeho struktura.",
+ "119": "Pro tento název neexistuje struktura",
+ "120": "Slovník",
+ "121": "Systematický analyzátor",
+ "122": "Pravidlový generátor názvů s kontrolou převodem tam a zpět",
+ "123": "Nástroje spektra",
+ "124": "Zobrazit celé spektrum",
+ "125": "Osa Y",
+ "126": "Zobrazit tento rozsah na stránce",
+ "127": "Dvojitým kliknutím na spektrum ve výkresu je můžete upravit zde.",
+ "128": "Píky a integrály",
+ "129": "Predikováno",
+ "130": "Hodnota integrálu",
+ "131": "Propojit s atomy",
+ "132": "Zrušit propojení",
+ "133": "1 atom",
+ "134": "Atomy k propojení",
+ "135": "Klikněte na další atomy a pak na Hotovo.",
+ "136": "Klikněte ve výkresu na atomy, které patří k tomuto píku, a pak na Hotovo.",
+ "137": "V tomto rozsahu není co integrovat.",
+ "138": "Odstranit pík",
+ "139": "Přidat pík",
+ "140": "Propojeno s 1 atomem",
+ "141": "Nastavit rozsah spektra",
+ "142": "Zadejte kladné číslo.",
+ "143": "Integrál se nepodařilo nastavit",
+ "144": "Posun a zvětšení: tažením posouváte, kolečkem zvětšujete, Shift a tažení zvětší rozsah",
+ "145": "Zvětšit rozsah: táhněte přes graf",
+ "146": "Hledání píků: táhněte přes rozsah",
+ "147": "Přidat nebo odebrat pík: klikněte poblíž píku",
+ "148": "Integrace: táhněte přes rozsah",
+ "149": "Pík",
+ "150": "Integrál",
+ "151": "Multiplet",
+ "152": "Počet atomů: {0}",
+ "153": "Propojeno s {0}",
+ "154": "Tažením posouváte, kolečkem zvětšujete, Shift a tažení zvětší rozsah. Kliknutím na popisek jej vyberete.",
+ "155": "Tažením přes graf zvětšíte tento rozsah.",
+ "156": "Tažením přes rozsah najdete jeho píky.",
+ "157": "Kliknutím poblíž píku jej přidáte; kliknutím na popisek píku jej odeberete.",
+ "158": "Tažením přes rozsah jej zintegrujete.",
+ "159": "Propojeno s atomy: {0}"
+}
diff --git a/frontend/src/i18n/locales/cs/part13.json b/frontend/src/i18n/locales/cs/part13.json
new file mode 100644
index 00000000..7b3d4a3e
--- /dev/null
+++ b/frontend/src/i18n/locales/cs/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "jádro vrátilo prázdný soubor",
+ "1": "název je delší než {0} znaků",
+ "2": "fragmenty s více než {0} atomy se nepojmenovávají",
+ "3": "Struktura obsahuje popisky, R-skupiny nebo libovolné atomy, které nemají název.",
+ "4": "Strukturu se nepodařilo přečíst jako molekulu (zkontrolujte mocenství).",
+ "5": "Není žádná struktura k pojmenování.",
+ "6": "Názvy s převráceným indexem (nejprve základní sloučenina, pak čárka a substituenty) se nečtou; napište název v normálním pořadí, například 1,2-dichlorbenzen.",
+ "7": "D- a L- se čtou jen pro aminokyseliny a cukry ve slovníku FormChem; u jiných názvů uveďte deskriptory R nebo S.",
+ "8": "FormChem přečetl celý název, ale netvoří úplný název struktury (může chybět základní sloučenina, například hexan nebo benzen, nebo přípona).",
+ "9": "FormChem nemohl přečíst název od znaku {0} (\"{1}\").",
+ "10": "FormChem přečetl název, ale {0}.",
+ "11": "strukturu se nepodařilo dokončit",
+ "12": "Název lze přečíst více než jedním způsobem; FormChem nakreslil čtení s nejmenším počtem předpokladů.",
+ "13": "Název neuvádí stereodeskriptory, proto se stereocentra a dvojné vazby kreslí bez určení.",
+ "14": "Žádný systematický název: {0}.",
+ "15": "Systematický název sestavený FormChem se po přečtení nevrátil na stejnou strukturu, proto se nezobrazuje.",
+ "16": "tato dvojná vazba nemůže být E ani Z",
+ "17": "lokant deskriptoru {0} není polohou základní sloučeniny",
+ "18": "poloha {0} nezačíná dvojnou vazbu, která může být E nebo Z",
+ "19": "{0} vyžaduje právě jednu dvojnou vazbu, která může být cis nebo trans; tato struktura jich má: {1}",
+ "20": "{0} je pro tuto dvojnou vazbu nejasné; uveďte místo toho E nebo Z",
+ "21": "({0}) vyžaduje lokant: počet stereocenter ve struktuře: {1}",
+ "22": "poloha {0} není stereocentrum, takže ({1}) nelze použít",
+ "23": "({0}) vyžaduje lokant: počet dvojných vazeb, které mohou být E nebo Z, ve struktuře: {1}",
+ "24": "poloze {0} nelze přiřadit {1}",
+ "25": "této dvojné vazbě nelze přiřadit {0}",
+ "26": "{0} neříká, která konfigurace se myslí, proto se struktura kreslí bez stereochemie.",
+ "27": "{0} nemá místo připojení",
+ "28": "není místo pro {0} v {1}",
+ "29": "{0} se tam nemůže vázat",
+ "30": "řetězce delší než {0} uhlíků se zatím nečtou",
+ "31": "{0} je příliš malý na to, aby byl kruhem",
+ "32": "{0}-{1} je tautomer, který FormChem zatím z názvu nekreslí",
+ "33": "lokant {0} není polohou v {1}",
+ "34": "{0} není polohou v řetězci",
+ "35": "násobná vazba nemůže začínat v poloze {0} struktury {1}",
+ "36": "poloha {0} struktury {1} nemůže nést tuto násobnou vazbu",
+ "37": "není místo pro násobnou vazbu v poloze {0} struktury {1}",
+ "38": "není místo pro násobné vazby {0}",
+ "39": "Polohy násobných vazeb {0} nebyly uvedeny; nakresleno v nejnižších polohách.",
+ "40": "-{0} vyžaduje otevřený řetězec; na kruhu je příponou karbaldehyd, karboxylová kyselina, karbonitril nebo karboxamid",
+ "41": "řetězec má jen dva konce pro -{0}",
+ "42": "{0} je příliš krátký pro dvě skupiny -{1}",
+ "43": "není místo pro -{0} v {1}",
+ "44": "Poloha -{0} v {1} nebyla uvedena; nakresleno v nejnižší poloze.",
+ "45": "-{0} musí být na konci řetězce, ne v {1}",
+ "46": "není místo pro -{0} v {1}",
+ "47": "ortho, meta a para vyžadují benzenový kruh",
+ "48": "ortho, meta nebo para s jedinou skupinou vyžaduje základní sloučeninu, například fenol, anilin nebo toluen",
+ "49": "není místo pro {0} v {1}",
+ "50": "není místo pro skupiny {1} (počet: {0}) v {2}",
+ "51": "Poloha {0} v {1} nebyla uvedena; nakresleno v nejnižší volné poloze.",
+ "52": "{0} nemůže nést substituenty",
+ "53": "acylová skupina je připojena svým karbonylovým uhlíkem",
+ "54": "{0} nemá volnou polohu",
+ "55": "Poloha připojení {0} nebyla uvedena; předpokládá se poloha {1}.",
+ "56": "{0} už nemá místo pro připojení",
+ "57": "lokanty {0} před {1} se nepoužívají",
+ "58": "{0} nemůže stát jako samostatné slovo",
+ "59": "\"{0}\" vyžaduje před sebou {1} skupinu, název uvádí {2}",
+ "60": "\"{0}\" vyžaduje před sebou {1} skupin, název uvádí {2}",
+ "61": "název uvádí alkylové skupiny: {0}, a esterové polohy: {1}",
+ "62": "název uvádí alkylové skupiny: {0}, a esterové polohy: {1}",
+ "63": "název uvádí alkylové skupiny: {0}, a esterové polohy: {1}",
+ "64": "název uvádí alkylové skupiny: {0}, a esterové polohy: {1}",
+ "65": "struktura, kterou popisuje, není platná ({0})",
+ "66": "-on v {0} by byl aldehyd; aldehyd se pojmenovává příponou -al",
+ "67": "poloze {0} struktury {1}",
+ "68": "příliš mnoho stejných substituentů",
+ "69": "smíšené lokanty",
+ "70": "neobvyklé typy vazeb se zatím nepojmenovávají",
+ "71": "kruhový systém, který FormChem zatím neumí pojmenovat",
+ "72": "aromatické kruhy s exocyklickými dvojnými vazbami (například pyridony) se zatím nepojmenovávají",
+ "73": "izotopy a radikály se zatím nepojmenovávají",
+ "74": "hypervalentní halogeny se nepojmenovávají",
+ "75": "nabité dusíkaté skupiny jiné než nitro se zatím nepojmenovávají",
+ "76": "nabité atomy se zatím nepojmenovávají",
+ "77": "oxidy síry, dusíku a fosforu se zatím nepojmenovávají",
+ "78": "tato kyslíkatá skupina se zatím nepojmenovává",
+ "79": "sulfoxidy, sulfony a další skupiny síry se zatím nepojmenovávají",
+ "80": "iminy, azosloučeniny a podobné dusíkaté skupiny se zatím nepojmenovávají",
+ "81": "{0} se zatím nepojmenovává",
+ "82": "řetězce substituentů delší než 20 uhlíků se nepojmenovávají",
+ "83": "nenasycené acylové skupiny se zatím nepojmenovávají",
+ "84": "substituované ylidenové skupiny se zatím nepojmenovávají",
+ "85": "kruhové ylidenové skupiny se zatím nepojmenovávají",
+ "86": "kruhy připojené dvakrát se zatím nepojmenovávají",
+ "87": "pro kruhový substituent nebylo nalezeno číslování",
+ "88": "estery s různými alkoholovými částmi se zatím nepojmenovávají",
+ "89": "nebyl nalezen hlavní řetězec ani kruh",
+ "90": "cyklické estery (laktony) se zatím nepojmenovávají",
+ "91": "substituenty na více než jednom dusíku aminu nebo amidu se zatím nepojmenovávají",
+ "92": "stereocentra mimo hlavní řetězec nebo kruh se zatím nepojmenovávají",
+ "93": "geometrie dvojné vazby mimo hlavní řetězec se zatím nepojmenovává",
+ "94": "pseudoasymetrická centra se zatím nepojmenovávají",
+ "95": "tato geometrie dvojné vazby se zatím nepojmenovává",
+ "96": "řetězce delší než 20 uhlíků se nepojmenovávají",
+ "97": "příliš mnoho stejných skupin",
+ "98": "struktura má chyby mocenství",
+ "99": "soli a směsi se zatím nepojmenovávají systematicky",
+ "100": "struktury s více než {0} těžkými atomy se zatím nepojmenovávají systematicky",
+ "101": "sloučeniny {0} se zatím nepojmenovávají systematicky",
+ "102": "dotazové atomy a R-skupiny nemají název",
+ "103": "hydridy s jediným heteroatomem se pojmenovávají pouze ze slovníku",
+ "104": "{0} není objektem tohoto výkresu.",
+ "105": "{0} nemá žádné atomy.",
+ "106": "Fragment nemá žádné atomy.",
+ "107": "Výkres nemá stránku.",
+ "108": "{0} není spektrem tohoto výkresu.",
+ "109": "Struktura {0}, ke které tato predikce patří, už ve výkresu není.",
+ "110": "Výkres {0} byl zavřen.",
+ "111": "Chemický posun (ppm)",
+ "112": "Čas (s)",
+ "113": "Reflektance",
+ "114": "Relativní zastoupení",
+ "115": "##{0}= se vyskytuje více než jednou; byla ponechána první hodnota.",
+ "116": "##XYDATA={0} není známý seznam proměnných; byl přečten jako (X++(Y..Y)).",
+ "117": "##{0}={1} není známý seznam proměnných; byl přečten jako (XY..XY).",
+ "118": "Body nebyly v pořadí podle x a byly seřazeny.",
+ "119": "##.SHIFT REFERENCE={0} se nepodařilo přečíst; posuny nebyly vztaženy k referenci.",
+ "120": "##.SHIFT REFERENCE uvádí bod {0}, mimo {1} bodů; posuny nebyly vztaženy k referenci.",
+ "121": "Posuny byly vztaženy k referenci tak, že bod {0} odpovídá {1} ppm ({2}).",
+ "122": "Soubor neuvádí pozorované jádro.",
+ "123": "Jde o data NMR v časové doméně (FID); zobrazují se tak, jak byla naměřena, bez Fourierovy transformace.",
+ "124": "Frekvence v Hz byly vyděleny pozorovací frekvencí ({0} MHz), aby vzniklo ppm.",
+ "125": "Chybí ##.SHIFT REFERENCE; 0 Hz bylo považováno za 0 ppm.",
+ "126": "Chybí ##.OBSERVE FREQUENCY, proto osa posunu zůstává v Hz.",
+ "127": "Transmitance byla uložena jako zlomek a zobrazuje se v procentech.",
+ "128": "Blok {0} obsahuje více než {1} bodů.",
+ "129": "##DATA TYPE={0} s jednotkami osy x {1} neodpovídá žádné známé technice; kreslí se jako prosté spektrum.",
+ "130": "##BLOCKS={0}, ale blok LINK obsahuje bloků: {1}; byly přečteny všechny nalezené bloky.",
+ "131": "Toto není soubor JCAMP-DX: nemá záznam ##TITLE=.",
+ "132": "Soubor obsahuje po sobě bloků: {0}, bez bloku LINK; každý z nich byl přečten.",
+ "133": "Dva bloky sdílejí stejné ##BLOCK_ID.",
+ "134": "Soubor neobsahuje žádné spektrum, které FormChem umí nakreslit ({0}).",
+ "135": "Blok \"{0}\" nebyl nakreslen: {1}.",
+ "136": "blok struktury (JCAMP-CS); je v souboru zachován, ale nekreslí se",
+ "137": "neobsahuje XYDATA, XYPOINTS, PEAK TABLE ani NTUPLES",
+ "138": "jeho datová tabulka neobsahuje žádné body",
+ "139": "jeho tabulka NTUPLES nedeklaruje žádné symboly",
+ "140": "spektra NTUPLES 2D zatím nejsou podporována",
+ "141": "jeho tabulka NTUPLES nemá čitelné stránky",
+ "142": "Soubor obsahuje znaky mimo ASCII; byl přečten jako UTF-8.",
+ "143": "Soubor obsahuje bajty, které nejsou ASCII ani UTF-8; byl přečten jako Latin-1.",
+ "144": "Řádky mimo jakýkoli pojmenovaný datový záznam byly ignorovány.",
+ "145": "##END= bez předchozího bloku byl ignorován.",
+ "146": "Záznamy před prvním ##TITLE= nebo za posledním ##END= byly ignorovány.",
+ "147": "Soubor končí bez ##END=; otevřené bloky byly uzavřeny.",
+ "148": "Stránka NTUPLES {0}",
+ "149": "Stránka NTUPLES {0} nemá ##DATA TABLE=; byla přeskočena.",
+ "150": "Stránka NTUPLES {0} používá symboly ({1}) nedeklarované v ##SYMBOL=; byla přeskočena.",
+ "151": "{0} má tvar datové tabulky, který FormChem nečte ({1}); byla přeskočena.",
+ "152": "Tabulka NTUPLES nemá ##END NTUPLES=; byla přečtena do konce bloku.",
+ "153": "Tabulka NTUPLES nemá seznam ##SYMBOL=.",
+ "154": "Toto je spektrum 2D (dvě nezávislé proměnné); spektra 2D se v této verzi nekreslí.",
+ "155": "Počet stránek tabulky NTUPLES: {0}; přečteno bylo jen prvních {1}.",
+ "156": "Imaginární stránka nesdílí hodnoty x reálné stránky; byla vynechána.",
+ "157": "Počet stránek tabulky NTUPLES: {0}; zobrazena je stránka {1} a vynechány byly další stránky: {2}.",
+ "158": "##DELTAX={0} se liší od (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; použije se vypočtený odstup.",
+ "159": "{0} nemá úplné FIRSTX, LASTX a NPOINTS; odstup pochází z ##DELTAX.",
+ "160": "Datový řádek začal hodnotou DIF; pokračuje od poslední hodnoty předchozího řádku.",
+ "161": "Kontrolní hodnota Y se neshodovala s poslední hodnotou předchozího řádku; řádek pokračoval od dřívější hodnoty.",
+ "162": "Nepodařilo se přečíst znaky ({0}) v {1}; byly přeskočeny.",
+ "163": "Počet řádků DIF bez následné kontrolní hodnoty Y: {0}.",
+ "164": "{0} neobsahuje žádné datové body.",
+ "165": "{0} obsahuje {1} bodů, ale ##NPOINTS={2}; hodnoty x na řádcích odpovídají {3} bodům od FIRSTX do LASTX, proto byl použit tento odstup.",
+ "166": "{0} obsahuje {1} bodů, ale ##NPOINTS={2}; přečtené body byly ponechány.",
+ "167": "Hodnota x řádku se neshoduje s jeho polohou podle FIRSTX a odstupu; byla použita poloha.",
+ "168": "{0} nemá FIRSTX, LASTX a NPOINTS; odstup byl převzat z hodnot x na řádcích.",
+ "169": "{0} neposkytuje způsob, jak umístit body na osu x; byly očíslovány 0, 1, 2 a tak dále.",
+ "170": "První řádek začíná na x = {0}, ale ##FIRSTX={1}; bylo použito FIRSTX.",
+ "171": "První hodnota Y {0} se neshoduje s ##FIRSTY={1}.",
+ "172": "{0} končí neúplnou skupinou {1} hodnot; byla zahozena.",
+ "173": "Nepodařilo se přečíst {0}: {1}.",
+ "174": "Spektrum žádá blok {0}, ale jeho soubor obsahuje 1 blok.",
+ "175": "Spektrum žádá blok {0}, ale počet bloků v jeho souboru: {1}.",
+ "176": "Spektrum nemá zdroj.",
+ "177": "Soubor {0} spektra ve výkresu není.",
+ "178": "V tomto jádře není k dispozici prediktor pro {0}.",
+ "179": "Predikce selhala: {0}",
+ "180": "Zdrojem spektra není soubor ani predikce.",
+ "181": "Výkres nemá spektrum {0}.",
+ "182": "Čárová spektra nemají plochy k integraci.",
+ "183": "value musí být větší než nula.",
+ "184": "from a to musí být dvě různé hodnoty x.",
+ "185": "Spektrum nemá integrál {0}.",
+ "186": "Toto spektrum nemá původní soubor; exportujte je bez original=1.",
+ "187": "FormChem umisťuje obrázky PNG, JPEG, GIF, WebP a SVG a spektra JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/cs/part14.json b/frontend/src/i18n/locales/cs/part14.json
new file mode 100644
index 00000000..d3e12c16
--- /dev/null
+++ b/frontend/src/i18n/locales/cs/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Zobrazení",
+ "1": "Povrch",
+ "2": "Není co exportovat: pohled 3D je prázdný.",
+ "3": "Export se nezdařil",
+ "4": "Vyberte strukturu, kterou chcete zobrazit ve 3D.",
+ "5": "Vytvořit 3D",
+ "6": "Vložit pohled 3D",
+ "7": "Vyberte soubor PDB, mmCIF, SDF nebo MOL.",
+ "8": "Strukturu 3D se nepodařilo umístit na stránku",
+ "9": "Vyberte objekt 3D otevřený ze souboru PDB nebo mmCIF.",
+ "10": "Tento model nemá žádné ligandy.",
+ "11": "Ligand se nepodařilo vyjmout",
+ "12": "Zatím nejsou souřadnice 3D: Vytvořit 3D vytvoří konformer z výkresu.",
+ "13": "Soubor struktury 3D...",
+ "14": "Vyjmout ligand...",
+ "15": "Exportovat strukturu 3D...",
+ "16": "Sken dihedrálního úhlu...",
+ "17": "Měřit ve 3D",
+ "18": "Exportovat pohled 3D jako PNG...",
+ "19": "Exportovat pohled 3D jako glTF...",
+ "20": "Vyjmuto {0}: {1} (řády vazeb odvozeny)",
+ "21": "Vyjmuto {0}: {1}",
+ "22": "Nejprve otevřete pohled 3D",
+ "23": "Otevře panel Pohled 3D pro vybranou strukturu (nebo vybraný objekt 3D na stránce) a sleduje výběr. Struktura nejprve potřebuje souřadnice 3D: vytvoří je Vytvořit 3D.",
+ "24": "Vytvoří konformer 3D vybrané struktury z jejího výkresu 2D (zachová klíny, geometrii dvojných vazeb a náboje), minimalizuje jej zvoleným silovým polem a uloží do výkresu jako jeden krok zpět; pohled 3D jej zobrazí.",
+ "25": "Minimalizuje zobrazený konformer vybrané struktury silovým polem zvoleným v pohledu 3D (výchozí MMFF94, UFF, když MMFF94 nemá parametry) a ohlásí energii před a po, jako jeden krok zpět.",
+ "26": "Vytvoří soubor konformerů vybrané struktury (ETKDG, proředěný podle RMSD, každý minimalizovaný) a ponechá ty v energetickém okně; s n, window a method běží bez dialogu.",
+ "27": "Konformery k vytvoření",
+ "28": "Energetické okno v kcal/mol",
+ "29": "Umístí na stránku vedle vybrané struktury její pohled 3D (nejprve vytvoří souřadnice 3D, pokud je nemá) a otevře navázaný panel Pohled 3D; otočení nebo změna stylu modelu aktualizuje obraz na stránce.",
+ "30": "Otevře soubor PDB, mmCIF, SDF nebo MOL jako objekt 3D na stránce (proteiny jako stuha, ligandy jako kuličky a tyčinky, bez vody, se zaostřením na ligand) a zobrazí jej v pohledu 3D.",
+ "31": "Změní ligand vybraného objektu 3D (otevřeného ze souboru PDB nebo mmCIF) na strukturu 2D vedle něj, jako jeden krok zpět: řády vazeb z vestavěné šablony pro běžné ligandy, jinak odvozené z geometrie a ohlášené; souřadnice ze souboru se stanou jeho konformerem. S ligand vezme ten jeden; bez něj se zeptá, když má model více ligandů.",
+ "32": "Klíč ligandu řetězec:het:číslo nebo kód het",
+ "33": "Vyberte objekt 3D otevřený ze souboru PDB nebo mmCIF",
+ "34": "Uloží souřadnice 3D vybrané struktury se všemi vodíky: MDL molfile (zobrazený konformer), soubor SD (všechny konformery, s datovými poli energie a metody), PDB nebo XYZ (zobrazený konformer nebo všechny jako modely či snímky); objekt 3D otevřený ze souboru PDB nebo mmCIF uloží svůj původní soubor. Bez format se zeptá.",
+ "35": "Formát souboru",
+ "36": "Všechny konformery místo zobrazeného (výchozí true pro sdf)",
+ "37": "Proskenuje dihedrální úhel čtyř atomů vybraných v pohledu 3D (nebo jeho poslední měření dihedrálního úhlu) s relaxovanou minimalizací a vykreslí úhel proti energii.",
+ "38": "Změří vzdálenost (dva atomy), úhel (tři) nebo dihedrální úhel (čtyři) v pohledu 3D a přidá ho do seznamu; s atoms (id atomů fragmentu, například a1, vodíky jako a1:h0, nebo sériová čísla PDB) změří je, jinak přepne na výběr.",
+ "39": "Dvě až čtyři id atomů",
+ "40": "Uloží pohled 3D jako obrázek PNG ve velikosti na obrazovce; transparent vynechá pozadí.",
+ "41": "Uloží pohled 3D jako binární soubor glTF 2.0 (.glb): atomy jako koule, vazby jako válce v barvách prvků, 1 ångström = 1 cm, pro prohlížeče 3D, prezentace a tisk.",
+ "42": "Bez povrchu",
+ "43": "Odstraní molekulový povrch z pohledu 3D.",
+ "44": "Van der Waalsův povrch",
+ "45": "Zobrazí van der Waalsův povrch v pohledu 3D.",
+ "46": "Povrch přístupný rozpouštědlu",
+ "47": "Zobrazí povrch přístupný rozpouštědlu (sonda 1,4 ångström) v pohledu 3D.",
+ "48": "Povrch vyloučený rozpouštědlem",
+ "49": "Zobrazí povrch vyloučený rozpouštědlem v pohledu 3D.",
+ "50": "Povrch s mapou ESP",
+ "51": "Obarví povrch podle přibližného elektrostatického potenciálu vypočteného z empirických parciálních nábojů jádra (červená záporný, modrá kladný), s legendou uvádějící metodu.",
+ "52": "Zobrazí pohled 3D ve stylu drátovém; u objektu 3D na stránce se volba uloží spolu s ním.",
+ "53": "Zobrazí pohled 3D ve stylu tyčinkovém; u objektu 3D na stránce se volba uloží spolu s ním.",
+ "54": "Kuličky a tyčinky",
+ "55": "Zobrazí pohled 3D ve stylu kuliček a tyčinek; u objektu 3D na stránce se volba uloží spolu s ním.",
+ "56": "Kalotový",
+ "57": "Zobrazí pohled 3D ve stylu kalotovém (vyplnění prostoru); u objektu 3D na stránce se volba uloží spolu s ním.",
+ "58": "Stuha",
+ "59": "Zobrazí pohled 3D ve stylu stuhy (proteiny a nukleové kyseliny; ligandy zůstávají jako kuličky a tyčinky); u objektu 3D na stránce se volba uloží spolu s ním.",
+ "60": "Dihedrální úhel (stupně)",
+ "61": "Relativní energie (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "Export struktury 3D",
+ "64": "Všechny konformery (záznamy SDF, modely PDB, snímky XYZ)",
+ "65": "Uložen 1 konformer; každý vodík se zapíše se svou polohou 3D.",
+ "66": "Vyjmout ligand",
+ "67": "Ligand",
+ "68": "Ligand se stane strukturou 2D vedle modelu a jeho souřadnice ze souboru zůstanou zachovány jako jeho konformer.",
+ "69": "Vyjmout",
+ "70": "Soubor SD (.sdf)",
+ "71": "MDL Molfile (.mol)",
+ "72": "Uložené konformery: {0}; každý vodík se zapíše se svou polohou 3D.",
+ "73": "Konformery",
+ "74": "Energetické okno (kcal/mol)",
+ "75": "Vnoření ETKDG s pevným semínkem, téměř duplicitní konformery odstraněny při RMSD těžkých atomů 0,5 Å, každý minimalizovaný; nejnižší se stane zobrazeným konformerem.",
+ "76": "Vytvořit",
+ "77": "Energetický profil skenu dihedrálního úhlu",
+ "78": "Sken dihedrálního úhlu",
+ "79": "Od (stupně)",
+ "80": "Do (stupně)",
+ "81": "Krok (stupně)",
+ "82": "Ponechat každý bod jako konformer (jeden krok zpět)",
+ "83": "Spustit sken",
+ "84": "Relaxovaný sken: při každém úhlu se dihedrální úhel drží pevný a vše ostatní se minimalizuje.",
+ "85": "Koncový úhel musí být větší než počáteční.",
+ "86": "Skenování...",
+ "87": "Sken se nezdařil",
+ "88": "bariéra {0} kcal/mol",
+ "89": "Styl zobrazení",
+ "90": "Obarvit povrch podle elektrostatického potenciálu z empirických parciálních nábojů",
+ "91": "ESP",
+ "92": "Minimalizovat",
+ "93": "Sken...",
+ "94": "Zaostřit na ligand",
+ "95": "Obnovit pohled",
+ "96": "Otáčet",
+ "97": "Exportovat pohled 3D",
+ "98": "Měřit",
+ "99": "Měření",
+ "100": "Obrázek PNG",
+ "101": "Obrázek PNG, průhledný",
+ "102": "glTF binární (.glb)",
+ "103": "3D vyžaduje WebGL, který toto okno nenabízí.",
+ "104": "Načítání prohlížeče 3D...",
+ "105": "Prohlížeč 3D se nepodařilo načíst",
+ "106": "Otevřete výkres a vyberte strukturu, abyste ji viděli ve 3D.",
+ "107": "Vyberte strukturu na stránce, abyste ji viděli ve 3D.",
+ "108": "Strukturu 3D se nepodařilo přečíst",
+ "109": "Tento konformer nelze zapsat jako molfile",
+ "110": "Otáčení je vypnuto: systém žádá omezený pohyb",
+ "111": "Model PDB nebo CIF nemá žádné konformery.",
+ "112": "Energie vztažené k nejnižší; kliknutím na jednu ji zobrazíte.",
+ "113": "Vytvořit 3D nebo Konformery... naplní tento seznam.",
+ "114": "Parciální náboje nejsou k dispozici",
+ "115": "jádro zatím nemá trasy 3D",
+ "116": "nezkonvergovalo",
+ "117": "Vyberte čtyři po sobě vázané atomy (dihedrální úhel) a pak Sken.",
+ "118": "Zaškrtněte Ponechat každý bod jako konformer, abyste viděli geometrie.",
+ "119": "Zobrazit konformer",
+ "120": "Aktualizovat pohled 3D",
+ "121": "Snímek stránky se nepodařilo aktualizovat",
+ "122": "Bez povrchu",
+ "123": "Van der Waalsův",
+ "124": "Přístupný rozpouštědlu",
+ "125": "Vyloučený rozpouštědlem",
+ "126": "Vzdálenost",
+ "127": "Úhel",
+ "128": "Dihedrální úhel",
+ "129": "{0} kcal/mol, {1}, nezkonvergovalo",
+ "130": "Vybráno {0} / {1}: {2}",
+ "131": "Klikněte na {0} atomy, které chcete změřit",
+ "132": "ESP ({0}): {1}, červená {2} e až modrá +{3} e",
+ "133": "Vzdálenost {0}: {1}",
+ "134": "Úhel {0}: {1}",
+ "135": "Dihedrální úhel {0}: {1}",
+ "136": "Vytvořeno: {0}",
+ "137": "Minimalizováno: {0}",
+ "138": "Ponechané konformery: {0} z {1}",
+ "139": "Ponechané konformery: {0}",
+ "140": "Dihedrální úhel {0}",
+ "141": "Kódování PNG se nezdařilo"
+}
diff --git a/frontend/src/i18n/locales/cs/part15.json b/frontend/src/i18n/locales/cs/part15.json
new file mode 100644
index 00000000..0afab2bc
--- /dev/null
+++ b/frontend/src/i18n/locales/cs/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "přibližný, z empirických nábojů",
+ "1": "Nespecifikovaná stereocentra nebo dvojné vazby: {0}; byla zvolena jedna konfigurace.",
+ "2": "Stereoznačky výkresu, které se ve 3D nereprodukují: {0}.",
+ "3": "Byl vytvořen nakreslený člen rozšířené stereoskupiny {0}; model 3D je jeden stereoizomer směsi (relativní nebo racemické), kterou výkres popisuje.",
+ "4": "Počet vnoření: {0} (semínka {1}), aby se zachovala nakreslená stereochemie.",
+ "5": "Páry těžkých atomů blíže než {1} jejich van der Waalsova kontaktu: {0}.",
+ "6": "Použito univerzální silové pole: {0}.",
+ "7": "žádné parametry {0} pro {1}",
+ "8": "{0} nemohlo přiřadit typ všem atomům",
+ "9": "Konformery, které během minimalizace změnily nakreslenou stereochemii a byly vynechány: {0}.",
+ "10": "Více než 300 těžkých atomů: kvalita vzorkování konformerů při této velikosti klesá.",
+ "11": "Centrální vazba leží v kruhu; kruh se napíná, aby následoval úhel.",
+ "12": "Struktura neměla souřadnice 3D; sken začal z nového vnoření.",
+ "13": "Struktura se změnila během výpočtu 3D; spusťte příkaz znovu.",
+ "14": "Výkres nemá objekt {0}.",
+ "15": "{0} zatím nemá souřadnice 3D; nejprve vytvořte 3D.",
+ "16": "{0} nemá konformer {1}.",
+ "17": "Struktura nemá žádné atomy.",
+ "18": "3D vyžaduje skutečné atomy; počet popisků, R-skupin a bodů připojení mezi atomy: {0} ({1}).",
+ "19": "Vodíky se nepodařilo přidat: {0}",
+ "20": "Struktura má {0} atomů s vodíky; 3D zvládne nejvýše {1}.",
+ "21": "Souřadnice 3D neodpovídají této struktuře (nic pro {0}); vytvořte 3D znovu.",
+ "22": "Souřadnice 3D neodpovídají této struktuře (změnil se počet vodíků); vytvořte 3D znovu.",
+ "23": "Strukturu se nepodařilo vnořit do 3D: {0}",
+ "24": "Strukturu se nepodařilo vnořit do 3D; zkontrolujte její mocenství a stereochemii.",
+ "25": "Konformery se nepodařilo vnořit: {0}",
+ "26": "Nepodařilo se vnořit žádný konformer; zkontrolujte mocenství a stereochemii struktury.",
+ "27": "Každý vnořený konformer po minimalizaci ztratil nakreslenou stereochemii.",
+ "28": "Žádné silové pole nemá parametry pro tuto strukturu ({0}).",
+ "29": "Univerzální silové pole se nepodařilo nastavit: {0}",
+ "30": "Univerzální silové pole se nepodařilo nastavit.",
+ "31": "Neznámé atomy: {0}; použijte id atomů fragmentu nebo vodík jako a1:h0.",
+ "32": "Čtyři atomy musí být různé.",
+ "33": "Čtyři atomy musí tvořit řetězec vazeb (a1-a2-a3-a4).",
+ "34": "Soubor 3D se nepodařilo zapsat: {0}",
+ "35": "Soubor není soubor PDB, mmCIF, SDF ani MOL, který FormChem umí přečíst.",
+ "36": "Soubor má více než {0} atomů.",
+ "37": "Soubor PDB nemá žádné záznamy ATOM ani HETATM.",
+ "38": "Tabulka atom_site v mmCIF nemá sloupce Cartn_x, Cartn_y a Cartn_z.",
+ "39": "CIF má zlomkové souřadnice, ale nemá úplnou elementární buňku.",
+ "40": "CIF nemá tabulku atom_site.",
+ "41": "CIF nemá žádné čitelné atomy.",
+ "42": "Soubor nemá žádné záznamy.",
+ "43": "Soubor má {0} záznamů; import 3D čte nejvýše {1}.",
+ "44": "Žádný záznam souboru se nepodařilo přečíst.",
+ "45": "{0} není soubor PDB ani mmCIF.",
+ "46": "{0} se nepodařilo převést na výkres FormChem: {1}.",
+ "47": "Model PDB umístěn jako objekt 3D: {0}.",
+ "48": "Model mmCIF umístěn jako objekt 3D: {0}.",
+ "49": "Řádky ATOM nebo HETATM s nečitelnými souřadnicemi, které byly přeskočeny: {0}.",
+ "50": "Řádky atom_site s nečitelnými souřadnicemi, které byly přeskočeny: {0}.",
+ "51": "CIF malé molekuly: asymetrická jednotka se čte ze zlomkových souřadnic; symetricky ekvivalentní atomy se negenerují.",
+ "52": "{0} má problémy s mocenstvím; bylo načteno bez sanitace.",
+ "53": "{0} má jen souřadnice 2D; žádný konformer nebyl ponechán.",
+ "54": "Vodíky, které nebyly v souboru a byly umístěny podle geometrie: {0}.",
+ "55": "{0}: nepodařilo se přečíst: {1}",
+ "56": "{0}: nepodařilo se přečíst.",
+ "57": "Záznam {0}",
+ "58": "Struktura",
+ "59": "Souřadnice 3D ze souboru byly ponechány jako konformer 1 struktury; k jejich zobrazení není třeba Vytvořit 3D.",
+ "60": "Souřadnice 3D ze souboru byly ponechány jako konformery struktur, jejichž počet je {0}; k jejich zobrazení není třeba Vytvořit 3D.",
+ "61": "{0} je jednoduchý ion; není co vyjmout jako strukturu.",
+ "62": "Atomy {0} se nepodařilo přečíst.",
+ "63": "Ve struktuře není ligand {0}; ligandy: {1}.",
+ "64": "Výkres nemá model 3D {0}.",
+ "65": "FormChem umisťuje obrázky PNG, JPEG, GIF, WebP a SVG, spektra JCAMP-DX a soubory struktur PDB, mmCIF, SDF a MOL."
+}
diff --git a/frontend/src/i18n/locales/da/part12.json b/frontend/src/i18n/locales/da/part12.json
new file mode 100644
index 00000000..190d999a
--- /dev/null
+++ b/frontend/src/i18n/locales/da/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spektrum",
+ "1": "Tegn eller markér en struktur, der skal navngives.",
+ "2": "Navne kunne ikke beregnes",
+ "3": "FormChem har intet navn til denne struktur.",
+ "4": "Kopiér navn",
+ "5": "Navn kopieret: {0}",
+ "6": "Kemisk navn, der skal indsættes; udelad det for at åbne dialogen",
+ "7": "Kopierer navnet på den markerede struktur (eller sidens strukturer) som almindelig tekst: trivialnavnet, når FormChem kender et, ellers det systematiske navn, som kun tilbydes, når det læses tilbage til samme struktur.",
+ "8": "trivial eller systematic for at vælge, hvilket navn der kopieres; udelad det for det første",
+ "9": "Det forudsagte spektrum er opdateret.",
+ "10": "Opdatér forudsagt spektrum",
+ "11": "Markér først én struktur",
+ "12": "Markér først et forudsagt spektrum",
+ "13": "Forudsagt 1H NMR-spektrum tilføjet ({0})",
+ "14": "Forudsagt 13C NMR-spektrum tilføjet ({0})",
+ "15": "Forudsagt spektrum opdateret ({0})",
+ "16": "Strukturens fragment-id; standard er den markerede struktur eller den eneste på siden",
+ "17": "Spektrometerets frekvens i MHz (standard 400 for 1H, 100 for 13C)",
+ "18": "Tilføjer et forudsagt 1H NMR-spektrum af den markerede struktur ved siden af den, som ét fortrydelsestrin: et spektrumobjekt beregnet med FormChems egne inkrementregler (ingen database over kemiske skift), hvis multipletter og integraler er koblet til strukturens atomer, med metode, version og frekvens som titel. Kurven beregnes igen ud fra strukturen og gemmes aldrig.",
+ "19": "Tilføjer et forudsagt 13C NMR-spektrum af den markerede struktur ved siden af den, som ét fortrydelsestrin: et spektrumobjekt beregnet med FormChems egne inkrementregler (ingen database over kemiske skift), hvis toppe er koblet til strukturens atomer, med metode, version og frekvens som titel. Kurven beregnes igen ud fra strukturen og gemmes aldrig.",
+ "20": "Kunne ikke forudsige spektret",
+ "21": "Forudsig 1H NMR-spektrum",
+ "22": "Forudsig 13C NMR-spektrum",
+ "23": "Beregner multipletterne, integralerne eller toppene i et forudsagt spektrum igen, efter at dets struktur er ændret, med den kørende version af forudsigeren, som ét fortrydelsestrin; intet ændres, når det er opdateret.",
+ "24": "Id på det forudsagte spektrum; standard er det markerede eller det, der er åbent i spektrumeditoren",
+ "25": "Kunne ikke opdatere spektret",
+ "26": "Ingen nye toppe i det område.",
+ "27": "Træk hen over et område i spektrumeditoren for at integrere det.",
+ "28": "Kobl top til atomer",
+ "29": "Fjern kobling af top",
+ "30": "Spektrets Y-akse",
+ "31": "Spektrum fra fil...",
+ "32": "Redigér spektrum...",
+ "33": "Find toppe",
+ "34": "Integrér",
+ "35": "Transmittans eller absorbans",
+ "36": "Eksportér spektrum...",
+ "37": "Markér først et spektrum",
+ "38": "intet spektrum med id {0}",
+ "39": "Toppe fundet: {0} (allerede til stede: {1})",
+ "40": "Toppe fundet: {0}",
+ "41": "Integraler hører til NMR-spektre",
+ "42": "Markér først en top, et integral eller et multiplet i spektrumeditoren",
+ "43": "Atomerne skal alle høre til én struktur",
+ "44": "Kun IR-, Raman- og UV-Vis-spektre kan skifte mellem transmittans og absorbans",
+ "45": "Eksporteret: {0}",
+ "46": "Id på spektrumobjektet; standard er det markerede spektrum eller det, der er åbent i spektrumeditoren",
+ "47": "Importerer en JCAMP-DX-spektrumfil i den aktive tegning (ét spektrumobjekt pr. datablok, filen bevares byte for byte), som ét fortrydelsestrin pr. fil. Uden path åbnes en fildialog.",
+ "48": "Absolut sti til en .jdx-, .dx- eller .jcamp-fil",
+ "49": "Kunne ikke importere spektret",
+ "50": "Åbner spektrumeditoren for det markerede spektrum (det samme som at dobbeltklikke på det).",
+ "51": "Kunne ikke åbne spektret",
+ "52": "Finder spektrets toppe i et område (standard det viste område) og føjer dem til dets topliste, idet toppe, der allerede er der, springes over, som ét fortrydelsestrin.",
+ "53": "Områdets start i x-enheden (cm-1, nm, m/z, ppm)",
+ "54": "Områdets slutning i x-enheden",
+ "55": "Valgfri detektionstærskel i y-enheder",
+ "56": "Erstat toplisten i stedet for at tilføje til den",
+ "57": "Kunne ikke finde toppe",
+ "58": "Tilføjer et NMR-integral over et område, skaleret som de eksisterende integraler (eller til value, så resten skaleres om), som ét fortrydelsestrin. Uden from og to skifter det spektrumeditoren til dens integrationsværktøj.",
+ "59": "Områdets start i ppm",
+ "60": "Områdets slutning i ppm",
+ "61": "Værdi, dette integral skal vise, for eksempel et antal protoner",
+ "62": "Kunne ikke integrere",
+ "63": "Kobler en top, et integral eller et multiplet til atomer i en struktur, som ét fortrydelsestrin. Uden atoms bruges de markerede atomer, eller der ventes på, at brugeren klikker på atomer i tegningen.",
+ "64": "Id på top, integral eller multiplet; standard er det, der er markeret i spektrumeditoren",
+ "65": "Id på den struktur (fragment), atomerne hører til",
+ "66": "Atom-id'er",
+ "67": "Kunne ikke koble toppen",
+ "68": "Fjerner atomkoblingen fra en top, et integral eller et multiplet, som ét fortrydelsestrin.",
+ "69": "Kunne ikke fjerne toppens kobling",
+ "70": "Viser et IR-, Raman- eller UV-Vis-spektrum som transmittans eller absorbans (skifter, når mode udelades), som ét fortrydelsestrin.",
+ "71": "Y-akse, der skal vises; udelad for at skifte",
+ "72": "Kunne ikke ændre y-aksen",
+ "73": "Gemmer et spektrum som JCAMP-DX (med sin toptabel, når det har toppe) eller som CSV med alle punkter, via motoren.",
+ "74": "Filformat, standard jdx",
+ "75": "Med jdx: den oprindeligt importerede fil uændret",
+ "76": "Absolut sti, der skal skrives til; udelad for at blive spurgt",
+ "77": "Kunne ikke eksportere spektret",
+ "78": "Indsæt spektrum fra fil",
+ "79": "Filen indeholder intet spektrum, som FormChem kan tegne",
+ "80": "Indsæt spektrum",
+ "81": "Spektret kunne ikke placeres: dets fil nåede ikke frem til tegningen.",
+ "82": "Spektre indsat: {0}",
+ "83": "Bølgelængde (µm)",
+ "84": "Bølgetal (cm⁻¹)",
+ "85": "Ramanforskydning (cm⁻¹)",
+ "86": "Bølgelængde (nm)",
+ "87": "Frekvens (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmittans (%)",
+ "90": "Transmittans",
+ "91": "Absorbans",
+ "92": "Relativ forekomst (%)",
+ "93": "Intensitet",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Forudsagt {0}, {1} MHz ({2})",
+ "100": "Forudsagt {0}, {1} MHz",
+ "101": "Forudsagt {0} ({1})",
+ "102": "Forudsagt {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spektret er ikke tilgængeligt: {0}",
+ "105": "Indlæser spektrum",
+ "106": "Trivialnavn",
+ "107": "Systematisk",
+ "108": "Høj sikkerhed",
+ "109": "Middel sikkerhed",
+ "110": "Lav sikkerhed",
+ "111": "Ikke læst",
+ "112": "FormChem-navne",
+ "113": "Kunne ikke læse navnet",
+ "114": "Indsæt struktur fra navn",
+ "115": "Struktur fra navn",
+ "116": "Et navn, for eksempel aspirin eller 2-methylpropan-1-ol",
+ "117": "Kemisk navn",
+ "118": "Skriv et navn for at se dets struktur.",
+ "119": "Ingen struktur for dette navn",
+ "120": "Ordbog",
+ "121": "Systematisk fortolker",
+ "122": "Regelbaseret navngiver, kontrolleret ved tilbageløb",
+ "123": "Spektrumværktøjer",
+ "124": "Vis hele spektret",
+ "125": "Y-akse",
+ "126": "Vis dette område på siden",
+ "127": "Dobbeltklik på et spektrum i tegningen for at redigere det her.",
+ "128": "Toppe og integraler",
+ "129": "Forudsagt",
+ "130": "Integralværdi",
+ "131": "Kobl til atomer",
+ "132": "Fjern kobling",
+ "133": "1 atom",
+ "134": "Atomer, der skal kobles",
+ "135": "Klik på flere atomer, og klik derefter på Færdig.",
+ "136": "Klik på de atomer i tegningen, der hører til denne top, og klik derefter på Færdig.",
+ "137": "Intet at integrere i det område.",
+ "138": "Fjern top",
+ "139": "Tilføj top",
+ "140": "Koblet til 1 atom",
+ "141": "Angiv spektrumområde",
+ "142": "Skriv et positivt tal.",
+ "143": "Kunne ikke angive integralet",
+ "144": "Panorér og zoom: træk for at panorere, brug hjulet til at zoome, Shift-træk for at zoome til et område",
+ "145": "Zoom til et område: træk hen over plottet",
+ "146": "Find toppe: træk hen over et område",
+ "147": "Tilføj eller fjern en top: klik nær en top",
+ "148": "Integrér: træk hen over et område",
+ "149": "Top",
+ "150": "Integral",
+ "151": "Multiplet",
+ "152": "{0} atomer",
+ "153": "Koblet til {0}",
+ "154": "Træk for at panorere, brug hjulet til at zoome, Shift-træk for at zoome til et område. Klik på en etiket for at markere den.",
+ "155": "Træk hen over plottet for at zoome til det område.",
+ "156": "Træk hen over et område for at finde dets toppe.",
+ "157": "Klik nær en top for at tilføje den; klik på en toppens etiket for at fjerne den.",
+ "158": "Træk hen over et område for at integrere det.",
+ "159": "Koblet til {0} atomer"
+}
diff --git a/frontend/src/i18n/locales/da/part13.json b/frontend/src/i18n/locales/da/part13.json
new file mode 100644
index 00000000..e86cfc56
--- /dev/null
+++ b/frontend/src/i18n/locales/da/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "motoren returnerede en tom fil",
+ "1": "navnet er længere end {0} tegn",
+ "2": "fragmenter på over {0} atomer navngives ikke",
+ "3": "Strukturen indeholder etiketter, R-grupper eller vilkårlige atomer, som ikke har noget navn.",
+ "4": "Strukturen kunne ikke læses som et molekyle (kontrollér valenser).",
+ "5": "Der er ingen struktur, der kan navngives.",
+ "6": "Inverterede indeksnavne (stamme først, derefter et komma og substituenterne) læses ikke; skriv navnet i normal rækkefølge, for eksempel 1,2-dichlorobenzene.",
+ "7": "D- og L- læses kun for aminosyrerne og sukkerarterne i FormChems ordbog; angiv R- eller S-deskriptorer for andre navne.",
+ "8": "FormChem læste hele navnet, men det udgør ikke et fuldstændigt strukturnavn (en stamme som hexane eller benzene eller et suffiks kan mangle).",
+ "9": "FormChem kunne ikke læse navnet fra tegn {0} (\"{1}\").",
+ "10": "FormChem læste navnet, men {0}.",
+ "11": "strukturen kunne ikke fuldføres",
+ "12": "Navnet kan læses på mere end én måde; FormChem tegnede den læsning, der kræver færrest antagelser.",
+ "13": "Navnet angiver ingen stereodeskriptorer, så stereocentre og dobbeltbindinger tegnes uspecificerede.",
+ "14": "Intet systematisk navn: {0}.",
+ "15": "Det systematiske navn, FormChem dannede, blev ikke læst tilbage til samme struktur, så det vises ikke.",
+ "16": "den dobbeltbinding kan ikke være E eller Z",
+ "17": "deskriptorens lokant {0} er ikke en position i stammen",
+ "18": "position {0} starter ikke en dobbeltbinding, der kan være E eller Z",
+ "19": "{0} kræver præcis én dobbeltbinding, der kan være cis eller trans; denne struktur har {1}",
+ "20": "{0} er uklart for denne dobbeltbinding; angiv E eller Z i stedet",
+ "21": "({0}) kræver en lokant: strukturen har {1} stereocentre",
+ "22": "position {0} er ikke et stereocenter, så ({1}) kan ikke anvendes",
+ "23": "({0}) kræver en lokant: strukturen har {1} dobbeltbindinger, der kan være E eller Z",
+ "24": "position {0} kan ikke få {1}",
+ "25": "den dobbeltbinding kan ikke få {0}",
+ "26": "{0} angiver ikke, hvilken konfiguration der menes, så strukturen tegnes uden stereo.",
+ "27": "{0} har intet bindingspunkt",
+ "28": "der er ikke plads til {0} ved {1}",
+ "29": "{0} kan ikke binde dér",
+ "30": "kæder på mere end {0} carbonatomer læses endnu ikke",
+ "31": "{0} er for lille til at være en ring",
+ "32": "{0}-{1} er en tautomer, som FormChem endnu ikke tegner ud fra et navn",
+ "33": "lokant {0} er ikke en position i {1}",
+ "34": "{0} er ikke en kædeposition",
+ "35": "en multipel binding kan ikke starte ved position {0} i {1}",
+ "36": "position {0} i {1} kan ikke bære den multiple binding",
+ "37": "der er ikke plads til en multipel binding ved position {0} i {1}",
+ "38": "der er ikke plads til de multiple bindinger i {0}",
+ "39": "De multiple bindingers positioner i {0} blev ikke angivet; tegnet ved de laveste positioner.",
+ "40": "-{0} kræver en åben kæde; på en ring er suffikset carbaldehyd, carboxylsyre, carbonitril eller carboxamid",
+ "41": "en kæde har kun to ender til -{0}",
+ "42": "{0} er for kort til to -{1}-grupper",
+ "43": "der er ikke plads til -{0} på {1}",
+ "44": "Positionen af -{0} på {1} blev ikke angivet; tegnet ved den laveste position.",
+ "45": "-{0} skal sidde for enden af kæden, ikke ved {1}",
+ "46": "der er ikke plads til -{0} ved {1}",
+ "47": "ortho, meta og para kræver en benzenring",
+ "48": "ortho, meta eller para med én enkelt gruppe kræver en stamme som phenol, aniline eller toluene",
+ "49": "der er ikke plads til {0} på {1}",
+ "50": "der er ikke plads til {0} {1}-grupper på {2}",
+ "51": "Positionen af {0} på {1} blev ikke angivet; tegnet ved den laveste frie position.",
+ "52": "{0} kan ikke bære substituenter",
+ "53": "en acylgruppe er bundet til sit carbonylcarbon",
+ "54": "{0} har ingen fri position",
+ "55": "Bindingspositionen for {0} blev ikke angivet; position {1} antaget.",
+ "56": "{0} har ikke plads tilbage til at binde",
+ "57": "lokanterne {0} før {1} bruges ikke",
+ "58": "{0} kan ikke stå som et selvstændigt ord",
+ "59": "\"{0}\" kræver {1} gruppe før sig, navnet angiver {2}",
+ "60": "\"{0}\" kræver {1} grupper før sig, navnet angiver {2}",
+ "61": "navnet angiver {0} alkylgruppe til {1} esterposition",
+ "62": "navnet angiver {0} alkylgruppe til {1} esterpositioner",
+ "63": "navnet angiver {0} alkylgrupper til {1} esterposition",
+ "64": "navnet angiver {0} alkylgrupper til {1} esterpositioner",
+ "65": "den struktur, det beskriver, er ikke gyldig ({0})",
+ "66": "-one ved {0} ville være et aldehyd; et aldehyd navngives med -al",
+ "67": "position {0} i {1}",
+ "68": "for mange identiske substituenter",
+ "69": "blandede lokanter",
+ "70": "usædvanlige bindingstyper navngives endnu ikke",
+ "71": "et ringsystem, FormChem endnu ikke kan navngive",
+ "72": "aromatiske ringe med exocykliske dobbeltbindinger (såsom pyridoner) navngives endnu ikke",
+ "73": "isotoper og radikaler navngives endnu ikke",
+ "74": "hypervalente halogener navngives ikke",
+ "75": "ladede nitrogengrupper andre end nitro navngives endnu ikke",
+ "76": "ladede atomer navngives endnu ikke",
+ "77": "oxider af svovl, nitrogen og phosphor navngives endnu ikke",
+ "78": "denne oxygengruppe navngives endnu ikke",
+ "79": "sulfoxider, sulfoner og andre svovlgrupper navngives endnu ikke",
+ "80": "iminer, azo- og lignende nitrogengrupper navngives endnu ikke",
+ "81": "{0} navngives endnu ikke",
+ "82": "substituentkæder på over 20 carbonatomer navngives ikke",
+ "83": "umættede acylgrupper navngives endnu ikke",
+ "84": "substituerede ylidengrupper navngives endnu ikke",
+ "85": "ringylidengrupper navngives endnu ikke",
+ "86": "ringe bundet to gange navngives endnu ikke",
+ "87": "ingen nummerering fundet for en ringsubstituent",
+ "88": "estere med forskellige alkoholdele navngives endnu ikke",
+ "89": "ingen stamkæde eller stamring fundet",
+ "90": "cykliske estere (lactoner) navngives endnu ikke",
+ "91": "substituenter på mere end ét amin- eller amidnitrogen navngives endnu ikke",
+ "92": "stereocentre uden for stamkæden eller stamringen navngives endnu ikke",
+ "93": "dobbeltbindingsgeometri uden for stamkæden navngives endnu ikke",
+ "94": "pseudoasymmetriske centre navngives endnu ikke",
+ "95": "denne dobbeltbindingsgeometri navngives endnu ikke",
+ "96": "kæder på over 20 carbonatomer navngives ikke",
+ "97": "for mange identiske grupper",
+ "98": "strukturen har valensfejl",
+ "99": "salte og blandinger navngives endnu ikke systematisk",
+ "100": "strukturer med mere end {0} tunge atomer navngives endnu ikke systematisk",
+ "101": "forbindelser af {0} navngives endnu ikke systematisk",
+ "102": "forespørgselsatomer og R-grupper har intet navn",
+ "103": "hydrider af enkelte heteroatomer navngives kun ud fra ordbogen",
+ "104": "{0} er ikke et objekt i denne tegning.",
+ "105": "{0} har ingen atomer.",
+ "106": "Fragmentet har ingen atomer.",
+ "107": "Tegningen har ingen side.",
+ "108": "{0} er ikke et spektrum i denne tegning.",
+ "109": "Strukturen {0}, som denne forudsigelse hører til, er ikke længere i tegningen.",
+ "110": "Tegningen {0} blev lukket.",
+ "111": "Kemisk skift (ppm)",
+ "112": "Tid (s)",
+ "113": "Reflektans",
+ "114": "Relativ forekomst",
+ "115": "##{0}= forekommer mere end én gang; den første værdi blev beholdt.",
+ "116": "##XYDATA={0} er ikke en kendt variabelliste; den blev læst som (X++(Y..Y)).",
+ "117": "##{0}={1} er ikke en kendt variabelliste; den blev læst som (XY..XY).",
+ "118": "Punkterne var ikke i x-rækkefølge og blev sorteret.",
+ "119": "##.SHIFT REFERENCE={0} kunne ikke læses; skiftene blev ikke refereret.",
+ "120": "##.SHIFT REFERENCE angiver punkt {0}, uden for de {1} punkter; skiftene blev ikke refereret.",
+ "121": "Skiftene blev refereret, så punkt {0} viser {1} ppm ({2}).",
+ "122": "Filen angiver ikke den observerede kerne.",
+ "123": "Dette er NMR-data i tidsdomænet (et FID); de vises som optaget, uden Fourier-transformation.",
+ "124": "Frekvenser i Hz blev divideret med observationsfrekvensen ({0} MHz) for at give ppm.",
+ "125": "Der er ingen ##.SHIFT REFERENCE; 0 Hz blev sat til 0 ppm.",
+ "126": "Der er ingen ##.OBSERVE FREQUENCY, så skiftaksen forbliver i Hz.",
+ "127": "Transmittans blev gemt som en brøkdel og vises som procent.",
+ "128": "Blok {0} indeholder mere end {1} punkter.",
+ "129": "##DATA TYPE={0} med x-enhederne {1} angiver ingen kendt teknik; den tegnes som et almindeligt spektrum.",
+ "130": "##BLOCKS={0}, men LINK-blokken indeholder {1} blokke; alle fundne blokke blev læst.",
+ "131": "Dette er ikke en JCAMP-DX-fil: den har ingen ##TITLE=-post.",
+ "132": "Filen indeholder {0} blokke efter hinanden uden en LINK-blok; hver blev læst.",
+ "133": "To blokke har samme ##BLOCK_ID.",
+ "134": "Filen indeholder intet spektrum, som FormChem kan tegne ({0}).",
+ "135": "Blokken \"{0}\" blev ikke tegnet: {1}.",
+ "136": "en strukturblok (JCAMP-CS); den bevares i filen, men tegnes ikke",
+ "137": "den indeholder ingen XYDATA, XYPOINTS, PEAK TABLE eller NTUPLES",
+ "138": "dens datatabel indeholder ingen punkter",
+ "139": "dens NTUPLES-tabel erklærer ingen symboler",
+ "140": "2D NTUPLES-spektre understøttes endnu ikke",
+ "141": "dens NTUPLES-tabel har ingen læsbare sider",
+ "142": "Filen indeholder tegn uden for ASCII; den blev læst som UTF-8.",
+ "143": "Filen indeholder bytes, der hverken er ASCII eller UTF-8; den blev læst som Latin-1.",
+ "144": "Linjer uden for enhver mærket datapost blev ignoreret.",
+ "145": "En ##END= uden en blok før sig blev ignoreret.",
+ "146": "Poster før den første ##TITLE= eller efter den sidste ##END= blev ignoreret.",
+ "147": "Filen slutter uden ##END=; de åbne blokke blev lukket.",
+ "148": "NTUPLES-side {0}",
+ "149": "NTUPLES-side {0} har ingen ##DATA TABLE=; den blev sprunget over.",
+ "150": "NTUPLES-side {0} bruger symboler ({1}), der ikke er erklæret i ##SYMBOL=; den blev sprunget over.",
+ "151": "{0} har en dataform, FormChem ikke læser ({1}); den blev sprunget over.",
+ "152": "NTUPLES-tabellen har ingen ##END NTUPLES=; den blev læst til blokkens slutning.",
+ "153": "NTUPLES-tabellen har ingen ##SYMBOL=-liste.",
+ "154": "Dette er et 2D-spektrum (to uafhængige variable); 2D-spektre tegnes ikke i denne version.",
+ "155": "NTUPLES-tabellen har {0} sider; kun de første {1} blev læst.",
+ "156": "Den imaginære side deler ikke den reelle sides x-værdier; den blev udeladt.",
+ "157": "NTUPLES-tabellen indeholder {0} sider; side {1} vises, og {2} andre sider blev udeladt.",
+ "158": "##DELTAX={0} afviger fra (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; den beregnede afstand bruges.",
+ "159": "{0} har ikke komplet FIRSTX, LASTX og NPOINTS; afstanden kommer fra ##DELTAX.",
+ "160": "En datalinje begyndte med en DIF-værdi; den fortsætter fra den foregående linjes sidste værdi.",
+ "161": "En Y-kontrolværdi stemte ikke med den foregående linjes sidste værdi; linjen blev fortsat fra den tidligere værdi.",
+ "162": "{0} tegn i {1} kunne ikke læses og blev sprunget over.",
+ "163": "{0} DIF-linjer blev ikke efterfulgt af en Y-kontrolværdi.",
+ "164": "{0} indeholder ingen datapunkter.",
+ "165": "{0} indeholder {1} punkter, men ##NPOINTS={2}; linjernes X-værdier passer til {3} punkter fra FIRSTX til LASTX, så den afstand blev brugt.",
+ "166": "{0} indeholder {1} punkter, men ##NPOINTS={2}; de læste punkter blev beholdt.",
+ "167": "En linjes X-værdi stemmer ikke med dens position ud fra FIRSTX og afstanden; positionen blev brugt.",
+ "168": "{0} har ikke FIRSTX, LASTX og NPOINTS; afstanden blev taget fra linjernes X-værdier.",
+ "169": "{0} giver ingen måde at placere sine punkter på x-aksen; de blev nummereret 0, 1, 2 og så videre.",
+ "170": "Den første linje starter ved x = {0}, men ##FIRSTX={1}; FIRSTX blev brugt.",
+ "171": "Den første Y-værdi {0} stemmer ikke med ##FIRSTY={1}.",
+ "172": "{0} ender med en ufuldstændig gruppe på {1} værdier; den blev droppet.",
+ "173": "Kunne ikke læse {0}: {1}.",
+ "174": "Spektret beder om blok {0}, men dets fil indeholder 1 blok.",
+ "175": "Spektret beder om blok {0}, men dets fil indeholder {1} blokke.",
+ "176": "Spektret har ingen kilde.",
+ "177": "Spektrets fil {0} er ikke i tegningen.",
+ "178": "Der findes ingen forudsigelse for {0} i denne motor.",
+ "179": "Forudsigelsen mislykkedes: {0}",
+ "180": "Spektrets kilde er hverken en fil eller en forudsigelse.",
+ "181": "Tegningen har intet spektrum {0}.",
+ "182": "Stikspektre har ingen arealer at integrere.",
+ "183": "value skal være større end nul.",
+ "184": "from og to skal være to forskellige x-værdier.",
+ "185": "Spektret har intet integral {0}.",
+ "186": "Dette spektrum har ingen original fil; eksportér det uden original=1.",
+ "187": "FormChem placerer PNG-, JPEG-, GIF-, WebP- og SVG-billeder samt JCAMP-DX-spektre."
+}
diff --git a/frontend/src/i18n/locales/da/part14.json b/frontend/src/i18n/locales/da/part14.json
new file mode 100644
index 00000000..42418f83
--- /dev/null
+++ b/frontend/src/i18n/locales/da/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Visning",
+ "1": "Overflade",
+ "2": "Intet at eksportere: 3D-visningen er tom.",
+ "3": "Eksport mislykkedes",
+ "4": "Markér en struktur, der skal vises i 3D.",
+ "5": "Byg 3D",
+ "6": "Indsæt 3D-visning",
+ "7": "Vælg en PDB-, mmCIF-, SDF- eller MOL-fil.",
+ "8": "Kunne ikke placere 3D-strukturen på siden",
+ "9": "Markér et 3D-objekt åbnet fra en PDB- eller mmCIF-fil.",
+ "10": "Denne model har ingen ligander.",
+ "11": "Kunne ikke udtrække liganden",
+ "12": "Endnu ingen 3D-koordinater: Byg 3D danner en konformer ud fra tegningen.",
+ "13": "3D-strukturfil...",
+ "14": "Udtræk ligand...",
+ "15": "Eksportér 3D-struktur...",
+ "16": "Dihedral scanning...",
+ "17": "Mål i 3D",
+ "18": "Eksportér 3D-visning som PNG...",
+ "19": "Eksportér 3D-visning som glTF...",
+ "20": "Udtrukket {0}: {1} (bindingsordener udledt)",
+ "21": "Udtrukket {0}: {1}",
+ "22": "Åbn først 3D-visningen",
+ "23": "Åbner 3D-visningspanelet for den markerede struktur (eller det markerede 3D-objekt på siden) og følger markeringen. En struktur skal først have 3D-koordinater: Byg 3D danner dem.",
+ "24": "Bygger en 3D-konformer af den markerede struktur ud fra dens 2D-tegning (kiler, dobbeltbindingsgeometri og ladninger bevares), minimerer den med det valgte kraftfelt og gemmer den i tegningen som ét fortrydelsestrin; 3D-visningen viser den.",
+ "25": "Minimerer den viste konformer af den markerede struktur med det kraftfelt, der er valgt i 3D-visningen (MMFF94 som standard, UFF når MMFF94 ikke har parametre), og rapporterer energien før og efter, som ét fortrydelsestrin.",
+ "26": "Danner et konformerensemble af den markerede struktur (ETKDG, beskåret efter RMSD, hver minimeret) og beholder dem inden for et energivindue; med n, window og method køres det uden dialogen.",
+ "27": "Konformere, der skal dannes",
+ "28": "Energivindue i kcal/mol",
+ "29": "Placerer en 3D-visning af den markerede struktur på siden ved siden af den (og bygger først 3D-koordinater, hvis den ingen har) og åbner 3D-visningspanelet bundet til den; når modellen drejes eller får ny stil, opdateres billedet på siden.",
+ "30": "Åbner en PDB-, mmCIF-, SDF- eller MOL-fil som et 3D-objekt på siden (proteiner som cartoon med ligander som kugle og stav, vand skjult, liganden i fokus) og viser den i 3D-visningen.",
+ "31": "Gør en ligand fra det markerede 3D-objekt (åbnet fra en PDB- eller mmCIF-fil) til en 2D-struktur ved siden af det, som ét fortrydelsestrin: bindingsordener fra en indbygget skabelon for almindelige ligander, ellers udledt af geometrien og rapporteret; filens koordinater bliver dens konformer. Med ligand tages netop den; uden den spørges der, når modellen har flere.",
+ "32": "Ligandnøgle kæde:het:nummer eller en het-kode",
+ "33": "Markér et 3D-objekt åbnet fra en PDB- eller mmCIF-fil",
+ "34": "Gemmer den markerede strukturs 3D-koordinater med alle hydrogener: MDL molfile (den viste konformer), SD-fil (hver konformer, med energi- og metodedatafelter), PDB eller XYZ (den viste konformer eller hver konformer som modeller eller billedrammer); et 3D-objekt åbnet fra en PDB- eller mmCIF-fil gemmer sin oprindelige fil. Uden format spørges der.",
+ "35": "Filformat",
+ "36": "Hver konformer i stedet for den viste (standard true for sdf)",
+ "37": "Scanner dihedralvinklen for de fire atomer, der er valgt i 3D-visningen (eller dens seneste dihedralmåling), med relakseret minimering og plotter vinkel mod energi.",
+ "38": "Måler en afstand (to atomer), en vinkel (tre) eller en dihedralvinkel (fire) i 3D-visningen og viser den på en liste; med atoms (fragmentets atom-id'er som a1, hydrogener som a1:h0, eller PDB-serienumre) måles disse, ellers skifter den til udvælgelse.",
+ "39": "To til fire atom-id'er",
+ "40": "Gemmer 3D-visningen som et PNG-billede i dens størrelse på skærmen; transparent udelader baggrunden.",
+ "41": "Gemmer 3D-visningen som en binær glTF 2.0-fil (.glb): atomer som kugler og bindinger som cylindre med grundstoffarver, 1 angstrøm = 1 cm, til 3D-fremvisere, slides og udskrivning.",
+ "42": "Ingen overflade",
+ "43": "Fjerner molekyleoverfladen fra 3D-visningen.",
+ "44": "Van der Waals-overflade",
+ "45": "Viser van der Waals-overfladen i 3D-visningen.",
+ "46": "Opløsningsmiddeltilgængelig overflade",
+ "47": "Viser den opløsningsmiddeltilgængelige overflade (probe 1,4 angstrøm) i 3D-visningen.",
+ "48": "Opløsningsmiddeludelukket overflade",
+ "49": "Viser den opløsningsmiddeludelukkede overflade i 3D-visningen.",
+ "50": "ESP-kortlagt overflade",
+ "51": "Farver overfladen efter et omtrentligt elektrostatisk potentiale ud fra motorens empiriske partialladninger (rød negativ, blå positiv), med en signaturforklaring, der navngiver metoden.",
+ "52": "Viser 3D-visningen i trådstil; for et 3D-objekt på siden gemmes valget sammen med det.",
+ "53": "Viser 3D-visningen i stavstil; for et 3D-objekt på siden gemmes valget sammen med det.",
+ "54": "Kugle og stav",
+ "55": "Viser 3D-visningen i kugle-og-stav-stil; for et 3D-objekt på siden gemmes valget sammen med det.",
+ "56": "Rumfyldende",
+ "57": "Viser 3D-visningen i rumfyldende stil; for et 3D-objekt på siden gemmes valget sammen med det.",
+ "58": "Cartoon",
+ "59": "Viser 3D-visningen i cartoonstil (proteiner og nukleinsyrer; ligander forbliver kugle og stav); for et 3D-objekt på siden gemmes valget sammen med det.",
+ "60": "Dihedralvinkel (grader)",
+ "61": "Relativ energi (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "Eksportér 3D-struktur",
+ "64": "Hver konformer (SDF-poster, PDB-modeller, XYZ-billedrammer)",
+ "65": "1 konformer gemt; hvert hydrogen skrives med sin 3D-position.",
+ "66": "Udtræk ligand",
+ "67": "Ligand",
+ "68": "Liganden bliver en 2D-struktur ved siden af modellen, og dens koordinater fra filen bevares som dens konformer.",
+ "69": "Udtræk",
+ "70": "SD-fil (.sdf)",
+ "71": "MDL molfile (.mol)",
+ "72": "{0} konformere gemt; hvert hydrogen skrives med sin 3D-position.",
+ "73": "Konformere",
+ "74": "Energivindue (kcal/mol)",
+ "75": "ETKDG-indlejring med fast seed, næsten identiske fjernet ved 0,5 Å RMSD for tunge atomer, hver minimeret; den laveste bliver den viste konformer.",
+ "76": "Generér",
+ "77": "Energiprofil for dihedral scanning",
+ "78": "Dihedral scanning",
+ "79": "Fra (grader)",
+ "80": "Til (grader)",
+ "81": "Trin (grader)",
+ "82": "Behold hvert punkt som en konformer (ét fortrydelsestrin)",
+ "83": "Kør scanning",
+ "84": "En relakseret scanning: ved hver vinkel holdes dihedralvinklen fast, og alt andet minimeres.",
+ "85": "Slutvinklen skal være større end startvinklen.",
+ "86": "Scanner...",
+ "87": "Scanning mislykkedes",
+ "88": "barriere {0} kcal/mol",
+ "89": "Visningsstil",
+ "90": "Farv overfladen efter elektrostatisk potentiale ud fra empiriske partialladninger",
+ "91": "ESP",
+ "92": "Minimér",
+ "93": "Scan...",
+ "94": "Fokusér på liganden",
+ "95": "Nulstil visning",
+ "96": "Roter",
+ "97": "Eksportér 3D-visningen",
+ "98": "Mål",
+ "99": "Målinger",
+ "100": "PNG-billede",
+ "101": "PNG-billede, transparent",
+ "102": "glTF binær (.glb)",
+ "103": "3D kræver WebGL, som dette vindue ikke tilbyder.",
+ "104": "Indlæser 3D-fremviseren...",
+ "105": "3D-fremviseren kunne ikke indlæses",
+ "106": "Åbn en tegning og markér en struktur for at se den i 3D.",
+ "107": "Markér en struktur på siden for at se den i 3D.",
+ "108": "Kunne ikke læse 3D-strukturen",
+ "109": "Denne konformer kan ikke skrives som en molfile",
+ "110": "Rotation er slået fra: systemet beder om reduceret bevægelse",
+ "111": "En PDB- eller CIF-model har ingen konformere.",
+ "112": "Energier i forhold til den laveste; klik på én for at vise den.",
+ "113": "Byg 3D eller Konformere... udfylder denne liste.",
+ "114": "Partialladninger er ikke tilgængelige",
+ "115": "motoren har endnu ingen 3D-ruter",
+ "116": "ikke konvergeret",
+ "117": "Vælg fire bundne atomer i række (en dihedralvinkel), og klik derefter på Scan.",
+ "118": "Sæt kryds ved Behold hvert punkt som en konformer for at se geometrierne.",
+ "119": "Vis konformer",
+ "120": "Opdatér 3D-visning",
+ "121": "Kunne ikke opdatere sidens øjebliksbillede",
+ "122": "Ingen overflade",
+ "123": "Van der Waals",
+ "124": "Opløsningsmiddeltilgængelig",
+ "125": "Opløsningsmiddeludelukket",
+ "126": "Afstand",
+ "127": "Vinkel",
+ "128": "Dihedralvinkel",
+ "129": "{0} kcal/mol, {1}, ikke konvergeret",
+ "130": "Valgt {0} / {1}: {2}",
+ "131": "Klik på {0} atomer for at måle",
+ "132": "ESP ({0}): {1}, rød {2} e til blå +{3} e",
+ "133": "Afstand {0}: {1}",
+ "134": "Vinkel {0}: {1}",
+ "135": "Dihedralvinkel {0}: {1}",
+ "136": "Bygget: {0}",
+ "137": "Minimeret: {0}",
+ "138": "{0} konformere beholdt af {1}",
+ "139": "{0} konformere beholdt",
+ "140": "Dihedralvinkel {0}",
+ "141": "PNG-kodning mislykkedes"
+}
diff --git a/frontend/src/i18n/locales/da/part15.json b/frontend/src/i18n/locales/da/part15.json
new file mode 100644
index 00000000..02a55657
--- /dev/null
+++ b/frontend/src/i18n/locales/da/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "omtrentlig, ud fra empiriske ladninger",
+ "1": "{0} stereocentre eller dobbeltbindinger var uspecificerede; én konfiguration blev valgt.",
+ "2": "{0} stereomærker i tegningen gengives ikke i 3D.",
+ "3": "Det tegnede medlem af den eller de udvidede stereogrupper {0} blev bygget; 3D-modellen er ét stereoisomer af den blanding (relativ eller racemisk), som tegningen beskriver.",
+ "4": "Indlejret {0} gange (seeds {1}) for at bevare den tegnede stereo.",
+ "5": "{0} par tunge atomer er tættere på hinanden end {1} af deres van der Waals-kontakt.",
+ "6": "Universelt kraftfelt brugt: {0}.",
+ "7": "ingen {0}-parametre for {1}",
+ "8": "{0} kunne ikke typebestemme alle atomer",
+ "9": "{0} konformere ændrede den tegnede stereo under minimeringen og blev udeladt.",
+ "10": "Mere end 300 tunge atomer: kvaliteten af konformerudvælgelsen falder ved denne størrelse.",
+ "11": "Den centrale binding sidder i en ring; ringen spændes for at følge vinklen.",
+ "12": "Strukturen havde ingen 3D-koordinater; scanningen startede fra en ny indlejring.",
+ "13": "Strukturen ændrede sig, mens 3D blev beregnet; kør kommandoen igen.",
+ "14": "Tegningen har intet objekt {0}.",
+ "15": "{0} har endnu ingen 3D-koordinater; byg først 3D.",
+ "16": "{0} har ingen konformer {1}.",
+ "17": "Strukturen har ingen atomer.",
+ "18": "3D kræver rigtige atomer: {0} atomer er etiketter, R-grupper eller bindingspunkter ({1}).",
+ "19": "Hydrogener kunne ikke tilføjes: {0}",
+ "20": "Strukturen har {0} atomer med hydrogener; 3D håndterer op til {1}.",
+ "21": "3D-koordinaterne passer ikke til denne struktur (intet til {0}); byg 3D igen.",
+ "22": "3D-koordinaterne passer ikke til denne struktur (antallet af hydrogener er ændret); byg 3D igen.",
+ "23": "Strukturen kunne ikke indlejres i 3D: {0}",
+ "24": "Strukturen kunne ikke indlejres i 3D; kontrollér dens valenser og stereo.",
+ "25": "Konformere kunne ikke indlejres: {0}",
+ "26": "Ingen konformer kunne indlejres; kontrollér strukturens valenser og stereo.",
+ "27": "Hver indlejret konformer mistede den tegnede stereo efter minimeringen.",
+ "28": "Intet kraftfelt har parametre til denne struktur ({0}).",
+ "29": "Det universelle kraftfelt kunne ikke sættes op: {0}",
+ "30": "Det universelle kraftfelt kunne ikke sættes op.",
+ "31": "Ukendte atomer {0}; brug fragmentets atom-id'er eller et hydrogen som a1:h0.",
+ "32": "De fire atomer skal være forskellige.",
+ "33": "De fire atomer skal danne en kæde af bindinger (a1-a2-a3-a4).",
+ "34": "3D-filen kunne ikke skrives: {0}",
+ "35": "Filen er ikke en PDB-, mmCIF-, SDF- eller MOL-fil, som FormChem kan læse.",
+ "36": "Filen har mere end {0} atomer.",
+ "37": "PDB-filen har ingen ATOM- eller HETATM-poster.",
+ "38": "mmCIF-tabellen atom_site har ikke kolonnerne Cartn_x, Cartn_y og Cartn_z.",
+ "39": "CIF-filen har brøkkoordinater, men ingen fuldstændig enhedscelle.",
+ "40": "CIF-filen har ingen atom_site-tabel.",
+ "41": "CIF-filen har ingen læsbare atomer.",
+ "42": "Filen har ingen poster.",
+ "43": "Filen har {0} poster; 3D-import læser op til {1}.",
+ "44": "Ingen post i filen kunne læses.",
+ "45": "{0} er ikke en PDB- eller mmCIF-fil.",
+ "46": "{0} kunne ikke omdannes til en FormChem-tegning: {1}.",
+ "47": "PDB-model placeret som 3D-objekt: {0}.",
+ "48": "mmCIF-model placeret som 3D-objekt: {0}.",
+ "49": "{0} ATOM- eller HETATM-linjer havde ulæselige koordinater og blev sprunget over.",
+ "50": "{0} atom_site-rækker havde ulæselige koordinater og blev sprunget over.",
+ "51": "CIF for små molekyler: den asymmetriske enhed læses fra brøkkoordinater; symmetriske partnere dannes ikke.",
+ "52": "{0} har valensproblemer; den blev læst uden sanering.",
+ "53": "{0} har kun 2D-koordinater; ingen konformer blev beholdt.",
+ "54": "{0} hydrogener var ikke i filen og blev placeret ud fra geometrien.",
+ "55": "{0} kunne ikke læses: {1}",
+ "56": "{0} kunne ikke læses.",
+ "57": "Post {0}",
+ "58": "Strukturen",
+ "59": "Filens 3D-koordinater blev beholdt som konformer af 1 struktur; Byg 3D er ikke nødvendigt for at se dem.",
+ "60": "Filens 3D-koordinater blev beholdt som konformer af {0} strukturer; Byg 3D er ikke nødvendigt for at se dem.",
+ "61": "{0} er en enkelt ion; der er ingen struktur at udtrække.",
+ "62": "Atomerne i {0} kunne ikke læses.",
+ "63": "Ingen ligand {0} i strukturen; ligander: {1}.",
+ "64": "Tegningen har ingen 3D-model {0}.",
+ "65": "FormChem placerer PNG-, JPEG-, GIF-, WebP- og SVG-billeder, JCAMP-DX-spektre samt PDB-, mmCIF-, SDF- og MOL-strukturfiler."
+}
diff --git a/frontend/src/i18n/locales/de/part12.json b/frontend/src/i18n/locales/de/part12.json
new file mode 100644
index 00000000..4e947e4d
--- /dev/null
+++ b/frontend/src/i18n/locales/de/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spektrum",
+ "1": "Zeichne oder wähle eine Struktur zum Benennen.",
+ "2": "Namen konnten nicht berechnet werden",
+ "3": "FormChem hat keinen Namen für diese Struktur.",
+ "4": "Namen kopieren",
+ "5": "Name kopiert: {0}",
+ "6": "Einzufügender chemischer Name; weglassen, um den Dialog zu öffnen",
+ "7": "Kopiert den Namen der ausgewählten Struktur (oder der Strukturen auf der Seite) als reinen Text: den Trivialnamen, wenn FormChem einen kennt, sonst den systematischen Namen, der nur angeboten wird, wenn er sich wieder in dieselbe Struktur zurücklesen lässt.",
+ "8": "trivial oder systematic, um den zu kopierenden Namen zu wählen; weglassen für den ersten",
+ "9": "Das vorhergesagte Spektrum ist aktuell.",
+ "10": "Vorhergesagtes Spektrum aktualisieren",
+ "11": "Wähle zuerst eine Struktur aus",
+ "12": "Wähle zuerst ein vorhergesagtes Spektrum aus",
+ "13": "Vorhergesagtes 1H-NMR-Spektrum hinzugefügt ({0})",
+ "14": "Vorhergesagtes 13C-NMR-Spektrum hinzugefügt ({0})",
+ "15": "Vorhergesagtes Spektrum aktualisiert ({0})",
+ "16": "Fragment-ID der Struktur; standardmäßig die ausgewählte Struktur oder die einzige auf der Seite",
+ "17": "Spektrometerfrequenz in MHz (Standard 400 für 1H, 100 für 13C)",
+ "18": "Fügt neben der ausgewählten Struktur ein vorhergesagtes 1H-NMR-Spektrum hinzu, in einem Rückgängig-Schritt: ein Spektrumobjekt, berechnet nach den eigenen Inkrementregeln von FormChem (keine Verschiebungsdatenbank), dessen Multipletts und Integrale mit den Atomen der Struktur verknüpft sind und das nach Methode, Version und Frequenz benannt ist. Die Kurve wird aus der Struktur neu berechnet und nie gespeichert.",
+ "19": "Fügt neben der ausgewählten Struktur ein vorhergesagtes 13C-NMR-Spektrum hinzu, in einem Rückgängig-Schritt: ein Spektrumobjekt, berechnet nach den eigenen Inkrementregeln von FormChem (keine Verschiebungsdatenbank), dessen Peaks mit den Atomen der Struktur verknüpft sind und das nach Methode, Version und Frequenz benannt ist. Die Kurve wird aus der Struktur neu berechnet und nie gespeichert.",
+ "20": "Das Spektrum konnte nicht vorhergesagt werden",
+ "21": "1H-NMR-Spektrum vorhersagen",
+ "22": "13C-NMR-Spektrum vorhersagen",
+ "23": "Berechnet die Multipletts, Integrale oder Peaks eines vorhergesagten Spektrums neu, nachdem sich seine Struktur geändert hat, mit der laufenden Version des Prädiktors, in einem Rückgängig-Schritt; ist es aktuell, ändert sich nichts.",
+ "24": "ID des vorhergesagten Spektrums; standardmäßig das ausgewählte oder das im Spektrum-Editor geöffnete",
+ "25": "Das Spektrum konnte nicht aktualisiert werden",
+ "26": "Keine neuen Peaks in diesem Bereich.",
+ "27": "Ziehe im Spektrum-Editor über einen Bereich, um ihn zu integrieren.",
+ "28": "Peak mit Atomen verknüpfen",
+ "29": "Peak-Verknüpfung lösen",
+ "30": "Y-Achse des Spektrums",
+ "31": "Spektrum aus Datei...",
+ "32": "Spektrum bearbeiten...",
+ "33": "Peaks erkennen",
+ "34": "Integrieren",
+ "35": "Transmission oder Absorbanz",
+ "36": "Spektrum exportieren...",
+ "37": "Wähle zuerst ein Spektrum aus",
+ "38": "kein Spektrum mit der ID {0}",
+ "39": "Peaks erkannt: {0} (bereits vorhanden: {1})",
+ "40": "Peaks erkannt: {0}",
+ "41": "Integrale gibt es nur für NMR-Spektren",
+ "42": "Wähle zuerst im Spektrum-Editor einen Peak, ein Integral oder ein Multiplett aus",
+ "43": "Die Atome müssen alle zu einer Struktur gehören",
+ "44": "Nur IR-, Raman- und UV-Vis-Spektren lassen sich zwischen Transmission und Absorbanz umschalten",
+ "45": "Exportiert: {0}",
+ "46": "ID des Spektrumobjekts; standardmäßig das ausgewählte Spektrum oder das im Spektrum-Editor geöffnete",
+ "47": "Importiert eine JCAMP-DX-Spektrumdatei in die aktive Zeichnung (ein Spektrumobjekt pro Datenblock, die Datei bleibt Byte für Byte erhalten), in einem Rückgängig-Schritt pro Datei. Ohne path öffnet sich ein Dateidialog.",
+ "48": "Absoluter Pfad einer .jdx-, .dx- oder .jcamp-Datei",
+ "49": "Das Spektrum konnte nicht importiert werden",
+ "50": "Öffnet den Spektrum-Editor für das ausgewählte Spektrum (wie ein Doppelklick darauf).",
+ "51": "Das Spektrum konnte nicht geöffnet werden",
+ "52": "Sucht die Peaks eines Spektrums in einem Bereich (standardmäßig der angezeigte Bereich) und fügt sie seiner Peakliste hinzu, wobei bereits vorhandene Peaks übersprungen werden, in einem Rückgängig-Schritt.",
+ "53": "Bereichsanfang in der x-Einheit (cm-1, nm, m/z, ppm)",
+ "54": "Bereichsende in der x-Einheit",
+ "55": "Optionaler Erkennungsschwellenwert in y-Einheiten",
+ "56": "Die Peakliste ersetzen, statt ihr etwas hinzuzufügen",
+ "57": "Peaks konnten nicht erkannt werden",
+ "58": "Fügt ein NMR-Integral über einen Bereich hinzu, skaliert wie die vorhandenen Integrale (oder auf value, wobei die übrigen neu skaliert werden), in einem Rückgängig-Schritt. Ohne from und to schaltet es den Spektrum-Editor auf sein Integrationswerkzeug um.",
+ "59": "Bereichsanfang in ppm",
+ "60": "Bereichsende in ppm",
+ "61": "Wert, den dieses Integral anzeigen soll, zum Beispiel eine Protonenzahl",
+ "62": "Integration nicht möglich",
+ "63": "Verknüpft einen Peak, ein Integral oder ein Multiplett mit Atomen einer Struktur, in einem Rückgängig-Schritt. Ohne atoms verwendet es die ausgewählten Atome oder wartet darauf, dass die Person Atome in der Zeichnung anklickt.",
+ "64": "ID des Peaks, Integrals oder Multipletts; standardmäßig das im Spektrum-Editor ausgewählte",
+ "65": "ID der Struktur (des Fragments), zu der die Atome gehören",
+ "66": "Atom-IDs",
+ "67": "Der Peak konnte nicht verknüpft werden",
+ "68": "Entfernt die Atomverknüpfung eines Peaks, Integrals oder Multipletts, in einem Rückgängig-Schritt.",
+ "69": "Die Peak-Verknüpfung konnte nicht gelöst werden",
+ "70": "Zeigt ein IR-, Raman- oder UV-Vis-Spektrum als Transmission oder Absorbanz (ohne mode wird umgeschaltet), in einem Rückgängig-Schritt.",
+ "71": "Anzuzeigende Y-Achse; weglassen zum Umschalten",
+ "72": "Die Y-Achse konnte nicht geändert werden",
+ "73": "Speichert ein Spektrum über die Engine als JCAMP-DX (mit seiner Peaktabelle, wenn es Peaks hat) oder als CSV mit allen Punkten.",
+ "74": "Dateiformat, Standard jdx",
+ "75": "Bei jdx: die importierte Originaldatei unverändert",
+ "76": "Absoluter Pfad zum Schreiben; weglassen, um nachzufragen",
+ "77": "Das Spektrum konnte nicht exportiert werden",
+ "78": "Spektrum aus Datei einfügen",
+ "79": "Die Datei enthält kein Spektrum, das FormChem zeichnen kann",
+ "80": "Spektrum einfügen",
+ "81": "Das Spektrum konnte nicht platziert werden: Seine Datei hat die Zeichnung nicht erreicht.",
+ "82": "Eingefügte Spektren: {0}",
+ "83": "Wellenlänge (µm)",
+ "84": "Wellenzahl (cm⁻¹)",
+ "85": "Raman-Verschiebung (cm⁻¹)",
+ "86": "Wellenlänge (nm)",
+ "87": "Frequenz (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmission (%)",
+ "90": "Transmission",
+ "91": "Absorbanz",
+ "92": "Relative Häufigkeit (%)",
+ "93": "Intensität",
+ "94": "{0}-NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Vorhergesagt: {0}, {1} MHz ({2})",
+ "100": "Vorhergesagt: {0}, {1} MHz",
+ "101": "Vorhergesagt: {0} ({1})",
+ "102": "Vorhergesagt: {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spektrum nicht verfügbar: {0}",
+ "105": "Spektrum wird geladen",
+ "106": "Trivialname",
+ "107": "Systematisch",
+ "108": "Hohe Sicherheit",
+ "109": "Mittlere Sicherheit",
+ "110": "Geringe Sicherheit",
+ "111": "Nicht gelesen",
+ "112": "FormChem-Namen",
+ "113": "Der Name konnte nicht gelesen werden",
+ "114": "Struktur aus Namen einfügen",
+ "115": "Struktur aus Namen",
+ "116": "Ein Name, etwa Aspirin oder 2-Methylpropan-1-ol",
+ "117": "Chemischer Name",
+ "118": "Gib einen Namen ein, um seine Struktur zu sehen.",
+ "119": "Keine Struktur für diesen Namen",
+ "120": "Wörterbuch",
+ "121": "Systematischer Parser",
+ "122": "Regelbasierter Namensgeber, per Rückumwandlung geprüft",
+ "123": "Spektrumwerkzeuge",
+ "124": "Das ganze Spektrum anzeigen",
+ "125": "Y-Achse",
+ "126": "Diesen Bereich auf der Seite anzeigen",
+ "127": "Doppelklicke in der Zeichnung auf ein Spektrum, um es hier zu bearbeiten.",
+ "128": "Peaks und Integrale",
+ "129": "Vorhergesagt",
+ "130": "Integralwert",
+ "131": "Mit Atomen verknüpfen",
+ "132": "Lösen",
+ "133": "1 Atom",
+ "134": "Zu verknüpfende Atome",
+ "135": "Klicke weitere Atome an und dann auf Fertig.",
+ "136": "Klicke in der Zeichnung die Atome an, die zu diesem Peak gehören, und dann auf Fertig.",
+ "137": "In diesem Bereich gibt es nichts zu integrieren.",
+ "138": "Peak entfernen",
+ "139": "Peak hinzufügen",
+ "140": "Mit 1 Atom verknüpft",
+ "141": "Spektrumbereich festlegen",
+ "142": "Gib eine positive Zahl ein.",
+ "143": "Das Integral konnte nicht festgelegt werden",
+ "144": "Verschieben und Zoomen: ziehen zum Verschieben, Mausrad zum Zoomen, Shift-Ziehen zum Zoomen auf einen Bereich",
+ "145": "Auf einen Bereich zoomen: über das Diagramm ziehen",
+ "146": "Peaks erkennen: über einen Bereich ziehen",
+ "147": "Peak hinzufügen oder entfernen: in die Nähe eines Peaks klicken",
+ "148": "Integrieren: über einen Bereich ziehen",
+ "149": "Peak",
+ "150": "Integral",
+ "151": "Multiplett",
+ "152": "{0} Atome",
+ "153": "Verknüpft mit {0}",
+ "154": "Ziehen zum Verschieben, Mausrad zum Zoomen, Shift-Ziehen zum Zoomen auf einen Bereich. Klicke auf eine Beschriftung, um sie auszuwählen.",
+ "155": "Ziehe über das Diagramm, um auf diesen Bereich zu zoomen.",
+ "156": "Ziehe über einen Bereich, um seine Peaks zu erkennen.",
+ "157": "Klicke in die Nähe eines Peaks, um ihn hinzuzufügen; klicke auf eine Peakbeschriftung, um ihn zu entfernen.",
+ "158": "Ziehe über einen Bereich, um ihn zu integrieren.",
+ "159": "Mit {0} Atomen verknüpft"
+}
diff --git a/frontend/src/i18n/locales/de/part13.json b/frontend/src/i18n/locales/de/part13.json
new file mode 100644
index 00000000..c2a85949
--- /dev/null
+++ b/frontend/src/i18n/locales/de/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "die Engine hat eine leere Datei zurückgegeben",
+ "1": "der Name ist länger als {0} Zeichen",
+ "2": "Fragmente mit mehr als {0} Atomen werden nicht benannt",
+ "3": "Die Struktur enthält Beschriftungen, R-Reste oder beliebige Atome, die keinen Namen haben.",
+ "4": "Die Struktur konnte nicht als Molekül gelesen werden (Valenzen prüfen).",
+ "5": "Es gibt keine Struktur zum Benennen.",
+ "6": "Namen mit umgekehrter Reihenfolge (zuerst die Stammverbindung, dann ein Komma und die Substituenten) werden nicht gelesen; schreibe den Namen in der normalen Reihenfolge, etwa 1,2-Dichlorbenzol.",
+ "7": "D- und L- werden nur für die Aminosäuren und Zucker im Wörterbuch von FormChem gelesen; gib für andere Namen R- oder S-Deskriptoren an.",
+ "8": "FormChem hat den ganzen Namen gelesen, aber er ergibt keinen vollständigen Strukturnamen (eine Stammverbindung wie Hexan oder Benzol oder ein Suffix fehlt möglicherweise).",
+ "9": "FormChem konnte den Namen ab Zeichen {0} (\"{1}\") nicht lesen.",
+ "10": "FormChem hat den Namen gelesen, aber {0}.",
+ "11": "die Struktur konnte nicht vervollständigt werden",
+ "12": "Der Name lässt sich auf mehr als eine Weise lesen; FormChem hat die Lesart mit den wenigsten Annahmen gezeichnet.",
+ "13": "Der Name enthält keine Stereodeskriptoren, daher werden Stereozentren und Doppelbindungen unspezifiziert gezeichnet.",
+ "14": "Kein systematischer Name: {0}.",
+ "15": "Der von FormChem gebildete systematische Name ließ sich nicht in dieselbe Struktur zurücklesen und wird deshalb nicht angezeigt.",
+ "16": "diese Doppelbindung kann nicht E oder Z sein",
+ "17": "der Deskriptor-Lokant {0} ist keine Position der Stammverbindung",
+ "18": "an Position {0} beginnt keine Doppelbindung, die E oder Z sein kann",
+ "19": "{0} braucht genau eine Doppelbindung, die cis oder trans sein kann; diese Struktur hat {1}",
+ "20": "{0} ist für diese Doppelbindung unklar; gib stattdessen E oder Z an",
+ "21": "({0}) braucht einen Lokanten: Die Struktur hat {1} Stereozentren",
+ "22": "Position {0} ist kein Stereozentrum, daher kann ({1}) nicht angewendet werden",
+ "23": "({0}) braucht einen Lokanten: Die Struktur hat {1} Doppelbindungen, die E oder Z sein können",
+ "24": "Position {0} kann nicht mit diesem Deskriptor versehen werden: {1}",
+ "25": "diese Doppelbindung kann nicht mit diesem Deskriptor versehen werden: {0}",
+ "26": "{0} sagt nicht, welche Konfiguration gemeint ist, daher wird die Struktur ohne Stereochemie gezeichnet.",
+ "27": "{0} hat keine Anknüpfungsstelle",
+ "28": "es ist kein Platz für {0} an {1}",
+ "29": "{0} kann dort nicht binden",
+ "30": "Ketten mit mehr als {0} Kohlenstoffatomen werden noch nicht gelesen",
+ "31": "{0} ist zu klein für einen Ring",
+ "32": "{0}-{1} ist ein Tautomer, das FormChem noch nicht aus einem Namen zeichnet",
+ "33": "der Lokant {0} ist keine Position von {1}",
+ "34": "{0} ist keine Kettenposition",
+ "35": "eine Mehrfachbindung kann dort nicht beginnen: Position {0} von {1}",
+ "36": "Position {0} von {1} kann diese Mehrfachbindung nicht tragen",
+ "37": "es ist kein Platz für eine Mehrfachbindung an Position {0} von {1}",
+ "38": "es ist kein Platz für die Mehrfachbindungen von {0}",
+ "39": "Die Positionen der Mehrfachbindungen von {0} wurden nicht angegeben; an den niedrigsten Positionen gezeichnet.",
+ "40": "-{0} braucht eine offene Kette; an einem Ring lautet das Suffix Carbaldehyd, Carbonsäure, Carbonitril oder Carboxamid",
+ "41": "eine Kette hat nur zwei Enden für -{0}",
+ "42": "{0} ist zu kurz für zwei -{1}-Gruppen",
+ "43": "es ist kein Platz für -{0} an {1}",
+ "44": "Die Position von -{0} an {1} wurde nicht angegeben; an der niedrigsten Position gezeichnet.",
+ "45": "-{0} muss am Kettenende stehen, nicht an {1}",
+ "46": "es ist kein Platz für -{0} an {1}",
+ "47": "ortho, meta und para brauchen einen Benzolring",
+ "48": "ortho, meta oder para mit einer einzelnen Gruppe braucht eine Stammverbindung wie Phenol, Anilin oder Toluol",
+ "49": "es ist kein Platz für {0} an {1}",
+ "50": "es ist kein Platz für {0} {1}-Gruppen an {2}",
+ "51": "Die Position von {0} an {1} wurde nicht angegeben; an der niedrigsten freien Position gezeichnet.",
+ "52": "{0} kann keine Substituenten tragen",
+ "53": "eine Acylgruppe wird an ihrem Carbonyl-Kohlenstoff angeknüpft",
+ "54": "{0} hat keine freie Position",
+ "55": "Die Anknüpfungsposition von {0} wurde nicht angegeben; Position {1} angenommen.",
+ "56": "{0} hat keinen Platz mehr zum Anknüpfen",
+ "57": "die Lokanten {0} vor {1} werden nicht verwendet",
+ "58": "{0} kann nicht als eigenes Wort stehen",
+ "59": "\"{0}\" braucht {1} Gruppe davor, der Name nennt als Anzahl: {2}",
+ "60": "\"{0}\" braucht {1} Gruppen davor, der Name nennt als Anzahl: {2}",
+ "61": "der Name gibt {0} Alkylgruppe für {1} Esterposition an",
+ "62": "der Name gibt {0} Alkylgruppe für {1} Esterpositionen an",
+ "63": "der Name gibt {0} Alkylgruppen für {1} Esterposition an",
+ "64": "der Name gibt {0} Alkylgruppen für {1} Esterpositionen an",
+ "65": "die beschriebene Struktur ist nicht gültig ({0})",
+ "66": "-on an {0} wäre ein Aldehyd; ein Aldehyd wird mit -al benannt",
+ "67": "Position {0} von {1}",
+ "68": "zu viele identische Substituenten",
+ "69": "gemischte Lokanten",
+ "70": "ungewöhnliche Bindungstypen werden noch nicht benannt",
+ "71": "ein Ringsystem, das FormChem noch nicht benennen kann",
+ "72": "aromatische Ringe mit exocyclischen Doppelbindungen (etwa Pyridone) werden noch nicht benannt",
+ "73": "Isotope und Radikale werden noch nicht benannt",
+ "74": "hypervalente Halogene werden nicht benannt",
+ "75": "geladene Stickstoffgruppen außer Nitro werden noch nicht benannt",
+ "76": "geladene Atome werden noch nicht benannt",
+ "77": "Oxide von Schwefel, Stickstoff und Phosphor werden noch nicht benannt",
+ "78": "diese Sauerstoffgruppe wird noch nicht benannt",
+ "79": "Sulfoxide, Sulfone und andere Schwefelgruppen werden noch nicht benannt",
+ "80": "Imine, Azo- und ähnliche Stickstoffgruppen werden noch nicht benannt",
+ "81": "{0} wird noch nicht benannt",
+ "82": "Substituentenketten mit mehr als 20 Kohlenstoffatomen werden nicht benannt",
+ "83": "ungesättigte Acylgruppen werden noch nicht benannt",
+ "84": "substituierte Ylidengruppen werden noch nicht benannt",
+ "85": "Ring-Ylidengruppen werden noch nicht benannt",
+ "86": "zweifach angeknüpfte Ringe werden noch nicht benannt",
+ "87": "keine Nummerierung für einen Ringsubstituenten gefunden",
+ "88": "Ester mit verschiedenen Alkoholteilen werden noch nicht benannt",
+ "89": "keine Stammkette und kein Stammring gefunden",
+ "90": "cyclische Ester (Lactone) werden noch nicht benannt",
+ "91": "Substituenten an mehr als einem Amin- oder Amidstickstoff werden noch nicht benannt",
+ "92": "Stereozentren außerhalb der Stammkette oder des Stammrings werden noch nicht benannt",
+ "93": "die Doppelbindungsgeometrie außerhalb der Stammkette wird noch nicht benannt",
+ "94": "pseudoasymmetrische Zentren werden noch nicht benannt",
+ "95": "diese Doppelbindungsgeometrie wird noch nicht benannt",
+ "96": "Ketten mit mehr als 20 Kohlenstoffatomen werden nicht benannt",
+ "97": "zu viele identische Gruppen",
+ "98": "die Struktur hat Valenzfehler",
+ "99": "Salze und Gemische werden noch nicht systematisch benannt",
+ "100": "Strukturen mit mehr als {0} Nicht-Wasserstoff-Atomen werden noch nicht systematisch benannt",
+ "101": "Verbindungen von {0} werden noch nicht systematisch benannt",
+ "102": "Query-Atome und R-Reste haben keinen Namen",
+ "103": "Hydride einzelner Heteroatome werden nur aus dem Wörterbuch benannt",
+ "104": "{0} ist kein Objekt dieser Zeichnung.",
+ "105": "{0} hat keine Atome.",
+ "106": "Das Fragment hat keine Atome.",
+ "107": "Die Zeichnung hat keine Seite.",
+ "108": "{0} ist kein Spektrum dieser Zeichnung.",
+ "109": "Die Struktur {0}, zu der diese Vorhersage gehört, ist nicht mehr in der Zeichnung.",
+ "110": "Die Zeichnung {0} wurde geschlossen.",
+ "111": "Chemische Verschiebung (ppm)",
+ "112": "Zeit (s)",
+ "113": "Reflexion",
+ "114": "Relative Häufigkeit",
+ "115": "##{0}= kommt mehr als einmal vor; der erste Wert wurde beibehalten.",
+ "116": "##XYDATA={0} ist keine bekannte Variablenliste; sie wurde als (X++(Y..Y)) gelesen.",
+ "117": "##{0}={1} ist keine bekannte Variablenliste; sie wurde als (XY..XY) gelesen.",
+ "118": "Die Punkte lagen nicht in x-Reihenfolge und wurden sortiert.",
+ "119": "##.SHIFT REFERENCE={0} konnte nicht gelesen werden; die Verschiebungen wurden nicht referenziert.",
+ "120": "##.SHIFT REFERENCE nennt Punkt {0}, außerhalb der {1} Punkte; die Verschiebungen wurden nicht referenziert.",
+ "121": "Die Verschiebungen wurden so referenziert, dass Punkt {0} {1} ppm ({2}) anzeigt.",
+ "122": "Die Datei nennt den beobachteten Kern nicht.",
+ "123": "Dies sind NMR-Daten der Zeitdomäne (ein FID); sie werden wie aufgenommen ohne Fourier-Transformation angezeigt.",
+ "124": "Frequenzen in Hz wurden durch die Beobachtungsfrequenz ({0} MHz) geteilt, um ppm zu erhalten.",
+ "125": "Es gibt keine ##.SHIFT REFERENCE; 0 Hz wurde als 0 ppm angenommen.",
+ "126": "Es gibt keine ##.OBSERVE FREQUENCY, daher bleibt die Verschiebungsachse in Hz.",
+ "127": "Die Transmission war als Bruchteil gespeichert und wird in Prozent angezeigt.",
+ "128": "Block {0} enthält mehr als {1} Punkte.",
+ "129": "##DATA TYPE={0} mit den x-Einheiten {1} nennt keine bekannte Technik; es wird als einfaches Spektrum gezeichnet.",
+ "130": "##BLOCKS={0}, aber der LINK-Block enthält {1} Blöcke; alle gefundenen Blöcke wurden gelesen.",
+ "131": "Dies ist keine JCAMP-DX-Datei: Sie hat keinen ##TITLE=-Eintrag.",
+ "132": "Die Datei enthält {0} Blöcke hintereinander ohne LINK-Block; jeder wurde gelesen.",
+ "133": "Zwei Blöcke haben dieselbe ##BLOCK_ID.",
+ "134": "Die Datei enthält kein Spektrum, das FormChem zeichnen kann ({0}).",
+ "135": "Block \"{0}\" wurde nicht gezeichnet: {1}.",
+ "136": "ein Strukturblock (JCAMP-CS); er bleibt in der Datei erhalten, wird aber nicht gezeichnet",
+ "137": "er enthält kein XYDATA, XYPOINTS, PEAK TABLE oder NTUPLES",
+ "138": "seine Datentabelle enthält keine Punkte",
+ "139": "seine NTUPLES-Tabelle deklariert keine Symbole",
+ "140": "2D-NTUPLES-Spektren werden noch nicht unterstützt",
+ "141": "seine NTUPLES-Tabelle hat keine lesbaren Seiten",
+ "142": "Die Datei enthält Zeichen außerhalb von ASCII; sie wurde als UTF-8 gelesen.",
+ "143": "Die Datei enthält Bytes, die weder ASCII noch UTF-8 sind; sie wurde als Latin-1 gelesen.",
+ "144": "Zeilen außerhalb eines beschrifteten Datensatzes wurden ignoriert.",
+ "145": "Ein ##END= ohne vorherigen Block wurde ignoriert.",
+ "146": "Einträge vor dem ersten ##TITLE= oder nach dem letzten ##END= wurden ignoriert.",
+ "147": "Die Datei endet ohne ##END=; die offenen Blöcke wurden geschlossen.",
+ "148": "NTUPLES-Seite {0}",
+ "149": "NTUPLES-Seite {0} hat kein ##DATA TABLE=; sie wurde übersprungen.",
+ "150": "NTUPLES-Seite {0} verwendet Symbole ({1}), die in ##SYMBOL= nicht deklariert sind; sie wurde übersprungen.",
+ "151": "{0} hat eine Datentabellenform, die FormChem nicht liest ({1}); sie wurde übersprungen.",
+ "152": "Die NTUPLES-Tabelle hat kein ##END NTUPLES=; sie wurde bis zum Ende des Blocks gelesen.",
+ "153": "Die NTUPLES-Tabelle hat keine ##SYMBOL=-Liste.",
+ "154": "Dies ist ein 2D-Spektrum (zwei unabhängige Variablen); 2D-Spektren werden in dieser Version nicht gezeichnet.",
+ "155": "Die NTUPLES-Tabelle hat {0} Seiten; nur die ersten {1} wurden gelesen.",
+ "156": "Die Imaginärseite hat nicht dieselben x-Werte wie die Realseite; sie wurde weggelassen.",
+ "157": "Die NTUPLES-Tabelle enthält {0} Seiten; Seite {1} wird angezeigt, {2} weitere Seiten wurden weggelassen.",
+ "158": "##DELTAX={0} weicht von (LASTX - FIRSTX) / (NPOINTS - 1) = {1} ab; der berechnete Abstand wird verwendet.",
+ "159": "{0} hat kein vollständiges FIRSTX, LASTX und NPOINTS; der Abstand stammt aus ##DELTAX.",
+ "160": "Eine Datenzeile begann mit einem DIF-Wert; sie setzt sich vom letzten Wert der vorherigen Zeile fort.",
+ "161": "Ein Y-Prüfwert stimmte nicht mit dem letzten Wert der vorherigen Zeile überein; die Zeile wurde vom früheren Wert aus fortgesetzt.",
+ "162": "{0} Zeichen in {1} konnten nicht gelesen werden und wurden übersprungen.",
+ "163": "Auf {0} DIF-Zeilen folgte kein Y-Prüfwert.",
+ "164": "{0} enthält keine Datenpunkte.",
+ "165": "{0} enthält {1} Punkte, aber ##NPOINTS={2}; die X-Werte der Zeilen passen zu {3} Punkten von FIRSTX bis LASTX, daher wurde dieser Abstand verwendet.",
+ "166": "{0} enthält {1} Punkte, aber ##NPOINTS={2}; die gelesenen Punkte wurden beibehalten.",
+ "167": "Der X-Wert einer Zeile stimmt nicht mit ihrer Position ab FIRSTX und dem Abstand überein; die Position wurde verwendet.",
+ "168": "{0} hat kein FIRSTX, LASTX und NPOINTS; der Abstand wurde aus den X-Werten der Zeilen übernommen.",
+ "169": "{0} gibt keine Möglichkeit an, seine Punkte auf der x-Achse zu platzieren; sie wurden mit 0, 1, 2 und so weiter nummeriert.",
+ "170": "Die erste Zeile beginnt bei x = {0}, aber ##FIRSTX={1}; FIRSTX wurde verwendet.",
+ "171": "Der erste Y-Wert {0} passt nicht zu ##FIRSTY={1}.",
+ "172": "{0} endet mit einer unvollständigen Gruppe von {1} Werten; sie wurde verworfen.",
+ "173": "{0} konnte nicht gelesen werden: {1}.",
+ "174": "Das Spektrum verlangt Block {0}, aber seine Datei enthält 1 Block.",
+ "175": "Das Spektrum verlangt Block {0}, aber seine Datei enthält {1} Blöcke.",
+ "176": "Das Spektrum hat keine Quelle.",
+ "177": "Die Datei {0} des Spektrums ist nicht in der Zeichnung.",
+ "178": "In dieser Engine ist kein Prädiktor für {0} verfügbar.",
+ "179": "Die Vorhersage ist fehlgeschlagen: {0}",
+ "180": "Die Quelle des Spektrums ist weder eine Datei noch eine Vorhersage.",
+ "181": "Die Zeichnung hat kein Spektrum {0}.",
+ "182": "Strichspektren haben keine Flächen zum Integrieren.",
+ "183": "der Wert muss größer als null sein.",
+ "184": "from und to müssen zwei verschiedene x-Werte sein.",
+ "185": "Das Spektrum hat kein Integral {0}.",
+ "186": "Dieses Spektrum hat keine Originaldatei; exportiere es ohne original=1.",
+ "187": "FormChem platziert PNG-, JPEG-, GIF-, WebP- und SVG-Bilder sowie JCAMP-DX-Spektren."
+}
diff --git a/frontend/src/i18n/locales/de/part14.json b/frontend/src/i18n/locales/de/part14.json
new file mode 100644
index 00000000..1b7f8045
--- /dev/null
+++ b/frontend/src/i18n/locales/de/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Anzeige",
+ "1": "Oberfläche",
+ "2": "Nichts zu exportieren: Die 3D-Ansicht ist leer.",
+ "3": "Export fehlgeschlagen",
+ "4": "Wähle eine Struktur aus, die in 3D angezeigt werden soll.",
+ "5": "3D erstellen",
+ "6": "3D-Ansicht einfügen",
+ "7": "Wähle eine PDB-, mmCIF-, SDF- oder MOL-Datei aus.",
+ "8": "Die 3D-Struktur konnte nicht auf der Seite platziert werden",
+ "9": "Wähle ein 3D-Objekt aus, das aus einer PDB- oder mmCIF-Datei geöffnet wurde.",
+ "10": "Dieses Modell hat keine Liganden.",
+ "11": "Der Ligand konnte nicht extrahiert werden",
+ "12": "Noch keine 3D-Koordinaten: 3D erstellen erzeugt aus der Zeichnung ein Konformer.",
+ "13": "3D-Strukturdatei...",
+ "14": "Ligand extrahieren...",
+ "15": "3D-Struktur exportieren...",
+ "16": "Diederwinkel-Scan...",
+ "17": "In 3D messen",
+ "18": "3D-Ansicht als PNG exportieren...",
+ "19": "3D-Ansicht als glTF exportieren...",
+ "20": "Extrahiert {0}: {1} (Bindungsordnungen abgeleitet)",
+ "21": "Extrahiert {0}: {1}",
+ "22": "Öffne zuerst die 3D-Ansicht",
+ "23": "Öffnet den Bereich 3D-Ansicht für die ausgewählte Struktur (oder das ausgewählte 3D-Objekt auf der Seite) und folgt der Auswahl. Eine Struktur braucht zuerst 3D-Koordinaten: 3D erstellen erzeugt sie.",
+ "24": "Erstellt aus der 2D-Zeichnung ein 3D-Konformer der ausgewählten Struktur (Keile, Doppelbindungsgeometrie und Ladungen bleiben erhalten), minimiert es mit dem gewählten Kraftfeld und speichert es in einem Rückgängig-Schritt in der Zeichnung; die 3D-Ansicht zeigt es an.",
+ "25": "Minimiert das angezeigte Konformer der ausgewählten Struktur mit dem in der 3D-Ansicht gewählten Kraftfeld (standardmäßig MMFF94, UFF, wenn MMFF94 keine Parameter hat) und meldet die Energie davor und danach, in einem Rückgängig-Schritt.",
+ "26": "Erzeugt ein Konformerensemble der ausgewählten Struktur (ETKDG, nach RMSD bereinigt, jedes minimiert) und behält die innerhalb eines Energiefensters; mit n, window und method läuft es ohne Dialog.",
+ "27": "Zu erzeugende Konformere",
+ "28": "Energiefenster in kcal/mol",
+ "29": "Platziert eine 3D-Ansicht der ausgewählten Struktur neben ihr auf der Seite (erstellt zuerst 3D-Koordinaten, falls es keine gibt) und öffnet den damit verbundenen Bereich 3D-Ansicht; Drehen oder Umstylen des Modells aktualisiert das Bild auf der Seite.",
+ "30": "Öffnet eine PDB-, mmCIF-, SDF- oder MOL-Datei als 3D-Objekt auf der Seite (Proteine als Cartoon, Liganden als Kugel-Stab, Wasser ausgeblendet, der Ligand im Fokus) und zeigt es in der 3D-Ansicht an.",
+ "31": "Macht einen Liganden des ausgewählten 3D-Objekts (aus einer PDB- oder mmCIF-Datei geöffnet) in einem Rückgängig-Schritt zu einer 2D-Struktur daneben: Bindungsordnungen aus einer eingebauten Vorlage für häufige Liganden, sonst aus der Geometrie abgeleitet und gemeldet; die Dateikoordinaten werden zu seinem Konformer. Mit ligand nimmt es genau diesen; ohne fragt es nach, wenn das Modell mehrere hat.",
+ "32": "Ligandenschlüssel Kette:Het:Nummer oder ein Het-Code",
+ "33": "Wähle ein 3D-Objekt aus, das aus einer PDB- oder mmCIF-Datei geöffnet wurde",
+ "34": "Speichert die 3D-Koordinaten der ausgewählten Struktur mit allen Wasserstoffen: MDL-Molfile (das angezeigte Konformer), SD-Datei (jedes Konformer, mit Energie- und Methodendatenfeldern), PDB oder XYZ (das angezeigte Konformer oder jedes Konformer als Modelle bzw. Frames); ein aus einer PDB- oder mmCIF-Datei geöffnetes 3D-Objekt speichert seine Originaldatei. Ohne format wird nachgefragt.",
+ "35": "Dateiformat",
+ "36": "Jedes Konformer statt des angezeigten (Standard true für sdf)",
+ "37": "Führt einen Scan über den Diederwinkel der vier in der 3D-Ansicht gewählten Atome (oder seiner letzten Diederwinkelmessung) mit relaxierter Minimierung durch und trägt Winkel gegen Energie auf.",
+ "38": "Misst in der 3D-Ansicht einen Abstand (zwei Atome), Winkel (drei) oder Diederwinkel (vier) und listet ihn auf; mit atoms (Fragment-Atom-IDs wie a1, Wasserstoffe als a1:h0, oder PDB-Seriennummern) misst es diese, sonst schaltet es auf Auswählen um.",
+ "39": "Zwei bis vier Atom-IDs",
+ "40": "Speichert die 3D-Ansicht als PNG-Bild in ihrer Bildschirmgröße; transparent lässt den Hintergrund weg.",
+ "41": "Speichert die 3D-Ansicht als binäre glTF-2.0-Datei (.glb): Atome als Kugeln und Bindungen als Zylinder mit Elementfarben, 1 Ångström = 1 cm, für 3D-Betrachter, Folien und Druck.",
+ "42": "Keine Oberfläche",
+ "43": "Entfernt die Moleküloberfläche aus der 3D-Ansicht.",
+ "44": "Van-der-Waals-Oberfläche",
+ "45": "Zeigt die Van-der-Waals-Oberfläche in der 3D-Ansicht an.",
+ "46": "Lösungsmittelzugängliche Oberfläche",
+ "47": "Zeigt die lösungsmittelzugängliche Oberfläche (Sonde 1,4 Ångström) in der 3D-Ansicht an.",
+ "48": "Lösungsmittelausgeschlossene Oberfläche",
+ "49": "Zeigt die lösungsmittelausgeschlossene Oberfläche in der 3D-Ansicht an.",
+ "50": "ESP-Oberfläche",
+ "51": "Färbt die Oberfläche nach einem genäherten elektrostatischen Potenzial aus den empirischen Partialladungen der Engine (rot negativ, blau positiv), mit einer Legende, die die Methode nennt.",
+ "52": "Zeigt die 3D-Ansicht im Drahtmodell; bei einem 3D-Objekt auf der Seite wird die Wahl mit ihm gespeichert.",
+ "53": "Zeigt die 3D-Ansicht im Stabmodell; bei einem 3D-Objekt auf der Seite wird die Wahl mit ihm gespeichert.",
+ "54": "Kugel-Stab",
+ "55": "Zeigt die 3D-Ansicht im Kugel-Stab-Modell; bei einem 3D-Objekt auf der Seite wird die Wahl mit ihm gespeichert.",
+ "56": "Kalottenmodell",
+ "57": "Zeigt die 3D-Ansicht im Kalottenmodell; bei einem 3D-Objekt auf der Seite wird die Wahl mit ihm gespeichert.",
+ "58": "Cartoon",
+ "59": "Zeigt die 3D-Ansicht im Cartoon-Stil (Proteine und Nukleinsäuren; Liganden bleiben Kugel-Stab); bei einem 3D-Objekt auf der Seite wird die Wahl mit ihm gespeichert.",
+ "60": "Diederwinkel (Grad)",
+ "61": "Relative Energie (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "3D-Struktur exportieren",
+ "64": "Jedes Konformer (SDF-Datensätze, PDB-Modelle, XYZ-Frames)",
+ "65": "1 Konformer gespeichert; jeder Wasserstoff wird mit seiner 3D-Position geschrieben.",
+ "66": "Ligand extrahieren",
+ "67": "Ligand",
+ "68": "Der Ligand wird zu einer 2D-Struktur neben dem Modell, wobei seine Koordinaten aus der Datei als sein Konformer erhalten bleiben.",
+ "69": "Extrahieren",
+ "70": "SD-Datei (.sdf)",
+ "71": "MDL-Molfile (.mol)",
+ "72": "{0} Konformere gespeichert; jeder Wasserstoff wird mit seiner 3D-Position geschrieben.",
+ "73": "Konformere",
+ "74": "Energiefenster (kcal/mol)",
+ "75": "ETKDG-Einbettung mit festem Seed, nahezu doppelte Konformere bei 0,5 Å RMSD der Schweratome bereinigt, jedes minimiert; das energieärmste wird zum angezeigten Konformer.",
+ "76": "Erzeugen",
+ "77": "Energieprofil des Diederwinkel-Scans",
+ "78": "Diederwinkel-Scan",
+ "79": "Von (Grad)",
+ "80": "Bis (Grad)",
+ "81": "Schritt (Grad)",
+ "82": "Jeden Punkt als Konformer behalten (ein Rückgängig-Schritt)",
+ "83": "Scan starten",
+ "84": "Ein relaxierter Scan: Bei jedem Winkel wird der Diederwinkel festgehalten und alles andere minimiert.",
+ "85": "Der Endwinkel muss größer sein als der Startwinkel.",
+ "86": "Scan läuft...",
+ "87": "Scan fehlgeschlagen",
+ "88": "Barriere {0} kcal/mol",
+ "89": "Anzeigestil",
+ "90": "Oberfläche nach dem elektrostatischen Potenzial aus empirischen Partialladungen einfärben",
+ "91": "ESP",
+ "92": "Minimieren",
+ "93": "Scan...",
+ "94": "Ligand fokussieren",
+ "95": "Ansicht zurücksetzen",
+ "96": "Drehen",
+ "97": "3D-Ansicht exportieren",
+ "98": "Messen",
+ "99": "Messungen",
+ "100": "PNG-Bild",
+ "101": "PNG-Bild, transparent",
+ "102": "glTF Binär (.glb)",
+ "103": "3D braucht WebGL, das dieses Fenster nicht bietet.",
+ "104": "3D-Betrachter wird geladen...",
+ "105": "Der 3D-Betrachter konnte nicht geladen werden",
+ "106": "Öffne eine Zeichnung und wähle eine Struktur aus, um sie in 3D zu sehen.",
+ "107": "Wähle eine Struktur auf der Seite aus, um sie in 3D zu sehen.",
+ "108": "Die 3D-Struktur konnte nicht gelesen werden",
+ "109": "Dieses Konformer kann nicht als Molfile geschrieben werden",
+ "110": "Drehen ist aus: Das System verlangt reduzierte Bewegung",
+ "111": "Ein PDB- oder CIF-Modell hat keine Konformere.",
+ "112": "Energien relativ zum niedrigsten; klicke auf eines, um es anzuzeigen.",
+ "113": "3D erstellen oder Konformere... füllt diese Liste.",
+ "114": "Partialladungen nicht verfügbar",
+ "115": "die Engine hat noch keine 3D-Routen",
+ "116": "nicht konvergiert",
+ "117": "Wähle vier hintereinander gebundene Atome (einen Diederwinkel) und starte dann den Scan.",
+ "118": "Hake Jeden Punkt als Konformer behalten an, um die Geometrien anzusehen.",
+ "119": "Konformer anzeigen",
+ "120": "3D-Ansicht aktualisieren",
+ "121": "Der Seitenschnappschuss konnte nicht aktualisiert werden",
+ "122": "Keine Oberfläche",
+ "123": "Van der Waals",
+ "124": "Lösungsmittelzugänglich",
+ "125": "Lösungsmittelausgeschlossen",
+ "126": "Abstand",
+ "127": "Winkel",
+ "128": "Diederwinkel",
+ "129": "{0} kcal/mol, {1}, nicht konvergiert",
+ "130": "Gewählt {0} / {1}: {2}",
+ "131": "Klicke {0} Atome zum Messen an",
+ "132": "ESP ({0}): {1}, rot {2} e bis blau +{3} e",
+ "133": "Abstand {0}: {1}",
+ "134": "Winkel {0}: {1}",
+ "135": "Diederwinkel {0}: {1}",
+ "136": "Erstellt: {0}",
+ "137": "Minimiert: {0}",
+ "138": "Konformere behalten: {0} von {1}",
+ "139": "Konformere behalten: {0}",
+ "140": "Diederwinkel {0}",
+ "141": "PNG-Kodierung fehlgeschlagen"
+}
diff --git a/frontend/src/i18n/locales/de/part15.json b/frontend/src/i18n/locales/de/part15.json
new file mode 100644
index 00000000..f085fd4a
--- /dev/null
+++ b/frontend/src/i18n/locales/de/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "genähert, aus empirischen Ladungen",
+ "1": "{0} Stereozentren oder Doppelbindungen waren nicht spezifiziert; es wurde eine Konfiguration gewählt.",
+ "2": "{0} Stereobeschriftungen der Zeichnung werden in 3D nicht wiedergegeben.",
+ "3": "Das gezeichnete Mitglied der erweiterten Stereogruppen {0} wurde erstellt; das 3D-Modell ist ein Stereoisomer des (relativen oder racemischen) Gemischs, das die Zeichnung beschreibt.",
+ "4": "{0}-mal eingebettet (Seeds {1}), um die gezeichnete Stereochemie zu erhalten.",
+ "5": "{0} Paare von Schweratomen liegen näher beieinander als {1} ihres Van-der-Waals-Kontakts.",
+ "6": "Universelles Kraftfeld verwendet: {0}.",
+ "7": "keine {0}-Parameter für {1}",
+ "8": "{0} konnte nicht jedem Atom einen Typ zuweisen",
+ "9": "{0} Konformere haben bei der Minimierung die gezeichnete Stereochemie verändert und wurden weggelassen.",
+ "10": "Mehr als 300 Schweratome: Die Qualität der Konformerensuche sinkt bei dieser Größe.",
+ "11": "Die zentrale Bindung liegt in einem Ring; der Ring wird gespannt, um dem Winkel zu folgen.",
+ "12": "Die Struktur hatte keine 3D-Koordinaten; der Scan begann mit einer frischen Einbettung.",
+ "13": "Die Struktur hat sich während der 3D-Berechnung geändert; führe den Befehl erneut aus.",
+ "14": "Die Zeichnung hat kein Objekt {0}.",
+ "15": "{0} hat noch keine 3D-Koordinaten; erstelle zuerst 3D.",
+ "16": "{0} hat kein Konformer {1}.",
+ "17": "Die Struktur hat keine Atome.",
+ "18": "3D braucht echte Atome: {0} Atome sind Beschriftungen, R-Reste oder Anknüpfungspunkte ({1}).",
+ "19": "Wasserstoffe konnten nicht hinzugefügt werden: {0}",
+ "20": "Die Struktur hat {0} Atome mit Wasserstoffen; 3D verarbeitet bis zu {1}.",
+ "21": "Die 3D-Koordinaten passen nicht zu dieser Struktur (nichts für {0}); erstelle 3D erneut.",
+ "22": "Die 3D-Koordinaten passen nicht zu dieser Struktur (Wasserstoffanzahl geändert); erstelle 3D erneut.",
+ "23": "Die Struktur konnte nicht in 3D eingebettet werden: {0}",
+ "24": "Die Struktur konnte nicht in 3D eingebettet werden; prüfe ihre Valenzen und Stereochemie.",
+ "25": "Konformere konnten nicht eingebettet werden: {0}",
+ "26": "Es konnte kein Konformer eingebettet werden; prüfe die Valenzen und die Stereochemie der Struktur.",
+ "27": "Jedes eingebettete Konformer hat nach der Minimierung die gezeichnete Stereochemie verloren.",
+ "28": "Kein Kraftfeld hat Parameter für diese Struktur ({0}).",
+ "29": "Das universelle Kraftfeld konnte nicht eingerichtet werden: {0}",
+ "30": "Das universelle Kraftfeld konnte nicht eingerichtet werden.",
+ "31": "Unbekannte Atome {0}; verwende Fragment-Atom-IDs oder einen Wasserstoff als a1:h0.",
+ "32": "Die vier Atome müssen verschieden sein.",
+ "33": "Die vier Atome müssen eine Bindungskette bilden (a1-a2-a3-a4).",
+ "34": "Die 3D-Datei konnte nicht geschrieben werden: {0}",
+ "35": "Die Datei ist keine PDB-, mmCIF-, SDF- oder MOL-Datei, die FormChem lesen kann.",
+ "36": "Die Datei hat mehr als {0} Atome.",
+ "37": "Die PDB-Datei hat keine ATOM- oder HETATM-Einträge.",
+ "38": "Der mmCIF-Block atom_site hat keine Spalten Cartn_x, Cartn_y und Cartn_z.",
+ "39": "Die CIF hat Bruchkoordinaten, aber keine vollständige Elementarzelle.",
+ "40": "Die CIF hat keine atom_site-Tabelle.",
+ "41": "Die CIF hat keine lesbaren Atome.",
+ "42": "Die Datei hat keine Datensätze.",
+ "43": "Die Datei hat {0} Datensätze; der 3D-Import liest bis zu {1}.",
+ "44": "Kein Datensatz der Datei konnte gelesen werden.",
+ "45": "{0} ist keine PDB- oder mmCIF-Datei.",
+ "46": "{0} konnte nicht in eine FormChem-Zeichnung umgewandelt werden: {1}.",
+ "47": "PDB-Modell als 3D-Objekt platziert: {0}.",
+ "48": "mmCIF-Modell als 3D-Objekt platziert: {0}.",
+ "49": "{0} ATOM- oder HETATM-Zeilen hatten nicht lesbare Koordinaten und wurden übersprungen.",
+ "50": "{0} atom_site-Zeilen hatten nicht lesbare Koordinaten und wurden übersprungen.",
+ "51": "Kleinmolekül-CIF: Die asymmetrische Einheit wird aus Bruchkoordinaten gelesen; Symmetriepartner werden nicht erzeugt.",
+ "52": "{0} hat Valenzprobleme; gelesen ohne Bereinigung.",
+ "53": "{0} hat nur 2D-Koordinaten; es wurde kein Konformer behalten.",
+ "54": "{0} Wasserstoffe waren nicht in der Datei und wurden anhand der Geometrie platziert.",
+ "55": "{0} konnte nicht gelesen werden: {1}",
+ "56": "{0} konnte nicht gelesen werden.",
+ "57": "Datensatz {0}",
+ "58": "Die Struktur",
+ "59": "Die 3D-Koordinaten der Datei wurden als Konformer von 1 Struktur behalten; 3D erstellen ist zum Ansehen nicht nötig.",
+ "60": "Die 3D-Koordinaten der Datei wurden als Konformer von {0} Strukturen behalten; 3D erstellen ist zum Ansehen nicht nötig.",
+ "61": "{0} ist ein einzelnes Ion; es gibt keine Struktur zu extrahieren.",
+ "62": "Die Atome von {0} konnten nicht gelesen werden.",
+ "63": "Kein Ligand {0} in der Struktur; Liganden: {1}.",
+ "64": "Die Zeichnung hat kein 3D-Modell {0}.",
+ "65": "FormChem platziert PNG-, JPEG-, GIF-, WebP- und SVG-Bilder, JCAMP-DX-Spektren sowie PDB-, mmCIF-, SDF- und MOL-Strukturdateien."
+}
diff --git a/frontend/src/i18n/locales/es-MX/part12.json b/frontend/src/i18n/locales/es-MX/part12.json
new file mode 100644
index 00000000..6b27e5e7
--- /dev/null
+++ b/frontend/src/i18n/locales/es-MX/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Espectro",
+ "1": "Dibuja o selecciona una estructura para nombrarla.",
+ "2": "No se pudieron calcular los nombres",
+ "3": "FormChem no tiene nombre para esta estructura.",
+ "4": "Copiar nombre",
+ "5": "Nombre copiado: {0}",
+ "6": "Nombre químico por insertar; omítelo para abrir el cuadro de diálogo",
+ "7": "Copia como texto sin formato el nombre de la estructura seleccionada (o de las estructuras de la página): el nombre común cuando FormChem conoce uno y, si no, su nombre sistemático, que solo se ofrece cuando se vuelve a leer como la misma estructura.",
+ "8": "trivial o systematic para elegir qué nombre copiar; omítelo para usar el primero",
+ "9": "El espectro predicho está actualizado.",
+ "10": "Actualizar espectro predicho",
+ "11": "Selecciona primero una estructura",
+ "12": "Selecciona primero un espectro predicho",
+ "13": "Se agregó el espectro de RMN de 1H predicho ({0})",
+ "14": "Se agregó el espectro de RMN de 13C predicho ({0})",
+ "15": "Espectro predicho actualizado ({0})",
+ "16": "Id del fragmento de la estructura; por defecto, la estructura seleccionada o la única de la página",
+ "17": "Frecuencia del espectrómetro en MHz (por defecto 400 para 1H y 100 para 13C)",
+ "18": "Agrega junto a la estructura seleccionada un espectro de RMN de 1H predicho, en un solo paso de deshacer: un objeto espectro calculado con las reglas de incrementos propias de FormChem (sin base de datos de desplazamientos), cuyos multipletes e integrales están vinculados a los átomos de la estructura y cuyo título indica el método, la versión y la frecuencia. La curva se vuelve a calcular a partir de la estructura y nunca se guarda.",
+ "19": "Agrega junto a la estructura seleccionada un espectro de RMN de 13C predicho, en un solo paso de deshacer: un objeto espectro calculado con las reglas de incrementos propias de FormChem (sin base de datos de desplazamientos), cuyos picos están vinculados a los átomos de la estructura y cuyo título indica el método, la versión y la frecuencia. La curva se vuelve a calcular a partir de la estructura y nunca se guarda.",
+ "20": "No se pudo predecir el espectro",
+ "21": "Predecir espectro de RMN de 1H",
+ "22": "Predecir espectro de RMN de 13C",
+ "23": "Vuelve a calcular los multipletes, las integrales o los picos de un espectro predicho después de que cambie su estructura, con la versión actual del predictor, en un solo paso de deshacer; no cambia nada si ya está actualizado.",
+ "24": "Id del espectro predicho; por defecto, el seleccionado o el abierto en el editor de espectros",
+ "25": "No se pudo actualizar el espectro",
+ "26": "No hay picos nuevos en ese intervalo.",
+ "27": "Arrastra por un intervalo en el editor de espectros para integrarlo.",
+ "28": "Vincular pico a átomos",
+ "29": "Desvincular pico",
+ "30": "Eje Y del espectro",
+ "31": "Espectro desde archivo...",
+ "32": "Editar espectro...",
+ "33": "Detectar picos",
+ "34": "Integrar",
+ "35": "Transmitancia o absorbancia",
+ "36": "Exportar espectro...",
+ "37": "Selecciona primero un espectro",
+ "38": "no hay ningún espectro con el id {0}",
+ "39": "Picos detectados: {0} (ya existentes: {1})",
+ "40": "Picos detectados: {0}",
+ "41": "Las integrales son para espectros de RMN",
+ "42": "Selecciona primero un pico, una integral o un multiplete en el editor de espectros",
+ "43": "Todos los átomos deben pertenecer a una misma estructura",
+ "44": "Solo los espectros de IR, Raman y UV-Vis alternan entre transmitancia y absorbancia",
+ "45": "Exportado: {0}",
+ "46": "Id del objeto espectro; por defecto, el espectro seleccionado o el abierto en el editor de espectros",
+ "47": "Importa un archivo de espectro JCAMP-DX al dibujo activo (un objeto espectro por bloque de datos, con el archivo conservado byte por byte), con un paso de deshacer por archivo. Sin path abre un cuadro de diálogo de archivo.",
+ "48": "Ruta absoluta de un archivo .jdx, .dx o .jcamp",
+ "49": "No se pudo importar el espectro",
+ "50": "Abre el editor de espectros para el espectro seleccionado (equivale a hacerle doble clic).",
+ "51": "No se pudo abrir el espectro",
+ "52": "Busca los picos de un espectro en un intervalo (por defecto el visible) y los agrega a su lista de picos, omitiendo los que ya están, en un solo paso de deshacer.",
+ "53": "Inicio del intervalo en la unidad de x (cm-1, nm, m/z, ppm)",
+ "54": "Fin del intervalo en la unidad de x",
+ "55": "Umbral de detección opcional en unidades de y",
+ "56": "Reemplaza la lista de picos en lugar de agregar a ella",
+ "57": "No se pudieron detectar los picos",
+ "58": "Agrega una integral de RMN sobre un intervalo, escalada como las integrales existentes (o a value, reescalando el resto), en un solo paso de deshacer. Sin from y to cambia el editor de espectros a su herramienta de integración.",
+ "59": "Inicio del intervalo en ppm",
+ "60": "Fin del intervalo en ppm",
+ "61": "Valor que debe indicar esta integral, por ejemplo un número de protones",
+ "62": "No se pudo integrar",
+ "63": "Vincula un pico, una integral o un multiplete a átomos de una estructura, en un solo paso de deshacer. Sin atoms usa los átomos seleccionados o espera a que la persona haga clic en átomos del dibujo.",
+ "64": "Id del pico, la integral o el multiplete; por defecto, el seleccionado en el editor de espectros",
+ "65": "Id de la estructura (fragmento) a la que pertenecen los átomos",
+ "66": "Ids de los átomos",
+ "67": "No se pudo vincular el pico",
+ "68": "Elimina el vínculo con átomos de un pico, una integral o un multiplete, en un solo paso de deshacer.",
+ "69": "No se pudo desvincular el pico",
+ "70": "Muestra un espectro de IR, Raman o UV-Vis como transmitancia o absorbancia (alterna si no se indica mode), en un solo paso de deshacer.",
+ "71": "Eje Y por mostrar; omítelo para alternar",
+ "72": "No se pudo cambiar el eje y",
+ "73": "Guarda un espectro como JCAMP-DX (con su tabla de picos cuando tiene picos) o como CSV de todos los puntos, a través del motor.",
+ "74": "Formato de archivo; por defecto jdx",
+ "75": "Con jdx: el archivo importado original, sin modificar",
+ "76": "Ruta absoluta donde escribir; omítela para preguntar",
+ "77": "No se pudo exportar el espectro",
+ "78": "Insertar espectro desde archivo",
+ "79": "El archivo no contiene ningún espectro que FormChem pueda dibujar",
+ "80": "Insertar espectro",
+ "81": "No se pudo colocar el espectro: su archivo no llegó al dibujo.",
+ "82": "Espectros insertados: {0}",
+ "83": "Longitud de onda (µm)",
+ "84": "Número de onda (cm⁻¹)",
+ "85": "Desplazamiento Raman (cm⁻¹)",
+ "86": "Longitud de onda (nm)",
+ "87": "Frecuencia (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmitancia (%)",
+ "90": "Transmitancia",
+ "91": "Absorbancia",
+ "92": "Abundancia relativa (%)",
+ "93": "Intensidad",
+ "94": "RMN de {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Predicho: {0}, {1} MHz ({2})",
+ "100": "Predicho: {0}, {1} MHz",
+ "101": "Predicho: {0} ({1})",
+ "102": "Predicho: {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Espectro no disponible: {0}",
+ "105": "Cargando espectro",
+ "106": "Nombre común",
+ "107": "Sistemático",
+ "108": "Confianza alta",
+ "109": "Confianza media",
+ "110": "Confianza baja",
+ "111": "No se leyó",
+ "112": "Nombres de FormChem",
+ "113": "No se pudo leer el nombre",
+ "114": "Insertar estructura desde nombre",
+ "115": "Estructura desde nombre",
+ "116": "Un nombre, como aspirina o 2-metilpropan-1-ol",
+ "117": "Nombre químico",
+ "118": "Escribe un nombre para ver su estructura.",
+ "119": "No hay estructura para este nombre",
+ "120": "Diccionario",
+ "121": "Analizador sistemático",
+ "122": "Nominador por reglas, con comprobación de ida y vuelta",
+ "123": "Herramientas de espectro",
+ "124": "Mostrar todo el espectro",
+ "125": "Eje Y",
+ "126": "Mostrar este intervalo en la página",
+ "127": "Haz doble clic en un espectro del dibujo para editarlo aquí.",
+ "128": "Picos e integrales",
+ "129": "Predicho",
+ "130": "Valor de la integral",
+ "131": "Vincular a átomos",
+ "132": "Desvincular",
+ "133": "1 átomo",
+ "134": "Átomos por vincular",
+ "135": "Haz clic en más átomos y después en Listo.",
+ "136": "Haz clic en los átomos del dibujo que pertenecen a este pico y después en Listo.",
+ "137": "No hay nada que integrar en ese intervalo.",
+ "138": "Eliminar pico",
+ "139": "Agregar pico",
+ "140": "Vinculado a 1 átomo",
+ "141": "Definir intervalo del espectro",
+ "142": "Escribe un número positivo.",
+ "143": "No se pudo definir la integral",
+ "144": "Desplazar y ampliar: arrastra para desplazar, usa la rueda para ampliar, Shift y arrastrar para ampliar un intervalo",
+ "145": "Ampliar un intervalo: arrastra por el gráfico",
+ "146": "Detectar picos: arrastra por un intervalo",
+ "147": "Agregar o eliminar un pico: haz clic cerca de un pico",
+ "148": "Integrar: arrastra por un intervalo",
+ "149": "Pico",
+ "150": "Integral",
+ "151": "Multiplete",
+ "152": "{0} átomos",
+ "153": "Vinculado a {0}",
+ "154": "Arrastra para desplazar, usa la rueda para ampliar, Shift y arrastrar para ampliar un intervalo. Haz clic en una etiqueta para seleccionarla.",
+ "155": "Arrastra por el gráfico para ampliar ese intervalo.",
+ "156": "Arrastra por un intervalo para detectar sus picos.",
+ "157": "Haz clic cerca de un pico para agregarlo; haz clic en la etiqueta de un pico para eliminarlo.",
+ "158": "Arrastra por un intervalo para integrarlo.",
+ "159": "Vinculado a {0} átomos"
+}
diff --git a/frontend/src/i18n/locales/es-MX/part13.json b/frontend/src/i18n/locales/es-MX/part13.json
new file mode 100644
index 00000000..bac29f66
--- /dev/null
+++ b/frontend/src/i18n/locales/es-MX/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "el motor devolvió un archivo vacío",
+ "1": "el nombre tiene más de {0} caracteres",
+ "2": "los fragmentos de más de {0} átomos no se nombran",
+ "3": "La estructura contiene etiquetas, grupos R o átomos cualesquiera, que no tienen nombre.",
+ "4": "No se pudo leer la estructura como una molécula (revisa las valencias).",
+ "5": "No hay ninguna estructura que nombrar.",
+ "6": "Los nombres de índice invertidos (primero el compuesto original, luego una coma y los sustituyentes) no se leen; escribe el nombre en orden normal, como 1,2-diclorobenceno.",
+ "7": "D- y L- solo se leen para los aminoácidos y azúcares del diccionario de FormChem; indica descriptores R o S para otros nombres.",
+ "8": "FormChem leyó el nombre completo, pero no forma el nombre de una estructura completa (puede faltar un compuesto original como hexano o benceno, o un sufijo).",
+ "9": "FormChem no pudo leer el nombre a partir del carácter {0} (\"{1}\").",
+ "10": "FormChem leyó el nombre, pero {0}.",
+ "11": "no se pudo completar la estructura",
+ "12": "El nombre se puede leer de más de una manera; FormChem dibujó la lectura con menos suposiciones.",
+ "13": "El nombre no da descriptores estereoquímicos, así que los estereocentros y los dobles enlaces se dibujan sin especificar.",
+ "14": "No hay nombre sistemático: {0}.",
+ "15": "El nombre sistemático que construyó FormChem no se volvió a leer como la misma estructura, así que no se muestra.",
+ "16": "ese doble enlace no puede ser E ni Z",
+ "17": "el localizador del descriptor {0} no es una posición del compuesto original",
+ "18": "la posición {0} no inicia un doble enlace que pueda ser E o Z",
+ "19": "{0} necesita exactamente un doble enlace que pueda ser cis o trans; esta estructura tiene {1}",
+ "20": "{0} no está claro para este doble enlace; indica E o Z en su lugar",
+ "21": "({0}) necesita un localizador: la estructura tiene {1} estereocentros",
+ "22": "la posición {0} no es un estereocentro, así que no se puede aplicar ({1})",
+ "23": "({0}) necesita un localizador: la estructura tiene {1} dobles enlaces que pueden ser E o Z",
+ "24": "la posición {0} no puede tener {1}",
+ "25": "ese doble enlace no puede tener {0}",
+ "26": "{0} no indica qué configuración se quiere decir, así que la estructura se dibuja sin estereoquímica.",
+ "27": "{0} no tiene punto de unión",
+ "28": "no hay lugar para {0} en {1}",
+ "29": "{0} no puede enlazarse ahí",
+ "30": "las cadenas de más de {0} carbonos aún no se leen",
+ "31": "{0} es demasiado pequeño para ser un anillo",
+ "32": "{0}-{1} es un tautómero que FormChem aún no dibuja a partir de un nombre",
+ "33": "el localizador {0} no es una posición de {1}",
+ "34": "{0} no es una posición de la cadena",
+ "35": "un enlace múltiple no puede empezar en la posición {0} de {1}",
+ "36": "la posición {0} de {1} no puede llevar ese enlace múltiple",
+ "37": "no hay lugar para un enlace múltiple en la posición {0} de {1}",
+ "38": "no hay lugar para los enlaces múltiples de {0}",
+ "39": "No se indicaron las posiciones de los enlaces múltiples de {0}; se dibujaron en las posiciones más bajas.",
+ "40": "-{0} necesita una cadena abierta; en un anillo el sufijo es carbaldehído, ácido carboxílico, carbonitrilo o carboxamida",
+ "41": "una cadena solo tiene dos extremos para -{0}",
+ "42": "{0} es demasiado corto para dos grupos -{1}",
+ "43": "no hay lugar para -{0} en {1}",
+ "44": "No se indicó la posición de -{0} en {1}; se dibujó en la posición más baja.",
+ "45": "-{0} debe estar al final de la cadena, no en {1}",
+ "46": "no hay lugar para -{0} en {1}",
+ "47": "orto, meta y para necesitan un anillo de benceno",
+ "48": "orto, meta o para con un solo grupo necesita un compuesto original como fenol, anilina o tolueno",
+ "49": "no hay lugar para {0} en {1}",
+ "50": "no hay lugar para {0} grupos {1} en {2}",
+ "51": "No se indicó la posición de {0} en {1}; se dibujó en la posición libre más baja.",
+ "52": "{0} no puede llevar sustituyentes",
+ "53": "un grupo acilo se une por su carbono carbonílico",
+ "54": "{0} no tiene ninguna posición libre",
+ "55": "No se indicó la posición de unión de {0}; se supuso la posición {1}.",
+ "56": "a {0} no le queda lugar para unirse",
+ "57": "los localizadores {0} antes de {1} no se usan",
+ "58": "{0} no puede ir como palabra independiente",
+ "59": "\"{0}\" necesita {1} grupo antes, el nombre da {2}",
+ "60": "\"{0}\" necesita {1} grupos antes, el nombre da {2}",
+ "61": "el nombre da {0} grupo alquilo para {1} posición de éster",
+ "62": "el nombre da {0} grupo alquilo para {1} posiciones de éster",
+ "63": "el nombre da {0} grupos alquilo para {1} posición de éster",
+ "64": "el nombre da {0} grupos alquilo para {1} posiciones de éster",
+ "65": "la estructura que describe no es válida ({0})",
+ "66": "-ona en {0} sería un aldehído; un aldehído se nombra con -al",
+ "67": "la posición {0} de {1}",
+ "68": "demasiados sustituyentes idénticos",
+ "69": "localizadores mezclados",
+ "70": "los tipos de enlace poco comunes aún no se nombran",
+ "71": "un sistema de anillos que FormChem aún no puede nombrar",
+ "72": "los anillos aromáticos con dobles enlaces exocíclicos (como las piridonas) aún no se nombran",
+ "73": "los isótopos y los radicales aún no se nombran",
+ "74": "los halógenos hipervalentes no se nombran",
+ "75": "los grupos de nitrógeno con carga distintos del nitro aún no se nombran",
+ "76": "los átomos con carga aún no se nombran",
+ "77": "los óxidos de azufre, nitrógeno y fósforo aún no se nombran",
+ "78": "este grupo de oxígeno aún no se nombra",
+ "79": "los sulfóxidos, las sulfonas y otros grupos de azufre aún no se nombran",
+ "80": "las iminas, los compuestos azo y grupos de nitrógeno similares aún no se nombran",
+ "81": "{0} aún no se nombra",
+ "82": "las cadenas de sustituyentes de más de 20 carbonos no se nombran",
+ "83": "los grupos acilo insaturados aún no se nombran",
+ "84": "los grupos ilideno sustituidos aún no se nombran",
+ "85": "los grupos ilideno de anillo aún no se nombran",
+ "86": "los anillos unidos dos veces aún no se nombran",
+ "87": "no se encontró numeración para un sustituyente de anillo",
+ "88": "los ésteres con partes alcohólicas distintas aún no se nombran",
+ "89": "no se encontró ninguna cadena ni anillo principal",
+ "90": "los ésteres cíclicos (lactonas) aún no se nombran",
+ "91": "los sustituyentes en más de un nitrógeno de amina o amida aún no se nombran",
+ "92": "los estereocentros fuera de la cadena o del anillo principal aún no se nombran",
+ "93": "la geometría de doble enlace fuera de la cadena principal aún no se nombra",
+ "94": "los centros pseudoasimétricos aún no se nombran",
+ "95": "esta geometría de doble enlace aún no se nombra",
+ "96": "las cadenas de más de 20 carbonos no se nombran",
+ "97": "demasiados grupos idénticos",
+ "98": "la estructura tiene errores de valencia",
+ "99": "las sales y las mezclas aún no se nombran de forma sistemática",
+ "100": "las estructuras con más de {0} átomos pesados aún no se nombran de forma sistemática",
+ "101": "los compuestos de {0} aún no se nombran de forma sistemática",
+ "102": "los átomos de consulta y los grupos R no tienen nombre",
+ "103": "los hidruros de un solo heteroátomo se nombran solo a partir del diccionario",
+ "104": "{0} no es un objeto de este dibujo.",
+ "105": "{0} no tiene átomos.",
+ "106": "El fragmento no tiene átomos.",
+ "107": "El dibujo no tiene página.",
+ "108": "{0} no es un espectro de este dibujo.",
+ "109": "La estructura {0} a la que pertenece esta predicción ya no está en el dibujo.",
+ "110": "Se cerró el dibujo {0}.",
+ "111": "Desplazamiento químico (ppm)",
+ "112": "Tiempo (s)",
+ "113": "Reflectancia",
+ "114": "Abundancia relativa",
+ "115": "##{0}= aparece más de una vez; se conservó el primer valor.",
+ "116": "##XYDATA={0} no es una lista de variables conocida; se leyó como (X++(Y..Y)).",
+ "117": "##{0}={1} no es una lista de variables conocida; se leyó como (XY..XY).",
+ "118": "Los puntos no estaban en orden de x y se ordenaron.",
+ "119": "No se pudo leer ##.SHIFT REFERENCE={0}; los desplazamientos no se referenciaron.",
+ "120": "##.SHIFT REFERENCE señala el punto {0}, fuera de los {1} puntos; los desplazamientos no se referenciaron.",
+ "121": "Los desplazamientos se referenciaron de modo que el punto {0} indica {1} ppm ({2}).",
+ "122": "El archivo no indica el núcleo observado.",
+ "123": "Son datos de RMN en el dominio del tiempo (una FID); se muestran tal como se adquirieron, sin transformada de Fourier.",
+ "124": "Las frecuencias en Hz se dividieron entre la frecuencia de observación ({0} MHz) para obtener ppm.",
+ "125": "No hay ##.SHIFT REFERENCE; se tomaron 0 Hz como 0 ppm.",
+ "126": "No hay ##.OBSERVE FREQUENCY, así que el eje de desplazamiento sigue en Hz.",
+ "127": "La transmitancia estaba almacenada como fracción y se muestra como porcentaje.",
+ "128": "El bloque {0} contiene más de {1} puntos.",
+ "129": "##DATA TYPE={0} con unidades de x {1} no corresponde a ninguna técnica conocida; se dibuja como un espectro simple.",
+ "130": "##BLOCKS={0} pero el bloque LINK contiene {1} bloques; se leyeron todos los bloques encontrados.",
+ "131": "No es un archivo JCAMP-DX: no tiene ningún registro ##TITLE=.",
+ "132": "El archivo contiene {0} bloques uno tras otro sin un bloque LINK; se leyó cada uno.",
+ "133": "Dos bloques comparten un mismo ##BLOCK_ID.",
+ "134": "El archivo no contiene ningún espectro que FormChem pueda dibujar ({0}).",
+ "135": "El bloque \"{0}\" no se dibujó: {1}.",
+ "136": "un bloque de estructura (JCAMP-CS); se conserva en el archivo, pero no se dibuja",
+ "137": "no contiene XYDATA, XYPOINTS, PEAK TABLE ni NTUPLES",
+ "138": "su tabla de datos no contiene puntos",
+ "139": "su tabla NTUPLES no declara símbolos",
+ "140": "los espectros NTUPLES 2D aún no son compatibles",
+ "141": "su tabla NTUPLES no tiene páginas legibles",
+ "142": "El archivo contiene caracteres fuera de ASCII; se leyó como UTF-8.",
+ "143": "El archivo contiene bytes que no son ASCII ni UTF-8; se leyó como Latin-1.",
+ "144": "Se ignoraron las líneas fuera de cualquier registro de datos con etiqueta.",
+ "145": "Se ignoró un ##END= sin un bloque anterior.",
+ "146": "Se ignoraron los registros anteriores al primer ##TITLE= o posteriores al último ##END=.",
+ "147": "El archivo termina sin ##END=; se cerraron los bloques abiertos.",
+ "148": "Página NTUPLES {0}",
+ "149": "La página {0} de NTUPLES no tiene ##DATA TABLE=; se omitió.",
+ "150": "La página {0} de NTUPLES usa símbolos ({1}) no declarados en ##SYMBOL=; se omitió.",
+ "151": "{0} tiene una forma de tabla de datos que FormChem no lee ({1}); se omitió.",
+ "152": "La tabla NTUPLES no tiene ##END NTUPLES=; se leyó hasta el final del bloque.",
+ "153": "La tabla NTUPLES no tiene lista ##SYMBOL=.",
+ "154": "Es un espectro 2D (dos variables independientes); los espectros 2D no se dibujan en esta versión.",
+ "155": "La tabla NTUPLES tiene {0} páginas; solo se leyeron las primeras {1}.",
+ "156": "La página imaginaria no comparte los valores de x de la página real; se dejó fuera.",
+ "157": "La tabla NTUPLES contiene {0} páginas; se muestra la página {1} y se dejaron fuera otras {2} páginas.",
+ "158": "##DELTAX={0} difiere de (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; se usa el espaciado calculado.",
+ "159": "{0} no tiene FIRSTX, LASTX y NPOINTS completos; el espaciado procede de ##DELTAX.",
+ "160": "Una línea de datos empezó con un valor DIF; continúa desde el último valor de la línea anterior.",
+ "161": "Un valor de verificación de Y no coincidía con el último valor de la línea anterior; la línea se continuó desde el valor anterior.",
+ "162": "No se pudieron leer {0} caracteres en {1} y se omitieron.",
+ "163": "Líneas DIF sin valor de verificación de Y a continuación: {0}.",
+ "164": "{0} no contiene puntos de datos.",
+ "165": "{0} contiene {1} puntos, pero ##NPOINTS={2}; los valores de x de las líneas encajan con {3} puntos de FIRSTX a LASTX, así que se usó ese espaciado.",
+ "166": "{0} contiene {1} puntos, pero ##NPOINTS={2}; se conservaron los puntos leídos.",
+ "167": "El valor de x de una línea no coincide con su posición según FIRSTX y el espaciado; se usó la posición.",
+ "168": "{0} no tiene FIRSTX, LASTX y NPOINTS; el espaciado se tomó de los valores de x de las líneas.",
+ "169": "{0} no da forma de ubicar sus puntos en el eje x; se numeraron 0, 1, 2 y así sucesivamente.",
+ "170": "La primera línea empieza en x = {0}, pero ##FIRSTX={1}; se usó FIRSTX.",
+ "171": "El primer valor de Y {0} no coincide con ##FIRSTY={1}.",
+ "172": "{0} termina con un grupo incompleto de {1} valores; se descartó.",
+ "173": "No se pudo leer {0}: {1}.",
+ "174": "El espectro pide el bloque {0}, pero su archivo contiene 1 bloque.",
+ "175": "El espectro pide el bloque {0}, pero su archivo contiene {1} bloques.",
+ "176": "El espectro no tiene origen.",
+ "177": "El archivo {0} del espectro no está en el dibujo.",
+ "178": "No hay ningún predictor para {0} disponible en este motor.",
+ "179": "Falló la predicción: {0}",
+ "180": "El origen del espectro no es un archivo ni una predicción.",
+ "181": "El dibujo no tiene el espectro {0}.",
+ "182": "Los espectros de barras no tienen áreas que integrar.",
+ "183": "value debe ser mayor que cero.",
+ "184": "from y to deben ser dos valores de x distintos.",
+ "185": "El espectro no tiene la integral {0}.",
+ "186": "Este espectro no tiene archivo original; expórtalo sin original=1.",
+ "187": "FormChem coloca imágenes PNG, JPEG, GIF, WebP y SVG y espectros JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/es-MX/part14.json b/frontend/src/i18n/locales/es-MX/part14.json
new file mode 100644
index 00000000..3c9f537c
--- /dev/null
+++ b/frontend/src/i18n/locales/es-MX/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Visualización",
+ "1": "Superficie",
+ "2": "No hay nada que exportar: la vista 3D está vacía.",
+ "3": "Error al exportar",
+ "4": "Selecciona una estructura para mostrarla en 3D.",
+ "5": "Generar 3D",
+ "6": "Insertar vista 3D",
+ "7": "Elige un archivo PDB, mmCIF, SDF o MOL.",
+ "8": "No se pudo colocar la estructura 3D en la página",
+ "9": "Selecciona un objeto 3D abierto desde un archivo PDB o mmCIF.",
+ "10": "Este modelo no tiene ligandos.",
+ "11": "No se pudo extraer el ligando",
+ "12": "Aún no hay coordenadas 3D: Generar 3D crea un confórmero a partir del dibujo.",
+ "13": "Archivo de estructura 3D...",
+ "14": "Extraer ligando...",
+ "15": "Exportar estructura 3D...",
+ "16": "Barrido diedro...",
+ "17": "Medir en 3D",
+ "18": "Exportar vista 3D como PNG...",
+ "19": "Exportar vista 3D como glTF...",
+ "20": "Extraído {0}: {1} (órdenes de enlace inferidos)",
+ "21": "Extraído {0}: {1}",
+ "22": "Abre primero la vista 3D",
+ "23": "Abre el panel Vista 3D con la estructura seleccionada (o el objeto 3D seleccionado de la página) y sigue la selección. Una estructura necesita antes coordenadas 3D: Generar 3D las crea.",
+ "24": "Genera un confórmero 3D de la estructura seleccionada a partir de su dibujo 2D (conservando cuñas, geometría de dobles enlaces y cargas), lo minimiza con el campo de fuerzas elegido y lo guarda en el dibujo en un solo paso de deshacer; la vista 3D lo muestra.",
+ "25": "Minimiza el confórmero mostrado de la estructura seleccionada con el campo de fuerzas elegido en la vista 3D (MMFF94 por defecto, UFF cuando MMFF94 no tiene parámetros) e informa de la energía antes y después, en un solo paso de deshacer.",
+ "26": "Genera un conjunto de confórmeros de la estructura seleccionada (ETKDG, filtrado por RMSD, cada uno minimizado) y conserva los que están dentro de una ventana de energía; con n, window y method se ejecuta sin el cuadro de diálogo.",
+ "27": "Confórmeros por generar",
+ "28": "Ventana de energía en kcal/mol",
+ "29": "Coloca una vista 3D de la estructura seleccionada en la página, junto a ella (generando antes las coordenadas 3D si no las tiene), y abre el panel Vista 3D vinculado a ella; al girar o cambiar el estilo del modelo se actualiza la imagen de la página.",
+ "30": "Abre un archivo PDB, mmCIF, SDF o MOL como objeto 3D en la página (las proteínas como cinta y los ligandos como bolas y varillas, sin aguas y con el ligando enfocado) y lo muestra en la vista 3D.",
+ "31": "Convierte un ligando del objeto 3D seleccionado (abierto desde un archivo PDB o mmCIF) en una estructura 2D junto a él, en un solo paso de deshacer: órdenes de enlace a partir de una plantilla integrada para los ligandos comunes y, si no, inferidos de la geometría y notificados; las coordenadas del archivo pasan a ser su confórmero. Con ligand toma ese; sin él pregunta cuando el modelo tiene varios.",
+ "32": "Clave del ligando cadena:het:número, o un código het",
+ "33": "Selecciona un objeto 3D abierto desde un archivo PDB o mmCIF",
+ "34": "Guarda las coordenadas 3D de la estructura seleccionada con todos los hidrógenos: molfile MDL (el confórmero mostrado), archivo SD (todos los confórmeros, con campos de datos de energía y método), PDB o XYZ (el confórmero mostrado, o todos como modelos o fotogramas); un objeto 3D abierto desde un archivo PDB o mmCIF guarda su archivo original. Sin format pregunta.",
+ "35": "Formato de archivo",
+ "36": "Todos los confórmeros en lugar del mostrado (por defecto true para sdf)",
+ "37": "Barre el diedro de los cuatro átomos elegidos en la vista 3D (o su última medición de diedro) con minimización relajada y grafica el ángulo contra la energía.",
+ "38": "Mide una distancia (dos átomos), un ángulo (tres) o un diedro (cuatro) en la vista 3D y lo agrega a la lista; con atoms (ids de átomos del fragmento como a1, hidrógenos como a1:h0, o números de serie PDB) mide esos; si no, pasa al modo de selección.",
+ "39": "De dos a cuatro ids de átomos",
+ "40": "Guarda la vista 3D como imagen PNG con su tamaño en pantalla; transparent omite el fondo.",
+ "41": "Guarda la vista 3D como archivo glTF 2.0 binario (.glb): átomos como esferas y enlaces como cilindros con los colores de los elementos, 1 ångström = 1 cm, para visores 3D, presentaciones e impresión.",
+ "42": "Sin superficie",
+ "43": "Quita la superficie molecular de la vista 3D.",
+ "44": "Superficie de van der Waals",
+ "45": "Muestra la superficie de van der Waals en la vista 3D.",
+ "46": "Superficie accesible al disolvente",
+ "47": "Muestra la superficie accesible al disolvente (sonda de 1.4 ångström) en la vista 3D.",
+ "48": "Superficie excluida del disolvente",
+ "49": "Muestra la superficie excluida del disolvente en la vista 3D.",
+ "50": "Superficie con mapa de ESP",
+ "51": "Colorea la superficie según un potencial electrostático aproximado calculado con las cargas parciales empíricas del motor (rojo negativo, azul positivo), con una leyenda que indica el método.",
+ "52": "Muestra la vista 3D en estilo alambre; en un objeto 3D de la página, la elección se guarda con él.",
+ "53": "Muestra la vista 3D en estilo varillas; en un objeto 3D de la página, la elección se guarda con él.",
+ "54": "Bolas y varillas",
+ "55": "Muestra la vista 3D en estilo de bolas y varillas; en un objeto 3D de la página, la elección se guarda con él.",
+ "56": "Relleno de espacio",
+ "57": "Muestra la vista 3D en estilo de relleno de espacio; en un objeto 3D de la página, la elección se guarda con él.",
+ "58": "Cinta",
+ "59": "Muestra la vista 3D en estilo de cinta (proteínas y ácidos nucleicos; los ligandos siguen como bolas y varillas); en un objeto 3D de la página, la elección se guarda con él.",
+ "60": "Ángulo diedro (grados)",
+ "61": "Energía relativa (kcal/mol)",
+ "62": "Mínimo {0}°",
+ "63": "Exportar estructura 3D",
+ "64": "Todos los confórmeros (registros SDF, modelos PDB, fotogramas XYZ)",
+ "65": "1 confórmero almacenado; todos los hidrógenos se escriben con su posición 3D.",
+ "66": "Extraer ligando",
+ "67": "Ligando",
+ "68": "El ligando pasa a ser una estructura 2D junto al modelo, con las coordenadas del archivo conservadas como su confórmero.",
+ "69": "Extraer",
+ "70": "Archivo SD (.sdf)",
+ "71": "Molfile MDL (.mol)",
+ "72": "{0} confórmeros almacenados; todos los hidrógenos se escriben con su posición 3D.",
+ "73": "Confórmeros",
+ "74": "Ventana de energía (kcal/mol)",
+ "75": "Incrustación ETKDG con semilla fija, duplicados casi idénticos eliminados con 0.5 Å de RMSD de átomos pesados, cada uno minimizado; el de menor energía pasa a ser el confórmero mostrado.",
+ "76": "Generar",
+ "77": "Perfil de energía del barrido diedro",
+ "78": "Barrido diedro",
+ "79": "Desde (grados)",
+ "80": "Hasta (grados)",
+ "81": "Paso (grados)",
+ "82": "Conservar cada punto como confórmero (un paso de deshacer)",
+ "83": "Ejecutar barrido",
+ "84": "Un barrido relajado: en cada ángulo se mantiene fijo el diedro y se minimiza todo lo demás.",
+ "85": "El ángulo final debe ser mayor que el inicial.",
+ "86": "Barriendo...",
+ "87": "Error en el barrido",
+ "88": "barrera {0} kcal/mol",
+ "89": "Estilo de visualización",
+ "90": "Colorear la superficie según el potencial electrostático a partir de cargas parciales empíricas",
+ "91": "ESP",
+ "92": "Minimizar",
+ "93": "Barrido...",
+ "94": "Enfocar el ligando",
+ "95": "Restablecer vista",
+ "96": "Girar",
+ "97": "Exportar la vista 3D",
+ "98": "Medir",
+ "99": "Mediciones",
+ "100": "Imagen PNG",
+ "101": "Imagen PNG, transparente",
+ "102": "glTF binario (.glb)",
+ "103": "El 3D necesita WebGL, que esta ventana no ofrece.",
+ "104": "Cargando el visor 3D...",
+ "105": "No se pudo cargar el visor 3D",
+ "106": "Abre un dibujo y selecciona una estructura para verla en 3D.",
+ "107": "Selecciona una estructura de la página para verla en 3D.",
+ "108": "No se pudo leer la estructura 3D",
+ "109": "Este confórmero no se puede escribir como molfile",
+ "110": "El giro está desactivado: el sistema pide movimiento reducido",
+ "111": "Un modelo PDB o CIF no tiene confórmeros.",
+ "112": "Energías relativas a la más baja; haz clic en una para mostrarla.",
+ "113": "Generar 3D o Confórmeros... llenan esta lista.",
+ "114": "Cargas parciales no disponibles",
+ "115": "el motor aún no tiene rutas 3D",
+ "116": "sin converger",
+ "117": "Elige cuatro átomos enlazados seguidos (un diedro) y después presiona Barrido.",
+ "118": "Marca Conservar cada punto como confórmero para ver las geometrías.",
+ "119": "Mostrar confórmero",
+ "120": "Actualizar vista 3D",
+ "121": "No se pudo actualizar la instantánea de la página",
+ "122": "Sin superficie",
+ "123": "Van der Waals",
+ "124": "Accesible al disolvente",
+ "125": "Excluida del disolvente",
+ "126": "Distancia",
+ "127": "Ángulo",
+ "128": "Diedro",
+ "129": "{0} kcal/mol, {1}, sin converger",
+ "130": "Elegidos {0} / {1}: {2}",
+ "131": "Haz clic en {0} átomos para medir",
+ "132": "ESP ({0}): {1}, rojo {2} e a azul +{3} e",
+ "133": "Distancia {0}: {1}",
+ "134": "Ángulo {0}: {1}",
+ "135": "Diedro {0}: {1}",
+ "136": "Generado: {0}",
+ "137": "Minimizado: {0}",
+ "138": "Confórmeros conservados: {0} de {1}",
+ "139": "Confórmeros conservados: {0}",
+ "140": "Diedro {0}",
+ "141": "Error al codificar el PNG"
+}
diff --git a/frontend/src/i18n/locales/es-MX/part15.json b/frontend/src/i18n/locales/es-MX/part15.json
new file mode 100644
index 00000000..60818d17
--- /dev/null
+++ b/frontend/src/i18n/locales/es-MX/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "aproximado, a partir de cargas empíricas",
+ "1": "{0} estereocentro(s) o doble(s) enlace(s) estaban sin especificar; se eligió una configuración.",
+ "2": "{0} etiqueta(s) estereoquímica(s) del dibujo no se reproducen en 3D.",
+ "3": "Se generó el miembro dibujado del grupo o grupos de estereoquímica mejorada {0}; el modelo 3D es un estereoisómero de la mezcla (relativa o racémica) que describe el dibujo.",
+ "4": "Se incrustó {0} veces (semillas {1}) para conservar la estereoquímica dibujada.",
+ "5": "{0} par(es) de átomos pesados están más cerca que {1} de su contacto de van der Waals.",
+ "6": "Se usó el campo de fuerzas universal: {0}.",
+ "7": "sin parámetros de {0} para {1}",
+ "8": "{0} no pudo asignar tipo a todos los átomos",
+ "9": "{0} confórmero(s) cambiaron la estereoquímica dibujada durante la minimización y se descartaron.",
+ "10": "Más de 300 átomos pesados: la calidad del muestreo de confórmeros disminuye con este tamaño.",
+ "11": "El enlace central está en un anillo; el anillo se tensiona para seguir el ángulo.",
+ "12": "La estructura no tenía coordenadas 3D; el barrido empezó desde una incrustación nueva.",
+ "13": "La estructura cambió mientras se calculaba el 3D; ejecuta el comando de nuevo.",
+ "14": "El dibujo no tiene el objeto {0}.",
+ "15": "{0} aún no tiene coordenadas 3D; genera primero el 3D.",
+ "16": "{0} no tiene el confórmero {1}.",
+ "17": "La estructura no tiene átomos.",
+ "18": "El 3D necesita átomos reales: {0} átomo(s) son etiquetas, grupos R o puntos de unión ({1}).",
+ "19": "No se pudieron agregar los hidrógenos: {0}",
+ "20": "La estructura tiene {0} átomos con hidrógenos; el 3D admite hasta {1}.",
+ "21": "Las coordenadas 3D no encajan con esta estructura (nada para {0}); genera el 3D de nuevo.",
+ "22": "Las coordenadas 3D no encajan con esta estructura (cambió el número de hidrógenos); genera el 3D de nuevo.",
+ "23": "No se pudo incrustar la estructura en 3D: {0}",
+ "24": "No se pudo incrustar la estructura en 3D; revisa sus valencias y su estereoquímica.",
+ "25": "No se pudieron incrustar los confórmeros: {0}",
+ "26": "No se pudo incrustar ningún confórmero; revisa las valencias y la estereoquímica de la estructura.",
+ "27": "Todos los confórmeros incrustados perdieron la estereoquímica dibujada tras la minimización.",
+ "28": "Ningún campo de fuerzas tiene parámetros para esta estructura ({0}).",
+ "29": "No se pudo configurar el campo de fuerzas universal: {0}",
+ "30": "No se pudo configurar el campo de fuerzas universal.",
+ "31": "Átomo(s) desconocido(s) {0}; usa ids de átomos del fragmento o un hidrógeno como a1:h0.",
+ "32": "Los cuatro átomos deben ser distintos.",
+ "33": "Los cuatro átomos deben formar una cadena de enlaces (a1-a2-a3-a4).",
+ "34": "No se pudo escribir el archivo 3D: {0}",
+ "35": "El archivo no es un archivo PDB, mmCIF, SDF o MOL que FormChem pueda leer.",
+ "36": "El archivo tiene más de {0} átomos.",
+ "37": "El archivo PDB no tiene registros ATOM ni HETATM.",
+ "38": "La tabla atom_site de mmCIF no tiene las columnas Cartn_x, Cartn_y y Cartn_z.",
+ "39": "El CIF tiene coordenadas fraccionarias pero no una celda unitaria completa.",
+ "40": "El CIF no tiene tabla atom_site.",
+ "41": "El CIF no tiene átomos legibles.",
+ "42": "El archivo no tiene registros.",
+ "43": "El archivo tiene {0} registros; la importación 3D lee hasta {1}.",
+ "44": "No se pudo leer ningún registro del archivo.",
+ "45": "{0} no es un archivo PDB ni mmCIF.",
+ "46": "{0} no se pudo convertir en un dibujo de FormChem: {1}.",
+ "47": "Modelo PDB colocado como objeto 3D: {0}.",
+ "48": "Modelo mmCIF colocado como objeto 3D: {0}.",
+ "49": "{0} línea(s) ATOM o HETATM tenían coordenadas ilegibles y se omitieron.",
+ "50": "{0} fila(s) de atom_site tenían coordenadas ilegibles y se omitieron.",
+ "51": "CIF de molécula pequeña: la unidad asimétrica se lee a partir de las coordenadas fraccionarias; no se generan los equivalentes por simetría.",
+ "52": "{0} tiene problemas de valencia; se leyó sin sanear.",
+ "53": "{0} solo tiene coordenadas 2D; no se conservó ningún confórmero.",
+ "54": "{0} hidrógeno(s) no estaban en el archivo y se colocaron a partir de la geometría.",
+ "55": "{0} no se pudo leer: {1}",
+ "56": "{0} no se pudo leer.",
+ "57": "Registro {0}",
+ "58": "La estructura",
+ "59": "Las coordenadas 3D del archivo se conservaron como el confórmero de 1 estructura; no hace falta Generar 3D para verlas.",
+ "60": "Las coordenadas 3D del archivo se conservaron como el confórmero de {0} estructuras; no hace falta Generar 3D para verlas.",
+ "61": "{0} es un ion simple; no hay ninguna estructura que extraer.",
+ "62": "No se pudieron leer los átomos de {0}.",
+ "63": "No hay ningún ligando {0} en la estructura; ligandos: {1}.",
+ "64": "El dibujo no tiene el modelo 3D {0}.",
+ "65": "FormChem coloca imágenes PNG, JPEG, GIF, WebP y SVG, espectros JCAMP-DX y archivos de estructura PDB, mmCIF, SDF y MOL."
+}
diff --git a/frontend/src/i18n/locales/es/part12.json b/frontend/src/i18n/locales/es/part12.json
new file mode 100644
index 00000000..eebd8e7c
--- /dev/null
+++ b/frontend/src/i18n/locales/es/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Espectro",
+ "1": "Dibuja o selecciona una estructura para nombrarla.",
+ "2": "No se pudieron calcular los nombres",
+ "3": "FormChem no tiene nombre para esta estructura.",
+ "4": "Copiar nombre",
+ "5": "Nombre copiado: {0}",
+ "6": "Nombre químico que insertar; omítelo para abrir el cuadro de diálogo",
+ "7": "Copia como texto sin formato el nombre de la estructura seleccionada (o de las estructuras de la página): el nombre común cuando FormChem conoce uno y, si no, su nombre sistemático, que solo se ofrece cuando se vuelve a leer como la misma estructura.",
+ "8": "trivial o systematic para elegir qué nombre copiar; omítelo para usar el primero",
+ "9": "El espectro predicho está actualizado.",
+ "10": "Actualizar espectro predicho",
+ "11": "Selecciona primero una estructura",
+ "12": "Selecciona primero un espectro predicho",
+ "13": "Se añadió el espectro de RMN de 1H predicho ({0})",
+ "14": "Se añadió el espectro de RMN de 13C predicho ({0})",
+ "15": "Espectro predicho actualizado ({0})",
+ "16": "Id del fragmento de la estructura; por defecto, la estructura seleccionada o la única de la página",
+ "17": "Frecuencia del espectrómetro en MHz (por defecto 400 para 1H y 100 para 13C)",
+ "18": "Añade junto a la estructura seleccionada un espectro de RMN de 1H predicho, en un solo paso de deshacer: un objeto espectro calculado con las reglas de incrementos propias de FormChem (sin base de datos de desplazamientos), cuyos multipletes e integrales están vinculados a los átomos de la estructura y cuyo título indica el método, la versión y la frecuencia. La curva se vuelve a calcular a partir de la estructura y nunca se almacena.",
+ "19": "Añade junto a la estructura seleccionada un espectro de RMN de 13C predicho, en un solo paso de deshacer: un objeto espectro calculado con las reglas de incrementos propias de FormChem (sin base de datos de desplazamientos), cuyos picos están vinculados a los átomos de la estructura y cuyo título indica el método, la versión y la frecuencia. La curva se vuelve a calcular a partir de la estructura y nunca se almacena.",
+ "20": "No se pudo predecir el espectro",
+ "21": "Predecir espectro de RMN de 1H",
+ "22": "Predecir espectro de RMN de 13C",
+ "23": "Vuelve a calcular los multipletes, las integrales o los picos de un espectro predicho después de que cambie su estructura, con la versión actual del predictor, en un solo paso de deshacer; no cambia nada si ya está actualizado.",
+ "24": "Id del espectro predicho; por defecto, el seleccionado o el abierto en el editor de espectros",
+ "25": "No se pudo actualizar el espectro",
+ "26": "No hay picos nuevos en ese intervalo.",
+ "27": "Arrastra por un intervalo en el editor de espectros para integrarlo.",
+ "28": "Vincular pico a átomos",
+ "29": "Desvincular pico",
+ "30": "Eje Y del espectro",
+ "31": "Espectro desde archivo...",
+ "32": "Editar espectro...",
+ "33": "Detectar picos",
+ "34": "Integrar",
+ "35": "Transmitancia o absorbancia",
+ "36": "Exportar espectro...",
+ "37": "Selecciona primero un espectro",
+ "38": "no hay ningún espectro con el id {0}",
+ "39": "Picos detectados: {0} (ya existentes: {1})",
+ "40": "Picos detectados: {0}",
+ "41": "Las integrales son para espectros de RMN",
+ "42": "Selecciona primero un pico, una integral o un multiplete en el editor de espectros",
+ "43": "Todos los átomos deben pertenecer a una misma estructura",
+ "44": "Solo los espectros de IR, Raman y UV-Vis alternan entre transmitancia y absorbancia",
+ "45": "Exportado: {0}",
+ "46": "Id del objeto espectro; por defecto, el espectro seleccionado o el abierto en el editor de espectros",
+ "47": "Importa un archivo de espectro JCAMP-DX al dibujo activo (un objeto espectro por bloque de datos, con el archivo conservado byte a byte), con un paso de deshacer por archivo. Sin path abre un cuadro de diálogo de archivo.",
+ "48": "Ruta absoluta de un archivo .jdx, .dx o .jcamp",
+ "49": "No se pudo importar el espectro",
+ "50": "Abre el editor de espectros para el espectro seleccionado (equivale a hacerle doble clic).",
+ "51": "No se pudo abrir el espectro",
+ "52": "Busca los picos de un espectro en un intervalo (por defecto el visible) y los añade a su lista de picos, omitiendo los que ya están, en un solo paso de deshacer.",
+ "53": "Inicio del intervalo en la unidad de x (cm-1, nm, m/z, ppm)",
+ "54": "Fin del intervalo en la unidad de x",
+ "55": "Umbral de detección opcional en unidades de y",
+ "56": "Reemplaza la lista de picos en lugar de añadir a ella",
+ "57": "No se pudieron detectar los picos",
+ "58": "Añade una integral de RMN sobre un intervalo, escalada como las integrales existentes (o a value, reescalando el resto), en un solo paso de deshacer. Sin from y to cambia el editor de espectros a su herramienta de integración.",
+ "59": "Inicio del intervalo en ppm",
+ "60": "Fin del intervalo en ppm",
+ "61": "Valor que debe indicar esta integral, por ejemplo un número de protones",
+ "62": "No se pudo integrar",
+ "63": "Vincula un pico, una integral o un multiplete a átomos de una estructura, en un solo paso de deshacer. Sin atoms usa los átomos seleccionados o espera a que la persona haga clic en átomos del dibujo.",
+ "64": "Id del pico, la integral o el multiplete; por defecto, el seleccionado en el editor de espectros",
+ "65": "Id de la estructura (fragmento) a la que pertenecen los átomos",
+ "66": "Ids de los átomos",
+ "67": "No se pudo vincular el pico",
+ "68": "Quita el vínculo con átomos de un pico, una integral o un multiplete, en un solo paso de deshacer.",
+ "69": "No se pudo desvincular el pico",
+ "70": "Muestra un espectro de IR, Raman o UV-Vis como transmitancia o absorbancia (alterna si no se indica mode), en un solo paso de deshacer.",
+ "71": "Eje Y que mostrar; omítelo para alternar",
+ "72": "No se pudo cambiar el eje y",
+ "73": "Guarda un espectro como JCAMP-DX (con su tabla de picos cuando tiene picos) o como CSV de todos los puntos, a través del motor.",
+ "74": "Formato de archivo; por defecto jdx",
+ "75": "Con jdx: el archivo importado original, sin modificar",
+ "76": "Ruta absoluta donde escribir; omítela para preguntar",
+ "77": "No se pudo exportar el espectro",
+ "78": "Insertar espectro desde archivo",
+ "79": "El archivo no contiene ningún espectro que FormChem pueda dibujar",
+ "80": "Insertar espectro",
+ "81": "No se pudo colocar el espectro: su archivo no llegó al dibujo.",
+ "82": "Espectros insertados: {0}",
+ "83": "Longitud de onda (µm)",
+ "84": "Número de onda (cm⁻¹)",
+ "85": "Desplazamiento Raman (cm⁻¹)",
+ "86": "Longitud de onda (nm)",
+ "87": "Frecuencia (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmitancia (%)",
+ "90": "Transmitancia",
+ "91": "Absorbancia",
+ "92": "Abundancia relativa (%)",
+ "93": "Intensidad",
+ "94": "RMN de {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Predicho: {0}, {1} MHz ({2})",
+ "100": "Predicho: {0}, {1} MHz",
+ "101": "Predicho: {0} ({1})",
+ "102": "Predicho: {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Espectro no disponible: {0}",
+ "105": "Cargando espectro",
+ "106": "Nombre común",
+ "107": "Sistemático",
+ "108": "Confianza alta",
+ "109": "Confianza media",
+ "110": "Confianza baja",
+ "111": "No se leyó",
+ "112": "Nombres de FormChem",
+ "113": "No se pudo leer el nombre",
+ "114": "Insertar estructura desde nombre",
+ "115": "Estructura desde nombre",
+ "116": "Un nombre, como aspirina o 2-metilpropan-1-ol",
+ "117": "Nombre químico",
+ "118": "Escribe un nombre para ver su estructura.",
+ "119": "No hay estructura para este nombre",
+ "120": "Diccionario",
+ "121": "Analizador sistemático",
+ "122": "Nominador por reglas, con comprobación de ida y vuelta",
+ "123": "Herramientas de espectro",
+ "124": "Mostrar todo el espectro",
+ "125": "Eje Y",
+ "126": "Mostrar este intervalo en la página",
+ "127": "Haz doble clic en un espectro del dibujo para editarlo aquí.",
+ "128": "Picos e integrales",
+ "129": "Predicho",
+ "130": "Valor de la integral",
+ "131": "Vincular a átomos",
+ "132": "Desvincular",
+ "133": "1 átomo",
+ "134": "Átomos que vincular",
+ "135": "Haz clic en más átomos y después en Listo.",
+ "136": "Haz clic en los átomos del dibujo que pertenecen a este pico y después en Listo.",
+ "137": "No hay nada que integrar en ese intervalo.",
+ "138": "Quitar pico",
+ "139": "Añadir pico",
+ "140": "Vinculado a 1 átomo",
+ "141": "Definir intervalo del espectro",
+ "142": "Escribe un número positivo.",
+ "143": "No se pudo definir la integral",
+ "144": "Desplazar y ampliar: arrastra para desplazar, usa la rueda para ampliar, Shift y arrastrar para ampliar un intervalo",
+ "145": "Ampliar un intervalo: arrastra por el gráfico",
+ "146": "Detectar picos: arrastra por un intervalo",
+ "147": "Añadir o quitar un pico: haz clic cerca de un pico",
+ "148": "Integrar: arrastra por un intervalo",
+ "149": "Pico",
+ "150": "Integral",
+ "151": "Multiplete",
+ "152": "{0} átomos",
+ "153": "Vinculado a {0}",
+ "154": "Arrastra para desplazar, usa la rueda para ampliar, Shift y arrastrar para ampliar un intervalo. Haz clic en una etiqueta para seleccionarla.",
+ "155": "Arrastra por el gráfico para ampliar ese intervalo.",
+ "156": "Arrastra por un intervalo para detectar sus picos.",
+ "157": "Haz clic cerca de un pico para añadirlo; haz clic en la etiqueta de un pico para quitarlo.",
+ "158": "Arrastra por un intervalo para integrarlo.",
+ "159": "Vinculado a {0} átomos"
+}
diff --git a/frontend/src/i18n/locales/es/part13.json b/frontend/src/i18n/locales/es/part13.json
new file mode 100644
index 00000000..57d9d785
--- /dev/null
+++ b/frontend/src/i18n/locales/es/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "el motor devolvió un archivo vacío",
+ "1": "el nombre tiene más de {0} caracteres",
+ "2": "los fragmentos de más de {0} átomos no se nombran",
+ "3": "La estructura contiene etiquetas, grupos R o átomos cualesquiera, que no tienen nombre.",
+ "4": "No se pudo leer la estructura como una molécula (comprueba las valencias).",
+ "5": "No hay ninguna estructura que nombrar.",
+ "6": "Los nombres de índice invertidos (primero el compuesto original, luego una coma y los sustituyentes) no se leen; escribe el nombre en orden normal, como 1,2-diclorobenceno.",
+ "7": "D- y L- solo se leen para los aminoácidos y azúcares del diccionario de FormChem; indica descriptores R o S para otros nombres.",
+ "8": "FormChem leyó el nombre completo, pero no forma el nombre de una estructura completa (puede faltar un compuesto original como hexano o benceno, o un sufijo).",
+ "9": "FormChem no pudo leer el nombre a partir del carácter {0} (\"{1}\").",
+ "10": "FormChem leyó el nombre, pero {0}.",
+ "11": "no se pudo completar la estructura",
+ "12": "El nombre se puede leer de más de una manera; FormChem dibujó la lectura con menos suposiciones.",
+ "13": "El nombre no da descriptores estereoquímicos, así que los estereocentros y los dobles enlaces se dibujan sin especificar.",
+ "14": "No hay nombre sistemático: {0}.",
+ "15": "El nombre sistemático que construyó FormChem no se volvió a leer como la misma estructura, así que no se muestra.",
+ "16": "ese doble enlace no puede ser E ni Z",
+ "17": "el localizador del descriptor {0} no es una posición del compuesto original",
+ "18": "la posición {0} no inicia un doble enlace que pueda ser E o Z",
+ "19": "{0} necesita exactamente un doble enlace que pueda ser cis o trans; esta estructura tiene {1}",
+ "20": "{0} no está claro para este doble enlace; indica E o Z en su lugar",
+ "21": "({0}) necesita un localizador: la estructura tiene {1} estereocentros",
+ "22": "la posición {0} no es un estereocentro, así que no se puede aplicar ({1})",
+ "23": "({0}) necesita un localizador: la estructura tiene {1} dobles enlaces que pueden ser E o Z",
+ "24": "la posición {0} no puede tener {1}",
+ "25": "ese doble enlace no puede tener {0}",
+ "26": "{0} no indica qué configuración se quiere decir, así que la estructura se dibuja sin estereoquímica.",
+ "27": "{0} no tiene punto de unión",
+ "28": "no hay sitio para {0} en {1}",
+ "29": "{0} no puede enlazarse ahí",
+ "30": "las cadenas de más de {0} carbonos aún no se leen",
+ "31": "{0} es demasiado pequeño para ser un anillo",
+ "32": "{0}-{1} es un tautómero que FormChem aún no dibuja a partir de un nombre",
+ "33": "el localizador {0} no es una posición de {1}",
+ "34": "{0} no es una posición de la cadena",
+ "35": "un enlace múltiple no puede empezar en la posición {0} de {1}",
+ "36": "la posición {0} de {1} no puede llevar ese enlace múltiple",
+ "37": "no hay sitio para un enlace múltiple en la posición {0} de {1}",
+ "38": "no hay sitio para los enlaces múltiples de {0}",
+ "39": "No se indicaron las posiciones de los enlaces múltiples de {0}; se dibujaron en las posiciones más bajas.",
+ "40": "-{0} necesita una cadena abierta; en un anillo el sufijo es carbaldehído, ácido carboxílico, carbonitrilo o carboxamida",
+ "41": "una cadena solo tiene dos extremos para -{0}",
+ "42": "{0} es demasiado corto para dos grupos -{1}",
+ "43": "no hay sitio para -{0} en {1}",
+ "44": "No se indicó la posición de -{0} en {1}; se dibujó en la posición más baja.",
+ "45": "-{0} debe estar al final de la cadena, no en {1}",
+ "46": "no hay sitio para -{0} en {1}",
+ "47": "orto, meta y para necesitan un anillo de benceno",
+ "48": "orto, meta o para con un solo grupo necesita un compuesto original como fenol, anilina o tolueno",
+ "49": "no hay sitio para {0} en {1}",
+ "50": "no hay sitio para {0} grupos {1} en {2}",
+ "51": "No se indicó la posición de {0} en {1}; se dibujó en la posición libre más baja.",
+ "52": "{0} no puede llevar sustituyentes",
+ "53": "un grupo acilo se une por su carbono carbonílico",
+ "54": "{0} no tiene ninguna posición libre",
+ "55": "No se indicó la posición de unión de {0}; se supuso la posición {1}.",
+ "56": "a {0} no le queda sitio para unirse",
+ "57": "los localizadores {0} antes de {1} no se usan",
+ "58": "{0} no puede ir como palabra independiente",
+ "59": "\"{0}\" necesita {1} grupo delante, el nombre da {2}",
+ "60": "\"{0}\" necesita {1} grupos delante, el nombre da {2}",
+ "61": "el nombre da {0} grupo alquilo para {1} posición de éster",
+ "62": "el nombre da {0} grupo alquilo para {1} posiciones de éster",
+ "63": "el nombre da {0} grupos alquilo para {1} posición de éster",
+ "64": "el nombre da {0} grupos alquilo para {1} posiciones de éster",
+ "65": "la estructura que describe no es válida ({0})",
+ "66": "-ona en {0} sería un aldehído; un aldehído se nombra con -al",
+ "67": "la posición {0} de {1}",
+ "68": "demasiados sustituyentes idénticos",
+ "69": "localizadores mezclados",
+ "70": "los tipos de enlace poco habituales aún no se nombran",
+ "71": "un sistema de anillos que FormChem aún no puede nombrar",
+ "72": "los anillos aromáticos con dobles enlaces exocíclicos (como las piridonas) aún no se nombran",
+ "73": "los isótopos y los radicales aún no se nombran",
+ "74": "los halógenos hipervalentes no se nombran",
+ "75": "los grupos de nitrógeno con carga distintos del nitro aún no se nombran",
+ "76": "los átomos con carga aún no se nombran",
+ "77": "los óxidos de azufre, nitrógeno y fósforo aún no se nombran",
+ "78": "este grupo de oxígeno aún no se nombra",
+ "79": "los sulfóxidos, las sulfonas y otros grupos de azufre aún no se nombran",
+ "80": "las iminas, los compuestos azo y grupos de nitrógeno similares aún no se nombran",
+ "81": "{0} aún no se nombra",
+ "82": "las cadenas de sustituyentes de más de 20 carbonos no se nombran",
+ "83": "los grupos acilo insaturados aún no se nombran",
+ "84": "los grupos ilideno sustituidos aún no se nombran",
+ "85": "los grupos ilideno de anillo aún no se nombran",
+ "86": "los anillos unidos dos veces aún no se nombran",
+ "87": "no se encontró numeración para un sustituyente de anillo",
+ "88": "los ésteres con partes alcohólicas distintas aún no se nombran",
+ "89": "no se encontró ninguna cadena ni anillo principal",
+ "90": "los ésteres cíclicos (lactonas) aún no se nombran",
+ "91": "los sustituyentes en más de un nitrógeno de amina o amida aún no se nombran",
+ "92": "los estereocentros fuera de la cadena o del anillo principal aún no se nombran",
+ "93": "la geometría de doble enlace fuera de la cadena principal aún no se nombra",
+ "94": "los centros pseudoasimétricos aún no se nombran",
+ "95": "esta geometría de doble enlace aún no se nombra",
+ "96": "las cadenas de más de 20 carbonos no se nombran",
+ "97": "demasiados grupos idénticos",
+ "98": "la estructura tiene errores de valencia",
+ "99": "las sales y las mezclas aún no se nombran de forma sistemática",
+ "100": "las estructuras con más de {0} átomos pesados aún no se nombran de forma sistemática",
+ "101": "los compuestos de {0} aún no se nombran de forma sistemática",
+ "102": "los átomos de consulta y los grupos R no tienen nombre",
+ "103": "los hidruros de un solo heteroátomo se nombran solo a partir del diccionario",
+ "104": "{0} no es un objeto de este dibujo.",
+ "105": "{0} no tiene átomos.",
+ "106": "El fragmento no tiene átomos.",
+ "107": "El dibujo no tiene página.",
+ "108": "{0} no es un espectro de este dibujo.",
+ "109": "La estructura {0} a la que pertenece esta predicción ya no está en el dibujo.",
+ "110": "Se cerró el dibujo {0}.",
+ "111": "Desplazamiento químico (ppm)",
+ "112": "Tiempo (s)",
+ "113": "Reflectancia",
+ "114": "Abundancia relativa",
+ "115": "##{0}= aparece más de una vez; se conservó el primer valor.",
+ "116": "##XYDATA={0} no es una lista de variables conocida; se leyó como (X++(Y..Y)).",
+ "117": "##{0}={1} no es una lista de variables conocida; se leyó como (XY..XY).",
+ "118": "Los puntos no estaban en orden de x y se ordenaron.",
+ "119": "No se pudo leer ##.SHIFT REFERENCE={0}; los desplazamientos no se referenciaron.",
+ "120": "##.SHIFT REFERENCE señala el punto {0}, fuera de los {1} puntos; los desplazamientos no se referenciaron.",
+ "121": "Los desplazamientos se referenciaron de modo que el punto {0} indica {1} ppm ({2}).",
+ "122": "El archivo no indica el núcleo observado.",
+ "123": "Son datos de RMN en el dominio del tiempo (una FID); se muestran tal como se adquirieron, sin transformada de Fourier.",
+ "124": "Las frecuencias en Hz se dividieron entre la frecuencia de observación ({0} MHz) para obtener ppm.",
+ "125": "No hay ##.SHIFT REFERENCE; se tomaron 0 Hz como 0 ppm.",
+ "126": "No hay ##.OBSERVE FREQUENCY, así que el eje de desplazamiento sigue en Hz.",
+ "127": "La transmitancia estaba almacenada como fracción y se muestra como porcentaje.",
+ "128": "El bloque {0} contiene más de {1} puntos.",
+ "129": "##DATA TYPE={0} con unidades de x {1} no corresponde a ninguna técnica conocida; se dibuja como un espectro simple.",
+ "130": "##BLOCKS={0} pero el bloque LINK contiene {1} bloques; se leyeron todos los bloques encontrados.",
+ "131": "No es un archivo JCAMP-DX: no tiene ningún registro ##TITLE=.",
+ "132": "El archivo contiene {0} bloques uno tras otro sin un bloque LINK; se leyó cada uno.",
+ "133": "Dos bloques comparten un mismo ##BLOCK_ID.",
+ "134": "El archivo no contiene ningún espectro que FormChem pueda dibujar ({0}).",
+ "135": "El bloque \"{0}\" no se dibujó: {1}.",
+ "136": "un bloque de estructura (JCAMP-CS); se conserva en el archivo, pero no se dibuja",
+ "137": "no contiene XYDATA, XYPOINTS, PEAK TABLE ni NTUPLES",
+ "138": "su tabla de datos no contiene puntos",
+ "139": "su tabla NTUPLES no declara símbolos",
+ "140": "los espectros NTUPLES 2D aún no son compatibles",
+ "141": "su tabla NTUPLES no tiene páginas legibles",
+ "142": "El archivo contiene caracteres fuera de ASCII; se leyó como UTF-8.",
+ "143": "El archivo contiene bytes que no son ASCII ni UTF-8; se leyó como Latin-1.",
+ "144": "Se ignoraron las líneas fuera de cualquier registro de datos con etiqueta.",
+ "145": "Se ignoró un ##END= sin un bloque anterior.",
+ "146": "Se ignoraron los registros anteriores al primer ##TITLE= o posteriores al último ##END=.",
+ "147": "El archivo termina sin ##END=; se cerraron los bloques abiertos.",
+ "148": "Página NTUPLES {0}",
+ "149": "La página {0} de NTUPLES no tiene ##DATA TABLE=; se omitió.",
+ "150": "La página {0} de NTUPLES usa símbolos ({1}) no declarados en ##SYMBOL=; se omitió.",
+ "151": "{0} tiene una forma de tabla de datos que FormChem no lee ({1}); se omitió.",
+ "152": "La tabla NTUPLES no tiene ##END NTUPLES=; se leyó hasta el final del bloque.",
+ "153": "La tabla NTUPLES no tiene lista ##SYMBOL=.",
+ "154": "Es un espectro 2D (dos variables independientes); los espectros 2D no se dibujan en esta versión.",
+ "155": "La tabla NTUPLES tiene {0} páginas; solo se leyeron las primeras {1}.",
+ "156": "La página imaginaria no comparte los valores de x de la página real; se dejó fuera.",
+ "157": "La tabla NTUPLES contiene {0} páginas; se muestra la página {1} y se dejaron fuera otras {2} páginas.",
+ "158": "##DELTAX={0} difiere de (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; se usa el espaciado calculado.",
+ "159": "{0} no tiene FIRSTX, LASTX y NPOINTS completos; el espaciado procede de ##DELTAX.",
+ "160": "Una línea de datos empezó con un valor DIF; continúa desde el último valor de la línea anterior.",
+ "161": "Un valor de comprobación de Y no coincidía con el último valor de la línea anterior; la línea se continuó desde el valor anterior.",
+ "162": "No se pudieron leer {0} caracteres en {1} y se omitieron.",
+ "163": "Líneas DIF sin valor de comprobación de Y a continuación: {0}.",
+ "164": "{0} no contiene puntos de datos.",
+ "165": "{0} contiene {1} puntos, pero ##NPOINTS={2}; los valores de x de las líneas encajan con {3} puntos de FIRSTX a LASTX, así que se usó ese espaciado.",
+ "166": "{0} contiene {1} puntos, pero ##NPOINTS={2}; se conservaron los puntos leídos.",
+ "167": "El valor de x de una línea no coincide con su posición según FIRSTX y el espaciado; se usó la posición.",
+ "168": "{0} no tiene FIRSTX, LASTX y NPOINTS; el espaciado se tomó de los valores de x de las líneas.",
+ "169": "{0} no da forma de situar sus puntos en el eje x; se numeraron 0, 1, 2 y así sucesivamente.",
+ "170": "La primera línea empieza en x = {0}, pero ##FIRSTX={1}; se usó FIRSTX.",
+ "171": "El primer valor de Y {0} no coincide con ##FIRSTY={1}.",
+ "172": "{0} termina con un grupo incompleto de {1} valores; se descartó.",
+ "173": "No se pudo leer {0}: {1}.",
+ "174": "El espectro pide el bloque {0}, pero su archivo contiene 1 bloque.",
+ "175": "El espectro pide el bloque {0}, pero su archivo contiene {1} bloques.",
+ "176": "El espectro no tiene origen.",
+ "177": "El archivo {0} del espectro no está en el dibujo.",
+ "178": "No hay ningún predictor para {0} disponible en este motor.",
+ "179": "Falló la predicción: {0}",
+ "180": "El origen del espectro no es un archivo ni una predicción.",
+ "181": "El dibujo no tiene el espectro {0}.",
+ "182": "Los espectros de barras no tienen áreas que integrar.",
+ "183": "value debe ser mayor que cero.",
+ "184": "from y to deben ser dos valores de x distintos.",
+ "185": "El espectro no tiene la integral {0}.",
+ "186": "Este espectro no tiene archivo original; expórtalo sin original=1.",
+ "187": "FormChem coloca imágenes PNG, JPEG, GIF, WebP y SVG y espectros JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/es/part14.json b/frontend/src/i18n/locales/es/part14.json
new file mode 100644
index 00000000..620a43e3
--- /dev/null
+++ b/frontend/src/i18n/locales/es/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Visualización",
+ "1": "Superficie",
+ "2": "No hay nada que exportar: la vista 3D está vacía.",
+ "3": "Error al exportar",
+ "4": "Selecciona una estructura para mostrarla en 3D.",
+ "5": "Generar 3D",
+ "6": "Insertar vista 3D",
+ "7": "Elige un archivo PDB, mmCIF, SDF o MOL.",
+ "8": "No se pudo colocar la estructura 3D en la página",
+ "9": "Selecciona un objeto 3D abierto desde un archivo PDB o mmCIF.",
+ "10": "Este modelo no tiene ligandos.",
+ "11": "No se pudo extraer el ligando",
+ "12": "Aún no hay coordenadas 3D: Generar 3D crea un confórmero a partir del dibujo.",
+ "13": "Archivo de estructura 3D...",
+ "14": "Extraer ligando...",
+ "15": "Exportar estructura 3D...",
+ "16": "Barrido diedro...",
+ "17": "Medir en 3D",
+ "18": "Exportar vista 3D como PNG...",
+ "19": "Exportar vista 3D como glTF...",
+ "20": "Extraído {0}: {1} (órdenes de enlace inferidos)",
+ "21": "Extraído {0}: {1}",
+ "22": "Abre primero la vista 3D",
+ "23": "Abre el panel Vista 3D con la estructura seleccionada (o el objeto 3D seleccionado de la página) y sigue la selección. Una estructura necesita antes coordenadas 3D: Generar 3D las crea.",
+ "24": "Genera un confórmero 3D de la estructura seleccionada a partir de su dibujo 2D (conservando cuñas, geometría de dobles enlaces y cargas), lo minimiza con el campo de fuerzas elegido y lo guarda en el dibujo en un solo paso de deshacer; la vista 3D lo muestra.",
+ "25": "Minimiza el confórmero mostrado de la estructura seleccionada con el campo de fuerzas elegido en la vista 3D (MMFF94 por defecto, UFF cuando MMFF94 no tiene parámetros) e informa de la energía antes y después, en un solo paso de deshacer.",
+ "26": "Genera un conjunto de confórmeros de la estructura seleccionada (ETKDG, filtrado por RMSD, cada uno minimizado) y conserva los que están dentro de una ventana de energía; con n, window y method se ejecuta sin el cuadro de diálogo.",
+ "27": "Confórmeros que generar",
+ "28": "Ventana de energía en kcal/mol",
+ "29": "Coloca una vista 3D de la estructura seleccionada en la página, junto a ella (generando antes las coordenadas 3D si no las tiene), y abre el panel Vista 3D vinculado a ella; al girar o cambiar el estilo del modelo se actualiza la imagen de la página.",
+ "30": "Abre un archivo PDB, mmCIF, SDF o MOL como objeto 3D en la página (las proteínas como cinta y los ligandos como bolas y varillas, sin aguas y con el ligando enfocado) y lo muestra en la vista 3D.",
+ "31": "Convierte un ligando del objeto 3D seleccionado (abierto desde un archivo PDB o mmCIF) en una estructura 2D junto a él, en un solo paso de deshacer: órdenes de enlace a partir de una plantilla integrada para los ligandos comunes y, si no, inferidos de la geometría y notificados; las coordenadas del archivo pasan a ser su confórmero. Con ligand toma ese; sin él pregunta cuando el modelo tiene varios.",
+ "32": "Clave del ligando cadena:het:número, o un código het",
+ "33": "Selecciona un objeto 3D abierto desde un archivo PDB o mmCIF",
+ "34": "Guarda las coordenadas 3D de la estructura seleccionada con todos los hidrógenos: molfile MDL (el confórmero mostrado), archivo SD (todos los confórmeros, con campos de datos de energía y método), PDB o XYZ (el confórmero mostrado, o todos como modelos o fotogramas); un objeto 3D abierto desde un archivo PDB o mmCIF guarda su archivo original. Sin format pregunta.",
+ "35": "Formato de archivo",
+ "36": "Todos los confórmeros en lugar del mostrado (por defecto true para sdf)",
+ "37": "Barre el diedro de los cuatro átomos elegidos en la vista 3D (o su última medición de diedro) con minimización relajada y representa el ángulo frente a la energía.",
+ "38": "Mide una distancia (dos átomos), un ángulo (tres) o un diedro (cuatro) en la vista 3D y lo añade a la lista; con atoms (ids de átomos del fragmento como a1, hidrógenos como a1:h0, o números de serie PDB) mide esos; si no, pasa al modo de selección.",
+ "39": "De dos a cuatro ids de átomos",
+ "40": "Guarda la vista 3D como imagen PNG con su tamaño en pantalla; transparent omite el fondo.",
+ "41": "Guarda la vista 3D como archivo glTF 2.0 binario (.glb): átomos como esferas y enlaces como cilindros con los colores de los elementos, 1 ångström = 1 cm, para visores 3D, presentaciones e impresión.",
+ "42": "Sin superficie",
+ "43": "Quita la superficie molecular de la vista 3D.",
+ "44": "Superficie de van der Waals",
+ "45": "Muestra la superficie de van der Waals en la vista 3D.",
+ "46": "Superficie accesible al disolvente",
+ "47": "Muestra la superficie accesible al disolvente (sonda de 1,4 ångström) en la vista 3D.",
+ "48": "Superficie excluida del disolvente",
+ "49": "Muestra la superficie excluida del disolvente en la vista 3D.",
+ "50": "Superficie con mapa de ESP",
+ "51": "Colorea la superficie según un potencial electrostático aproximado calculado con las cargas parciales empíricas del motor (rojo negativo, azul positivo), con una leyenda que indica el método.",
+ "52": "Muestra la vista 3D en estilo alambre; en un objeto 3D de la página, la elección se guarda con él.",
+ "53": "Muestra la vista 3D en estilo varillas; en un objeto 3D de la página, la elección se guarda con él.",
+ "54": "Bolas y varillas",
+ "55": "Muestra la vista 3D en estilo de bolas y varillas; en un objeto 3D de la página, la elección se guarda con él.",
+ "56": "Relleno de espacio",
+ "57": "Muestra la vista 3D en estilo de relleno de espacio; en un objeto 3D de la página, la elección se guarda con él.",
+ "58": "Cinta",
+ "59": "Muestra la vista 3D en estilo de cinta (proteínas y ácidos nucleicos; los ligandos siguen como bolas y varillas); en un objeto 3D de la página, la elección se guarda con él.",
+ "60": "Ángulo diedro (grados)",
+ "61": "Energía relativa (kcal/mol)",
+ "62": "Mínimo {0}°",
+ "63": "Exportar estructura 3D",
+ "64": "Todos los confórmeros (registros SDF, modelos PDB, fotogramas XYZ)",
+ "65": "1 confórmero almacenado; todos los hidrógenos se escriben con su posición 3D.",
+ "66": "Extraer ligando",
+ "67": "Ligando",
+ "68": "El ligando pasa a ser una estructura 2D junto al modelo, con las coordenadas del archivo conservadas como su confórmero.",
+ "69": "Extraer",
+ "70": "Archivo SD (.sdf)",
+ "71": "Molfile MDL (.mol)",
+ "72": "{0} confórmeros almacenados; todos los hidrógenos se escriben con su posición 3D.",
+ "73": "Confórmeros",
+ "74": "Ventana de energía (kcal/mol)",
+ "75": "Incrustación ETKDG con semilla fija, duplicados casi idénticos eliminados con 0,5 Å de RMSD de átomos pesados, cada uno minimizado; el de menor energía pasa a ser el confórmero mostrado.",
+ "76": "Generar",
+ "77": "Perfil de energía del barrido diedro",
+ "78": "Barrido diedro",
+ "79": "Desde (grados)",
+ "80": "Hasta (grados)",
+ "81": "Paso (grados)",
+ "82": "Conservar cada punto como confórmero (un paso de deshacer)",
+ "83": "Ejecutar barrido",
+ "84": "Un barrido relajado: en cada ángulo se mantiene fijo el diedro y se minimiza todo lo demás.",
+ "85": "El ángulo final debe ser mayor que el inicial.",
+ "86": "Barriendo...",
+ "87": "Error en el barrido",
+ "88": "barrera {0} kcal/mol",
+ "89": "Estilo de visualización",
+ "90": "Colorear la superficie según el potencial electrostático a partir de cargas parciales empíricas",
+ "91": "ESP",
+ "92": "Minimizar",
+ "93": "Barrido...",
+ "94": "Enfocar el ligando",
+ "95": "Restablecer vista",
+ "96": "Girar",
+ "97": "Exportar la vista 3D",
+ "98": "Medir",
+ "99": "Mediciones",
+ "100": "Imagen PNG",
+ "101": "Imagen PNG, transparente",
+ "102": "glTF binario (.glb)",
+ "103": "El 3D necesita WebGL, que esta ventana no ofrece.",
+ "104": "Cargando el visor 3D...",
+ "105": "No se pudo cargar el visor 3D",
+ "106": "Abre un dibujo y selecciona una estructura para verla en 3D.",
+ "107": "Selecciona una estructura de la página para verla en 3D.",
+ "108": "No se pudo leer la estructura 3D",
+ "109": "Este confórmero no se puede escribir como molfile",
+ "110": "El giro está desactivado: el sistema pide movimiento reducido",
+ "111": "Un modelo PDB o CIF no tiene confórmeros.",
+ "112": "Energías relativas a la más baja; haz clic en una para mostrarla.",
+ "113": "Generar 3D o Confórmeros... rellenan esta lista.",
+ "114": "Cargas parciales no disponibles",
+ "115": "el motor aún no tiene rutas 3D",
+ "116": "sin converger",
+ "117": "Elige cuatro átomos enlazados seguidos (un diedro) y después pulsa Barrido.",
+ "118": "Marca Conservar cada punto como confórmero para ver las geometrías.",
+ "119": "Mostrar confórmero",
+ "120": "Actualizar vista 3D",
+ "121": "No se pudo actualizar la instantánea de la página",
+ "122": "Sin superficie",
+ "123": "Van der Waals",
+ "124": "Accesible al disolvente",
+ "125": "Excluida del disolvente",
+ "126": "Distancia",
+ "127": "Ángulo",
+ "128": "Diedro",
+ "129": "{0} kcal/mol, {1}, sin converger",
+ "130": "Elegidos {0} / {1}: {2}",
+ "131": "Haz clic en {0} átomos para medir",
+ "132": "ESP ({0}): {1}, rojo {2} e a azul +{3} e",
+ "133": "Distancia {0}: {1}",
+ "134": "Ángulo {0}: {1}",
+ "135": "Diedro {0}: {1}",
+ "136": "Generado: {0}",
+ "137": "Minimizado: {0}",
+ "138": "Confórmeros conservados: {0} de {1}",
+ "139": "Confórmeros conservados: {0}",
+ "140": "Diedro {0}",
+ "141": "Error al codificar el PNG"
+}
diff --git a/frontend/src/i18n/locales/es/part15.json b/frontend/src/i18n/locales/es/part15.json
new file mode 100644
index 00000000..b2412418
--- /dev/null
+++ b/frontend/src/i18n/locales/es/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "aproximado, a partir de cargas empíricas",
+ "1": "{0} estereocentro(s) o doble(s) enlace(s) estaban sin especificar; se eligió una configuración.",
+ "2": "{0} etiqueta(s) estereoquímica(s) del dibujo no se reproducen en 3D.",
+ "3": "Se generó el miembro dibujado del grupo o grupos de estereoquímica mejorada {0}; el modelo 3D es un estereoisómero de la mezcla (relativa o racémica) que describe el dibujo.",
+ "4": "Se incrustó {0} veces (semillas {1}) para conservar la estereoquímica dibujada.",
+ "5": "{0} par(es) de átomos pesados están más cerca que {1} de su contacto de van der Waals.",
+ "6": "Se usó el campo de fuerzas universal: {0}.",
+ "7": "sin parámetros de {0} para {1}",
+ "8": "{0} no pudo asignar tipo a todos los átomos",
+ "9": "{0} confórmero(s) cambiaron la estereoquímica dibujada durante la minimización y se descartaron.",
+ "10": "Más de 300 átomos pesados: la calidad del muestreo de confórmeros disminuye con este tamaño.",
+ "11": "El enlace central está en un anillo; el anillo se tensiona para seguir el ángulo.",
+ "12": "La estructura no tenía coordenadas 3D; el barrido empezó desde una incrustación nueva.",
+ "13": "La estructura cambió mientras se calculaba el 3D; ejecuta el comando de nuevo.",
+ "14": "El dibujo no tiene el objeto {0}.",
+ "15": "{0} aún no tiene coordenadas 3D; genera primero el 3D.",
+ "16": "{0} no tiene el confórmero {1}.",
+ "17": "La estructura no tiene átomos.",
+ "18": "El 3D necesita átomos reales: {0} átomo(s) son etiquetas, grupos R o puntos de unión ({1}).",
+ "19": "No se pudieron añadir los hidrógenos: {0}",
+ "20": "La estructura tiene {0} átomos con hidrógenos; el 3D admite hasta {1}.",
+ "21": "Las coordenadas 3D no encajan con esta estructura (nada para {0}); genera el 3D de nuevo.",
+ "22": "Las coordenadas 3D no encajan con esta estructura (cambió el número de hidrógenos); genera el 3D de nuevo.",
+ "23": "No se pudo incrustar la estructura en 3D: {0}",
+ "24": "No se pudo incrustar la estructura en 3D; comprueba sus valencias y su estereoquímica.",
+ "25": "No se pudieron incrustar los confórmeros: {0}",
+ "26": "No se pudo incrustar ningún confórmero; comprueba las valencias y la estereoquímica de la estructura.",
+ "27": "Todos los confórmeros incrustados perdieron la estereoquímica dibujada tras la minimización.",
+ "28": "Ningún campo de fuerzas tiene parámetros para esta estructura ({0}).",
+ "29": "No se pudo configurar el campo de fuerzas universal: {0}",
+ "30": "No se pudo configurar el campo de fuerzas universal.",
+ "31": "Átomo(s) desconocido(s) {0}; usa ids de átomos del fragmento o un hidrógeno como a1:h0.",
+ "32": "Los cuatro átomos deben ser distintos.",
+ "33": "Los cuatro átomos deben formar una cadena de enlaces (a1-a2-a3-a4).",
+ "34": "No se pudo escribir el archivo 3D: {0}",
+ "35": "El archivo no es un archivo PDB, mmCIF, SDF o MOL que FormChem pueda leer.",
+ "36": "El archivo tiene más de {0} átomos.",
+ "37": "El archivo PDB no tiene registros ATOM ni HETATM.",
+ "38": "La tabla atom_site de mmCIF no tiene las columnas Cartn_x, Cartn_y y Cartn_z.",
+ "39": "El CIF tiene coordenadas fraccionarias pero no una celda unidad completa.",
+ "40": "El CIF no tiene tabla atom_site.",
+ "41": "El CIF no tiene átomos legibles.",
+ "42": "El archivo no tiene registros.",
+ "43": "El archivo tiene {0} registros; la importación 3D lee hasta {1}.",
+ "44": "No se pudo leer ningún registro del archivo.",
+ "45": "{0} no es un archivo PDB ni mmCIF.",
+ "46": "{0} no se pudo convertir en un dibujo de FormChem: {1}.",
+ "47": "Modelo PDB colocado como objeto 3D: {0}.",
+ "48": "Modelo mmCIF colocado como objeto 3D: {0}.",
+ "49": "{0} línea(s) ATOM o HETATM tenían coordenadas ilegibles y se omitieron.",
+ "50": "{0} fila(s) de atom_site tenían coordenadas ilegibles y se omitieron.",
+ "51": "CIF de molécula pequeña: la unidad asimétrica se lee a partir de las coordenadas fraccionarias; no se generan los equivalentes por simetría.",
+ "52": "{0} tiene problemas de valencia; se leyó sin sanear.",
+ "53": "{0} solo tiene coordenadas 2D; no se conservó ningún confórmero.",
+ "54": "{0} hidrógeno(s) no estaban en el archivo y se colocaron a partir de la geometría.",
+ "55": "{0} no se pudo leer: {1}",
+ "56": "{0} no se pudo leer.",
+ "57": "Registro {0}",
+ "58": "La estructura",
+ "59": "Las coordenadas 3D del archivo se conservaron como el confórmero de 1 estructura; no hace falta Generar 3D para verlas.",
+ "60": "Las coordenadas 3D del archivo se conservaron como el confórmero de {0} estructuras; no hace falta Generar 3D para verlas.",
+ "61": "{0} es un ion simple; no hay ninguna estructura que extraer.",
+ "62": "No se pudieron leer los átomos de {0}.",
+ "63": "No hay ningún ligando {0} en la estructura; ligandos: {1}.",
+ "64": "El dibujo no tiene el modelo 3D {0}.",
+ "65": "FormChem coloca imágenes PNG, JPEG, GIF, WebP y SVG, espectros JCAMP-DX y archivos de estructura PDB, mmCIF, SDF y MOL."
+}
diff --git a/frontend/src/i18n/locales/fi/part12.json b/frontend/src/i18n/locales/fi/part12.json
new file mode 100644
index 00000000..6ffe48e4
--- /dev/null
+++ b/frontend/src/i18n/locales/fi/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spektri",
+ "1": "Piirrä tai valitse nimettävä rakenne.",
+ "2": "Nimiä ei voitu laskea",
+ "3": "FormChemillä ei ole nimeä tälle rakenteelle.",
+ "4": "Kopioi nimi",
+ "5": "Nimi kopioitu: {0}",
+ "6": "Lisättävä kemiallinen nimi; jätä pois avataksesi valintaikkunan",
+ "7": "Kopioi valitun rakenteen (tai sivun rakenteiden) nimen pelkkänä tekstinä: triviaalinimen, kun FormChem tuntee sellaisen, muuten systemaattisen nimen, joka tarjotaan vain, kun se lukeutuu takaisin samaksi rakenteeksi.",
+ "8": "trivial tai systematic valitsee kopioitavan nimen; jätä pois, niin saat ensimmäisen",
+ "9": "Ennustettu spektri on ajan tasalla.",
+ "10": "Päivitä ennustettu spektri",
+ "11": "Valitse ensin yksi rakenne",
+ "12": "Valitse ensin ennustettu spektri",
+ "13": "Ennustettu 1H NMR -spektri lisätty ({0})",
+ "14": "Ennustettu 13C NMR -spektri lisätty ({0})",
+ "15": "Ennustettu spektri päivitetty ({0})",
+ "16": "Rakenteen fragmentin tunniste; oletuksena valittu rakenne tai sivun ainoa rakenne",
+ "17": "Spektrometrin taajuus MHz:nä (oletus 400 1H:lle, 100 13C:lle)",
+ "18": "Lisää valitun rakenteen ennustetun 1H NMR -spektrin sen viereen yhtenä kumoamisvaiheena: FormChemin omilla inkrementtisäännöillä laskettu spektriobjekti (ei kemiallisten siirtymien tietokantaa), jonka multipletit ja integraalit on kytketty rakenteen atomeihin ja jonka otsikkona ovat menetelmä, versio ja taajuus. Käyrä lasketaan uudelleen rakenteesta eikä sitä koskaan tallenneta.",
+ "19": "Lisää valitun rakenteen ennustetun 13C NMR -spektrin sen viereen yhtenä kumoamisvaiheena: FormChemin omilla inkrementtisäännöillä laskettu spektriobjekti (ei kemiallisten siirtymien tietokantaa), jonka piikit on kytketty rakenteen atomeihin ja jonka otsikkona ovat menetelmä, versio ja taajuus. Käyrä lasketaan uudelleen rakenteesta eikä sitä koskaan tallenneta.",
+ "20": "Spektriä ei voitu ennustaa",
+ "21": "Ennusta 1H NMR -spektri",
+ "22": "Ennusta 13C NMR -spektri",
+ "23": "Laskee ennustetun spektrin multipletit, integraalit tai piikit uudelleen rakenteen muututtua käyttäen käynnissä olevaa ennustimen versiota, yhtenä kumoamisvaiheena; mikään ei muutu, kun spektri on ajan tasalla.",
+ "24": "Ennustetun spektrin tunniste; oletuksena valittu tai spektrieditorissa auki oleva",
+ "25": "Spektriä ei voitu päivittää",
+ "26": "Ei uusia piikkejä tällä alueella.",
+ "27": "Integroi alue vetämällä sen yli spektrieditorissa.",
+ "28": "Kytke piikki atomeihin",
+ "29": "Poista piikin kytkentä",
+ "30": "Spektrin Y-akseli",
+ "31": "Spektri tiedostosta...",
+ "32": "Muokkaa spektriä...",
+ "33": "Poimi piikit",
+ "34": "Integroi",
+ "35": "Transmittanssi tai absorbanssi",
+ "36": "Vie spektri...",
+ "37": "Valitse ensin spektri",
+ "38": "ei spektriä tunnisteella {0}",
+ "39": "Piikkejä poimittu: {0} (jo olemassa: {1})",
+ "40": "Piikkejä poimittu: {0}",
+ "41": "Integraalit koskevat NMR-spektrejä",
+ "42": "Valitse ensin piikki, integraali tai multipletti spektrieditorissa",
+ "43": "Kaikkien atomien on kuuluttava samaan rakenteeseen",
+ "44": "Vain IR-, Raman- ja UV-Vis-spektrit voivat vaihtaa transmittanssin ja absorbanssin välillä",
+ "45": "Viety: {0}",
+ "46": "Spektriobjektin tunniste; oletuksena valittu spektri tai spektrieditorissa auki oleva",
+ "47": "Tuo JCAMP-DX-spektritiedoston aktiiviseen piirrokseen (yksi spektriobjekti datalohkoa kohti, tiedosto säilytetään tavu tavulta) yhtenä kumoamisvaiheena tiedostoa kohti. Ilman path-parametria avautuu tiedostoikkuna.",
+ "48": "Tiedoston .jdx, .dx tai .jcamp absoluuttinen polku",
+ "49": "Spektriä ei voitu tuoda",
+ "50": "Avaa spektrieditorin valitulle spektrille (sama kuin sen kaksoisnapsauttaminen).",
+ "51": "Spektriä ei voitu avata",
+ "52": "Etsii spektrin piikit alueelta (oletuksena näkyvä alue) ja lisää ne sen piikkiluetteloon ohittaen jo olemassa olevat piikit, yhtenä kumoamisvaiheena.",
+ "53": "Alueen alku x-yksikössä (cm-1, nm, m/z, ppm)",
+ "54": "Alueen loppu x-yksikössä",
+ "55": "Valinnainen havaitsemiskynnys y-yksiköissä",
+ "56": "Korvaa piikkiluettelo sen sijaan, että siihen lisättäisiin",
+ "57": "Piikkejä ei voitu poimia",
+ "58": "Lisää NMR-integraalin alueelle, skaalattuna kuten nykyiset integraalit (tai arvoon value, jolloin loput skaalataan uudelleen), yhtenä kumoamisvaiheena. Ilman from- ja to-parametreja spektrieditori siirtyy integrointityökaluun.",
+ "59": "Alueen alku ppm:nä",
+ "60": "Alueen loppu ppm:nä",
+ "61": "Arvo, jonka tämän integraalin tulee näyttää, esimerkiksi protonien lukumäärä",
+ "62": "Integrointi ei onnistunut",
+ "63": "Kytkee piikin, integraalin tai multipletin rakenteen atomeihin yhtenä kumoamisvaiheena. Ilman atoms-parametria käytetään valittuja atomeja tai odotetaan, että käyttäjä napsauttaa atomeja piirroksessa.",
+ "64": "Piikin, integraalin tai multipletin tunniste; oletuksena spektrieditorissa valittu",
+ "65": "Sen rakenteen (fragmentin) tunniste, johon atomit kuuluvat",
+ "66": "Atomien tunnisteet",
+ "67": "Piikkiä ei voitu kytkeä",
+ "68": "Poistaa piikin, integraalin tai multipletin atomikytkennän yhtenä kumoamisvaiheena.",
+ "69": "Piikin kytkentää ei voitu poistaa",
+ "70": "Näyttää IR-, Raman- tai UV-Vis-spektrin transmittanssina tai absorbanssina (vaihtaa, kun mode jätetään pois) yhtenä kumoamisvaiheena.",
+ "71": "Näytettävä Y-akseli; jätä pois vaihtaaksesi",
+ "72": "Y-akselia ei voitu vaihtaa",
+ "73": "Tallentaa spektrin JCAMP-DX-muodossa (piikkitaulukon kanssa, kun siinä on piikkejä) tai CSV-muodossa kaikkien pisteiden kanssa moottorin kautta.",
+ "74": "Tiedostomuoto, oletus jdx",
+ "75": "Muodolla jdx: alkuperäinen tuotu tiedosto koskemattomana",
+ "76": "Kirjoitettava absoluuttinen polku; jätä pois, niin kysytään",
+ "77": "Spektriä ei voitu viedä",
+ "78": "Lisää spektri tiedostosta",
+ "79": "Tiedostossa ei ole spektriä, jonka FormChem voi piirtää",
+ "80": "Lisää spektri",
+ "81": "Spektriä ei voitu sijoittaa: sen tiedosto ei päässyt piirrokseen.",
+ "82": "Spektrejä lisätty: {0}",
+ "83": "Aallonpituus (µm)",
+ "84": "Aaltoluku (cm⁻¹)",
+ "85": "Ramansiirtymä (cm⁻¹)",
+ "86": "Aallonpituus (nm)",
+ "87": "Taajuus (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmittanssi (%)",
+ "90": "Transmittanssi",
+ "91": "Absorbanssi",
+ "92": "Suhteellinen runsaus (%)",
+ "93": "Intensiteetti",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Ennustettu {0}, {1} MHz ({2})",
+ "100": "Ennustettu {0}, {1} MHz",
+ "101": "Ennustettu {0} ({1})",
+ "102": "Ennustettu {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spektri ei ole käytettävissä: {0}",
+ "105": "Ladataan spektriä",
+ "106": "Triviaalinimi",
+ "107": "Systemaattinen",
+ "108": "Korkea varmuus",
+ "109": "Keskitason varmuus",
+ "110": "Matala varmuus",
+ "111": "Ei luettu",
+ "112": "FormChemin nimet",
+ "113": "Nimeä ei voitu lukea",
+ "114": "Lisää rakenne nimestä",
+ "115": "Rakenne nimestä",
+ "116": "Nimi, esimerkiksi aspirin tai 2-methylpropan-1-ol",
+ "117": "Kemiallinen nimi",
+ "118": "Kirjoita nimi nähdäksesi sen rakenteen.",
+ "119": "Tälle nimelle ei ole rakennetta",
+ "120": "Sanakirja",
+ "121": "Systemaattinen jäsennin",
+ "122": "Sääntöpohjainen nimeäjä, paluulukutarkistettu",
+ "123": "Spektrityökalut",
+ "124": "Näytä koko spektri",
+ "125": "Y-akseli",
+ "126": "Näytä tämä alue sivulla",
+ "127": "Muokkaa spektriä täällä kaksoisnapsauttamalla sitä piirroksessa.",
+ "128": "Piikit ja integraalit",
+ "129": "Ennustettu",
+ "130": "Integraalin arvo",
+ "131": "Kytke atomeihin",
+ "132": "Poista kytkentä",
+ "133": "1 atomi",
+ "134": "Kytkettävät atomit",
+ "135": "Napsauta lisää atomeja ja sitten Valmis.",
+ "136": "Napsauta piirroksessa atomeja, jotka kuuluvat tähän piikkiin, ja sitten Valmis.",
+ "137": "Tällä alueella ei ole mitään integroitavaa.",
+ "138": "Poista piikki",
+ "139": "Lisää piikki",
+ "140": "Kytketty 1 atomiin",
+ "141": "Aseta spektrin alue",
+ "142": "Kirjoita positiivinen luku.",
+ "143": "Integraalia ei voitu asettaa",
+ "144": "Panoroi ja zoomaa: vedä panoroidaksesi, käytä rullaa zoomatessasi, Shift-veto zoomaa alueelle",
+ "145": "Zoomaa alueelle: vedä kuvaajan yli",
+ "146": "Poimi piikit: vedä alueen yli",
+ "147": "Lisää tai poista piikki: napsauta piikin lähellä",
+ "148": "Integroi: vedä alueen yli",
+ "149": "Piikki",
+ "150": "Integraali",
+ "151": "Multipletti",
+ "152": "{0} atomia",
+ "153": "Kytketty: {0}",
+ "154": "Vedä panoroidaksesi, käytä rullaa zoomatessasi, Shift-veto zoomaa alueelle. Valitse nimiö napsauttamalla sitä.",
+ "155": "Vedä kuvaajan yli zoomataksesi kyseiselle alueelle.",
+ "156": "Vedä alueen yli poimiaksesi sen piikit.",
+ "157": "Lisää piikki napsauttamalla sen lähellä; poista piikki napsauttamalla sen nimiötä.",
+ "158": "Vedä alueen yli integroidaksesi sen.",
+ "159": "Kytketty {0} atomiin"
+}
diff --git a/frontend/src/i18n/locales/fi/part13.json b/frontend/src/i18n/locales/fi/part13.json
new file mode 100644
index 00000000..dcb7caa1
--- /dev/null
+++ b/frontend/src/i18n/locales/fi/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "moottori palautti tyhjän tiedoston",
+ "1": "nimi on pidempi kuin {0} merkkiä",
+ "2": "yli {0} atomin fragmentteja ei nimetä",
+ "3": "Rakenne sisältää nimiöitä, R-ryhmiä tai mielivaltaisia atomeja, joilla ei ole nimeä.",
+ "4": "Rakennetta ei voitu lukea molekyylinä (tarkista valenssit).",
+ "5": "Ei ole nimettävää rakennetta.",
+ "6": "Käänteisiä hakemistonimiä (kantaosa ensin, sitten pilkku ja substituentit) ei lueta; kirjoita nimi tavallisessa järjestyksessä, esimerkiksi 1,2-dichlorobenzene.",
+ "7": "D- ja L- luetaan vain FormChemin sanakirjan aminohapoille ja sokereille; anna muille nimille R- tai S-deskriptorit.",
+ "8": "FormChem luki koko nimen, mutta se ei muodosta täydellistä rakennenimeä (kantaosa, kuten hexane tai benzene, tai pääte voi puuttua).",
+ "9": "FormChem ei voinut lukea nimeä merkistä {0} alkaen (\"{1}\").",
+ "10": "FormChem luki nimen, mutta {0}.",
+ "11": "rakennetta ei voitu täydentää",
+ "12": "Nimi voidaan lukea useammalla kuin yhdellä tavalla; FormChem piirsi tulkinnan, jossa on vähiten oletuksia.",
+ "13": "Nimi ei anna stereodeskriptoreita, joten stereokeskukset ja kaksoissidokset piirretään määrittelemättöminä.",
+ "14": "Ei systemaattista nimeä: {0}.",
+ "15": "FormChemin muodostama systemaattinen nimi ei lukeutunut takaisin samaksi rakenteeksi, joten sitä ei näytetä.",
+ "16": "tuo kaksoissidos ei voi olla E tai Z",
+ "17": "deskriptorin lokantti {0} ei ole kantaosan paikka",
+ "18": "paikka {0} ei aloita kaksoissidosta, joka voisi olla E tai Z",
+ "19": "{0} edellyttää täsmälleen yhtä kaksoissidosta, joka voi olla cis tai trans; tässä rakenteessa niitä on {1}",
+ "20": "{0} on epäselvä tälle kaksoissidokselle; anna sen sijaan E tai Z",
+ "21": "({0}) tarvitsee lokantin: rakenteessa on {1} stereokeskusta",
+ "22": "paikka {0} ei ole stereokeskus, joten ({1}) ei voi soveltua",
+ "23": "({0}) tarvitsee lokantin: rakenteessa on {1} kaksoissidosta, jotka voivat olla E tai Z",
+ "24": "paikalle {0} ei voi antaa määritettä {1}",
+ "25": "tuolle kaksoissidokselle ei voi antaa määritettä {0}",
+ "26": "{0} ei kerro, mitä konfiguraatiota tarkoitetaan, joten rakenne piirretään ilman stereokemiaa.",
+ "27": "{0} ei sisällä kiinnityskohtaa",
+ "28": "ryhmälle {0} ei ole tilaa kohdassa {1}",
+ "29": "{0} ei voi sitoutua tuohon",
+ "30": "yli {0} hiilen ketjuja ei vielä lueta",
+ "31": "{0} on liian pieni ollakseen rengas",
+ "32": "{0}-{1} on tautomeeri, jota FormChem ei vielä piirrä nimestä",
+ "33": "lokantti {0} ei ole kohteen paikka: {1}",
+ "34": "{0} ei ole ketjun paikka",
+ "35": "kerrannaissidos ei voi alkaa kohdasta {0}, kohde {1}",
+ "36": "paikka {0}, kohde {1}, ei voi kantaa tuota kerrannaissidosta",
+ "37": "kerrannaissidokselle ei ole tilaa paikassa {0}, kohde {1}",
+ "38": "kerrannaissidoksille ei ole tilaa, kohde: {0}",
+ "39": "Kohteen {0} kerrannaissidosten paikkoja ei annettu; piirretty pienimpiin paikkoihin.",
+ "40": "-{0} edellyttää avointa ketjua; renkaalla pääte on carbaldehyde, karboksyylihappo, carbonitrile tai karboksamidi",
+ "41": "ketjulla on vain kaksi päätä päätteelle -{0}",
+ "42": "{0} on liian lyhyt kahdelle ryhmälle -{1}",
+ "43": "ryhmälle -{0} ei ole tilaa kohteessa {1}",
+ "44": "Ryhmän -{0} paikkaa kohteessa {1} ei annettu; piirretty pienimpään paikkaan.",
+ "45": "-{0} on oltava ketjun päässä, ei paikassa {1}",
+ "46": "ryhmälle -{0} ei ole tilaa kohdassa {1}",
+ "47": "ortho, meta ja para edellyttävät bentseenirengasta",
+ "48": "ortho, meta tai para yhden ryhmän kanssa edellyttää kantaosaa, kuten phenol, aniline tai toluene",
+ "49": "ryhmälle {0} ei ole tilaa kohteessa {1}",
+ "50": "tilaa ei ole: {0} {1}-ryhmää, kohde {2}",
+ "51": "Ryhmän {0} paikkaa kohteessa {1} ei annettu; piirretty pienimpään vapaaseen paikkaan.",
+ "52": "{0} ei voi kantaa substituentteja",
+ "53": "asyyliryhmä kiinnittyy karbonyylihiilestään",
+ "54": "{0} ei sisällä vapaata paikkaa",
+ "55": "Ryhmän {0} kiinnityspaikkaa ei annettu; oletettu paikka {1}.",
+ "56": "{0} ei sisällä enää tilaa kiinnitykselle",
+ "57": "lokantteja {0} ennen kohdetta {1} ei käytetä",
+ "58": "{0} ei voi olla erillisenä sanana",
+ "59": "\"{0}\" tarvitsee eteensä {1} ryhmän, nimi antaa {2}",
+ "60": "\"{0}\" tarvitsee eteensä {1} ryhmää, nimi antaa {2}",
+ "61": "nimi antaa {0} alkyyliryhmän {1} esteripaikalle",
+ "62": "nimi antaa {0} alkyyliryhmän {1} esteripaikalle",
+ "63": "nimi antaa {0} alkyyliryhmää {1} esteripaikalle",
+ "64": "nimi antaa {0} alkyyliryhmää {1} esteripaikalle",
+ "65": "sen kuvaama rakenne ei ole kelvollinen ({0})",
+ "66": "-one paikassa {0} olisi aldehydi; aldehydi nimetään päätteellä -al",
+ "67": "paikka {0}, kohde {1}",
+ "68": "liian monta identtistä substituenttia",
+ "69": "sekalaiset lokantit",
+ "70": "epätavallisia sidostyyppejä ei vielä nimetä",
+ "71": "rengasjärjestelmä, jota FormChem ei vielä osaa nimetä",
+ "72": "aromaattisia renkaita, joissa on eksosyklisiä kaksoissidoksia (kuten pyridonit), ei vielä nimetä",
+ "73": "isotooppeja ja radikaaleja ei vielä nimetä",
+ "74": "hypervalentteja halogeeneja ei nimetä",
+ "75": "muita varauksellisia typpiryhmiä kuin nitroa ei vielä nimetä",
+ "76": "varauksellisia atomeja ei vielä nimetä",
+ "77": "rikin, typen ja fosforin oksideja ei vielä nimetä",
+ "78": "tätä happiryhmää ei vielä nimetä",
+ "79": "sulfoksideja, sulfoneja ja muita rikkiryhmiä ei vielä nimetä",
+ "80": "imiinejä, atsoryhmiä ja vastaavia typpiryhmiä ei vielä nimetä",
+ "81": "{0} ei ole vielä nimetty",
+ "82": "yli 20 hiilen substituenttiketjuja ei nimetä",
+ "83": "tyydyttymättömiä asyyliryhmiä ei vielä nimetä",
+ "84": "substituoituja ylideeniryhmiä ei vielä nimetä",
+ "85": "renkaan ylideeniryhmiä ei vielä nimetä",
+ "86": "kahdesti kiinnittyviä renkaita ei vielä nimetä",
+ "87": "rengassubstituentille ei löytynyt numerointia",
+ "88": "estereitä, joissa on erilaiset alkoholiosat, ei vielä nimetä",
+ "89": "kantaketjua tai kantarengasta ei löytynyt",
+ "90": "syklisiä estereitä (laktoneja) ei vielä nimetä",
+ "91": "substituentteja useammalla kuin yhdellä amiini- tai amiditypellä ei vielä nimetä",
+ "92": "kantaketjun tai kantarenkaan ulkopuolisia stereokeskuksia ei vielä nimetä",
+ "93": "kantaketjun ulkopuolista kaksoissidoksen geometriaa ei vielä nimetä",
+ "94": "pseudoasymmetrisiä keskuksia ei vielä nimetä",
+ "95": "tätä kaksoissidoksen geometriaa ei vielä nimetä",
+ "96": "yli 20 hiilen ketjuja ei nimetä",
+ "97": "liian monta identtistä ryhmää",
+ "98": "rakenteessa on valenssivirheitä",
+ "99": "suoloja ja seoksia ei vielä nimetä systemaattisesti",
+ "100": "rakenteita, joissa on yli {0} raskasta atomia, ei vielä nimetä systemaattisesti",
+ "101": "yhdisteitä, joiden alkuaine on {0}, ei vielä nimetä systemaattisesti",
+ "102": "kyselyatomeilla ja R-ryhmillä ei ole nimeä",
+ "103": "yksittäisten heteroatomien hydridit nimetään vain sanakirjasta",
+ "104": "Kohde {0} ei ole tämän piirroksen objekti.",
+ "105": "Kohteessa {0} ei ole atomeja.",
+ "106": "Fragmentissa ei ole atomeja.",
+ "107": "Piirroksessa ei ole sivua.",
+ "108": "Kohde {0} ei ole tämän piirroksen spektri.",
+ "109": "Rakenne {0}, johon tämä ennuste kuuluu, ei ole enää piirroksessa.",
+ "110": "Piirros {0} suljettiin.",
+ "111": "Kemiallinen siirtymä (ppm)",
+ "112": "Aika (s)",
+ "113": "Heijastus",
+ "114": "Suhteellinen runsaus",
+ "115": "##{0}= esiintyy useammin kuin kerran; ensimmäinen arvo säilytettiin.",
+ "116": "##XYDATA={0} ei ole tunnettu muuttujaluettelo; se luettiin muodossa (X++(Y..Y)).",
+ "117": "##{0}={1} ei ole tunnettu muuttujaluettelo; se luettiin muodossa (XY..XY).",
+ "118": "Pisteet eivät olleet x-järjestyksessä, ja ne lajiteltiin.",
+ "119": "##.SHIFT REFERENCE={0} ei voitu lukea; siirtymiä ei referoitu.",
+ "120": "##.SHIFT REFERENCE osoittaa pisteeseen {0}, {1} pisteen ulkopuolelle; siirtymiä ei referoitu.",
+ "121": "Siirtymät referoitiin niin, että piste {0} on {1} ppm ({2}).",
+ "122": "Tiedosto ei nimeä havaittua ydintä.",
+ "123": "Tämä on aika-alueen NMR-dataa (FID); se näytetään sellaisenaan ilman Fourier-muunnosta.",
+ "124": "Hz-taajuudet jaettiin havaintotaajuudella ({0} MHz) ppm-arvojen saamiseksi.",
+ "125": "##.SHIFT REFERENCE puuttuu; 0 Hz otettiin arvoksi 0 ppm.",
+ "126": "##.OBSERVE FREQUENCY puuttuu, joten siirtymäakseli pysyy Hz-yksikössä.",
+ "127": "Transmittanssi tallennettiin murtolukuna ja se näytetään prosentteina.",
+ "128": "Lohkossa {0} on yli {1} pistettä.",
+ "129": "##DATA TYPE={0} ja x-yksiköt {1} eivät nimeä tunnettua tekniikkaa; se piirretään tavallisena spektrinä.",
+ "130": "##BLOCKS={0}, mutta LINK-lohkossa on {1} lohkoa; kaikki löytyneet lohkot luettiin.",
+ "131": "Tämä ei ole JCAMP-DX-tiedosto: siinä ei ole ##TITLE=-tietuetta.",
+ "132": "Tiedostossa on {0} lohkoa peräkkäin ilman LINK-lohkoa; jokainen luettiin.",
+ "133": "Kahdella lohkolla on sama ##BLOCK_ID.",
+ "134": "Tiedostossa ei ole spektriä, jonka FormChem voi piirtää ({0}).",
+ "135": "Lohkoa \"{0}\" ei piirretty: {1}.",
+ "136": "rakennelohko (JCAMP-CS); se säilyy tiedostossa mutta sitä ei piirretä",
+ "137": "siinä ei ole XYDATA-, XYPOINTS-, PEAK TABLE- tai NTUPLES-tietoja",
+ "138": "sen datataulukossa ei ole pisteitä",
+ "139": "sen NTUPLES-taulukko ei esittele symboleja",
+ "140": "2D NTUPLES -spektrejä ei vielä tueta",
+ "141": "sen NTUPLES-taulukossa ei ole luettavia sivuja",
+ "142": "Tiedostossa on ASCII-merkistön ulkopuolisia merkkejä; se luettiin UTF-8:na.",
+ "143": "Tiedostossa on tavuja, jotka eivät ole ASCII:ta tai UTF-8:aa; se luettiin Latin-1:nä.",
+ "144": "Rivit, jotka eivät kuuluneet mihinkään nimettyyn datatietueeseen, ohitettiin.",
+ "145": "##END=, jota ei edeltänyt lohko, ohitettiin.",
+ "146": "Tietueet ennen ensimmäistä ##TITLE= tai viimeisen ##END= jälkeen ohitettiin.",
+ "147": "Tiedosto päättyy ilman ##END=; avoimet lohkot suljettiin.",
+ "148": "NTUPLES-sivu {0}",
+ "149": "NTUPLES-sivulla {0} ei ole ##DATA TABLE=; se ohitettiin.",
+ "150": "NTUPLES-sivu {0} käyttää symboleja ({1}), joita ei ole esitelty ##SYMBOL=-tietueessa; se ohitettiin.",
+ "151": "Kohteella {0} on datataulukon muoto, jota FormChem ei lue ({1}); se ohitettiin.",
+ "152": "NTUPLES-taulukossa ei ole ##END NTUPLES=; se luettiin lohkon loppuun.",
+ "153": "NTUPLES-taulukossa ei ole ##SYMBOL=-luetteloa.",
+ "154": "Tämä on 2D-spektri (kaksi riippumatonta muuttujaa); 2D-spektrejä ei piirretä tässä versiossa.",
+ "155": "NTUPLES-taulukossa on {0} sivua; vain ensimmäiset {1} luettiin.",
+ "156": "Imaginaarisivu ei jaa reaalisivun x-arvoja; se jätettiin pois.",
+ "157": "NTUPLES-taulukossa on {0} sivua; sivu {1} näytetään ja {2} muuta sivua jätettiin pois.",
+ "158": "##DELTAX={0} poikkeaa arvosta (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; käytetään laskettua väliä.",
+ "159": "Kohteella {0} ei ole täydellisiä FIRSTX-, LASTX- ja NPOINTS-arvoja; väli otetaan ##DELTAX-arvosta.",
+ "160": "Datarivi alkoi DIF-arvolla; se jatkuu edellisen rivin viimeisestä arvosta.",
+ "161": "Y-tarkistusarvo ei vastannut edellisen rivin viimeistä arvoa; riviä jatkettiin aiemmasta arvosta.",
+ "162": "{0} merkkiä kohteessa {1} ei voitu lukea, ja ne ohitettiin.",
+ "163": "{0} DIF-rivin perässä ei ollut Y-tarkistusarvoa.",
+ "164": "Kohteessa {0} ei ole datapisteitä.",
+ "165": "Kohteessa {0} on {1} pistettä, mutta ##NPOINTS={2}; rivien X-arvot sopivat {3} pisteeseen FIRSTX:stä LASTX:ään, joten sitä väliä käytettiin.",
+ "166": "Kohteessa {0} on {1} pistettä, mutta ##NPOINTS={2}; luetut pisteet säilytettiin.",
+ "167": "Rivin X-arvo ei vastaa sen paikkaa FIRSTX:stä ja väliltä laskettuna; paikkaa käytettiin.",
+ "168": "Kohteella {0} ei ole FIRSTX-, LASTX- ja NPOINTS-arvoja; väli otettiin rivien X-arvoista.",
+ "169": "Kohde {0} ei anna keinoa sijoittaa pisteitään x-akselille; ne numeroitiin 0, 1, 2 ja niin edelleen.",
+ "170": "Ensimmäinen rivi alkaa kohdasta x = {0}, mutta ##FIRSTX={1}; FIRSTX:ää käytettiin.",
+ "171": "Ensimmäinen Y-arvo {0} ei vastaa arvoa ##FIRSTY={1}.",
+ "172": "Kohde {0} päättyy epätäydelliseen {1} arvon ryhmään; se pudotettiin pois.",
+ "173": "Kohdetta {0} ei voitu lukea: {1}.",
+ "174": "Spektri pyytää lohkoa {0}, mutta sen tiedostossa on 1 lohko.",
+ "175": "Spektri pyytää lohkoa {0}, mutta sen tiedostossa on {1} lohkoa.",
+ "176": "Spektrillä ei ole lähdettä.",
+ "177": "Spektrin tiedosto {0} ei ole piirroksessa.",
+ "178": "Ennustinta kohteelle {0} ei ole tässä moottorissa.",
+ "179": "Ennustus epäonnistui: {0}",
+ "180": "Spektrin lähde ei ole tiedosto eikä ennuste.",
+ "181": "Piirroksessa ei ole spektriä {0}.",
+ "182": "Tikkuspektreissä ei ole integroitavia pinta-aloja.",
+ "183": "value on oltava suurempi kuin nolla.",
+ "184": "from ja to on oltava kaksi eri x-arvoa.",
+ "185": "Spektrillä ei ole integraalia {0}.",
+ "186": "Tällä spektrillä ei ole alkuperäistä tiedostoa; vie se ilman original=1.",
+ "187": "FormChem sijoittaa PNG-, JPEG-, GIF-, WebP- ja SVG-kuvia sekä JCAMP-DX-spektrejä."
+}
diff --git a/frontend/src/i18n/locales/fi/part14.json b/frontend/src/i18n/locales/fi/part14.json
new file mode 100644
index 00000000..ccd96b0c
--- /dev/null
+++ b/frontend/src/i18n/locales/fi/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Näkymä",
+ "1": "Pinta",
+ "2": "Ei vietävää: 3D-näkymä on tyhjä.",
+ "3": "Vienti epäonnistui",
+ "4": "Valitse rakenne, joka näytetään 3D:nä.",
+ "5": "Rakenna 3D",
+ "6": "Lisää 3D-näkymä",
+ "7": "Valitse PDB-, mmCIF-, SDF- tai MOL-tiedosto.",
+ "8": "3D-rakennetta ei voitu sijoittaa sivulle",
+ "9": "Valitse PDB- tai mmCIF-tiedostosta avattu 3D-objekti.",
+ "10": "Tässä mallissa ei ole ligandeja.",
+ "11": "Ligandia ei voitu erottaa",
+ "12": "Ei vielä 3D-koordinaatteja: Rakenna 3D luo konformeerin piirroksesta.",
+ "13": "3D-rakennetiedosto...",
+ "14": "Erota ligandi...",
+ "15": "Vie 3D-rakenne...",
+ "16": "Dihedraalikulman skannaus...",
+ "17": "Mittaa 3D:ssä",
+ "18": "Vie 3D-näkymä PNG-kuvana...",
+ "19": "Vie 3D-näkymä glTF-muodossa...",
+ "20": "Erotettu {0}: {1} (sidosjärjestykset pääteltiin)",
+ "21": "Erotettu {0}: {1}",
+ "22": "Avaa ensin 3D-näkymä",
+ "23": "Avaa 3D-näkymäpaneelin valitulle rakenteelle (tai sivulla valitulle 3D-objektille) ja seuraa valintaa. Rakenne tarvitsee ensin 3D-koordinaatit: Rakenna 3D luo ne.",
+ "24": "Rakentaa valitun rakenteen 3D-konformeerin sen 2D-piirroksesta (kiilat, kaksoissidosten geometria ja varaukset säilyvät), minimoi sen valitulla voimakentällä ja tallentaa sen piirrokseen yhtenä kumoamisvaiheena; 3D-näkymä näyttää sen.",
+ "25": "Minimoi valitun rakenteen näytetyn konformeerin 3D-näkymässä valitulla voimakentällä (oletuksena MMFF94, UFF kun MMFF94:llä ei ole parametreja) ja ilmoittaa energian ennen ja jälkeen yhtenä kumoamisvaiheena.",
+ "26": "Luo valitun rakenteen konformeeriensemblen (ETKDG, karsittu RMSD:n mukaan, kukin minimoitu) ja säilyttää ne, jotka mahtuvat energiaikkunaan; arvoilla n, window ja method se ajetaan ilman valintaikkunaa.",
+ "27": "Luotavat konformeerit",
+ "28": "Energiaikkuna yksikössä kcal/mol",
+ "29": "Sijoittaa valitun rakenteen 3D-näkymän sivulle sen viereen (rakentaen ensin 3D-koordinaatit, jos niitä ei ole) ja avaa siihen sidotun 3D-näkymäpaneelin; mallin kääntäminen tai tyylin vaihto päivittää sivun kuvan.",
+ "30": "Avaa PDB-, mmCIF-, SDF- tai MOL-tiedoston 3D-objektina sivulle (proteiinit nauhamallina ja ligandit pallo-tikku-mallina, vedet piilotettuina, ligandi kohdistettuna) ja näyttää sen 3D-näkymässä.",
+ "31": "Muuttaa valitun 3D-objektin (avattu PDB- tai mmCIF-tiedostosta) ligandin 2D-rakenteeksi sen viereen yhtenä kumoamisvaiheena: sidosjärjestykset yleisten ligandien sisäisestä mallista, muuten geometriasta pääteltyinä ja ilmoitettuina; tiedoston koordinaateista tulee sen konformeeri. Parametrilla ligand otetaan juuri se; ilman sitä kysytään, kun mallissa on useita.",
+ "32": "Ligandiavain ketju:het:numero tai het-koodi",
+ "33": "Valitse PDB- tai mmCIF-tiedostosta avattu 3D-objekti",
+ "34": "Tallentaa valitun rakenteen 3D-koordinaatit kaikkine vetyineen: MDL molfile (näytetty konformeeri), SD-tiedosto (kaikki konformeerit, energia- ja menetelmätietokenttineen), PDB tai XYZ (näytetty konformeeri tai kaikki konformeerit malleina tai kehyksinä); PDB- tai mmCIF-tiedostosta avattu 3D-objekti tallentaa alkuperäisen tiedostonsa. Ilman format-parametria kysytään.",
+ "35": "Tiedostomuoto",
+ "36": "Kaikki konformeerit näytetyn sijaan (oletus true sdf:lle)",
+ "37": "Skannaa 3D-näkymässä valittujen neljän atomin dihedraalikulman (tai sen viimeisimmän dihedraalimittauksen) relaksoidulla minimoinnilla ja piirtää kulman energian funktiona.",
+ "38": "Mittaa etäisyyden (kaksi atomia), kulman (kolme) tai dihedraalikulman (neljä) 3D-näkymässä ja listaa sen; parametrilla atoms (fragmentin atomitunnisteet kuten a1, vedyt muodossa a1:h0 tai PDB-sarjanumerot) mitataan nämä, muuten siirrytään valintatilaan.",
+ "39": "Kahdesta neljään atomitunnistetta",
+ "40": "Tallentaa 3D-näkymän PNG-kuvana sen näytön koossa; transparent jättää taustan pois.",
+ "41": "Tallentaa 3D-näkymän binäärisenä glTF 2.0 -tiedostona (.glb): atomit palloina ja sidokset sylintereinä alkuaineväreillä, 1 ångström = 1 cm, 3D-katseluohjelmille, dioille ja tulostukseen.",
+ "42": "Ei pintaa",
+ "43": "Poistaa molekyylipinnan 3D-näkymästä.",
+ "44": "Van der Waals -pinta",
+ "45": "Näyttää van der Waals -pinnan 3D-näkymässä.",
+ "46": "Liuottimen saavutettavissa oleva pinta",
+ "47": "Näyttää liuottimen saavutettavissa olevan pinnan (probe 1,4 ångströmiä) 3D-näkymässä.",
+ "48": "Liuottimen poissulkema pinta",
+ "49": "Näyttää liuottimen poissulkeman pinnan 3D-näkymässä.",
+ "50": "ESP-väritetty pinta",
+ "51": "Värittää pinnan likimääräisellä sähköstaattisella potentiaalilla moottorin empiirisistä osittaisvarauksista (punainen negatiivinen, sininen positiivinen), ja selite nimeää menetelmän.",
+ "52": "Näyttää 3D-näkymän lankatyylillä; sivulla olevalla 3D-objektilla valinta tallennetaan sen mukana.",
+ "53": "Näyttää 3D-näkymän tikkutyylillä; sivulla olevalla 3D-objektilla valinta tallennetaan sen mukana.",
+ "54": "Pallo-tikku",
+ "55": "Näyttää 3D-näkymän pallo-tikku-tyylillä; sivulla olevalla 3D-objektilla valinta tallennetaan sen mukana.",
+ "56": "Tilaa täyttävä",
+ "57": "Näyttää 3D-näkymän tilaa täyttävällä tyylillä; sivulla olevalla 3D-objektilla valinta tallennetaan sen mukana.",
+ "58": "Nauhamalli",
+ "59": "Näyttää 3D-näkymän nauhamallityylillä (proteiinit ja nukleiinihapot; ligandit pysyvät pallo-tikku-mallisina); sivulla olevalla 3D-objektilla valinta tallennetaan sen mukana.",
+ "60": "Dihedraalikulma (astetta)",
+ "61": "Suhteellinen energia (kcal/mol)",
+ "62": "Minimi {0}°",
+ "63": "Vie 3D-rakenne",
+ "64": "Kaikki konformeerit (SDF-tietueet, PDB-mallit, XYZ-kehykset)",
+ "65": "1 konformeeri tallennettu; jokainen vety kirjoitetaan 3D-sijainteineen.",
+ "66": "Erota ligandi",
+ "67": "Ligandi",
+ "68": "Ligandista tulee 2D-rakenne mallin viereen, ja sen koordinaatit tiedostosta säilyvät sen konformeerina.",
+ "69": "Erota",
+ "70": "SD-tiedosto (.sdf)",
+ "71": "MDL molfile (.mol)",
+ "72": "{0} konformeeria tallennettu; jokainen vety kirjoitetaan 3D-sijainteineen.",
+ "73": "Konformeerit",
+ "74": "Energiaikkuna (kcal/mol)",
+ "75": "ETKDG-upotus kiinteällä seedillä, lähes kaksoiskappaleet karsittu 0,5 Å:n raskasatomi-RMSD:llä, kukin minimoitu; matalin tulee näytetyksi konformeeriksi.",
+ "76": "Luo",
+ "77": "Dihedraalikulman skannauksen energiaprofiili",
+ "78": "Dihedraalikulman skannaus",
+ "79": "Alku (astetta)",
+ "80": "Loppu (astetta)",
+ "81": "Askel (astetta)",
+ "82": "Säilytä jokainen piste konformeerina (yksi kumoamisvaihe)",
+ "83": "Suorita skannaus",
+ "84": "Relaksoitu skannaus: jokaisella kulmalla dihedraalikulma pidetään kiinni ja kaikki muu minimoidaan.",
+ "85": "Loppukulman on oltava suurempi kuin alkukulman.",
+ "86": "Skannataan...",
+ "87": "Skannaus epäonnistui",
+ "88": "energiavalli {0} kcal/mol",
+ "89": "Näyttötyyli",
+ "90": "Väritä pinta sähköstaattisella potentiaalilla empiirisistä osittaisvarauksista",
+ "91": "ESP",
+ "92": "Minimoi",
+ "93": "Skannaa...",
+ "94": "Kohdista ligandiin",
+ "95": "Palauta näkymä",
+ "96": "Pyöritä",
+ "97": "Vie 3D-näkymä",
+ "98": "Mittaa",
+ "99": "Mittaukset",
+ "100": "PNG-kuva",
+ "101": "PNG-kuva, läpinäkyvä",
+ "102": "glTF-binääri (.glb)",
+ "103": "3D vaatii WebGL:n, jota tämä ikkuna ei tarjoa.",
+ "104": "Ladataan 3D-katselinta...",
+ "105": "3D-katselinta ei voitu ladata",
+ "106": "Avaa piirros ja valitse rakenne nähdäksesi sen 3D:nä.",
+ "107": "Valitse sivulta rakenne nähdäksesi sen 3D:nä.",
+ "108": "3D-rakennetta ei voitu lukea",
+ "109": "Tätä konformeeria ei voi kirjoittaa molfile-tiedostoksi",
+ "110": "Pyöritys on pois päältä: järjestelmä pyytää vähennettyä liikettä",
+ "111": "PDB- tai CIF-mallilla ei ole konformeereja.",
+ "112": "Energiat suhteessa matalimpaan; näytä konformeeri napsauttamalla sitä.",
+ "113": "Rakenna 3D tai Konformeerit... täyttää tämän luettelon.",
+ "114": "Osittaisvaraukset eivät ole saatavilla",
+ "115": "moottorilla ei ole vielä 3D-reittejä",
+ "116": "ei suppennut",
+ "117": "Valitse neljä peräkkäistä sidottua atomia (dihedraalikulma) ja napsauta sitten Skannaa.",
+ "118": "Valitse Säilytä jokainen piste konformeerina nähdäksesi geometriat.",
+ "119": "Näytä konformeeri",
+ "120": "Päivitä 3D-näkymä",
+ "121": "Sivun tilannekuvaa ei voitu päivittää",
+ "122": "Ei pintaa",
+ "123": "Van der Waals",
+ "124": "Liuottimen saavutettavissa oleva",
+ "125": "Liuottimen poissulkema",
+ "126": "Etäisyys",
+ "127": "Kulma",
+ "128": "Dihedraalikulma",
+ "129": "{0} kcal/mol, {1}, ei suppennut",
+ "130": "Valittu {0} / {1}: {2}",
+ "131": "Napsauta {0} atomia mitataksesi",
+ "132": "ESP ({0}): {1}, punainen {2} e sinisen +{3} e asti",
+ "133": "Etäisyys {0}: {1}",
+ "134": "Kulma {0}: {1}",
+ "135": "Dihedraalikulma {0}: {1}",
+ "136": "Rakennettu: {0}",
+ "137": "Minimoitu: {0}",
+ "138": "{0} konformeeria säilytetty, yhteensä {1}",
+ "139": "{0} konformeeria säilytetty",
+ "140": "Dihedraalikulma {0}",
+ "141": "PNG-koodaus epäonnistui"
+}
diff --git a/frontend/src/i18n/locales/fi/part15.json b/frontend/src/i18n/locales/fi/part15.json
new file mode 100644
index 00000000..af4e19a0
--- /dev/null
+++ b/frontend/src/i18n/locales/fi/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "likimääräinen, empiirisistä varauksista",
+ "1": "{0} stereokeskusta tai kaksoissidosta oli määrittelemättä; yksi konfiguraatio valittiin.",
+ "2": "{0} piirroksen stereomerkintää ei toisteta 3D:ssä.",
+ "3": "Laajennetun stereoryhmän tai -ryhmien {0} piirretty jäsen rakennettiin; 3D-malli on yksi piirroksen kuvaaman seoksen (suhteellinen tai rasemaatti) stereoisomeeri.",
+ "4": "Upotettu {0} kertaa (seedit {1}) piirretyn stereokemian säilyttämiseksi.",
+ "5": "{0} raskasatomiparia on lähempänä toisiaan kuin {1} van der Waals -kosketuksestaan.",
+ "6": "Käytetty yleistä voimakenttää: {0}.",
+ "7": "ei {0}-parametreja kohteelle {1}",
+ "8": "{0} ei voinut tyypittää kaikkia atomeja",
+ "9": "{0} konformeeria muutti piirretyn stereokemian minimoinnin aikana, ja ne jätettiin pois.",
+ "10": "Yli 300 raskasta atomia: konformeerinäytteenoton laatu heikkenee tällä koolla.",
+ "11": "Keskussidos on renkaassa; rengasta jännitetään kulman seuraamiseksi.",
+ "12": "Rakenteella ei ollut 3D-koordinaatteja; skannaus alkoi uudesta upotuksesta.",
+ "13": "Rakenne muuttui 3D:n laskennan aikana; aja komento uudelleen.",
+ "14": "Piirroksessa ei ole objektia {0}.",
+ "15": "Kohteella {0} ei ole vielä 3D-koordinaatteja; rakenna ensin 3D.",
+ "16": "Kohteella {0} ei ole konformeeria {1}.",
+ "17": "Rakenteessa ei ole atomeja.",
+ "18": "3D tarvitsee oikeita atomeja: {0} atomia on nimiöitä, R-ryhmiä tai kiinnityskohtia ({1}).",
+ "19": "Vetyjä ei voitu lisätä: {0}",
+ "20": "Rakenteessa on {0} atomia vetyineen; 3D käsittelee enintään {1}.",
+ "21": "3D-koordinaatit eivät sovi tähän rakenteeseen (ei mitään kohteelle {0}); rakenna 3D uudelleen.",
+ "22": "3D-koordinaatit eivät sovi tähän rakenteeseen (vetyjen määrä muuttui); rakenna 3D uudelleen.",
+ "23": "Rakennetta ei voitu upottaa 3D:hen: {0}",
+ "24": "Rakennetta ei voitu upottaa 3D:hen; tarkista sen valenssit ja stereokemia.",
+ "25": "Konformeereja ei voitu upottaa: {0}",
+ "26": "Yhtään konformeeria ei voitu upottaa; tarkista rakenteen valenssit ja stereokemia.",
+ "27": "Jokainen upotettu konformeeri menetti piirretyn stereokemian minimoinnin jälkeen.",
+ "28": "Millään voimakentällä ei ole parametreja tälle rakenteelle ({0}).",
+ "29": "Yleistä voimakenttää ei voitu määrittää: {0}",
+ "30": "Yleistä voimakenttää ei voitu määrittää.",
+ "31": "Tuntemattomia atomeja {0}; käytä fragmentin atomitunnisteita tai vetyä muodossa a1:h0.",
+ "32": "Neljän atomin on oltava eri atomeja.",
+ "33": "Neljän atomin on muodostettava sidosketju (a1-a2-a3-a4).",
+ "34": "3D-tiedostoa ei voitu kirjoittaa: {0}",
+ "35": "Tiedosto ei ole PDB-, mmCIF-, SDF- tai MOL-tiedosto, jonka FormChem voi lukea.",
+ "36": "Tiedostossa on yli {0} atomia.",
+ "37": "PDB-tiedostossa ei ole ATOM- tai HETATM-tietueita.",
+ "38": "mmCIF-taulukosta atom_site puuttuvat sarakkeet Cartn_x, Cartn_y ja Cartn_z.",
+ "39": "CIF-tiedostossa on murtokoordinaatit mutta ei täydellistä alkeiskoppia.",
+ "40": "CIF-tiedostossa ei ole atom_site-taulukkoa.",
+ "41": "CIF-tiedostossa ei ole luettavia atomeja.",
+ "42": "Tiedostossa ei ole tietueita.",
+ "43": "Tiedostossa on {0} tietuetta; 3D-tuonti lukee enintään {1}.",
+ "44": "Yhtäkään tiedoston tietuetta ei voitu lukea.",
+ "45": "{0} ei ole PDB- tai mmCIF-tiedosto.",
+ "46": "Kohdetta {0} ei voitu muuttaa FormChem-piirrokseksi: {1}.",
+ "47": "PDB-malli sijoitettu 3D-objektina: {0}.",
+ "48": "mmCIF-malli sijoitettu 3D-objektina: {0}.",
+ "49": "{0} ATOM- tai HETATM-rivillä oli lukukelvottomat koordinaatit, ja ne ohitettiin.",
+ "50": "{0} atom_site-rivillä oli lukukelvottomat koordinaatit, ja ne ohitettiin.",
+ "51": "Pienmolekyylin CIF: epäsymmetrinen yksikkö luetaan murtokoordinaateista; symmetriaparit eivät synny.",
+ "52": "Kohteella {0} on valenssiongelmia; se luettiin ilman puhdistusta.",
+ "53": "Kohteella {0} on vain 2D-koordinaatit; konformeeria ei säilytetty.",
+ "54": "{0} vetyä puuttui tiedostosta, ja ne sijoitettiin geometrian perusteella.",
+ "55": "Kohdetta {0} ei voitu lukea: {1}",
+ "56": "Kohdetta {0} ei voitu lukea.",
+ "57": "Tietue {0}",
+ "58": "Rakenne",
+ "59": "Tiedoston 3D-koordinaatit säilytettiin 1 rakenteen konformeerina; Rakenna 3D ei ole tarpeen niiden katseluun.",
+ "60": "Tiedoston 3D-koordinaatit säilytettiin {0} rakenteen konformeereina; Rakenna 3D ei ole tarpeen niiden katseluun.",
+ "61": "{0} on yksittäinen ioni; erotettavaa rakennetta ei ole.",
+ "62": "Kohteen {0} atomeja ei voitu lukea.",
+ "63": "Rakenteessa ei ole ligandia {0}; ligandit: {1}.",
+ "64": "Piirroksessa ei ole 3D-mallia {0}.",
+ "65": "FormChem sijoittaa PNG-, JPEG-, GIF-, WebP- ja SVG-kuvia, JCAMP-DX-spektrejä sekä PDB-, mmCIF-, SDF- ja MOL-rakennetiedostoja."
+}
diff --git a/frontend/src/i18n/locales/fr-CA/part12.json b/frontend/src/i18n/locales/fr-CA/part12.json
new file mode 100644
index 00000000..a8fe408f
--- /dev/null
+++ b/frontend/src/i18n/locales/fr-CA/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spectre",
+ "1": "Dessinez ou sélectionnez une structure à nommer.",
+ "2": "Impossible de calculer les noms",
+ "3": "FormChem n’a pas de nom pour cette structure.",
+ "4": "Copier le nom",
+ "5": "Nom copié : {0}",
+ "6": "Nom chimique à insérer; omettez-le pour ouvrir la boîte de dialogue",
+ "7": "Copie en texte brut le nom de la structure sélectionnée (ou des structures de la page) : le nom courant quand FormChem en connaît un, sinon son nom systématique, qui n’est proposé que s’il se relit en la même structure.",
+ "8": "trivial ou systematic pour choisir le nom à copier; omettez pour prendre le premier",
+ "9": "Le spectre prédit est à jour.",
+ "10": "Actualiser le spectre prédit",
+ "11": "Sélectionnez d’abord une structure",
+ "12": "Sélectionnez d’abord un spectre prédit",
+ "13": "Spectre RMN 1H prédit ajouté ({0})",
+ "14": "Spectre RMN 13C prédit ajouté ({0})",
+ "15": "Spectre prédit actualisé ({0})",
+ "16": "Id de fragment de la structure; par défaut la structure sélectionnée, ou la seule de la page",
+ "17": "Fréquence du spectromètre en MHz (400 par défaut pour 1H, 100 pour 13C)",
+ "18": "Ajoute à côté de la structure sélectionnée un spectre RMN 1H prédit, en une seule étape d’annulation : un objet spectre calculé par les règles d’incréments propres à FormChem (sans base de données de déplacements), dont les multiplets et les intégrales sont liés aux atomes de la structure, et dont le titre indique la méthode, la version et la fréquence. La courbe est recalculée à partir de la structure, jamais enregistrée.",
+ "19": "Ajoute à côté de la structure sélectionnée un spectre RMN 13C prédit, en une seule étape d’annulation : un objet spectre calculé par les règles d’incréments propres à FormChem (sans base de données de déplacements), dont les pics sont liés aux atomes de la structure, et dont le titre indique la méthode, la version et la fréquence. La courbe est recalculée à partir de la structure, jamais enregistrée.",
+ "20": "Impossible de prédire le spectre",
+ "21": "Prédire le spectre RMN 1H",
+ "22": "Prédire le spectre RMN 13C",
+ "23": "Recalcule les multiplets, les intégrales ou les pics d’un spectre prédit après la modification de sa structure, avec la version actuelle du prédicteur, en une seule étape d’annulation; rien ne change s’il est à jour.",
+ "24": "Id du spectre prédit; par défaut celui qui est sélectionné ou celui ouvert dans l’éditeur de spectres",
+ "25": "Impossible d’actualiser le spectre",
+ "26": "Aucun nouveau pic dans cette plage.",
+ "27": "Faites glisser sur une plage dans l’éditeur de spectres pour l’intégrer.",
+ "28": "Lier le pic à des atomes",
+ "29": "Délier le pic",
+ "30": "Axe Y du spectre",
+ "31": "Spectre à partir d’un fichier...",
+ "32": "Modifier le spectre...",
+ "33": "Détecter les pics",
+ "34": "Intégrer",
+ "35": "Transmittance ou absorbance",
+ "36": "Exporter le spectre...",
+ "37": "Sélectionnez d’abord un spectre",
+ "38": "aucun spectre avec l’id {0}",
+ "39": "Pics détectés : {0} (déjà présents : {1})",
+ "40": "Pics détectés : {0}",
+ "41": "Les intégrales concernent les spectres RMN",
+ "42": "Sélectionnez d’abord un pic, une intégrale ou un multiplet dans l’éditeur de spectres",
+ "43": "Les atomes doivent tous appartenir à une même structure",
+ "44": "Seuls les spectres IR, Raman et UV-Vis basculent entre transmittance et absorbance",
+ "45": "Exporté : {0}",
+ "46": "Id de l’objet spectre; par défaut le spectre sélectionné ou celui ouvert dans l’éditeur de spectres",
+ "47": "Importe un fichier de spectre JCAMP-DX dans le dessin actif (un objet spectre par bloc de données, le fichier étant conservé octet pour octet), en une seule étape d’annulation par fichier. Sans path, ouvre une boîte de dialogue de fichier.",
+ "48": "Chemin absolu d’un fichier .jdx, .dx ou .jcamp",
+ "49": "Impossible d’importer le spectre",
+ "50": "Ouvre l’éditeur de spectres pour le spectre sélectionné (comme un double-clic dessus).",
+ "51": "Impossible d’ouvrir le spectre",
+ "52": "Trouve les pics d’un spectre dans une plage (par défaut la plage affichée) et les ajoute à sa liste de pics en ignorant ceux déjà présents, en une seule étape d’annulation.",
+ "53": "Début de la plage dans l’unité de x (cm-1, nm, m/z, ppm)",
+ "54": "Fin de la plage dans l’unité de x",
+ "55": "Seuil de détection facultatif en unités de y",
+ "56": "Remplacer la liste de pics au lieu d’y ajouter",
+ "57": "Impossible de détecter les pics",
+ "58": "Ajoute une intégrale RMN sur une plage, mise à l’échelle comme les intégrales existantes (ou sur value, en rééchelonnant les autres), en une seule étape d’annulation. Sans from et to, bascule l’éditeur de spectres sur son outil d’intégration.",
+ "59": "Début de la plage en ppm",
+ "60": "Fin de la plage en ppm",
+ "61": "Valeur que doit indiquer cette intégrale, par exemple un nombre de protons",
+ "62": "Impossible d’intégrer",
+ "63": "Lie un pic, une intégrale ou un multiplet à des atomes d’une structure, en une seule étape d’annulation. Sans atoms, utilise les atomes sélectionnés, ou attend que la personne clique des atomes dans le dessin.",
+ "64": "Id du pic, de l’intégrale ou du multiplet; par défaut celui sélectionné dans l’éditeur de spectres",
+ "65": "Id de la structure (fragment) à laquelle appartiennent les atomes",
+ "66": "Id des atomes",
+ "67": "Impossible de lier le pic",
+ "68": "Supprime le lien d’un pic, d’une intégrale ou d’un multiplet avec des atomes, en une seule étape d’annulation.",
+ "69": "Impossible de délier le pic",
+ "70": "Affiche un spectre IR, Raman ou UV-Vis en transmittance ou en absorbance (bascule sans mode), en une seule étape d’annulation.",
+ "71": "Axe Y à afficher; omettez pour basculer",
+ "72": "Impossible de changer l’axe Y",
+ "73": "Enregistre un spectre au format JCAMP-DX (avec sa table de pics s’il en a) ou en CSV de tous les points, via le moteur.",
+ "74": "Format de fichier, jdx par défaut",
+ "75": "Avec jdx : le fichier importé d’origine, inchangé",
+ "76": "Chemin absolu où écrire; omettez pour le demander",
+ "77": "Impossible d’exporter le spectre",
+ "78": "Insérer un spectre à partir d’un fichier",
+ "79": "Le fichier ne contient aucun spectre que FormChem puisse dessiner",
+ "80": "Insérer un spectre",
+ "81": "Le spectre n’a pas pu être placé : son fichier n’est pas parvenu au dessin.",
+ "82": "Spectres insérés : {0}",
+ "83": "Longueur d’onde (µm)",
+ "84": "Nombre d’onde (cm⁻¹)",
+ "85": "Déplacement Raman (cm⁻¹)",
+ "86": "Longueur d’onde (nm)",
+ "87": "Fréquence (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmittance (%)",
+ "90": "Transmittance",
+ "91": "Absorbance",
+ "92": "Abondance relative (%)",
+ "93": "Intensité",
+ "94": "RMN {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Prédit : {0}, {1} MHz ({2})",
+ "100": "Prédit : {0}, {1} MHz",
+ "101": "Prédit : {0} ({1})",
+ "102": "Prédit : {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spectre indisponible : {0}",
+ "105": "Chargement du spectre",
+ "106": "Nom courant",
+ "107": "Systématique",
+ "108": "Confiance élevée",
+ "109": "Confiance moyenne",
+ "110": "Confiance faible",
+ "111": "Non lu",
+ "112": "Noms FormChem",
+ "113": "Impossible de lire le nom",
+ "114": "Insérer une structure à partir d’un nom",
+ "115": "Structure à partir d’un nom",
+ "116": "Un nom, par exemple aspirine ou 2-méthylpropan-1-ol",
+ "117": "Nom chimique",
+ "118": "Tapez un nom pour voir sa structure.",
+ "119": "Aucune structure pour ce nom",
+ "120": "Dictionnaire",
+ "121": "Analyseur systématique",
+ "122": "Nommeur à règles, vérifié par aller-retour",
+ "123": "Outils de spectre",
+ "124": "Afficher tout le spectre",
+ "125": "Axe Y",
+ "126": "Afficher cette plage sur la page",
+ "127": "Double-cliquez sur un spectre dans le dessin pour le modifier ici.",
+ "128": "Pics et intégrales",
+ "129": "Prédit",
+ "130": "Valeur de l’intégrale",
+ "131": "Lier à des atomes",
+ "132": "Délier",
+ "133": "1 atome",
+ "134": "Atomes à lier",
+ "135": "Cliquez sur d’autres atomes, puis sur Terminé.",
+ "136": "Cliquez dans le dessin sur les atomes qui appartiennent à ce pic, puis sur Terminé.",
+ "137": "Rien à intégrer dans cette plage.",
+ "138": "Supprimer le pic",
+ "139": "Ajouter un pic",
+ "140": "Lié à 1 atome",
+ "141": "Définir la plage du spectre",
+ "142": "Saisissez un nombre positif.",
+ "143": "Impossible de définir l’intégrale",
+ "144": "Panoramique et zoom : faites glisser pour déplacer, molette pour zoomer, Shift + glisser pour zoomer sur une plage",
+ "145": "Zoom sur une plage : faites glisser sur le graphique",
+ "146": "Détecter les pics : faites glisser sur une plage",
+ "147": "Ajouter ou supprimer un pic : cliquez près d’un pic",
+ "148": "Intégrer : faites glisser sur une plage",
+ "149": "Pic",
+ "150": "Intégrale",
+ "151": "Multiplet",
+ "152": "{0} atomes",
+ "153": "Lié à {0}",
+ "154": "Faites glisser pour déplacer, molette pour zoomer, Shift + glisser pour zoomer sur une plage. Cliquez sur une étiquette pour la sélectionner.",
+ "155": "Faites glisser sur le graphique pour zoomer sur cette plage.",
+ "156": "Faites glisser sur une plage pour en détecter les pics.",
+ "157": "Cliquez près d’un pic pour l’ajouter; cliquez sur l’étiquette d’un pic pour le supprimer.",
+ "158": "Faites glisser sur une plage pour l’intégrer.",
+ "159": "Lié à {0} atomes"
+}
diff --git a/frontend/src/i18n/locales/fr-CA/part13.json b/frontend/src/i18n/locales/fr-CA/part13.json
new file mode 100644
index 00000000..e0cc422e
--- /dev/null
+++ b/frontend/src/i18n/locales/fr-CA/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "le moteur a renvoyé un fichier vide",
+ "1": "le nom dépasse {0} caractères",
+ "2": "les fragments de plus de {0} atomes ne sont pas nommés",
+ "3": "La structure contient des étiquettes, des groupes R ou des atomes quelconques, qui n’ont pas de nom.",
+ "4": "La structure n’a pas pu être lue comme une molécule (vérifiez les valences).",
+ "5": "Il n’y a aucune structure à nommer.",
+ "6": "Les noms à index inversé (le parent d’abord, puis une virgule et les substituants) ne sont pas lus; écrivez le nom dans l’ordre normal, par exemple 1,2-dichlorobenzène.",
+ "7": "D- et L- ne sont lus que pour les acides aminés et les sucres du dictionnaire de FormChem; indiquez des descripteurs R ou S pour les autres noms.",
+ "8": "FormChem a lu tout le nom, mais il ne forme pas un nom de structure complet (il peut manquer un parent comme l’hexane ou le benzène, ou un suffixe).",
+ "9": "FormChem n’a pas pu lire le nom à partir du caractère {0} (« {1} »).",
+ "10": "FormChem a lu le nom, mais {0}.",
+ "11": "la structure n’a pas pu être complétée",
+ "12": "Le nom peut se lire de plusieurs façons; FormChem a dessiné la lecture qui demande le moins d’hypothèses.",
+ "13": "Le nom ne donne aucun descripteur stéréochimique, donc les centres stéréogènes et les doubles liaisons sont dessinés sans précision.",
+ "14": "Aucun nom systématique : {0}.",
+ "15": "Le nom systématique construit par FormChem ne se relisait pas en la même structure; il n’est donc pas affiché.",
+ "16": "cette double liaison ne peut pas être E ou Z",
+ "17": "le locant de descripteur {0} n’est pas une position du parent",
+ "18": "la position {0} ne débute pas une double liaison pouvant être E ou Z",
+ "19": "{0} exige exactement une double liaison pouvant être cis ou trans; cette structure en a {1}",
+ "20": "{0} est ambigu pour cette double liaison; indiquez plutôt E ou Z",
+ "21": "({0}) exige un locant : la structure compte {1} centres stéréogènes",
+ "22": "la position {0} n’est pas un centre stéréogène, donc ({1}) ne peut pas s’appliquer",
+ "23": "({0}) exige un locant : la structure compte {1} doubles liaisons pouvant être E ou Z",
+ "24": "la position {0} ne peut pas recevoir ce descripteur : {1}",
+ "25": "cette double liaison ne peut pas recevoir ce descripteur : {0}",
+ "26": "{0} ne dit pas quelle configuration est visée, donc la structure est dessinée sans stéréochimie.",
+ "27": "{0} n’a pas de point de fixation",
+ "28": "il n’y a pas de place pour {0} à {1}",
+ "29": "{0} ne peut pas se lier à cet endroit",
+ "30": "les chaînes de plus de {0} carbones ne sont pas encore lues",
+ "31": "{0} est trop petit pour former un cycle",
+ "32": "{0}-{1} est un tautomère que FormChem ne dessine pas encore à partir d’un nom",
+ "33": "le locant {0} n’est pas une position de {1}",
+ "34": "{0} n’est pas une position de chaîne",
+ "35": "une liaison multiple ne peut pas débuter ici : position {0} de {1}",
+ "36": "la position {0} de {1} ne peut pas porter cette liaison multiple",
+ "37": "il n’y a pas de place pour une liaison multiple à la position {0} de {1}",
+ "38": "il n’y a pas de place pour les liaisons multiples de {0}",
+ "39": "Les positions des liaisons multiples de {0} n’ont pas été données; dessinées aux positions les plus basses.",
+ "40": "-{0} exige une chaîne ouverte; sur un cycle, le suffixe est carbaldéhyde, acide carboxylique, carbonitrile ou carboxamide",
+ "41": "une chaîne n’a que deux extrémités pour -{0}",
+ "42": "{0} est trop court pour deux groupes -{1}",
+ "43": "il n’y a pas de place pour -{0} sur {1}",
+ "44": "La position de -{0} sur {1} n’a pas été donnée; dessiné à la position la plus basse.",
+ "45": "-{0} doit se trouver au bout de la chaîne, pas à {1}",
+ "46": "il n’y a pas de place pour -{0} à {1}",
+ "47": "ortho, méta et para exigent un cycle benzénique",
+ "48": "ortho, méta ou para avec un seul groupe exige un parent comme le phénol, l’aniline ou le toluène",
+ "49": "il n’y a pas de place pour {0} sur {1}",
+ "50": "il n’y a pas de place pour {0} groupes {1} sur {2}",
+ "51": "La position de {0} sur {1} n’a pas été donnée; dessiné à la position libre la plus basse.",
+ "52": "{0} ne peut pas porter de substituants",
+ "53": "un groupe acyle se fixe par son carbone carbonyle",
+ "54": "{0} n’a pas de position libre",
+ "55": "La position de fixation de {0} n’a pas été donnée; position {1} supposée.",
+ "56": "{0} n’a plus de place pour se fixer",
+ "57": "les locants {0} avant {1} ne sont pas utilisés",
+ "58": "{0} ne peut pas figurer comme mot séparé",
+ "59": "« {0} » exige {1} groupe avant lui, le nom en donne {2}",
+ "60": "« {0} » exige {1} groupes avant lui, le nom en donne {2}",
+ "61": "le nom donne {0} groupe alkyle pour {1} position d’ester",
+ "62": "le nom donne {0} groupe alkyle pour {1} positions d’ester",
+ "63": "le nom donne {0} groupes alkyle pour {1} position d’ester",
+ "64": "le nom donne {0} groupes alkyle pour {1} positions d’ester",
+ "65": "la structure qu’il décrit n’est pas valide ({0})",
+ "66": "-one à {0} serait un aldéhyde; un aldéhyde se nomme avec -al",
+ "67": "la position {0} de {1}",
+ "68": "trop de substituants identiques",
+ "69": "locants mixtes",
+ "70": "les types de liaison inhabituels ne sont pas encore nommés",
+ "71": "un système cyclique que FormChem ne sait pas encore nommer",
+ "72": "les cycles aromatiques à doubles liaisons exocycliques (comme les pyridones) ne sont pas encore nommés",
+ "73": "les isotopes et les radicaux ne sont pas encore nommés",
+ "74": "les halogènes hypervalents ne sont pas nommés",
+ "75": "les groupes azotés chargés autres que nitro ne sont pas encore nommés",
+ "76": "les atomes chargés ne sont pas encore nommés",
+ "77": "les oxydes de soufre, d’azote et de phosphore ne sont pas encore nommés",
+ "78": "ce groupe oxygéné n’est pas encore nommé",
+ "79": "les sulfoxydes, les sulfones et les autres groupes soufrés ne sont pas encore nommés",
+ "80": "les imines, les composés azo et les groupes azotés semblables ne sont pas encore nommés",
+ "81": "{0} n’est pas encore nommé",
+ "82": "les chaînes de substituants de plus de 20 carbones ne sont pas nommées",
+ "83": "les groupes acyle insaturés ne sont pas encore nommés",
+ "84": "les groupes ylidène substitués ne sont pas encore nommés",
+ "85": "les groupes ylidène cycliques ne sont pas encore nommés",
+ "86": "les cycles fixés deux fois ne sont pas encore nommés",
+ "87": "aucune numérotation trouvée pour un substituant de cycle",
+ "88": "les esters à parties alcool différentes ne sont pas encore nommés",
+ "89": "aucune chaîne ou aucun cycle parent trouvé",
+ "90": "les esters cycliques (lactones) ne sont pas encore nommés",
+ "91": "les substituants sur plus d’un azote d’amine ou d’amide ne sont pas encore nommés",
+ "92": "les centres stéréogènes hors de la chaîne ou du cycle parent ne sont pas encore nommés",
+ "93": "la géométrie de double liaison hors de la chaîne parente n’est pas encore nommée",
+ "94": "les centres pseudo-asymétriques ne sont pas encore nommés",
+ "95": "cette géométrie de double liaison n’est pas encore nommée",
+ "96": "les chaînes de plus de 20 carbones ne sont pas nommées",
+ "97": "trop de groupes identiques",
+ "98": "la structure a des erreurs de valence",
+ "99": "les sels et les mélanges ne sont pas encore nommés systématiquement",
+ "100": "les structures de plus de {0} atomes lourds ne sont pas encore nommées systématiquement",
+ "101": "les composés de {0} ne sont pas encore nommés systématiquement",
+ "102": "les atomes de requête et les groupes R n’ont pas de nom",
+ "103": "les hydrures d’un seul hétéroatome ne sont nommés qu’à partir du dictionnaire",
+ "104": "{0} n’est pas un objet de ce dessin.",
+ "105": "{0} n’a aucun atome.",
+ "106": "Le fragment n’a aucun atome.",
+ "107": "Le dessin n’a pas de page.",
+ "108": "{0} n’est pas un spectre de ce dessin.",
+ "109": "La structure {0} à laquelle appartient cette prédiction n’est plus dans le dessin.",
+ "110": "Le dessin {0} a été fermé.",
+ "111": "Déplacement chimique (ppm)",
+ "112": "Temps (s)",
+ "113": "Réflectance",
+ "114": "Abondance relative",
+ "115": "##{0}= apparaît plus d’une fois; la première valeur a été conservée.",
+ "116": "##XYDATA={0} n’est pas une liste de variables connue; elle a été lue comme (X++(Y..Y)).",
+ "117": "##{0}={1} n’est pas une liste de variables connue; elle a été lue comme (XY..XY).",
+ "118": "Les points n’étaient pas dans l’ordre de x et ont été triés.",
+ "119": "##.SHIFT REFERENCE={0} n’a pas pu être lu; les déplacements n’ont pas été référencés.",
+ "120": "##.SHIFT REFERENCE désigne le point {0}, hors des {1} points; les déplacements n’ont pas été référencés.",
+ "121": "Les déplacements ont été référencés de sorte que le point {0} indique {1} ppm ({2}).",
+ "122": "Le fichier ne nomme pas le noyau observé.",
+ "123": "Ce sont des données RMN dans le domaine temporel (un FID); elles sont affichées telles qu’acquises, sans transformée de Fourier.",
+ "124": "Les fréquences en Hz ont été divisées par la fréquence d’observation ({0} MHz) pour obtenir des ppm.",
+ "125": "Il n’y a pas de ##.SHIFT REFERENCE; 0 Hz a été pris pour 0 ppm.",
+ "126": "Il n’y a pas de ##.OBSERVE FREQUENCY, donc l’axe des déplacements reste en Hz.",
+ "127": "La transmittance était stockée sous forme de fraction et est affichée en pourcentage.",
+ "128": "Le bloc {0} contient plus de {1} points.",
+ "129": "##DATA TYPE={0} avec des unités de x {1} ne désigne aucune technique connue; il est dessiné comme un spectre simple.",
+ "130": "##BLOCKS={0} mais le bloc LINK contient {1} blocs; tous les blocs trouvés ont été lus.",
+ "131": "Ce n’est pas un fichier JCAMP-DX : il n’a pas d’enregistrement ##TITLE=.",
+ "132": "Le fichier contient {0} blocs à la suite sans bloc LINK; chacun a été lu.",
+ "133": "Deux blocs partagent le même ##BLOCK_ID.",
+ "134": "Le fichier ne contient aucun spectre que FormChem puisse dessiner ({0}).",
+ "135": "Le bloc « {0} » n’a pas été dessiné : {1}.",
+ "136": "un bloc de structure (JCAMP-CS); il est conservé dans le fichier mais pas dessiné",
+ "137": "il ne contient ni XYDATA, ni XYPOINTS, ni PEAK TABLE, ni NTUPLES",
+ "138": "sa table de données ne contient aucun point",
+ "139": "sa table NTUPLES ne déclare aucun symbole",
+ "140": "les spectres NTUPLES 2D ne sont pas encore pris en charge",
+ "141": "sa table NTUPLES n’a aucune page lisible",
+ "142": "Le fichier contient des caractères hors ASCII; il a été lu comme UTF-8.",
+ "143": "Le fichier contient des octets qui ne sont ni ASCII ni UTF-8; il a été lu comme Latin-1.",
+ "144": "Les lignes en dehors de tout enregistrement de données étiqueté ont été ignorées.",
+ "145": "Un ##END= sans bloc avant lui a été ignoré.",
+ "146": "Les enregistrements avant le premier ##TITLE= ou après le dernier ##END= ont été ignorés.",
+ "147": "Le fichier se termine sans ##END=; les blocs ouverts ont été fermés.",
+ "148": "Page NTUPLES {0}",
+ "149": "La page NTUPLES {0} n’a pas de ##DATA TABLE=; elle a été ignorée.",
+ "150": "La page NTUPLES {0} utilise des symboles ({1}) non déclarés dans ##SYMBOL=; elle a été ignorée.",
+ "151": "{0} a une forme de table de données que FormChem ne lit pas ({1}); elle a été ignorée.",
+ "152": "La table NTUPLES n’a pas de ##END NTUPLES=; elle a été lue jusqu’à la fin du bloc.",
+ "153": "La table NTUPLES n’a pas de liste ##SYMBOL=.",
+ "154": "C’est un spectre 2D (deux variables indépendantes); les spectres 2D ne sont pas dessinés dans cette version.",
+ "155": "La table NTUPLES a {0} pages; seules les {1} premières ont été lues.",
+ "156": "La page imaginaire n’a pas les mêmes valeurs de x que la page réelle; elle a été laissée de côté.",
+ "157": "La table NTUPLES contient {0} pages; la page {1} est affichée et {2} autres pages ont été laissées de côté.",
+ "158": "##DELTAX={0} diffère de (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; l’espacement calculé est utilisé.",
+ "159": "{0} n’a pas de FIRSTX, LASTX et NPOINTS complets; l’espacement vient de ##DELTAX.",
+ "160": "Une ligne de données commençait par une valeur DIF; elle continue à partir de la dernière valeur de la ligne précédente.",
+ "161": "Une valeur de contrôle Y ne correspondait pas à la dernière valeur de la ligne précédente; la ligne a été poursuivie à partir de la valeur antérieure.",
+ "162": "{0} caractères dans {1} n’ont pas pu être lus et ont été ignorés.",
+ "163": "{0} lignes DIF n’étaient pas suivies d’une valeur de contrôle Y.",
+ "164": "{0} ne contient aucun point de données.",
+ "165": "{0} contient {1} points mais ##NPOINTS={2}; les valeurs X des lignes correspondent à {3} points de FIRSTX à LASTX, donc cet espacement a été utilisé.",
+ "166": "{0} contient {1} points mais ##NPOINTS={2}; les points lus ont été conservés.",
+ "167": "La valeur X d’une ligne ne correspond pas à sa position à partir de FIRSTX et de l’espacement; la position a été utilisée.",
+ "168": "{0} n’a pas de FIRSTX, LASTX et NPOINTS; l’espacement a été tiré des valeurs X des lignes.",
+ "169": "{0} ne donne aucun moyen de placer ses points sur l’axe des x; ils ont été numérotés 0, 1, 2 et ainsi de suite.",
+ "170": "La première ligne commence à x = {0} mais ##FIRSTX={1}; FIRSTX a été utilisé.",
+ "171": "La première valeur Y {0} ne correspond pas à ##FIRSTY={1}.",
+ "172": "{0} se termine par un groupe incomplet de {1} valeurs; il a été abandonné.",
+ "173": "Impossible de lire {0} : {1}.",
+ "174": "Le spectre demande le bloc {0}, mais son fichier contient 1 bloc.",
+ "175": "Le spectre demande le bloc {0}, mais son fichier contient {1} blocs.",
+ "176": "Le spectre n’a pas de source.",
+ "177": "Le fichier {0} du spectre n’est pas dans le dessin.",
+ "178": "Aucun prédicteur pour {0} n’est disponible dans ce moteur.",
+ "179": "La prédiction a échoué : {0}",
+ "180": "La source du spectre n’est ni un fichier ni une prédiction.",
+ "181": "Le dessin n’a pas de spectre {0}.",
+ "182": "Les spectres en bâtons n’ont pas d’aires à intégrer.",
+ "183": "la valeur doit être supérieure à zéro.",
+ "184": "from et to doivent être deux valeurs de x différentes.",
+ "185": "Le spectre n’a pas d’intégrale {0}.",
+ "186": "Ce spectre n’a pas de fichier d’origine; exportez-le sans original=1.",
+ "187": "FormChem place des images PNG, JPEG, GIF, WebP et SVG, ainsi que des spectres JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/fr-CA/part14.json b/frontend/src/i18n/locales/fr-CA/part14.json
new file mode 100644
index 00000000..66caaea1
--- /dev/null
+++ b/frontend/src/i18n/locales/fr-CA/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Affichage",
+ "1": "Surface",
+ "2": "Rien à exporter : la vue 3D est vide.",
+ "3": "Échec de l’exportation",
+ "4": "Sélectionnez une structure à afficher en 3D.",
+ "5": "Construire en 3D",
+ "6": "Insérer une vue 3D",
+ "7": "Choisissez un fichier PDB, mmCIF, SDF ou MOL.",
+ "8": "Impossible de placer la structure 3D sur la page",
+ "9": "Sélectionnez un objet 3D ouvert à partir d’un fichier PDB ou mmCIF.",
+ "10": "Ce modèle n’a aucun ligand.",
+ "11": "Impossible d’extraire le ligand",
+ "12": "Pas encore de coordonnées 3D : Construire en 3D crée un conformère à partir du dessin.",
+ "13": "Fichier de structure 3D...",
+ "14": "Extraire le ligand...",
+ "15": "Exporter la structure 3D...",
+ "16": "Balayage dièdre...",
+ "17": "Mesurer en 3D",
+ "18": "Exporter la vue 3D en PNG...",
+ "19": "Exporter la vue 3D en glTF...",
+ "20": "{0} extrait : {1} (ordres de liaison déduits)",
+ "21": "{0} extrait : {1}",
+ "22": "Ouvrez d’abord la vue 3D",
+ "23": "Ouvre le panneau Vue 3D sur la structure sélectionnée (ou l’objet 3D sélectionné de la page) et suit la sélection. Une structure a d’abord besoin de coordonnées 3D : Construire en 3D les crée.",
+ "24": "Construit un conformère 3D de la structure sélectionnée à partir de son dessin 2D (coins, géométrie des doubles liaisons et charges conservés), le minimise avec le champ de force choisi et le stocke dans le dessin en une seule étape d’annulation; la vue 3D l’affiche.",
+ "25": "Minimise le conformère affiché de la structure sélectionnée avec le champ de force choisi dans la vue 3D (MMFF94 par défaut, UFF quand MMFF94 n’a pas de paramètres) et indique l’énergie avant et après, en une seule étape d’annulation.",
+ "26": "Génère un ensemble de conformères de la structure sélectionnée (ETKDG, élagué par RMSD, chacun minimisé) et garde ceux qui tiennent dans une fenêtre d’énergie; avec n, window et method, il s’exécute sans la boîte de dialogue.",
+ "27": "Conformères à générer",
+ "28": "Fenêtre d’énergie en kcal/mol",
+ "29": "Place une vue 3D de la structure sélectionnée sur la page à côté d’elle (en construisant d’abord les coordonnées 3D si elle n’en a pas) et ouvre le panneau Vue 3D qui lui est lié; tourner ou changer le style du modèle met à jour l’image de la page.",
+ "30": "Ouvre un fichier PDB, mmCIF, SDF ou MOL comme objet 3D sur la page (protéines en ruban, ligands en boules et bâtonnets, eaux masquées, ligand centré) et l’affiche dans la vue 3D.",
+ "31": "Transforme un ligand de l’objet 3D sélectionné (ouvert à partir d’un fichier PDB ou mmCIF) en structure 2D à côté de lui, en une seule étape d’annulation : ordres de liaison tirés d’un modèle intégré pour les ligands courants, sinon déduits de la géométrie et signalés; les coordonnées du fichier deviennent son conformère. Avec ligand, il prend celui-là; sans, il demande quand le modèle en a plusieurs.",
+ "32": "Clé de ligand chaîne:het:numéro, ou un code het",
+ "33": "Sélectionnez un objet 3D ouvert à partir d’un fichier PDB ou mmCIF",
+ "34": "Enregistre les coordonnées 3D de la structure sélectionnée avec tous les hydrogènes : molfile MDL (le conformère affiché), fichier SD (tous les conformères, avec champs de données d’énergie et de méthode), PDB ou XYZ (le conformère affiché, ou tous les conformères comme modèles ou images); un objet 3D ouvert à partir d’un fichier PDB ou mmCIF enregistre son fichier d’origine. Sans format, il demande.",
+ "35": "Format de fichier",
+ "36": "Tous les conformères au lieu de celui affiché (true par défaut pour sdf)",
+ "37": "Balaye le dièdre des quatre atomes choisis dans la vue 3D (ou sa dernière mesure de dièdre) avec une minimisation relaxée et trace l’angle en fonction de l’énergie.",
+ "38": "Mesure une distance (deux atomes), un angle (trois) ou un dièdre (quatre) dans la vue 3D et l’ajoute à la liste; avec atoms (ids d’atomes de fragment comme a1, hydrogènes sous la forme a1:h0, ou numéros de série PDB), il mesure ceux-là, sinon il passe en mode de sélection.",
+ "39": "De deux à quatre ids d’atomes",
+ "40": "Enregistre la vue 3D en image PNG à sa taille à l’écran; transparent omet l’arrière-plan.",
+ "41": "Enregistre la vue 3D en fichier glTF 2.0 binaire (.glb) : atomes en sphères et liaisons en cylindres aux couleurs des éléments, 1 ångström = 1 cm, pour les visionneuses 3D, les diapositives et l’impression.",
+ "42": "Aucune surface",
+ "43": "Retire la surface moléculaire de la vue 3D.",
+ "44": "Surface de van der Waals",
+ "45": "Affiche la surface de van der Waals dans la vue 3D.",
+ "46": "Surface accessible au solvant",
+ "47": "Affiche la surface accessible au solvant (sonde de 1,4 ångström) dans la vue 3D.",
+ "48": "Surface exclue du solvant",
+ "49": "Affiche la surface exclue du solvant dans la vue 3D.",
+ "50": "Surface ESP",
+ "51": "Colore la surface selon un potentiel électrostatique approché, calculé à partir des charges partielles empiriques du moteur (rouge négatif, bleu positif), avec une légende indiquant la méthode.",
+ "52": "Affiche la vue 3D en style filaire; pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "53": "Affiche la vue 3D en style bâtonnets; pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "54": "Boules et bâtonnets",
+ "55": "Affiche la vue 3D en style boules et bâtonnets; pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "56": "Compact (CPK)",
+ "57": "Affiche la vue 3D en style compact (CPK); pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "58": "Ruban",
+ "59": "Affiche la vue 3D en style ruban (protéines et acides nucléiques; les ligands restent en boules et bâtonnets); pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "60": "Angle dièdre (degrés)",
+ "61": "Énergie relative (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "Exporter la structure 3D",
+ "64": "Tous les conformères (enregistrements SDF, modèles PDB, images XYZ)",
+ "65": "1 conformère enregistré; chaque hydrogène est écrit avec sa position 3D.",
+ "66": "Extraire le ligand",
+ "67": "Ligand",
+ "68": "Le ligand devient une structure 2D à côté du modèle, ses coordonnées du fichier étant conservées comme son conformère.",
+ "69": "Extraire",
+ "70": "Fichier SD (.sdf)",
+ "71": "Molfile MDL (.mol)",
+ "72": "{0} conformères enregistrés; chaque hydrogène est écrit avec sa position 3D.",
+ "73": "Conformères",
+ "74": "Fenêtre d’énergie (kcal/mol)",
+ "75": "Plongement ETKDG avec une graine fixe, quasi-doublons élagués à 0,5 Å de RMSD sur les atomes lourds, chacun minimisé; le plus bas devient le conformère affiché.",
+ "76": "Générer",
+ "77": "Profil d’énergie du balayage dièdre",
+ "78": "Balayage dièdre",
+ "79": "De (degrés)",
+ "80": "À (degrés)",
+ "81": "Pas (degrés)",
+ "82": "Garder chaque point comme conformère (une seule étape d’annulation)",
+ "83": "Lancer le balayage",
+ "84": "Un balayage relaxé : à chaque angle, le dièdre est maintenu et tout le reste est minimisé.",
+ "85": "L’angle final doit être supérieur à l’angle de départ.",
+ "86": "Balayage en cours...",
+ "87": "Échec du balayage",
+ "88": "barrière {0} kcal/mol",
+ "89": "Style d’affichage",
+ "90": "Colorer la surface selon le potentiel électrostatique calculé à partir de charges partielles empiriques",
+ "91": "ESP",
+ "92": "Minimiser",
+ "93": "Balayage...",
+ "94": "Centrer sur le ligand",
+ "95": "Réinitialiser la vue",
+ "96": "Rotation",
+ "97": "Exporter la vue 3D",
+ "98": "Mesurer",
+ "99": "Mesures",
+ "100": "Image PNG",
+ "101": "Image PNG, transparente",
+ "102": "glTF binaire (.glb)",
+ "103": "La 3D a besoin de WebGL, que cette fenêtre n’offre pas.",
+ "104": "Chargement de la visionneuse 3D...",
+ "105": "Impossible de charger la visionneuse 3D",
+ "106": "Ouvrez un dessin et sélectionnez une structure pour la voir en 3D.",
+ "107": "Sélectionnez une structure sur la page pour la voir en 3D.",
+ "108": "Impossible de lire la structure 3D",
+ "109": "Ce conformère ne peut pas être écrit comme molfile",
+ "110": "La rotation est désactivée : le système demande une réduction des animations",
+ "111": "Un modèle PDB ou CIF n’a aucun conformère.",
+ "112": "Énergies relatives à la plus basse; cliquez sur l’une pour l’afficher.",
+ "113": "Construire en 3D ou Conformères... remplit cette liste.",
+ "114": "Charges partielles indisponibles",
+ "115": "le moteur n’a pas encore de routes 3D",
+ "116": "non convergé",
+ "117": "Choisissez quatre atomes liés à la suite (un dièdre), puis lancez le balayage.",
+ "118": "Cochez Garder chaque point comme conformère pour voir les géométries.",
+ "119": "Afficher le conformère",
+ "120": "Actualiser la vue 3D",
+ "121": "Impossible d’actualiser l’instantané de la page",
+ "122": "Aucune surface",
+ "123": "Van der Waals",
+ "124": "Accessible au solvant",
+ "125": "Exclue du solvant",
+ "126": "Distance",
+ "127": "Angle",
+ "128": "Dièdre",
+ "129": "{0} kcal/mol, {1}, non convergé",
+ "130": "Choisi {0} / {1} : {2}",
+ "131": "Cliquez sur {0} atomes pour mesurer",
+ "132": "ESP ({0}) : {1}, rouge {2} e à bleu +{3} e",
+ "133": "Distance {0} : {1}",
+ "134": "Angle {0} : {1}",
+ "135": "Dièdre {0} : {1}",
+ "136": "Construit : {0}",
+ "137": "Minimisé : {0}",
+ "138": "Conformères conservés : {0} sur {1}",
+ "139": "Conformères conservés : {0}",
+ "140": "Dièdre {0}",
+ "141": "Échec de l’encodage PNG"
+}
diff --git a/frontend/src/i18n/locales/fr-CA/part15.json b/frontend/src/i18n/locales/fr-CA/part15.json
new file mode 100644
index 00000000..c39fa264
--- /dev/null
+++ b/frontend/src/i18n/locales/fr-CA/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "approché, à partir de charges empiriques",
+ "1": "{0} centres stéréogènes ou doubles liaisons n’étaient pas précisés; une configuration a été choisie.",
+ "2": "{0} étiquettes stéréo du dessin ne sont pas reproduites en 3D.",
+ "3": "Le membre dessiné des groupes de stéréochimie améliorée {0} a été construit; le modèle 3D est un stéréoisomère du mélange (relatif ou racémique) que décrit le dessin.",
+ "4": "Plongement répété {0} fois (graines {1}) pour conserver la stéréochimie dessinée.",
+ "5": "{0} paires d’atomes lourds sont plus proches que {1} de leur contact de van der Waals.",
+ "6": "Champ de force universel utilisé : {0}.",
+ "7": "aucun paramètre {0} pour {1}",
+ "8": "{0} n’a pas pu typer tous les atomes",
+ "9": "{0} conformères ont modifié la stéréochimie dessinée pendant la minimisation et ont été écartés.",
+ "10": "Plus de 300 atomes lourds : la qualité de l’échantillonnage des conformères baisse à cette taille.",
+ "11": "La liaison centrale est dans un cycle; le cycle est contraint pour suivre l’angle.",
+ "12": "La structure n’avait pas de coordonnées 3D; le balayage est parti d’un nouveau plongement.",
+ "13": "La structure a changé pendant le calcul 3D; relancez la commande.",
+ "14": "Le dessin n’a pas d’objet {0}.",
+ "15": "{0} n’a pas encore de coordonnées 3D; construisez d’abord la 3D.",
+ "16": "{0} n’a pas de conformère {1}.",
+ "17": "La structure n’a aucun atome.",
+ "18": "La 3D a besoin de vrais atomes : {0} atomes sont des étiquettes, des groupes R ou des points de fixation ({1}).",
+ "19": "Impossible d’ajouter les hydrogènes : {0}",
+ "20": "La structure a {0} atomes avec hydrogènes; la 3D en gère jusqu’à {1}.",
+ "21": "Les coordonnées 3D ne correspondent pas à cette structure (rien pour {0}); reconstruisez la 3D.",
+ "22": "Les coordonnées 3D ne correspondent pas à cette structure (le nombre d’hydrogènes a changé); reconstruisez la 3D.",
+ "23": "La structure n’a pas pu être plongée en 3D : {0}",
+ "24": "La structure n’a pas pu être plongée en 3D; vérifiez ses valences et sa stéréochimie.",
+ "25": "Les conformères n’ont pas pu être plongés : {0}",
+ "26": "Aucun conformère n’a pu être plongé; vérifiez les valences et la stéréochimie de la structure.",
+ "27": "Tous les conformères plongés ont perdu la stéréochimie dessinée après la minimisation.",
+ "28": "Aucun champ de force n’a de paramètres pour cette structure ({0}).",
+ "29": "Le champ de force universel n’a pas pu être configuré : {0}",
+ "30": "Le champ de force universel n’a pas pu être configuré.",
+ "31": "Atomes inconnus {0}; utilisez des ids d’atomes de fragment ou un hydrogène sous la forme a1:h0.",
+ "32": "Les quatre atomes doivent être différents.",
+ "33": "Les quatre atomes doivent former une chaîne de liaisons (a1-a2-a3-a4).",
+ "34": "Le fichier 3D n’a pas pu être écrit : {0}",
+ "35": "Le fichier n’est pas un fichier PDB, mmCIF, SDF ou MOL que FormChem peut lire.",
+ "36": "Le fichier contient plus de {0} atomes.",
+ "37": "Le fichier PDB n’a aucun enregistrement ATOM ou HETATM.",
+ "38": "La table atom_site du mmCIF n’a pas de colonnes Cartn_x, Cartn_y et Cartn_z.",
+ "39": "Le CIF a des coordonnées fractionnaires mais pas de maille complète.",
+ "40": "Le CIF n’a pas de table atom_site.",
+ "41": "Le CIF n’a aucun atome lisible.",
+ "42": "Le fichier n’a aucun enregistrement.",
+ "43": "Le fichier a {0} enregistrements; l’importation 3D en lit jusqu’à {1}.",
+ "44": "Aucun enregistrement du fichier n’a pu être lu.",
+ "45": "{0} n’est pas un fichier PDB ou mmCIF.",
+ "46": "{0} n’a pas pu être converti en dessin FormChem : {1}.",
+ "47": "Modèle PDB placé comme objet 3D : {0}.",
+ "48": "Modèle mmCIF placé comme objet 3D : {0}.",
+ "49": "{0} lignes ATOM ou HETATM avaient des coordonnées illisibles et ont été ignorées.",
+ "50": "{0} lignes atom_site avaient des coordonnées illisibles et ont été ignorées.",
+ "51": "CIF de petite molécule : l’unité asymétrique est lue à partir des coordonnées fractionnaires; les équivalents de symétrie ne sont pas générés.",
+ "52": "{0} : problèmes de valence; lecture sans assainissement.",
+ "53": "{0} : coordonnées 2D uniquement; aucun conformère conservé.",
+ "54": "{0} hydrogènes n’étaient pas dans le fichier et ont été placés d’après la géométrie.",
+ "55": "Impossible de lire {0} : {1}",
+ "56": "Impossible de lire {0}.",
+ "57": "Enregistrement {0}",
+ "58": "La structure",
+ "59": "Les coordonnées 3D du fichier ont été conservées comme conformère de 1 structure; Construire en 3D n’est pas nécessaire pour les voir.",
+ "60": "Les coordonnées 3D du fichier ont été conservées comme conformère de {0} structures; Construire en 3D n’est pas nécessaire pour les voir.",
+ "61": "{0} est un ion simple; il n’y a pas de structure à extraire.",
+ "62": "Les atomes de {0} n’ont pas pu être lus.",
+ "63": "Aucun ligand {0} dans la structure; ligands : {1}.",
+ "64": "Le dessin n’a pas de modèle 3D {0}.",
+ "65": "FormChem place des images PNG, JPEG, GIF, WebP et SVG, des spectres JCAMP-DX et des fichiers de structure PDB, mmCIF, SDF et MOL."
+}
diff --git a/frontend/src/i18n/locales/fr/part12.json b/frontend/src/i18n/locales/fr/part12.json
new file mode 100644
index 00000000..55245bed
--- /dev/null
+++ b/frontend/src/i18n/locales/fr/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spectre",
+ "1": "Dessinez ou sélectionnez une structure à nommer.",
+ "2": "Impossible de calculer les noms",
+ "3": "FormChem n’a pas de nom pour cette structure.",
+ "4": "Copier le nom",
+ "5": "Nom copié : {0}",
+ "6": "Nom chimique à insérer ; omettez-le pour ouvrir la boîte de dialogue",
+ "7": "Copie en texte brut le nom de la structure sélectionnée (ou des structures de la page) : le nom courant quand FormChem en connaît un, sinon son nom systématique, qui n’est proposé que s’il se relit en la même structure.",
+ "8": "trivial ou systematic pour choisir le nom à copier ; omettez pour prendre le premier",
+ "9": "Le spectre prédit est à jour.",
+ "10": "Actualiser le spectre prédit",
+ "11": "Sélectionnez d’abord une structure",
+ "12": "Sélectionnez d’abord un spectre prédit",
+ "13": "Spectre RMN 1H prédit ajouté ({0})",
+ "14": "Spectre RMN 13C prédit ajouté ({0})",
+ "15": "Spectre prédit actualisé ({0})",
+ "16": "Id de fragment de la structure ; par défaut la structure sélectionnée, ou la seule de la page",
+ "17": "Fréquence du spectromètre en MHz (400 par défaut pour 1H, 100 pour 13C)",
+ "18": "Ajoute à côté de la structure sélectionnée un spectre RMN 1H prédit, en une seule étape d’annulation : un objet spectre calculé par les règles d’incréments propres à FormChem (sans base de données de déplacements), dont les multiplets et les intégrales sont liés aux atomes de la structure, et dont le titre indique la méthode, la version et la fréquence. La courbe est recalculée à partir de la structure, jamais enregistrée.",
+ "19": "Ajoute à côté de la structure sélectionnée un spectre RMN 13C prédit, en une seule étape d’annulation : un objet spectre calculé par les règles d’incréments propres à FormChem (sans base de données de déplacements), dont les pics sont liés aux atomes de la structure, et dont le titre indique la méthode, la version et la fréquence. La courbe est recalculée à partir de la structure, jamais enregistrée.",
+ "20": "Impossible de prédire le spectre",
+ "21": "Prédire le spectre RMN 1H",
+ "22": "Prédire le spectre RMN 13C",
+ "23": "Recalcule les multiplets, les intégrales ou les pics d’un spectre prédit après la modification de sa structure, avec la version actuelle du prédicteur, en une seule étape d’annulation ; rien ne change s’il est à jour.",
+ "24": "Id du spectre prédit ; par défaut celui qui est sélectionné ou celui ouvert dans l’éditeur de spectres",
+ "25": "Impossible d’actualiser le spectre",
+ "26": "Aucun nouveau pic dans cette plage.",
+ "27": "Faites glisser sur une plage dans l’éditeur de spectres pour l’intégrer.",
+ "28": "Lier le pic à des atomes",
+ "29": "Délier le pic",
+ "30": "Axe Y du spectre",
+ "31": "Spectre à partir d’un fichier...",
+ "32": "Modifier le spectre...",
+ "33": "Détecter les pics",
+ "34": "Intégrer",
+ "35": "Transmittance ou absorbance",
+ "36": "Exporter le spectre...",
+ "37": "Sélectionnez d’abord un spectre",
+ "38": "aucun spectre avec l’id {0}",
+ "39": "Pics détectés : {0} (déjà présents : {1})",
+ "40": "Pics détectés : {0}",
+ "41": "Les intégrales concernent les spectres RMN",
+ "42": "Sélectionnez d’abord un pic, une intégrale ou un multiplet dans l’éditeur de spectres",
+ "43": "Les atomes doivent tous appartenir à une même structure",
+ "44": "Seuls les spectres IR, Raman et UV-Vis basculent entre transmittance et absorbance",
+ "45": "Exporté : {0}",
+ "46": "Id de l’objet spectre ; par défaut le spectre sélectionné ou celui ouvert dans l’éditeur de spectres",
+ "47": "Importe un fichier de spectre JCAMP-DX dans le dessin actif (un objet spectre par bloc de données, le fichier étant conservé octet pour octet), en une seule étape d’annulation par fichier. Sans path, ouvre une boîte de dialogue de fichier.",
+ "48": "Chemin absolu d’un fichier .jdx, .dx ou .jcamp",
+ "49": "Impossible d’importer le spectre",
+ "50": "Ouvre l’éditeur de spectres pour le spectre sélectionné (comme un double-clic dessus).",
+ "51": "Impossible d’ouvrir le spectre",
+ "52": "Trouve les pics d’un spectre dans une plage (par défaut la plage affichée) et les ajoute à sa liste de pics en ignorant ceux déjà présents, en une seule étape d’annulation.",
+ "53": "Début de la plage dans l’unité de x (cm-1, nm, m/z, ppm)",
+ "54": "Fin de la plage dans l’unité de x",
+ "55": "Seuil de détection facultatif en unités de y",
+ "56": "Remplacer la liste de pics au lieu d’y ajouter",
+ "57": "Impossible de détecter les pics",
+ "58": "Ajoute une intégrale RMN sur une plage, mise à l’échelle comme les intégrales existantes (ou sur value, en rééchelonnant les autres), en une seule étape d’annulation. Sans from et to, bascule l’éditeur de spectres sur son outil d’intégration.",
+ "59": "Début de la plage en ppm",
+ "60": "Fin de la plage en ppm",
+ "61": "Valeur que doit indiquer cette intégrale, par exemple un nombre de protons",
+ "62": "Impossible d’intégrer",
+ "63": "Lie un pic, une intégrale ou un multiplet à des atomes d’une structure, en une seule étape d’annulation. Sans atoms, utilise les atomes sélectionnés, ou attend que la personne clique des atomes dans le dessin.",
+ "64": "Id du pic, de l’intégrale ou du multiplet ; par défaut celui sélectionné dans l’éditeur de spectres",
+ "65": "Id de la structure (fragment) à laquelle appartiennent les atomes",
+ "66": "Id des atomes",
+ "67": "Impossible de lier le pic",
+ "68": "Supprime le lien d’un pic, d’une intégrale ou d’un multiplet avec des atomes, en une seule étape d’annulation.",
+ "69": "Impossible de délier le pic",
+ "70": "Affiche un spectre IR, Raman ou UV-Vis en transmittance ou en absorbance (bascule sans mode), en une seule étape d’annulation.",
+ "71": "Axe Y à afficher ; omettez pour basculer",
+ "72": "Impossible de changer l’axe Y",
+ "73": "Enregistre un spectre au format JCAMP-DX (avec sa table de pics s’il en a) ou en CSV de tous les points, via le moteur.",
+ "74": "Format de fichier, jdx par défaut",
+ "75": "Avec jdx : le fichier importé d’origine, inchangé",
+ "76": "Chemin absolu où écrire ; omettez pour le demander",
+ "77": "Impossible d’exporter le spectre",
+ "78": "Insérer un spectre à partir d’un fichier",
+ "79": "Le fichier ne contient aucun spectre que FormChem puisse dessiner",
+ "80": "Insérer un spectre",
+ "81": "Le spectre n’a pas pu être placé : son fichier n’est pas parvenu au dessin.",
+ "82": "Spectres insérés : {0}",
+ "83": "Longueur d’onde (µm)",
+ "84": "Nombre d’onde (cm⁻¹)",
+ "85": "Déplacement Raman (cm⁻¹)",
+ "86": "Longueur d’onde (nm)",
+ "87": "Fréquence (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmittance (%)",
+ "90": "Transmittance",
+ "91": "Absorbance",
+ "92": "Abondance relative (%)",
+ "93": "Intensité",
+ "94": "RMN {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Prédit : {0}, {1} MHz ({2})",
+ "100": "Prédit : {0}, {1} MHz",
+ "101": "Prédit : {0} ({1})",
+ "102": "Prédit : {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spectre indisponible : {0}",
+ "105": "Chargement du spectre",
+ "106": "Nom courant",
+ "107": "Systématique",
+ "108": "Confiance élevée",
+ "109": "Confiance moyenne",
+ "110": "Confiance faible",
+ "111": "Non lu",
+ "112": "Noms FormChem",
+ "113": "Impossible de lire le nom",
+ "114": "Insérer une structure à partir d’un nom",
+ "115": "Structure à partir d’un nom",
+ "116": "Un nom, par exemple aspirine ou 2-méthylpropan-1-ol",
+ "117": "Nom chimique",
+ "118": "Tapez un nom pour voir sa structure.",
+ "119": "Aucune structure pour ce nom",
+ "120": "Dictionnaire",
+ "121": "Analyseur systématique",
+ "122": "Nommeur à règles, vérifié par aller-retour",
+ "123": "Outils de spectre",
+ "124": "Afficher tout le spectre",
+ "125": "Axe Y",
+ "126": "Afficher cette plage sur la page",
+ "127": "Double-cliquez sur un spectre dans le dessin pour le modifier ici.",
+ "128": "Pics et intégrales",
+ "129": "Prédit",
+ "130": "Valeur de l’intégrale",
+ "131": "Lier à des atomes",
+ "132": "Délier",
+ "133": "1 atome",
+ "134": "Atomes à lier",
+ "135": "Cliquez sur d’autres atomes, puis sur Terminé.",
+ "136": "Cliquez dans le dessin sur les atomes qui appartiennent à ce pic, puis sur Terminé.",
+ "137": "Rien à intégrer dans cette plage.",
+ "138": "Supprimer le pic",
+ "139": "Ajouter un pic",
+ "140": "Lié à 1 atome",
+ "141": "Définir la plage du spectre",
+ "142": "Saisissez un nombre positif.",
+ "143": "Impossible de définir l’intégrale",
+ "144": "Panoramique et zoom : faites glisser pour déplacer, molette pour zoomer, Shift + glisser pour zoomer sur une plage",
+ "145": "Zoom sur une plage : faites glisser sur le graphique",
+ "146": "Détecter les pics : faites glisser sur une plage",
+ "147": "Ajouter ou supprimer un pic : cliquez près d’un pic",
+ "148": "Intégrer : faites glisser sur une plage",
+ "149": "Pic",
+ "150": "Intégrale",
+ "151": "Multiplet",
+ "152": "{0} atomes",
+ "153": "Lié à {0}",
+ "154": "Faites glisser pour déplacer, molette pour zoomer, Shift + glisser pour zoomer sur une plage. Cliquez sur une étiquette pour la sélectionner.",
+ "155": "Faites glisser sur le graphique pour zoomer sur cette plage.",
+ "156": "Faites glisser sur une plage pour en détecter les pics.",
+ "157": "Cliquez près d’un pic pour l’ajouter ; cliquez sur l’étiquette d’un pic pour le supprimer.",
+ "158": "Faites glisser sur une plage pour l’intégrer.",
+ "159": "Lié à {0} atomes"
+}
diff --git a/frontend/src/i18n/locales/fr/part13.json b/frontend/src/i18n/locales/fr/part13.json
new file mode 100644
index 00000000..9d0fb3eb
--- /dev/null
+++ b/frontend/src/i18n/locales/fr/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "le moteur a renvoyé un fichier vide",
+ "1": "le nom dépasse {0} caractères",
+ "2": "les fragments de plus de {0} atomes ne sont pas nommés",
+ "3": "La structure contient des étiquettes, des groupes R ou des atomes quelconques, qui n’ont pas de nom.",
+ "4": "La structure n’a pas pu être lue comme une molécule (vérifiez les valences).",
+ "5": "Il n’y a aucune structure à nommer.",
+ "6": "Les noms à index inversé (le parent d’abord, puis une virgule et les substituants) ne sont pas lus ; écrivez le nom dans l’ordre normal, par exemple 1,2-dichlorobenzène.",
+ "7": "D- et L- ne sont lus que pour les acides aminés et les sucres du dictionnaire de FormChem ; indiquez des descripteurs R ou S pour les autres noms.",
+ "8": "FormChem a lu tout le nom, mais il ne forme pas un nom de structure complet (il peut manquer un parent comme l’hexane ou le benzène, ou un suffixe).",
+ "9": "FormChem n’a pas pu lire le nom à partir du caractère {0} (« {1} »).",
+ "10": "FormChem a lu le nom, mais {0}.",
+ "11": "la structure n’a pas pu être complétée",
+ "12": "Le nom peut se lire de plusieurs façons ; FormChem a dessiné la lecture qui demande le moins d’hypothèses.",
+ "13": "Le nom ne donne aucun descripteur stéréochimique, donc les centres stéréogènes et les doubles liaisons sont dessinés sans précision.",
+ "14": "Aucun nom systématique : {0}.",
+ "15": "Le nom systématique construit par FormChem ne se relisait pas en la même structure ; il n’est donc pas affiché.",
+ "16": "cette double liaison ne peut pas être E ou Z",
+ "17": "le locant de descripteur {0} n’est pas une position du parent",
+ "18": "la position {0} ne débute pas une double liaison pouvant être E ou Z",
+ "19": "{0} exige exactement une double liaison pouvant être cis ou trans ; cette structure en a {1}",
+ "20": "{0} est ambigu pour cette double liaison ; indiquez plutôt E ou Z",
+ "21": "({0}) exige un locant : la structure compte {1} centres stéréogènes",
+ "22": "la position {0} n’est pas un centre stéréogène, donc ({1}) ne peut pas s’appliquer",
+ "23": "({0}) exige un locant : la structure compte {1} doubles liaisons pouvant être E ou Z",
+ "24": "la position {0} ne peut pas recevoir ce descripteur : {1}",
+ "25": "cette double liaison ne peut pas recevoir ce descripteur : {0}",
+ "26": "{0} ne dit pas quelle configuration est visée, donc la structure est dessinée sans stéréochimie.",
+ "27": "{0} n’a pas de point de fixation",
+ "28": "il n’y a pas de place pour {0} à {1}",
+ "29": "{0} ne peut pas se lier à cet endroit",
+ "30": "les chaînes de plus de {0} carbones ne sont pas encore lues",
+ "31": "{0} est trop petit pour former un cycle",
+ "32": "{0}-{1} est un tautomère que FormChem ne dessine pas encore à partir d’un nom",
+ "33": "le locant {0} n’est pas une position de {1}",
+ "34": "{0} n’est pas une position de chaîne",
+ "35": "une liaison multiple ne peut pas débuter ici : position {0} de {1}",
+ "36": "la position {0} de {1} ne peut pas porter cette liaison multiple",
+ "37": "il n’y a pas de place pour une liaison multiple à la position {0} de {1}",
+ "38": "il n’y a pas de place pour les liaisons multiples de {0}",
+ "39": "Les positions des liaisons multiples de {0} n’ont pas été données ; dessinées aux positions les plus basses.",
+ "40": "-{0} exige une chaîne ouverte ; sur un cycle, le suffixe est carbaldéhyde, acide carboxylique, carbonitrile ou carboxamide",
+ "41": "une chaîne n’a que deux extrémités pour -{0}",
+ "42": "{0} est trop court pour deux groupes -{1}",
+ "43": "il n’y a pas de place pour -{0} sur {1}",
+ "44": "La position de -{0} sur {1} n’a pas été donnée ; dessiné à la position la plus basse.",
+ "45": "-{0} doit se trouver au bout de la chaîne, pas à {1}",
+ "46": "il n’y a pas de place pour -{0} à {1}",
+ "47": "ortho, méta et para exigent un cycle benzénique",
+ "48": "ortho, méta ou para avec un seul groupe exige un parent comme le phénol, l’aniline ou le toluène",
+ "49": "il n’y a pas de place pour {0} sur {1}",
+ "50": "il n’y a pas de place pour {0} groupes {1} sur {2}",
+ "51": "La position de {0} sur {1} n’a pas été donnée ; dessiné à la position libre la plus basse.",
+ "52": "{0} ne peut pas porter de substituants",
+ "53": "un groupe acyle se fixe par son carbone carbonyle",
+ "54": "{0} n’a pas de position libre",
+ "55": "La position de fixation de {0} n’a pas été donnée ; position {1} supposée.",
+ "56": "{0} n’a plus de place pour se fixer",
+ "57": "les locants {0} avant {1} ne sont pas utilisés",
+ "58": "{0} ne peut pas figurer comme mot séparé",
+ "59": "« {0} » exige {1} groupe avant lui, le nom en donne {2}",
+ "60": "« {0} » exige {1} groupes avant lui, le nom en donne {2}",
+ "61": "le nom donne {0} groupe alkyle pour {1} position d’ester",
+ "62": "le nom donne {0} groupe alkyle pour {1} positions d’ester",
+ "63": "le nom donne {0} groupes alkyle pour {1} position d’ester",
+ "64": "le nom donne {0} groupes alkyle pour {1} positions d’ester",
+ "65": "la structure qu’il décrit n’est pas valide ({0})",
+ "66": "-one à {0} serait un aldéhyde ; un aldéhyde se nomme avec -al",
+ "67": "la position {0} de {1}",
+ "68": "trop de substituants identiques",
+ "69": "locants mixtes",
+ "70": "les types de liaison inhabituels ne sont pas encore nommés",
+ "71": "un système cyclique que FormChem ne sait pas encore nommer",
+ "72": "les cycles aromatiques à doubles liaisons exocycliques (comme les pyridones) ne sont pas encore nommés",
+ "73": "les isotopes et les radicaux ne sont pas encore nommés",
+ "74": "les halogènes hypervalents ne sont pas nommés",
+ "75": "les groupes azotés chargés autres que nitro ne sont pas encore nommés",
+ "76": "les atomes chargés ne sont pas encore nommés",
+ "77": "les oxydes de soufre, d’azote et de phosphore ne sont pas encore nommés",
+ "78": "ce groupe oxygéné n’est pas encore nommé",
+ "79": "les sulfoxydes, les sulfones et les autres groupes soufrés ne sont pas encore nommés",
+ "80": "les imines, les composés azo et les groupes azotés semblables ne sont pas encore nommés",
+ "81": "{0} n’est pas encore nommé",
+ "82": "les chaînes de substituants de plus de 20 carbones ne sont pas nommées",
+ "83": "les groupes acyle insaturés ne sont pas encore nommés",
+ "84": "les groupes ylidène substitués ne sont pas encore nommés",
+ "85": "les groupes ylidène cycliques ne sont pas encore nommés",
+ "86": "les cycles fixés deux fois ne sont pas encore nommés",
+ "87": "aucune numérotation trouvée pour un substituant de cycle",
+ "88": "les esters à parties alcool différentes ne sont pas encore nommés",
+ "89": "aucune chaîne ou aucun cycle parent trouvé",
+ "90": "les esters cycliques (lactones) ne sont pas encore nommés",
+ "91": "les substituants sur plus d’un azote d’amine ou d’amide ne sont pas encore nommés",
+ "92": "les centres stéréogènes hors de la chaîne ou du cycle parent ne sont pas encore nommés",
+ "93": "la géométrie de double liaison hors de la chaîne parente n’est pas encore nommée",
+ "94": "les centres pseudo-asymétriques ne sont pas encore nommés",
+ "95": "cette géométrie de double liaison n’est pas encore nommée",
+ "96": "les chaînes de plus de 20 carbones ne sont pas nommées",
+ "97": "trop de groupes identiques",
+ "98": "la structure a des erreurs de valence",
+ "99": "les sels et les mélanges ne sont pas encore nommés systématiquement",
+ "100": "les structures de plus de {0} atomes lourds ne sont pas encore nommées systématiquement",
+ "101": "les composés de {0} ne sont pas encore nommés systématiquement",
+ "102": "les atomes de requête et les groupes R n’ont pas de nom",
+ "103": "les hydrures d’un seul hétéroatome ne sont nommés qu’à partir du dictionnaire",
+ "104": "{0} n’est pas un objet de ce dessin.",
+ "105": "{0} n’a aucun atome.",
+ "106": "Le fragment n’a aucun atome.",
+ "107": "Le dessin n’a pas de page.",
+ "108": "{0} n’est pas un spectre de ce dessin.",
+ "109": "La structure {0} à laquelle appartient cette prédiction n’est plus dans le dessin.",
+ "110": "Le dessin {0} a été fermé.",
+ "111": "Déplacement chimique (ppm)",
+ "112": "Temps (s)",
+ "113": "Réflectance",
+ "114": "Abondance relative",
+ "115": "##{0}= apparaît plus d’une fois ; la première valeur a été conservée.",
+ "116": "##XYDATA={0} n’est pas une liste de variables connue ; elle a été lue comme (X++(Y..Y)).",
+ "117": "##{0}={1} n’est pas une liste de variables connue ; elle a été lue comme (XY..XY).",
+ "118": "Les points n’étaient pas dans l’ordre de x et ont été triés.",
+ "119": "##.SHIFT REFERENCE={0} n’a pas pu être lu ; les déplacements n’ont pas été référencés.",
+ "120": "##.SHIFT REFERENCE désigne le point {0}, hors des {1} points ; les déplacements n’ont pas été référencés.",
+ "121": "Les déplacements ont été référencés de sorte que le point {0} indique {1} ppm ({2}).",
+ "122": "Le fichier ne nomme pas le noyau observé.",
+ "123": "Ce sont des données RMN dans le domaine temporel (un FID) ; elles sont affichées telles qu’acquises, sans transformée de Fourier.",
+ "124": "Les fréquences en Hz ont été divisées par la fréquence d’observation ({0} MHz) pour obtenir des ppm.",
+ "125": "Il n’y a pas de ##.SHIFT REFERENCE ; 0 Hz a été pris pour 0 ppm.",
+ "126": "Il n’y a pas de ##.OBSERVE FREQUENCY, donc l’axe des déplacements reste en Hz.",
+ "127": "La transmittance était stockée sous forme de fraction et est affichée en pourcentage.",
+ "128": "Le bloc {0} contient plus de {1} points.",
+ "129": "##DATA TYPE={0} avec des unités de x {1} ne désigne aucune technique connue ; il est dessiné comme un spectre simple.",
+ "130": "##BLOCKS={0} mais le bloc LINK contient {1} blocs ; tous les blocs trouvés ont été lus.",
+ "131": "Ce n’est pas un fichier JCAMP-DX : il n’a pas d’enregistrement ##TITLE=.",
+ "132": "Le fichier contient {0} blocs à la suite sans bloc LINK ; chacun a été lu.",
+ "133": "Deux blocs partagent le même ##BLOCK_ID.",
+ "134": "Le fichier ne contient aucun spectre que FormChem puisse dessiner ({0}).",
+ "135": "Le bloc « {0} » n’a pas été dessiné : {1}.",
+ "136": "un bloc de structure (JCAMP-CS) ; il est conservé dans le fichier mais pas dessiné",
+ "137": "il ne contient ni XYDATA, ni XYPOINTS, ni PEAK TABLE, ni NTUPLES",
+ "138": "sa table de données ne contient aucun point",
+ "139": "sa table NTUPLES ne déclare aucun symbole",
+ "140": "les spectres NTUPLES 2D ne sont pas encore pris en charge",
+ "141": "sa table NTUPLES n’a aucune page lisible",
+ "142": "Le fichier contient des caractères hors ASCII ; il a été lu comme UTF-8.",
+ "143": "Le fichier contient des octets qui ne sont ni ASCII ni UTF-8 ; il a été lu comme Latin-1.",
+ "144": "Les lignes en dehors de tout enregistrement de données étiqueté ont été ignorées.",
+ "145": "Un ##END= sans bloc avant lui a été ignoré.",
+ "146": "Les enregistrements avant le premier ##TITLE= ou après le dernier ##END= ont été ignorés.",
+ "147": "Le fichier se termine sans ##END= ; les blocs ouverts ont été fermés.",
+ "148": "Page NTUPLES {0}",
+ "149": "La page NTUPLES {0} n’a pas de ##DATA TABLE= ; elle a été ignorée.",
+ "150": "La page NTUPLES {0} utilise des symboles ({1}) non déclarés dans ##SYMBOL= ; elle a été ignorée.",
+ "151": "{0} a une forme de table de données que FormChem ne lit pas ({1}) ; elle a été ignorée.",
+ "152": "La table NTUPLES n’a pas de ##END NTUPLES= ; elle a été lue jusqu’à la fin du bloc.",
+ "153": "La table NTUPLES n’a pas de liste ##SYMBOL=.",
+ "154": "C’est un spectre 2D (deux variables indépendantes) ; les spectres 2D ne sont pas dessinés dans cette version.",
+ "155": "La table NTUPLES a {0} pages ; seules les {1} premières ont été lues.",
+ "156": "La page imaginaire n’a pas les mêmes valeurs de x que la page réelle ; elle a été laissée de côté.",
+ "157": "La table NTUPLES contient {0} pages ; la page {1} est affichée et {2} autres pages ont été laissées de côté.",
+ "158": "##DELTAX={0} diffère de (LASTX - FIRSTX) / (NPOINTS - 1) = {1} ; l’espacement calculé est utilisé.",
+ "159": "{0} n’a pas de FIRSTX, LASTX et NPOINTS complets ; l’espacement vient de ##DELTAX.",
+ "160": "Une ligne de données commençait par une valeur DIF ; elle continue à partir de la dernière valeur de la ligne précédente.",
+ "161": "Une valeur de contrôle Y ne correspondait pas à la dernière valeur de la ligne précédente ; la ligne a été poursuivie à partir de la valeur antérieure.",
+ "162": "{0} caractères dans {1} n’ont pas pu être lus et ont été ignorés.",
+ "163": "{0} lignes DIF n’étaient pas suivies d’une valeur de contrôle Y.",
+ "164": "{0} ne contient aucun point de données.",
+ "165": "{0} contient {1} points mais ##NPOINTS={2} ; les valeurs X des lignes correspondent à {3} points de FIRSTX à LASTX, donc cet espacement a été utilisé.",
+ "166": "{0} contient {1} points mais ##NPOINTS={2} ; les points lus ont été conservés.",
+ "167": "La valeur X d’une ligne ne correspond pas à sa position à partir de FIRSTX et de l’espacement ; la position a été utilisée.",
+ "168": "{0} n’a pas de FIRSTX, LASTX et NPOINTS ; l’espacement a été tiré des valeurs X des lignes.",
+ "169": "{0} ne donne aucun moyen de placer ses points sur l’axe des x ; ils ont été numérotés 0, 1, 2 et ainsi de suite.",
+ "170": "La première ligne commence à x = {0} mais ##FIRSTX={1} ; FIRSTX a été utilisé.",
+ "171": "La première valeur Y {0} ne correspond pas à ##FIRSTY={1}.",
+ "172": "{0} se termine par un groupe incomplet de {1} valeurs ; il a été abandonné.",
+ "173": "Impossible de lire {0} : {1}.",
+ "174": "Le spectre demande le bloc {0}, mais son fichier contient 1 bloc.",
+ "175": "Le spectre demande le bloc {0}, mais son fichier contient {1} blocs.",
+ "176": "Le spectre n’a pas de source.",
+ "177": "Le fichier {0} du spectre n’est pas dans le dessin.",
+ "178": "Aucun prédicteur pour {0} n’est disponible dans ce moteur.",
+ "179": "La prédiction a échoué : {0}",
+ "180": "La source du spectre n’est ni un fichier ni une prédiction.",
+ "181": "Le dessin n’a pas de spectre {0}.",
+ "182": "Les spectres en bâtons n’ont pas d’aires à intégrer.",
+ "183": "la valeur doit être supérieure à zéro.",
+ "184": "from et to doivent être deux valeurs de x différentes.",
+ "185": "Le spectre n’a pas d’intégrale {0}.",
+ "186": "Ce spectre n’a pas de fichier d’origine ; exportez-le sans original=1.",
+ "187": "FormChem place des images PNG, JPEG, GIF, WebP et SVG, ainsi que des spectres JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/fr/part14.json b/frontend/src/i18n/locales/fr/part14.json
new file mode 100644
index 00000000..50c52f5a
--- /dev/null
+++ b/frontend/src/i18n/locales/fr/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Affichage",
+ "1": "Surface",
+ "2": "Rien à exporter : la vue 3D est vide.",
+ "3": "Échec de l’export",
+ "4": "Sélectionnez une structure à afficher en 3D.",
+ "5": "Construire en 3D",
+ "6": "Insérer une vue 3D",
+ "7": "Choisissez un fichier PDB, mmCIF, SDF ou MOL.",
+ "8": "Impossible de placer la structure 3D sur la page",
+ "9": "Sélectionnez un objet 3D ouvert à partir d’un fichier PDB ou mmCIF.",
+ "10": "Ce modèle n’a aucun ligand.",
+ "11": "Impossible d’extraire le ligand",
+ "12": "Pas encore de coordonnées 3D : Construire en 3D crée un conformère à partir du dessin.",
+ "13": "Fichier de structure 3D...",
+ "14": "Extraire le ligand...",
+ "15": "Exporter la structure 3D...",
+ "16": "Balayage dièdre...",
+ "17": "Mesurer en 3D",
+ "18": "Exporter la vue 3D en PNG...",
+ "19": "Exporter la vue 3D en glTF...",
+ "20": "{0} extrait : {1} (ordres de liaison déduits)",
+ "21": "{0} extrait : {1}",
+ "22": "Ouvrez d’abord la vue 3D",
+ "23": "Ouvre le panneau Vue 3D sur la structure sélectionnée (ou l’objet 3D sélectionné de la page) et suit la sélection. Une structure a d’abord besoin de coordonnées 3D : Construire en 3D les crée.",
+ "24": "Construit un conformère 3D de la structure sélectionnée à partir de son dessin 2D (coins, géométrie des doubles liaisons et charges conservés), le minimise avec le champ de force choisi et le stocke dans le dessin en une seule étape d’annulation ; la vue 3D l’affiche.",
+ "25": "Minimise le conformère affiché de la structure sélectionnée avec le champ de force choisi dans la vue 3D (MMFF94 par défaut, UFF quand MMFF94 n’a pas de paramètres) et indique l’énergie avant et après, en une seule étape d’annulation.",
+ "26": "Génère un ensemble de conformères de la structure sélectionnée (ETKDG, élagué par RMSD, chacun minimisé) et garde ceux qui tiennent dans une fenêtre d’énergie ; avec n, window et method, il s’exécute sans la boîte de dialogue.",
+ "27": "Conformères à générer",
+ "28": "Fenêtre d’énergie en kcal/mol",
+ "29": "Place une vue 3D de la structure sélectionnée sur la page à côté d’elle (en construisant d’abord les coordonnées 3D si elle n’en a pas) et ouvre le panneau Vue 3D qui lui est lié ; tourner ou changer le style du modèle met à jour l’image de la page.",
+ "30": "Ouvre un fichier PDB, mmCIF, SDF ou MOL comme objet 3D sur la page (protéines en ruban, ligands en boules et bâtonnets, eaux masquées, ligand centré) et l’affiche dans la vue 3D.",
+ "31": "Transforme un ligand de l’objet 3D sélectionné (ouvert à partir d’un fichier PDB ou mmCIF) en structure 2D à côté de lui, en une seule étape d’annulation : ordres de liaison tirés d’un modèle intégré pour les ligands courants, sinon déduits de la géométrie et signalés ; les coordonnées du fichier deviennent son conformère. Avec ligand, il prend celui-là ; sans, il demande quand le modèle en a plusieurs.",
+ "32": "Clé de ligand chaîne:het:numéro, ou un code het",
+ "33": "Sélectionnez un objet 3D ouvert à partir d’un fichier PDB ou mmCIF",
+ "34": "Enregistre les coordonnées 3D de la structure sélectionnée avec tous les hydrogènes : molfile MDL (le conformère affiché), fichier SD (tous les conformères, avec champs de données d’énergie et de méthode), PDB ou XYZ (le conformère affiché, ou tous les conformères comme modèles ou images) ; un objet 3D ouvert à partir d’un fichier PDB ou mmCIF enregistre son fichier d’origine. Sans format, il demande.",
+ "35": "Format de fichier",
+ "36": "Tous les conformères au lieu de celui affiché (true par défaut pour sdf)",
+ "37": "Balaye le dièdre des quatre atomes choisis dans la vue 3D (ou sa dernière mesure de dièdre) avec une minimisation relaxée et trace l’angle en fonction de l’énergie.",
+ "38": "Mesure une distance (deux atomes), un angle (trois) ou un dièdre (quatre) dans la vue 3D et l’ajoute à la liste ; avec atoms (ids d’atomes de fragment comme a1, hydrogènes sous la forme a1:h0, ou numéros de série PDB), il mesure ceux-là, sinon il passe en mode de sélection.",
+ "39": "De deux à quatre ids d’atomes",
+ "40": "Enregistre la vue 3D en image PNG à sa taille à l’écran ; transparent omet l’arrière-plan.",
+ "41": "Enregistre la vue 3D en fichier glTF 2.0 binaire (.glb) : atomes en sphères et liaisons en cylindres aux couleurs des éléments, 1 ångström = 1 cm, pour les visionneuses 3D, les diapositives et l’impression.",
+ "42": "Aucune surface",
+ "43": "Retire la surface moléculaire de la vue 3D.",
+ "44": "Surface de van der Waals",
+ "45": "Affiche la surface de van der Waals dans la vue 3D.",
+ "46": "Surface accessible au solvant",
+ "47": "Affiche la surface accessible au solvant (sonde de 1,4 ångström) dans la vue 3D.",
+ "48": "Surface exclue du solvant",
+ "49": "Affiche la surface exclue du solvant dans la vue 3D.",
+ "50": "Surface ESP",
+ "51": "Colore la surface selon un potentiel électrostatique approché, calculé à partir des charges partielles empiriques du moteur (rouge négatif, bleu positif), avec une légende indiquant la méthode.",
+ "52": "Affiche la vue 3D en style filaire ; pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "53": "Affiche la vue 3D en style bâtonnets ; pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "54": "Boules et bâtonnets",
+ "55": "Affiche la vue 3D en style boules et bâtonnets ; pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "56": "Compact (CPK)",
+ "57": "Affiche la vue 3D en style compact (CPK) ; pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "58": "Ruban",
+ "59": "Affiche la vue 3D en style ruban (protéines et acides nucléiques ; les ligands restent en boules et bâtonnets) ; pour un objet 3D de la page, le choix est enregistré avec lui.",
+ "60": "Angle dièdre (degrés)",
+ "61": "Énergie relative (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "Exporter la structure 3D",
+ "64": "Tous les conformères (enregistrements SDF, modèles PDB, images XYZ)",
+ "65": "1 conformère enregistré ; chaque hydrogène est écrit avec sa position 3D.",
+ "66": "Extraire le ligand",
+ "67": "Ligand",
+ "68": "Le ligand devient une structure 2D à côté du modèle, ses coordonnées du fichier étant conservées comme son conformère.",
+ "69": "Extraire",
+ "70": "Fichier SD (.sdf)",
+ "71": "Molfile MDL (.mol)",
+ "72": "{0} conformères enregistrés ; chaque hydrogène est écrit avec sa position 3D.",
+ "73": "Conformères",
+ "74": "Fenêtre d’énergie (kcal/mol)",
+ "75": "Plongement ETKDG avec une graine fixe, quasi-doublons élagués à 0,5 Å de RMSD sur les atomes lourds, chacun minimisé ; le plus bas devient le conformère affiché.",
+ "76": "Générer",
+ "77": "Profil d’énergie du balayage dièdre",
+ "78": "Balayage dièdre",
+ "79": "De (degrés)",
+ "80": "À (degrés)",
+ "81": "Pas (degrés)",
+ "82": "Garder chaque point comme conformère (une seule étape d’annulation)",
+ "83": "Lancer le balayage",
+ "84": "Un balayage relaxé : à chaque angle, le dièdre est maintenu et tout le reste est minimisé.",
+ "85": "L’angle final doit être supérieur à l’angle de départ.",
+ "86": "Balayage en cours...",
+ "87": "Échec du balayage",
+ "88": "barrière {0} kcal/mol",
+ "89": "Style d’affichage",
+ "90": "Colorer la surface selon le potentiel électrostatique calculé à partir de charges partielles empiriques",
+ "91": "ESP",
+ "92": "Minimiser",
+ "93": "Balayage...",
+ "94": "Centrer sur le ligand",
+ "95": "Réinitialiser la vue",
+ "96": "Rotation",
+ "97": "Exporter la vue 3D",
+ "98": "Mesurer",
+ "99": "Mesures",
+ "100": "Image PNG",
+ "101": "Image PNG, transparente",
+ "102": "glTF binaire (.glb)",
+ "103": "La 3D a besoin de WebGL, que cette fenêtre n’offre pas.",
+ "104": "Chargement de la visionneuse 3D...",
+ "105": "Impossible de charger la visionneuse 3D",
+ "106": "Ouvrez un dessin et sélectionnez une structure pour la voir en 3D.",
+ "107": "Sélectionnez une structure sur la page pour la voir en 3D.",
+ "108": "Impossible de lire la structure 3D",
+ "109": "Ce conformère ne peut pas être écrit comme molfile",
+ "110": "La rotation est désactivée : le système demande une réduction des animations",
+ "111": "Un modèle PDB ou CIF n’a aucun conformère.",
+ "112": "Énergies relatives à la plus basse ; cliquez sur l’une pour l’afficher.",
+ "113": "Construire en 3D ou Conformères... remplit cette liste.",
+ "114": "Charges partielles indisponibles",
+ "115": "le moteur n’a pas encore de routes 3D",
+ "116": "non convergé",
+ "117": "Choisissez quatre atomes liés à la suite (un dièdre), puis lancez le balayage.",
+ "118": "Cochez Garder chaque point comme conformère pour voir les géométries.",
+ "119": "Afficher le conformère",
+ "120": "Actualiser la vue 3D",
+ "121": "Impossible d’actualiser l’instantané de la page",
+ "122": "Aucune surface",
+ "123": "Van der Waals",
+ "124": "Accessible au solvant",
+ "125": "Exclue du solvant",
+ "126": "Distance",
+ "127": "Angle",
+ "128": "Dièdre",
+ "129": "{0} kcal/mol, {1}, non convergé",
+ "130": "Choisi {0} / {1} : {2}",
+ "131": "Cliquez sur {0} atomes pour mesurer",
+ "132": "ESP ({0}) : {1}, rouge {2} e à bleu +{3} e",
+ "133": "Distance {0} : {1}",
+ "134": "Angle {0} : {1}",
+ "135": "Dièdre {0} : {1}",
+ "136": "Construit : {0}",
+ "137": "Minimisé : {0}",
+ "138": "Conformères conservés : {0} sur {1}",
+ "139": "Conformères conservés : {0}",
+ "140": "Dièdre {0}",
+ "141": "Échec de l’encodage PNG"
+}
diff --git a/frontend/src/i18n/locales/fr/part15.json b/frontend/src/i18n/locales/fr/part15.json
new file mode 100644
index 00000000..6f32f655
--- /dev/null
+++ b/frontend/src/i18n/locales/fr/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "approché, à partir de charges empiriques",
+ "1": "{0} centres stéréogènes ou doubles liaisons n’étaient pas précisés ; une configuration a été choisie.",
+ "2": "{0} étiquettes stéréo du dessin ne sont pas reproduites en 3D.",
+ "3": "Le membre dessiné des groupes de stéréochimie améliorée {0} a été construit ; le modèle 3D est un stéréoisomère du mélange (relatif ou racémique) que décrit le dessin.",
+ "4": "Plongement répété {0} fois (graines {1}) pour conserver la stéréochimie dessinée.",
+ "5": "{0} paires d’atomes lourds sont plus proches que {1} de leur contact de van der Waals.",
+ "6": "Champ de force universel utilisé : {0}.",
+ "7": "aucun paramètre {0} pour {1}",
+ "8": "{0} n’a pas pu typer tous les atomes",
+ "9": "{0} conformères ont modifié la stéréochimie dessinée pendant la minimisation et ont été écartés.",
+ "10": "Plus de 300 atomes lourds : la qualité de l’échantillonnage des conformères baisse à cette taille.",
+ "11": "La liaison centrale est dans un cycle ; le cycle est contraint pour suivre l’angle.",
+ "12": "La structure n’avait pas de coordonnées 3D ; le balayage est parti d’un nouveau plongement.",
+ "13": "La structure a changé pendant le calcul 3D ; relancez la commande.",
+ "14": "Le dessin n’a pas d’objet {0}.",
+ "15": "{0} n’a pas encore de coordonnées 3D ; construisez d’abord la 3D.",
+ "16": "{0} n’a pas de conformère {1}.",
+ "17": "La structure n’a aucun atome.",
+ "18": "La 3D a besoin de vrais atomes : {0} atomes sont des étiquettes, des groupes R ou des points de fixation ({1}).",
+ "19": "Impossible d’ajouter les hydrogènes : {0}",
+ "20": "La structure a {0} atomes avec hydrogènes ; la 3D en gère jusqu’à {1}.",
+ "21": "Les coordonnées 3D ne correspondent pas à cette structure (rien pour {0}) ; reconstruisez la 3D.",
+ "22": "Les coordonnées 3D ne correspondent pas à cette structure (le nombre d’hydrogènes a changé) ; reconstruisez la 3D.",
+ "23": "La structure n’a pas pu être plongée en 3D : {0}",
+ "24": "La structure n’a pas pu être plongée en 3D ; vérifiez ses valences et sa stéréochimie.",
+ "25": "Les conformères n’ont pas pu être plongés : {0}",
+ "26": "Aucun conformère n’a pu être plongé ; vérifiez les valences et la stéréochimie de la structure.",
+ "27": "Tous les conformères plongés ont perdu la stéréochimie dessinée après la minimisation.",
+ "28": "Aucun champ de force n’a de paramètres pour cette structure ({0}).",
+ "29": "Le champ de force universel n’a pas pu être configuré : {0}",
+ "30": "Le champ de force universel n’a pas pu être configuré.",
+ "31": "Atomes inconnus {0} ; utilisez des ids d’atomes de fragment ou un hydrogène sous la forme a1:h0.",
+ "32": "Les quatre atomes doivent être différents.",
+ "33": "Les quatre atomes doivent former une chaîne de liaisons (a1-a2-a3-a4).",
+ "34": "Le fichier 3D n’a pas pu être écrit : {0}",
+ "35": "Le fichier n’est pas un fichier PDB, mmCIF, SDF ou MOL que FormChem peut lire.",
+ "36": "Le fichier contient plus de {0} atomes.",
+ "37": "Le fichier PDB n’a aucun enregistrement ATOM ou HETATM.",
+ "38": "La table atom_site du mmCIF n’a pas de colonnes Cartn_x, Cartn_y et Cartn_z.",
+ "39": "Le CIF a des coordonnées fractionnaires mais pas de maille complète.",
+ "40": "Le CIF n’a pas de table atom_site.",
+ "41": "Le CIF n’a aucun atome lisible.",
+ "42": "Le fichier n’a aucun enregistrement.",
+ "43": "Le fichier a {0} enregistrements ; l’import 3D en lit jusqu’à {1}.",
+ "44": "Aucun enregistrement du fichier n’a pu être lu.",
+ "45": "{0} n’est pas un fichier PDB ou mmCIF.",
+ "46": "{0} n’a pas pu être converti en dessin FormChem : {1}.",
+ "47": "Modèle PDB placé comme objet 3D : {0}.",
+ "48": "Modèle mmCIF placé comme objet 3D : {0}.",
+ "49": "{0} lignes ATOM ou HETATM avaient des coordonnées illisibles et ont été ignorées.",
+ "50": "{0} lignes atom_site avaient des coordonnées illisibles et ont été ignorées.",
+ "51": "CIF de petite molécule : l’unité asymétrique est lue à partir des coordonnées fractionnaires ; les équivalents de symétrie ne sont pas générés.",
+ "52": "{0} : problèmes de valence ; lecture sans assainissement.",
+ "53": "{0} : coordonnées 2D uniquement ; aucun conformère conservé.",
+ "54": "{0} hydrogènes n’étaient pas dans le fichier et ont été placés d’après la géométrie.",
+ "55": "Impossible de lire {0} : {1}",
+ "56": "Impossible de lire {0}.",
+ "57": "Enregistrement {0}",
+ "58": "La structure",
+ "59": "Les coordonnées 3D du fichier ont été conservées comme conformère de 1 structure ; Construire en 3D n’est pas nécessaire pour les voir.",
+ "60": "Les coordonnées 3D du fichier ont été conservées comme conformère de {0} structures ; Construire en 3D n’est pas nécessaire pour les voir.",
+ "61": "{0} est un ion simple ; il n’y a pas de structure à extraire.",
+ "62": "Les atomes de {0} n’ont pas pu être lus.",
+ "63": "Aucun ligand {0} dans la structure ; ligands : {1}.",
+ "64": "Le dessin n’a pas de modèle 3D {0}.",
+ "65": "FormChem place des images PNG, JPEG, GIF, WebP et SVG, des spectres JCAMP-DX et des fichiers de structure PDB, mmCIF, SDF et MOL."
+}
diff --git a/frontend/src/i18n/locales/hu/part12.json b/frontend/src/i18n/locales/hu/part12.json
new file mode 100644
index 00000000..35b686f5
--- /dev/null
+++ b/frontend/src/i18n/locales/hu/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Színkép",
+ "1": "Rajzoljon vagy jelöljön ki egy elnevezendő szerkezetet.",
+ "2": "A nevek nem számíthatók ki",
+ "3": "A FormChem nem ismer nevet ehhez a szerkezethez.",
+ "4": "Név másolása",
+ "5": "Név másolva: {0}",
+ "6": "A beszúrandó vegyületnév; hagyja el a párbeszédablak megnyitásához",
+ "7": "Egyszerű szövegként másolja a kijelölt szerkezet (vagy az oldal szerkezeteinek) nevét: a triviális nevet, ha a FormChem ismer ilyet, különben a szisztematikus nevet, amelyet csak akkor kínál fel, ha az visszaolvasva ugyanazt a szerkezetet adja.",
+ "8": "trivial vagy systematic a másolandó név kiválasztásához; hagyja el az elsőhöz",
+ "9": "Az előrejelzett színkép naprakész.",
+ "10": "Előrejelzett színkép frissítése",
+ "11": "Előbb jelöljön ki egy szerkezetet",
+ "12": "Előbb jelöljön ki egy előrejelzett színképet",
+ "13": "Előrejelzett 1H NMR-színkép hozzáadva ({0})",
+ "14": "Előrejelzett 13C NMR-színkép hozzáadva ({0})",
+ "15": "Előrejelzett színkép frissítve ({0})",
+ "16": "A szerkezet fragmentumazonosítója; alapértelmezés a kijelölt szerkezet vagy az oldal egyetlen szerkezete",
+ "17": "A spektrométer frekvenciája MHz-ben (alapértelmezés 400 az 1H-hoz, 100 a 13C-hoz)",
+ "18": "Egyetlen visszavonási lépésként hozzáadja a kijelölt szerkezet előrejelzett 1H NMR-színképét a szerkezet mellé: a FormChem saját inkrementszabályaival számolt színképobjektumot (kémiai eltolódás-adatbázis nélkül), amelynek multiplettjei és integráljai a szerkezet atomjaihoz kapcsolódnak, és amelynek címe a módszer, a verzió és a frekvencia. A görbét a program a szerkezetből újraszámolja, soha nem tárolja.",
+ "19": "Egyetlen visszavonási lépésként hozzáadja a kijelölt szerkezet előrejelzett 13C NMR-színképét a szerkezet mellé: a FormChem saját inkrementszabályaival számolt színképobjektumot (kémiai eltolódás-adatbázis nélkül), amelynek csúcsai a szerkezet atomjaihoz kapcsolódnak, és amelynek címe a módszer, a verzió és a frekvencia. A görbét a program a szerkezetből újraszámolja, soha nem tárolja.",
+ "20": "Nem sikerült előrejelezni a színképet",
+ "21": "1H NMR-színkép előrejelzése",
+ "22": "13C NMR-színkép előrejelzése",
+ "23": "Egyetlen visszavonási lépésként újraszámolja egy előrejelzett színkép multiplettjeit, integráljait vagy csúcsait, miután a szerkezete megváltozott, az éppen futó előrejelző verziójával; ha naprakész, semmi sem változik.",
+ "24": "Az előrejelzett színkép azonosítója; alapértelmezés a kijelölt vagy a Színképszerkesztőben megnyitott színkép",
+ "25": "Nem sikerült frissíteni a színképet",
+ "26": "Nincs új csúcs ebben a tartományban.",
+ "27": "Húzzon végig egy tartományon a Színképszerkesztőben az integráláshoz.",
+ "28": "Csúcs kapcsolása atomokhoz",
+ "29": "Csúcs kapcsolásának megszüntetése",
+ "30": "Színkép Y-tengelye",
+ "31": "Színkép fájlból...",
+ "32": "Színkép szerkesztése...",
+ "33": "Csúcskeresés",
+ "34": "Integrálás",
+ "35": "Transzmittancia vagy abszorbancia",
+ "36": "Színkép exportálása...",
+ "37": "Előbb jelöljön ki egy színképet",
+ "38": "nincs színkép ezzel az azonosítóval: {0}",
+ "39": "Megtalált csúcsok: {0} (már megvolt: {1})",
+ "40": "Megtalált csúcsok: {0}",
+ "41": "Az integrálok NMR-színképekhez tartoznak",
+ "42": "Előbb jelöljön ki egy csúcsot, integrált vagy multiplettet a Színképszerkesztőben",
+ "43": "Az atomoknak mind ugyanahhoz a szerkezethez kell tartozniuk",
+ "44": "Csak az IR-, Raman- és UV-Vis-színképek válthatnak a transzmittancia és az abszorbancia között",
+ "45": "Exportálva: {0}",
+ "46": "A színképobjektum azonosítója; alapértelmezés a kijelölt színkép vagy a Színképszerkesztőben megnyitott színkép",
+ "47": "Egy JCAMP-DX színképfájlt importál az aktív rajzba (adatblokkonként egy színképobjektum, a fájl bájtról bájtra megőrizve), fájlonként egyetlen visszavonási lépésként. Path nélkül fájlválasztó ablakot nyit.",
+ "48": "Egy .jdx, .dx vagy .jcamp fájl abszolút elérési útja",
+ "49": "Nem sikerült importálni a színképet",
+ "50": "Megnyitja a Színképszerkesztőt a kijelölt színképhez (ugyanaz, mint duplán rákattintani).",
+ "51": "Nem sikerült megnyitni a színképet",
+ "52": "Megkeresi egy színkép csúcsait egy tartományban (alapértelmezés a látható tartomány), és hozzáadja őket a csúcslistájához, a már meglévő csúcsokat kihagyva, egyetlen visszavonási lépésként.",
+ "53": "A tartomány kezdete az x-egységben (cm-1, nm, m/z, ppm)",
+ "54": "A tartomány vége az x-egységben",
+ "55": "Opcionális érzékelési küszöb y-egységekben",
+ "56": "A csúcslista cseréje hozzáadás helyett",
+ "57": "Nem sikerült csúcsokat keresni",
+ "58": "Egyetlen visszavonási lépésként NMR-integrált ad hozzá egy tartományra, a meglévő integrálokkal azonos skálázással (vagy a value értékre, a többit újraskálázva). From és to nélkül a Színképszerkesztőt az integráló eszközre kapcsolja.",
+ "59": "A tartomány kezdete ppm-ben",
+ "60": "A tartomány vége ppm-ben",
+ "61": "Az érték, amelyet az integrálnak mutatnia kell, például a protonok száma",
+ "62": "Nem sikerült integrálni",
+ "63": "Egyetlen visszavonási lépésként egy csúcsot, integrált vagy multiplettet kapcsol egy szerkezet atomjaihoz. Atoms nélkül a kijelölt atomokat használja, vagy megvárja, hogy a felhasználó atomokra kattintson a rajzon.",
+ "64": "A csúcs, integrál vagy multiplett azonosítója; alapértelmezés a Színképszerkesztőben kijelölt elem",
+ "65": "Annak a szerkezetnek (fragmentumnak) az azonosítója, amelyhez az atomok tartoznak",
+ "66": "Atomazonosítók",
+ "67": "Nem sikerült a csúcsot kapcsolni",
+ "68": "Egyetlen visszavonási lépésként eltávolítja egy csúcs, integrál vagy multiplett atomkapcsolatát.",
+ "69": "Nem sikerült megszüntetni a csúcs kapcsolását",
+ "70": "Egyetlen visszavonási lépésként transzmittanciaként vagy abszorbanciaként jelenít meg egy IR-, Raman- vagy UV-Vis-színképet (mode nélkül vált).",
+ "71": "A megjelenítendő Y-tengely; hagyja el a váltáshoz",
+ "72": "Nem sikerült megváltoztatni az y-tengelyt",
+ "73": "A motoron keresztül elmenti a színképet JCAMP-DX formátumban (a csúcstáblázattal, ha vannak csúcsai) vagy CSV-ként, minden ponttal.",
+ "74": "Fájlformátum, alapértelmezés jdx",
+ "75": "Jdx esetén: az eredeti importált fájl érintetlenül",
+ "76": "A kiírás abszolút elérési útja; hagyja el, hogy rákérdezzen",
+ "77": "Nem sikerült exportálni a színképet",
+ "78": "Színkép beszúrása fájlból",
+ "79": "A fájl nem tartalmaz olyan színképet, amelyet a FormChem ki tudna rajzolni",
+ "80": "Színkép beszúrása",
+ "81": "A színképet nem sikerült elhelyezni: a fájlja nem jutott el a rajzhoz.",
+ "82": "Beszúrt színképek: {0}",
+ "83": "Hullámhossz (µm)",
+ "84": "Hullámszám (cm⁻¹)",
+ "85": "Raman-eltolódás (cm⁻¹)",
+ "86": "Hullámhossz (nm)",
+ "87": "Frekvencia (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transzmittancia (%)",
+ "90": "Transzmittancia",
+ "91": "Abszorbancia",
+ "92": "Relatív gyakoriság (%)",
+ "93": "Intenzitás",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Előrejelzett {0}, {1} MHz ({2})",
+ "100": "Előrejelzett {0}, {1} MHz",
+ "101": "Előrejelzett {0} ({1})",
+ "102": "Előrejelzett {0}",
+ "103": "{0}, {1} MHz",
+ "104": "A színkép nem érhető el: {0}",
+ "105": "Színkép betöltése",
+ "106": "Triviális név",
+ "107": "Szisztematikus",
+ "108": "Magas megbízhatóság",
+ "109": "Közepes megbízhatóság",
+ "110": "Alacsony megbízhatóság",
+ "111": "Nem olvasható",
+ "112": "FormChem-nevek",
+ "113": "Nem sikerült beolvasni a nevet",
+ "114": "Szerkezet beszúrása névből",
+ "115": "Szerkezet névből",
+ "116": "Egy név, például aspirin vagy 2-methylpropan-1-ol",
+ "117": "Vegyületnév",
+ "118": "Írjon be egy nevet a szerkezetének megtekintéséhez.",
+ "119": "Ehhez a névhez nincs szerkezet",
+ "120": "Szótár",
+ "121": "Szisztematikus értelmező",
+ "122": "Szabályalapú elnevező, visszaolvasással ellenőrizve",
+ "123": "Színképeszközök",
+ "124": "A teljes színkép megjelenítése",
+ "125": "Y-tengely",
+ "126": "Ennek a tartománynak a megjelenítése az oldalon",
+ "127": "Kattintson duplán egy színképre a rajzon, hogy itt szerkessze.",
+ "128": "Csúcsok és integrálok",
+ "129": "Előrejelzett",
+ "130": "Integrálérték",
+ "131": "Kapcsolás atomokhoz",
+ "132": "Kapcsolás megszüntetése",
+ "133": "1 atom",
+ "134": "Kapcsolandó atomok",
+ "135": "Kattintson további atomokra, majd a Kész gombra.",
+ "136": "Kattintson a rajzon azokra az atomokra, amelyek ehhez a csúcshoz tartoznak, majd a Kész gombra.",
+ "137": "Ebben a tartományban nincs mit integrálni.",
+ "138": "Csúcs eltávolítása",
+ "139": "Csúcs hozzáadása",
+ "140": "1 atomhoz kapcsolva",
+ "141": "Színképtartomány megadása",
+ "142": "Írjon be egy pozitív számot.",
+ "143": "Nem sikerült megadni az integrált",
+ "144": "Pásztázás és nagyítás: húzás a pásztázáshoz, görgő a nagyításhoz, Shift+húzás a tartományra nagyításhoz",
+ "145": "Nagyítás egy tartományra: húzás az ábrán",
+ "146": "Csúcskeresés: húzás egy tartományon",
+ "147": "Csúcs hozzáadása vagy eltávolítása: kattintás a csúcs közelében",
+ "148": "Integrálás: húzás egy tartományon",
+ "149": "Csúcs",
+ "150": "Integrál",
+ "151": "Multiplett",
+ "152": "{0} atom",
+ "153": "Kapcsolva: {0}",
+ "154": "Húzással pásztázhat, a görgővel nagyíthat, Shift+húzással egy tartományra nagyíthat. Egy címkére kattintva kijelölheti.",
+ "155": "Húzzon végig az ábrán, hogy arra a tartományra nagyítson.",
+ "156": "Húzzon végig egy tartományon a csúcsainak megkereséséhez.",
+ "157": "Csúcs hozzáadásához kattintson a közelében; eltávolításához kattintson a csúcs címkéjére.",
+ "158": "Húzzon végig egy tartományon az integrálásához.",
+ "159": "{0} atomhoz kapcsolva"
+}
diff --git a/frontend/src/i18n/locales/hu/part13.json b/frontend/src/i18n/locales/hu/part13.json
new file mode 100644
index 00000000..38b4b17b
--- /dev/null
+++ b/frontend/src/i18n/locales/hu/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "a motor üres fájlt adott vissza",
+ "1": "a név hosszabb, mint {0} karakter",
+ "2": "a {0} atomnál nagyobb fragmentumokat nem nevezi el",
+ "3": "A szerkezet címkéket, R-csoportokat vagy tetszőleges atomokat tartalmaz, amelyeknek nincs nevük.",
+ "4": "A szerkezetet nem lehetett molekulaként beolvasni (ellenőrizze a vegyértékeket).",
+ "5": "Nincs elnevezhető szerkezet.",
+ "6": "A fordított indexnevek (előbb az alapváz, majd vessző és a szubsztituensek) nem olvashatók be; írja a nevet normál sorrendben, például 1,2-dichlorobenzene.",
+ "7": "A D- és L- csak a FormChem szótárában szereplő aminosavakhoz és cukrokhoz olvasható be; más nevekhez adjon meg R vagy S deszkriptort.",
+ "8": "A FormChem beolvasta a teljes nevet, de az nem alkot teljes szerkezetnevet (hiányozhat az alapváz, például hexane vagy benzene, vagy egy végződés).",
+ "9": "A FormChem nem tudta beolvasni a nevet a(z) {0}. karaktertől (\"{1}\").",
+ "10": "A FormChem beolvasta a nevet, de {0}.",
+ "11": "a szerkezetet nem lehetett befejezni",
+ "12": "A név többféleképpen is olvasható; a FormChem a legkevesebb feltevést igénylő olvasatot rajzolta meg.",
+ "13": "A név nem ad meg sztereodeszkriptorokat, ezért a sztereocentrumok és a kettős kötések meghatározatlanul lesznek rajzolva.",
+ "14": "Nincs szisztematikus név: {0}.",
+ "15": "A FormChem által felépített szisztematikus név visszaolvasva nem ugyanazt a szerkezetet adta, ezért nem jelenik meg.",
+ "16": "az a kettős kötés nem lehet E vagy Z",
+ "17": "a deszkriptor {0} lokánsa nem az alapváz egy pozíciója",
+ "18": "a(z) {0}. pozíció nem indít E vagy Z lehet kettős kötést",
+ "19": "{0} pontosan egy cisz vagy transz kettős kötést igényel; a szerkezetben ennyi van: {1}",
+ "20": "{0} nem egyértelmű ennél a kettős kötésnél; adjon meg helyette E vagy Z értéket",
+ "21": "({0}) lokánst igényel: a szerkezetnek {1} sztereocentruma van",
+ "22": "a(z) {0}. pozíció nem sztereocentrum, ezért ({1}) nem alkalmazható",
+ "23": "({0}) lokánst igényel: a szerkezetnek {1} E vagy Z lehet kettős kötése van",
+ "24": "a(z) {0}. pozícióhoz nem adható {1}",
+ "25": "ahhoz a kettős kötéshez nem adható {0}",
+ "26": "{0} nem mondja meg, melyik konfigurációra gondol, ezért a szerkezet sztereo nélkül lesz rajzolva.",
+ "27": "{0} nem rendelkezik kapcsolódási ponttal",
+ "28": "nincs hely ehhez: {0}, itt: {1}",
+ "29": "{0} nem tud ott kötést létesíteni",
+ "30": "a {0} szénatomnál hosszabb láncokat még nem olvassa be",
+ "31": "{0} túl kicsi ahhoz, hogy gyűrű legyen",
+ "32": "{0}-{1} olyan tautomer, amelyet a FormChem névből még nem rajzol meg",
+ "33": "a(z) {0} lokáns nem pozíciója ennek: {1}",
+ "34": "{0} nem láncpozíció",
+ "35": "többszörös kötés nem indulhat a(z) {0}. pozíciónál ebben: {1}",
+ "36": "a(z) {0}. pozíció ebben: {1} nem hordozhatja ezt a többszörös kötést",
+ "37": "nincs hely többszörös kötésnek a(z) {0}. pozíción ebben: {1}",
+ "38": "nincs hely ennek többszörös kötéseinek: {0}",
+ "39": "A többszörös kötések pozíciója ebben nem lett megadva: {0}; a legkisebb pozíciókban rajzolva.",
+ "40": "-{0} nyílt láncot igényel; gyűrűn a végződés carbaldehyde, karbonsav, carbonitrile vagy karboxamid",
+ "41": "egy láncnak csak két vége van a következőhöz: -{0}",
+ "42": "{0} túl rövid két -{1} csoporthoz",
+ "43": "nincs hely ennek: -{0}, ezen: {1}",
+ "44": "A(z) -{0} pozíciója ezen: {1} nem lett megadva; a legkisebb pozícióban rajzolva.",
+ "45": "-{0} a lánc végén kell álljon, nem itt: {1}",
+ "46": "nincs hely ennek: -{0}, itt: {1}",
+ "47": "az orto, meta és para benzolgyűrűt igényel",
+ "48": "az orto, meta vagy para egyetlen csoporttal olyan alapvázat igényel, mint a phenol, aniline vagy toluene",
+ "49": "nincs hely ennek: {0}, ezen: {1}",
+ "50": "nincs hely {0} db {1} csoportnak, ezen: {2}",
+ "51": "A(z) {0} pozíciója ezen: {1} nem lett megadva; a legkisebb szabad pozícióban rajzolva.",
+ "52": "{0} nem hordozhat szubsztituenseket",
+ "53": "az acilcsoport a karbonil-szénatomjánál kapcsolódik",
+ "54": "{0} nem rendelkezik szabad pozícióval",
+ "55": "A(z) {0} kapcsolódási pozíciója nem lett megadva; a(z) {1}. pozíciót feltételezi.",
+ "56": "{0} nem rendelkezik több hellyel a kapcsolódáshoz",
+ "57": "a(z) {0} lokánsok ez előtt: {1} nincsenek használatban",
+ "58": "{0} nem állhat külön szóként",
+ "59": "\"{0}\" előtt {1} csoport szükséges, a név ennyit ad: {2}",
+ "60": "\"{0}\" előtt {1} csoport szükséges, a név ennyit ad: {2}",
+ "61": "a név {0} alkilcsoportot ad {1} észterpozícióhoz",
+ "62": "a név {0} alkilcsoportot ad {1} észterpozícióhoz",
+ "63": "a név {0} alkilcsoportot ad {1} észterpozícióhoz",
+ "64": "a név {0} alkilcsoportot ad {1} észterpozícióhoz",
+ "65": "az általa leírt szerkezet nem érvényes ({0})",
+ "66": "a(z) {0}. pozíciójú -one aldehid lenne; az aldehidet -al végződéssel nevezik el",
+ "67": "a(z) {0}. pozíció, itt: {1}",
+ "68": "túl sok azonos szubsztituens",
+ "69": "vegyes lokánsok",
+ "70": "szokatlan kötéstípusokat még nem nevez el",
+ "71": "olyan gyűrűrendszer, amelyet a FormChem még nem tud elnevezni",
+ "72": "az exociklusos kettős kötést tartalmazó aromás gyűrűket (például a piridonokat) még nem nevezi el",
+ "73": "az izotópokat és a gyököket még nem nevezi el",
+ "74": "a hipervalens halogéneket nem nevezi el",
+ "75": "a nitrocsoporton kívüli töltött nitrogéncsoportokat még nem nevezi el",
+ "76": "a töltött atomokat még nem nevezi el",
+ "77": "a kén, a nitrogén és a foszfor oxidjait még nem nevezi el",
+ "78": "ezt az oxigéncsoportot még nem nevezi el",
+ "79": "a szulfoxidokat, szulfonokat és más kéncsoportokat még nem nevezi el",
+ "80": "az iminokat, azocsoportokat és hasonló nitrogéncsoportokat még nem nevezi el",
+ "81": "{0} még nincs elnevezve",
+ "82": "a 20 szénatomnál hosszabb szubsztituensláncokat nem nevezi el",
+ "83": "a telítetlen acilcsoportokat még nem nevezi el",
+ "84": "a szubsztituált ilidéncsoportokat még nem nevezi el",
+ "85": "a gyűrűs ilidéncsoportokat még nem nevezi el",
+ "86": "a kétszer kapcsolódó gyűrűket még nem nevezi el",
+ "87": "nem található számozás a gyűrűszubsztituenshez",
+ "88": "a különböző alkoholrészű észtereket még nem nevezi el",
+ "89": "nem található alapváz lánc vagy gyűrű",
+ "90": "a gyűrűs észtereket (laktonokat) még nem nevezi el",
+ "91": "egynél több amin- vagy amidnitrogénen lévő szubsztituenseket még nem nevezi el",
+ "92": "az alapváz láncán vagy gyűrűjén kívüli sztereocentrumokat még nem nevezi el",
+ "93": "az alapváz láncán kívüli kettőskötés-geometriát még nem nevezi el",
+ "94": "a pszeudoaszimmetrikus centrumokat még nem nevezi el",
+ "95": "ezt a kettőskötés-geometriát még nem nevezi el",
+ "96": "a 20 szénatomnál hosszabb láncokat nem nevezi el",
+ "97": "túl sok azonos csoport",
+ "98": "a szerkezetben vegyértékhibák vannak",
+ "99": "a sókat és keverékeket még nem nevezi el szisztematikusan",
+ "100": "a {0} nehézatomnál nagyobb szerkezeteket még nem nevezi el szisztematikusan",
+ "101": "ennek vegyületeit még nem nevezi el szisztematikusan: {0}",
+ "102": "a lekérdezési atomoknak és az R-csoportoknak nincs nevük",
+ "103": "az egyetlen heteroatomos hidrideket csak a szótárból nevezi el",
+ "104": "{0} nem ennek a rajznak az objektuma.",
+ "105": "{0} nem tartalmaz atomokat.",
+ "106": "A fragmentum nem tartalmaz atomokat.",
+ "107": "A rajznak nincs oldala.",
+ "108": "{0} nem ennek a rajznak a színképe.",
+ "109": "A(z) {0} szerkezet, amelyhez ez az előrejelzés tartozik, már nincs a rajzon.",
+ "110": "A(z) {0} rajz be lett zárva.",
+ "111": "Kémiai eltolódás (ppm)",
+ "112": "Idő (s)",
+ "113": "Reflektancia",
+ "114": "Relatív gyakoriság",
+ "115": "##{0}= egynél többször szerepel; az első érték maradt meg.",
+ "116": "##XYDATA={0} nem ismert változólista; (X++(Y..Y)) formában lett beolvasva.",
+ "117": "##{0}={1} nem ismert változólista; (XY..XY) formában lett beolvasva.",
+ "118": "A pontok nem x szerinti sorrendben voltak, ezért rendezve lettek.",
+ "119": "##.SHIFT REFERENCE={0} nem olvasható be; az eltolódások nem lettek referenciához igazítva.",
+ "120": "##.SHIFT REFERENCE a(z) {0}. pontot nevezi meg, amely a {1} ponton kívül esik; az eltolódások nem lettek referenciához igazítva.",
+ "121": "Az eltolódások úgy lettek referenciához igazítva, hogy a(z) {0}. pont {1} ppm ({2}).",
+ "122": "A fájl nem nevezi meg a megfigyelt magot.",
+ "123": "Ez időtartománybeli NMR-adat (FID); úgy jelenik meg, ahogy felvették, Fourier-transzformáció nélkül.",
+ "124": "A Hz-ben megadott frekvenciák el lettek osztva a megfigyelési frekvenciával ({0} MHz), hogy ppm-et kapjunk.",
+ "125": "Nincs ##.SHIFT REFERENCE; a 0 Hz lett 0 ppm.",
+ "126": "Nincs ##.OBSERVE FREQUENCY, ezért az eltolódás tengelye Hz-ben marad.",
+ "127": "A transzmittancia törtként volt tárolva, és százalékban jelenik meg.",
+ "128": "A(z) {0} blokk több mint {1} pontot tartalmaz.",
+ "129": "A(z) ##DATA TYPE={0} és a(z) {1} x-egység nem nevez meg ismert technikát; sima színképként lett rajzolva.",
+ "130": "##BLOCKS={0}, de a LINK blokk {1} blokkot tartalmaz; minden megtalált blokk be lett olvasva.",
+ "131": "Ez nem JCAMP-DX fájl: nincs benne ##TITLE= rekord.",
+ "132": "A fájl {0} blokkot tartalmaz egymás után LINK blokk nélkül; mindegyik be lett olvasva.",
+ "133": "Két blokk ugyanazt a ##BLOCK_ID azonosítót használja.",
+ "134": "A fájl nem tartalmaz olyan színképet, amelyet a FormChem ki tudna rajzolni ({0}).",
+ "135": "A(z) \"{0}\" blokk nem lett kirajzolva: {1}.",
+ "136": "szerkezeti blokk (JCAMP-CS); a fájlban megmarad, de nem lesz kirajzolva",
+ "137": "nem tartalmaz XYDATA, XYPOINTS, PEAK TABLE vagy NTUPLES adatot",
+ "138": "az adattáblája nem tartalmaz pontokat",
+ "139": "az NTUPLES táblája nem deklarál szimbólumokat",
+ "140": "a 2D NTUPLES színképek még nem támogatottak",
+ "141": "az NTUPLES táblájának nincsenek beolvasható oldalai",
+ "142": "A fájl ASCII-n kívüli karaktereket tartalmaz; UTF-8-ként lett beolvasva.",
+ "143": "A fájl olyan bájtokat tartalmaz, amelyek nem ASCII vagy UTF-8; Latin-1-ként lett beolvasva.",
+ "144": "A címkézett adatrekordokon kívüli sorok figyelmen kívül lettek hagyva.",
+ "145": "Az előtte lévő blokk nélküli ##END= figyelmen kívül lett hagyva.",
+ "146": "Az első ##TITLE= előtti vagy az utolsó ##END= utáni rekordok figyelmen kívül lettek hagyva.",
+ "147": "A fájl ##END= nélkül ér véget; a nyitott blokkok le lettek zárva.",
+ "148": "NTUPLES oldal: {0}",
+ "149": "A(z) {0}. NTUPLES oldalnak nincs ##DATA TABLE=; ki lett hagyva.",
+ "150": "A(z) {0}. NTUPLES oldal olyan szimbólumokat ({1}) használ, amelyek nincsenek deklarálva a ##SYMBOL= rekordban; ki lett hagyva.",
+ "151": "{0} adattáblaformája olyan, amelyet a FormChem nem olvas ({1}); ki lett hagyva.",
+ "152": "Az NTUPLES táblának nincs ##END NTUPLES= rekordja; a blokk végéig lett beolvasva.",
+ "153": "Az NTUPLES táblának nincs ##SYMBOL= listája.",
+ "154": "Ez 2D színkép (két független változó); a 2D színképek ebben a verzióban nincsenek kirajzolva.",
+ "155": "Az NTUPLES tábla {0} oldalt tartalmaz; csak az első {1} lett beolvasva.",
+ "156": "A képzetes oldal nem osztozik a valós oldal x értékein; ki lett hagyva.",
+ "157": "Az NTUPLES tábla {0} oldalt tartalmaz; a(z) {1}. oldal látható, {2} másik oldal ki lett hagyva.",
+ "158": "##DELTAX={0} eltér a (LASTX - FIRSTX) / (NPOINTS - 1) = {1} értéktől; a kiszámított távolság lesz használva.",
+ "159": "{0} nem rendelkezik teljes FIRSTX, LASTX és NPOINTS értékkel; a távolság a ##DELTAX-ból származik.",
+ "160": "Egy adatsor DIF értékkel kezdődött; az előző sor utolsó értékétől folytatódik.",
+ "161": "Egy Y-ellenőrzőérték nem egyezett az előző sor utolsó értékével; a sor a korábbi értéktől lett folytatva.",
+ "162": "{0} karakter ebben: {1} nem volt olvasható, és ki lett hagyva.",
+ "163": "{0} DIF sor után nem következett Y-ellenőrzőérték.",
+ "164": "{0} nem tartalmaz adatpontokat.",
+ "165": "{0} {1} pontot tartalmaz, de ##NPOINTS={2}; a sorok X értékei {3} pontba illenek FIRSTX-től LASTX-ig, ezért az a távolság lett használva.",
+ "166": "{0} {1} pontot tartalmaz, de ##NPOINTS={2}; a beolvasott pontok megmaradtak.",
+ "167": "Egy sor X értéke nem egyezik a FIRSTX-ből és a távolságból számított pozíciójával; a pozíció lett használva.",
+ "168": "{0} nem rendelkezik FIRSTX, LASTX és NPOINTS értékkel; a távolság a sorok X értékeiből lett átvéve.",
+ "169": "{0} nem ad módot a pontjai x tengelyen való elhelyezésére; 0, 1, 2 és így tovább számozást kaptak.",
+ "170": "Az első sor x = {0} értéknél kezdődik, de ##FIRSTX={1}; a FIRSTX lett használva.",
+ "171": "Az első Y érték ({0}) nem egyezik a ##FIRSTY={1} értékkel.",
+ "172": "{0} egy hiányos, {1} értékes csoporttal végződik; el lett dobva.",
+ "173": "Nem sikerült beolvasni: {0}: {1}.",
+ "174": "A színkép a(z) {0}. blokkot kéri, de a fájlja 1 blokkot tartalmaz.",
+ "175": "A színkép a(z) {0}. blokkot kéri, de a fájlja {1} blokkot tartalmaz.",
+ "176": "A színképnek nincs forrása.",
+ "177": "A színkép {0} fájlja nincs a rajzban.",
+ "178": "Ebben a motorban nincs előrejelző ehhez: {0}.",
+ "179": "Az előrejelzés sikertelen: {0}",
+ "180": "A színkép forrása nem fájl és nem is előrejelzés.",
+ "181": "A rajzban nincs {0} színkép.",
+ "182": "A vonalszínképeknek nincs integrálható területük.",
+ "183": "a value nagyobb kell legyen nullánál.",
+ "184": "a from és a to két különböző x érték kell legyen.",
+ "185": "A színképnek nincs {0} integrálja.",
+ "186": "Ennek a színképnek nincs eredeti fájlja; exportálja original=1 nélkül.",
+ "187": "A FormChem PNG, JPEG, GIF, WebP és SVG képeket, valamint JCAMP-DX színképeket helyez el."
+}
diff --git a/frontend/src/i18n/locales/hu/part14.json b/frontend/src/i18n/locales/hu/part14.json
new file mode 100644
index 00000000..b4ad5873
--- /dev/null
+++ b/frontend/src/i18n/locales/hu/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Megjelenítés",
+ "1": "Felület",
+ "2": "Nincs mit exportálni: a 3D nézet üres.",
+ "3": "Az exportálás sikertelen",
+ "4": "Jelöljön ki egy szerkezetet a 3D megjelenítéshez.",
+ "5": "3D építése",
+ "6": "3D nézet beszúrása",
+ "7": "Válasszon egy PDB-, mmCIF-, SDF- vagy MOL-fájlt.",
+ "8": "A 3D szerkezetet nem sikerült elhelyezni az oldalon",
+ "9": "Jelöljön ki egy PDB- vagy mmCIF-fájlból megnyitott 3D objektumot.",
+ "10": "Ennek a modellnek nincsenek ligandumai.",
+ "11": "Nem sikerült kinyerni a ligandumot",
+ "12": "Még nincsenek 3D koordináták: a 3D építése konformert készít a rajzból.",
+ "13": "3D szerkezetfájl...",
+ "14": "Ligandum kinyerése...",
+ "15": "3D szerkezet exportálása...",
+ "16": "Diéderes szög pásztázása...",
+ "17": "Mérés 3D-ben",
+ "18": "3D nézet exportálása PNG-ként...",
+ "19": "3D nézet exportálása glTF-ként...",
+ "20": "Kinyerve {0}: {1} (kötésrendek kikövetkeztetve)",
+ "21": "Kinyerve {0}: {1}",
+ "22": "Előbb nyissa meg a 3D nézetet",
+ "23": "Megnyitja a 3D nézet panelt a kijelölt szerkezethez (vagy az oldalon kijelölt 3D objektumhoz), és követi a kijelölést. A szerkezetnek előbb 3D koordináták kellenek: a 3D építése létrehozza őket.",
+ "24": "3D konformert épít a kijelölt szerkezetből a 2D rajza alapján (az ékek, a kettős kötések geometriája és a töltések megmaradnak), minimalizálja a kiválasztott erőtérrel, és egyetlen visszavonási lépésként a rajzban tárolja; a 3D nézet megjeleníti.",
+ "25": "Minimalizálja a kijelölt szerkezet megjelenített konformerét a 3D nézetben kiválasztott erőtérrel (alapértelmezés MMFF94, UFF, ha az MMFF94-hez nincsenek paraméterek), és jelenti az energiát előtte és utána, egyetlen visszavonási lépésként.",
+ "26": "Konformerkészletet állít elő a kijelölt szerkezetből (ETKDG, RMSD alapján megritkítva, mindegyik minimalizálva), és megtartja az energiaablakon belülieket; n, window és method megadásával a párbeszédablak nélkül fut.",
+ "27": "Előállítandó konformerek",
+ "28": "Energiaablak kcal/mol egységben",
+ "29": "A kijelölt szerkezet 3D nézetét az oldalon mellé helyezi (előbb 3D koordinátákat építve, ha nincsenek), és megnyitja a hozzá kötött 3D nézet panelt; a modell forgatása vagy stílusának módosítása frissíti az oldalon lévő képet.",
+ "30": "Megnyit egy PDB-, mmCIF-, SDF- vagy MOL-fájlt 3D objektumként az oldalon (a fehérjék szalagmodellként, a ligandumok gömb-pálca modellként, a víz elrejtve, a ligandumra fókuszálva), és megjeleníti a 3D nézetben.",
+ "31": "A kijelölt 3D objektum (PDB- vagy mmCIF-fájlból megnyitott) egy ligandumát 2D szerkezetté alakítja mellette, egyetlen visszavonási lépésként: a kötésrendek a gyakori ligandumok beépített sablonjából származnak, különben a geometriából kikövetkeztetettek és jelentettek; a fájl koordinátái lesznek a konformere. A ligand megadásakor azt veszi; nélküle rákérdez, ha a modellnek több van.",
+ "32": "Ligandumkulcs lánc:het:szám, vagy het-kód",
+ "33": "Jelöljön ki egy PDB- vagy mmCIF-fájlból megnyitott 3D objektumot",
+ "34": "Elmenti a kijelölt szerkezet 3D koordinátáit minden hidrogénnel: MDL molfile (a megjelenített konformer), SD-fájl (minden konformer, energia- és módszeradatmezőkkel), PDB vagy XYZ (a megjelenített konformer, vagy minden konformer modellekként, illetve képkockákként); a PDB- vagy mmCIF-fájlból megnyitott 3D objektum az eredeti fájlját menti. Format nélkül rákérdez.",
+ "35": "Fájlformátum",
+ "36": "Minden konformer a megjelenített helyett (sdf esetén alapértelmezés true)",
+ "37": "Pásztázza a 3D nézetben kiválasztott négy atom diéderes szögét (vagy az utolsó diéderesszög-mérést) relaxált minimalizálással, és ábrázolja a szöget az energia függvényében.",
+ "38": "Távolságot (két atom), szöget (három) vagy diéderes szöget (négy) mér a 3D nézetben, és listázza; atoms megadásával (a fragmentum atomazonosítói, például a1, hidrogének a1:h0 alakban, vagy PDB-sorszámok) ezeket méri, különben kiválasztási módra vált.",
+ "39": "Kettő–négy atomazonosító",
+ "40": "A 3D nézetet PNG-képként menti a képernyőn látható méretben; a transparent kihagyja a hátteret.",
+ "41": "A 3D nézetet bináris glTF 2.0 fájlként (.glb) menti: az atomok gömbök, a kötések hengerek elemszínekkel, 1 angström = 1 cm, 3D megjelenítőkhöz, diákhoz és nyomtatáshoz.",
+ "42": "Nincs felület",
+ "43": "Eltávolítja a molekulafelületet a 3D nézetből.",
+ "44": "Van der Waals-felület",
+ "45": "Megjeleníti a van der Waals-felületet a 3D nézetben.",
+ "46": "Oldószer által elérhető felület",
+ "47": "Megjeleníti az oldószer által elérhető felületet (próba 1,4 angström) a 3D nézetben.",
+ "48": "Oldószer által kizárt felület",
+ "49": "Megjeleníti az oldószer által kizárt felületet a 3D nézetben.",
+ "50": "ESP-vel színezett felület",
+ "51": "A felületet a motor empirikus részleges töltéseiből számolt közelítő elektrosztatikus potenciál szerint színezi (piros negatív, kék pozitív), a módszert megnevező jelmagyarázattal.",
+ "52": "Drótstílusban jeleníti meg a 3D nézetet; az oldalon lévő 3D objektumnál a választás vele együtt mentődik.",
+ "53": "Pálcastílusban jeleníti meg a 3D nézetet; az oldalon lévő 3D objektumnál a választás vele együtt mentődik.",
+ "54": "Gömb-pálca",
+ "55": "Gömb-pálca stílusban jeleníti meg a 3D nézetet; az oldalon lévő 3D objektumnál a választás vele együtt mentődik.",
+ "56": "Térkitöltő",
+ "57": "Térkitöltő stílusban jeleníti meg a 3D nézetet; az oldalon lévő 3D objektumnál a választás vele együtt mentődik.",
+ "58": "Szalagmodell",
+ "59": "Szalagmodell stílusban jeleníti meg a 3D nézetet (fehérjék és nukleinsavak; a ligandumok gömb-pálca modellek maradnak); az oldalon lévő 3D objektumnál a választás vele együtt mentődik.",
+ "60": "Diéderes szög (fok)",
+ "61": "Relatív energia (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "3D szerkezet exportálása",
+ "64": "Minden konformer (SDF-rekordok, PDB-modellek, XYZ-képkockák)",
+ "65": "1 konformer tárolva; minden hidrogén a 3D pozíciójával íródik.",
+ "66": "Ligandum kinyerése",
+ "67": "Ligandum",
+ "68": "A ligandum 2D szerkezetté válik a modell mellett, és a fájlból származó koordinátái megmaradnak a konformereként.",
+ "69": "Kinyerés",
+ "70": "SD-fájl (.sdf)",
+ "71": "MDL molfile (.mol)",
+ "72": "{0} konformer tárolva; minden hidrogén a 3D pozíciójával íródik.",
+ "73": "Konformerek",
+ "74": "Energiaablak (kcal/mol)",
+ "75": "ETKDG beágyazás rögzített seeddel, a közel azonosak kiszűrve 0,5 Å nehézatom-RMSD mellett, mindegyik minimalizálva; a legalacsonyabb lesz a megjelenített konformer.",
+ "76": "Előállítás",
+ "77": "A diéderes szög pásztázásának energiaprofilja",
+ "78": "Diéderes szög pásztázása",
+ "79": "Kezdet (fok)",
+ "80": "Vég (fok)",
+ "81": "Lépés (fok)",
+ "82": "Minden pont megtartása konformerként (egy visszavonási lépés)",
+ "83": "Pásztázás futtatása",
+ "84": "Relaxált pásztázás: minden szögnél a diéderes szög rögzített, minden más minimalizálódik.",
+ "85": "A végszögnek nagyobbnak kell lennie a kezdőszögnél.",
+ "86": "Pásztázás...",
+ "87": "A pásztázás sikertelen",
+ "88": "gát {0} kcal/mol",
+ "89": "Megjelenítési stílus",
+ "90": "A felület színezése az empirikus részleges töltésekből számolt elektrosztatikus potenciál szerint",
+ "91": "ESP",
+ "92": "Minimalizálás",
+ "93": "Pásztázás...",
+ "94": "Fókusz a ligandumra",
+ "95": "Nézet visszaállítása",
+ "96": "Forgatás",
+ "97": "A 3D nézet exportálása",
+ "98": "Mérés",
+ "99": "Mérések",
+ "100": "PNG-kép",
+ "101": "PNG-kép, átlátszó",
+ "102": "glTF bináris (.glb)",
+ "103": "A 3D-hez WebGL kell, amelyet ez az ablak nem biztosít.",
+ "104": "A 3D megjelenítő betöltése...",
+ "105": "A 3D megjelenítő nem tölthető be",
+ "106": "Nyisson meg egy rajzot, és jelöljön ki egy szerkezetet a 3D megtekintéshez.",
+ "107": "Jelöljön ki egy szerkezetet az oldalon a 3D megtekintéshez.",
+ "108": "Nem sikerült beolvasni a 3D szerkezetet",
+ "109": "Ez a konformer nem írható molfile-ként",
+ "110": "A forgatás ki van kapcsolva: a rendszer csökkentett mozgást kér",
+ "111": "A PDB- vagy CIF-modellnek nincsenek konformerei.",
+ "112": "A legalacsonyabbhoz viszonyított energiák; kattintson egyre a megjelenítéséhez.",
+ "113": "A 3D építése vagy a Konformerek... tölti fel ezt a listát.",
+ "114": "A részleges töltések nem érhetők el",
+ "115": "a motornak még nincsenek 3D útvonalai",
+ "116": "nem konvergált",
+ "117": "Válasszon ki négy egymás után kötött atomot (diéderes szög), majd kattintson a Pásztázás gombra.",
+ "118": "Jelölje be a Minden pont megtartása konformerként négyzetet a geometriák megtekintéséhez.",
+ "119": "Konformer megjelenítése",
+ "120": "3D nézet frissítése",
+ "121": "Nem sikerült frissíteni az oldal pillanatképét",
+ "122": "Nincs felület",
+ "123": "Van der Waals",
+ "124": "Oldószer által elérhető",
+ "125": "Oldószer által kizárt",
+ "126": "Távolság",
+ "127": "Szög",
+ "128": "Diéderes szög",
+ "129": "{0} kcal/mol, {1}, nem konvergált",
+ "130": "Kiválasztva {0} / {1}: {2}",
+ "131": "Kattintson {0} atomra a méréshez",
+ "132": "ESP ({0}): {1}, piros {2} e-tól kék +{3} e-ig",
+ "133": "Távolság {0}: {1}",
+ "134": "Szög {0}: {1}",
+ "135": "Diéderes szög {0}: {1}",
+ "136": "Megépítve: {0}",
+ "137": "Minimalizálva: {0}",
+ "138": "{0} konformer megtartva, összesen {1}",
+ "139": "{0} konformer megtartva",
+ "140": "Diéderes szög {0}",
+ "141": "A PNG-kódolás sikertelen"
+}
diff --git a/frontend/src/i18n/locales/hu/part15.json b/frontend/src/i18n/locales/hu/part15.json
new file mode 100644
index 00000000..f29e49e5
--- /dev/null
+++ b/frontend/src/i18n/locales/hu/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "közelítő, empirikus töltésekből",
+ "1": "{0} sztereocentrum vagy kettős kötés meghatározatlan volt; egy konfiguráció lett kiválasztva.",
+ "2": "A rajz {0} sztereojelölése nem jelenik meg 3D-ben.",
+ "3": "A(z) {0} kiterjesztett sztereocsoport(ok) lerajzolt tagja lett megépítve; a 3D modell a rajz által leírt keverék (relatív vagy racém) egyik sztereoizomerje.",
+ "4": "{0} alkalommal beágyazva (seedek: {1}) a lerajzolt sztereokémia megőrzéséhez.",
+ "5": "{0} nehézatompár közelebb van egymáshoz, mint van der Waals-érintkezésük {1}.",
+ "6": "Univerzális erőtér használva: {0}.",
+ "7": "nincsenek {0} paraméterek ehhez: {1}",
+ "8": "{0} nem tudta minden atom típusát meghatározni",
+ "9": "{0} konformer megváltoztatta a lerajzolt sztereokémiát a minimalizálás során, ezért kimaradt.",
+ "10": "300-nál több nehézatom: a konformermintavétel minősége ekkora méretnél romlik.",
+ "11": "A központi kötés gyűrűben van; a gyűrű feszül, hogy kövesse a szöget.",
+ "12": "A szerkezetnek nem voltak 3D koordinátái; a pásztázás új beágyazásból indult.",
+ "13": "A szerkezet megváltozott a 3D számítása közben; futtassa újra a parancsot.",
+ "14": "A rajzban nincs {0} objektum.",
+ "15": "{0} még nem rendelkezik 3D koordinátákkal; előbb építse meg a 3D-t.",
+ "16": "{0} nem rendelkezik {1} konformerrel.",
+ "17": "A szerkezetnek nincsenek atomjai.",
+ "18": "A 3D valódi atomokat igényel: {0} atom címke, R-csoport vagy kapcsolódási pont ({1}).",
+ "19": "A hidrogéneket nem sikerült hozzáadni: {0}",
+ "20": "A szerkezetnek {0} atomja van a hidrogénekkel együtt; a 3D legfeljebb {1} atomot kezel.",
+ "21": "A 3D koordináták nem illenek ehhez a szerkezethez (nincs adat ehhez: {0}); építse újra a 3D-t.",
+ "22": "A 3D koordináták nem illenek ehhez a szerkezethez (a hidrogének száma megváltozott); építse újra a 3D-t.",
+ "23": "A szerkezetet nem sikerült 3D-ben beágyazni: {0}",
+ "24": "A szerkezetet nem sikerült 3D-ben beágyazni; ellenőrizze a vegyértékeit és a sztereokémiáját.",
+ "25": "A konformereket nem sikerült beágyazni: {0}",
+ "26": "Egyetlen konformert sem sikerült beágyazni; ellenőrizze a szerkezet vegyértékeit és sztereokémiáját.",
+ "27": "Minden beágyazott konformer elvesztette a lerajzolt sztereokémiát a minimalizálás után.",
+ "28": "Egyetlen erőtérnek sincsenek paraméterei ehhez a szerkezethez ({0}).",
+ "29": "Az univerzális erőteret nem sikerült beállítani: {0}",
+ "30": "Az univerzális erőteret nem sikerült beállítani.",
+ "31": "Ismeretlen atomok: {0}; használja a fragmentum atomazonosítóit, vagy a hidrogént a1:h0 alakban.",
+ "32": "A négy atomnak különbözőnek kell lennie.",
+ "33": "A négy atomnak kötésekből álló láncot kell alkotnia (a1-a2-a3-a4).",
+ "34": "A 3D fájlt nem sikerült megírni: {0}",
+ "35": "A fájl nem olyan PDB-, mmCIF-, SDF- vagy MOL-fájl, amelyet a FormChem be tud olvasni.",
+ "36": "A fájl több mint {0} atomot tartalmaz.",
+ "37": "A PDB-fájlban nincsenek ATOM vagy HETATM rekordok.",
+ "38": "Az mmCIF atom_site táblájából hiányoznak a Cartn_x, Cartn_y és Cartn_z oszlopok.",
+ "39": "A CIF törtkoordinátákat tartalmaz, de nincs teljes elemi cellája.",
+ "40": "A CIF-ben nincs atom_site tábla.",
+ "41": "A CIF-ben nincsenek beolvasható atomok.",
+ "42": "A fájlban nincsenek rekordok.",
+ "43": "A fájl {0} rekordot tartalmaz; a 3D import legfeljebb {1} rekordot olvas be.",
+ "44": "A fájl egyetlen rekordját sem lehetett beolvasni.",
+ "45": "{0} nem PDB- vagy mmCIF-fájl.",
+ "46": "{0} nem alakítható FormChem-rajzzá: {1}.",
+ "47": "PDB-modell 3D objektumként elhelyezve: {0}.",
+ "48": "mmCIF-modell 3D objektumként elhelyezve: {0}.",
+ "49": "{0} ATOM vagy HETATM sor koordinátái olvashatatlanok voltak, ezért ki lettek hagyva.",
+ "50": "{0} atom_site sor koordinátái olvashatatlanok voltak, ezért ki lettek hagyva.",
+ "51": "Kismolekulás CIF: az aszimmetrikus egység törtkoordinátákból olvasódik be; a szimmetriapartnerek nem jönnek létre.",
+ "52": "{0} vegyértékproblémákat tartalmaz; szanálás nélkül lett beolvasva.",
+ "53": "{0} csak 2D koordinátákat tartalmaz; konformer nem maradt meg.",
+ "54": "{0} hidrogén nem volt a fájlban, ezért a geometria alapján lett elhelyezve.",
+ "55": "{0} nem olvasható be: {1}",
+ "56": "{0} nem olvasható be.",
+ "57": "Rekord {0}",
+ "58": "A szerkezet",
+ "59": "A fájl 3D koordinátái 1 szerkezet konformereként megmaradtak; megtekintésükhöz nem kell a 3D építése.",
+ "60": "A fájl 3D koordinátái {0} szerkezet konformereként megmaradtak; megtekintésükhöz nem kell a 3D építése.",
+ "61": "{0} egyetlen ion; nincs kinyerhető szerkezet.",
+ "62": "{0} atomjait nem lehetett beolvasni.",
+ "63": "A szerkezetben nincs {0} ligandum; ligandumok: {1}.",
+ "64": "A rajzban nincs {0} 3D modell.",
+ "65": "A FormChem PNG, JPEG, GIF, WebP és SVG képeket, JCAMP-DX színképeket, valamint PDB, mmCIF, SDF és MOL szerkezetfájlokat helyez el."
+}
diff --git a/frontend/src/i18n/locales/id/part12.json b/frontend/src/i18n/locales/id/part12.json
new file mode 100644
index 00000000..8569fb30
--- /dev/null
+++ b/frontend/src/i18n/locales/id/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spektrum",
+ "1": "Gambar atau pilih struktur untuk diberi nama.",
+ "2": "Nama tidak dapat dihitung",
+ "3": "FormChem tidak punya nama untuk struktur ini.",
+ "4": "Salin Nama",
+ "5": "Nama disalin: {0}",
+ "6": "Nama kimia yang disisipkan; kosongkan untuk membuka dialog",
+ "7": "Menyalin nama struktur terpilih (atau struktur di halaman) sebagai teks biasa: nama umum jika FormChem mengenalnya, jika tidak nama sistematiknya, yang hanya ditawarkan jika dibaca kembali menjadi struktur yang sama.",
+ "8": "trivial atau systematic untuk memilih nama yang disalin; kosongkan untuk yang pertama",
+ "9": "Spektrum prediksi sudah mutakhir.",
+ "10": "Segarkan Spektrum Prediksi",
+ "11": "Pilih satu struktur terlebih dahulu",
+ "12": "Pilih spektrum prediksi terlebih dahulu",
+ "13": "Spektrum 1H NMR prediksi ditambahkan ({0})",
+ "14": "Spektrum 13C NMR prediksi ditambahkan ({0})",
+ "15": "Spektrum prediksi disegarkan ({0})",
+ "16": "ID fragmen struktur; bawaan struktur terpilih atau satu-satunya di halaman",
+ "17": "Frekuensi spektrometer dalam MHz (bawaan 400 untuk 1H, 100 untuk 13C)",
+ "18": "Menambahkan spektrum 1H NMR prediksi dari struktur terpilih di sampingnya, sebagai satu langkah urungkan: objek spektrum yang dihitung dengan aturan inkremen FormChem sendiri (tanpa basis data pergeseran kimia), yang multiplet dan integralnya tertaut ke atom struktur, berjudul metode, versi, dan frekuensi. Kurvanya dihitung ulang dari struktur dan tidak pernah disimpan.",
+ "19": "Menambahkan spektrum 13C NMR prediksi dari struktur terpilih di sampingnya, sebagai satu langkah urungkan: objek spektrum yang dihitung dengan aturan inkremen FormChem sendiri (tanpa basis data pergeseran kimia), yang puncaknya tertaut ke atom struktur, berjudul metode, versi, dan frekuensi. Kurvanya dihitung ulang dari struktur dan tidak pernah disimpan.",
+ "20": "Spektrum tidak dapat diprediksi",
+ "21": "Prediksi Spektrum 1H NMR",
+ "22": "Prediksi Spektrum 13C NMR",
+ "23": "Menghitung ulang multiplet, integral, atau puncak spektrum prediksi setelah strukturnya berubah, dengan versi prediktor yang berjalan, sebagai satu langkah urungkan; tidak ada yang berubah jika sudah mutakhir.",
+ "24": "ID spektrum prediksi; bawaan yang terpilih atau yang terbuka di editor Spektrum",
+ "25": "Spektrum tidak dapat disegarkan",
+ "26": "Tidak ada puncak baru di rentang itu.",
+ "27": "Seret melintasi rentang di editor Spektrum untuk mengintegrasikannya.",
+ "28": "Tautkan Puncak ke Atom",
+ "29": "Lepas Tautan Puncak",
+ "30": "Sumbu Y Spektrum",
+ "31": "Spektrum dari File...",
+ "32": "Edit Spektrum...",
+ "33": "Pilih Puncak",
+ "34": "Integrasikan",
+ "35": "Transmitansi atau Absorbansi",
+ "36": "Ekspor Spektrum...",
+ "37": "Pilih spektrum terlebih dahulu",
+ "38": "tidak ada spektrum dengan id {0}",
+ "39": "Puncak terpilih: {0} (sudah ada: {1})",
+ "40": "Puncak terpilih: {0}",
+ "41": "Integral hanya untuk spektrum NMR",
+ "42": "Pilih puncak, integral, atau multiplet di editor Spektrum terlebih dahulu",
+ "43": "Semua atom harus milik satu struktur",
+ "44": "Hanya spektrum IR, Raman, dan UV-Vis yang dapat beralih antara transmitansi dan absorbansi",
+ "45": "Diekspor: {0}",
+ "46": "ID objek spektrum; bawaan spektrum terpilih atau yang terbuka di editor Spektrum",
+ "47": "Mengimpor file spektrum JCAMP-DX ke gambar aktif (satu objek spektrum per blok data, file dipertahankan byte demi byte), sebagai satu langkah urungkan per file. Tanpa path, membuka dialog file.",
+ "48": "Path absolut file .jdx, .dx, atau .jcamp",
+ "49": "Spektrum tidak dapat diimpor",
+ "50": "Membuka editor Spektrum untuk spektrum terpilih (sama dengan mengeklik dua kali).",
+ "51": "Spektrum tidak dapat dibuka",
+ "52": "Mencari puncak spektrum dalam suatu rentang (bawaan rentang yang ditampilkan) dan menambahkannya ke daftar puncak, melewati puncak yang sudah ada, sebagai satu langkah urungkan.",
+ "53": "Awal rentang dalam satuan x (cm-1, nm, m/z, ppm)",
+ "54": "Akhir rentang dalam satuan x",
+ "55": "Ambang deteksi opsional dalam satuan y",
+ "56": "Ganti daftar puncak alih-alih menambahkan ke dalamnya",
+ "57": "Puncak tidak dapat dipilih",
+ "58": "Menambahkan integral NMR pada suatu rentang, diskalakan seperti integral yang ada (atau ke value, dengan menskalakan ulang sisanya), sebagai satu langkah urungkan. Tanpa from dan to, beralih ke alat integrasi di editor Spektrum.",
+ "59": "Awal rentang dalam ppm",
+ "60": "Akhir rentang dalam ppm",
+ "61": "Nilai yang harus dibaca integral ini, misalnya jumlah proton",
+ "62": "Tidak dapat mengintegrasikan",
+ "63": "Menautkan puncak, integral, atau multiplet ke atom suatu struktur, sebagai satu langkah urungkan. Tanpa atoms, memakai atom terpilih, atau menunggu pengguna mengeklik atom di gambar.",
+ "64": "ID puncak, integral, atau multiplet; bawaan yang terpilih di editor Spektrum",
+ "65": "ID struktur (fragmen) tempat atom berada",
+ "66": "ID atom",
+ "67": "Puncak tidak dapat ditautkan",
+ "68": "Menghapus tautan atom pada puncak, integral, atau multiplet, sebagai satu langkah urungkan.",
+ "69": "Tautan puncak tidak dapat dilepas",
+ "70": "Menampilkan spektrum IR, Raman, atau UV-Vis sebagai transmitansi atau absorbansi (beralih tanpa mode), sebagai satu langkah urungkan.",
+ "71": "Sumbu Y yang ditampilkan; kosongkan untuk beralih",
+ "72": "Sumbu y tidak dapat diubah",
+ "73": "Menyimpan spektrum sebagai JCAMP-DX (dengan tabel puncaknya jika ada puncak) atau sebagai CSV dari setiap titik, melalui mesin.",
+ "74": "Format file, bawaan jdx",
+ "75": "Dengan jdx: file asli yang diimpor tanpa perubahan",
+ "76": "Path absolut untuk ditulis; kosongkan untuk bertanya",
+ "77": "Spektrum tidak dapat diekspor",
+ "78": "Sisipkan Spektrum dari File",
+ "79": "File tidak berisi spektrum yang dapat digambar FormChem",
+ "80": "Sisipkan Spektrum",
+ "81": "Spektrum tidak dapat ditempatkan: filenya tidak sampai ke gambar.",
+ "82": "Spektrum disisipkan: {0}",
+ "83": "Panjang gelombang (µm)",
+ "84": "Bilangan gelombang (cm⁻¹)",
+ "85": "Pergeseran Raman (cm⁻¹)",
+ "86": "Panjang gelombang (nm)",
+ "87": "Frekuensi (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmitansi (%)",
+ "90": "Transmitansi",
+ "91": "Absorbansi",
+ "92": "Kelimpahan relatif (%)",
+ "93": "Intensitas",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Prediksi {0}, {1} MHz ({2})",
+ "100": "Prediksi {0}, {1} MHz",
+ "101": "Prediksi {0} ({1})",
+ "102": "Prediksi {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spektrum tidak tersedia: {0}",
+ "105": "Memuat spektrum",
+ "106": "Nama umum",
+ "107": "Sistematik",
+ "108": "Keyakinan tinggi",
+ "109": "Keyakinan sedang",
+ "110": "Keyakinan rendah",
+ "111": "Tidak terbaca",
+ "112": "Nama FormChem",
+ "113": "Nama tidak dapat dibaca",
+ "114": "Sisipkan Struktur dari Nama",
+ "115": "Struktur dari Nama",
+ "116": "Sebuah nama, seperti aspirin atau 2-metilpropan-1-ol",
+ "117": "Nama kimia",
+ "118": "Ketik nama untuk melihat strukturnya.",
+ "119": "Tidak ada struktur untuk nama ini",
+ "120": "Kamus",
+ "121": "Pengurai sistematik",
+ "122": "Penamaan berbasis aturan, diperiksa bolak-balik",
+ "123": "Alat spektrum",
+ "124": "Tampilkan seluruh spektrum",
+ "125": "Sumbu Y",
+ "126": "Tampilkan rentang ini di halaman",
+ "127": "Klik dua kali spektrum di gambar untuk mengeditnya di sini.",
+ "128": "Puncak dan integral",
+ "129": "Prediksi",
+ "130": "Nilai integral",
+ "131": "Tautkan ke Atom",
+ "132": "Lepas Tautan",
+ "133": "1 atom",
+ "134": "Atom untuk ditautkan",
+ "135": "Klik atom lainnya, lalu Selesai.",
+ "136": "Klik atom di gambar yang termasuk puncak ini, lalu Selesai.",
+ "137": "Tidak ada yang diintegrasikan di rentang itu.",
+ "138": "Hapus Puncak",
+ "139": "Tambah Puncak",
+ "140": "Tertaut ke 1 atom",
+ "141": "Atur Rentang Spektrum",
+ "142": "Ketik angka positif.",
+ "143": "Integral tidak dapat diatur",
+ "144": "Geser dan zoom: seret untuk menggeser, roda untuk zoom, Shift-seret untuk zoom ke rentang",
+ "145": "Zoom ke rentang: seret melintasi plot",
+ "146": "Pilih puncak: seret melintasi rentang",
+ "147": "Tambah atau hapus puncak: klik di dekat puncak",
+ "148": "Integrasikan: seret melintasi rentang",
+ "149": "Puncak",
+ "150": "Integral",
+ "151": "Multiplet",
+ "152": "Jumlah atom: {0}",
+ "153": "Tertaut ke {0}",
+ "154": "Seret untuk menggeser, roda untuk zoom, Shift-seret untuk zoom ke rentang. Klik label untuk memilihnya.",
+ "155": "Seret melintasi plot untuk zoom ke rentang itu.",
+ "156": "Seret melintasi rentang untuk memilih puncaknya.",
+ "157": "Klik di dekat puncak untuk menambahkannya; klik label puncak untuk menghapusnya.",
+ "158": "Seret melintasi rentang untuk mengintegrasikannya.",
+ "159": "Tertaut ke jumlah atom: {0}"
+}
diff --git a/frontend/src/i18n/locales/id/part13.json b/frontend/src/i18n/locales/id/part13.json
new file mode 100644
index 00000000..c81184e7
--- /dev/null
+++ b/frontend/src/i18n/locales/id/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "mesin mengembalikan file kosong",
+ "1": "nama lebih panjang dari {0} karakter",
+ "2": "fragmen di atas {0} atom tidak diberi nama",
+ "3": "Struktur berisi label, gugus R, atau atom apa pun, yang tidak punya nama.",
+ "4": "Struktur tidak dapat dibaca sebagai molekul (periksa valensi).",
+ "5": "Tidak ada struktur untuk diberi nama.",
+ "6": "Nama indeks terbalik (induk dahulu, lalu koma dan substituen) tidak dibaca; tulis nama dalam urutan normal, seperti 1,2-dichlorobenzene.",
+ "7": "D- dan L- hanya dibaca untuk asam amino dan gula dalam kamus FormChem; berikan deskriptor R atau S untuk nama lain.",
+ "8": "FormChem membaca seluruh nama, tetapi nama itu tidak membentuk nama struktur yang lengkap (induk seperti hexane atau benzene, atau sufiks, mungkin hilang).",
+ "9": "FormChem tidak dapat membaca nama mulai dari karakter {0} (\"{1}\").",
+ "10": "FormChem membaca nama itu, tetapi {0}.",
+ "11": "struktur tidak dapat dilengkapi",
+ "12": "Nama dapat dibaca dengan lebih dari satu cara; FormChem menggambar bacaan dengan asumsi paling sedikit.",
+ "13": "Nama tidak memberi deskriptor stereo, sehingga pusat stereo dan ikatan rangkap digambar tanpa spesifikasi.",
+ "14": "Tidak ada nama sistematik: {0}.",
+ "15": "Nama sistematik yang dibuat FormChem tidak terbaca kembali menjadi struktur yang sama, jadi tidak ditampilkan.",
+ "16": "ikatan rangkap itu tidak dapat berupa E atau Z",
+ "17": "lokan deskriptor {0} bukan posisi pada induk",
+ "18": "posisi {0} tidak memulai ikatan rangkap yang dapat berupa E atau Z",
+ "19": "{0} memerlukan tepat satu ikatan rangkap yang dapat berupa cis atau trans; struktur ini memiliki {1}",
+ "20": "{0} tidak jelas untuk ikatan rangkap ini; berikan E atau Z sebagai gantinya",
+ "21": "({0}) memerlukan lokan: struktur memiliki {1} pusat stereo",
+ "22": "posisi {0} bukan pusat stereo, sehingga ({1}) tidak dapat berlaku",
+ "23": "({0}) memerlukan lokan: struktur memiliki {1} ikatan rangkap yang dapat berupa E atau Z",
+ "24": "posisi {0} tidak dapat diberi {1}",
+ "25": "ikatan rangkap itu tidak dapat diberi {0}",
+ "26": "{0} tidak menyatakan konfigurasi mana yang dimaksud, jadi struktur digambar tanpa stereo.",
+ "27": "{0} tidak punya titik pengikatan",
+ "28": "tidak ada ruang untuk {0} di {1}",
+ "29": "{0} tidak dapat berikatan di sana",
+ "30": "rantai lebih panjang dari {0} karbon belum dibaca",
+ "31": "{0} terlalu kecil untuk menjadi cincin",
+ "32": "{0}-{1} adalah tautomer yang belum digambar FormChem dari nama",
+ "33": "lokan {0} bukan posisi pada {1}",
+ "34": "{0} bukan posisi rantai",
+ "35": "ikatan majemuk tidak dapat dimulai di posisi {0} dari {1}",
+ "36": "posisi {0} dari {1} tidak dapat memuat ikatan majemuk itu",
+ "37": "tidak ada ruang untuk ikatan majemuk di posisi {0} dari {1}",
+ "38": "tidak ada ruang untuk ikatan majemuk dari {0}",
+ "39": "Posisi ikatan majemuk dari {0} tidak diberikan; digambar di posisi terendah.",
+ "40": "-{0} memerlukan rantai terbuka; pada cincin sufiksnya adalah carbaldehyde, carboxylic acid, carbonitrile, atau carboxamide",
+ "41": "rantai hanya memiliki dua ujung untuk -{0}",
+ "42": "{0} terlalu pendek untuk dua gugus -{1}",
+ "43": "tidak ada ruang untuk -{0} pada {1}",
+ "44": "Posisi -{0} pada {1} tidak diberikan; digambar di posisi terendah.",
+ "45": "-{0} harus berada di ujung rantai, bukan di {1}",
+ "46": "tidak ada ruang untuk -{0} di {1}",
+ "47": "orto, meta, dan para memerlukan cincin benzena",
+ "48": "orto, meta, atau para dengan satu gugus memerlukan induk seperti phenol, aniline, atau toluene",
+ "49": "tidak ada ruang untuk {0} pada {1}",
+ "50": "tidak ada ruang untuk {0} gugus {1} pada {2}",
+ "51": "Posisi {0} pada {1} tidak diberikan; digambar di posisi bebas terendah.",
+ "52": "{0} tidak dapat memuat substituen",
+ "53": "gugus asil terikat pada karbon karbonilnya",
+ "54": "{0} tidak punya posisi bebas",
+ "55": "Posisi pengikatan {0} tidak diberikan; posisi {1} diasumsikan.",
+ "56": "{0} tidak punya ruang tersisa untuk mengikat",
+ "57": "lokan {0} sebelum {1} tidak dipakai",
+ "58": "{0} tidak dapat berdiri sebagai kata terpisah",
+ "59": "\"{0}\" memerlukan {1} gugus sebelumnya, nama memberi {2}",
+ "60": "\"{0}\" memerlukan {1} gugus sebelumnya, nama memberi {2}",
+ "61": "nama memberi {0} gugus alkil untuk {1} posisi ester",
+ "62": "nama memberi {0} gugus alkil untuk {1} posisi ester",
+ "63": "nama memberi {0} gugus alkil untuk {1} posisi ester",
+ "64": "nama memberi {0} gugus alkil untuk {1} posisi ester",
+ "65": "struktur yang dideskripsikannya tidak valid ({0})",
+ "66": "-one di {0} akan menjadi aldehida; aldehida dinamai dengan -al",
+ "67": "posisi {0} dari {1}",
+ "68": "terlalu banyak substituen identik",
+ "69": "lokan campuran",
+ "70": "jenis ikatan tidak lazim belum diberi nama",
+ "71": "sistem cincin yang belum dapat dinamai FormChem",
+ "72": "cincin aromatik dengan ikatan rangkap eksosiklik (seperti piridon) belum diberi nama",
+ "73": "isotop dan radikal belum diberi nama",
+ "74": "halogen hipervalen tidak diberi nama",
+ "75": "gugus nitrogen bermuatan selain nitro belum diberi nama",
+ "76": "atom bermuatan belum diberi nama",
+ "77": "oksida belerang, nitrogen, dan fosfor belum diberi nama",
+ "78": "gugus oksigen ini belum diberi nama",
+ "79": "sulfoksida, sulfon, dan gugus belerang lain belum diberi nama",
+ "80": "imina, azo, dan gugus nitrogen serupa belum diberi nama",
+ "81": "{0} belum diberi nama",
+ "82": "rantai substituen lebih panjang dari 20 karbon tidak diberi nama",
+ "83": "gugus asil tak jenuh belum diberi nama",
+ "84": "gugus iliden tersubstitusi belum diberi nama",
+ "85": "gugus iliden cincin belum diberi nama",
+ "86": "cincin yang terikat dua kali belum diberi nama",
+ "87": "penomoran untuk substituen cincin tidak ditemukan",
+ "88": "ester dengan bagian alkohol berbeda belum diberi nama",
+ "89": "rantai atau cincin induk tidak ditemukan",
+ "90": "ester siklik (laktona) belum diberi nama",
+ "91": "substituen pada lebih dari satu nitrogen amina atau amida belum diberi nama",
+ "92": "pusat stereo di luar rantai atau cincin induk belum diberi nama",
+ "93": "geometri ikatan rangkap di luar rantai induk belum diberi nama",
+ "94": "pusat pseudo-asimetris belum diberi nama",
+ "95": "geometri ikatan rangkap ini belum diberi nama",
+ "96": "rantai lebih panjang dari 20 karbon tidak diberi nama",
+ "97": "terlalu banyak gugus identik",
+ "98": "struktur memiliki kesalahan valensi",
+ "99": "garam dan campuran belum diberi nama secara sistematik",
+ "100": "struktur dengan lebih dari {0} atom berat belum diberi nama secara sistematik",
+ "101": "senyawa {0} belum diberi nama secara sistematik",
+ "102": "atom kueri dan gugus R tidak punya nama",
+ "103": "hidrida heteroatom tunggal hanya dinamai dari kamus",
+ "104": "{0} bukan objek gambar ini.",
+ "105": "{0} tidak punya atom.",
+ "106": "Fragmen tidak punya atom.",
+ "107": "Gambar tidak punya halaman.",
+ "108": "{0} bukan spektrum gambar ini.",
+ "109": "Struktur {0} tempat prediksi ini berasal sudah tidak ada di gambar.",
+ "110": "Gambar {0} telah ditutup.",
+ "111": "Pergeseran kimia (ppm)",
+ "112": "Waktu (s)",
+ "113": "Reflektansi",
+ "114": "Kelimpahan relatif",
+ "115": "##{0}= muncul lebih dari sekali; nilai pertama dipertahankan.",
+ "116": "##XYDATA={0} bukan daftar variabel yang dikenal; dibaca sebagai (X++(Y..Y)).",
+ "117": "##{0}={1} bukan daftar variabel yang dikenal; dibaca sebagai (XY..XY).",
+ "118": "Titik tidak berurutan menurut x dan telah diurutkan.",
+ "119": "##.SHIFT REFERENCE={0} tidak dapat dibaca; pergeseran tidak direferensikan.",
+ "120": "##.SHIFT REFERENCE menyebut titik {0}, di luar {1} titik; pergeseran tidak direferensikan.",
+ "121": "Pergeseran direferensikan sehingga titik {0} terbaca {1} ppm ({2}).",
+ "122": "File tidak menyebut inti yang diamati.",
+ "123": "Ini data NMR domain waktu (FID); ditampilkan apa adanya, tanpa transformasi Fourier.",
+ "124": "Frekuensi dalam Hz dibagi dengan frekuensi observasi ({0} MHz) untuk mendapat ppm.",
+ "125": "Tidak ada ##.SHIFT REFERENCE; 0 Hz dianggap 0 ppm.",
+ "126": "Tidak ada ##.OBSERVE FREQUENCY, jadi sumbu pergeseran tetap dalam Hz.",
+ "127": "Transmitansi disimpan sebagai pecahan dan ditampilkan sebagai persen.",
+ "128": "Blok {0} berisi lebih dari {1} titik.",
+ "129": "##DATA TYPE={0} dengan satuan x {1} tidak menyebut teknik yang dikenal; digambar sebagai spektrum biasa.",
+ "130": "##BLOCKS={0} tetapi blok LINK berisi {1} blok; semua blok yang ditemukan dibaca.",
+ "131": "Ini bukan file JCAMP-DX: tidak ada rekaman ##TITLE=.",
+ "132": "File berisi {0} blok berurutan tanpa blok LINK; masing-masing dibaca.",
+ "133": "Dua blok memakai ##BLOCK_ID yang sama.",
+ "134": "File tidak berisi spektrum yang dapat digambar FormChem ({0}).",
+ "135": "Blok \"{0}\" tidak digambar: {1}.",
+ "136": "blok struktur (JCAMP-CS); disimpan di file tetapi tidak digambar",
+ "137": "tidak berisi XYDATA, XYPOINTS, PEAK TABLE, atau NTUPLES",
+ "138": "tabel datanya tidak berisi titik",
+ "139": "tabel NTUPLES-nya tidak mendeklarasikan simbol",
+ "140": "spektrum NTUPLES 2D belum didukung",
+ "141": "tabel NTUPLES-nya tidak punya halaman yang dapat dibaca",
+ "142": "File berisi karakter di luar ASCII; dibaca sebagai UTF-8.",
+ "143": "File berisi byte yang bukan ASCII atau UTF-8; dibaca sebagai Latin-1.",
+ "144": "Baris di luar rekaman data berlabel diabaikan.",
+ "145": "##END= tanpa blok sebelumnya diabaikan.",
+ "146": "Rekaman sebelum ##TITLE= pertama atau sesudah ##END= terakhir diabaikan.",
+ "147": "File berakhir tanpa ##END=; blok yang terbuka ditutup.",
+ "148": "halaman NTUPLES {0}",
+ "149": "Halaman NTUPLES {0} tidak punya ##DATA TABLE=; dilewati.",
+ "150": "Halaman NTUPLES {0} memakai simbol ({1}) yang tidak dideklarasikan di ##SYMBOL=; dilewati.",
+ "151": "{0} memiliki bentuk tabel data yang tidak dibaca FormChem ({1}); dilewati.",
+ "152": "Tabel NTUPLES tidak punya ##END NTUPLES=; dibaca sampai akhir blok.",
+ "153": "Tabel NTUPLES tidak punya daftar ##SYMBOL=.",
+ "154": "Ini spektrum 2D (dua variabel bebas); spektrum 2D tidak digambar di versi ini.",
+ "155": "Tabel NTUPLES memiliki {0} halaman; hanya {1} pertama yang dibaca.",
+ "156": "Halaman imajiner tidak berbagi nilai x dengan halaman riil; dikecualikan.",
+ "157": "Tabel NTUPLES berisi {0} halaman; halaman {1} ditampilkan dan {2} halaman lain dikecualikan.",
+ "158": "##DELTAX={0} berbeda dari (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; jarak yang dihitung dipakai.",
+ "159": "{0} tidak punya FIRSTX, LASTX, dan NPOINTS yang lengkap; jarak berasal dari ##DELTAX.",
+ "160": "Sebuah baris data diawali nilai DIF; dilanjutkan dari nilai terakhir baris sebelumnya.",
+ "161": "Nilai periksa Y tidak cocok dengan nilai terakhir baris sebelumnya; baris dilanjutkan dari nilai sebelumnya.",
+ "162": "{0} karakter di {1} tidak dapat dibaca dan dilewati.",
+ "163": "{0} baris DIF tidak diikuti nilai periksa Y.",
+ "164": "{0} tidak berisi titik data.",
+ "165": "{0} berisi {1} titik tetapi ##NPOINTS={2}; nilai X baris sesuai {3} titik dari FIRSTX sampai LASTX, jadi jarak itu dipakai.",
+ "166": "{0} berisi {1} titik tetapi ##NPOINTS={2}; titik yang terbaca dipertahankan.",
+ "167": "Nilai X sebuah baris tidak cocok dengan posisinya dari FIRSTX dan jarak; posisi dipakai.",
+ "168": "{0} tidak punya FIRSTX, LASTX, dan NPOINTS; jarak diambil dari nilai X baris.",
+ "169": "{0} tidak memberi cara menempatkan titiknya pada sumbu x; titik diberi nomor 0, 1, 2, dan seterusnya.",
+ "170": "Baris pertama dimulai di x = {0} tetapi ##FIRSTX={1}; FIRSTX dipakai.",
+ "171": "Nilai Y pertama {0} tidak cocok dengan ##FIRSTY={1}.",
+ "172": "{0} berakhir dengan kelompok tidak lengkap berisi {1} nilai; dibuang.",
+ "173": "Tidak dapat membaca {0}: {1}.",
+ "174": "Spektrum meminta blok {0}, tetapi filenya berisi 1 blok.",
+ "175": "Spektrum meminta blok {0}, tetapi filenya berisi {1} blok.",
+ "176": "Spektrum tidak punya sumber.",
+ "177": "File spektrum {0} tidak ada di gambar.",
+ "178": "Tidak ada prediktor untuk {0} di mesin ini.",
+ "179": "Prediksi gagal: {0}",
+ "180": "Sumber spektrum bukan file maupun prediksi.",
+ "181": "Gambar tidak punya spektrum {0}.",
+ "182": "Spektrum batang tidak punya area untuk diintegrasikan.",
+ "183": "value harus lebih besar dari nol.",
+ "184": "from dan to harus dua nilai x yang berbeda.",
+ "185": "Spektrum tidak punya integral {0}.",
+ "186": "Spektrum ini tidak punya file asli; ekspor tanpa original=1.",
+ "187": "FormChem menempatkan gambar PNG, JPEG, GIF, WebP, dan SVG serta spektrum JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/id/part14.json b/frontend/src/i18n/locales/id/part14.json
new file mode 100644
index 00000000..eb91dd46
--- /dev/null
+++ b/frontend/src/i18n/locales/id/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Tampilan",
+ "1": "Permukaan",
+ "2": "Tidak ada yang diekspor: tampilan 3D kosong.",
+ "3": "Ekspor gagal",
+ "4": "Pilih struktur untuk ditampilkan dalam 3D.",
+ "5": "Bangun 3D",
+ "6": "Sisipkan Tampilan 3D",
+ "7": "Pilih file PDB, mmCIF, SDF, atau MOL.",
+ "8": "Struktur 3D tidak dapat ditempatkan di halaman",
+ "9": "Pilih objek 3D yang dibuka dari file PDB atau mmCIF.",
+ "10": "Model ini tidak punya ligan.",
+ "11": "Ligan tidak dapat diekstrak",
+ "12": "Belum ada koordinat 3D: Bangun 3D membuat konformer dari gambar.",
+ "13": "File Struktur 3D...",
+ "14": "Ekstrak Ligan...",
+ "15": "Ekspor Struktur 3D...",
+ "16": "Pindai Dihedral...",
+ "17": "Ukur dalam 3D",
+ "18": "Ekspor Tampilan 3D sebagai PNG...",
+ "19": "Ekspor Tampilan 3D sebagai glTF...",
+ "20": "Diekstrak {0}: {1} (orde ikatan disimpulkan)",
+ "21": "Diekstrak {0}: {1}",
+ "22": "Buka Tampilan 3D terlebih dahulu",
+ "23": "Membuka panel Tampilan 3D pada struktur terpilih (atau objek 3D terpilih di halaman) dan mengikuti pilihan. Struktur memerlukan koordinat 3D terlebih dahulu: Bangun 3D membuatnya.",
+ "24": "Membangun konformer 3D dari struktur terpilih dari gambar 2D-nya (baji, geometri ikatan rangkap, dan muatan dipertahankan), meminimalkannya dengan medan gaya yang dipilih, dan menyimpannya di gambar sebagai satu langkah urungkan; Tampilan 3D menampilkannya.",
+ "25": "Meminimalkan konformer yang ditampilkan dari struktur terpilih dengan medan gaya yang dipilih di Tampilan 3D (MMFF94 secara bawaan, UFF jika MMFF94 tidak punya parameter) dan melaporkan energi sebelum dan sesudah, sebagai satu langkah urungkan.",
+ "26": "Membuat ansambel konformer dari struktur terpilih (ETKDG, dipangkas dengan RMSD, masing-masing diminimalkan) dan menyimpan yang berada dalam jendela energi; dengan n, window, dan method berjalan tanpa dialog.",
+ "27": "Jumlah konformer yang dibuat",
+ "28": "Jendela energi dalam kcal/mol",
+ "29": "Menempatkan tampilan 3D dari struktur terpilih di halaman di sampingnya (membangun koordinat 3D terlebih dahulu jika belum ada) dan membuka panel Tampilan 3D yang terikat padanya; memutar atau mengubah gaya model memperbarui gambar di halaman.",
+ "30": "Membuka file PDB, mmCIF, SDF, atau MOL sebagai objek 3D di halaman (protein sebagai pita, ligan sebagai bola dan tongkat, air disembunyikan, ligan difokuskan) dan menampilkannya di Tampilan 3D.",
+ "31": "Mengubah ligan dari objek 3D terpilih (dibuka dari file PDB atau mmCIF) menjadi struktur 2D di sampingnya sebagai satu langkah urungkan: orde ikatan dari templat bawaan untuk ligan umum, jika tidak disimpulkan dari geometri dan dilaporkan; koordinat file menjadi konformernya. Dengan ligand mengambil yang itu; tanpanya bertanya jika model punya beberapa.",
+ "32": "Kunci ligan chain:het:number, atau kode het",
+ "33": "Pilih objek 3D yang dibuka dari file PDB atau mmCIF",
+ "34": "Menyimpan koordinat 3D struktur terpilih dengan semua hidrogen: molfile MDL (konformer yang ditampilkan), file SD (setiap konformer, dengan kolom data energi dan metode), PDB atau XYZ (konformer yang ditampilkan, atau setiap konformer sebagai model atau bingkai); objek 3D yang dibuka dari file PDB atau mmCIF menyimpan file aslinya. Tanpa format, bertanya.",
+ "35": "Format file",
+ "36": "Setiap konformer, bukan yang ditampilkan (bawaan true untuk sdf)",
+ "37": "Memindai dihedral dari empat atom yang dipilih di Tampilan 3D (atau pengukuran dihedral terakhirnya) dengan minimisasi relaks dan memplot sudut terhadap energi.",
+ "38": "Mengukur jarak (dua atom), sudut (tiga), atau dihedral (empat) di Tampilan 3D dan mendaftarkannya; dengan atoms (id atom fragmen seperti a1, hidrogen sebagai a1:h0, atau nomor seri PDB) mengukur atom itu, jika tidak beralih ke pemilihan.",
+ "39": "Dua sampai empat id atom",
+ "40": "Menyimpan Tampilan 3D sebagai gambar PNG pada ukuran di layar; transparent menghilangkan latar belakang.",
+ "41": "Menyimpan Tampilan 3D sebagai file glTF 2.0 biner (.glb): atom sebagai bola dan ikatan sebagai silinder dengan warna unsur, 1 angstrom = 1 cm, untuk penampil 3D, slide, dan pencetakan.",
+ "42": "Tanpa Permukaan",
+ "43": "Menghapus permukaan molekul dari Tampilan 3D.",
+ "44": "Permukaan Van der Waals",
+ "45": "Menampilkan permukaan van der Waals di Tampilan 3D.",
+ "46": "Permukaan Terjangkau Pelarut",
+ "47": "Menampilkan permukaan terjangkau pelarut (probe 1,4 angstrom) di Tampilan 3D.",
+ "48": "Permukaan Terkecualikan Pelarut",
+ "49": "Menampilkan permukaan terkecualikan pelarut di Tampilan 3D.",
+ "50": "Permukaan Terpetakan ESP",
+ "51": "Mewarnai permukaan menurut perkiraan potensial elektrostatik dari muatan parsial empiris mesin (merah negatif, biru positif), dengan legenda yang menyebut metodenya.",
+ "52": "Menampilkan Tampilan 3D dengan gaya kerangka kawat; pada objek 3D di halaman, pilihan disimpan bersamanya.",
+ "53": "Menampilkan Tampilan 3D dengan gaya tongkat; pada objek 3D di halaman, pilihan disimpan bersamanya.",
+ "54": "Bola dan Tongkat",
+ "55": "Menampilkan Tampilan 3D dengan gaya bola dan tongkat; pada objek 3D di halaman, pilihan disimpan bersamanya.",
+ "56": "Pengisi Ruang",
+ "57": "Menampilkan Tampilan 3D dengan gaya pengisi ruang; pada objek 3D di halaman, pilihan disimpan bersamanya.",
+ "58": "Pita",
+ "59": "Menampilkan Tampilan 3D dengan gaya pita (protein dan asam nukleat; ligan tetap bola dan tongkat); pada objek 3D di halaman, pilihan disimpan bersamanya.",
+ "60": "Sudut dihedral (derajat)",
+ "61": "Energi relatif (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "Ekspor Struktur 3D",
+ "64": "Setiap konformer (rekaman SDF, model PDB, bingkai XYZ)",
+ "65": "1 konformer tersimpan; setiap hidrogen ditulis dengan posisi 3D-nya.",
+ "66": "Ekstrak Ligan",
+ "67": "Ligan",
+ "68": "Ligan menjadi struktur 2D di samping model, dengan koordinatnya dari file dipertahankan sebagai konformernya.",
+ "69": "Ekstrak",
+ "70": "File SD (.sdf)",
+ "71": "Molfile MDL (.mol)",
+ "72": "Konformer tersimpan: {0}; setiap hidrogen ditulis dengan posisi 3D-nya.",
+ "73": "Konformer",
+ "74": "Jendela energi (kcal/mol)",
+ "75": "Penyematan ETKDG dengan seed tetap, duplikat yang hampir sama dipangkas pada RMSD atom berat 0,5 Å, masing-masing diminimalkan; yang terendah menjadi konformer yang ditampilkan.",
+ "76": "Buat",
+ "77": "Profil energi pindaian dihedral",
+ "78": "Pindai Dihedral",
+ "79": "Dari (derajat)",
+ "80": "Sampai (derajat)",
+ "81": "Langkah (derajat)",
+ "82": "Simpan setiap titik sebagai konformer (satu langkah urungkan)",
+ "83": "Jalankan Pindaian",
+ "84": "Pindaian relaks: pada setiap sudut dihedral ditahan dan yang lainnya diminimalkan.",
+ "85": "Sudut akhir harus lebih besar dari sudut awal.",
+ "86": "Memindai...",
+ "87": "Pindaian gagal",
+ "88": "penghalang {0} kcal/mol",
+ "89": "Gaya tampilan",
+ "90": "Warnai permukaan menurut potensial elektrostatik dari muatan parsial empiris",
+ "91": "ESP",
+ "92": "Minimalkan",
+ "93": "Pindai...",
+ "94": "Fokuskan ligan",
+ "95": "Atur ulang tampilan",
+ "96": "Putar",
+ "97": "Ekspor tampilan 3D",
+ "98": "Ukur",
+ "99": "Pengukuran",
+ "100": "Gambar PNG",
+ "101": "Gambar PNG, Transparan",
+ "102": "glTF Biner (.glb)",
+ "103": "3D memerlukan WebGL, yang tidak disediakan jendela ini.",
+ "104": "Memuat penampil 3D...",
+ "105": "Penampil 3D tidak dapat dimuat",
+ "106": "Buka gambar dan pilih struktur untuk melihatnya dalam 3D.",
+ "107": "Pilih struktur di halaman untuk melihatnya dalam 3D.",
+ "108": "Struktur 3D tidak dapat dibaca",
+ "109": "Konformer ini tidak dapat ditulis sebagai molfile",
+ "110": "Putar mati: sistem meminta gerakan dikurangi",
+ "111": "Model PDB atau CIF tidak punya konformer.",
+ "112": "Energi relatif terhadap yang terendah; klik satu untuk menampilkannya.",
+ "113": "Bangun 3D atau Konformer... mengisi daftar ini.",
+ "114": "Muatan parsial tidak tersedia",
+ "115": "mesin belum punya rute 3D",
+ "116": "tidak konvergen",
+ "117": "Pilih empat atom berikatan berurutan (sebuah dihedral), lalu Pindai.",
+ "118": "Centang Simpan setiap titik sebagai konformer untuk melihat geometrinya.",
+ "119": "Tampilkan konformer",
+ "120": "Perbarui tampilan 3D",
+ "121": "Cuplikan halaman tidak dapat diperbarui",
+ "122": "Tanpa permukaan",
+ "123": "Van der Waals",
+ "124": "Terjangkau pelarut",
+ "125": "Terkecualikan pelarut",
+ "126": "Jarak",
+ "127": "Sudut",
+ "128": "Dihedral",
+ "129": "{0} kcal/mol, {1}, tidak konvergen",
+ "130": "Terpilih {0} / {1}: {2}",
+ "131": "Klik {0} atom untuk mengukur",
+ "132": "ESP ({0}): {1}, merah {2} e sampai biru +{3} e",
+ "133": "Jarak {0}: {1}",
+ "134": "Sudut {0}: {1}",
+ "135": "Dihedral {0}: {1}",
+ "136": "Dibangun: {0}",
+ "137": "Diminimalkan: {0}",
+ "138": "{0} konformer dipertahankan dari {1}",
+ "139": "{0} konformer dipertahankan",
+ "140": "Dihedral {0}",
+ "141": "Pengodean PNG gagal"
+}
diff --git a/frontend/src/i18n/locales/id/part15.json b/frontend/src/i18n/locales/id/part15.json
new file mode 100644
index 00000000..78876ec6
--- /dev/null
+++ b/frontend/src/i18n/locales/id/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "perkiraan, dari muatan empiris",
+ "1": "{0} pusat stereo atau ikatan rangkap tidak ditentukan; satu konfigurasi dipilih.",
+ "2": "{0} label stereo pada gambar tidak direproduksi dalam 3D.",
+ "3": "Anggota yang digambar dari grup stereo yang ditingkatkan {0} dibangun; model 3D adalah satu stereoisomer dari campuran (relatif atau rasemat) yang dideskripsikan gambar.",
+ "4": "Disematkan {0} kali (seed {1}) untuk mempertahankan stereo yang digambar.",
+ "5": "{0} pasang atom berat lebih dekat dari {1} kontak van der Waals mereka.",
+ "6": "Medan gaya universal digunakan: {0}.",
+ "7": "tidak ada parameter {0} untuk {1}",
+ "8": "{0} tidak dapat menentukan tipe setiap atom",
+ "9": "{0} konformer mengubah stereo yang digambar saat minimisasi dan dikeluarkan.",
+ "10": "Lebih dari 300 atom berat: kualitas pengambilan sampel konformer menurun pada ukuran ini.",
+ "11": "Ikatan pusat berada dalam cincin; cincin diregangkan mengikuti sudut.",
+ "12": "Struktur belum punya koordinat 3D; pindaian dimulai dari penyematan baru.",
+ "13": "Struktur berubah saat 3D dihitung; jalankan perintah lagi.",
+ "14": "Gambar tidak punya objek {0}.",
+ "15": "{0} belum punya koordinat 3D; bangun 3D terlebih dahulu.",
+ "16": "{0} tidak punya konformer {1}.",
+ "17": "Struktur tidak punya atom.",
+ "18": "3D memerlukan atom sungguhan: {0} atom adalah label, gugus R, atau titik pengikatan ({1}).",
+ "19": "Hidrogen tidak dapat ditambahkan: {0}",
+ "20": "Struktur punya {0} atom dengan hidrogen; 3D menangani hingga {1}.",
+ "21": "Koordinat 3D tidak cocok dengan struktur ini (tidak ada untuk {0}); bangun 3D lagi.",
+ "22": "Koordinat 3D tidak cocok dengan struktur ini (jumlah hidrogen berubah); bangun 3D lagi.",
+ "23": "Struktur tidak dapat disematkan dalam 3D: {0}",
+ "24": "Struktur tidak dapat disematkan dalam 3D; periksa valensi dan stereonya.",
+ "25": "Konformer tidak dapat disematkan: {0}",
+ "26": "Tidak ada konformer yang dapat disematkan; periksa valensi dan stereo struktur.",
+ "27": "Setiap konformer yang disematkan kehilangan stereo yang digambar setelah minimisasi.",
+ "28": "Tidak ada medan gaya yang punya parameter untuk struktur ini ({0}).",
+ "29": "Medan gaya universal tidak dapat disiapkan: {0}",
+ "30": "Medan gaya universal tidak dapat disiapkan.",
+ "31": "Atom tidak dikenal {0}; gunakan id atom fragmen atau hidrogen sebagai a1:h0.",
+ "32": "Keempat atom harus berbeda.",
+ "33": "Keempat atom harus membentuk rantai ikatan (a1-a2-a3-a4).",
+ "34": "File 3D tidak dapat ditulis: {0}",
+ "35": "File itu bukan file PDB, mmCIF, SDF, atau MOL yang dapat dibaca FormChem.",
+ "36": "File memiliki lebih dari {0} atom.",
+ "37": "File PDB tidak punya rekaman ATOM atau HETATM.",
+ "38": "Tabel atom_site mmCIF tidak punya kolom Cartn_x, Cartn_y, dan Cartn_z.",
+ "39": "CIF punya koordinat pecahan tetapi tidak punya sel satuan lengkap.",
+ "40": "CIF tidak punya tabel atom_site.",
+ "41": "CIF tidak punya atom yang dapat dibaca.",
+ "42": "File tidak punya rekaman.",
+ "43": "File punya {0} rekaman; impor 3D membaca hingga {1}.",
+ "44": "Tidak ada rekaman file yang dapat dibaca.",
+ "45": "{0} bukan file PDB atau mmCIF.",
+ "46": "{0} tidak dapat diubah menjadi gambar FormChem: {1}.",
+ "47": "Model PDB ditempatkan sebagai objek 3D: {0}.",
+ "48": "Model mmCIF ditempatkan sebagai objek 3D: {0}.",
+ "49": "{0} baris ATOM atau HETATM memiliki koordinat yang tidak terbaca dan dilewati.",
+ "50": "{0} baris atom_site memiliki koordinat yang tidak terbaca dan dilewati.",
+ "51": "CIF molekul kecil: unit asimetrik dibaca dari koordinat pecahan; pasangan simetri tidak dibuat.",
+ "52": "{0} memiliki masalah valensi; dibaca tanpa sanitasi.",
+ "53": "{0} hanya memiliki koordinat 2D; tidak ada konformer yang disimpan.",
+ "54": "{0} hidrogen tidak ada di file dan ditempatkan dari geometri.",
+ "55": "{0} tidak dapat dibaca: {1}",
+ "56": "{0} tidak dapat dibaca.",
+ "57": "Rekaman {0}",
+ "58": "Struktur",
+ "59": "Koordinat 3D file dipertahankan sebagai konformer dari 1 struktur; Bangun 3D tidak diperlukan untuk melihatnya.",
+ "60": "Koordinat 3D file dipertahankan sebagai konformer dari {0} struktur; Bangun 3D tidak diperlukan untuk melihatnya.",
+ "61": "{0} adalah ion tunggal; tidak ada struktur untuk diekstrak.",
+ "62": "Atom {0} tidak dapat dibaca.",
+ "63": "Tidak ada ligan {0} dalam struktur; ligan: {1}.",
+ "64": "Gambar tidak punya model 3D {0}.",
+ "65": "FormChem menempatkan gambar PNG, JPEG, GIF, WebP, dan SVG, spektrum JCAMP-DX, serta file struktur PDB, mmCIF, SDF, dan MOL."
+}
diff --git a/frontend/src/i18n/locales/it/part12.json b/frontend/src/i18n/locales/it/part12.json
new file mode 100644
index 00000000..fd505670
--- /dev/null
+++ b/frontend/src/i18n/locales/it/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spettro",
+ "1": "Disegna o seleziona una struttura da denominare.",
+ "2": "Impossibile calcolare i nomi",
+ "3": "FormChem non ha un nome per questa struttura.",
+ "4": "Copia nome",
+ "5": "Nome copiato: {0}",
+ "6": "Nome chimico da inserire; omettilo per aprire la finestra di dialogo",
+ "7": "Copia come testo semplice il nome della struttura selezionata (o delle strutture della pagina): il nome comune quando FormChem ne conosce uno, altrimenti il nome sistematico, che viene proposto solo se si rilegge nella stessa struttura.",
+ "8": "trivial o systematic per scegliere il nome da copiare; omettilo per il primo",
+ "9": "Lo spettro previsto è aggiornato.",
+ "10": "Aggiorna spettro previsto",
+ "11": "Seleziona prima una struttura",
+ "12": "Seleziona prima uno spettro previsto",
+ "13": "Spettro NMR 1H previsto aggiunto ({0})",
+ "14": "Spettro NMR 13C previsto aggiunto ({0})",
+ "15": "Spettro previsto aggiornato ({0})",
+ "16": "Id del frammento della struttura; per impostazione predefinita la struttura selezionata, o l'unica della pagina",
+ "17": "Frequenza dello spettrometro in MHz (predefinita 400 per 1H, 100 per 13C)",
+ "18": "Aggiunge accanto alla struttura selezionata uno spettro NMR 1H previsto, in un solo passaggio di annullamento: un oggetto spettro calcolato con le regole a incrementi proprie di FormChem (nessun database di spostamenti), i cui multipletti e integrali sono collegati agli atomi della struttura, con un titolo che indica metodo, versione e frequenza. La curva viene ricalcolata dalla struttura, mai memorizzata.",
+ "19": "Aggiunge accanto alla struttura selezionata uno spettro NMR 13C previsto, in un solo passaggio di annullamento: un oggetto spettro calcolato con le regole a incrementi proprie di FormChem (nessun database di spostamenti), i cui picchi sono collegati agli atomi della struttura, con un titolo che indica metodo, versione e frequenza. La curva viene ricalcolata dalla struttura, mai memorizzata.",
+ "20": "Impossibile prevedere lo spettro",
+ "21": "Prevedi spettro NMR 1H",
+ "22": "Prevedi spettro NMR 13C",
+ "23": "Ricalcola i multipletti, gli integrali o i picchi di uno spettro previsto dopo che la sua struttura è cambiata, con la versione attuale del predittore, in un solo passaggio di annullamento; non cambia nulla se è aggiornato.",
+ "24": "Id dello spettro previsto; per impostazione predefinita quello selezionato o quello aperto nell'editor di spettri",
+ "25": "Impossibile aggiornare lo spettro",
+ "26": "Nessun nuovo picco in quell'intervallo.",
+ "27": "Trascina su un intervallo nell'editor di spettri per integrarlo.",
+ "28": "Collega picco ad atomi",
+ "29": "Scollega picco",
+ "30": "Asse Y dello spettro",
+ "31": "Spettro da file...",
+ "32": "Modifica spettro...",
+ "33": "Rileva picchi",
+ "34": "Integra",
+ "35": "Trasmittanza o assorbanza",
+ "36": "Esporta spettro...",
+ "37": "Seleziona prima uno spettro",
+ "38": "nessuno spettro con id {0}",
+ "39": "Picchi rilevati: {0} (già presenti: {1})",
+ "40": "Picchi rilevati: {0}",
+ "41": "Gli integrali riguardano gli spettri NMR",
+ "42": "Seleziona prima un picco, un integrale o un multipletto nell'editor di spettri",
+ "43": "Gli atomi devono appartenere tutti a una sola struttura",
+ "44": "Solo gli spettri IR, Raman e UV-Vis passano da trasmittanza ad assorbanza e viceversa",
+ "45": "Esportato: {0}",
+ "46": "Id dell'oggetto spettro; per impostazione predefinita lo spettro selezionato o quello aperto nell'editor di spettri",
+ "47": "Importa un file di spettro JCAMP-DX nel disegno attivo (un oggetto spettro per blocco di dati, con il file conservato byte per byte), in un solo passaggio di annullamento per file. Senza path apre una finestra di selezione file.",
+ "48": "Percorso assoluto di un file .jdx, .dx o .jcamp",
+ "49": "Impossibile importare lo spettro",
+ "50": "Apre l'editor di spettri per lo spettro selezionato (come il doppio clic su di esso).",
+ "51": "Impossibile aprire lo spettro",
+ "52": "Trova i picchi di uno spettro in un intervallo (per impostazione predefinita quello mostrato) e li aggiunge al suo elenco di picchi, saltando quelli già presenti, in un solo passaggio di annullamento.",
+ "53": "Inizio dell'intervallo nell'unità di x (cm-1, nm, m/z, ppm)",
+ "54": "Fine dell'intervallo nell'unità di x",
+ "55": "Soglia di rilevamento facoltativa in unità di y",
+ "56": "Sostituisci l'elenco di picchi invece di aggiungervi",
+ "57": "Impossibile rilevare i picchi",
+ "58": "Aggiunge un integrale NMR su un intervallo, scalato come gli integrali esistenti (o su value, riscalando gli altri), in un solo passaggio di annullamento. Senza from e to porta l'editor di spettri sul suo strumento di integrazione.",
+ "59": "Inizio dell'intervallo in ppm",
+ "60": "Fine dell'intervallo in ppm",
+ "61": "Valore che questo integrale deve indicare, per esempio un numero di protoni",
+ "62": "Impossibile integrare",
+ "63": "Collega un picco, un integrale o un multipletto ad atomi di una struttura, in un solo passaggio di annullamento. Senza atoms usa gli atomi selezionati, oppure attende che la persona faccia clic sugli atomi nel disegno.",
+ "64": "Id del picco, integrale o multipletto; per impostazione predefinita quello selezionato nell'editor di spettri",
+ "65": "Id della struttura (frammento) a cui appartengono gli atomi",
+ "66": "Id degli atomi",
+ "67": "Impossibile collegare il picco",
+ "68": "Rimuove il collegamento agli atomi di un picco, integrale o multipletto, in un solo passaggio di annullamento.",
+ "69": "Impossibile scollegare il picco",
+ "70": "Mostra uno spettro IR, Raman o UV-Vis come trasmittanza o assorbanza (senza mode passa dall'una all'altra), in un solo passaggio di annullamento.",
+ "71": "Asse Y da mostrare; omettilo per passare dall'uno all'altro",
+ "72": "Impossibile cambiare l'asse Y",
+ "73": "Salva uno spettro come JCAMP-DX (con la sua tabella dei picchi se ne ha) o come CSV di tutti i punti, tramite il motore.",
+ "74": "Formato di file, predefinito jdx",
+ "75": "Con jdx: il file importato originale, intatto",
+ "76": "Percorso assoluto in cui scrivere; omettilo per chiederlo",
+ "77": "Impossibile esportare lo spettro",
+ "78": "Inserisci spettro da file",
+ "79": "Il file non contiene alcuno spettro che FormChem possa disegnare",
+ "80": "Inserisci spettro",
+ "81": "Non è stato possibile posizionare lo spettro: il suo file non è arrivato al disegno.",
+ "82": "Spettri inseriti: {0}",
+ "83": "Lunghezza d'onda (µm)",
+ "84": "Numero d'onda (cm⁻¹)",
+ "85": "Spostamento Raman (cm⁻¹)",
+ "86": "Lunghezza d'onda (nm)",
+ "87": "Frequenza (Hz)",
+ "88": "δ (ppm)",
+ "89": "Trasmittanza (%)",
+ "90": "Trasmittanza",
+ "91": "Assorbanza",
+ "92": "Abbondanza relativa (%)",
+ "93": "Intensità",
+ "94": "NMR {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Previsto: {0}, {1} MHz ({2})",
+ "100": "Previsto: {0}, {1} MHz",
+ "101": "Previsto: {0} ({1})",
+ "102": "Previsto: {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spettro non disponibile: {0}",
+ "105": "Caricamento dello spettro",
+ "106": "Nome comune",
+ "107": "Sistematico",
+ "108": "Affidabilità alta",
+ "109": "Affidabilità media",
+ "110": "Affidabilità bassa",
+ "111": "Non letto",
+ "112": "Nomi FormChem",
+ "113": "Impossibile leggere il nome",
+ "114": "Inserisci struttura da nome",
+ "115": "Struttura da nome",
+ "116": "Un nome, come aspirina o 2-metilpropan-1-olo",
+ "117": "Nome chimico",
+ "118": "Digita un nome per vederne la struttura.",
+ "119": "Nessuna struttura per questo nome",
+ "120": "Dizionario",
+ "121": "Parser sistematico",
+ "122": "Generatore di nomi basato su regole, verificato con andata e ritorno",
+ "123": "Strumenti per lo spettro",
+ "124": "Mostra l'intero spettro",
+ "125": "Asse Y",
+ "126": "Mostra questo intervallo sulla pagina",
+ "127": "Fai doppio clic su uno spettro nel disegno per modificarlo qui.",
+ "128": "Picchi e integrali",
+ "129": "Previsto",
+ "130": "Valore dell'integrale",
+ "131": "Collega ad atomi",
+ "132": "Scollega",
+ "133": "1 atomo",
+ "134": "Atomi da collegare",
+ "135": "Fai clic su altri atomi, poi su Fine.",
+ "136": "Fai clic nel disegno sugli atomi che appartengono a questo picco, poi su Fine.",
+ "137": "Niente da integrare in quell'intervallo.",
+ "138": "Rimuovi picco",
+ "139": "Aggiungi picco",
+ "140": "Collegato a 1 atomo",
+ "141": "Imposta intervallo dello spettro",
+ "142": "Digita un numero positivo.",
+ "143": "Impossibile impostare l'integrale",
+ "144": "Sposta e zoom: trascina per spostare, rotellina per lo zoom, Shift-trascina per ingrandire un intervallo",
+ "145": "Ingrandisci un intervallo: trascina sul grafico",
+ "146": "Rileva picchi: trascina su un intervallo",
+ "147": "Aggiungi o rimuovi un picco: fai clic vicino a un picco",
+ "148": "Integra: trascina su un intervallo",
+ "149": "Picco",
+ "150": "Integrale",
+ "151": "Multipletto",
+ "152": "{0} atomi",
+ "153": "Collegato a {0}",
+ "154": "Trascina per spostare, rotellina per lo zoom, Shift-trascina per ingrandire un intervallo. Fai clic su un'etichetta per selezionarla.",
+ "155": "Trascina sul grafico per ingrandire quell'intervallo.",
+ "156": "Trascina su un intervallo per rilevarne i picchi.",
+ "157": "Fai clic vicino a un picco per aggiungerlo; fai clic sull'etichetta di un picco per rimuoverlo.",
+ "158": "Trascina su un intervallo per integrarlo.",
+ "159": "Collegato a {0} atomi"
+}
diff --git a/frontend/src/i18n/locales/it/part13.json b/frontend/src/i18n/locales/it/part13.json
new file mode 100644
index 00000000..776444f9
--- /dev/null
+++ b/frontend/src/i18n/locales/it/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "il motore ha restituito un file vuoto",
+ "1": "il nome è più lungo di {0} caratteri",
+ "2": "i frammenti con più di {0} atomi non vengono denominati",
+ "3": "La struttura contiene etichette, gruppi R o atomi qualsiasi, che non hanno un nome.",
+ "4": "Non è stato possibile leggere la struttura come molecola (controlla le valenze).",
+ "5": "Non c'è alcuna struttura da denominare.",
+ "6": "I nomi a indice invertito (prima il capostipite, poi una virgola e i sostituenti) non vengono letti; scrivi il nome nell'ordine normale, per esempio 1,2-diclorobenzene.",
+ "7": "D- e L- vengono letti solo per gli amminoacidi e gli zuccheri del dizionario di FormChem; per gli altri nomi indica i descrittori R o S.",
+ "8": "FormChem ha letto tutto il nome, ma non forma un nome di struttura completo (potrebbe mancare un capostipite come esano o benzene, oppure un suffisso).",
+ "9": "FormChem non è riuscito a leggere il nome dal carattere {0} (\"{1}\").",
+ "10": "FormChem ha letto il nome, ma {0}.",
+ "11": "non è stato possibile completare la struttura",
+ "12": "Il nome può essere letto in più modi; FormChem ha disegnato la lettura con il minor numero di ipotesi.",
+ "13": "Il nome non indica descrittori stereo, quindi stereocentri e doppi legami vengono disegnati non specificati.",
+ "14": "Nessun nome sistematico: {0}.",
+ "15": "Il nome sistematico costruito da FormChem non si rileggeva nella stessa struttura, quindi non viene mostrato.",
+ "16": "quel doppio legame non può essere E o Z",
+ "17": "il localizzatore del descrittore {0} non è una posizione del capostipite",
+ "18": "la posizione {0} non inizia un doppio legame che possa essere E o Z",
+ "19": "{0} richiede esattamente un doppio legame che possa essere cis o trans; questa struttura ne ha {1}",
+ "20": "{0} non è chiaro per questo doppio legame; indica invece E o Z",
+ "21": "({0}) richiede un localizzatore: la struttura ha {1} stereocentri",
+ "22": "la posizione {0} non è uno stereocentro, quindi ({1}) non si può applicare",
+ "23": "({0}) richiede un localizzatore: la struttura ha {1} doppi legami che possono essere E o Z",
+ "24": "la posizione {0} non può ricevere questo descrittore: {1}",
+ "25": "quel doppio legame non può ricevere questo descrittore: {0}",
+ "26": "{0} non dice quale configurazione si intenda, quindi la struttura viene disegnata senza stereochimica.",
+ "27": "{0} non ha un punto di attacco",
+ "28": "non c'è spazio per {0} alla {1}",
+ "29": "{0} non può legarsi lì",
+ "30": "le catene con più di {0} atomi di carbonio non vengono ancora lette",
+ "31": "{0} è troppo piccolo per essere un anello",
+ "32": "{0}-{1} è un tautomero che FormChem non disegna ancora a partire da un nome",
+ "33": "il localizzatore {0} non è una posizione di {1}",
+ "34": "{0} non è una posizione della catena",
+ "35": "un legame multiplo non può iniziare qui: posizione {0} di {1}",
+ "36": "la posizione {0} di {1} non può portare quel legame multiplo",
+ "37": "non c'è spazio per un legame multiplo alla posizione {0} di {1}",
+ "38": "non c'è spazio per i legami multipli di {0}",
+ "39": "Le posizioni dei legami multipli di {0} non sono state indicate; disegnati alle posizioni più basse.",
+ "40": "-{0} richiede una catena aperta; su un anello il suffisso è carbaldeide, acido carbossilico, carbonitrile o carbossammide",
+ "41": "una catena ha solo due estremità per -{0}",
+ "42": "{0} è troppo corto per due gruppi -{1}",
+ "43": "non c'è spazio per -{0} su {1}",
+ "44": "La posizione di -{0} su {1} non è stata indicata; disegnato alla posizione più bassa.",
+ "45": "-{0} deve stare alla fine della catena, non alla {1}",
+ "46": "non c'è spazio per -{0} alla {1}",
+ "47": "ortho, meta e para richiedono un anello benzenico",
+ "48": "ortho, meta o para con un solo gruppo richiede un capostipite come fenolo, anilina o toluene",
+ "49": "non c'è spazio per {0} su {1}",
+ "50": "non c'è spazio per {0} gruppi {1} su {2}",
+ "51": "La posizione di {0} su {1} non è stata indicata; disegnato alla posizione libera più bassa.",
+ "52": "{0} non può portare sostituenti",
+ "53": "un gruppo acile si attacca dal suo carbonio carbonilico",
+ "54": "{0} non ha posizioni libere",
+ "55": "La posizione di attacco di {0} non è stata indicata; si presume la posizione {1}.",
+ "56": "{0} non ha più spazio per attaccarsi",
+ "57": "i localizzatori {0} prima di {1} non vengono usati",
+ "58": "{0} non può stare come parola separata",
+ "59": "\"{0}\" richiede {1} gruppo prima di sé, il nome ne indica {2}",
+ "60": "\"{0}\" richiede {1} gruppi prima di sé, il nome ne indica {2}",
+ "61": "il nome indica {0} gruppo alchilico per {1} posizione dell'estere",
+ "62": "il nome indica {0} gruppo alchilico per {1} posizioni dell'estere",
+ "63": "il nome indica {0} gruppi alchilici per {1} posizione dell'estere",
+ "64": "il nome indica {0} gruppi alchilici per {1} posizioni dell'estere",
+ "65": "la struttura che descrive non è valida ({0})",
+ "66": "-one alla {0} sarebbe un'aldeide; un'aldeide si denomina con -al",
+ "67": "posizione {0} di {1}",
+ "68": "troppi sostituenti identici",
+ "69": "localizzatori misti",
+ "70": "i tipi di legame insoliti non vengono ancora denominati",
+ "71": "un sistema ad anelli che FormChem non sa ancora denominare",
+ "72": "gli anelli aromatici con doppi legami esociclici (come i piridoni) non vengono ancora denominati",
+ "73": "isotopi e radicali non vengono ancora denominati",
+ "74": "gli alogeni ipervalenti non vengono denominati",
+ "75": "i gruppi azotati carichi diversi dal nitro non vengono ancora denominati",
+ "76": "gli atomi carichi non vengono ancora denominati",
+ "77": "gli ossidi di zolfo, azoto e fosforo non vengono ancora denominati",
+ "78": "questo gruppo ossigenato non viene ancora denominato",
+ "79": "solfossidi, solfoni e altri gruppi dello zolfo non vengono ancora denominati",
+ "80": "immine, composti azo e gruppi azotati simili non vengono ancora denominati",
+ "81": "{0} non viene ancora denominato",
+ "82": "le catene di sostituenti con più di 20 atomi di carbonio non vengono denominate",
+ "83": "i gruppi acilici insaturi non vengono ancora denominati",
+ "84": "i gruppi ilidene sostituiti non vengono ancora denominati",
+ "85": "i gruppi ilidene ciclici non vengono ancora denominati",
+ "86": "gli anelli attaccati due volte non vengono ancora denominati",
+ "87": "nessuna numerazione trovata per un sostituente su anello",
+ "88": "gli esteri con parti alcoliche diverse non vengono ancora denominati",
+ "89": "nessuna catena o anello capostipite trovato",
+ "90": "gli esteri ciclici (lattoni) non vengono ancora denominati",
+ "91": "i sostituenti su più di un azoto di ammina o ammide non vengono ancora denominati",
+ "92": "gli stereocentri fuori dalla catena o dall'anello capostipite non vengono ancora denominati",
+ "93": "la geometria dei doppi legami fuori dalla catena capostipite non viene ancora denominata",
+ "94": "i centri pseudoasimmetrici non vengono ancora denominati",
+ "95": "questa geometria del doppio legame non viene ancora denominata",
+ "96": "le catene con più di 20 atomi di carbonio non vengono denominate",
+ "97": "troppi gruppi identici",
+ "98": "la struttura ha errori di valenza",
+ "99": "sali e miscele non vengono ancora denominati in modo sistematico",
+ "100": "le strutture con più di {0} atomi pesanti non vengono ancora denominate in modo sistematico",
+ "101": "i composti di {0} non vengono ancora denominati in modo sistematico",
+ "102": "gli atomi query e i gruppi R non hanno un nome",
+ "103": "gli idruri di un singolo eteroatomo vengono denominati solo dal dizionario",
+ "104": "{0} non è un oggetto di questo disegno.",
+ "105": "{0} non ha atomi.",
+ "106": "Il frammento non ha atomi.",
+ "107": "Il disegno non ha una pagina.",
+ "108": "{0} non è uno spettro di questo disegno.",
+ "109": "La struttura {0} a cui appartiene questa previsione non è più nel disegno.",
+ "110": "Il disegno {0} è stato chiuso.",
+ "111": "Spostamento chimico (ppm)",
+ "112": "Tempo (s)",
+ "113": "Riflettanza",
+ "114": "Abbondanza relativa",
+ "115": "##{0}= compare più di una volta; è stato mantenuto il primo valore.",
+ "116": "##XYDATA={0} non è un elenco di variabili noto; è stato letto come (X++(Y..Y)).",
+ "117": "##{0}={1} non è un elenco di variabili noto; è stato letto come (XY..XY).",
+ "118": "I punti non erano in ordine di x e sono stati ordinati.",
+ "119": "##.SHIFT REFERENCE={0} non è stato letto; gli spostamenti non sono stati riferiti.",
+ "120": "##.SHIFT REFERENCE indica il punto {0}, fuori dai {1} punti; gli spostamenti non sono stati riferiti.",
+ "121": "Gli spostamenti sono stati riferiti in modo che il punto {0} indichi {1} ppm ({2}).",
+ "122": "Il file non indica il nucleo osservato.",
+ "123": "Questi sono dati NMR nel dominio del tempo (un FID); vengono mostrati come acquisiti, senza trasformata di Fourier.",
+ "124": "Le frequenze in Hz sono state divise per la frequenza di osservazione ({0} MHz) per ottenere i ppm.",
+ "125": "Non c'è alcun ##.SHIFT REFERENCE; 0 Hz è stato preso come 0 ppm.",
+ "126": "Non c'è alcun ##.OBSERVE FREQUENCY, quindi l'asse degli spostamenti resta in Hz.",
+ "127": "La trasmittanza era memorizzata come frazione e viene mostrata in percentuale.",
+ "128": "Il blocco {0} contiene più di {1} punti.",
+ "129": "##DATA TYPE={0} con unità di x {1} non indica alcuna tecnica nota; viene disegnato come spettro semplice.",
+ "130": "##BLOCKS={0} ma il blocco LINK contiene {1} blocchi; sono stati letti tutti i blocchi trovati.",
+ "131": "Questo non è un file JCAMP-DX: non ha un record ##TITLE=.",
+ "132": "Il file contiene {0} blocchi uno dopo l'altro senza un blocco LINK; ciascuno è stato letto.",
+ "133": "Due blocchi condividono lo stesso ##BLOCK_ID.",
+ "134": "Il file non contiene alcuno spettro che FormChem possa disegnare ({0}).",
+ "135": "Il blocco \"{0}\" non è stato disegnato: {1}.",
+ "136": "un blocco di struttura (JCAMP-CS); resta nel file ma non viene disegnato",
+ "137": "non contiene XYDATA, XYPOINTS, PEAK TABLE né NTUPLES",
+ "138": "la sua tabella di dati non contiene punti",
+ "139": "la sua tabella NTUPLES non dichiara simboli",
+ "140": "gli spettri NTUPLES 2D non sono ancora supportati",
+ "141": "la sua tabella NTUPLES non ha pagine leggibili",
+ "142": "Il file contiene caratteri fuori da ASCII; è stato letto come UTF-8.",
+ "143": "Il file contiene byte che non sono né ASCII né UTF-8; è stato letto come Latin-1.",
+ "144": "Le righe fuori da qualsiasi record di dati etichettato sono state ignorate.",
+ "145": "Un ##END= senza un blocco prima è stato ignorato.",
+ "146": "I record prima del primo ##TITLE= o dopo l'ultimo ##END= sono stati ignorati.",
+ "147": "Il file termina senza ##END=; i blocchi aperti sono stati chiusi.",
+ "148": "Pagina NTUPLES {0}",
+ "149": "La pagina NTUPLES {0} non ha ##DATA TABLE=; è stata saltata.",
+ "150": "La pagina NTUPLES {0} usa simboli ({1}) non dichiarati in ##SYMBOL=; è stata saltata.",
+ "151": "{0} ha una forma di tabella di dati che FormChem non legge ({1}); è stata saltata.",
+ "152": "La tabella NTUPLES non ha ##END NTUPLES=; è stata letta fino alla fine del blocco.",
+ "153": "La tabella NTUPLES non ha un elenco ##SYMBOL=.",
+ "154": "Questo è uno spettro 2D (due variabili indipendenti); gli spettri 2D non vengono disegnati in questa versione.",
+ "155": "La tabella NTUPLES ha {0} pagine; sono state lette solo le prime {1}.",
+ "156": "La pagina immaginaria non condivide i valori di x della pagina reale; è stata esclusa.",
+ "157": "La tabella NTUPLES contiene {0} pagine; viene mostrata la pagina {1} e {2} altre pagine sono state escluse.",
+ "158": "##DELTAX={0} differisce da (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; viene usata la spaziatura calcolata.",
+ "159": "{0} non ha FIRSTX, LASTX e NPOINTS completi; la spaziatura deriva da ##DELTAX.",
+ "160": "Una riga di dati iniziava con un valore DIF; prosegue dall'ultimo valore della riga precedente.",
+ "161": "Un valore di controllo Y non corrispondeva all'ultimo valore della riga precedente; la riga è stata proseguita dal valore precedente.",
+ "162": "{0} caratteri in {1} non sono stati letti e sono stati saltati.",
+ "163": "{0} righe DIF non erano seguite da un valore di controllo Y.",
+ "164": "{0} non contiene punti dati.",
+ "165": "{0} contiene {1} punti ma ##NPOINTS={2}; i valori X delle righe corrispondono a {3} punti da FIRSTX a LASTX, quindi è stata usata quella spaziatura.",
+ "166": "{0} contiene {1} punti ma ##NPOINTS={2}; i punti letti sono stati mantenuti.",
+ "167": "Il valore X di una riga non corrisponde alla sua posizione calcolata da FIRSTX e dalla spaziatura; è stata usata la posizione.",
+ "168": "{0} non ha FIRSTX, LASTX e NPOINTS; la spaziatura è stata ricavata dai valori X delle righe.",
+ "169": "{0} non indica come collocare i suoi punti sull'asse x; sono stati numerati 0, 1, 2 e così via.",
+ "170": "La prima riga inizia a x = {0} ma ##FIRSTX={1}; è stato usato FIRSTX.",
+ "171": "Il primo valore Y {0} non corrisponde a ##FIRSTY={1}.",
+ "172": "{0} termina con un gruppo incompleto di {1} valori; è stato scartato.",
+ "173": "Impossibile leggere {0}: {1}.",
+ "174": "Lo spettro richiede il blocco {0}, ma il suo file contiene 1 blocco.",
+ "175": "Lo spettro richiede il blocco {0}, ma il suo file contiene {1} blocchi.",
+ "176": "Lo spettro non ha una sorgente.",
+ "177": "Il file {0} dello spettro non è nel disegno.",
+ "178": "In questo motore non è disponibile alcun predittore per {0}.",
+ "179": "La previsione non è riuscita: {0}",
+ "180": "La sorgente dello spettro non è né un file né una previsione.",
+ "181": "Il disegno non ha lo spettro {0}.",
+ "182": "Gli spettri a barre non hanno aree da integrare.",
+ "183": "il valore deve essere maggiore di zero.",
+ "184": "from e to devono essere due valori di x diversi.",
+ "185": "Lo spettro non ha l'integrale {0}.",
+ "186": "Questo spettro non ha un file originale; esportalo senza original=1.",
+ "187": "FormChem inserisce immagini PNG, JPEG, GIF, WebP e SVG e spettri JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/it/part14.json b/frontend/src/i18n/locales/it/part14.json
new file mode 100644
index 00000000..45d19e03
--- /dev/null
+++ b/frontend/src/i18n/locales/it/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Visualizzazione",
+ "1": "Superficie",
+ "2": "Niente da esportare: la vista 3D è vuota.",
+ "3": "Esportazione non riuscita",
+ "4": "Seleziona una struttura da mostrare in 3D.",
+ "5": "Costruisci 3D",
+ "6": "Inserisci vista 3D",
+ "7": "Scegli un file PDB, mmCIF, SDF o MOL.",
+ "8": "Impossibile posizionare la struttura 3D sulla pagina",
+ "9": "Seleziona un oggetto 3D aperto da un file PDB o mmCIF.",
+ "10": "Questo modello non ha ligandi.",
+ "11": "Impossibile estrarre il ligando",
+ "12": "Ancora nessuna coordinata 3D: Costruisci 3D crea un conformero dal disegno.",
+ "13": "File di struttura 3D...",
+ "14": "Estrai ligando...",
+ "15": "Esporta struttura 3D...",
+ "16": "Scansione diedra...",
+ "17": "Misura in 3D",
+ "18": "Esporta vista 3D come PNG...",
+ "19": "Esporta vista 3D come glTF...",
+ "20": "Estratto {0}: {1} (ordini di legame dedotti)",
+ "21": "Estratto {0}: {1}",
+ "22": "Apri prima la vista 3D",
+ "23": "Apre il pannello Vista 3D sulla struttura selezionata (o sull'oggetto 3D selezionato della pagina) e segue la selezione. Una struttura ha prima bisogno di coordinate 3D: Costruisci 3D le crea.",
+ "24": "Costruisce un conformero 3D della struttura selezionata dal suo disegno 2D (cunei, geometria dei doppi legami e cariche mantenuti), lo minimizza con il campo di forza scelto e lo memorizza nel disegno in un solo passaggio di annullamento; la vista 3D lo mostra.",
+ "25": "Minimizza il conformero mostrato della struttura selezionata con il campo di forza scelto nella vista 3D (MMFF94 per impostazione predefinita, UFF quando MMFF94 non ha parametri) e riporta l'energia prima e dopo, in un solo passaggio di annullamento.",
+ "26": "Genera un insieme di conformeri della struttura selezionata (ETKDG, sfoltito per RMSD, ciascuno minimizzato) e tiene quelli entro una finestra di energia; con n, window e method viene eseguito senza la finestra di dialogo.",
+ "27": "Conformeri da generare",
+ "28": "Finestra di energia in kcal/mol",
+ "29": "Colloca una vista 3D della struttura selezionata sulla pagina accanto ad essa (costruendo prima le coordinate 3D se non ne ha) e apre il pannello Vista 3D legato ad essa; ruotare o cambiare lo stile del modello aggiorna l'immagine sulla pagina.",
+ "30": "Apre un file PDB, mmCIF, SDF o MOL come oggetto 3D sulla pagina (proteine a nastro, ligandi a sfere e bastoncini, acque nascoste, ligando a fuoco) e lo mostra nella vista 3D.",
+ "31": "Trasforma un ligando dell'oggetto 3D selezionato (aperto da un file PDB o mmCIF) in una struttura 2D accanto ad esso in un solo passaggio di annullamento: ordini di legame da un modello integrato per i ligandi comuni, altrimenti dedotti dalla geometria e segnalati; le coordinate del file diventano il suo conformero. Con ligand prende quello; senza, lo chiede quando il modello ne ha più di uno.",
+ "32": "Chiave del ligando catena:het:numero, oppure un codice het",
+ "33": "Seleziona un oggetto 3D aperto da un file PDB o mmCIF",
+ "34": "Salva le coordinate 3D della struttura selezionata con tutti gli idrogeni: molfile MDL (il conformero mostrato), file SD (ogni conformero, con campi dati di energia e metodo), PDB o XYZ (il conformero mostrato, o ogni conformero come modelli o fotogrammi); un oggetto 3D aperto da un file PDB o mmCIF salva il suo file originale. Senza format lo chiede.",
+ "35": "Formato del file",
+ "36": "Ogni conformero invece di quello mostrato (predefinito true per sdf)",
+ "37": "Esegue la scansione del diedro dei quattro atomi scelti nella vista 3D (o della sua ultima misura di diedro) con minimizzazione rilassata e traccia l'angolo rispetto all'energia.",
+ "38": "Misura una distanza (due atomi), un angolo (tre) o un diedro (quattro) nella vista 3D e lo elenca; con atoms (id di atomi del frammento come a1, idrogeni come a1:h0, o numeri seriali PDB) misura quelli, altrimenti passa alla selezione.",
+ "39": "Da due a quattro id di atomi",
+ "40": "Salva la vista 3D come immagine PNG alla sua dimensione sullo schermo; transparent omette lo sfondo.",
+ "41": "Salva la vista 3D come file glTF 2.0 binario (.glb): atomi come sfere e legami come cilindri con i colori degli elementi, 1 ångström = 1 cm, per visualizzatori 3D, diapositive e stampa.",
+ "42": "Nessuna superficie",
+ "43": "Rimuove la superficie molecolare dalla vista 3D.",
+ "44": "Superficie di van der Waals",
+ "45": "Mostra la superficie di van der Waals nella vista 3D.",
+ "46": "Superficie accessibile al solvente",
+ "47": "Mostra la superficie accessibile al solvente (sonda da 1,4 ångström) nella vista 3D.",
+ "48": "Superficie esclusa dal solvente",
+ "49": "Mostra la superficie esclusa dal solvente nella vista 3D.",
+ "50": "Superficie ESP",
+ "51": "Colora la superficie secondo un potenziale elettrostatico approssimato ricavato dalle cariche parziali empiriche del motore (rosso negativo, blu positivo), con una legenda che indica il metodo.",
+ "52": "Mostra la vista 3D in stile a fili; per un oggetto 3D sulla pagina la scelta viene salvata con esso.",
+ "53": "Mostra la vista 3D in stile a bastoncini; per un oggetto 3D sulla pagina la scelta viene salvata con esso.",
+ "54": "Sfere e bastoncini",
+ "55": "Mostra la vista 3D in stile sfere e bastoncini; per un oggetto 3D sulla pagina la scelta viene salvata con esso.",
+ "56": "Spazio pieno",
+ "57": "Mostra la vista 3D in stile a spazio pieno; per un oggetto 3D sulla pagina la scelta viene salvata con esso.",
+ "58": "Cartoon",
+ "59": "Mostra la vista 3D in stile cartoon (proteine e acidi nucleici; i ligandi restano a sfere e bastoncini); per un oggetto 3D sulla pagina la scelta viene salvata con esso.",
+ "60": "Angolo diedro (gradi)",
+ "61": "Energia relativa (kcal/mol)",
+ "62": "Minimo {0}°",
+ "63": "Esporta struttura 3D",
+ "64": "Ogni conformero (record SDF, modelli PDB, fotogrammi XYZ)",
+ "65": "1 conformero memorizzato; ogni idrogeno viene scritto con la sua posizione 3D.",
+ "66": "Estrai ligando",
+ "67": "Ligando",
+ "68": "Il ligando diventa una struttura 2D accanto al modello, con le sue coordinate dal file mantenute come suo conformero.",
+ "69": "Estrai",
+ "70": "File SD (.sdf)",
+ "71": "Molfile MDL (.mol)",
+ "72": "{0} conformeri memorizzati; ogni idrogeno viene scritto con la sua posizione 3D.",
+ "73": "Conformeri",
+ "74": "Finestra di energia (kcal/mol)",
+ "75": "Embedding ETKDG con seed fisso, quasi duplicati sfoltiti a 0,5 Å di RMSD sugli atomi pesanti, ciascuno minimizzato; il più basso diventa il conformero mostrato.",
+ "76": "Genera",
+ "77": "Profilo energetico della scansione diedra",
+ "78": "Scansione diedra",
+ "79": "Da (gradi)",
+ "80": "A (gradi)",
+ "81": "Passo (gradi)",
+ "82": "Conserva ogni punto come conformero (un solo passaggio di annullamento)",
+ "83": "Esegui scansione",
+ "84": "Una scansione rilassata: a ogni angolo il diedro viene mantenuto e tutto il resto viene minimizzato.",
+ "85": "L'angolo finale deve essere maggiore dell'angolo iniziale.",
+ "86": "Scansione in corso...",
+ "87": "Scansione non riuscita",
+ "88": "barriera {0} kcal/mol",
+ "89": "Stile di visualizzazione",
+ "90": "Colora la superficie secondo il potenziale elettrostatico ricavato da cariche parziali empiriche",
+ "91": "ESP",
+ "92": "Minimizza",
+ "93": "Scansione...",
+ "94": "Metti a fuoco il ligando",
+ "95": "Reimposta vista",
+ "96": "Rotazione",
+ "97": "Esporta la vista 3D",
+ "98": "Misura",
+ "99": "Misure",
+ "100": "Immagine PNG",
+ "101": "Immagine PNG, trasparente",
+ "102": "glTF binario (.glb)",
+ "103": "Il 3D richiede WebGL, che questa finestra non offre.",
+ "104": "Caricamento del visualizzatore 3D...",
+ "105": "Impossibile caricare il visualizzatore 3D",
+ "106": "Apri un disegno e seleziona una struttura per vederla in 3D.",
+ "107": "Seleziona una struttura sulla pagina per vederla in 3D.",
+ "108": "Impossibile leggere la struttura 3D",
+ "109": "Questo conformero non può essere scritto come molfile",
+ "110": "La rotazione è disattivata: il sistema richiede un movimento ridotto",
+ "111": "Un modello PDB o CIF non ha conformeri.",
+ "112": "Energie relative alla più bassa; fai clic su una per mostrarla.",
+ "113": "Costruisci 3D o Conformeri... riempie questo elenco.",
+ "114": "Cariche parziali non disponibili",
+ "115": "il motore non ha ancora route 3D",
+ "116": "non convergente",
+ "117": "Scegli quattro atomi legati in fila (un diedro), poi avvia la scansione.",
+ "118": "Spunta Conserva ogni punto come conformero per vedere le geometrie.",
+ "119": "Mostra conformero",
+ "120": "Aggiorna vista 3D",
+ "121": "Impossibile aggiornare l'istantanea della pagina",
+ "122": "Nessuna superficie",
+ "123": "Van der Waals",
+ "124": "Accessibile al solvente",
+ "125": "Esclusa dal solvente",
+ "126": "Distanza",
+ "127": "Angolo",
+ "128": "Diedro",
+ "129": "{0} kcal/mol, {1}, non convergente",
+ "130": "Scelti {0} / {1}: {2}",
+ "131": "Fai clic su {0} atomi per misurare",
+ "132": "ESP ({0}): {1}, rosso {2} e fino a blu +{3} e",
+ "133": "Distanza {0}: {1}",
+ "134": "Angolo {0}: {1}",
+ "135": "Diedro {0}: {1}",
+ "136": "Costruito: {0}",
+ "137": "Minimizzato: {0}",
+ "138": "Conformeri conservati: {0} su {1}",
+ "139": "Conformeri conservati: {0}",
+ "140": "Diedro {0}",
+ "141": "Codifica PNG non riuscita"
+}
diff --git a/frontend/src/i18n/locales/it/part15.json b/frontend/src/i18n/locales/it/part15.json
new file mode 100644
index 00000000..7c7d7754
--- /dev/null
+++ b/frontend/src/i18n/locales/it/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "approssimato, da cariche empiriche",
+ "1": "{0} stereocentri o doppi legami non erano specificati; è stata scelta una configurazione.",
+ "2": "{0} etichette stereo del disegno non vengono riprodotte in 3D.",
+ "3": "È stato costruito il membro disegnato dei gruppi stereo avanzati {0}; il modello 3D è uno stereoisomero della miscela (relativa o racemica) descritta dal disegno.",
+ "4": "Embedding ripetuto {0} volte (seed {1}) per mantenere la stereochimica disegnata.",
+ "5": "{0} coppie di atomi pesanti sono più vicine di {1} del loro contatto di van der Waals.",
+ "6": "Campo di forza universale usato: {0}.",
+ "7": "nessun parametro {0} per {1}",
+ "8": "{0} non ha potuto tipizzare ogni atomo",
+ "9": "{0} conformeri hanno cambiato la stereochimica disegnata durante la minimizzazione e sono stati esclusi.",
+ "10": "Più di 300 atomi pesanti: la qualità del campionamento dei conformeri cala a queste dimensioni.",
+ "11": "Il legame centrale è in un anello; l'anello viene tensionato per seguire l'angolo.",
+ "12": "La struttura non aveva coordinate 3D; la scansione è partita da un nuovo embedding.",
+ "13": "La struttura è cambiata mentre veniva calcolato il 3D; esegui di nuovo il comando.",
+ "14": "Il disegno non ha l'oggetto {0}.",
+ "15": "{0} non ha ancora coordinate 3D; costruisci prima il 3D.",
+ "16": "{0} non ha il conformero {1}.",
+ "17": "La struttura non ha atomi.",
+ "18": "Il 3D richiede atomi reali: {0} atomi sono etichette, gruppi R o punti di attacco ({1}).",
+ "19": "Impossibile aggiungere gli idrogeni: {0}",
+ "20": "La struttura ha {0} atomi con idrogeni; il 3D ne gestisce fino a {1}.",
+ "21": "Le coordinate 3D non corrispondono a questa struttura (niente per {0}); costruisci di nuovo il 3D.",
+ "22": "Le coordinate 3D non corrispondono a questa struttura (il numero di idrogeni è cambiato); costruisci di nuovo il 3D.",
+ "23": "Impossibile eseguire l'embedding della struttura in 3D: {0}",
+ "24": "Impossibile eseguire l'embedding della struttura in 3D; controlla valenze e stereochimica.",
+ "25": "Impossibile eseguire l'embedding dei conformeri: {0}",
+ "26": "Non è stato possibile eseguire l'embedding di alcun conformero; controlla valenze e stereochimica della struttura.",
+ "27": "Ogni conformero incorporato ha perso la stereochimica disegnata dopo la minimizzazione.",
+ "28": "Nessun campo di forza ha parametri per questa struttura ({0}).",
+ "29": "Impossibile configurare il campo di forza universale: {0}",
+ "30": "Impossibile configurare il campo di forza universale.",
+ "31": "Atomi sconosciuti {0}; usa id di atomi del frammento o un idrogeno come a1:h0.",
+ "32": "I quattro atomi devono essere diversi.",
+ "33": "I quattro atomi devono formare una catena di legami (a1-a2-a3-a4).",
+ "34": "Impossibile scrivere il file 3D: {0}",
+ "35": "Il file non è un file PDB, mmCIF, SDF o MOL che FormChem possa leggere.",
+ "36": "Il file ha più di {0} atomi.",
+ "37": "Il file PDB non ha record ATOM o HETATM.",
+ "38": "La tabella atom_site del mmCIF non ha le colonne Cartn_x, Cartn_y e Cartn_z.",
+ "39": "Il CIF ha coordinate frazionarie ma nessuna cella unitaria completa.",
+ "40": "Il CIF non ha una tabella atom_site.",
+ "41": "Il CIF non ha atomi leggibili.",
+ "42": "Il file non ha record.",
+ "43": "Il file ha {0} record; l'importazione 3D ne legge fino a {1}.",
+ "44": "Nessun record del file è stato letto.",
+ "45": "{0} non è un file PDB o mmCIF.",
+ "46": "{0} non ha potuto essere trasformato in un disegno FormChem: {1}.",
+ "47": "Modello PDB collocato come oggetto 3D: {0}.",
+ "48": "Modello mmCIF collocato come oggetto 3D: {0}.",
+ "49": "{0} righe ATOM o HETATM avevano coordinate illeggibili e sono state saltate.",
+ "50": "{0} righe atom_site avevano coordinate illeggibili e sono state saltate.",
+ "51": "CIF di piccola molecola: l'unità asimmetrica viene letta dalle coordinate frazionarie; i partner di simmetria non vengono generati.",
+ "52": "{0} ha problemi di valenza; la lettura è avvenuta senza sanificazione.",
+ "53": "{0} ha solo coordinate 2D; nessun conformero è stato conservato.",
+ "54": "{0} idrogeni non erano nel file e sono stati collocati in base alla geometria.",
+ "55": "Impossibile leggere {0}: {1}",
+ "56": "Impossibile leggere {0}.",
+ "57": "Record {0}",
+ "58": "La struttura",
+ "59": "Le coordinate 3D del file sono state conservate come conformero di 1 struttura; Costruisci 3D non serve per vederle.",
+ "60": "Le coordinate 3D del file sono state conservate come conformero di {0} strutture; Costruisci 3D non serve per vederle.",
+ "61": "{0} è uno ione singolo; non c'è alcuna struttura da estrarre.",
+ "62": "Impossibile leggere gli atomi di {0}.",
+ "63": "Nessun ligando {0} nella struttura; ligandi: {1}.",
+ "64": "Il disegno non ha il modello 3D {0}.",
+ "65": "FormChem inserisce immagini PNG, JPEG, GIF, WebP e SVG, spettri JCAMP-DX e file di struttura PDB, mmCIF, SDF e MOL."
+}
diff --git a/frontend/src/i18n/locales/ja/part12.json b/frontend/src/i18n/locales/ja/part12.json
new file mode 100644
index 00000000..256400f3
--- /dev/null
+++ b/frontend/src/i18n/locales/ja/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "スペクトル",
+ "1": "名前を付ける構造を描くか選択してください。",
+ "2": "名前を算出できませんでした",
+ "3": "FormChem にはこの構造の名前がありません。",
+ "4": "名前をコピー",
+ "5": "コピーした名前: {0}",
+ "6": "挿入する化学名。省略するとダイアログを開きます",
+ "7": "選択した構造(またはページ上の構造)の名前をプレーンテキストとしてコピーします。FormChem が慣用名を知っている場合は慣用名、そうでない場合は系統名です。系統名は、同じ構造に読み戻せる場合にのみ提供されます。",
+ "8": "コピーする名前を trivial または systematic で選択します。省略すると最初の名前になります",
+ "9": "予測スペクトルは最新の状態です。",
+ "10": "予測スペクトルを更新",
+ "11": "先に構造を 1 つ選択してください",
+ "12": "先に予測スペクトルを選択してください",
+ "13": "予測 1H NMR スペクトルを追加しました ({0})",
+ "14": "予測 13C NMR スペクトルを追加しました ({0})",
+ "15": "予測スペクトルを更新しました ({0})",
+ "16": "構造のフラグメント ID。既定では選択中の構造、またはページ上に 1 つだけある構造",
+ "17": "分光計の周波数 (MHz)(既定は 1H で 400、13C で 100)",
+ "18": "選択した構造の隣に予測 1H NMR スペクトルを追加します(元に戻す操作 1 回分)。FormChem 独自の増分則(化学シフトのデータベースは使用しません)で計算されたスペクトルオブジェクトで、多重線と積分は構造の原子に連結され、タイトルには方法、バージョン、周波数が付きます。曲線は構造から再計算され、保存されることはありません。",
+ "19": "選択した構造の隣に予測 13C NMR スペクトルを追加します(元に戻す操作 1 回分)。FormChem 独自の増分則(化学シフトのデータベースは使用しません)で計算されたスペクトルオブジェクトで、ピークは構造の原子に連結され、タイトルには方法、バージョン、周波数が付きます。曲線は構造から再計算され、保存されることはありません。",
+ "20": "スペクトルを予測できませんでした",
+ "21": "1H NMR スペクトルを予測",
+ "22": "13C NMR スペクトルを予測",
+ "23": "構造が変更された後、予測スペクトルの多重線、積分、ピークを、実行中の予測器のバージョンで再計算します(元に戻す操作 1 回分)。最新の場合は何も変わりません。",
+ "24": "予測スペクトルの ID。既定では選択中のもの、またはスペクトルエディタで開いているもの",
+ "25": "スペクトルを更新できませんでした",
+ "26": "その範囲に新しいピークはありません。",
+ "27": "スペクトルエディタで範囲をドラッグすると積分します。",
+ "28": "ピークを原子に連結",
+ "29": "ピークの連結を解除",
+ "30": "スペクトルの Y 軸",
+ "31": "ファイルからスペクトル...",
+ "32": "スペクトルを編集...",
+ "33": "ピークを検出",
+ "34": "積分",
+ "35": "透過率または吸光度",
+ "36": "スペクトルを書き出し...",
+ "37": "先にスペクトルを選択してください",
+ "38": "該当するスペクトルがありません: id {0}",
+ "39": "検出したピーク: {0} (既存: {1})",
+ "40": "検出したピーク: {0}",
+ "41": "積分は NMR スペクトル用です",
+ "42": "先にスペクトルエディタでピーク、積分、または多重線を選択してください",
+ "43": "原子はすべて 1 つの構造に属している必要があります",
+ "44": "透過率と吸光度を切り替えられるのは IR、ラマン、UV-Vis スペクトルのみです",
+ "45": "書き出し: {0}",
+ "46": "スペクトルオブジェクトの ID。既定では選択中のスペクトル、またはスペクトルエディタで開いているもの",
+ "47": "JCAMP-DX スペクトルファイルを現在の図面に取り込みます(データブロックごとにスペクトルオブジェクト 1 つ、ファイルはバイト単位でそのまま保持)。ファイルごとに元に戻す操作 1 回分です。path を省略するとファイルダイアログを開きます。",
+ "48": ".jdx、.dx、.jcamp ファイルの絶対パス",
+ "49": "スペクトルを取り込めませんでした",
+ "50": "選択したスペクトルのスペクトルエディタを開きます(ダブルクリックと同じ)。",
+ "51": "スペクトルを開けませんでした",
+ "52": "範囲内(既定では表示中の範囲)のスペクトルのピークを検出し、ピークリストに追加します。すでにあるピークは除かれます(元に戻す操作 1 回分)。",
+ "53": "範囲の開始点(x 軸の単位: cm-1、nm、m/z、ppm)",
+ "54": "範囲の終了点(x 軸の単位)",
+ "55": "検出のしきい値(任意、y 軸の単位)",
+ "56": "追加せずにピークリストを置き換える",
+ "57": "ピークを検出できませんでした",
+ "58": "範囲に対する NMR 積分を、既存の積分と同じ尺度で(または value に合わせて残りを再スケールして)追加します(元に戻す操作 1 回分)。from と to を省略すると、スペクトルエディタを積分ツールに切り替えます。",
+ "59": "範囲の開始点 (ppm)",
+ "60": "範囲の終了点 (ppm)",
+ "61": "この積分が示す値(たとえばプロトン数)",
+ "62": "積分できませんでした",
+ "63": "ピーク、積分、または多重線を構造の原子に連結します(元に戻す操作 1 回分)。atoms を省略すると選択中の原子を使うか、図面上で原子をクリックするのを待ちます。",
+ "64": "ピーク、積分、または多重線の ID。既定ではスペクトルエディタで選択中のもの",
+ "65": "原子が属する構造(フラグメント)の ID",
+ "66": "原子 ID",
+ "67": "ピークを連結できませんでした",
+ "68": "ピーク、積分、または多重線の原子との連結を解除します(元に戻す操作 1 回分)。",
+ "69": "ピークの連結を解除できませんでした",
+ "70": "IR、ラマン、UV-Vis スペクトルを透過率または吸光度で表示します(mode を省略すると切り替え、元に戻す操作 1 回分)。",
+ "71": "表示する Y 軸。省略すると切り替えます",
+ "72": "Y 軸を変更できませんでした",
+ "73": "エンジン経由で、スペクトルを JCAMP-DX(ピークがあればピークテーブル付き)または全点の CSV として保存します。",
+ "74": "ファイル形式。既定は jdx",
+ "75": "jdx の場合: 取り込んだ元のファイルを変更せずに保存",
+ "76": "書き込み先の絶対パス。省略すると保存先を尋ねます",
+ "77": "スペクトルを書き出せませんでした",
+ "78": "ファイルからスペクトルを挿入",
+ "79": "FormChem が描画できるスペクトルがファイルにありません",
+ "80": "スペクトルを挿入",
+ "81": "スペクトルを配置できませんでした。ファイルが図面に届きませんでした。",
+ "82": "挿入したスペクトル: {0}",
+ "83": "波長 (µm)",
+ "84": "波数 (cm⁻¹)",
+ "85": "ラマンシフト (cm⁻¹)",
+ "86": "波長 (nm)",
+ "87": "周波数 (Hz)",
+ "88": "δ (ppm)",
+ "89": "透過率 (%)",
+ "90": "透過率",
+ "91": "吸光度",
+ "92": "相対存在度 (%)",
+ "93": "強度",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "ラマン",
+ "98": "IR",
+ "99": "予測 {0}, {1} MHz ({2})",
+ "100": "予測 {0}, {1} MHz",
+ "101": "予測 {0} ({1})",
+ "102": "予測 {0}",
+ "103": "{0}, {1} MHz",
+ "104": "スペクトルを利用できません: {0}",
+ "105": "スペクトルを読み込み中",
+ "106": "慣用名",
+ "107": "系統名",
+ "108": "信頼度: 高",
+ "109": "信頼度: 中",
+ "110": "信頼度: 低",
+ "111": "読み取れません",
+ "112": "FormChem の命名",
+ "113": "名前を読み取れませんでした",
+ "114": "名前から構造を挿入",
+ "115": "名前から構造",
+ "116": "名前(aspirin や 2-methylpropan-1-ol など)",
+ "117": "化学名",
+ "118": "名前を入力すると構造が表示されます。",
+ "119": "この名前に対応する構造がありません",
+ "120": "辞書",
+ "121": "系統名パーサー",
+ "122": "規則ベースの命名(往復検証済み)",
+ "123": "スペクトルツール",
+ "124": "スペクトル全体を表示",
+ "125": "Y 軸",
+ "126": "この範囲をページに表示",
+ "127": "図面内のスペクトルをダブルクリックすると、ここで編集できます。",
+ "128": "ピークと積分",
+ "129": "予測",
+ "130": "積分値",
+ "131": "原子に連結",
+ "132": "連結解除",
+ "133": "1 原子",
+ "134": "連結する原子",
+ "135": "さらに原子をクリックしてから「完了」を押してください。",
+ "136": "図面上でこのピークに対応する原子をクリックしてから「完了」を押してください。",
+ "137": "その範囲に積分するものがありません。",
+ "138": "ピークを削除",
+ "139": "ピークを追加",
+ "140": "連結先: 1 原子",
+ "141": "スペクトルの範囲を設定",
+ "142": "正の数を入力してください。",
+ "143": "積分を設定できませんでした",
+ "144": "パンとズーム: ドラッグで移動、ホイールで拡大縮小、Shift+ドラッグで範囲にズーム",
+ "145": "範囲にズーム: プロット上をドラッグ",
+ "146": "ピーク検出: 範囲をドラッグ",
+ "147": "ピークの追加と削除: ピークの近くをクリック",
+ "148": "積分: 範囲をドラッグ",
+ "149": "ピーク",
+ "150": "積分",
+ "151": "多重線",
+ "152": "{0} 原子",
+ "153": "連結先: {0}",
+ "154": "ドラッグで移動、ホイールで拡大縮小、Shift+ドラッグで範囲にズームします。ラベルをクリックすると選択します。",
+ "155": "プロット上をドラッグすると、その範囲にズームします。",
+ "156": "範囲をドラッグすると、その範囲のピークを検出します。",
+ "157": "ピークの近くをクリックすると追加し、ピークのラベルをクリックすると削除します。",
+ "158": "範囲をドラッグすると積分します。",
+ "159": "連結先: {0} 原子"
+}
diff --git a/frontend/src/i18n/locales/ja/part13.json b/frontend/src/i18n/locales/ja/part13.json
new file mode 100644
index 00000000..2a5e1eea
--- /dev/null
+++ b/frontend/src/i18n/locales/ja/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "エンジンが空のファイルを返しました",
+ "1": "名前が {0} 文字を超えています",
+ "2": "{0} 原子を超えるフラグメントには名前を付けません",
+ "3": "構造にラベル、R 基、または任意原子が含まれているため、名前を付けられません。",
+ "4": "構造を分子として読み取れませんでした(原子価を確認してください)。",
+ "5": "名前を付ける構造がありません。",
+ "6": "倒置索引名(親化合物を先に書き、コンマの後に置換基を続ける形式)は読み取れません。1,2-dichlorobenzene のように通常の順序で名前を書いてください。",
+ "7": "D- と L- は FormChem の辞書にあるアミノ酸と糖でのみ読み取られます。それ以外の名前には R または S の記号を指定してください。",
+ "8": "FormChem は名前全体を読み取りましたが、完全な構造名になっていません(hexane や benzene などの母体、または接尾辞が欠けている可能性があります)。",
+ "9": "FormChem は {0} 文字目 (\"{1}\") から名前を読み取れませんでした。",
+ "10": "FormChem は名前を読み取りましたが、{0}。",
+ "11": "構造を完成できませんでした",
+ "12": "この名前は複数の読み方ができます。FormChem は仮定が最も少ない読み方で描画しました。",
+ "13": "名前に立体記述子がないため、立体中心と二重結合は立体未指定で描画されます。",
+ "14": "系統名はありません: {0}。",
+ "15": "FormChem が組み立てた系統名は同じ構造に読み戻せなかったため、表示しません。",
+ "16": "その二重結合は E または Z にできません",
+ "17": "記述子の位置番号 {0} は母体の位置ではありません",
+ "18": "{0} 位は E または Z になり得る二重結合の始点ではありません",
+ "19": "{0} には cis または trans になり得る二重結合がちょうど 1 つ必要ですが、この構造には {1} 個あります",
+ "20": "この二重結合では {0} が明確ではありません。代わりに E または Z を指定してください",
+ "21": "({0}) には位置番号が必要です。この構造には立体中心が {1} 個あります",
+ "22": "{0} 位は立体中心ではないため、({1}) は適用できません",
+ "23": "({0}) には位置番号が必要です。この構造には E または Z になり得る二重結合が {1} 個あります",
+ "24": "{0} 位には {1} を指定できません",
+ "25": "その二重結合には {0} を指定できません",
+ "26": "{0} ではどの立体配置を指すのか分からないため、構造は立体指定なしで描画されます。",
+ "27": "{0} には結合位置がありません",
+ "28": "{1} に {0} を置く余地がありません",
+ "29": "{0} はそこに結合できません",
+ "30": "炭素数が {0} を超える鎖はまだ読み取れません",
+ "31": "{0} は環にするには小さすぎます",
+ "32": "{0}-{1} は、FormChem がまだ名前から描画できない互変異性体です",
+ "33": "位置番号 {0} は {1} の位置ではありません",
+ "34": "{0} は鎖の位置ではありません",
+ "35": "{1} の {0} 位から多重結合を始めることはできません",
+ "36": "{1} の {0} 位にはその多重結合を置けません",
+ "37": "{1} の {0} 位には多重結合を置く余地がありません",
+ "38": "{0} の多重結合を置く余地がありません",
+ "39": "{0} の多重結合の位置が指定されていないため、最小の位置に描画しました。",
+ "40": "-{0} には開いた鎖が必要です。環では接尾辞は carbaldehyde、carboxylic acid、carbonitrile、carboxamide になります",
+ "41": "鎖の末端は 2 つしかないため、-{0} は 2 つまでです",
+ "42": "{0} は短すぎて -{1} を 2 つ置けません",
+ "43": "{1} に -{0} を置く余地がありません",
+ "44": "{1} 上の -{0} の位置が指定されていないため、最小の位置に描画しました。",
+ "45": "-{0} は鎖の末端になければならず、{1} には置けません",
+ "46": "{1} に -{0} を置く余地がありません",
+ "47": "ortho、meta、para にはベンゼン環が必要です",
+ "48": "基が 1 つだけの ortho、meta、para には、phenol、aniline、toluene などの母体が必要です",
+ "49": "{1} に {0} を置く余地がありません",
+ "50": "{2} に {0} 基を {1} 個置く余地がありません",
+ "51": "{1} 上の {0} の位置が指定されていないため、空いている最小の位置に描画しました。",
+ "52": "{0} には置換基を付けられません",
+ "53": "アシル基はカルボニル炭素で結合します",
+ "54": "{0} には空いている位置がありません",
+ "55": "{0} の結合位置が指定されていないため、{1} 位と仮定しました。",
+ "56": "{0} には結合できる余地が残っていません",
+ "57": "{1} の前の位置番号 {0} は使われていません",
+ "58": "{0} は独立した語としては使えません",
+ "59": "\"{0}\" の前には基が {1} 個必要ですが、名前には {2} 個あります",
+ "60": "\"{0}\" の前には基が {1} 個必要ですが、名前には {2} 個あります",
+ "61": "エステルの位置 {1} 個に対し、名前にはアルキル基が {0} 個あります",
+ "62": "エステルの位置 {1} 個に対し、名前にはアルキル基が {0} 個あります",
+ "63": "エステルの位置 {1} 個に対し、名前にはアルキル基が {0} 個あります",
+ "64": "エステルの位置 {1} 個に対し、名前にはアルキル基が {0} 個あります",
+ "65": "名前が表す構造は有効ではありません ({0})",
+ "66": "{0} 位の -one はアルデヒドになります。アルデヒドは -al で命名します",
+ "67": "{1} の {0} 位",
+ "68": "同一の置換基が多すぎます",
+ "69": "位置番号が混在しています",
+ "70": "特殊な結合の種類はまだ命名できません",
+ "71": "FormChem がまだ命名できない環系です",
+ "72": "環外二重結合をもつ芳香環(ピリドンなど)はまだ命名できません",
+ "73": "同位体とラジカルはまだ命名できません",
+ "74": "超原子価ハロゲンは命名できません",
+ "75": "ニトロ以外の荷電した窒素基はまだ命名できません",
+ "76": "荷電した原子はまだ命名できません",
+ "77": "硫黄、窒素、リンの酸化物はまだ命名できません",
+ "78": "この酸素基はまだ命名できません",
+ "79": "スルホキシド、スルホン、その他の硫黄基はまだ命名できません",
+ "80": "イミン、アゾ、および類似の窒素基はまだ命名できません",
+ "81": "{0} はまだ命名できません",
+ "82": "炭素数が 20 を超える置換基の鎖は命名できません",
+ "83": "不飽和アシル基はまだ命名できません",
+ "84": "置換されたイリデン基はまだ命名できません",
+ "85": "環のイリデン基はまだ命名できません",
+ "86": "2 か所で結合した環はまだ命名できません",
+ "87": "環置換基の番号付けが見つかりません",
+ "88": "アルコール部分が異なるエステルはまだ命名できません",
+ "89": "母体の鎖または環が見つかりません",
+ "90": "環状エステル(ラクトン)はまだ命名できません",
+ "91": "複数のアミンまたはアミド窒素に置換基がある構造はまだ命名できません",
+ "92": "母体の鎖または環の外にある立体中心はまだ命名できません",
+ "93": "母体の鎖の外にある二重結合の幾何はまだ命名できません",
+ "94": "擬不斉中心はまだ命名できません",
+ "95": "この二重結合の幾何はまだ命名できません",
+ "96": "炭素数が 20 を超える鎖は命名できません",
+ "97": "同一の基が多すぎます",
+ "98": "構造に原子価の誤りがあります",
+ "99": "塩と混合物はまだ系統的に命名できません",
+ "100": "重原子が {0} 個を超える構造はまだ系統的に命名できません",
+ "101": "{0} の化合物はまだ系統的に命名できません",
+ "102": "クエリ原子と R 基には名前がありません",
+ "103": "単一ヘテロ原子の水素化物は辞書からのみ命名されます",
+ "104": "{0} はこの図面のオブジェクトではありません。",
+ "105": "{0} には原子がありません。",
+ "106": "フラグメントに原子がありません。",
+ "107": "図面にページがありません。",
+ "108": "{0} はこの図面のスペクトルではありません。",
+ "109": "この予測の元になった構造 {0} は、図面にもうありません。",
+ "110": "図面 {0} は閉じられました。",
+ "111": "化学シフト (ppm)",
+ "112": "時間 (s)",
+ "113": "反射率",
+ "114": "相対存在度",
+ "115": "##{0}= が複数回あります。最初の値を保持しました。",
+ "116": "##XYDATA={0} は既知の変数リストではありません。(X++(Y..Y)) として読み取りました。",
+ "117": "##{0}={1} は既知の変数リストではありません。(XY..XY) として読み取りました。",
+ "118": "点が x の順に並んでいなかったため、並べ替えました。",
+ "119": "##.SHIFT REFERENCE={0} を読み取れなかったため、化学シフトの基準合わせは行いませんでした。",
+ "120": "##.SHIFT REFERENCE が指す点 {0} は {1} 点の範囲外のため、化学シフトの基準合わせは行いませんでした。",
+ "121": "点 {0} が {1} ppm ({2}) になるよう、化学シフトの基準を合わせました。",
+ "122": "ファイルに観測核が指定されていません。",
+ "123": "これは時間領域の NMR データ (FID) です。フーリエ変換せず、取得されたままの形で表示します。",
+ "124": "Hz の周波数を観測周波数 ({0} MHz) で割り、ppm にしました。",
+ "125": "##.SHIFT REFERENCE がないため、0 Hz を 0 ppm としました。",
+ "126": "##.OBSERVE FREQUENCY がないため、化学シフトの軸は Hz のままです。",
+ "127": "透過率は割合で保存されていたため、パーセントで表示します。",
+ "128": "ブロック {0} は {1} 点を超えています。",
+ "129": "x 軸の単位が {1} の ##DATA TYPE={0} は既知の測定法を示さないため、単純なスペクトルとして描画しました。",
+ "130": "##BLOCKS={0} ですが、LINK ブロックのブロック数は {1} です。見つかったブロックはすべて読み取りました。",
+ "131": "これは JCAMP-DX ファイルではありません。##TITLE= レコードがありません。",
+ "132": "ファイルには LINK ブロックなしでブロックが {0} 個連続しています。それぞれ読み取りました。",
+ "133": "2 つのブロックが同じ ##BLOCK_ID をもっています。",
+ "134": "FormChem が描画できるスペクトルがファイルにありません ({0})。",
+ "135": "ブロック \"{0}\" は描画されませんでした: {1}。",
+ "136": "構造ブロック (JCAMP-CS) です。ファイルには保持されますが、描画されません",
+ "137": "XYDATA、XYPOINTS、PEAK TABLE、NTUPLES のいずれもありません",
+ "138": "データテーブルに点がありません",
+ "139": "NTUPLES テーブルに記号が宣言されていません",
+ "140": "2D NTUPLES スペクトルはまだ対応していません",
+ "141": "NTUPLES テーブルに読み取れるページがありません",
+ "142": "ファイルに ASCII 以外の文字が含まれています。UTF-8 として読み取りました。",
+ "143": "ファイルに ASCII でも UTF-8 でもないバイトが含まれています。Latin-1 として読み取りました。",
+ "144": "ラベル付きのデータレコードの外にある行は無視しました。",
+ "145": "対応するブロックのない ##END= を無視しました。",
+ "146": "最初の ##TITLE= より前、または最後の ##END= より後のレコードを無視しました。",
+ "147": "ファイルが ##END= なしで終わっています。開いていたブロックを閉じました。",
+ "148": "NTUPLES ページ {0}",
+ "149": "NTUPLES ページ {0} に ##DATA TABLE= がないため、スキップしました。",
+ "150": "NTUPLES ページ {0} は ##SYMBOL= で宣言されていない記号 ({1}) を使っているため、スキップしました。",
+ "151": "{0} のデータテーブルは FormChem が読み取れない形式 ({1}) のため、スキップしました。",
+ "152": "NTUPLES テーブルに ##END NTUPLES= がないため、ブロックの終わりまで読み取りました。",
+ "153": "NTUPLES テーブルに ##SYMBOL= リストがありません。",
+ "154": "これは 2D スペクトル(独立変数が 2 つ)です。このバージョンでは 2D スペクトルは描画されません。",
+ "155": "NTUPLES テーブルは {0} ページあります。最初の {1} ページのみ読み取りました。",
+ "156": "虚部のページが実部のページと x の値を共有していないため、除外しました。",
+ "157": "NTUPLES テーブルは {0} ページあります。ページ {1} を表示し、他の {2} ページは除外しました。",
+ "158": "##DELTAX={0} は (LASTX - FIRSTX) / (NPOINTS - 1) = {1} と異なります。計算した間隔を使用します。",
+ "159": "{0} には FIRSTX、LASTX、NPOINTS が揃っていないため、間隔は ##DELTAX から求めました。",
+ "160": "データ行が DIF の値で始まっていました。直前の行の最後の値から続けました。",
+ "161": "Y のチェック値が直前の行の最後の値と一致しませんでした。前の値から行を続けました。",
+ "162": "{1} 内の {0} 文字を読み取れず、スキップしました。",
+ "163": "DIF 行 {0} 行の後に Y のチェック値がありませんでした。",
+ "164": "{0} にはデータ点がありません。",
+ "165": "{0} は {1} 点ありますが ##NPOINTS={2} です。行の X の値は FIRSTX から LASTX まで {3} 点に合うため、その間隔を使用しました。",
+ "166": "{0} は {1} 点ありますが ##NPOINTS={2} です。読み取った点はそのまま保持しました。",
+ "167": "行の X の値が FIRSTX と間隔から求めた位置と一致しません。求めた位置を使用しました。",
+ "168": "{0} に FIRSTX、LASTX、NPOINTS がないため、間隔は行の X の値から求めました。",
+ "169": "{0} には点を x 軸に配置する手段がないため、点には 0、1、2 のように番号を付けました。",
+ "170": "最初の行は x = {0} から始まりますが ##FIRSTX={1} です。FIRSTX を使用しました。",
+ "171": "最初の Y の値 {0} が ##FIRSTY={1} と一致しません。",
+ "172": "{0} の末尾に {1} 個の値からなる不完全なグループがあったため、破棄しました。",
+ "173": "{0} を読み取れませんでした: {1}。",
+ "174": "スペクトルはブロック {0} を要求していますが、ファイルには 1 ブロックしかありません。",
+ "175": "スペクトルはブロック {0} を要求していますが、ファイルには {1} ブロックしかありません。",
+ "176": "スペクトルにソースがありません。",
+ "177": "スペクトルのファイル {0} は図面にありません。",
+ "178": "このエンジンには {0} の予測器がありません。",
+ "179": "予測に失敗しました: {0}",
+ "180": "スペクトルのソースがファイルでも予測でもありません。",
+ "181": "図面にスペクトル {0} がありません。",
+ "182": "スティックスペクトルには積分する面積がありません。",
+ "183": "値は 0 より大きくなければなりません。",
+ "184": "from と to には異なる 2 つの x の値を指定してください。",
+ "185": "スペクトルに積分 {0} がありません。",
+ "186": "このスペクトルには元のファイルがありません。original=1 なしで書き出してください。",
+ "187": "FormChem が配置できるのは、PNG、JPEG、GIF、WebP、SVG の画像と JCAMP-DX スペクトルです。"
+}
diff --git a/frontend/src/i18n/locales/ja/part14.json b/frontend/src/i18n/locales/ja/part14.json
new file mode 100644
index 00000000..49ed2fda
--- /dev/null
+++ b/frontend/src/i18n/locales/ja/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "表示",
+ "1": "表面",
+ "2": "書き出すものがありません: 3D ビューが空です。",
+ "3": "書き出しに失敗しました",
+ "4": "3D で表示する構造を選択してください。",
+ "5": "3D を構築",
+ "6": "3D ビューを挿入",
+ "7": "PDB、mmCIF、SDF、または MOL ファイルを選択してください。",
+ "8": "3D 構造をページに配置できませんでした",
+ "9": "PDB または mmCIF ファイルから開いた 3D オブジェクトを選択してください。",
+ "10": "このモデルにはリガンドがありません。",
+ "11": "リガンドを抽出できませんでした",
+ "12": "3D 座標がまだありません: 「3D を構築」で図からコンフォーマーを作成します。",
+ "13": "3D 構造ファイル...",
+ "14": "リガンドを抽出...",
+ "15": "3D 構造を書き出し...",
+ "16": "二面角スキャン...",
+ "17": "3D で計測",
+ "18": "3D ビューを PNG で書き出し...",
+ "19": "3D ビューを glTF で書き出し...",
+ "20": "抽出しました {0}: {1}(結合次数は推定)",
+ "21": "抽出しました {0}: {1}",
+ "22": "先に 3D ビューを開いてください",
+ "23": "選択した構造(またはページ上で選択した 3D オブジェクト)に対して 3D ビューパネルを開き、選択に追従します。構造には先に 3D 座標が必要です。「3D を構築」で作成します。",
+ "24": "選択した構造の 3D コンフォーマーを 2D の図から構築し(ウェッジ、二重結合の幾何、電荷は保持)、選択した力場で最小化して、元に戻す操作 1 回分として図に保存します。3D ビューに表示されます。",
+ "25": "3D ビューで選択した力場(既定は MMFF94、MMFF94 にパラメータがない場合は UFF)で、選択した構造の表示中のコンフォーマーを最小化し、最小化の前後のエネルギーを報告します(元に戻す操作 1 回分)。",
+ "26": "選択した構造のコンフォーマーのアンサンブルを生成し(ETKDG、RMSD で間引き、それぞれ最小化)、エネルギー範囲内のものを残します。n、window、method を指定するとダイアログなしで実行します。",
+ "27": "生成するコンフォーマーの数",
+ "28": "エネルギー範囲 (kcal/mol)",
+ "29": "選択した構造の 3D ビューをその隣のページに配置し(3D 座標がなければ先に構築)、それに結び付けた 3D ビューパネルを開きます。モデルを回転したりスタイルを変えたりすると、ページ上の画像も更新されます。",
+ "30": "PDB、mmCIF、SDF、または MOL ファイルを 3D オブジェクトとしてページに開き(タンパク質はカートゥーン、リガンドは球棒、水は非表示、リガンドにフォーカス)、3D ビューに表示します。",
+ "31": "選択した 3D オブジェクト(PDB または mmCIF ファイルから開いたもの)のリガンドを、その隣の 2D 構造に変換します(元に戻す操作 1 回分)。結合次数は、一般的なリガンドでは組み込みテンプレートから、それ以外は幾何から推定して報告します。ファイルの座標はそのコンフォーマーになります。ligand を指定するとそのリガンドを、省略してモデルに複数あれば尋ねます。",
+ "32": "リガンドキー chain:het:number、または het コード",
+ "33": "PDB または mmCIF ファイルから開いた 3D オブジェクトを選択してください",
+ "34": "選択した構造の 3D 座標を、すべての水素を含めて保存します。MDL molfile(表示中のコンフォーマー)、SD ファイル(全コンフォーマー、エネルギーと方法のデータフィールド付き)、PDB または XYZ(表示中のコンフォーマー、または全コンフォーマーをモデルまたはフレームとして)。PDB または mmCIF ファイルから開いた 3D オブジェクトは元のファイルを保存します。format を省略すると尋ねます。",
+ "35": "ファイル形式",
+ "36": "表示中のコンフォーマーだけでなく全コンフォーマー(sdf では既定で true)",
+ "37": "3D ビューで選んだ 4 原子(または最後の二面角の計測)の二面角を、緩和最小化を伴ってスキャンし、角度とエネルギーの関係をプロットします。",
+ "38": "3D ビューで距離(2 原子)、角度(3 原子)、または二面角(4 原子)を計測して一覧に追加します。atoms(a1 のようなフラグメントの原子 ID、水素は a1:h0、または PDB のシリアル番号)を指定するとそれらを計測し、省略すると選択モードに切り替わります。",
+ "39": "2 個から 4 個の原子 ID",
+ "40": "3D ビューを画面上のサイズの PNG 画像として保存します。transparent を指定すると背景を除きます。",
+ "41": "3D ビューをバイナリの glTF 2.0 ファイル (.glb) として保存します。原子は球、結合は円柱で元素の色付き、1 オングストローム = 1 cm で、3D ビューアー、スライド、印刷向けです。",
+ "42": "表面なし",
+ "43": "3D ビューから分子表面を取り除きます。",
+ "44": "ファンデルワールス表面",
+ "45": "3D ビューにファンデルワールス表面を表示します。",
+ "46": "溶媒接近可能表面",
+ "47": "3D ビューに溶媒接近可能表面(プローブ 1.4 オングストローム)を表示します。",
+ "48": "溶媒除外表面",
+ "49": "3D ビューに溶媒除外表面を表示します。",
+ "50": "ESP マップ表面",
+ "51": "エンジンの経験的な部分電荷から求めた近似の静電ポテンシャルで表面に色を付けます(赤は負、青は正)。方法を示す凡例が付きます。",
+ "52": "3D ビューをワイヤースタイルで表示します。ページ上の 3D オブジェクトでは、選択がオブジェクトとともに保存されます。",
+ "53": "3D ビューをスティックスタイルで表示します。ページ上の 3D オブジェクトでは、選択がオブジェクトとともに保存されます。",
+ "54": "球棒",
+ "55": "3D ビューを球棒スタイルで表示します。ページ上の 3D オブジェクトでは、選択がオブジェクトとともに保存されます。",
+ "56": "空間充填",
+ "57": "3D ビューを空間充填スタイルで表示します。ページ上の 3D オブジェクトでは、選択がオブジェクトとともに保存されます。",
+ "58": "カートゥーン",
+ "59": "3D ビューをカートゥーンスタイルで表示します(タンパク質と核酸。リガンドは球棒のまま)。ページ上の 3D オブジェクトでは、選択がオブジェクトとともに保存されます。",
+ "60": "二面角 (度)",
+ "61": "相対エネルギー (kcal/mol)",
+ "62": "最小 {0}°",
+ "63": "3D 構造を書き出し",
+ "64": "全コンフォーマー(SDF のレコード、PDB のモデル、XYZ のフレーム)",
+ "65": "コンフォーマー 1 個を保存します。すべての水素が 3D の位置とともに書き込まれます。",
+ "66": "リガンドを抽出",
+ "67": "リガンド",
+ "68": "リガンドはモデルの隣の 2D 構造になり、ファイルの座標はそのコンフォーマーとして保持されます。",
+ "69": "抽出",
+ "70": "SD ファイル (.sdf)",
+ "71": "MDL Molfile (.mol)",
+ "72": "コンフォーマー {0} 個を保存します。すべての水素が 3D の位置とともに書き込まれます。",
+ "73": "コンフォーマー",
+ "74": "エネルギー範囲 (kcal/mol)",
+ "75": "固定シードによる ETKDG 埋め込み。重原子 RMSD 0.5 Å で近い重複を間引き、それぞれ最小化します。最低エネルギーのものが表示中のコンフォーマーになります。",
+ "76": "生成",
+ "77": "二面角スキャンのエネルギープロファイル",
+ "78": "二面角スキャン",
+ "79": "開始 (度)",
+ "80": "終了 (度)",
+ "81": "刻み (度)",
+ "82": "各点をコンフォーマーとして保持(元に戻す操作 1 回分)",
+ "83": "スキャンを実行",
+ "84": "緩和スキャン: 各角度で二面角を固定し、それ以外をすべて最小化します。",
+ "85": "終了角は開始角より大きくしてください。",
+ "86": "スキャン中...",
+ "87": "スキャンに失敗しました",
+ "88": "障壁 {0} kcal/mol",
+ "89": "表示スタイル",
+ "90": "経験的な部分電荷から求めた静電ポテンシャルで表面に色を付ける",
+ "91": "ESP",
+ "92": "最小化",
+ "93": "スキャン...",
+ "94": "リガンドにフォーカス",
+ "95": "ビューをリセット",
+ "96": "回転",
+ "97": "3D ビューを書き出す",
+ "98": "計測",
+ "99": "計測値",
+ "100": "PNG 画像",
+ "101": "PNG 画像(透明)",
+ "102": "glTF バイナリ (.glb)",
+ "103": "3D には WebGL が必要ですが、このウィンドウでは利用できません。",
+ "104": "3D ビューアーを読み込み中...",
+ "105": "3D ビューアーを読み込めませんでした",
+ "106": "図面を開いて構造を選択すると、3D で表示されます。",
+ "107": "ページ上の構造を選択すると、3D で表示されます。",
+ "108": "3D 構造を読み取れませんでした",
+ "109": "このコンフォーマーは molfile として書き込めません",
+ "110": "回転はオフです: システムがモーションの軽減を要求しています",
+ "111": "PDB または CIF のモデルにはコンフォーマーがありません。",
+ "112": "エネルギーは最低のものとの相対値です。クリックすると表示します。",
+ "113": "「3D を構築」または「コンフォーマー...」でこの一覧が埋まります。",
+ "114": "部分電荷を利用できません",
+ "115": "エンジンにはまだ 3D 用のルートがありません",
+ "116": "未収束",
+ "117": "結合した 4 原子を順に選んでください(二面角)。その後スキャンします。",
+ "118": "ジオメトリを見るには、「各点をコンフォーマーとして保持」にチェックを入れてください。",
+ "119": "コンフォーマーを表示",
+ "120": "3D ビューを更新",
+ "121": "ページのスナップショットを更新できませんでした",
+ "122": "表面なし",
+ "123": "ファンデルワールス",
+ "124": "溶媒接近可能",
+ "125": "溶媒除外",
+ "126": "距離",
+ "127": "角度",
+ "128": "二面角",
+ "129": "{0} kcal/mol、{1}、未収束",
+ "130": "選択済み {0} / {1}: {2}",
+ "131": "計測する原子を {0} 個クリックしてください",
+ "132": "ESP ({0}): {1}、赤 {2} e から青 +{3} e",
+ "133": "距離 {0}: {1}",
+ "134": "角度 {0}: {1}",
+ "135": "二面角 {0}: {1}",
+ "136": "構築: {0}",
+ "137": "最小化: {0}",
+ "138": "{1} 個中 {0} 個のコンフォーマーを保持",
+ "139": "{0} 個のコンフォーマーを保持",
+ "140": "二面角 {0}",
+ "141": "PNG のエンコードに失敗しました"
+}
diff --git a/frontend/src/i18n/locales/ja/part15.json b/frontend/src/i18n/locales/ja/part15.json
new file mode 100644
index 00000000..db1f76b3
--- /dev/null
+++ b/frontend/src/i18n/locales/ja/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "近似値、経験的な電荷による",
+ "1": "立体中心または二重結合 {0} 個が未指定だったため、1 つの配置を選びました。",
+ "2": "図の立体ラベル {0} 個は 3D では再現されません。",
+ "3": "拡張立体グループ {0} の描かれたメンバーを構築しました。3D モデルは、図が表す混合物(相対またはラセミ)の立体異性体の 1 つです。",
+ "4": "描かれた立体を保つため、{0} 回埋め込みました (シード {1})。",
+ "5": "重原子 {0} 対が、ファンデルワールス接触距離の {1} より近づいています。",
+ "6": "汎用力場 (UFF) を使用しました: {0}。",
+ "7": "{1} の {0} パラメータがありません",
+ "8": "{0} がすべての原子を型付けできませんでした",
+ "9": "コンフォーマー {0} 個が最小化中に描かれた立体を変えたため、除外しました。",
+ "10": "重原子が 300 個を超えています。このサイズではコンフォーマーのサンプリング品質が低下します。",
+ "11": "中心の結合が環の中にあります。環は角度に合わせてひずみます。",
+ "12": "構造に 3D 座標がなかったため、スキャンは新しい埋め込みから始めました。",
+ "13": "3D の計算中に構造が変更されました。もう一度コマンドを実行してください。",
+ "14": "図面にオブジェクト {0} がありません。",
+ "15": "{0} にはまだ 3D 座標がありません。先に 3D を構築してください。",
+ "16": "{0} にコンフォーマー {1} がありません。",
+ "17": "構造に原子がありません。",
+ "18": "3D には実際の原子が必要です: {0} 個の原子がラベル、R 基、または結合点です ({1})。",
+ "19": "水素を追加できませんでした: {0}",
+ "20": "構造は水素を含めて {0} 原子あります。3D で扱えるのは {1} 原子までです。",
+ "21": "3D 座標がこの構造と合いません ({0} 用のものがありません)。3D をもう一度構築してください。",
+ "22": "3D 座標がこの構造と合いません(水素の数が変わりました)。3D をもう一度構築してください。",
+ "23": "構造を 3D に埋め込めませんでした: {0}",
+ "24": "構造を 3D に埋め込めませんでした。原子価と立体を確認してください。",
+ "25": "コンフォーマーを埋め込めませんでした: {0}",
+ "26": "埋め込めるコンフォーマーがありませんでした。構造の原子価と立体を確認してください。",
+ "27": "埋め込まれたすべてのコンフォーマーが、最小化後に描かれた立体を失いました。",
+ "28": "この構造のパラメータをもつ力場がありません ({0})。",
+ "29": "汎用力場を設定できませんでした: {0}",
+ "30": "汎用力場を設定できませんでした。",
+ "31": "不明な原子 {0}。フラグメントの原子 ID を使うか、水素は a1:h0 の形式で指定してください。",
+ "32": "4 つの原子はすべて異なっている必要があります。",
+ "33": "4 つの原子は結合の連なり (a1-a2-a3-a4) になっている必要があります。",
+ "34": "3D ファイルを書き込めませんでした: {0}",
+ "35": "FormChem が読み取れる PDB、mmCIF、SDF、MOL ファイルではありません。",
+ "36": "ファイルの原子数が {0} を超えています。",
+ "37": "PDB ファイルに ATOM または HETATM レコードがありません。",
+ "38": "mmCIF の atom_site テーブルに Cartn_x、Cartn_y、Cartn_z の列がありません。",
+ "39": "CIF に分率座標がありますが、完全な単位格子がありません。",
+ "40": "CIF に atom_site テーブルがありません。",
+ "41": "CIF に読み取れる原子がありません。",
+ "42": "ファイルにレコードがありません。",
+ "43": "ファイルには {0} 個のレコードがあります。3D の取り込みで読むのは {1} 個までです。",
+ "44": "ファイルのレコードを 1 つも読み取れませんでした。",
+ "45": "{0} は PDB または mmCIF ファイルではありません。",
+ "46": "{0} を FormChem の図面に変換できませんでした: {1}。",
+ "47": "PDB モデルを 3D オブジェクトとして配置しました: {0}。",
+ "48": "mmCIF モデルを 3D オブジェクトとして配置しました: {0}。",
+ "49": "座標を読み取れない ATOM または HETATM 行が {0} 行あり、スキップしました。",
+ "50": "座標を読み取れない atom_site の行が {0} 行あり、スキップしました。",
+ "51": "低分子の CIF: 非対称単位を分率座標から読み取ります。対称操作で生成される分子は作られません。",
+ "52": "{0} に原子価の問題があります。サニタイズせずに読み取りました。",
+ "53": "{0} には 2D 座標しかありません。コンフォーマーは保持しませんでした。",
+ "54": "水素 {0} 個がファイルになく、幾何から配置しました。",
+ "55": "{0} を読み取れませんでした: {1}",
+ "56": "{0} を読み取れませんでした。",
+ "57": "レコード {0}",
+ "58": "この構造",
+ "59": "ファイルの 3D 座標を 1 個の構造のコンフォーマーとして保持しました。表示するのに「3D を構築」は不要です。",
+ "60": "ファイルの 3D 座標を {0} 個の構造のコンフォーマーとして保持しました。表示するのに「3D を構築」は不要です。",
+ "61": "{0} は単一イオンです。抽出する構造がありません。",
+ "62": "{0} の原子を読み取れませんでした。",
+ "63": "構造にリガンド {0} がありません。リガンド: {1}。",
+ "64": "図面に 3D モデル {0} がありません。",
+ "65": "FormChem が配置できるのは、PNG、JPEG、GIF、WebP、SVG の画像、JCAMP-DX スペクトル、PDB、mmCIF、SDF、MOL の構造ファイルです。"
+}
diff --git a/frontend/src/i18n/locales/ko/part12.json b/frontend/src/i18n/locales/ko/part12.json
new file mode 100644
index 00000000..6b90d982
--- /dev/null
+++ b/frontend/src/i18n/locales/ko/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "스펙트럼",
+ "1": "이름을 붙일 구조를 그리거나 선택하세요.",
+ "2": "이름을 계산하지 못했습니다",
+ "3": "FormChem에는 이 구조의 이름이 없습니다.",
+ "4": "이름 복사",
+ "5": "복사한 이름: {0}",
+ "6": "삽입할 화학명. 생략하면 대화상자를 엽니다",
+ "7": "선택한 구조(또는 페이지의 구조들)의 이름을 일반 텍스트로 복사합니다. FormChem이 관용명을 알고 있으면 관용명을, 아니면 계통명을 복사하며, 계통명은 같은 구조로 다시 읽히는 경우에만 제공됩니다.",
+ "8": "복사할 이름을 trivial 또는 systematic으로 선택합니다. 생략하면 첫 번째 이름입니다",
+ "9": "예측 스펙트럼이 최신 상태입니다.",
+ "10": "예측 스펙트럼 새로 고침",
+ "11": "먼저 구조 하나를 선택하세요",
+ "12": "먼저 예측 스펙트럼을 선택하세요",
+ "13": "예측 1H NMR 스펙트럼을 추가했습니다 ({0})",
+ "14": "예측 13C NMR 스펙트럼을 추가했습니다 ({0})",
+ "15": "예측 스펙트럼을 새로 고쳤습니다 ({0})",
+ "16": "구조의 조각(fragment) ID. 기본값은 선택한 구조 또는 페이지에 하나뿐인 구조",
+ "17": "분광기 주파수 (MHz) (기본값: 1H는 400, 13C는 100)",
+ "18": "선택한 구조 옆에 예측 1H NMR 스펙트럼을 추가합니다(실행 취소 한 단계). FormChem 자체의 증분 규칙(화학적 이동 데이터베이스 없음)으로 계산한 스펙트럼 개체이며, 다중선과 적분이 구조의 원자에 연결되고 제목에 방법, 버전, 주파수가 표시됩니다. 곡선은 구조에서 다시 계산되며 저장되지 않습니다.",
+ "19": "선택한 구조 옆에 예측 13C NMR 스펙트럼을 추가합니다(실행 취소 한 단계). FormChem 자체의 증분 규칙(화학적 이동 데이터베이스 없음)으로 계산한 스펙트럼 개체이며, 피크가 구조의 원자에 연결되고 제목에 방법, 버전, 주파수가 표시됩니다. 곡선은 구조에서 다시 계산되며 저장되지 않습니다.",
+ "20": "스펙트럼을 예측하지 못했습니다",
+ "21": "1H NMR 스펙트럼 예측",
+ "22": "13C NMR 스펙트럼 예측",
+ "23": "구조가 바뀐 뒤 예측 스펙트럼의 다중선, 적분 또는 피크를 실행 중인 예측기 버전으로 다시 계산합니다(실행 취소 한 단계). 최신 상태이면 아무것도 바뀌지 않습니다.",
+ "24": "예측 스펙트럼 ID. 기본값은 선택한 것 또는 스펙트럼 편집기에서 열려 있는 것",
+ "25": "스펙트럼을 새로 고치지 못했습니다",
+ "26": "해당 범위에 새 피크가 없습니다.",
+ "27": "스펙트럼 편집기에서 범위를 드래그하면 적분합니다.",
+ "28": "피크를 원자에 연결",
+ "29": "피크 연결 해제",
+ "30": "스펙트럼 Y축",
+ "31": "파일에서 스펙트럼...",
+ "32": "스펙트럼 편집...",
+ "33": "피크 검출",
+ "34": "적분",
+ "35": "투과율 또는 흡광도",
+ "36": "스펙트럼 내보내기...",
+ "37": "먼저 스펙트럼을 선택하세요",
+ "38": "해당하는 스펙트럼이 없습니다: id {0}",
+ "39": "검출한 피크: {0} (이미 있음: {1})",
+ "40": "검출한 피크: {0}",
+ "41": "적분은 NMR 스펙트럼용입니다",
+ "42": "먼저 스펙트럼 편집기에서 피크, 적분 또는 다중선을 선택하세요",
+ "43": "원자는 모두 하나의 구조에 속해야 합니다",
+ "44": "IR, 라만, UV-Vis 스펙트럼만 투과율과 흡광도를 전환할 수 있습니다",
+ "45": "내보냄: {0}",
+ "46": "스펙트럼 개체 ID. 기본값은 선택한 스펙트럼 또는 스펙트럼 편집기에서 열려 있는 것",
+ "47": "JCAMP-DX 스펙트럼 파일을 현재 도면으로 가져옵니다(데이터 블록마다 스펙트럼 개체 하나, 파일은 바이트 그대로 보관). 파일당 실행 취소 한 단계입니다. path를 생략하면 파일 대화상자를 엽니다.",
+ "48": ".jdx, .dx 또는 .jcamp 파일의 절대 경로",
+ "49": "스펙트럼을 가져오지 못했습니다",
+ "50": "선택한 스펙트럼의 스펙트럼 편집기를 엽니다(더블클릭과 같음).",
+ "51": "스펙트럼을 열지 못했습니다",
+ "52": "범위(기본값은 표시 중인 범위) 안에서 스펙트럼의 피크를 찾아 피크 목록에 추가합니다. 이미 있는 피크는 건너뜁니다(실행 취소 한 단계).",
+ "53": "범위 시작점(x축 단위: cm-1, nm, m/z, ppm)",
+ "54": "범위 끝점(x축 단위)",
+ "55": "검출 임계값(선택 사항, y축 단위)",
+ "56": "추가하지 않고 피크 목록을 교체",
+ "57": "피크를 검출하지 못했습니다",
+ "58": "범위에 대한 NMR 적분을 기존 적분과 같은 척도로(또는 value에 맞추고 나머지는 다시 조정하여) 추가합니다(실행 취소 한 단계). from과 to를 생략하면 스펙트럼 편집기가 적분 도구로 전환됩니다.",
+ "59": "범위 시작점 (ppm)",
+ "60": "범위 끝점 (ppm)",
+ "61": "이 적분이 나타내야 할 값(예: 양성자 수)",
+ "62": "적분하지 못했습니다",
+ "63": "피크, 적분 또는 다중선을 구조의 원자에 연결합니다(실행 취소 한 단계). atoms를 생략하면 선택한 원자를 사용하거나, 도면에서 원자를 클릭하기를 기다립니다.",
+ "64": "피크, 적분 또는 다중선 ID. 기본값은 스펙트럼 편집기에서 선택한 것",
+ "65": "원자가 속한 구조(조각) ID",
+ "66": "원자 ID",
+ "67": "피크를 연결하지 못했습니다",
+ "68": "피크, 적분 또는 다중선의 원자 연결을 제거합니다(실행 취소 한 단계).",
+ "69": "피크 연결을 해제하지 못했습니다",
+ "70": "IR, 라만 또는 UV-Vis 스펙트럼을 투과율 또는 흡광도로 표시합니다(mode를 생략하면 전환, 실행 취소 한 단계).",
+ "71": "표시할 Y축. 생략하면 전환합니다",
+ "72": "Y축을 바꾸지 못했습니다",
+ "73": "엔진을 통해 스펙트럼을 JCAMP-DX(피크가 있으면 피크 표 포함) 또는 모든 점의 CSV로 저장합니다.",
+ "74": "파일 형식. 기본값은 jdx",
+ "75": "jdx일 때: 가져온 원본 파일을 그대로 저장",
+ "76": "기록할 절대 경로. 생략하면 묻습니다",
+ "77": "스펙트럼을 내보내지 못했습니다",
+ "78": "파일에서 스펙트럼 삽입",
+ "79": "FormChem이 그릴 수 있는 스펙트럼이 파일에 없습니다",
+ "80": "스펙트럼 삽입",
+ "81": "스펙트럼을 배치하지 못했습니다. 파일이 도면에 도달하지 않았습니다.",
+ "82": "삽입한 스펙트럼: {0}",
+ "83": "파장 (µm)",
+ "84": "파수 (cm⁻¹)",
+ "85": "라만 이동 (cm⁻¹)",
+ "86": "파장 (nm)",
+ "87": "주파수 (Hz)",
+ "88": "δ (ppm)",
+ "89": "투과율 (%)",
+ "90": "투과율",
+ "91": "흡광도",
+ "92": "상대 존재비 (%)",
+ "93": "세기",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "라만",
+ "98": "IR",
+ "99": "예측 {0}, {1} MHz ({2})",
+ "100": "예측 {0}, {1} MHz",
+ "101": "예측 {0} ({1})",
+ "102": "예측 {0}",
+ "103": "{0}, {1} MHz",
+ "104": "스펙트럼을 사용할 수 없습니다: {0}",
+ "105": "스펙트럼을 불러오는 중",
+ "106": "관용명",
+ "107": "계통명",
+ "108": "신뢰도 높음",
+ "109": "신뢰도 보통",
+ "110": "신뢰도 낮음",
+ "111": "읽지 못함",
+ "112": "FormChem 명명",
+ "113": "이름을 읽지 못했습니다",
+ "114": "이름으로 구조 삽입",
+ "115": "이름으로 구조",
+ "116": "이름(예: aspirin 또는 2-methylpropan-1-ol)",
+ "117": "화학명",
+ "118": "이름을 입력하면 구조가 표시됩니다.",
+ "119": "이 이름에 해당하는 구조가 없습니다",
+ "120": "사전",
+ "121": "계통명 파서",
+ "122": "규칙 기반 명명기(왕복 검증)",
+ "123": "스펙트럼 도구",
+ "124": "스펙트럼 전체 보기",
+ "125": "Y축",
+ "126": "이 범위를 페이지에 표시",
+ "127": "도면의 스펙트럼을 더블클릭하면 여기에서 편집할 수 있습니다.",
+ "128": "피크와 적분",
+ "129": "예측",
+ "130": "적분값",
+ "131": "원자에 연결",
+ "132": "연결 해제",
+ "133": "원자 1개",
+ "134": "연결할 원자",
+ "135": "원자를 더 클릭한 다음 완료를 누르세요.",
+ "136": "도면에서 이 피크에 해당하는 원자를 클릭한 다음 완료를 누르세요.",
+ "137": "해당 범위에는 적분할 것이 없습니다.",
+ "138": "피크 제거",
+ "139": "피크 추가",
+ "140": "원자 1개에 연결됨",
+ "141": "스펙트럼 범위 설정",
+ "142": "양수를 입력하세요.",
+ "143": "적분값을 설정하지 못했습니다",
+ "144": "이동과 확대/축소: 드래그하면 이동, 휠로 확대/축소, Shift+드래그로 범위에 맞춰 확대",
+ "145": "범위에 맞춰 확대: 플롯 위를 드래그",
+ "146": "피크 검출: 범위를 드래그",
+ "147": "피크 추가 또는 제거: 피크 근처를 클릭",
+ "148": "적분: 범위를 드래그",
+ "149": "피크",
+ "150": "적분",
+ "151": "다중선",
+ "152": "원자 {0}개",
+ "153": "연결됨: {0}",
+ "154": "드래그하면 이동, 휠로 확대/축소, Shift+드래그로 범위에 맞춰 확대합니다. 레이블을 클릭하면 선택합니다.",
+ "155": "플롯 위를 드래그하면 그 범위로 확대합니다.",
+ "156": "범위를 드래그하면 그 범위의 피크를 검출합니다.",
+ "157": "피크 근처를 클릭하면 추가하고, 피크 레이블을 클릭하면 제거합니다.",
+ "158": "범위를 드래그하면 적분합니다.",
+ "159": "원자 {0}개에 연결됨"
+}
diff --git a/frontend/src/i18n/locales/ko/part13.json b/frontend/src/i18n/locales/ko/part13.json
new file mode 100644
index 00000000..481732a2
--- /dev/null
+++ b/frontend/src/i18n/locales/ko/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "엔진이 빈 파일을 반환했습니다",
+ "1": "이름이 {0}자를 넘습니다",
+ "2": "원자가 {0}개를 넘는 조각은 이름을 붙이지 않습니다",
+ "3": "구조에 레이블, R기 또는 임의 원자가 있어 이름을 붙일 수 없습니다.",
+ "4": "구조를 분자로 읽을 수 없습니다(원자가를 확인하세요).",
+ "5": "이름을 붙일 구조가 없습니다.",
+ "6": "도치 색인명(모체를 먼저 쓰고 쉼표 뒤에 치환기를 쓰는 형식)은 읽지 않습니다. 1,2-dichlorobenzene처럼 일반 순서로 이름을 쓰세요.",
+ "7": "D-와 L-는 FormChem 사전에 있는 아미노산과 당에서만 읽습니다. 다른 이름에는 R 또는 S 기호를 지정하세요.",
+ "8": "FormChem이 이름 전체를 읽었지만 완전한 구조 이름이 되지 않습니다(hexane이나 benzene 같은 모체 또는 접미사가 빠졌을 수 있습니다).",
+ "9": "FormChem이 {0}번째 문자 (\"{1}\")부터 이름을 읽지 못했습니다.",
+ "10": "FormChem이 이름을 읽었지만 {0}.",
+ "11": "구조를 완성하지 못했습니다",
+ "12": "이 이름은 둘 이상의 방식으로 읽을 수 있습니다. FormChem은 가정이 가장 적은 해석으로 그렸습니다.",
+ "13": "이름에 입체 기술자가 없어 입체 중심과 이중 결합은 입체 미지정으로 그려집니다.",
+ "14": "계통명 없음: {0}.",
+ "15": "FormChem이 만든 계통명이 같은 구조로 다시 읽히지 않아 표시하지 않습니다.",
+ "16": "그 이중 결합은 E 또는 Z가 될 수 없습니다",
+ "17": "기술자의 위치 번호 {0}은(는) 모체의 위치가 아닙니다",
+ "18": "{0}번 위치는 E 또는 Z가 될 수 있는 이중 결합의 시작이 아닙니다",
+ "19": "{0}에는 cis 또는 trans가 될 수 있는 이중 결합이 정확히 하나 필요한데, 이 구조에는 {1}개 있습니다",
+ "20": "이 이중 결합에서는 {0}이(가) 명확하지 않습니다. 대신 E 또는 Z를 지정하세요",
+ "21": "({0})에는 위치 번호가 필요합니다. 이 구조에는 입체 중심이 {1}개 있습니다",
+ "22": "{0}번 위치는 입체 중심이 아니므로 ({1})을(를) 적용할 수 없습니다",
+ "23": "({0})에는 위치 번호가 필요합니다. 이 구조에는 E 또는 Z가 될 수 있는 이중 결합이 {1}개 있습니다",
+ "24": "{0}번 위치에는 {1}을(를) 지정할 수 없습니다",
+ "25": "그 이중 결합에는 {0}을(를) 지정할 수 없습니다",
+ "26": "{0}은(는) 어떤 배치를 뜻하는지 알 수 없으므로 구조는 입체 없이 그려집니다.",
+ "27": "{0}에는 결합 위치가 없습니다",
+ "28": "{1}에 {0}을(를) 둘 자리가 없습니다",
+ "29": "{0}은(는) 그곳에 결합할 수 없습니다",
+ "30": "탄소가 {0}개를 넘는 사슬은 아직 읽지 못합니다",
+ "31": "{0}은(는) 고리가 되기에는 너무 작습니다",
+ "32": "{0}-{1}은(는) FormChem이 아직 이름으로 그리지 못하는 호변 이성질체입니다",
+ "33": "위치 번호 {0}은(는) {1}의 위치가 아닙니다",
+ "34": "{0}은(는) 사슬의 위치가 아닙니다",
+ "35": "{1}의 {0}번 위치에서는 다중 결합이 시작될 수 없습니다",
+ "36": "{1}의 {0}번 위치에는 그 다중 결합을 둘 수 없습니다",
+ "37": "{1}의 {0}번 위치에는 다중 결합을 둘 자리가 없습니다",
+ "38": "{0}의 다중 결합을 둘 자리가 없습니다",
+ "39": "{0}의 다중 결합 위치가 지정되지 않아 가장 낮은 위치에 그렸습니다.",
+ "40": "-{0}에는 열린 사슬이 필요합니다. 고리에서는 접미사가 carbaldehyde, carboxylic acid, carbonitrile 또는 carboxamide가 됩니다",
+ "41": "사슬의 끝은 두 곳뿐이므로 -{0}은(는) 두 개까지입니다",
+ "42": "{0}은(는) 너무 짧아 -{1}을(를) 두 개 둘 수 없습니다",
+ "43": "{1}에 -{0}을(를) 둘 자리가 없습니다",
+ "44": "{1}에서 -{0}의 위치가 지정되지 않아 가장 낮은 위치에 그렸습니다.",
+ "45": "-{0}은(는) 사슬의 끝에 있어야 하며 {1}에는 둘 수 없습니다",
+ "46": "{1}에 -{0}을(를) 둘 자리가 없습니다",
+ "47": "ortho, meta, para에는 벤젠 고리가 필요합니다",
+ "48": "기가 하나뿐인 ortho, meta, para에는 phenol, aniline, toluene 같은 모체가 필요합니다",
+ "49": "{1}에 {0}을(를) 둘 자리가 없습니다",
+ "50": "{2}에 {0}기를 {1}개 둘 자리가 없습니다",
+ "51": "{1}에서 {0}의 위치가 지정되지 않아 비어 있는 가장 낮은 위치에 그렸습니다.",
+ "52": "{0}에는 치환기를 붙일 수 없습니다",
+ "53": "아실기는 카르보닐 탄소에서 결합합니다",
+ "54": "{0}에는 비어 있는 위치가 없습니다",
+ "55": "{0}의 결합 위치가 지정되지 않아 {1}번 위치로 가정했습니다.",
+ "56": "{0}에는 결합할 자리가 남아 있지 않습니다",
+ "57": "{1} 앞의 위치 번호 {0}은(는) 사용되지 않습니다",
+ "58": "{0}은(는) 별도의 단어로 쓸 수 없습니다",
+ "59": "\"{0}\" 앞에는 기가 {1}개 필요한데 이름에는 {2}개 있습니다",
+ "60": "\"{0}\" 앞에는 기가 {1}개 필요한데 이름에는 {2}개 있습니다",
+ "61": "에스터 위치 {1}개에 대해 이름에는 알킬기가 {0}개 있습니다",
+ "62": "에스터 위치 {1}개에 대해 이름에는 알킬기가 {0}개 있습니다",
+ "63": "에스터 위치 {1}개에 대해 이름에는 알킬기가 {0}개 있습니다",
+ "64": "에스터 위치 {1}개에 대해 이름에는 알킬기가 {0}개 있습니다",
+ "65": "이름이 나타내는 구조가 올바르지 않습니다 ({0})",
+ "66": "{0}번 위치의 -one은 알데하이드가 됩니다. 알데하이드는 -al로 명명합니다",
+ "67": "{1}의 {0}번 위치",
+ "68": "동일한 치환기가 너무 많습니다",
+ "69": "위치 번호가 섞여 있습니다",
+ "70": "특이한 결합 유형은 아직 명명하지 못합니다",
+ "71": "FormChem이 아직 명명하지 못하는 고리계입니다",
+ "72": "고리 밖 이중 결합이 있는 방향족 고리(피리돈 등)는 아직 명명하지 못합니다",
+ "73": "동위원소와 라디칼은 아직 명명하지 못합니다",
+ "74": "초원자가 할로젠은 명명하지 않습니다",
+ "75": "니트로 외의 전하를 띤 질소기는 아직 명명하지 못합니다",
+ "76": "전하를 띤 원자는 아직 명명하지 못합니다",
+ "77": "황, 질소, 인의 산화물은 아직 명명하지 못합니다",
+ "78": "이 산소기는 아직 명명하지 못합니다",
+ "79": "설폭사이드, 설폰 및 기타 황기는 아직 명명하지 못합니다",
+ "80": "이민, 아조 및 유사한 질소기는 아직 명명하지 못합니다",
+ "81": "{0}은(는) 아직 명명하지 못합니다",
+ "82": "탄소가 20개를 넘는 치환기 사슬은 명명하지 않습니다",
+ "83": "불포화 아실기는 아직 명명하지 못합니다",
+ "84": "치환된 일리덴기는 아직 명명하지 못합니다",
+ "85": "고리 일리덴기는 아직 명명하지 못합니다",
+ "86": "두 곳에서 결합한 고리는 아직 명명하지 못합니다",
+ "87": "고리 치환기의 번호 매기기를 찾지 못했습니다",
+ "88": "알코올 부분이 서로 다른 에스터는 아직 명명하지 못합니다",
+ "89": "모체 사슬 또는 고리를 찾지 못했습니다",
+ "90": "고리형 에스터(락톤)는 아직 명명하지 못합니다",
+ "91": "둘 이상의 아민 또는 아마이드 질소에 치환기가 있는 구조는 아직 명명하지 못합니다",
+ "92": "모체 사슬이나 고리 밖의 입체 중심은 아직 명명하지 못합니다",
+ "93": "모체 사슬 밖의 이중 결합 기하는 아직 명명하지 못합니다",
+ "94": "유사 비대칭 중심은 아직 명명하지 못합니다",
+ "95": "이 이중 결합의 기하는 아직 명명하지 못합니다",
+ "96": "탄소가 20개를 넘는 사슬은 명명하지 않습니다",
+ "97": "동일한 기가 너무 많습니다",
+ "98": "구조에 원자가 오류가 있습니다",
+ "99": "염과 혼합물은 아직 계통적으로 명명하지 못합니다",
+ "100": "중원자가 {0}개를 넘는 구조는 아직 계통적으로 명명하지 못합니다",
+ "101": "{0}의 화합물은 아직 계통적으로 명명하지 못합니다",
+ "102": "쿼리 원자와 R기에는 이름이 없습니다",
+ "103": "단일 헤테로 원자 수소화물은 사전에서만 명명됩니다",
+ "104": "{0}은(는) 이 도면의 개체가 아닙니다.",
+ "105": "{0}에는 원자가 없습니다.",
+ "106": "조각에 원자가 없습니다.",
+ "107": "도면에 페이지가 없습니다.",
+ "108": "{0}은(는) 이 도면의 스펙트럼이 아닙니다.",
+ "109": "이 예측이 속한 구조 {0}이(가) 더 이상 도면에 없습니다.",
+ "110": "도면 {0}이(가) 닫혔습니다.",
+ "111": "화학적 이동 (ppm)",
+ "112": "시간 (s)",
+ "113": "반사율",
+ "114": "상대 존재비",
+ "115": "##{0}=이(가) 두 번 이상 나타납니다. 첫 번째 값을 유지했습니다.",
+ "116": "##XYDATA={0}은(는) 알려진 변수 목록이 아닙니다. (X++(Y..Y))로 읽었습니다.",
+ "117": "##{0}={1}은(는) 알려진 변수 목록이 아닙니다. (XY..XY)로 읽었습니다.",
+ "118": "점이 x 순서로 정렬되어 있지 않아 정렬했습니다.",
+ "119": "##.SHIFT REFERENCE={0}을(를) 읽을 수 없어 화학적 이동의 기준 보정을 하지 않았습니다.",
+ "120": "##.SHIFT REFERENCE가 가리키는 점 {0}이(가) {1}개 점의 범위 밖이어서 화학적 이동의 기준 보정을 하지 않았습니다.",
+ "121": "점 {0}이(가) {1} ppm ({2})이 되도록 화학적 이동의 기준을 보정했습니다.",
+ "122": "파일에 관측 핵종이 지정되어 있지 않습니다.",
+ "123": "시간 영역 NMR 데이터(FID)입니다. 푸리에 변환 없이 측정된 그대로 표시합니다.",
+ "124": "Hz 단위의 주파수를 관측 주파수({0} MHz)로 나누어 ppm으로 바꾸었습니다.",
+ "125": "##.SHIFT REFERENCE가 없어 0 Hz를 0 ppm으로 간주했습니다.",
+ "126": "##.OBSERVE FREQUENCY가 없어 화학적 이동 축은 Hz로 유지됩니다.",
+ "127": "투과율이 분수로 저장되어 있어 백분율로 표시합니다.",
+ "128": "블록 {0}에 {1}개를 넘는 점이 있습니다.",
+ "129": "x축 단위가 {1}인 ##DATA TYPE={0}은(는) 알려진 측정법이 아니어서 일반 스펙트럼으로 그렸습니다.",
+ "130": "##BLOCKS={0}이지만 LINK 블록에는 블록이 {1}개 있습니다. 찾은 블록은 모두 읽었습니다.",
+ "131": "JCAMP-DX 파일이 아닙니다. ##TITLE= 레코드가 없습니다.",
+ "132": "파일에 LINK 블록 없이 블록 {0}개가 연달아 있습니다. 각각 읽었습니다.",
+ "133": "두 블록이 같은 ##BLOCK_ID를 가지고 있습니다.",
+ "134": "FormChem이 그릴 수 있는 스펙트럼이 파일에 없습니다 ({0}).",
+ "135": "블록 \"{0}\"을(를) 그리지 않았습니다: {1}.",
+ "136": "구조 블록(JCAMP-CS)입니다. 파일에는 보관되지만 그려지지 않습니다",
+ "137": "XYDATA, XYPOINTS, PEAK TABLE, NTUPLES가 없습니다",
+ "138": "데이터 표에 점이 없습니다",
+ "139": "NTUPLES 표에 기호가 선언되어 있지 않습니다",
+ "140": "2D NTUPLES 스펙트럼은 아직 지원하지 않습니다",
+ "141": "NTUPLES 표에 읽을 수 있는 페이지가 없습니다",
+ "142": "파일에 ASCII 밖의 문자가 있습니다. UTF-8로 읽었습니다.",
+ "143": "파일에 ASCII도 UTF-8도 아닌 바이트가 있습니다. Latin-1로 읽었습니다.",
+ "144": "레이블이 붙은 데이터 레코드 밖의 줄은 무시했습니다.",
+ "145": "앞에 블록이 없는 ##END=은 무시했습니다.",
+ "146": "첫 번째 ##TITLE= 앞이나 마지막 ##END= 뒤의 레코드는 무시했습니다.",
+ "147": "파일이 ##END= 없이 끝납니다. 열려 있던 블록을 닫았습니다.",
+ "148": "NTUPLES 페이지 {0}",
+ "149": "NTUPLES 페이지 {0}에 ##DATA TABLE=이 없어 건너뛰었습니다.",
+ "150": "NTUPLES 페이지 {0}이(가) ##SYMBOL=에 선언되지 않은 기호({1})를 사용하여 건너뛰었습니다.",
+ "151": "{0}의 데이터 표는 FormChem이 읽지 못하는 형식({1})이어서 건너뛰었습니다.",
+ "152": "NTUPLES 표에 ##END NTUPLES=이 없어 블록 끝까지 읽었습니다.",
+ "153": "NTUPLES 표에 ##SYMBOL= 목록이 없습니다.",
+ "154": "2D 스펙트럼(독립 변수 두 개)입니다. 이 버전에서는 2D 스펙트럼을 그리지 않습니다.",
+ "155": "NTUPLES 표에 페이지가 {0}개 있습니다. 처음 {1}개만 읽었습니다.",
+ "156": "허수 페이지가 실수 페이지와 x 값을 공유하지 않아 제외했습니다.",
+ "157": "NTUPLES 표에 페이지가 {0}개 있습니다. 페이지 {1}을(를) 표시하고 다른 {2}개 페이지는 제외했습니다.",
+ "158": "##DELTAX={0}이(가) (LASTX - FIRSTX) / (NPOINTS - 1) = {1}과(와) 다릅니다. 계산한 간격을 사용합니다.",
+ "159": "{0}에 FIRSTX, LASTX, NPOINTS가 모두 있지 않아 간격은 ##DELTAX에서 가져왔습니다.",
+ "160": "데이터 줄이 DIF 값으로 시작했습니다. 앞줄의 마지막 값에서 이어서 읽었습니다.",
+ "161": "Y 검사 값이 앞줄의 마지막 값과 일치하지 않았습니다. 이전 값에서 줄을 이어서 읽었습니다.",
+ "162": "{1}의 문자 {0}개를 읽지 못해 건너뛰었습니다.",
+ "163": "DIF 줄 {0}개 뒤에 Y 검사 값이 없었습니다.",
+ "164": "{0}에는 데이터 점이 없습니다.",
+ "165": "{0}에는 점이 {1}개 있지만 ##NPOINTS={2}입니다. 줄의 X 값은 FIRSTX에서 LASTX까지 {3}개 점에 맞으므로 그 간격을 사용했습니다.",
+ "166": "{0}에는 점이 {1}개 있지만 ##NPOINTS={2}입니다. 읽은 점은 그대로 유지했습니다.",
+ "167": "줄의 X 값이 FIRSTX와 간격으로 계산한 위치와 일치하지 않습니다. 계산한 위치를 사용했습니다.",
+ "168": "{0}에 FIRSTX, LASTX, NPOINTS가 없어 간격은 줄의 X 값에서 가져왔습니다.",
+ "169": "{0}에는 점을 x축에 배치할 방법이 없어 점에 0, 1, 2 등으로 번호를 붙였습니다.",
+ "170": "첫 줄이 x = {0}에서 시작하지만 ##FIRSTX={1}입니다. FIRSTX를 사용했습니다.",
+ "171": "첫 번째 Y 값 {0}이(가) ##FIRSTY={1}과(와) 일치하지 않습니다.",
+ "172": "{0}의 끝에 값 {1}개로 이루어진 불완전한 묶음이 있어 버렸습니다.",
+ "173": "{0}을(를) 읽을 수 없습니다: {1}.",
+ "174": "스펙트럼이 블록 {0}을(를) 요구하지만 파일에는 블록이 1개뿐입니다.",
+ "175": "스펙트럼이 블록 {0}을(를) 요구하지만 파일에는 블록이 {1}개뿐입니다.",
+ "176": "스펙트럼에 원본이 없습니다.",
+ "177": "스펙트럼의 파일 {0}이(가) 도면에 없습니다.",
+ "178": "이 엔진에는 {0}의 예측기가 없습니다.",
+ "179": "예측에 실패했습니다: {0}",
+ "180": "스펙트럼의 원본이 파일도 예측도 아닙니다.",
+ "181": "도면에 스펙트럼 {0}이(가) 없습니다.",
+ "182": "스틱 스펙트럼에는 적분할 면적이 없습니다.",
+ "183": "값은 0보다 커야 합니다.",
+ "184": "from과 to는 서로 다른 두 x 값이어야 합니다.",
+ "185": "스펙트럼에 적분 {0}이(가) 없습니다.",
+ "186": "이 스펙트럼에는 원본 파일이 없습니다. original=1 없이 내보내세요.",
+ "187": "FormChem은 PNG, JPEG, GIF, WebP, SVG 그림과 JCAMP-DX 스펙트럼을 배치합니다."
+}
diff --git a/frontend/src/i18n/locales/ko/part14.json b/frontend/src/i18n/locales/ko/part14.json
new file mode 100644
index 00000000..1d538f39
--- /dev/null
+++ b/frontend/src/i18n/locales/ko/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "표시",
+ "1": "표면",
+ "2": "내보낼 내용이 없습니다. 3D 보기가 비어 있습니다.",
+ "3": "내보내기 실패",
+ "4": "3D로 표시할 구조를 선택하세요.",
+ "5": "3D 만들기",
+ "6": "3D 보기 삽입",
+ "7": "PDB, mmCIF, SDF 또는 MOL 파일을 선택하세요.",
+ "8": "3D 구조를 페이지에 배치하지 못했습니다",
+ "9": "PDB 또는 mmCIF 파일에서 연 3D 개체를 선택하세요.",
+ "10": "이 모델에는 리간드가 없습니다.",
+ "11": "리간드를 추출하지 못했습니다",
+ "12": "아직 3D 좌표가 없습니다. 3D 만들기는 도면에서 컨포머를 만듭니다.",
+ "13": "3D 구조 파일...",
+ "14": "리간드 추출...",
+ "15": "3D 구조 내보내기...",
+ "16": "이면각 스캔...",
+ "17": "3D에서 측정",
+ "18": "3D 보기를 PNG로 내보내기...",
+ "19": "3D 보기를 glTF로 내보내기...",
+ "20": "추출함 {0}: {1} (결합 차수 추정)",
+ "21": "추출함 {0}: {1}",
+ "22": "먼저 3D 보기를 여세요",
+ "23": "선택한 구조(또는 페이지에서 선택한 3D 개체)에 대해 3D 보기 패널을 열고 선택을 따라갑니다. 구조에는 먼저 3D 좌표가 필요하며, 3D 만들기로 만듭니다.",
+ "24": "선택한 구조의 3D 컨포머를 2D 도면에서 만들고(쐐기, 이중 결합 기하, 전하 유지) 선택한 힘장으로 최소화한 뒤 실행 취소 한 단계로 도면에 저장합니다. 3D 보기에 표시됩니다.",
+ "25": "3D 보기에서 선택한 힘장(기본값 MMFF94, MMFF94에 매개변수가 없으면 UFF)으로 선택한 구조의 표시 중인 컨포머를 최소화하고, 최소화 전후의 에너지를 알려 줍니다(실행 취소 한 단계).",
+ "26": "선택한 구조의 컨포머 앙상블을 생성하고(ETKDG, RMSD로 걸러내고 각각 최소화) 에너지 범위 안의 것만 유지합니다. n, window, method를 지정하면 대화상자 없이 실행합니다.",
+ "27": "생성할 컨포머 수",
+ "28": "에너지 범위 (kcal/mol)",
+ "29": "선택한 구조 옆의 페이지에 3D 보기를 배치하고(3D 좌표가 없으면 먼저 생성) 그것에 연결된 3D 보기 패널을 엽니다. 모델을 돌리거나 스타일을 바꾸면 페이지의 그림도 갱신됩니다.",
+ "30": "PDB, mmCIF, SDF 또는 MOL 파일을 페이지에 3D 개체로 열고(단백질은 카툰, 리간드는 볼 앤 스틱, 물은 숨김, 리간드에 초점) 3D 보기에 표시합니다.",
+ "31": "선택한 3D 개체(PDB 또는 mmCIF 파일에서 연 것)의 리간드를 옆의 2D 구조로 바꿉니다(실행 취소 한 단계). 결합 차수는 흔한 리간드는 내장 템플릿에서, 그 밖에는 기하에서 추정하여 알려 줍니다. 파일의 좌표는 그 컨포머가 됩니다. ligand를 지정하면 그 리간드를 쓰고, 생략하고 모델에 리간드가 여럿이면 묻습니다.",
+ "32": "리간드 키 chain:het:number 또는 het 코드",
+ "33": "PDB 또는 mmCIF 파일에서 연 3D 개체를 선택하세요",
+ "34": "선택한 구조의 3D 좌표를 모든 수소와 함께 저장합니다. MDL molfile(표시 중인 컨포머), SD 파일(모든 컨포머, 에너지와 방법 데이터 필드 포함), PDB 또는 XYZ(표시 중인 컨포머, 또는 모든 컨포머를 모델 또는 프레임으로). PDB 또는 mmCIF 파일에서 연 3D 개체는 원본 파일을 저장합니다. format을 생략하면 묻습니다.",
+ "35": "파일 형식",
+ "36": "표시 중인 컨포머 대신 모든 컨포머(sdf는 기본값 true)",
+ "37": "3D 보기에서 고른 네 원자(또는 마지막 이면각 측정)의 이면각을 이완 최소화와 함께 스캔하고 각도 대 에너지를 그립니다.",
+ "38": "3D 보기에서 거리(원자 2개), 각도(3개) 또는 이면각(4개)을 측정하여 목록에 추가합니다. atoms(a1 같은 조각 원자 ID, 수소는 a1:h0, 또는 PDB 일련번호)를 지정하면 그 원자를 측정하고, 생략하면 선택 모드로 전환합니다.",
+ "39": "원자 ID 2개에서 4개",
+ "40": "3D 보기를 화면 크기의 PNG 그림으로 저장합니다. transparent를 지정하면 배경을 뺍니다.",
+ "41": "3D 보기를 바이너리 glTF 2.0 파일(.glb)로 저장합니다. 원자는 구, 결합은 원기둥으로 원소 색을 입히고 1옹스트롬 = 1 cm이며, 3D 뷰어, 슬라이드, 인쇄용입니다.",
+ "42": "표면 없음",
+ "43": "3D 보기에서 분자 표면을 제거합니다.",
+ "44": "반데르발스 표면",
+ "45": "3D 보기에 반데르발스 표면을 표시합니다.",
+ "46": "용매 접근 가능 표면",
+ "47": "3D 보기에 용매 접근 가능 표면(프로브 1.4옹스트롬)을 표시합니다.",
+ "48": "용매 배제 표면",
+ "49": "3D 보기에 용매 배제 표면을 표시합니다.",
+ "50": "ESP 매핑 표면",
+ "51": "엔진의 경험적 부분 전하로 구한 근사 정전기 퍼텐셜로 표면에 색을 입힙니다(빨강은 음, 파랑은 양). 방법을 밝히는 범례가 붙습니다.",
+ "52": "3D 보기를 와이어 스타일로 표시합니다. 페이지의 3D 개체에서는 선택이 개체와 함께 저장됩니다.",
+ "53": "3D 보기를 스틱 스타일로 표시합니다. 페이지의 3D 개체에서는 선택이 개체와 함께 저장됩니다.",
+ "54": "볼 앤 스틱",
+ "55": "3D 보기를 볼 앤 스틱 스타일로 표시합니다. 페이지의 3D 개체에서는 선택이 개체와 함께 저장됩니다.",
+ "56": "공간 채움",
+ "57": "3D 보기를 공간 채움 스타일로 표시합니다. 페이지의 3D 개체에서는 선택이 개체와 함께 저장됩니다.",
+ "58": "카툰",
+ "59": "3D 보기를 카툰 스타일로 표시합니다(단백질과 핵산, 리간드는 볼 앤 스틱 유지). 페이지의 3D 개체에서는 선택이 개체와 함께 저장됩니다.",
+ "60": "이면각 (도)",
+ "61": "상대 에너지 (kcal/mol)",
+ "62": "최소 {0}°",
+ "63": "3D 구조 내보내기",
+ "64": "모든 컨포머(SDF 레코드, PDB 모델, XYZ 프레임)",
+ "65": "컨포머 1개를 저장합니다. 모든 수소가 3D 위치와 함께 기록됩니다.",
+ "66": "리간드 추출",
+ "67": "리간드",
+ "68": "리간드는 모델 옆의 2D 구조가 되며, 파일의 좌표는 그 컨포머로 유지됩니다.",
+ "69": "추출",
+ "70": "SD 파일 (.sdf)",
+ "71": "MDL Molfile (.mol)",
+ "72": "컨포머 {0}개를 저장합니다. 모든 수소가 3D 위치와 함께 기록됩니다.",
+ "73": "컨포머",
+ "74": "에너지 범위 (kcal/mol)",
+ "75": "고정 시드로 ETKDG 임베딩하고, 중원자 RMSD 0.5 Å 이내의 거의 같은 것을 걸러내며, 각각 최소화합니다. 가장 낮은 것이 표시 중인 컨포머가 됩니다.",
+ "76": "생성",
+ "77": "이면각 스캔 에너지 프로파일",
+ "78": "이면각 스캔",
+ "79": "시작 (도)",
+ "80": "끝 (도)",
+ "81": "간격 (도)",
+ "82": "각 점을 컨포머로 유지(실행 취소 한 단계)",
+ "83": "스캔 실행",
+ "84": "이완 스캔: 각 각도에서 이면각을 고정하고 나머지는 모두 최소화합니다.",
+ "85": "끝 각도는 시작 각도보다 커야 합니다.",
+ "86": "스캔 중...",
+ "87": "스캔 실패",
+ "88": "장벽 {0} kcal/mol",
+ "89": "표시 스타일",
+ "90": "경험적 부분 전하로 구한 정전기 퍼텐셜로 표면에 색 입히기",
+ "91": "ESP",
+ "92": "최소화",
+ "93": "스캔...",
+ "94": "리간드에 초점",
+ "95": "보기 초기화",
+ "96": "회전",
+ "97": "3D 보기 내보내기",
+ "98": "측정",
+ "99": "측정값",
+ "100": "PNG 이미지",
+ "101": "PNG 이미지, 투명",
+ "102": "glTF 바이너리 (.glb)",
+ "103": "3D에는 WebGL이 필요하지만 이 창에서는 제공되지 않습니다.",
+ "104": "3D 뷰어를 불러오는 중...",
+ "105": "3D 뷰어를 불러오지 못했습니다",
+ "106": "도면을 열고 구조를 선택하면 3D로 볼 수 있습니다.",
+ "107": "페이지에서 구조를 선택하면 3D로 볼 수 있습니다.",
+ "108": "3D 구조를 읽지 못했습니다",
+ "109": "이 컨포머는 molfile로 기록할 수 없습니다",
+ "110": "회전이 꺼져 있습니다. 시스템이 동작 줄이기를 요청했습니다",
+ "111": "PDB 또는 CIF 모델에는 컨포머가 없습니다.",
+ "112": "에너지는 가장 낮은 것에 대한 상대값입니다. 클릭하면 표시합니다.",
+ "113": "3D 만들기 또는 컨포머...로 이 목록을 채웁니다.",
+ "114": "부분 전하를 사용할 수 없습니다",
+ "115": "엔진에 아직 3D 경로가 없습니다",
+ "116": "수렴하지 않음",
+ "117": "결합된 원자 네 개를 차례로 고르세요(이면각). 그다음 스캔합니다.",
+ "118": "기하 구조를 보려면 각 점을 컨포머로 유지를 선택하세요.",
+ "119": "컨포머 표시",
+ "120": "3D 보기 갱신",
+ "121": "페이지 스냅샷을 갱신하지 못했습니다",
+ "122": "표면 없음",
+ "123": "반데르발스",
+ "124": "용매 접근 가능",
+ "125": "용매 배제",
+ "126": "거리",
+ "127": "각도",
+ "128": "이면각",
+ "129": "{0} kcal/mol, {1}, 수렴하지 않음",
+ "130": "선택함 {0} / {1}: {2}",
+ "131": "측정할 원자를 {0}개 클릭하세요",
+ "132": "ESP ({0}): {1}, 빨강 {2} e에서 파랑 +{3} e",
+ "133": "거리 {0}: {1}",
+ "134": "각도 {0}: {1}",
+ "135": "이면각 {0}: {1}",
+ "136": "만듦: {0}",
+ "137": "최소화함: {0}",
+ "138": "{1}개 중 컨포머 {0}개 유지",
+ "139": "컨포머 {0}개 유지",
+ "140": "이면각 {0}",
+ "141": "PNG 인코딩 실패"
+}
diff --git a/frontend/src/i18n/locales/ko/part15.json b/frontend/src/i18n/locales/ko/part15.json
new file mode 100644
index 00000000..214b269f
--- /dev/null
+++ b/frontend/src/i18n/locales/ko/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "근사값, 경험적 전하 기반",
+ "1": "입체 중심 또는 이중 결합 {0}개가 지정되지 않아 하나의 배치를 골랐습니다.",
+ "2": "도면의 입체 레이블 {0}개는 3D에서 재현되지 않습니다.",
+ "3": "향상된 입체 그룹 {0}에서 그려진 구성원을 만들었습니다. 3D 모델은 도면이 나타내는 혼합물(상대 또는 라세미)의 입체 이성질체 중 하나입니다.",
+ "4": "그려진 입체를 유지하기 위해 {0}회 임베딩했습니다 (시드 {1}).",
+ "5": "중원자 {0}쌍이 반데르발스 접촉 거리의 {1}보다 가깝습니다.",
+ "6": "범용 힘장(UFF)을 사용했습니다: {0}.",
+ "7": "{1}에 대한 {0} 매개변수가 없습니다",
+ "8": "{0}이(가) 모든 원자의 유형을 정하지 못했습니다",
+ "9": "컨포머 {0}개가 최소화 중 그려진 입체를 바꾸어 제외했습니다.",
+ "10": "중원자가 300개를 넘습니다. 이 크기에서는 컨포머 샘플링 품질이 떨어집니다.",
+ "11": "중심 결합이 고리 안에 있습니다. 고리가 각도에 맞추어 뒤틀립니다.",
+ "12": "구조에 3D 좌표가 없어 스캔은 새 임베딩에서 시작했습니다.",
+ "13": "3D를 계산하는 동안 구조가 바뀌었습니다. 명령을 다시 실행하세요.",
+ "14": "도면에 개체 {0}이(가) 없습니다.",
+ "15": "{0}에는 아직 3D 좌표가 없습니다. 먼저 3D를 만드세요.",
+ "16": "{0}에는 컨포머 {1}이(가) 없습니다.",
+ "17": "구조에 원자가 없습니다.",
+ "18": "3D에는 실제 원자가 필요합니다. 원자 {0}개가 레이블, R기 또는 부착점입니다 ({1}).",
+ "19": "수소를 추가하지 못했습니다: {0}",
+ "20": "구조에는 수소를 포함해 원자가 {0}개 있습니다. 3D는 {1}개까지 처리합니다.",
+ "21": "3D 좌표가 이 구조와 맞지 않습니다({0}에 대한 것이 없음). 3D를 다시 만드세요.",
+ "22": "3D 좌표가 이 구조와 맞지 않습니다(수소 수가 바뀜). 3D를 다시 만드세요.",
+ "23": "구조를 3D로 임베딩하지 못했습니다: {0}",
+ "24": "구조를 3D로 임베딩하지 못했습니다. 원자가와 입체를 확인하세요.",
+ "25": "컨포머를 임베딩하지 못했습니다: {0}",
+ "26": "임베딩할 수 있는 컨포머가 없습니다. 구조의 원자가와 입체를 확인하세요.",
+ "27": "임베딩된 모든 컨포머가 최소화 후 그려진 입체를 잃었습니다.",
+ "28": "이 구조에 대한 매개변수를 가진 힘장이 없습니다 ({0}).",
+ "29": "범용 힘장을 설정하지 못했습니다: {0}",
+ "30": "범용 힘장을 설정하지 못했습니다.",
+ "31": "알 수 없는 원자 {0}. 조각 원자 ID를 쓰거나 수소는 a1:h0 형식으로 쓰세요.",
+ "32": "네 원자는 서로 달라야 합니다.",
+ "33": "네 원자는 결합으로 이어진 사슬(a1-a2-a3-a4)이어야 합니다.",
+ "34": "3D 파일을 기록하지 못했습니다: {0}",
+ "35": "FormChem이 읽을 수 있는 PDB, mmCIF, SDF 또는 MOL 파일이 아닙니다.",
+ "36": "파일의 원자가 {0}개를 넘습니다.",
+ "37": "PDB 파일에 ATOM 또는 HETATM 레코드가 없습니다.",
+ "38": "mmCIF atom_site 표에 Cartn_x, Cartn_y, Cartn_z 열이 없습니다.",
+ "39": "CIF에 분율 좌표는 있지만 완전한 단위 셀이 없습니다.",
+ "40": "CIF에 atom_site 표가 없습니다.",
+ "41": "CIF에 읽을 수 있는 원자가 없습니다.",
+ "42": "파일에 레코드가 없습니다.",
+ "43": "파일에 레코드가 {0}개 있습니다. 3D 가져오기는 {1}개까지 읽습니다.",
+ "44": "파일의 레코드를 하나도 읽지 못했습니다.",
+ "45": "{0}은(는) PDB 또는 mmCIF 파일이 아닙니다.",
+ "46": "{0}을(를) FormChem 도면으로 바꾸지 못했습니다: {1}.",
+ "47": "PDB 모델을 3D 개체로 배치했습니다: {0}.",
+ "48": "mmCIF 모델을 3D 개체로 배치했습니다: {0}.",
+ "49": "좌표를 읽을 수 없는 ATOM 또는 HETATM 줄 {0}개를 건너뛰었습니다.",
+ "50": "좌표를 읽을 수 없는 atom_site 행 {0}개를 건너뛰었습니다.",
+ "51": "저분자 CIF: 비대칭 단위를 분율 좌표에서 읽습니다. 대칭 짝은 생성하지 않습니다.",
+ "52": "{0}에 원자가 문제가 있습니다. 정제하지 않고 읽었습니다.",
+ "53": "{0}에는 2D 좌표만 있습니다. 컨포머는 유지하지 않았습니다.",
+ "54": "수소 {0}개가 파일에 없어 기하에서 배치했습니다.",
+ "55": "{0}을(를) 읽지 못했습니다: {1}",
+ "56": "{0}을(를) 읽지 못했습니다.",
+ "57": "레코드 {0}",
+ "58": "구조",
+ "59": "파일의 3D 좌표를 구조 1개의 컨포머로 유지했습니다. 보려고 3D 만들기를 할 필요는 없습니다.",
+ "60": "파일의 3D 좌표를 구조 {0}개의 컨포머로 유지했습니다. 보려고 3D 만들기를 할 필요는 없습니다.",
+ "61": "{0}은(는) 단일 이온입니다. 추출할 구조가 없습니다.",
+ "62": "{0}의 원자를 읽지 못했습니다.",
+ "63": "구조에 리간드 {0}이(가) 없습니다. 리간드: {1}.",
+ "64": "도면에 3D 모델 {0}이(가) 없습니다.",
+ "65": "FormChem은 PNG, JPEG, GIF, WebP, SVG 그림, JCAMP-DX 스펙트럼, PDB, mmCIF, SDF, MOL 구조 파일을 배치합니다."
+}
diff --git a/frontend/src/i18n/locales/nb/part12.json b/frontend/src/i18n/locales/nb/part12.json
new file mode 100644
index 00000000..0256024f
--- /dev/null
+++ b/frontend/src/i18n/locales/nb/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spekter",
+ "1": "Tegn eller velg en struktur som skal navngis.",
+ "2": "Navn kunne ikke beregnes",
+ "3": "FormChem har ikke noe navn på denne strukturen.",
+ "4": "Kopier navn",
+ "5": "Navn kopiert: {0}",
+ "6": "Kjemisk navn som skal settes inn; utelat det for å åpne dialogen",
+ "7": "Kopierer navnet på den valgte strukturen (eller på strukturene på siden) som ren tekst: trivialnavnet når FormChem kjenner ett, ellers det systematiske navnet, som bare tilbys når det leses tilbake til samme struktur.",
+ "8": "trivial eller systematic for å velge hvilket navn som kopieres; utelat det for det første",
+ "9": "Det predikerte spekteret er oppdatert.",
+ "10": "Oppdater predikert spekter",
+ "11": "Velg én struktur først",
+ "12": "Velg et predikert spekter først",
+ "13": "Predikert 1H NMR-spekter lagt til ({0})",
+ "14": "Predikert 13C NMR-spekter lagt til ({0})",
+ "15": "Predikert spekter oppdatert ({0})",
+ "16": "Strukturens fragment-id; standard er den valgte strukturen, eller den eneste på siden",
+ "17": "Spektrometerets frekvens i MHz (standard 400 for 1H, 100 for 13C)",
+ "18": "Legger til et predikert 1H NMR-spekter av den valgte strukturen ved siden av den, som ett angretrinn: et spekterobjekt beregnet med FormChems egne inkrementregler (ingen database over kjemiske skift), der multipletter og integraler er koblet til strukturens atomer, med metode, versjon og frekvens som tittel. Kurven beregnes på nytt fra strukturen og lagres aldri.",
+ "19": "Legger til et predikert 13C NMR-spekter av den valgte strukturen ved siden av den, som ett angretrinn: et spekterobjekt beregnet med FormChems egne inkrementregler (ingen database over kjemiske skift), der toppene er koblet til strukturens atomer, med metode, versjon og frekvens som tittel. Kurven beregnes på nytt fra strukturen og lagres aldri.",
+ "20": "Kunne ikke predikere spekteret",
+ "21": "Prediker 1H NMR-spekter",
+ "22": "Prediker 13C NMR-spekter",
+ "23": "Beregner multipletter, integraler eller topper i et predikert spekter på nytt etter at strukturen er endret, med den kjørende versjonen av prediktoren, som ett angretrinn; ingenting endres når det er oppdatert.",
+ "24": "Id for det predikerte spekteret; standard er det valgte eller det som er åpent i spekterredigereren",
+ "25": "Kunne ikke oppdatere spekteret",
+ "26": "Ingen nye topper i dette området.",
+ "27": "Dra over et område i spekterredigereren for å integrere det.",
+ "28": "Koble topp til atomer",
+ "29": "Fjern kobling for topp",
+ "30": "Y-akse for spekter",
+ "31": "Spekter fra fil...",
+ "32": "Rediger spekter...",
+ "33": "Finn topper",
+ "34": "Integrer",
+ "35": "Transmittans eller absorbans",
+ "36": "Eksporter spekter...",
+ "37": "Velg et spekter først",
+ "38": "ingen spekter med id {0}",
+ "39": "Topper funnet: {0} (allerede der: {1})",
+ "40": "Topper funnet: {0}",
+ "41": "Integraler er for NMR-spektre",
+ "42": "Velg en topp, et integral eller et multiplett i spekterredigereren først",
+ "43": "Atomene må alle tilhøre én struktur",
+ "44": "Bare IR-, Raman- og UV-Vis-spektre kan bytte mellom transmittans og absorbans",
+ "45": "Eksportert: {0}",
+ "46": "Id for spekterobjektet; standard er det valgte spekteret eller det som er åpent i spekterredigereren",
+ "47": "Importerer en JCAMP-DX-spekterfil til den aktive tegningen (ett spekterobjekt per datablokk, filen beholdes byte for byte), som ett angretrinn per fil. Uten path åpnes en fildialog.",
+ "48": "Absolutt sti til en .jdx-, .dx- eller .jcamp-fil",
+ "49": "Kunne ikke importere spekteret",
+ "50": "Åpner spekterredigereren for det valgte spekteret (det samme som å dobbeltklikke på det).",
+ "51": "Kunne ikke åpne spekteret",
+ "52": "Finner toppene i et spekter innenfor et område (standard området som vises) og legger dem til topplisten, uten å ta med topper som allerede er der, som ett angretrinn.",
+ "53": "Områdets start i x-enheten (cm-1, nm, m/z, ppm)",
+ "54": "Områdets slutt i x-enheten",
+ "55": "Valgfri deteksjonsterskel i y-enheter",
+ "56": "Erstatt topplisten i stedet for å legge til i den",
+ "57": "Kunne ikke finne topper",
+ "58": "Legger til et NMR-integral over et område, skalert som de eksisterende integralene (eller til value, slik at resten skaleres om), som ett angretrinn. Uten from og to bytter det spekterredigereren til integreringsverktøyet.",
+ "59": "Områdets start i ppm",
+ "60": "Områdets slutt i ppm",
+ "61": "Verdi dette integralet skal vise, for eksempel et antall protoner",
+ "62": "Kunne ikke integrere",
+ "63": "Kobler en topp, et integral eller et multiplett til atomer i en struktur, som ett angretrinn. Uten atoms brukes de valgte atomene, eller det ventes på at brukeren klikker på atomer i tegningen.",
+ "64": "Id for topp, integral eller multiplett; standard er det som er valgt i spekterredigereren",
+ "65": "Id for strukturen (fragmentet) atomene tilhører",
+ "66": "Atom-id-er",
+ "67": "Kunne ikke koble toppen",
+ "68": "Fjerner atomkoblingen fra en topp, et integral eller et multiplett, som ett angretrinn.",
+ "69": "Kunne ikke fjerne koblingen for toppen",
+ "70": "Viser et IR-, Raman- eller UV-Vis-spekter som transmittans eller absorbans (bytter når mode utelates), som ett angretrinn.",
+ "71": "Y-akse som skal vises; utelat for å bytte",
+ "72": "Kunne ikke endre y-aksen",
+ "73": "Lagrer et spekter som JCAMP-DX (med topptabellen når det har topper) eller som CSV med alle punkter, via motoren.",
+ "74": "Filformat, standard jdx",
+ "75": "Med jdx: den opprinnelige importerte filen uendret",
+ "76": "Absolutt sti det skal skrives til; utelat for å bli spurt",
+ "77": "Kunne ikke eksportere spekteret",
+ "78": "Sett inn spekter fra fil",
+ "79": "Filen inneholder ikke noe spekter FormChem kan tegne",
+ "80": "Sett inn spekter",
+ "81": "Spekteret kunne ikke plasseres: filen kom ikke frem til tegningen.",
+ "82": "Spektre satt inn: {0}",
+ "83": "Bølgelengde (µm)",
+ "84": "Bølgetall (cm⁻¹)",
+ "85": "Ramanforskyvning (cm⁻¹)",
+ "86": "Bølgelengde (nm)",
+ "87": "Frekvens (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmittans (%)",
+ "90": "Transmittans",
+ "91": "Absorbans",
+ "92": "Relativ forekomst (%)",
+ "93": "Intensitet",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Predikert {0}, {1} MHz ({2})",
+ "100": "Predikert {0}, {1} MHz",
+ "101": "Predikert {0} ({1})",
+ "102": "Predikert {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spekteret er utilgjengelig: {0}",
+ "105": "Laster spekter",
+ "106": "Trivialnavn",
+ "107": "Systematisk",
+ "108": "Høy sikkerhet",
+ "109": "Middels sikkerhet",
+ "110": "Lav sikkerhet",
+ "111": "Ikke lest",
+ "112": "FormChem-navn",
+ "113": "Kunne ikke lese navnet",
+ "114": "Sett inn struktur fra navn",
+ "115": "Struktur fra navn",
+ "116": "Et navn, for eksempel aspirin eller 2-methylpropan-1-ol",
+ "117": "Kjemisk navn",
+ "118": "Skriv et navn for å se strukturen.",
+ "119": "Ingen struktur for dette navnet",
+ "120": "Ordbok",
+ "121": "Systematisk tolker",
+ "122": "Regelbasert navngiver, kontrollert ved tilbakelesing",
+ "123": "Spekterverktøy",
+ "124": "Vis hele spekteret",
+ "125": "Y-akse",
+ "126": "Vis dette området på siden",
+ "127": "Dobbeltklikk på et spekter i tegningen for å redigere det her.",
+ "128": "Topper og integraler",
+ "129": "Predikert",
+ "130": "Integralverdi",
+ "131": "Koble til atomer",
+ "132": "Fjern kobling",
+ "133": "1 atom",
+ "134": "Atomer som skal kobles",
+ "135": "Klikk på flere atomer, og klikk deretter Ferdig.",
+ "136": "Klikk på atomene i tegningen som hører til denne toppen, og klikk deretter Ferdig.",
+ "137": "Ingenting å integrere i dette området.",
+ "138": "Fjern topp",
+ "139": "Legg til topp",
+ "140": "Koblet til 1 atom",
+ "141": "Angi spekterområde",
+ "142": "Skriv et positivt tall.",
+ "143": "Kunne ikke angi integralet",
+ "144": "Panorer og zoom: dra for å panorere, bruk hjulet for å zoome, Shift-dra for å zoome til et område",
+ "145": "Zoom til et område: dra over plottet",
+ "146": "Finn topper: dra over et område",
+ "147": "Legg til eller fjern en topp: klikk nær en topp",
+ "148": "Integrer: dra over et område",
+ "149": "Topp",
+ "150": "Integral",
+ "151": "Multiplett",
+ "152": "{0} atomer",
+ "153": "Koblet til {0}",
+ "154": "Dra for å panorere, bruk hjulet for å zoome, Shift-dra for å zoome til et område. Klikk på en etikett for å velge den.",
+ "155": "Dra over plottet for å zoome til det området.",
+ "156": "Dra over et område for å finne toppene i det.",
+ "157": "Klikk nær en topp for å legge den til; klikk på en toppetikett for å fjerne den.",
+ "158": "Dra over et område for å integrere det.",
+ "159": "Koblet til {0} atomer"
+}
diff --git a/frontend/src/i18n/locales/nb/part13.json b/frontend/src/i18n/locales/nb/part13.json
new file mode 100644
index 00000000..03005954
--- /dev/null
+++ b/frontend/src/i18n/locales/nb/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "motoren returnerte en tom fil",
+ "1": "navnet er lengre enn {0} tegn",
+ "2": "fragmenter på over {0} atomer navngis ikke",
+ "3": "Strukturen inneholder etiketter, R-grupper eller vilkårlige atomer, som ikke har noe navn.",
+ "4": "Strukturen kunne ikke leses som et molekyl (kontroller valenser).",
+ "5": "Det finnes ingen struktur å navngi.",
+ "6": "Inverterte indeksnavn (stamme først, deretter komma og substituentene) leses ikke; skriv navnet i vanlig rekkefølge, for eksempel 1,2-dichlorobenzene.",
+ "7": "D- og L- leses bare for aminosyrene og sukkerartene i FormChems ordbok; oppgi R- eller S-deskriptorer for andre navn.",
+ "8": "FormChem leste hele navnet, men det utgjør ikke et komplett strukturnavn (en stamme som hexane eller benzene, eller et suffiks, kan mangle).",
+ "9": "FormChem kunne ikke lese navnet fra tegn {0} (\"{1}\").",
+ "10": "FormChem leste navnet, men {0}.",
+ "11": "strukturen kunne ikke fullføres",
+ "12": "Navnet kan leses på mer enn én måte; FormChem tegnet lesemåten med færrest antakelser.",
+ "13": "Navnet gir ingen stereodeskriptorer, så stereosentre og dobbeltbindinger tegnes uspesifisert.",
+ "14": "Ikke noe systematisk navn: {0}.",
+ "15": "Det systematiske navnet FormChem bygde ble ikke lest tilbake til samme struktur, så det vises ikke.",
+ "16": "den dobbeltbindingen kan ikke være E eller Z",
+ "17": "deskriptorens lokant {0} er ikke en posisjon i stammen",
+ "18": "posisjon {0} starter ikke en dobbeltbinding som kan være E eller Z",
+ "19": "{0} krever nøyaktig én dobbeltbinding som kan være cis eller trans; denne strukturen har {1}",
+ "20": "{0} er uklart for denne dobbeltbindingen; oppgi E eller Z i stedet",
+ "21": "({0}) trenger en lokant: strukturen har {1} stereosentre",
+ "22": "posisjon {0} er ikke et stereosenter, så ({1}) kan ikke brukes",
+ "23": "({0}) trenger en lokant: strukturen har {1} dobbeltbindinger som kan være E eller Z",
+ "24": "posisjon {0} kan ikke få {1}",
+ "25": "den dobbeltbindingen kan ikke få {0}",
+ "26": "{0} sier ikke hvilken konfigurasjon som menes, så strukturen tegnes uten stereo.",
+ "27": "{0} har ikke noe festepunkt",
+ "28": "det er ikke plass til {0} ved {1}",
+ "29": "{0} kan ikke binde der",
+ "30": "kjeder med mer enn {0} karbonatomer leses ikke ennå",
+ "31": "{0} er for liten til å være en ring",
+ "32": "{0}-{1} er en tautomer FormChem ikke tegner fra et navn ennå",
+ "33": "lokant {0} er ikke en posisjon i {1}",
+ "34": "{0} er ikke en kjedeposisjon",
+ "35": "en multippel binding kan ikke starte ved posisjon {0} i {1}",
+ "36": "posisjon {0} i {1} kan ikke bære den multiple bindingen",
+ "37": "det er ikke plass til en multippel binding ved posisjon {0} i {1}",
+ "38": "det er ikke plass til de multiple bindingene i {0}",
+ "39": "Posisjonene til de multiple bindingene i {0} ble ikke oppgitt; tegnet ved de laveste posisjonene.",
+ "40": "-{0} krever en åpen kjede; på en ring er suffikset carbaldehyd, karboksylsyre, carbonitril eller carboksamid",
+ "41": "en kjede har bare to ender for -{0}",
+ "42": "{0} er for kort for to -{1}-grupper",
+ "43": "det er ikke plass til -{0} på {1}",
+ "44": "Posisjonen til -{0} på {1} ble ikke oppgitt; tegnet ved den laveste posisjonen.",
+ "45": "-{0} må sitte i enden av kjeden, ikke ved {1}",
+ "46": "det er ikke plass til -{0} ved {1}",
+ "47": "ortho, meta og para krever en benzenring",
+ "48": "ortho, meta eller para med én enkelt gruppe krever en stamme som phenol, aniline eller toluene",
+ "49": "det er ikke plass til {0} på {1}",
+ "50": "det er ikke plass til {0} {1}-grupper på {2}",
+ "51": "Posisjonen til {0} på {1} ble ikke oppgitt; tegnet ved den laveste frie posisjonen.",
+ "52": "{0} kan ikke bære substituenter",
+ "53": "en acylgruppe er festet ved sitt karbonylkarbon",
+ "54": "{0} har ingen ledig posisjon",
+ "55": "Festeposisjonen til {0} ble ikke oppgitt; posisjon {1} er antatt.",
+ "56": "{0} har ikke mer plass å feste til",
+ "57": "lokantene {0} før {1} brukes ikke",
+ "58": "{0} kan ikke stå som et eget ord",
+ "59": "\"{0}\" trenger {1} gruppe foran seg, navnet gir {2}",
+ "60": "\"{0}\" trenger {1} grupper foran seg, navnet gir {2}",
+ "61": "navnet gir {0} alkylgruppe for {1} esterposisjon",
+ "62": "navnet gir {0} alkylgruppe for {1} esterposisjoner",
+ "63": "navnet gir {0} alkylgrupper for {1} esterposisjon",
+ "64": "navnet gir {0} alkylgrupper for {1} esterposisjoner",
+ "65": "strukturen det beskriver er ikke gyldig ({0})",
+ "66": "-one ved {0} ville vært et aldehyd; et aldehyd navngis med -al",
+ "67": "posisjon {0} i {1}",
+ "68": "for mange identiske substituenter",
+ "69": "blandede lokanter",
+ "70": "uvanlige bindingstyper navngis ikke ennå",
+ "71": "et ringsystem FormChem ikke kan navngi ennå",
+ "72": "aromatiske ringer med eksosykliske dobbeltbindinger (som pyridoner) navngis ikke ennå",
+ "73": "isotoper og radikaler navngis ikke ennå",
+ "74": "hypervalente halogener navngis ikke",
+ "75": "ladede nitrogengrupper andre enn nitro navngis ikke ennå",
+ "76": "ladede atomer navngis ikke ennå",
+ "77": "oksider av svovel, nitrogen og fosfor navngis ikke ennå",
+ "78": "denne oksygengruppen navngis ikke ennå",
+ "79": "sulfoksider, sulfoner og andre svovelgrupper navngis ikke ennå",
+ "80": "iminer, azo og lignende nitrogengrupper navngis ikke ennå",
+ "81": "{0} navngis ikke ennå",
+ "82": "substituentkjeder på over 20 karbonatomer navngis ikke",
+ "83": "umettede acylgrupper navngis ikke ennå",
+ "84": "substituerte ylidengrupper navngis ikke ennå",
+ "85": "ringylidengrupper navngis ikke ennå",
+ "86": "ringer festet to ganger navngis ikke ennå",
+ "87": "ingen nummerering funnet for en ringsubstituent",
+ "88": "estere med ulike alkoholdeler navngis ikke ennå",
+ "89": "ingen stammekjede eller stammering funnet",
+ "90": "sykliske estere (laktoner) navngis ikke ennå",
+ "91": "substituenter på mer enn ett amin- eller amidnitrogen navngis ikke ennå",
+ "92": "stereosentre utenfor stammekjeden eller stammeringen navngis ikke ennå",
+ "93": "dobbeltbindingsgeometri utenfor stammekjeden navngis ikke ennå",
+ "94": "pseudoasymmetriske sentre navngis ikke ennå",
+ "95": "denne dobbeltbindingsgeometrien navngis ikke ennå",
+ "96": "kjeder på over 20 karbonatomer navngis ikke",
+ "97": "for mange identiske grupper",
+ "98": "strukturen har valensfeil",
+ "99": "salter og blandinger navngis ikke systematisk ennå",
+ "100": "strukturer med mer enn {0} tunge atomer navngis ikke systematisk ennå",
+ "101": "forbindelser av {0} navngis ikke systematisk ennå",
+ "102": "spørringsatomer og R-grupper har ikke noe navn",
+ "103": "hydrider av enkelte heteroatomer navngis bare fra ordboken",
+ "104": "{0} er ikke et objekt i denne tegningen.",
+ "105": "{0} har ingen atomer.",
+ "106": "Fragmentet har ingen atomer.",
+ "107": "Tegningen har ingen side.",
+ "108": "{0} er ikke et spekter i denne tegningen.",
+ "109": "Strukturen {0} som denne prediksjonen hører til, er ikke lenger i tegningen.",
+ "110": "Tegningen {0} ble lukket.",
+ "111": "Kjemisk skift (ppm)",
+ "112": "Tid (s)",
+ "113": "Reflektans",
+ "114": "Relativ forekomst",
+ "115": "##{0}= forekommer mer enn én gang; den første verdien ble beholdt.",
+ "116": "##XYDATA={0} er ikke en kjent variabelliste; den ble lest som (X++(Y..Y)).",
+ "117": "##{0}={1} er ikke en kjent variabelliste; den ble lest som (XY..XY).",
+ "118": "Punktene var ikke i x-rekkefølge og ble sortert.",
+ "119": "##.SHIFT REFERENCE={0} kunne ikke leses; skiftene ble ikke referert.",
+ "120": "##.SHIFT REFERENCE peker på punkt {0}, utenfor de {1} punktene; skiftene ble ikke referert.",
+ "121": "Skiftene ble referert slik at punkt {0} viser {1} ppm ({2}).",
+ "122": "Filen oppgir ikke den observerte kjernen.",
+ "123": "Dette er NMR-data i tidsdomenet (en FID); de vises som registrert, uten Fourier-transformasjon.",
+ "124": "Frekvenser i Hz ble delt på observasjonsfrekvensen ({0} MHz) for å gi ppm.",
+ "125": "Det finnes ingen ##.SHIFT REFERENCE; 0 Hz ble regnet som 0 ppm.",
+ "126": "Det finnes ingen ##.OBSERVE FREQUENCY, så skiftaksen forblir i Hz.",
+ "127": "Transmittans ble lagret som en brøk og vises som prosent.",
+ "128": "Blokk {0} inneholder mer enn {1} punkter.",
+ "129": "##DATA TYPE={0} med x-enhetene {1} oppgir ingen kjent teknikk; den tegnes som et vanlig spekter.",
+ "130": "##BLOCKS={0}, men LINK-blokken inneholder {1} blokker; alle blokkene som ble funnet, ble lest.",
+ "131": "Dette er ikke en JCAMP-DX-fil: den har ingen ##TITLE=-post.",
+ "132": "Filen inneholder {0} blokker etter hverandre uten en LINK-blokk; hver ble lest.",
+ "133": "To blokker har samme ##BLOCK_ID.",
+ "134": "Filen inneholder ikke noe spekter FormChem kan tegne ({0}).",
+ "135": "Blokken \"{0}\" ble ikke tegnet: {1}.",
+ "136": "en strukturblokk (JCAMP-CS); den beholdes i filen, men tegnes ikke",
+ "137": "den inneholder ingen XYDATA, XYPOINTS, PEAK TABLE eller NTUPLES",
+ "138": "datatabellen inneholder ingen punkter",
+ "139": "NTUPLES-tabellen erklærer ingen symboler",
+ "140": "2D NTUPLES-spektre støttes ikke ennå",
+ "141": "NTUPLES-tabellen har ingen lesbare sider",
+ "142": "Filen inneholder tegn utenfor ASCII; den ble lest som UTF-8.",
+ "143": "Filen inneholder byte som verken er ASCII eller UTF-8; den ble lest som Latin-1.",
+ "144": "Linjer utenfor enhver merket dataoppføring ble ignorert.",
+ "145": "En ##END= uten en blokk foran seg ble ignorert.",
+ "146": "Oppføringer før den første ##TITLE= eller etter den siste ##END= ble ignorert.",
+ "147": "Filen slutter uten ##END=; de åpne blokkene ble lukket.",
+ "148": "NTUPLES-side {0}",
+ "149": "NTUPLES-side {0} har ingen ##DATA TABLE=; den ble hoppet over.",
+ "150": "NTUPLES-side {0} bruker symboler ({1}) som ikke er erklært i ##SYMBOL=; den ble hoppet over.",
+ "151": "{0} har en datatabellform FormChem ikke leser ({1}); den ble hoppet over.",
+ "152": "NTUPLES-tabellen har ingen ##END NTUPLES=; den ble lest til slutten av blokken.",
+ "153": "NTUPLES-tabellen har ingen ##SYMBOL=-liste.",
+ "154": "Dette er et 2D-spekter (to uavhengige variabler); 2D-spektre tegnes ikke i denne versjonen.",
+ "155": "NTUPLES-tabellen har {0} sider; bare de første {1} ble lest.",
+ "156": "Den imaginære siden deler ikke x-verdiene til den reelle siden; den ble utelatt.",
+ "157": "NTUPLES-tabellen inneholder {0} sider; side {1} vises, og {2} andre sider ble utelatt.",
+ "158": "##DELTAX={0} avviker fra (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; den beregnede avstanden brukes.",
+ "159": "{0} har ikke komplett FIRSTX, LASTX og NPOINTS; avstanden kommer fra ##DELTAX.",
+ "160": "En datalinje begynte med en DIF-verdi; den fortsetter fra den siste verdien på linjen før.",
+ "161": "En Y-kontrollverdi stemte ikke med den siste verdien på linjen før; linjen ble fortsatt fra den tidligere verdien.",
+ "162": "{0} tegn i {1} kunne ikke leses og ble hoppet over.",
+ "163": "{0} DIF-linjer ble ikke fulgt av en Y-kontrollverdi.",
+ "164": "{0} inneholder ingen datapunkter.",
+ "165": "{0} inneholder {1} punkter, men ##NPOINTS={2}; linjenes X-verdier passer til {3} punkter fra FIRSTX til LASTX, så den avstanden ble brukt.",
+ "166": "{0} inneholder {1} punkter, men ##NPOINTS={2}; punktene som ble lest, ble beholdt.",
+ "167": "X-verdien på en linje stemmer ikke med posisjonen fra FIRSTX og avstanden; posisjonen ble brukt.",
+ "168": "{0} har ikke FIRSTX, LASTX og NPOINTS; avstanden ble hentet fra linjenes X-verdier.",
+ "169": "{0} gir ingen måte å plassere punktene på x-aksen; de ble nummerert 0, 1, 2 og så videre.",
+ "170": "Den første linjen starter ved x = {0}, men ##FIRSTX={1}; FIRSTX ble brukt.",
+ "171": "Den første Y-verdien {0} stemmer ikke med ##FIRSTY={1}.",
+ "172": "{0} slutter med en ufullstendig gruppe på {1} verdier; den ble droppet.",
+ "173": "Kunne ikke lese {0}: {1}.",
+ "174": "Spekteret ber om blokk {0}, men filen inneholder 1 blokk.",
+ "175": "Spekteret ber om blokk {0}, men filen inneholder {1} blokker.",
+ "176": "Spekteret har ingen kilde.",
+ "177": "Spekterets fil {0} finnes ikke i tegningen.",
+ "178": "Ingen prediktor for {0} er tilgjengelig i denne motoren.",
+ "179": "Prediksjonen mislyktes: {0}",
+ "180": "Spekterets kilde er verken en fil eller en prediksjon.",
+ "181": "Tegningen har ikke spekteret {0}.",
+ "182": "Stikkspektre har ingen arealer å integrere.",
+ "183": "value må være større enn null.",
+ "184": "from og to må være to ulike x-verdier.",
+ "185": "Spekteret har ikke integralet {0}.",
+ "186": "Dette spekteret har ingen original fil; eksporter det uten original=1.",
+ "187": "FormChem plasserer PNG-, JPEG-, GIF-, WebP- og SVG-bilder og JCAMP-DX-spektre."
+}
diff --git a/frontend/src/i18n/locales/nb/part14.json b/frontend/src/i18n/locales/nb/part14.json
new file mode 100644
index 00000000..b76053e1
--- /dev/null
+++ b/frontend/src/i18n/locales/nb/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Visning",
+ "1": "Overflate",
+ "2": "Ingenting å eksportere: 3D-visningen er tom.",
+ "3": "Eksport mislyktes",
+ "4": "Velg en struktur som skal vises i 3D.",
+ "5": "Bygg 3D",
+ "6": "Sett inn 3D-visning",
+ "7": "Velg en PDB-, mmCIF-, SDF- eller MOL-fil.",
+ "8": "Kunne ikke plassere 3D-strukturen på siden",
+ "9": "Velg et 3D-objekt åpnet fra en PDB- eller mmCIF-fil.",
+ "10": "Denne modellen har ingen ligander.",
+ "11": "Kunne ikke trekke ut liganden",
+ "12": "Ingen 3D-koordinater ennå: Bygg 3D lager en konformer fra tegningen.",
+ "13": "3D-strukturfil...",
+ "14": "Trekk ut ligand...",
+ "15": "Eksporter 3D-struktur...",
+ "16": "Dihedralskanning...",
+ "17": "Mål i 3D",
+ "18": "Eksporter 3D-visning som PNG...",
+ "19": "Eksporter 3D-visning som glTF...",
+ "20": "Trukket ut {0}: {1} (bindingsordener utledet)",
+ "21": "Trukket ut {0}: {1}",
+ "22": "Åpne 3D-visningen først",
+ "23": "Åpner 3D-visningspanelet for den valgte strukturen (eller det valgte 3D-objektet på siden) og følger valget. En struktur trenger 3D-koordinater først: Bygg 3D lager dem.",
+ "24": "Bygger en 3D-konformer av den valgte strukturen fra 2D-tegningen (kiler, dobbeltbindingsgeometri og ladninger beholdes), minimerer den med det valgte kraftfeltet og lagrer den i tegningen som ett angretrinn; 3D-visningen viser den.",
+ "25": "Minimerer den viste konformeren av den valgte strukturen med kraftfeltet som er valgt i 3D-visningen (MMFF94 som standard, UFF når MMFF94 mangler parametere), og melder energien før og etter, som ett angretrinn.",
+ "26": "Genererer et konformerensemble av den valgte strukturen (ETKDG, beskåret etter RMSD, hver minimert) og beholder de innenfor et energivindu; med n, window og method kjøres det uten dialogen.",
+ "27": "Konformere som skal genereres",
+ "28": "Energivindu i kcal/mol",
+ "29": "Plasserer en 3D-visning av den valgte strukturen på siden ved siden av den (og bygger først 3D-koordinater hvis den ikke har noen) og åpner 3D-visningspanelet knyttet til den; når modellen dreies eller får ny stil, oppdateres bildet på siden.",
+ "30": "Åpner en PDB-, mmCIF-, SDF- eller MOL-fil som et 3D-objekt på siden (proteiner som cartoon med ligander som kule og stav, vann skjult, liganden i fokus) og viser den i 3D-visningen.",
+ "31": "Gjør en ligand fra det valgte 3D-objektet (åpnet fra en PDB- eller mmCIF-fil) til en 2D-struktur ved siden av det, som ett angretrinn: bindingsordener fra en innebygd mal for vanlige ligander, ellers utledet fra geometrien og rapportert; filens koordinater blir dens konformer. Med ligand tas akkurat den; uten spørres det når modellen har flere.",
+ "32": "Ligandnøkkel kjede:het:nummer, eller en het-kode",
+ "33": "Velg et 3D-objekt åpnet fra en PDB- eller mmCIF-fil",
+ "34": "Lagrer 3D-koordinatene til den valgte strukturen med alle hydrogener: MDL molfile (den viste konformeren), SD-fil (alle konformere, med energi- og metodedatafelt), PDB eller XYZ (den viste konformeren, eller alle konformere som modeller eller rammer); et 3D-objekt åpnet fra en PDB- eller mmCIF-fil lagrer sin opprinnelige fil. Uten format spørres det.",
+ "35": "Filformat",
+ "36": "Alle konformere i stedet for den viste (standard true for sdf)",
+ "37": "Skanner dihedralvinkelen for de fire atomene valgt i 3D-visningen (eller den siste dihedralmålingen) med relaksert minimering og plotter vinkel mot energi.",
+ "38": "Måler en avstand (to atomer), en vinkel (tre) eller en dihedralvinkel (fire) i 3D-visningen og lister den opp; med atoms (fragmentets atom-id-er som a1, hydrogener som a1:h0, eller PDB-serienumre) måles disse, ellers bytter den til utvelging.",
+ "39": "To til fire atom-id-er",
+ "40": "Lagrer 3D-visningen som et PNG-bilde i skjermstørrelse; transparent utelater bakgrunnen.",
+ "41": "Lagrer 3D-visningen som en binær glTF 2.0-fil (.glb): atomer som kuler og bindinger som sylindre med grunnstofffarger, 1 ångström = 1 cm, for 3D-visere, lysbilder og utskrift.",
+ "42": "Ingen overflate",
+ "43": "Fjerner molekyloverflaten fra 3D-visningen.",
+ "44": "Van der Waals-overflate",
+ "45": "Viser van der Waals-overflaten i 3D-visningen.",
+ "46": "Løsemiddeltilgjengelig overflate",
+ "47": "Viser den løsemiddeltilgjengelige overflaten (probe 1,4 ångström) i 3D-visningen.",
+ "48": "Løsemiddelekskludert overflate",
+ "49": "Viser den løsemiddelekskluderte overflaten i 3D-visningen.",
+ "50": "ESP-kartlagt overflate",
+ "51": "Farger overflaten etter et tilnærmet elektrostatisk potensial fra motorens empiriske partialladninger (rød negativ, blå positiv), med en tegnforklaring som navngir metoden.",
+ "52": "Viser 3D-visningen i trådstil; for et 3D-objekt på siden lagres valget sammen med det.",
+ "53": "Viser 3D-visningen i stavstil; for et 3D-objekt på siden lagres valget sammen med det.",
+ "54": "Kule og stav",
+ "55": "Viser 3D-visningen i kule-og-stav-stil; for et 3D-objekt på siden lagres valget sammen med det.",
+ "56": "Romfyllende",
+ "57": "Viser 3D-visningen i romfyllende stil; for et 3D-objekt på siden lagres valget sammen med det.",
+ "58": "Cartoon",
+ "59": "Viser 3D-visningen i cartoonstil (proteiner og nukleinsyrer; ligander forblir kule og stav); for et 3D-objekt på siden lagres valget sammen med det.",
+ "60": "Dihedralvinkel (grader)",
+ "61": "Relativ energi (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "Eksporter 3D-struktur",
+ "64": "Alle konformere (SDF-poster, PDB-modeller, XYZ-rammer)",
+ "65": "1 konformer lagret; hvert hydrogen skrives med sin 3D-posisjon.",
+ "66": "Trekk ut ligand",
+ "67": "Ligand",
+ "68": "Liganden blir en 2D-struktur ved siden av modellen, og koordinatene fra filen beholdes som dens konformer.",
+ "69": "Trekk ut",
+ "70": "SD-fil (.sdf)",
+ "71": "MDL molfile (.mol)",
+ "72": "{0} konformere lagret; hvert hydrogen skrives med sin 3D-posisjon.",
+ "73": "Konformere",
+ "74": "Energivindu (kcal/mol)",
+ "75": "ETKDG-innbygging med fast seed, nesten like fjernet ved 0,5 Å RMSD for tunge atomer, hver minimert; den laveste blir den viste konformeren.",
+ "76": "Generer",
+ "77": "Energiprofil for dihedralskanning",
+ "78": "Dihedralskanning",
+ "79": "Fra (grader)",
+ "80": "Til (grader)",
+ "81": "Steg (grader)",
+ "82": "Behold hvert punkt som en konformer (ett angretrinn)",
+ "83": "Kjør skanning",
+ "84": "En relaksert skanning: ved hver vinkel holdes dihedralvinkelen fast og alt annet minimeres.",
+ "85": "Sluttvinkelen må være større enn startvinkelen.",
+ "86": "Skanner...",
+ "87": "Skanningen mislyktes",
+ "88": "barriere {0} kcal/mol",
+ "89": "Visningsstil",
+ "90": "Farg overflaten etter elektrostatisk potensial fra empiriske partialladninger",
+ "91": "ESP",
+ "92": "Minimer",
+ "93": "Skann...",
+ "94": "Fokuser på liganden",
+ "95": "Tilbakestill visning",
+ "96": "Roter",
+ "97": "Eksporter 3D-visningen",
+ "98": "Mål",
+ "99": "Målinger",
+ "100": "PNG-bilde",
+ "101": "PNG-bilde, gjennomsiktig",
+ "102": "glTF binær (.glb)",
+ "103": "3D krever WebGL, som dette vinduet ikke tilbyr.",
+ "104": "Laster 3D-viseren...",
+ "105": "3D-viseren kunne ikke lastes",
+ "106": "Åpne en tegning og velg en struktur for å se den i 3D.",
+ "107": "Velg en struktur på siden for å se den i 3D.",
+ "108": "Kunne ikke lese 3D-strukturen",
+ "109": "Denne konformeren kan ikke skrives som en molfile",
+ "110": "Rotasjon er av: systemet ber om redusert bevegelse",
+ "111": "En PDB- eller CIF-modell har ingen konformere.",
+ "112": "Energier relativt til den laveste; klikk på en for å vise den.",
+ "113": "Bygg 3D eller Konformere... fyller denne listen.",
+ "114": "Partialladninger er utilgjengelige",
+ "115": "motoren har ingen 3D-ruter ennå",
+ "116": "ikke konvergert",
+ "117": "Velg fire bundne atomer på rad (en dihedralvinkel), og klikk deretter Skann.",
+ "118": "Kryss av for Behold hvert punkt som en konformer for å se geometriene.",
+ "119": "Vis konformer",
+ "120": "Oppdater 3D-visning",
+ "121": "Kunne ikke oppdatere sidens øyeblikksbilde",
+ "122": "Ingen overflate",
+ "123": "Van der Waals",
+ "124": "Løsemiddeltilgjengelig",
+ "125": "Løsemiddelekskludert",
+ "126": "Avstand",
+ "127": "Vinkel",
+ "128": "Dihedralvinkel",
+ "129": "{0} kcal/mol, {1}, ikke konvergert",
+ "130": "Valgt {0} / {1}: {2}",
+ "131": "Klikk på {0} atomer for å måle",
+ "132": "ESP ({0}): {1}, rød {2} e til blå +{3} e",
+ "133": "Avstand {0}: {1}",
+ "134": "Vinkel {0}: {1}",
+ "135": "Dihedralvinkel {0}: {1}",
+ "136": "Bygget: {0}",
+ "137": "Minimert: {0}",
+ "138": "{0} konformere beholdt av {1}",
+ "139": "{0} konformere beholdt",
+ "140": "Dihedralvinkel {0}",
+ "141": "PNG-koding mislyktes"
+}
diff --git a/frontend/src/i18n/locales/nb/part15.json b/frontend/src/i18n/locales/nb/part15.json
new file mode 100644
index 00000000..bae219ad
--- /dev/null
+++ b/frontend/src/i18n/locales/nb/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "tilnærmet, fra empiriske ladninger",
+ "1": "{0} stereosentre eller dobbeltbindinger var uspesifiserte; én konfigurasjon ble valgt.",
+ "2": "{0} stereomerker i tegningen gjengis ikke i 3D.",
+ "3": "Det tegnede medlemmet av den eller de utvidede stereogruppene {0} ble bygget; 3D-modellen er én stereoisomer av blandingen (relativ eller racemisk) som tegningen beskriver.",
+ "4": "Innbygd {0} ganger (seeds {1}) for å beholde den tegnede stereoen.",
+ "5": "{0} par tunge atomer er nærmere hverandre enn {1} av van der Waals-kontakten deres.",
+ "6": "Universelt kraftfelt brukt: {0}.",
+ "7": "ingen {0}-parametere for {1}",
+ "8": "{0} kunne ikke typebestemme alle atomer",
+ "9": "{0} konformere endret den tegnede stereoen under minimeringen og ble utelatt.",
+ "10": "Mer enn 300 tunge atomer: kvaliteten på konformerprøvetakingen faller ved denne størrelsen.",
+ "11": "Den sentrale bindingen sitter i en ring; ringen spennes for å følge vinkelen.",
+ "12": "Strukturen hadde ingen 3D-koordinater; skanningen startet fra en ny innbygging.",
+ "13": "Strukturen endret seg mens 3D ble beregnet; kjør kommandoen på nytt.",
+ "14": "Tegningen har ikke objektet {0}.",
+ "15": "{0} har ingen 3D-koordinater ennå; bygg 3D først.",
+ "16": "{0} har ikke konformer {1}.",
+ "17": "Strukturen har ingen atomer.",
+ "18": "3D trenger ekte atomer: {0} atomer er etiketter, R-grupper eller festepunkter ({1}).",
+ "19": "Hydrogener kunne ikke legges til: {0}",
+ "20": "Strukturen har {0} atomer med hydrogener; 3D håndterer opptil {1}.",
+ "21": "3D-koordinatene passer ikke til denne strukturen (ingenting for {0}); bygg 3D på nytt.",
+ "22": "3D-koordinatene passer ikke til denne strukturen (antall hydrogener er endret); bygg 3D på nytt.",
+ "23": "Strukturen kunne ikke bygges inn i 3D: {0}",
+ "24": "Strukturen kunne ikke bygges inn i 3D; kontroller valensene og stereoen.",
+ "25": "Konformere kunne ikke bygges inn: {0}",
+ "26": "Ingen konformer kunne bygges inn; kontroller strukturens valenser og stereo.",
+ "27": "Hver innbygde konformer mistet den tegnede stereoen etter minimeringen.",
+ "28": "Ingen kraftfelt har parametere for denne strukturen ({0}).",
+ "29": "Det universelle kraftfeltet kunne ikke settes opp: {0}",
+ "30": "Det universelle kraftfeltet kunne ikke settes opp.",
+ "31": "Ukjente atomer {0}; bruk fragmentets atom-id-er eller et hydrogen som a1:h0.",
+ "32": "De fire atomene må være forskjellige.",
+ "33": "De fire atomene må danne en kjede av bindinger (a1-a2-a3-a4).",
+ "34": "3D-filen kunne ikke skrives: {0}",
+ "35": "Filen er ikke en PDB-, mmCIF-, SDF- eller MOL-fil som FormChem kan lese.",
+ "36": "Filen har mer enn {0} atomer.",
+ "37": "PDB-filen har ingen ATOM- eller HETATM-poster.",
+ "38": "mmCIF-tabellen atom_site mangler kolonnene Cartn_x, Cartn_y og Cartn_z.",
+ "39": "CIF-filen har brøkkoordinater, men ingen komplett enhetscelle.",
+ "40": "CIF-filen har ingen atom_site-tabell.",
+ "41": "CIF-filen har ingen lesbare atomer.",
+ "42": "Filen har ingen poster.",
+ "43": "Filen har {0} poster; 3D-import leser opptil {1}.",
+ "44": "Ingen post i filen kunne leses.",
+ "45": "{0} er ikke en PDB- eller mmCIF-fil.",
+ "46": "{0} kunne ikke gjøres om til en FormChem-tegning: {1}.",
+ "47": "PDB-modell plassert som 3D-objekt: {0}.",
+ "48": "mmCIF-modell plassert som 3D-objekt: {0}.",
+ "49": "{0} ATOM- eller HETATM-linjer hadde uleselige koordinater og ble hoppet over.",
+ "50": "{0} atom_site-rader hadde uleselige koordinater og ble hoppet over.",
+ "51": "CIF for små molekyler: den asymmetriske enheten leses fra brøkkoordinater; symmetriske partnere genereres ikke.",
+ "52": "{0} har valensproblemer; den ble lest uten sanering.",
+ "53": "{0} har bare 2D-koordinater; ingen konformer ble beholdt.",
+ "54": "{0} hydrogener var ikke i filen og ble plassert ut fra geometrien.",
+ "55": "{0} kunne ikke leses: {1}",
+ "56": "{0} kunne ikke leses.",
+ "57": "Post {0}",
+ "58": "Strukturen",
+ "59": "Filens 3D-koordinater ble beholdt som konformer av 1 struktur; Bygg 3D trengs ikke for å se dem.",
+ "60": "Filens 3D-koordinater ble beholdt som konformer av {0} strukturer; Bygg 3D trengs ikke for å se dem.",
+ "61": "{0} er et enkelt ion; det finnes ingen struktur å trekke ut.",
+ "62": "Atomene i {0} kunne ikke leses.",
+ "63": "Ingen ligand {0} i strukturen; ligander: {1}.",
+ "64": "Tegningen har ikke 3D-modellen {0}.",
+ "65": "FormChem plasserer PNG-, JPEG-, GIF-, WebP- og SVG-bilder, JCAMP-DX-spektre og PDB-, mmCIF-, SDF- og MOL-strukturfiler."
+}
diff --git a/frontend/src/i18n/locales/nl/part12.json b/frontend/src/i18n/locales/nl/part12.json
new file mode 100644
index 00000000..719a929d
--- /dev/null
+++ b/frontend/src/i18n/locales/nl/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spectrum",
+ "1": "Teken of selecteer een structuur om te benoemen.",
+ "2": "Namen konden niet worden berekend",
+ "3": "FormChem heeft geen naam voor deze structuur.",
+ "4": "Naam kopiëren",
+ "5": "Naam gekopieerd: {0}",
+ "6": "In te voegen chemische naam; laat weg om het dialoogvenster te openen",
+ "7": "Kopieert de naam van de geselecteerde structuur (of van de structuren op de pagina) als platte tekst: de triviale naam als FormChem er een kent, anders de systematische naam, die alleen wordt aangeboden als hij weer terug te lezen is als dezelfde structuur.",
+ "8": "trivial of systematic om te kiezen welke naam wordt gekopieerd; laat weg voor de eerste",
+ "9": "Het voorspelde spectrum is up-to-date.",
+ "10": "Voorspeld spectrum vernieuwen",
+ "11": "Selecteer eerst een structuur",
+ "12": "Selecteer eerst een voorspeld spectrum",
+ "13": "Voorspeld 1H-NMR-spectrum toegevoegd ({0})",
+ "14": "Voorspeld 13C-NMR-spectrum toegevoegd ({0})",
+ "15": "Voorspeld spectrum vernieuwd ({0})",
+ "16": "Fragment-id van de structuur; standaard de geselecteerde structuur, of de enige op de pagina",
+ "17": "Spectrometerfrequentie in MHz (standaard 400 voor 1H, 100 voor 13C)",
+ "18": "Voegt naast de geselecteerde structuur een voorspeld 1H-NMR-spectrum toe, in één ongedaanmakingsstap: een spectrumobject dat is berekend met de eigen incrementregels van FormChem (geen verschuivingsdatabase), waarvan de multipletten en integralen zijn gekoppeld aan de atomen van de structuur en dat een titel met methode, versie en frequentie krijgt. De curve wordt uit de structuur opnieuw berekend en nooit opgeslagen.",
+ "19": "Voegt naast de geselecteerde structuur een voorspeld 13C-NMR-spectrum toe, in één ongedaanmakingsstap: een spectrumobject dat is berekend met de eigen incrementregels van FormChem (geen verschuivingsdatabase), waarvan de pieken zijn gekoppeld aan de atomen van de structuur en dat een titel met methode, versie en frequentie krijgt. De curve wordt uit de structuur opnieuw berekend en nooit opgeslagen.",
+ "20": "Kon het spectrum niet voorspellen",
+ "21": "1H-NMR-spectrum voorspellen",
+ "22": "13C-NMR-spectrum voorspellen",
+ "23": "Berekent de multipletten, integralen of pieken van een voorspeld spectrum opnieuw nadat de structuur is gewijzigd, met de actuele versie van de voorspeller, in één ongedaanmakingsstap; er verandert niets als het up-to-date is.",
+ "24": "Id van het voorspelde spectrum; standaard het geselecteerde of het spectrum dat in de spectrumeditor is geopend",
+ "25": "Kon het spectrum niet vernieuwen",
+ "26": "Geen nieuwe pieken in dat bereik.",
+ "27": "Sleep in de spectrumeditor over een bereik om het te integreren.",
+ "28": "Piek aan atomen koppelen",
+ "29": "Piek ontkoppelen",
+ "30": "Y-as van het spectrum",
+ "31": "Spectrum uit bestand...",
+ "32": "Spectrum bewerken...",
+ "33": "Pieken detecteren",
+ "34": "Integreren",
+ "35": "Transmissie of absorptie",
+ "36": "Spectrum exporteren...",
+ "37": "Selecteer eerst een spectrum",
+ "38": "geen spectrum met id {0}",
+ "39": "Pieken gedetecteerd: {0} (al aanwezig: {1})",
+ "40": "Pieken gedetecteerd: {0}",
+ "41": "Integralen zijn voor NMR-spectra",
+ "42": "Selecteer eerst een piek, integraal of multiplet in de spectrumeditor",
+ "43": "De atomen moeten allemaal bij één structuur horen",
+ "44": "Alleen IR-, Raman- en UV-Vis-spectra schakelen tussen transmissie en absorptie",
+ "45": "Geëxporteerd: {0}",
+ "46": "Id van het spectrumobject; standaard het geselecteerde spectrum of het spectrum dat in de spectrumeditor is geopend",
+ "47": "Importeert een JCAMP-DX-spectrumbestand in de actieve tekening (één spectrumobject per gegevensblok, het bestand blijft byte voor byte bewaard), in één ongedaanmakingsstap per bestand. Zonder path wordt een bestandsdialoog geopend.",
+ "48": "Absoluut pad van een .jdx-, .dx- of .jcamp-bestand",
+ "49": "Kon het spectrum niet importeren",
+ "50": "Opent de spectrumeditor voor het geselecteerde spectrum (hetzelfde als erop dubbelklikken).",
+ "51": "Kon het spectrum niet openen",
+ "52": "Zoekt de pieken van een spectrum in een bereik (standaard het getoonde bereik) en voegt ze toe aan de pieklijst, waarbij pieken die er al zijn worden overgeslagen, in één ongedaanmakingsstap.",
+ "53": "Begin van het bereik in de x-eenheid (cm-1, nm, m/z, ppm)",
+ "54": "Einde van het bereik in de x-eenheid",
+ "55": "Optionele detectiedrempel in y-eenheden",
+ "56": "De pieklijst vervangen in plaats van er iets aan toe te voegen",
+ "57": "Kon de pieken niet detecteren",
+ "58": "Voegt een NMR-integraal toe over een bereik, geschaald zoals de bestaande integralen (of naar value, waarbij de rest opnieuw wordt geschaald), in één ongedaanmakingsstap. Zonder from en to schakelt het de spectrumeditor over naar het integratiegereedschap.",
+ "59": "Begin van het bereik in ppm",
+ "60": "Einde van het bereik in ppm",
+ "61": "Waarde die deze integraal moet aangeven, bijvoorbeeld een aantal protonen",
+ "62": "Kon niet integreren",
+ "63": "Koppelt een piek, integraal of multiplet aan atomen van een structuur, in één ongedaanmakingsstap. Zonder atoms worden de geselecteerde atomen gebruikt, of wordt gewacht tot de persoon atomen in de tekening aanklikt.",
+ "64": "Id van de piek, integraal of het multiplet; standaard het item dat in de spectrumeditor is geselecteerd",
+ "65": "Id van de structuur (het fragment) waartoe de atomen behoren",
+ "66": "Atoom-id's",
+ "67": "Kon de piek niet koppelen",
+ "68": "Verwijdert de atoomkoppeling van een piek, integraal of multiplet, in één ongedaanmakingsstap.",
+ "69": "Kon de piek niet ontkoppelen",
+ "70": "Toont een IR-, Raman- of UV-Vis-spectrum als transmissie of absorptie (schakelt om zonder mode), in één ongedaanmakingsstap.",
+ "71": "Te tonen Y-as; laat weg om om te schakelen",
+ "72": "Kon de y-as niet wijzigen",
+ "73": "Slaat een spectrum via de engine op als JCAMP-DX (met de piektabel als het pieken heeft) of als CSV met elk punt.",
+ "74": "Bestandsformaat, standaard jdx",
+ "75": "Bij jdx: het oorspronkelijk geïmporteerde bestand ongewijzigd",
+ "76": "Absoluut pad om naar te schrijven; laat weg om ernaar te vragen",
+ "77": "Kon het spectrum niet exporteren",
+ "78": "Spectrum uit bestand invoegen",
+ "79": "Het bestand bevat geen spectrum dat FormChem kan tekenen",
+ "80": "Spectrum invoegen",
+ "81": "Het spectrum kon niet worden geplaatst: het bestand is niet in de tekening aangekomen.",
+ "82": "Ingevoegde spectra: {0}",
+ "83": "Golflengte (µm)",
+ "84": "Golfgetal (cm⁻¹)",
+ "85": "Ramanverschuiving (cm⁻¹)",
+ "86": "Golflengte (nm)",
+ "87": "Frequentie (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmissie (%)",
+ "90": "Transmissie",
+ "91": "Absorptie",
+ "92": "Relatieve abundantie (%)",
+ "93": "Intensiteit",
+ "94": "{0}-NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Voorspeld: {0}, {1} MHz ({2})",
+ "100": "Voorspeld: {0}, {1} MHz",
+ "101": "Voorspeld: {0} ({1})",
+ "102": "Voorspeld: {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spectrum niet beschikbaar: {0}",
+ "105": "Spectrum laden",
+ "106": "Triviale naam",
+ "107": "Systematisch",
+ "108": "Hoge betrouwbaarheid",
+ "109": "Gemiddelde betrouwbaarheid",
+ "110": "Lage betrouwbaarheid",
+ "111": "Niet gelezen",
+ "112": "FormChem-namen",
+ "113": "Kon de naam niet lezen",
+ "114": "Structuur uit naam invoegen",
+ "115": "Structuur uit naam",
+ "116": "Een naam, zoals aspirine of 2-methylpropaan-1-ol",
+ "117": "Chemische naam",
+ "118": "Typ een naam om de structuur te zien.",
+ "119": "Geen structuur voor deze naam",
+ "120": "Woordenboek",
+ "121": "Systematische parser",
+ "122": "Regelgebaseerde naamgever, gecontroleerd met heen-en-terugomzetting",
+ "123": "Spectrumgereedschappen",
+ "124": "Het hele spectrum tonen",
+ "125": "Y-as",
+ "126": "Dit bereik op de pagina tonen",
+ "127": "Dubbelklik in de tekening op een spectrum om het hier te bewerken.",
+ "128": "Pieken en integralen",
+ "129": "Voorspeld",
+ "130": "Integraalwaarde",
+ "131": "Aan atomen koppelen",
+ "132": "Ontkoppelen",
+ "133": "1 atoom",
+ "134": "Te koppelen atomen",
+ "135": "Klik op meer atomen en daarna op Gereed.",
+ "136": "Klik in de tekening op de atomen die bij deze piek horen en daarna op Gereed.",
+ "137": "Niets te integreren in dat bereik.",
+ "138": "Piek verwijderen",
+ "139": "Piek toevoegen",
+ "140": "Gekoppeld aan 1 atoom",
+ "141": "Spectrumbereik instellen",
+ "142": "Typ een positief getal.",
+ "143": "Kon de integraal niet instellen",
+ "144": "Pannen en zoomen: slepen om te pannen, wiel om te zoomen, Shift-slepen om op een bereik te zoomen",
+ "145": "Op een bereik zoomen: sleep over de grafiek",
+ "146": "Pieken detecteren: sleep over een bereik",
+ "147": "Een piek toevoegen of verwijderen: klik vlak bij een piek",
+ "148": "Integreren: sleep over een bereik",
+ "149": "Piek",
+ "150": "Integraal",
+ "151": "Multiplet",
+ "152": "{0} atomen",
+ "153": "Gekoppeld aan {0}",
+ "154": "Sleep om te pannen, gebruik het wiel om te zoomen, Shift-sleep om op een bereik te zoomen. Klik op een label om het te selecteren.",
+ "155": "Sleep over de grafiek om op dat bereik te zoomen.",
+ "156": "Sleep over een bereik om de pieken ervan te detecteren.",
+ "157": "Klik vlak bij een piek om hem toe te voegen; klik op het label van een piek om hem te verwijderen.",
+ "158": "Sleep over een bereik om het te integreren.",
+ "159": "Gekoppeld aan {0} atomen"
+}
diff --git a/frontend/src/i18n/locales/nl/part13.json b/frontend/src/i18n/locales/nl/part13.json
new file mode 100644
index 00000000..92802e30
--- /dev/null
+++ b/frontend/src/i18n/locales/nl/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "de engine gaf een leeg bestand terug",
+ "1": "de naam is langer dan {0} tekens",
+ "2": "fragmenten met meer dan {0} atomen worden niet benoemd",
+ "3": "De structuur bevat labels, R-groepen of willekeurige atomen, die geen naam hebben.",
+ "4": "De structuur kon niet als molecuul worden gelezen (controleer de valenties).",
+ "5": "Er is geen structuur om te benoemen.",
+ "6": "Namen met omgekeerde index (eerst de stam, dan een komma en de substituenten) worden niet gelezen; schrijf de naam in de normale volgorde, zoals 1,2-dichloorbenzeen.",
+ "7": "D- en L- worden alleen gelezen voor de aminozuren en suikers in het woordenboek van FormChem; geef R- of S-descriptoren voor andere namen.",
+ "8": "FormChem heeft de hele naam gelezen, maar het is geen volledige structuurnaam (er ontbreekt mogelijk een stam zoals hexaan of benzeen, of een suffix).",
+ "9": "FormChem kon de naam vanaf teken {0} (\"{1}\") niet lezen.",
+ "10": "FormChem heeft de naam gelezen, maar {0}.",
+ "11": "de structuur kon niet worden voltooid",
+ "12": "De naam kan op meer dan één manier worden gelezen; FormChem heeft de lezing met de minste aannames getekend.",
+ "13": "De naam bevat geen stereodescriptoren, dus stereocentra en dubbele bindingen worden ongespecificeerd getekend.",
+ "14": "Geen systematische naam: {0}.",
+ "15": "De door FormChem gemaakte systematische naam gaf bij teruglezen niet dezelfde structuur en wordt daarom niet getoond.",
+ "16": "die dubbele binding kan niet E of Z zijn",
+ "17": "de descriptorlocant {0} is geen positie van de stam",
+ "18": "positie {0} is niet het begin van een dubbele binding die E of Z kan zijn",
+ "19": "{0} vraagt precies één dubbele binding die cis of trans kan zijn; deze structuur heeft er {1}",
+ "20": "{0} is onduidelijk voor deze dubbele binding; geef in plaats daarvan E of Z op",
+ "21": "({0}) vraagt een locant: de structuur heeft {1} stereocentra",
+ "22": "positie {0} is geen stereocentrum, dus ({1}) is niet van toepassing",
+ "23": "({0}) vraagt een locant: de structuur heeft {1} dubbele bindingen die E of Z kunnen zijn",
+ "24": "positie {0} kan deze descriptor niet krijgen: {1}",
+ "25": "die dubbele binding kan deze descriptor niet krijgen: {0}",
+ "26": "{0} zegt niet welke configuratie bedoeld is, dus de structuur wordt zonder stereochemie getekend.",
+ "27": "{0} heeft geen aanhechtingspunt",
+ "28": "er is geen ruimte voor {0} op {1}",
+ "29": "{0} kan daar geen binding aangaan",
+ "30": "ketens langer dan {0} koolstofatomen worden nog niet gelezen",
+ "31": "{0} is te klein voor een ring",
+ "32": "{0}-{1} is een tautomeer die FormChem nog niet uit een naam tekent",
+ "33": "locant {0} is geen positie van {1}",
+ "34": "{0} is geen ketenpositie",
+ "35": "een meervoudige binding kan hier niet beginnen: positie {0} van {1}",
+ "36": "positie {0} van {1} kan die meervoudige binding niet dragen",
+ "37": "er is geen ruimte voor een meervoudige binding op positie {0} van {1}",
+ "38": "er is geen ruimte voor de meervoudige bindingen van {0}",
+ "39": "De posities van de meervoudige bindingen van {0} zijn niet opgegeven; getekend op de laagste posities.",
+ "40": "-{0} vraagt een open keten; op een ring is het suffix carbaldehyde, carbonzuur, carbonitril of carboxamide",
+ "41": "een keten heeft maar twee uiteinden voor -{0}",
+ "42": "{0} is te kort voor twee -{1}-groepen",
+ "43": "er is geen ruimte voor -{0} op {1}",
+ "44": "De positie van -{0} op {1} is niet opgegeven; getekend op de laagste positie.",
+ "45": "-{0} moet aan het einde van de keten staan, niet op {1}",
+ "46": "er is geen ruimte voor -{0} op {1}",
+ "47": "ortho, meta en para vragen een benzeenring",
+ "48": "ortho, meta of para met één groep vraagt een stam zoals fenol, aniline of tolueen",
+ "49": "er is geen ruimte voor {0} op {1}",
+ "50": "er is geen ruimte voor {0} {1}-groepen op {2}",
+ "51": "De positie van {0} op {1} is niet opgegeven; getekend op de laagste vrije positie.",
+ "52": "{0} kan geen substituenten dragen",
+ "53": "een acylgroep zit vast aan zijn carbonylkoolstof",
+ "54": "{0} heeft geen vrije positie",
+ "55": "De aanhechtingspositie van {0} is niet opgegeven; positie {1} aangenomen.",
+ "56": "{0} heeft geen ruimte meer om aan te hechten",
+ "57": "de locanten {0} vóór {1} worden niet gebruikt",
+ "58": "{0} kan niet als afzonderlijk woord staan",
+ "59": "\"{0}\" heeft {1} groep ervoor nodig, de naam geeft er {2}",
+ "60": "\"{0}\" heeft {1} groepen ervoor nodig, de naam geeft er {2}",
+ "61": "de naam geeft {0} alkylgroep voor {1} esterpositie",
+ "62": "de naam geeft {0} alkylgroep voor {1} esterposities",
+ "63": "de naam geeft {0} alkylgroepen voor {1} esterpositie",
+ "64": "de naam geeft {0} alkylgroepen voor {1} esterposities",
+ "65": "de structuur die hij beschrijft is niet geldig ({0})",
+ "66": "-on op {0} zou een aldehyde zijn; een aldehyde wordt met -al benoemd",
+ "67": "positie {0} van {1}",
+ "68": "te veel identieke substituenten",
+ "69": "gemengde locanten",
+ "70": "ongebruikelijke bindingstypen worden nog niet benoemd",
+ "71": "een ringsysteem dat FormChem nog niet kan benoemen",
+ "72": "aromatische ringen met exocyclische dubbele bindingen (zoals pyridonen) worden nog niet benoemd",
+ "73": "isotopen en radicalen worden nog niet benoemd",
+ "74": "hypervalente halogenen worden niet benoemd",
+ "75": "geladen stikstofgroepen anders dan nitro worden nog niet benoemd",
+ "76": "geladen atomen worden nog niet benoemd",
+ "77": "oxiden van zwavel, stikstof en fosfor worden nog niet benoemd",
+ "78": "deze zuurstofgroep wordt nog niet benoemd",
+ "79": "sulfoxiden, sulfonen en andere zwavelgroepen worden nog niet benoemd",
+ "80": "iminen, azo- en vergelijkbare stikstofgroepen worden nog niet benoemd",
+ "81": "{0} wordt nog niet benoemd",
+ "82": "substituentketens langer dan 20 koolstofatomen worden niet benoemd",
+ "83": "onverzadigde acylgroepen worden nog niet benoemd",
+ "84": "gesubstitueerde ylideengroepen worden nog niet benoemd",
+ "85": "ringylideengroepen worden nog niet benoemd",
+ "86": "tweemaal aangehechte ringen worden nog niet benoemd",
+ "87": "geen nummering gevonden voor een ringsubstituent",
+ "88": "esters met verschillende alcoholdelen worden nog niet benoemd",
+ "89": "geen stamketen of stamring gevonden",
+ "90": "cyclische esters (lactonen) worden nog niet benoemd",
+ "91": "substituenten op meer dan één amine- of amidestikstof worden nog niet benoemd",
+ "92": "stereocentra buiten de stamketen of stamring worden nog niet benoemd",
+ "93": "de geometrie van dubbele bindingen buiten de stamketen wordt nog niet benoemd",
+ "94": "pseudo-asymmetrische centra worden nog niet benoemd",
+ "95": "deze geometrie van de dubbele binding wordt nog niet benoemd",
+ "96": "ketens langer dan 20 koolstofatomen worden niet benoemd",
+ "97": "te veel identieke groepen",
+ "98": "de structuur heeft valentiefouten",
+ "99": "zouten en mengsels worden nog niet systematisch benoemd",
+ "100": "structuren met meer dan {0} zware atomen worden nog niet systematisch benoemd",
+ "101": "verbindingen van {0} worden nog niet systematisch benoemd",
+ "102": "queryatomen en R-groepen hebben geen naam",
+ "103": "hydriden van een enkel heteroatoom worden alleen uit het woordenboek benoemd",
+ "104": "{0} is geen object van deze tekening.",
+ "105": "{0} heeft geen atomen.",
+ "106": "Het fragment heeft geen atomen.",
+ "107": "De tekening heeft geen pagina.",
+ "108": "{0} is geen spectrum van deze tekening.",
+ "109": "De structuur {0} waartoe deze voorspelling behoort, staat niet meer in de tekening.",
+ "110": "De tekening {0} is gesloten.",
+ "111": "Chemische verschuiving (ppm)",
+ "112": "Tijd (s)",
+ "113": "Reflectantie",
+ "114": "Relatieve abundantie",
+ "115": "##{0}= komt meer dan eens voor; de eerste waarde is bewaard.",
+ "116": "##XYDATA={0} is geen bekende variabelenlijst; hij is gelezen als (X++(Y..Y)).",
+ "117": "##{0}={1} is geen bekende variabelenlijst; hij is gelezen als (XY..XY).",
+ "118": "De punten stonden niet in x-volgorde en zijn gesorteerd.",
+ "119": "##.SHIFT REFERENCE={0} kon niet worden gelezen; de verschuivingen zijn niet gerefereerd.",
+ "120": "##.SHIFT REFERENCE noemt punt {0}, buiten de {1} punten; de verschuivingen zijn niet gerefereerd.",
+ "121": "De verschuivingen zijn zo gerefereerd dat punt {0} {1} ppm ({2}) aangeeft.",
+ "122": "Het bestand noemt de waargenomen kern niet.",
+ "123": "Dit zijn NMR-gegevens in het tijdsdomein (een FID); ze worden getoond zoals opgenomen, zonder Fouriertransformatie.",
+ "124": "Frequenties in Hz zijn gedeeld door de waarnemingsfrequentie ({0} MHz) om ppm te krijgen.",
+ "125": "Er is geen ##.SHIFT REFERENCE; 0 Hz is als 0 ppm genomen.",
+ "126": "Er is geen ##.OBSERVE FREQUENCY, dus de verschuivingsas blijft in Hz.",
+ "127": "De transmissie was als fractie opgeslagen en wordt als percentage getoond.",
+ "128": "Blok {0} bevat meer dan {1} punten.",
+ "129": "##DATA TYPE={0} met x-eenheden {1} noemt geen bekende techniek; het wordt als gewoon spectrum getekend.",
+ "130": "##BLOCKS={0} maar het LINK-blok bevat {1} blokken; alle gevonden blokken zijn gelezen.",
+ "131": "Dit is geen JCAMP-DX-bestand: het heeft geen ##TITLE=-record.",
+ "132": "Het bestand bevat {0} blokken achter elkaar zonder LINK-blok; elk is gelezen.",
+ "133": "Twee blokken hebben dezelfde ##BLOCK_ID.",
+ "134": "Het bestand bevat geen spectrum dat FormChem kan tekenen ({0}).",
+ "135": "Blok \"{0}\" is niet getekend: {1}.",
+ "136": "een structuurblok (JCAMP-CS); het blijft in het bestand bewaard maar wordt niet getekend",
+ "137": "het bevat geen XYDATA, XYPOINTS, PEAK TABLE of NTUPLES",
+ "138": "de gegevenstabel bevat geen punten",
+ "139": "de NTUPLES-tabel declareert geen symbolen",
+ "140": "2D-NTUPLES-spectra worden nog niet ondersteund",
+ "141": "de NTUPLES-tabel heeft geen leesbare pagina's",
+ "142": "Het bestand bevat tekens buiten ASCII; het is als UTF-8 gelezen.",
+ "143": "Het bestand bevat bytes die geen ASCII of UTF-8 zijn; het is als Latin-1 gelezen.",
+ "144": "Regels buiten een gelabeld gegevensrecord zijn genegeerd.",
+ "145": "Een ##END= zonder blok ervoor is genegeerd.",
+ "146": "Records vóór de eerste ##TITLE= of na de laatste ##END= zijn genegeerd.",
+ "147": "Het bestand eindigt zonder ##END=; de open blokken zijn gesloten.",
+ "148": "NTUPLES-pagina {0}",
+ "149": "NTUPLES-pagina {0} heeft geen ##DATA TABLE=; ze is overgeslagen.",
+ "150": "NTUPLES-pagina {0} gebruikt symbolen ({1}) die niet in ##SYMBOL= zijn gedeclareerd; ze is overgeslagen.",
+ "151": "{0} heeft een vorm van gegevenstabel die FormChem niet leest ({1}); die is overgeslagen.",
+ "152": "De NTUPLES-tabel heeft geen ##END NTUPLES=; ze is tot het einde van het blok gelezen.",
+ "153": "De NTUPLES-tabel heeft geen ##SYMBOL=-lijst.",
+ "154": "Dit is een 2D-spectrum (twee onafhankelijke variabelen); 2D-spectra worden in deze versie niet getekend.",
+ "155": "De NTUPLES-tabel heeft {0} pagina's; alleen de eerste {1} zijn gelezen.",
+ "156": "De imaginaire pagina heeft niet dezelfde x-waarden als de reële pagina; ze is weggelaten.",
+ "157": "De NTUPLES-tabel bevat {0} pagina's; pagina {1} wordt getoond en {2} andere pagina's zijn weggelaten.",
+ "158": "##DELTAX={0} wijkt af van (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; de berekende afstand wordt gebruikt.",
+ "159": "{0} heeft geen volledige FIRSTX, LASTX en NPOINTS; de afstand komt uit ##DELTAX.",
+ "160": "Een gegevensregel begon met een DIF-waarde; ze gaat verder vanaf de laatste waarde van de regel ervoor.",
+ "161": "Een Y-controlewaarde kwam niet overeen met de laatste waarde van de regel ervoor; de regel is voortgezet vanaf de eerdere waarde.",
+ "162": "{0} tekens in {1} konden niet worden gelezen en zijn overgeslagen.",
+ "163": "Op {0} DIF-regels volgde geen Y-controlewaarde.",
+ "164": "{0} bevat geen gegevenspunten.",
+ "165": "{0} bevat {1} punten maar ##NPOINTS={2}; de X-waarden van de regels passen bij {3} punten van FIRSTX tot LASTX, dus die afstand is gebruikt.",
+ "166": "{0} bevat {1} punten maar ##NPOINTS={2}; de gelezen punten zijn bewaard.",
+ "167": "De X-waarde van een regel komt niet overeen met haar positie vanaf FIRSTX en de afstand; de positie is gebruikt.",
+ "168": "{0} heeft geen FIRSTX, LASTX en NPOINTS; de afstand is afgeleid uit de X-waarden van de regels.",
+ "169": "{0} geeft geen manier om zijn punten op de x-as te plaatsen; ze zijn genummerd 0, 1, 2 enzovoort.",
+ "170": "De eerste regel begint bij x = {0} maar ##FIRSTX={1}; FIRSTX is gebruikt.",
+ "171": "De eerste Y-waarde {0} komt niet overeen met ##FIRSTY={1}.",
+ "172": "{0} eindigt met een onvolledige groep van {1} waarden; die is weggelaten.",
+ "173": "Kon {0} niet lezen: {1}.",
+ "174": "Het spectrum vraagt om blok {0}, maar het bestand bevat 1 blok.",
+ "175": "Het spectrum vraagt om blok {0}, maar het bestand bevat {1} blokken.",
+ "176": "Het spectrum heeft geen bron.",
+ "177": "Het bestand {0} van het spectrum staat niet in de tekening.",
+ "178": "In deze engine is geen voorspeller voor {0} beschikbaar.",
+ "179": "De voorspelling is mislukt: {0}",
+ "180": "De bron van het spectrum is geen bestand en geen voorspelling.",
+ "181": "De tekening heeft geen spectrum {0}.",
+ "182": "Staafspectra hebben geen oppervlakken om te integreren.",
+ "183": "de waarde moet groter zijn dan nul.",
+ "184": "from en to moeten twee verschillende x-waarden zijn.",
+ "185": "Het spectrum heeft geen integraal {0}.",
+ "186": "Dit spectrum heeft geen oorspronkelijk bestand; exporteer het zonder original=1.",
+ "187": "FormChem plaatst PNG-, JPEG-, GIF-, WebP- en SVG-afbeeldingen en JCAMP-DX-spectra."
+}
diff --git a/frontend/src/i18n/locales/nl/part14.json b/frontend/src/i18n/locales/nl/part14.json
new file mode 100644
index 00000000..0c4f0333
--- /dev/null
+++ b/frontend/src/i18n/locales/nl/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Weergave",
+ "1": "Oppervlak",
+ "2": "Niets om te exporteren: de 3D-weergave is leeg.",
+ "3": "Exporteren mislukt",
+ "4": "Selecteer een structuur om in 3D te tonen.",
+ "5": "3D bouwen",
+ "6": "3D-weergave invoegen",
+ "7": "Kies een PDB-, mmCIF-, SDF- of MOL-bestand.",
+ "8": "Kon de 3D-structuur niet op de pagina plaatsen",
+ "9": "Selecteer een 3D-object dat uit een PDB- of mmCIF-bestand is geopend.",
+ "10": "Dit model heeft geen liganden.",
+ "11": "Kon het ligand niet extraheren",
+ "12": "Nog geen 3D-coördinaten: 3D bouwen maakt een conformeer uit de tekening.",
+ "13": "3D-structuurbestand...",
+ "14": "Ligand extraheren...",
+ "15": "3D-structuur exporteren...",
+ "16": "Dihedrale scan...",
+ "17": "Meten in 3D",
+ "18": "3D-weergave exporteren als PNG...",
+ "19": "3D-weergave exporteren als glTF...",
+ "20": "{0} geëxtraheerd: {1} (bindingsorden afgeleid)",
+ "21": "{0} geëxtraheerd: {1}",
+ "22": "Open eerst de 3D-weergave",
+ "23": "Opent het paneel 3D-weergave voor de geselecteerde structuur (of het geselecteerde 3D-object op de pagina) en volgt de selectie. Een structuur heeft eerst 3D-coördinaten nodig: 3D bouwen maakt ze.",
+ "24": "Bouwt een 3D-conformeer van de geselecteerde structuur uit de 2D-tekening (wiggen, geometrie van dubbele bindingen en ladingen blijven behouden), minimaliseert het met het gekozen krachtveld en slaat het in één ongedaanmakingsstap op in de tekening; de 3D-weergave toont het.",
+ "25": "Minimaliseert het getoonde conformeer van de geselecteerde structuur met het krachtveld dat in de 3D-weergave is gekozen (standaard MMFF94, UFF als MMFF94 geen parameters heeft) en meldt de energie ervoor en erna, in één ongedaanmakingsstap.",
+ "26": "Genereert een conformerenset van de geselecteerde structuur (ETKDG, met RMSD uitgedund, elk geminimaliseerd) en houdt de conformeren binnen een energievenster; met n, window en method draait het zonder dialoogvenster.",
+ "27": "Te genereren conformeren",
+ "28": "Energievenster in kcal/mol",
+ "29": "Plaatst een 3D-weergave van de geselecteerde structuur op de pagina ernaast (waarbij eerst 3D-coördinaten worden gebouwd als ze er niet zijn) en opent het paneel 3D-weergave dat eraan is gekoppeld; draaien of een andere stijl kiezen werkt het beeld op de pagina bij.",
+ "30": "Opent een PDB-, mmCIF-, SDF- of MOL-bestand als 3D-object op de pagina (eiwitten als cartoon, liganden als bol-en-staaf, water verborgen, het ligand in beeld gebracht) en toont het in de 3D-weergave.",
+ "31": "Maakt van een ligand van het geselecteerde 3D-object (geopend uit een PDB- of mmCIF-bestand) in één ongedaanmakingsstap een 2D-structuur ernaast: bindingsorden uit een ingebouwd sjabloon voor veelvoorkomende liganden, anders afgeleid uit de geometrie en gemeld; de bestandscoördinaten worden het conformeer. Met ligand wordt dat ene genomen; zonder vraagt het erom als het model er meerdere heeft.",
+ "32": "Ligandsleutel keten:het:nummer, of een het-code",
+ "33": "Selecteer een 3D-object dat uit een PDB- of mmCIF-bestand is geopend",
+ "34": "Slaat de 3D-coördinaten van de geselecteerde structuur op met alle waterstofatomen: MDL-molfile (het getoonde conformeer), SD-bestand (elk conformeer, met energie- en methodegegevensvelden), PDB of XYZ (het getoonde conformeer, of elk conformeer als modellen of frames); een 3D-object dat uit een PDB- of mmCIF-bestand is geopend slaat zijn oorspronkelijke bestand op. Zonder format wordt ernaar gevraagd.",
+ "35": "Bestandsformaat",
+ "36": "Elk conformeer in plaats van het getoonde (standaard true voor sdf)",
+ "37": "Scant de dihedrale hoek van de vier atomen die in de 3D-weergave zijn gekozen (of de laatste dihedrale meting) met gerelaxeerde minimalisatie en zet hoek uit tegen energie.",
+ "38": "Meet een afstand (twee atomen), hoek (drie) of dihedrale hoek (vier) in de 3D-weergave en zet die in de lijst; met atoms (fragmentatoom-id's zoals a1, waterstofatomen als a1:h0, of PDB-serienummers) worden die gemeten, anders schakelt het over op kiezen.",
+ "39": "Twee tot vier atoom-id's",
+ "40": "Slaat de 3D-weergave op als PNG-afbeelding op de schermgrootte; transparent laat de achtergrond weg.",
+ "41": "Slaat de 3D-weergave op als binair glTF 2.0-bestand (.glb): atomen als bollen en bindingen als cilinders met elementkleuren, 1 ångström = 1 cm, voor 3D-viewers, dia's en afdrukken.",
+ "42": "Geen oppervlak",
+ "43": "Verwijdert het moleculaire oppervlak uit de 3D-weergave.",
+ "44": "Van-der-Waals-oppervlak",
+ "45": "Toont het van-der-Waals-oppervlak in de 3D-weergave.",
+ "46": "Oplosmiddeltoegankelijk oppervlak",
+ "47": "Toont het oplosmiddeltoegankelijke oppervlak (probe 1,4 ångström) in de 3D-weergave.",
+ "48": "Oplosmiddeluitgesloten oppervlak",
+ "49": "Toont het oplosmiddeluitgesloten oppervlak in de 3D-weergave.",
+ "50": "ESP-oppervlak",
+ "51": "Kleurt het oppervlak naar een benaderde elektrostatische potentiaal uit de empirische partiële ladingen van de engine (rood negatief, blauw positief), met een legenda die de methode noemt.",
+ "52": "Toont de 3D-weergave in draadstijl; bij een 3D-object op de pagina wordt de keuze ermee opgeslagen.",
+ "53": "Toont de 3D-weergave in staafstijl; bij een 3D-object op de pagina wordt de keuze ermee opgeslagen.",
+ "54": "Bol en staaf",
+ "55": "Toont de 3D-weergave in bol-en-staafstijl; bij een 3D-object op de pagina wordt de keuze ermee opgeslagen.",
+ "56": "Ruimtevullend",
+ "57": "Toont de 3D-weergave in ruimtevullende stijl; bij een 3D-object op de pagina wordt de keuze ermee opgeslagen.",
+ "58": "Cartoon",
+ "59": "Toont de 3D-weergave in cartoonstijl (eiwitten en nucleïnezuren; liganden blijven bol-en-staaf); bij een 3D-object op de pagina wordt de keuze ermee opgeslagen.",
+ "60": "Dihedrale hoek (graden)",
+ "61": "Relatieve energie (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "3D-structuur exporteren",
+ "64": "Elk conformeer (SDF-records, PDB-modellen, XYZ-frames)",
+ "65": "1 conformeer opgeslagen; elk waterstofatoom wordt met zijn 3D-positie geschreven.",
+ "66": "Ligand extraheren",
+ "67": "Ligand",
+ "68": "Het ligand wordt een 2D-structuur naast het model, waarbij de coördinaten uit het bestand als conformeer behouden blijven.",
+ "69": "Extraheren",
+ "70": "SD-bestand (.sdf)",
+ "71": "MDL-molfile (.mol)",
+ "72": "{0} conformeren opgeslagen; elk waterstofatoom wordt met zijn 3D-positie geschreven.",
+ "73": "Conformeren",
+ "74": "Energievenster (kcal/mol)",
+ "75": "ETKDG-inbedding met een vaste seed, bijna-duplicaten uitgedund bij 0,5 Å RMSD van de zware atomen, elk geminimaliseerd; het laagste wordt het getoonde conformeer.",
+ "76": "Genereren",
+ "77": "Energieprofiel van de dihedrale scan",
+ "78": "Dihedrale scan",
+ "79": "Van (graden)",
+ "80": "Tot (graden)",
+ "81": "Stap (graden)",
+ "82": "Elk punt als conformeer bewaren (één ongedaanmakingsstap)",
+ "83": "Scan uitvoeren",
+ "84": "Een gerelaxeerde scan: bij elke hoek wordt de dihedrale hoek vastgehouden en al het andere geminimaliseerd.",
+ "85": "De eindhoek moet groter zijn dan de beginhoek.",
+ "86": "Scannen...",
+ "87": "Scan mislukt",
+ "88": "barrière {0} kcal/mol",
+ "89": "Weergavestijl",
+ "90": "Het oppervlak kleuren naar de elektrostatische potentiaal uit empirische partiële ladingen",
+ "91": "ESP",
+ "92": "Minimaliseren",
+ "93": "Scan...",
+ "94": "Op het ligand focussen",
+ "95": "Weergave herstellen",
+ "96": "Draaien",
+ "97": "De 3D-weergave exporteren",
+ "98": "Meten",
+ "99": "Metingen",
+ "100": "PNG-afbeelding",
+ "101": "PNG-afbeelding, transparant",
+ "102": "glTF binair (.glb)",
+ "103": "3D heeft WebGL nodig, dat dit venster niet biedt.",
+ "104": "3D-viewer laden...",
+ "105": "De 3D-viewer kon niet worden geladen",
+ "106": "Open een tekening en selecteer een structuur om die in 3D te zien.",
+ "107": "Selecteer een structuur op de pagina om die in 3D te zien.",
+ "108": "Kon de 3D-structuur niet lezen",
+ "109": "Dit conformeer kan niet als molfile worden geschreven",
+ "110": "Draaien staat uit: het systeem vraagt om verminderde beweging",
+ "111": "Een PDB- of CIF-model heeft geen conformeren.",
+ "112": "Energieën relatief ten opzichte van de laagste; klik op een conformeer om het te tonen.",
+ "113": "3D bouwen of Conformeren... vult deze lijst.",
+ "114": "Partiële ladingen niet beschikbaar",
+ "115": "de engine heeft nog geen 3D-routes",
+ "116": "niet geconvergeerd",
+ "117": "Kies vier achter elkaar gebonden atomen (een dihedrale hoek) en klik dan op Scan.",
+ "118": "Vink Elk punt als conformeer bewaren aan om de geometrieën te bekijken.",
+ "119": "Conformeer tonen",
+ "120": "3D-weergave bijwerken",
+ "121": "Kon de momentopname van de pagina niet bijwerken",
+ "122": "Geen oppervlak",
+ "123": "Van der Waals",
+ "124": "Oplosmiddeltoegankelijk",
+ "125": "Oplosmiddeluitgesloten",
+ "126": "Afstand",
+ "127": "Hoek",
+ "128": "Dihedrale hoek",
+ "129": "{0} kcal/mol, {1}, niet geconvergeerd",
+ "130": "Gekozen {0} / {1}: {2}",
+ "131": "Klik op {0} atomen om te meten",
+ "132": "ESP ({0}): {1}, rood {2} e tot blauw +{3} e",
+ "133": "Afstand {0}: {1}",
+ "134": "Hoek {0}: {1}",
+ "135": "Dihedrale hoek {0}: {1}",
+ "136": "Gebouwd: {0}",
+ "137": "Geminimaliseerd: {0}",
+ "138": "Conformeren bewaard: {0} van {1}",
+ "139": "Conformeren bewaard: {0}",
+ "140": "Dihedrale hoek {0}",
+ "141": "PNG-codering mislukt"
+}
diff --git a/frontend/src/i18n/locales/nl/part15.json b/frontend/src/i18n/locales/nl/part15.json
new file mode 100644
index 00000000..39c07cea
--- /dev/null
+++ b/frontend/src/i18n/locales/nl/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "benaderd, uit empirische ladingen",
+ "1": "{0} stereocentra of dubbele bindingen waren niet gespecificeerd; er is één configuratie gekozen.",
+ "2": "{0} stereolabels van de tekening worden in 3D niet weergegeven.",
+ "3": "Het getekende lid van de uitgebreide stereogroepen {0} is gebouwd; het 3D-model is één stereo-isomeer van het (relatieve of racemische) mengsel dat de tekening beschrijft.",
+ "4": "{0} keer ingebed (seeds {1}) om de getekende stereochemie te behouden.",
+ "5": "{0} paren zware atomen zitten dichterbij dan {1} van hun van-der-Waals-contact.",
+ "6": "Universeel krachtveld gebruikt: {0}.",
+ "7": "geen {0}-parameters voor {1}",
+ "8": "{0} kon niet elk atoom typeren",
+ "9": "{0} conformeren veranderden tijdens de minimalisatie de getekende stereochemie en zijn weggelaten.",
+ "10": "Meer dan 300 zware atomen: de kwaliteit van de conformeerbemonstering daalt bij deze grootte.",
+ "11": "De centrale binding zit in een ring; de ring wordt gespannen om de hoek te volgen.",
+ "12": "De structuur had geen 3D-coördinaten; de scan begon met een nieuwe inbedding.",
+ "13": "De structuur is veranderd terwijl 3D werd berekend; voer de opdracht opnieuw uit.",
+ "14": "De tekening heeft geen object {0}.",
+ "15": "{0} heeft nog geen 3D-coördinaten; bouw eerst 3D.",
+ "16": "{0} heeft geen conformeer {1}.",
+ "17": "De structuur heeft geen atomen.",
+ "18": "3D heeft echte atomen nodig: {0} atomen zijn labels, R-groepen of aanhechtingspunten ({1}).",
+ "19": "Kon geen waterstofatomen toevoegen: {0}",
+ "20": "De structuur heeft {0} atomen met waterstofatomen; 3D verwerkt er maximaal {1}.",
+ "21": "De 3D-coördinaten passen niet bij deze structuur (niets voor {0}); bouw 3D opnieuw.",
+ "22": "De 3D-coördinaten passen niet bij deze structuur (aantal waterstofatomen veranderd); bouw 3D opnieuw.",
+ "23": "De structuur kon niet in 3D worden ingebed: {0}",
+ "24": "De structuur kon niet in 3D worden ingebed; controleer de valenties en stereochemie.",
+ "25": "Conformeren konden niet worden ingebed: {0}",
+ "26": "Er kon geen conformeer worden ingebed; controleer de valenties en stereochemie van de structuur.",
+ "27": "Elk ingebed conformeer verloor na minimalisatie de getekende stereochemie.",
+ "28": "Geen krachtveld heeft parameters voor deze structuur ({0}).",
+ "29": "Het universele krachtveld kon niet worden ingesteld: {0}",
+ "30": "Het universele krachtveld kon niet worden ingesteld.",
+ "31": "Onbekende atomen {0}; gebruik fragmentatoom-id's of een waterstofatoom als a1:h0.",
+ "32": "De vier atomen moeten verschillend zijn.",
+ "33": "De vier atomen moeten een keten van bindingen vormen (a1-a2-a3-a4).",
+ "34": "Het 3D-bestand kon niet worden geschreven: {0}",
+ "35": "Het bestand is geen PDB-, mmCIF-, SDF- of MOL-bestand dat FormChem kan lezen.",
+ "36": "Het bestand heeft meer dan {0} atomen.",
+ "37": "Het PDB-bestand heeft geen ATOM- of HETATM-records.",
+ "38": "De mmCIF-tabel atom_site heeft geen kolommen Cartn_x, Cartn_y en Cartn_z.",
+ "39": "De CIF heeft fractionele coördinaten maar geen volledige eenheidscel.",
+ "40": "De CIF heeft geen atom_site-tabel.",
+ "41": "De CIF heeft geen leesbare atomen.",
+ "42": "Het bestand heeft geen records.",
+ "43": "Het bestand heeft {0} records; 3D-import leest er maximaal {1}.",
+ "44": "Geen enkel record van het bestand kon worden gelezen.",
+ "45": "{0} is geen PDB- of mmCIF-bestand.",
+ "46": "{0} kon niet in een FormChem-tekening worden omgezet: {1}.",
+ "47": "PDB-model als 3D-object geplaatst: {0}.",
+ "48": "mmCIF-model als 3D-object geplaatst: {0}.",
+ "49": "{0} ATOM- of HETATM-regels hadden onleesbare coördinaten en zijn overgeslagen.",
+ "50": "{0} atom_site-rijen hadden onleesbare coördinaten en zijn overgeslagen.",
+ "51": "CIF van een kleine molecuul: de asymmetrische eenheid wordt uit fractionele coördinaten gelezen; symmetriepartners worden niet gegenereerd.",
+ "52": "{0} heeft valentieproblemen; gelezen zonder opschoning.",
+ "53": "{0} heeft alleen 2D-coördinaten; er is geen conformeer bewaard.",
+ "54": "{0} waterstofatomen stonden niet in het bestand en zijn op basis van de geometrie geplaatst.",
+ "55": "Kon {0} niet lezen: {1}",
+ "56": "Kon {0} niet lezen.",
+ "57": "Record {0}",
+ "58": "De structuur",
+ "59": "De 3D-coördinaten van het bestand zijn bewaard als conformeer van 1 structuur; 3D bouwen is niet nodig om ze te bekijken.",
+ "60": "De 3D-coördinaten van het bestand zijn bewaard als conformeer van {0} structuren; 3D bouwen is niet nodig om ze te bekijken.",
+ "61": "{0} is een enkel ion; er is geen structuur om te extraheren.",
+ "62": "De atomen van {0} konden niet worden gelezen.",
+ "63": "Geen ligand {0} in de structuur; liganden: {1}.",
+ "64": "De tekening heeft geen 3D-model {0}.",
+ "65": "FormChem plaatst PNG-, JPEG-, GIF-, WebP- en SVG-afbeeldingen, JCAMP-DX-spectra en PDB-, mmCIF-, SDF- en MOL-structuurbestanden."
+}
diff --git a/frontend/src/i18n/locales/pl/part12.json b/frontend/src/i18n/locales/pl/part12.json
new file mode 100644
index 00000000..134efbb0
--- /dev/null
+++ b/frontend/src/i18n/locales/pl/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Widmo",
+ "1": "Narysuj lub zaznacz strukturę, aby ją nazwać.",
+ "2": "Nie udało się obliczyć nazw",
+ "3": "FormChem nie ma nazwy dla tej struktury.",
+ "4": "Kopiuj nazwę",
+ "5": "Skopiowano nazwę: {0}",
+ "6": "Nazwa chemiczna do wstawienia; pomiń, aby otworzyć okno dialogowe",
+ "7": "Kopiuje jako zwykły tekst nazwę zaznaczonej struktury (lub struktur na stronie): nazwę zwyczajową, gdy FormChem ją zna, a w przeciwnym razie nazwę systematyczną, którą oferuje tylko wtedy, gdy po odczytaniu daje tę samą strukturę.",
+ "8": "trivial lub systematic, aby wybrać nazwę do skopiowania; pomiń, aby użyć pierwszej",
+ "9": "Przewidywane widmo jest aktualne.",
+ "10": "Odśwież przewidywane widmo",
+ "11": "Najpierw zaznacz jedną strukturę",
+ "12": "Najpierw zaznacz przewidywane widmo",
+ "13": "Dodano przewidywane widmo NMR 1H ({0})",
+ "14": "Dodano przewidywane widmo NMR 13C ({0})",
+ "15": "Odświeżono przewidywane widmo ({0})",
+ "16": "Id fragmentu struktury; domyślnie zaznaczona struktura lub jedyna na stronie",
+ "17": "Częstotliwość spektrometru w MHz (domyślnie 400 dla 1H, 100 dla 13C)",
+ "18": "Dodaje obok zaznaczonej struktury przewidywane widmo NMR 1H jako jeden krok cofania: obiekt widma obliczony według własnych reguł przyrostów FormChem (bez bazy przesunięć), którego multiplety i całki są powiązane z atomami struktury, a tytuł podaje metodę, wersję i częstotliwość. Krzywa jest za każdym razem obliczana na nowo ze struktury i nigdy nie jest zapisywana.",
+ "19": "Dodaje obok zaznaczonej struktury przewidywane widmo NMR 13C jako jeden krok cofania: obiekt widma obliczony według własnych reguł przyrostów FormChem (bez bazy przesunięć), którego piki są powiązane z atomami struktury, a tytuł podaje metodę, wersję i częstotliwość. Krzywa jest za każdym razem obliczana na nowo ze struktury i nigdy nie jest zapisywana.",
+ "20": "Nie udało się przewidzieć widma",
+ "21": "Przewiduj widmo NMR 1H",
+ "22": "Przewiduj widmo NMR 13C",
+ "23": "Oblicza ponownie multiplety, całki lub piki przewidywanego widma po zmianie jego struktury, w aktualnej wersji predyktora, jako jeden krok cofania; gdy widmo jest aktualne, nic się nie zmienia.",
+ "24": "Id przewidywanego widma; domyślnie zaznaczone lub otwarte w edytorze widm",
+ "25": "Nie udało się odświeżyć widma",
+ "26": "Brak nowych pików w tym zakresie.",
+ "27": "Przeciągnij po zakresie w edytorze widm, aby go scałkować.",
+ "28": "Powiąż pik z atomami",
+ "29": "Usuń powiązanie piku",
+ "30": "Oś Y widma",
+ "31": "Widmo z pliku...",
+ "32": "Edytuj widmo...",
+ "33": "Wykryj piki",
+ "34": "Całkuj",
+ "35": "Transmitancja lub absorbancja",
+ "36": "Eksportuj widmo...",
+ "37": "Najpierw zaznacz widmo",
+ "38": "brak widma o id {0}",
+ "39": "Wykryte piki: {0} (już były: {1})",
+ "40": "Wykryte piki: {0}",
+ "41": "Całki dotyczą widm NMR",
+ "42": "Najpierw zaznacz pik, całkę lub multiplet w edytorze widm",
+ "43": "Wszystkie atomy muszą należeć do jednej struktury",
+ "44": "Tylko widma IR, Ramana i UV-Vis przełączają się między transmitancją a absorbancją",
+ "45": "Wyeksportowano: {0}",
+ "46": "Id obiektu widma; domyślnie zaznaczone widmo lub otwarte w edytorze widm",
+ "47": "Importuje plik widma JCAMP-DX do aktywnego rysunku (jeden obiekt widma na blok danych, plik zachowany bajt po bajcie), jako jeden krok cofania na plik. Bez path otwiera okno wyboru pliku.",
+ "48": "Bezwzględna ścieżka pliku .jdx, .dx lub .jcamp",
+ "49": "Nie udało się zaimportować widma",
+ "50": "Otwiera edytor widm dla zaznaczonego widma (tak samo jak dwukrotne kliknięcie).",
+ "51": "Nie udało się otworzyć widma",
+ "52": "Znajduje piki widma w zakresie (domyślnie w wyświetlanym) i dodaje je do listy pików, pomijając te, które już na niej są, jako jeden krok cofania.",
+ "53": "Początek zakresu w jednostce osi x (cm-1, nm, m/z, ppm)",
+ "54": "Koniec zakresu w jednostce osi x",
+ "55": "Opcjonalny próg wykrywania w jednostkach osi y",
+ "56": "Zastępuje listę pików zamiast do niej dodawać",
+ "57": "Nie udało się wykryć pików",
+ "58": "Dodaje całkę NMR w zakresie, skalowaną jak istniejące całki (lub do value, ze skalowaniem pozostałych), jako jeden krok cofania. Bez from i to przełącza edytor widm na narzędzie całkowania.",
+ "59": "Początek zakresu w ppm",
+ "60": "Koniec zakresu w ppm",
+ "61": "Wartość, jaką ma wskazywać ta całka, na przykład liczba protonów",
+ "62": "Nie udało się scałkować",
+ "63": "Wiąże pik, całkę lub multiplet z atomami struktury, jako jeden krok cofania. Bez atoms używa zaznaczonych atomów albo czeka, aż użytkownik kliknie atomy na rysunku.",
+ "64": "Id piku, całki lub multipletu; domyślnie zaznaczony w edytorze widm",
+ "65": "Id struktury (fragmentu), do której należą atomy",
+ "66": "Id atomów",
+ "67": "Nie udało się powiązać piku",
+ "68": "Usuwa powiązanie piku, całki lub multipletu z atomami, jako jeden krok cofania.",
+ "69": "Nie udało się usunąć powiązania piku",
+ "70": "Pokazuje widmo IR, Ramana lub UV-Vis jako transmitancję lub absorbancję (bez mode przełącza), jako jeden krok cofania.",
+ "71": "Oś Y do pokazania; pomiń, aby przełączyć",
+ "72": "Nie udało się zmienić osi y",
+ "73": "Zapisuje widmo jako JCAMP-DX (z tabelą pików, jeśli ma piki) lub jako CSV wszystkich punktów, za pośrednictwem silnika.",
+ "74": "Format pliku, domyślnie jdx",
+ "75": "Dla jdx: oryginalny zaimportowany plik bez zmian",
+ "76": "Bezwzględna ścieżka zapisu; pomiń, aby zapytać",
+ "77": "Nie udało się wyeksportować widma",
+ "78": "Wstaw widmo z pliku",
+ "79": "Plik nie zawiera widma, które FormChem potrafi narysować",
+ "80": "Wstaw widmo",
+ "81": "Nie udało się umieścić widma: jego plik nie dotarł do rysunku.",
+ "82": "Wstawione widma: {0}",
+ "83": "Długość fali (µm)",
+ "84": "Liczba falowa (cm⁻¹)",
+ "85": "Przesunięcie Ramana (cm⁻¹)",
+ "86": "Długość fali (nm)",
+ "87": "Częstotliwość (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmitancja (%)",
+ "90": "Transmitancja",
+ "91": "Absorbancja",
+ "92": "Względna zawartość (%)",
+ "93": "Intensywność",
+ "94": "NMR {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Przewidywane: {0}, {1} MHz ({2})",
+ "100": "Przewidywane: {0}, {1} MHz",
+ "101": "Przewidywane: {0} ({1})",
+ "102": "Przewidywane: {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Widmo niedostępne: {0}",
+ "105": "Wczytywanie widma",
+ "106": "Nazwa zwyczajowa",
+ "107": "Systematyczna",
+ "108": "Wysoka pewność",
+ "109": "Średnia pewność",
+ "110": "Niska pewność",
+ "111": "Nie odczytano",
+ "112": "Nazwy FormChem",
+ "113": "Nie udało się odczytać nazwy",
+ "114": "Wstaw strukturę z nazwy",
+ "115": "Struktura z nazwy",
+ "116": "Nazwa, na przykład aspiryna lub 2-metylopropan-1-ol",
+ "117": "Nazwa chemiczna",
+ "118": "Wpisz nazwę, aby zobaczyć jej strukturę.",
+ "119": "Brak struktury dla tej nazwy",
+ "120": "Słownik",
+ "121": "Parser systematyczny",
+ "122": "Generator nazw oparty na regułach, z kontrolą w obie strony",
+ "123": "Narzędzia widma",
+ "124": "Pokaż całe widmo",
+ "125": "Oś Y",
+ "126": "Pokaż ten zakres na stronie",
+ "127": "Kliknij dwukrotnie widmo na rysunku, aby edytować je tutaj.",
+ "128": "Piki i całki",
+ "129": "Przewidywane",
+ "130": "Wartość całki",
+ "131": "Powiąż z atomami",
+ "132": "Usuń powiązanie",
+ "133": "1 atom",
+ "134": "Atomy do powiązania",
+ "135": "Kliknij kolejne atomy, a potem Gotowe.",
+ "136": "Kliknij na rysunku atomy należące do tego piku, a potem Gotowe.",
+ "137": "Nie ma czego całkować w tym zakresie.",
+ "138": "Usuń pik",
+ "139": "Dodaj pik",
+ "140": "Powiązano z 1 atomem",
+ "141": "Ustaw zakres widma",
+ "142": "Wpisz liczbę dodatnią.",
+ "143": "Nie udało się ustawić całki",
+ "144": "Przesuwanie i powiększanie: przeciągnij, aby przesunąć, kółkiem powiększaj, Shift i przeciągnięcie powiększa zakres",
+ "145": "Powiększ zakres: przeciągnij po wykresie",
+ "146": "Wykrywanie pików: przeciągnij po zakresie",
+ "147": "Dodaj lub usuń pik: kliknij blisko piku",
+ "148": "Całkowanie: przeciągnij po zakresie",
+ "149": "Pik",
+ "150": "Całka",
+ "151": "Multiplet",
+ "152": "Liczba atomów: {0}",
+ "153": "Powiązano z {0}",
+ "154": "Przeciągnij, aby przesunąć, kółkiem powiększaj, Shift i przeciągnięcie powiększa zakres. Kliknij etykietę, aby ją zaznaczyć.",
+ "155": "Przeciągnij po wykresie, aby powiększyć ten zakres.",
+ "156": "Przeciągnij po zakresie, aby wykryć jego piki.",
+ "157": "Kliknij blisko piku, aby go dodać; kliknij etykietę piku, aby go usunąć.",
+ "158": "Przeciągnij po zakresie, aby go scałkować.",
+ "159": "Powiązano z atomami: {0}"
+}
diff --git a/frontend/src/i18n/locales/pl/part13.json b/frontend/src/i18n/locales/pl/part13.json
new file mode 100644
index 00000000..e298cfeb
--- /dev/null
+++ b/frontend/src/i18n/locales/pl/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "silnik zwrócił pusty plik",
+ "1": "nazwa jest dłuższa niż {0} znaków",
+ "2": "fragmenty powyżej {0} atomów nie są nazywane",
+ "3": "Struktura zawiera etykiety, grupy R lub atomy dowolne, które nie mają nazwy.",
+ "4": "Nie udało się odczytać struktury jako cząsteczki (sprawdź wartościowości).",
+ "5": "Brak struktury do nazwania.",
+ "6": "Nazwy z odwróconym indeksem (najpierw związek macierzysty, potem przecinek i podstawniki) nie są odczytywane; zapisz nazwę w normalnej kolejności, na przykład 1,2-dichlorobenzen.",
+ "7": "D- i L- są odczytywane tylko dla aminokwasów i cukrów ze słownika FormChem; dla innych nazw podaj deskryptory R lub S.",
+ "8": "FormChem odczytał całą nazwę, ale nie tworzy ona pełnej nazwy struktury (może brakować związku macierzystego, takiego jak heksan lub benzen, albo przyrostka).",
+ "9": "FormChem nie mógł odczytać nazwy od znaku {0} (\"{1}\").",
+ "10": "FormChem odczytał nazwę, ale {0}.",
+ "11": "nie udało się dokończyć struktury",
+ "12": "Nazwę można odczytać na więcej niż jeden sposób; FormChem narysował odczytanie wymagające najmniej założeń.",
+ "13": "Nazwa nie podaje deskryptorów stereochemicznych, więc centra stereogeniczne i wiązania podwójne są rysowane bez określenia.",
+ "14": "Brak nazwy systematycznej: {0}.",
+ "15": "Nazwa systematyczna zbudowana przez FormChem nie dała po odczytaniu tej samej struktury, więc nie jest pokazywana.",
+ "16": "to wiązanie podwójne nie może być E ani Z",
+ "17": "lokant deskryptora {0} nie jest pozycją związku macierzystego",
+ "18": "pozycja {0} nie rozpoczyna wiązania podwójnego, które może być E lub Z",
+ "19": "{0} wymaga dokładnie jednego wiązania podwójnego, które może być cis lub trans; ta struktura ma ich: {1}",
+ "20": "{0} jest niejasne dla tego wiązania podwójnego; podaj zamiast tego E lub Z",
+ "21": "({0}) wymaga lokantu: liczba centrów stereogenicznych w strukturze: {1}",
+ "22": "pozycja {0} nie jest centrum stereogenicznym, więc ({1}) nie ma zastosowania",
+ "23": "({0}) wymaga lokantu: liczba wiązań podwójnych, które mogą być E lub Z, w strukturze: {1}",
+ "24": "pozycji {0} nie można nadać {1}",
+ "25": "temu wiązaniu podwójnemu nie można nadać {0}",
+ "26": "{0} nie określa, o którą konfigurację chodzi, więc struktura jest rysowana bez stereochemii.",
+ "27": "{0} nie ma punktu przyłączenia",
+ "28": "brak miejsca na {0} w {1}",
+ "29": "{0} nie może się tam wiązać",
+ "30": "łańcuchy dłuższe niż {0} atomów węgla nie są jeszcze odczytywane",
+ "31": "{0} jest za mały, by być pierścieniem",
+ "32": "{0}-{1} to tautomer, którego FormChem jeszcze nie rysuje z nazwy",
+ "33": "lokant {0} nie jest pozycją w {1}",
+ "34": "{0} nie jest pozycją w łańcuchu",
+ "35": "wiązanie wielokrotne nie może zaczynać się w pozycji {0} struktury {1}",
+ "36": "pozycja {0} struktury {1} nie może mieć tego wiązania wielokrotnego",
+ "37": "brak miejsca na wiązanie wielokrotne w pozycji {0} struktury {1}",
+ "38": "brak miejsca na wiązania wielokrotne w {0}",
+ "39": "Nie podano pozycji wiązań wielokrotnych w {0}; narysowano je w najniższych pozycjach.",
+ "40": "-{0} wymaga łańcucha otwartego; w pierścieniu przyrostkiem jest karbaldehyd, kwas karboksylowy, karbonitryl lub karboksyamid",
+ "41": "łańcuch ma tylko dwa końce dla -{0}",
+ "42": "{0} jest za krótki dla dwóch grup -{1}",
+ "43": "brak miejsca na -{0} w {1}",
+ "44": "Nie podano pozycji -{0} w {1}; narysowano w najniższej pozycji.",
+ "45": "-{0} musi być na końcu łańcucha, a nie w {1}",
+ "46": "brak miejsca na -{0} w {1}",
+ "47": "orto, meta i para wymagają pierścienia benzenowego",
+ "48": "orto, meta lub para z jedną grupą wymaga związku macierzystego, takiego jak fenol, anilina lub toluen",
+ "49": "brak miejsca na {0} w {1}",
+ "50": "brak miejsca na grupy {1} (liczba: {0}) w {2}",
+ "51": "Nie podano pozycji {0} w {1}; narysowano w najniższej wolnej pozycji.",
+ "52": "{0} nie może mieć podstawników",
+ "53": "grupa acylowa jest przyłączona przez atom węgla karbonylowego",
+ "54": "{0} nie ma wolnej pozycji",
+ "55": "Nie podano pozycji przyłączenia {0}; przyjęto pozycję {1}.",
+ "56": "{0} nie ma już miejsca na przyłączenie",
+ "57": "lokanty {0} przed {1} nie są używane",
+ "58": "{0} nie może stać jako osobne słowo",
+ "59": "\"{0}\" wymaga {1} grupy przed sobą, nazwa podaje {2}",
+ "60": "\"{0}\" wymaga {1} grup przed sobą, nazwa podaje {2}",
+ "61": "nazwa podaje grupy alkilowe: {0}, a pozycje estrowe: {1}",
+ "62": "nazwa podaje grupy alkilowe: {0}, a pozycje estrowe: {1}",
+ "63": "nazwa podaje grupy alkilowe: {0}, a pozycje estrowe: {1}",
+ "64": "nazwa podaje grupy alkilowe: {0}, a pozycje estrowe: {1}",
+ "65": "opisywana struktura jest nieprawidłowa ({0})",
+ "66": "-on w {0} byłby aldehydem; aldehyd nazywa się z końcówką -al",
+ "67": "pozycji {0} w strukturze {1}",
+ "68": "zbyt wiele identycznych podstawników",
+ "69": "mieszane lokanty",
+ "70": "nietypowe rodzaje wiązań nie są jeszcze nazywane",
+ "71": "układ pierścieni, którego FormChem jeszcze nie potrafi nazwać",
+ "72": "pierścienie aromatyczne z egzocyklicznymi wiązaniami podwójnymi (takie jak pirydony) nie są jeszcze nazywane",
+ "73": "izotopy i rodniki nie są jeszcze nazywane",
+ "74": "hiperwalencyjne fluorowce nie są nazywane",
+ "75": "naładowane grupy azotowe inne niż nitrowa nie są jeszcze nazywane",
+ "76": "atomy naładowane nie są jeszcze nazywane",
+ "77": "tlenki siarki, azotu i fosforu nie są jeszcze nazywane",
+ "78": "ta grupa tlenowa nie jest jeszcze nazywana",
+ "79": "sulfotlenki, sulfony i inne grupy siarkowe nie są jeszcze nazywane",
+ "80": "iminy, związki azowe i podobne grupy azotowe nie są jeszcze nazywane",
+ "81": "{0} nie jest jeszcze nazywany",
+ "82": "łańcuchy podstawników dłuższe niż 20 atomów węgla nie są nazywane",
+ "83": "nienasycone grupy acylowe nie są jeszcze nazywane",
+ "84": "podstawione grupy ylidenowe nie są jeszcze nazywane",
+ "85": "pierścieniowe grupy ylidenowe nie są jeszcze nazywane",
+ "86": "pierścienie przyłączone dwukrotnie nie są jeszcze nazywane",
+ "87": "nie znaleziono numeracji dla podstawnika pierścieniowego",
+ "88": "estry z różnymi częściami alkoholowymi nie są jeszcze nazywane",
+ "89": "nie znaleziono łańcucha ani pierścienia głównego",
+ "90": "estry cykliczne (laktony) nie są jeszcze nazywane",
+ "91": "podstawniki przy więcej niż jednym atomie azotu aminy lub amidu nie są jeszcze nazywane",
+ "92": "centra stereogeniczne poza łańcuchem lub pierścieniem głównym nie są jeszcze nazywane",
+ "93": "geometria wiązania podwójnego poza łańcuchem głównym nie jest jeszcze nazywana",
+ "94": "centra pseudoasymetryczne nie są jeszcze nazywane",
+ "95": "ta geometria wiązania podwójnego nie jest jeszcze nazywana",
+ "96": "łańcuchy dłuższe niż 20 atomów węgla nie są nazywane",
+ "97": "zbyt wiele identycznych grup",
+ "98": "struktura ma błędy wartościowości",
+ "99": "sole i mieszaniny nie są jeszcze nazywane systematycznie",
+ "100": "struktury z więcej niż {0} atomami ciężkimi nie są jeszcze nazywane systematycznie",
+ "101": "związki {0} nie są jeszcze nazywane systematycznie",
+ "102": "atomy zapytania i grupy R nie mają nazwy",
+ "103": "wodorki pojedynczego heteroatomu są nazywane tylko ze słownika",
+ "104": "{0} nie jest obiektem tego rysunku.",
+ "105": "{0} nie ma atomów.",
+ "106": "Fragment nie ma atomów.",
+ "107": "Rysunek nie ma strony.",
+ "108": "{0} nie jest widmem tego rysunku.",
+ "109": "Struktury {0}, do której należy ta predykcja, nie ma już na rysunku.",
+ "110": "Rysunek {0} został zamknięty.",
+ "111": "Przesunięcie chemiczne (ppm)",
+ "112": "Czas (s)",
+ "113": "Współczynnik odbicia",
+ "114": "Zawartość względna",
+ "115": "##{0}= występuje więcej niż raz; zachowano pierwszą wartość.",
+ "116": "##XYDATA={0} nie jest znaną listą zmiennych; odczytano ją jako (X++(Y..Y)).",
+ "117": "##{0}={1} nie jest znaną listą zmiennych; odczytano ją jako (XY..XY).",
+ "118": "Punkty nie były uporządkowane według x i zostały posortowane.",
+ "119": "Nie udało się odczytać ##.SHIFT REFERENCE={0}; przesunięcia nie zostały odniesione do wzorca.",
+ "120": "##.SHIFT REFERENCE wskazuje punkt {0}, poza {1} punktami; przesunięcia nie zostały odniesione do wzorca.",
+ "121": "Przesunięcia odniesiono do wzorca tak, że punkt {0} odpowiada {1} ppm ({2}).",
+ "122": "Plik nie podaje obserwowanego jądra.",
+ "123": "To dane NMR w dziedzinie czasu (FID); są pokazane tak, jak zarejestrowano, bez transformaty Fouriera.",
+ "124": "Częstotliwości w Hz podzielono przez częstotliwość obserwacji ({0} MHz), aby uzyskać ppm.",
+ "125": "Brak ##.SHIFT REFERENCE; przyjęto, że 0 Hz to 0 ppm.",
+ "126": "Brak ##.OBSERVE FREQUENCY, więc oś przesunięcia pozostaje w Hz.",
+ "127": "Transmitancja była zapisana jako ułamek i jest pokazana w procentach.",
+ "128": "Blok {0} zawiera więcej niż {1} punktów.",
+ "129": "##DATA TYPE={0} z jednostkami osi x {1} nie wskazuje żadnej znanej techniki; narysowano go jako zwykłe widmo.",
+ "130": "##BLOCKS={0}, ale blok LINK zawiera bloków: {1}; odczytano wszystkie znalezione bloki.",
+ "131": "To nie jest plik JCAMP-DX: nie ma rekordu ##TITLE=.",
+ "132": "Plik zawiera kolejno bloków: {0}, bez bloku LINK; każdy z nich odczytano.",
+ "133": "Dwa bloki mają to samo ##BLOCK_ID.",
+ "134": "Plik nie zawiera widma, które FormChem potrafi narysować ({0}).",
+ "135": "Blok \"{0}\" nie został narysowany: {1}.",
+ "136": "blok struktury (JCAMP-CS); jest zachowany w pliku, ale nie jest rysowany",
+ "137": "nie zawiera XYDATA, XYPOINTS, PEAK TABLE ani NTUPLES",
+ "138": "jego tabela danych nie zawiera punktów",
+ "139": "jego tabela NTUPLES nie deklaruje symboli",
+ "140": "widma NTUPLES 2D nie są jeszcze obsługiwane",
+ "141": "jego tabela NTUPLES nie ma czytelnych stron",
+ "142": "Plik zawiera znaki spoza ASCII; odczytano go jako UTF-8.",
+ "143": "Plik zawiera bajty, które nie są ASCII ani UTF-8; odczytano go jako Latin-1.",
+ "144": "Wiersze spoza jakiegokolwiek opisanego rekordu danych zostały pominięte.",
+ "145": "Pominięto ##END= bez poprzedzającego bloku.",
+ "146": "Rekordy przed pierwszym ##TITLE= lub po ostatnim ##END= zostały pominięte.",
+ "147": "Plik kończy się bez ##END=; otwarte bloki zostały zamknięte.",
+ "148": "Strona NTUPLES {0}",
+ "149": "Strona NTUPLES {0} nie ma ##DATA TABLE=; została pominięta.",
+ "150": "Strona NTUPLES {0} używa symboli ({1}) niezadeklarowanych w ##SYMBOL=; została pominięta.",
+ "151": "{0} ma postać tabeli danych, której FormChem nie odczytuje ({1}); została pominięta.",
+ "152": "Tabela NTUPLES nie ma ##END NTUPLES=; odczytano ją do końca bloku.",
+ "153": "Tabela NTUPLES nie ma listy ##SYMBOL=.",
+ "154": "To widmo 2D (dwie zmienne niezależne); widma 2D nie są rysowane w tej wersji.",
+ "155": "Liczba stron w tabeli NTUPLES: {0}; odczytano tylko pierwsze {1}.",
+ "156": "Strona urojona nie ma tych samych wartości x co strona rzeczywista; została pominięta.",
+ "157": "Liczba stron w tabeli NTUPLES: {0}; pokazano stronę {1}, a pominięto pozostałe strony: {2}.",
+ "158": "##DELTAX={0} różni się od (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; użyto obliczonego odstępu.",
+ "159": "{0} nie ma kompletnych FIRSTX, LASTX i NPOINTS; odstęp pochodzi z ##DELTAX.",
+ "160": "Wiersz danych zaczął się od wartości DIF; jest kontynuowany od ostatniej wartości poprzedniego wiersza.",
+ "161": "Wartość kontrolna Y nie zgadzała się z ostatnią wartością poprzedniego wiersza; wiersz kontynuowano od wcześniejszej wartości.",
+ "162": "Nie udało się odczytać znaków ({0}) w {1}; zostały pominięte.",
+ "163": "Liczba wierszy DIF bez następującej po nich wartości kontrolnej Y: {0}.",
+ "164": "{0} nie zawiera punktów danych.",
+ "165": "{0} zawiera {1} punktów, ale ##NPOINTS={2}; wartości x w wierszach pasują do {3} punktów od FIRSTX do LASTX, więc użyto tego odstępu.",
+ "166": "{0} zawiera {1} punktów, ale ##NPOINTS={2}; zachowano odczytane punkty.",
+ "167": "Wartość x wiersza nie zgadza się z jego pozycją wynikającą z FIRSTX i odstępu; użyto pozycji.",
+ "168": "{0} nie ma FIRSTX, LASTX i NPOINTS; odstęp przyjęto z wartości x w wierszach.",
+ "169": "{0} nie podaje sposobu umieszczenia punktów na osi x; ponumerowano je 0, 1, 2 i tak dalej.",
+ "170": "Pierwszy wiersz zaczyna się od x = {0}, ale ##FIRSTX={1}; użyto FIRSTX.",
+ "171": "Pierwsza wartość Y {0} nie zgadza się z ##FIRSTY={1}.",
+ "172": "{0} kończy się niepełną grupą {1} wartości; została odrzucona.",
+ "173": "Nie udało się odczytać {0}: {1}.",
+ "174": "Widmo wymaga bloku {0}, ale jego plik zawiera 1 blok.",
+ "175": "Widmo wymaga bloku {0}, ale liczba bloków w jego pliku: {1}.",
+ "176": "Widmo nie ma źródła.",
+ "177": "Pliku {0} widma nie ma na rysunku.",
+ "178": "W tym silniku nie ma predyktora dla {0}.",
+ "179": "Predykcja nie powiodła się: {0}",
+ "180": "Źródłem widma nie jest ani plik, ani predykcja.",
+ "181": "Rysunek nie ma widma {0}.",
+ "182": "Widma liniowe nie mają pól do scałkowania.",
+ "183": "value musi być większe od zera.",
+ "184": "from i to muszą być dwiema różnymi wartościami x.",
+ "185": "Widmo nie ma całki {0}.",
+ "186": "To widmo nie ma pliku oryginalnego; wyeksportuj je bez original=1.",
+ "187": "FormChem umieszcza obrazy PNG, JPEG, GIF, WebP i SVG oraz widma JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/pl/part14.json b/frontend/src/i18n/locales/pl/part14.json
new file mode 100644
index 00000000..87a2edf3
--- /dev/null
+++ b/frontend/src/i18n/locales/pl/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Wyświetlanie",
+ "1": "Powierzchnia",
+ "2": "Nie ma nic do wyeksportowania: widok 3D jest pusty.",
+ "3": "Eksport nie powiódł się",
+ "4": "Zaznacz strukturę, aby pokazać ją w 3D.",
+ "5": "Zbuduj 3D",
+ "6": "Wstaw widok 3D",
+ "7": "Wybierz plik PDB, mmCIF, SDF lub MOL.",
+ "8": "Nie udało się umieścić struktury 3D na stronie",
+ "9": "Zaznacz obiekt 3D otwarty z pliku PDB lub mmCIF.",
+ "10": "Ten model nie ma ligandów.",
+ "11": "Nie udało się wyodrębnić liganda",
+ "12": "Brak współrzędnych 3D: Zbuduj 3D tworzy konformer z rysunku.",
+ "13": "Plik struktury 3D...",
+ "14": "Wyodrębnij ligand...",
+ "15": "Eksportuj strukturę 3D...",
+ "16": "Skan kąta dwuściennego...",
+ "17": "Mierz w 3D",
+ "18": "Eksportuj widok 3D jako PNG...",
+ "19": "Eksportuj widok 3D jako glTF...",
+ "20": "Wyodrębniono {0}: {1} (rzędy wiązań wywnioskowane)",
+ "21": "Wyodrębniono {0}: {1}",
+ "22": "Najpierw otwórz widok 3D",
+ "23": "Otwiera panel Widok 3D dla zaznaczonej struktury (lub zaznaczonego obiektu 3D na stronie) i podąża za zaznaczeniem. Struktura potrzebuje najpierw współrzędnych 3D: tworzy je Zbuduj 3D.",
+ "24": "Buduje konformer 3D zaznaczonej struktury z jej rysunku 2D (zachowując kliny, geometrię wiązań podwójnych i ładunki), minimalizuje go wybranym polem siłowym i zapisuje na rysunku jako jeden krok cofania; widok 3D go pokazuje.",
+ "25": "Minimalizuje pokazany konformer zaznaczonej struktury polem siłowym wybranym w widoku 3D (domyślnie MMFF94, UFF gdy MMFF94 nie ma parametrów) i podaje energię przed i po, jako jeden krok cofania.",
+ "26": "Generuje zespół konformerów zaznaczonej struktury (ETKDG, przesiany według RMSD, każdy zminimalizowany) i zachowuje te mieszczące się w oknie energii; z n, window i method działa bez okna dialogowego.",
+ "27": "Konformery do wygenerowania",
+ "28": "Okno energii w kcal/mol",
+ "29": "Umieszcza na stronie obok zaznaczonej struktury jej widok 3D (najpierw budując współrzędne 3D, jeśli ich nie ma) i otwiera powiązany z nim panel Widok 3D; obrót lub zmiana stylu modelu aktualizuje obraz na stronie.",
+ "30": "Otwiera plik PDB, mmCIF, SDF lub MOL jako obiekt 3D na stronie (białka jako wstęgi, ligandy jako kulki i pałeczki, bez wody, z ligandem w centrum uwagi) i pokazuje go w widoku 3D.",
+ "31": "Zamienia ligand zaznaczonego obiektu 3D (otwartego z pliku PDB lub mmCIF) w strukturę 2D obok niego, jako jeden krok cofania: rzędy wiązań z wbudowanego szablonu dla typowych ligandów, w przeciwnym razie wywnioskowane z geometrii i zgłoszone; współrzędne z pliku stają się jego konformerem. Z ligand bierze ten jeden; bez niego pyta, gdy model ma kilka.",
+ "32": "Klucz liganda łańcuch:het:numer lub kod het",
+ "33": "Zaznacz obiekt 3D otwarty z pliku PDB lub mmCIF",
+ "34": "Zapisuje współrzędne 3D zaznaczonej struktury ze wszystkimi wodorami: plik MDL molfile (pokazany konformer), plik SD (wszystkie konformery, z polami danych o energii i metodzie), PDB lub XYZ (pokazany konformer albo wszystkie jako modele lub klatki); obiekt 3D otwarty z pliku PDB lub mmCIF zapisuje swój oryginalny plik. Bez format pyta.",
+ "35": "Format pliku",
+ "36": "Wszystkie konformery zamiast pokazanego (domyślnie true dla sdf)",
+ "37": "Skanuje kąt dwuścienny czterech atomów wybranych w widoku 3D (lub jego ostatni pomiar kąta dwuściennego) z relaksowaną minimalizacją i rysuje wykres kąta względem energii.",
+ "38": "Mierzy odległość (dwa atomy), kąt (trzy) lub kąt dwuścienny (cztery) w widoku 3D i dodaje do listy; z atoms (id atomów fragmentu, takie jak a1, wodory jako a1:h0, lub numery seryjne PDB) mierzy te atomy, w przeciwnym razie przełącza na wybieranie.",
+ "39": "Od dwóch do czterech id atomów",
+ "40": "Zapisuje widok 3D jako obraz PNG w rozmiarze na ekranie; transparent pomija tło.",
+ "41": "Zapisuje widok 3D jako binarny plik glTF 2.0 (.glb): atomy jako kule, wiązania jako walce w kolorach pierwiastków, 1 ångström = 1 cm, dla przeglądarek 3D, prezentacji i druku.",
+ "42": "Bez powierzchni",
+ "43": "Usuwa powierzchnię molekularną z widoku 3D.",
+ "44": "Powierzchnia van der Waalsa",
+ "45": "Pokazuje powierzchnię van der Waalsa w widoku 3D.",
+ "46": "Powierzchnia dostępna dla rozpuszczalnika",
+ "47": "Pokazuje powierzchnię dostępną dla rozpuszczalnika (sonda 1,4 ångström) w widoku 3D.",
+ "48": "Powierzchnia wykluczona dla rozpuszczalnika",
+ "49": "Pokazuje powierzchnię wykluczoną dla rozpuszczalnika w widoku 3D.",
+ "50": "Powierzchnia z mapą ESP",
+ "51": "Koloruje powierzchnię według przybliżonego potencjału elektrostatycznego obliczonego z empirycznych ładunków cząstkowych silnika (czerwony ujemny, niebieski dodatni), z legendą podającą metodę.",
+ "52": "Pokazuje widok 3D w stylu szkieletowym; w obiekcie 3D na stronie wybór jest zapisywany razem z nim.",
+ "53": "Pokazuje widok 3D w stylu pałeczkowym; w obiekcie 3D na stronie wybór jest zapisywany razem z nim.",
+ "54": "Kulkowo-pałeczkowy",
+ "55": "Pokazuje widok 3D w stylu kulkowo-pałeczkowym; w obiekcie 3D na stronie wybór jest zapisywany razem z nim.",
+ "56": "Kalotowy",
+ "57": "Pokazuje widok 3D w stylu kalotowym (wypełnienie przestrzeni); w obiekcie 3D na stronie wybór jest zapisywany razem z nim.",
+ "58": "Wstęgowy",
+ "59": "Pokazuje widok 3D w stylu wstęgowym (białka i kwasy nukleinowe; ligandy pozostają kulkowo-pałeczkowe); w obiekcie 3D na stronie wybór jest zapisywany razem z nim.",
+ "60": "Kąt dwuścienny (stopnie)",
+ "61": "Energia względna (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "Eksport struktury 3D",
+ "64": "Wszystkie konformery (rekordy SDF, modele PDB, klatki XYZ)",
+ "65": "Zapisano 1 konformer; każdy wodór jest zapisany ze swoją pozycją 3D.",
+ "66": "Wyodrębnij ligand",
+ "67": "Ligand",
+ "68": "Ligand staje się strukturą 2D obok modelu, a jego współrzędne z pliku zostają zachowane jako konformer.",
+ "69": "Wyodrębnij",
+ "70": "Plik SD (.sdf)",
+ "71": "MDL Molfile (.mol)",
+ "72": "Zapisane konformery: {0}; każdy wodór jest zapisany ze swoją pozycją 3D.",
+ "73": "Konformery",
+ "74": "Okno energii (kcal/mol)",
+ "75": "Osadzanie ETKDG ze stałym ziarnem, niemal duplikaty usunięte przy RMSD atomów ciężkich 0,5 Å, każdy zminimalizowany; najniższy staje się pokazanym konformerem.",
+ "76": "Generuj",
+ "77": "Profil energii skanu kąta dwuściennego",
+ "78": "Skan kąta dwuściennego",
+ "79": "Od (stopnie)",
+ "80": "Do (stopnie)",
+ "81": "Krok (stopnie)",
+ "82": "Zachowaj każdy punkt jako konformer (jeden krok cofania)",
+ "83": "Uruchom skan",
+ "84": "Skan relaksowany: przy każdym kącie kąt dwuścienny jest utrzymywany, a wszystko inne minimalizowane.",
+ "85": "Kąt końcowy musi być większy niż początkowy.",
+ "86": "Skanowanie...",
+ "87": "Skan nie powiódł się",
+ "88": "bariera {0} kcal/mol",
+ "89": "Styl wyświetlania",
+ "90": "Koloruj powierzchnię według potencjału elektrostatycznego z empirycznych ładunków cząstkowych",
+ "91": "ESP",
+ "92": "Minimalizuj",
+ "93": "Skan...",
+ "94": "Skup na ligandzie",
+ "95": "Resetuj widok",
+ "96": "Obracaj",
+ "97": "Eksportuj widok 3D",
+ "98": "Mierz",
+ "99": "Pomiary",
+ "100": "Obraz PNG",
+ "101": "Obraz PNG, przezroczysty",
+ "102": "glTF binarny (.glb)",
+ "103": "3D wymaga WebGL, którego to okno nie oferuje.",
+ "104": "Wczytywanie przeglądarki 3D...",
+ "105": "Nie udało się wczytać przeglądarki 3D",
+ "106": "Otwórz rysunek i zaznacz strukturę, aby zobaczyć ją w 3D.",
+ "107": "Zaznacz strukturę na stronie, aby zobaczyć ją w 3D.",
+ "108": "Nie udało się odczytać struktury 3D",
+ "109": "Tego konformera nie można zapisać jako molfile",
+ "110": "Obracanie jest wyłączone: system prosi o ograniczenie ruchu",
+ "111": "Model PDB lub CIF nie ma konformerów.",
+ "112": "Energie względem najniższej; kliknij jedną, aby ją pokazać.",
+ "113": "Zbuduj 3D lub Konformery... wypełniają tę listę.",
+ "114": "Ładunki cząstkowe niedostępne",
+ "115": "silnik nie ma jeszcze tras 3D",
+ "116": "nie osiągnięto zbieżności",
+ "117": "Wybierz cztery połączone kolejno atomy (kąt dwuścienny), a potem Skan.",
+ "118": "Zaznacz Zachowaj każdy punkt jako konformer, aby zobaczyć geometrie.",
+ "119": "Pokaż konformer",
+ "120": "Aktualizuj widok 3D",
+ "121": "Nie udało się zaktualizować migawki strony",
+ "122": "Bez powierzchni",
+ "123": "van der Waalsa",
+ "124": "Dostępna dla rozpuszczalnika",
+ "125": "Wykluczona dla rozpuszczalnika",
+ "126": "Odległość",
+ "127": "Kąt",
+ "128": "Kąt dwuścienny",
+ "129": "{0} kcal/mol, {1}, nie osiągnięto zbieżności",
+ "130": "Wybrano {0} / {1}: {2}",
+ "131": "Kliknij {0} atomy, aby zmierzyć",
+ "132": "ESP ({0}): {1}, czerwony {2} e do niebieskiego +{3} e",
+ "133": "Odległość {0}: {1}",
+ "134": "Kąt {0}: {1}",
+ "135": "Kąt dwuścienny {0}: {1}",
+ "136": "Zbudowano: {0}",
+ "137": "Zminimalizowano: {0}",
+ "138": "Zachowane konformery: {0} z {1}",
+ "139": "Zachowane konformery: {0}",
+ "140": "Kąt dwuścienny {0}",
+ "141": "Kodowanie PNG nie powiodło się"
+}
diff --git a/frontend/src/i18n/locales/pl/part15.json b/frontend/src/i18n/locales/pl/part15.json
new file mode 100644
index 00000000..f8d3832a
--- /dev/null
+++ b/frontend/src/i18n/locales/pl/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "przybliżony, z ładunków empirycznych",
+ "1": "Nieokreślone centra stereogeniczne lub wiązania podwójne: {0}; wybrano jedną konfigurację.",
+ "2": "Etykiety stereo z rysunku niewiernie odtworzone w 3D: {0}.",
+ "3": "Zbudowano narysowany człon rozszerzonej grupy stereo {0}; model 3D jest jednym stereoizomerem mieszaniny (względnej lub racemicznej) opisanej rysunkiem.",
+ "4": "Osadzono {0} razy (ziarna {1}), aby zachować narysowaną stereochemię.",
+ "5": "Pary atomów ciężkich bliższych niż {1} ich kontaktu van der Waalsa: {0}.",
+ "6": "Użyto uniwersalnego pola siłowego: {0}.",
+ "7": "brak parametrów {0} dla {1}",
+ "8": "{0} nie mogło przypisać typu wszystkim atomom",
+ "9": "Konformery, które zmieniły narysowaną stereochemię podczas minimalizacji i zostały pominięte: {0}.",
+ "10": "Więcej niż 300 atomów ciężkich: jakość próbkowania konformerów spada przy tym rozmiarze.",
+ "11": "Wiązanie centralne leży w pierścieniu; pierścień jest naprężany, aby podążał za kątem.",
+ "12": "Struktura nie miała współrzędnych 3D; skan rozpoczęto od nowego osadzenia.",
+ "13": "Struktura zmieniła się w trakcie obliczania 3D; uruchom polecenie ponownie.",
+ "14": "Rysunek nie ma obiektu {0}.",
+ "15": "{0} nie ma jeszcze współrzędnych 3D; najpierw zbuduj 3D.",
+ "16": "{0} nie ma konformera {1}.",
+ "17": "Struktura nie ma atomów.",
+ "18": "3D wymaga prawdziwych atomów; liczba etykiet, grup R i punktów przyłączenia wśród atomów: {0} ({1}).",
+ "19": "Nie udało się dodać wodorów: {0}",
+ "20": "Struktura ma {0} atomów z wodorami; 3D obsługuje do {1}.",
+ "21": "Współrzędne 3D nie pasują do tej struktury (brak dla {0}); zbuduj 3D ponownie.",
+ "22": "Współrzędne 3D nie pasują do tej struktury (zmieniła się liczba wodorów); zbuduj 3D ponownie.",
+ "23": "Nie udało się osadzić struktury w 3D: {0}",
+ "24": "Nie udało się osadzić struktury w 3D; sprawdź jej wartościowości i stereochemię.",
+ "25": "Nie udało się osadzić konformerów: {0}",
+ "26": "Nie udało się osadzić żadnego konformera; sprawdź wartościowości i stereochemię struktury.",
+ "27": "Każdy osadzony konformer utracił narysowaną stereochemię po minimalizacji.",
+ "28": "Żadne pole siłowe nie ma parametrów dla tej struktury ({0}).",
+ "29": "Nie udało się skonfigurować uniwersalnego pola siłowego: {0}",
+ "30": "Nie udało się skonfigurować uniwersalnego pola siłowego.",
+ "31": "Nieznane atomy: {0}; użyj id atomów fragmentu lub wodoru jako a1:h0.",
+ "32": "Cztery atomy muszą być różne.",
+ "33": "Cztery atomy muszą tworzyć łańcuch wiązań (a1-a2-a3-a4).",
+ "34": "Nie udało się zapisać pliku 3D: {0}",
+ "35": "Plik nie jest plikiem PDB, mmCIF, SDF ani MOL, który FormChem potrafi odczytać.",
+ "36": "Plik ma więcej niż {0} atomów.",
+ "37": "Plik PDB nie ma rekordów ATOM ani HETATM.",
+ "38": "Tabela atom_site w mmCIF nie ma kolumn Cartn_x, Cartn_y i Cartn_z.",
+ "39": "CIF ma współrzędne ułamkowe, ale nie ma kompletnej komórki elementarnej.",
+ "40": "CIF nie ma tabeli atom_site.",
+ "41": "CIF nie ma czytelnych atomów.",
+ "42": "Plik nie ma rekordów.",
+ "43": "Plik ma {0} rekordów; import 3D czyta do {1}.",
+ "44": "Nie udało się odczytać żadnego rekordu pliku.",
+ "45": "{0} nie jest plikiem PDB ani mmCIF.",
+ "46": "Nie udało się zamienić {0} na rysunek FormChem: {1}.",
+ "47": "Model PDB umieszczony jako obiekt 3D: {0}.",
+ "48": "Model mmCIF umieszczony jako obiekt 3D: {0}.",
+ "49": "Wiersze ATOM lub HETATM o nieczytelnych współrzędnych, pominięte: {0}.",
+ "50": "Wiersze atom_site o nieczytelnych współrzędnych, pominięte: {0}.",
+ "51": "CIF małej cząsteczki: jednostka asymetryczna jest odczytywana ze współrzędnych ułamkowych; odpowiedniki symetryczne nie są generowane.",
+ "52": "{0} ma problemy z wartościowością; odczytano bez sanityzacji.",
+ "53": "{0} ma tylko współrzędne 2D; nie zachowano żadnego konformera.",
+ "54": "Wodory, których nie było w pliku i które umieszczono na podstawie geometrii: {0}.",
+ "55": "{0}: nie udało się odczytać: {1}",
+ "56": "{0}: nie udało się odczytać.",
+ "57": "Rekord {0}",
+ "58": "Struktura",
+ "59": "Współrzędne 3D z pliku zachowano jako konformer 1 struktury; do ich obejrzenia nie trzeba Zbuduj 3D.",
+ "60": "Współrzędne 3D z pliku zachowano jako konformery struktur w liczbie {0}; do ich obejrzenia nie trzeba Zbuduj 3D.",
+ "61": "{0} jest pojedynczym jonem; nie ma struktury do wyodrębnienia.",
+ "62": "Nie udało się odczytać atomów {0}.",
+ "63": "Brak liganda {0} w strukturze; ligandy: {1}.",
+ "64": "Rysunek nie ma modelu 3D {0}.",
+ "65": "FormChem umieszcza obrazy PNG, JPEG, GIF, WebP i SVG, widma JCAMP-DX oraz pliki struktur PDB, mmCIF, SDF i MOL."
+}
diff --git a/frontend/src/i18n/locales/pt-BR/part12.json b/frontend/src/i18n/locales/pt-BR/part12.json
new file mode 100644
index 00000000..7c512214
--- /dev/null
+++ b/frontend/src/i18n/locales/pt-BR/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Espectro",
+ "1": "Desenhe ou selecione uma estrutura para nomeá-la.",
+ "2": "Não foi possível calcular os nomes",
+ "3": "O FormChem não tem nome para esta estrutura.",
+ "4": "Copiar Nome",
+ "5": "Nome copiado: {0}",
+ "6": "Nome químico a inserir; omita para abrir a caixa de diálogo",
+ "7": "Copia como texto simples o nome da estrutura selecionada (ou das estruturas da página): o nome comum, quando o FormChem conhece um, ou então o nome sistemático, que só é oferecido quando é lido de volta como a mesma estrutura.",
+ "8": "trivial ou systematic para escolher qual nome copiar; omita para usar o primeiro",
+ "9": "O espectro previsto está atualizado.",
+ "10": "Atualizar Espectro Previsto",
+ "11": "Selecione uma estrutura primeiro",
+ "12": "Selecione um espectro previsto primeiro",
+ "13": "Espectro de RMN de 1H previsto adicionado ({0})",
+ "14": "Espectro de RMN de 13C previsto adicionado ({0})",
+ "15": "Espectro previsto atualizado ({0})",
+ "16": "Id do fragmento da estrutura; por padrão, a estrutura selecionada ou a única da página",
+ "17": "Frequência do espectrômetro em MHz (padrão 400 para 1H e 100 para 13C)",
+ "18": "Adiciona ao lado da estrutura selecionada um espectro de RMN de 1H previsto, em uma única etapa de desfazer: um objeto de espectro calculado com as regras de incrementos próprias do FormChem (sem banco de dados de deslocamentos), cujos multipletos e integrais estão vinculados aos átomos da estrutura e cujo título indica o método, a versão e a frequência. A curva é recalculada a partir da estrutura e nunca é armazenada.",
+ "19": "Adiciona ao lado da estrutura selecionada um espectro de RMN de 13C previsto, em uma única etapa de desfazer: um objeto de espectro calculado com as regras de incrementos próprias do FormChem (sem banco de dados de deslocamentos), cujos picos estão vinculados aos átomos da estrutura e cujo título indica o método, a versão e a frequência. A curva é recalculada a partir da estrutura e nunca é armazenada.",
+ "20": "Não foi possível prever o espectro",
+ "21": "Prever Espectro de RMN de 1H",
+ "22": "Prever Espectro de RMN de 13C",
+ "23": "Recalcula os multipletos, as integrais ou os picos de um espectro previsto depois que sua estrutura mudou, com a versão atual do previsor, em uma única etapa de desfazer; nada muda se ele já estiver atualizado.",
+ "24": "Id do espectro previsto; por padrão, o selecionado ou o aberto no editor de espectros",
+ "25": "Não foi possível atualizar o espectro",
+ "26": "Nenhum pico novo nesse intervalo.",
+ "27": "Arraste por um intervalo no editor de espectros para integrá-lo.",
+ "28": "Vincular Pico a Átomos",
+ "29": "Desvincular Pico",
+ "30": "Eixo Y do Espectro",
+ "31": "Espectro de Arquivo...",
+ "32": "Editar Espectro...",
+ "33": "Detectar Picos",
+ "34": "Integrar",
+ "35": "Transmitância ou Absorbância",
+ "36": "Exportar Espectro...",
+ "37": "Selecione um espectro primeiro",
+ "38": "nenhum espectro com o id {0}",
+ "39": "Picos detectados: {0} (já existentes: {1})",
+ "40": "Picos detectados: {0}",
+ "41": "As integrais são para espectros de RMN",
+ "42": "Selecione primeiro um pico, uma integral ou um multipleto no editor de espectros",
+ "43": "Todos os átomos devem pertencer a uma mesma estrutura",
+ "44": "Somente os espectros de IR, Raman e UV-Vis alternam entre transmitância e absorbância",
+ "45": "Exportado: {0}",
+ "46": "Id do objeto de espectro; por padrão, o espectro selecionado ou o aberto no editor de espectros",
+ "47": "Importa um arquivo de espectro JCAMP-DX para o desenho ativo (um objeto de espectro por bloco de dados, com o arquivo mantido byte a byte), com uma etapa de desfazer por arquivo. Sem path, abre uma caixa de diálogo de arquivo.",
+ "48": "Caminho absoluto de um arquivo .jdx, .dx ou .jcamp",
+ "49": "Não foi possível importar o espectro",
+ "50": "Abre o editor de espectros para o espectro selecionado (o mesmo que clicar duas vezes nele).",
+ "51": "Não foi possível abrir o espectro",
+ "52": "Encontra os picos de um espectro em um intervalo (por padrão, o intervalo exibido) e os adiciona à sua lista de picos, ignorando os que já existem, em uma única etapa de desfazer.",
+ "53": "Início do intervalo na unidade de x (cm-1, nm, m/z, ppm)",
+ "54": "Fim do intervalo na unidade de x",
+ "55": "Limiar de detecção opcional em unidades de y",
+ "56": "Substitui a lista de picos em vez de adicionar a ela",
+ "57": "Não foi possível detectar os picos",
+ "58": "Adiciona uma integral de RMN sobre um intervalo, escalonada como as integrais existentes (ou para value, reescalonando as demais), em uma única etapa de desfazer. Sem from e to, muda o editor de espectros para a ferramenta de integração.",
+ "59": "Início do intervalo em ppm",
+ "60": "Fim do intervalo em ppm",
+ "61": "Valor que esta integral deve indicar, por exemplo um número de prótons",
+ "62": "Não foi possível integrar",
+ "63": "Vincula um pico, uma integral ou um multipleto a átomos de uma estrutura, em uma única etapa de desfazer. Sem atoms, usa os átomos selecionados ou espera que a pessoa clique em átomos no desenho.",
+ "64": "Id do pico, da integral ou do multipleto; por padrão, o selecionado no editor de espectros",
+ "65": "Id da estrutura (fragmento) à qual os átomos pertencem",
+ "66": "Ids dos átomos",
+ "67": "Não foi possível vincular o pico",
+ "68": "Remove o vínculo com átomos de um pico, uma integral ou um multipleto, em uma única etapa de desfazer.",
+ "69": "Não foi possível desvincular o pico",
+ "70": "Mostra um espectro de IR, Raman ou UV-Vis como transmitância ou absorbância (alterna sem mode), em uma única etapa de desfazer.",
+ "71": "Eixo Y a mostrar; omita para alternar",
+ "72": "Não foi possível alterar o eixo y",
+ "73": "Salva um espectro como JCAMP-DX (com sua tabela de picos quando tem picos) ou como CSV de todos os pontos, por meio do motor.",
+ "74": "Formato de arquivo, padrão jdx",
+ "75": "Com jdx: o arquivo importado original, intacto",
+ "76": "Caminho absoluto onde gravar; omita para perguntar",
+ "77": "Não foi possível exportar o espectro",
+ "78": "Inserir Espectro de Arquivo",
+ "79": "O arquivo não contém nenhum espectro que o FormChem possa desenhar",
+ "80": "Inserir Espectro",
+ "81": "Não foi possível posicionar o espectro: o arquivo dele não chegou ao desenho.",
+ "82": "Espectros inseridos: {0}",
+ "83": "Comprimento de onda (µm)",
+ "84": "Número de onda (cm⁻¹)",
+ "85": "Deslocamento Raman (cm⁻¹)",
+ "86": "Comprimento de onda (nm)",
+ "87": "Frequência (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmitância (%)",
+ "90": "Transmitância",
+ "91": "Absorbância",
+ "92": "Abundância relativa (%)",
+ "93": "Intensidade",
+ "94": "RMN de {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Previsto: {0}, {1} MHz ({2})",
+ "100": "Previsto: {0}, {1} MHz",
+ "101": "Previsto: {0} ({1})",
+ "102": "Previsto: {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Espectro indisponível: {0}",
+ "105": "Carregando espectro",
+ "106": "Nome comum",
+ "107": "Sistemático",
+ "108": "Confiança alta",
+ "109": "Confiança média",
+ "110": "Confiança baixa",
+ "111": "Não lido",
+ "112": "Nomes do FormChem",
+ "113": "Não foi possível ler o nome",
+ "114": "Inserir Estrutura a partir do Nome",
+ "115": "Estrutura a partir do Nome",
+ "116": "Um nome, como aspirina ou 2-metilpropan-1-ol",
+ "117": "Nome químico",
+ "118": "Digite um nome para ver sua estrutura.",
+ "119": "Nenhuma estrutura para este nome",
+ "120": "Dicionário",
+ "121": "Analisador sistemático",
+ "122": "Nomeador por regras, com verificação de ida e volta",
+ "123": "Ferramentas de espectro",
+ "124": "Mostrar todo o espectro",
+ "125": "Eixo Y",
+ "126": "Mostrar este intervalo na página",
+ "127": "Clique duas vezes em um espectro no desenho para editá-lo aqui.",
+ "128": "Picos e integrais",
+ "129": "Previsto",
+ "130": "Valor da integral",
+ "131": "Vincular a Átomos",
+ "132": "Desvincular",
+ "133": "1 átomo",
+ "134": "Átomos a vincular",
+ "135": "Clique em mais átomos e depois em Concluído.",
+ "136": "Clique nos átomos do desenho que pertencem a este pico e depois em Concluído.",
+ "137": "Nada a integrar nesse intervalo.",
+ "138": "Remover Pico",
+ "139": "Adicionar Pico",
+ "140": "Vinculado a 1 átomo",
+ "141": "Definir Intervalo do Espectro",
+ "142": "Digite um número positivo.",
+ "143": "Não foi possível definir a integral",
+ "144": "Mover e ampliar: arraste para mover, use a roda para ampliar, Shift e arraste para ampliar um intervalo",
+ "145": "Ampliar um intervalo: arraste pelo gráfico",
+ "146": "Detectar picos: arraste por um intervalo",
+ "147": "Adicionar ou remover um pico: clique perto de um pico",
+ "148": "Integrar: arraste por um intervalo",
+ "149": "Pico",
+ "150": "Integral",
+ "151": "Multipleto",
+ "152": "{0} átomos",
+ "153": "Vinculado a {0}",
+ "154": "Arraste para mover, use a roda para ampliar, Shift e arraste para ampliar um intervalo. Clique em um rótulo para selecioná-lo.",
+ "155": "Arraste pelo gráfico para ampliar esse intervalo.",
+ "156": "Arraste por um intervalo para detectar seus picos.",
+ "157": "Clique perto de um pico para adicioná-lo; clique no rótulo de um pico para removê-lo.",
+ "158": "Arraste por um intervalo para integrá-lo.",
+ "159": "Vinculado a {0} átomos"
+}
diff --git a/frontend/src/i18n/locales/pt-BR/part13.json b/frontend/src/i18n/locales/pt-BR/part13.json
new file mode 100644
index 00000000..7492ae53
--- /dev/null
+++ b/frontend/src/i18n/locales/pt-BR/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "o motor devolveu um arquivo vazio",
+ "1": "o nome tem mais de {0} caracteres",
+ "2": "fragmentos com mais de {0} átomos não são nomeados",
+ "3": "A estrutura contém rótulos, grupos R ou átomos quaisquer, que não têm nome.",
+ "4": "Não foi possível ler a estrutura como uma molécula (verifique as valências).",
+ "5": "Não há estrutura para nomear.",
+ "6": "Nomes de índice invertidos (composto-base primeiro, depois uma vírgula e os substituintes) não são lidos; escreva o nome na ordem normal, como 1,2-diclorobenzeno.",
+ "7": "D- e L- só são lidos para os aminoácidos e açúcares do dicionário do FormChem; informe descritores R ou S para outros nomes.",
+ "8": "O FormChem leu o nome inteiro, mas ele não forma o nome de uma estrutura completa (pode faltar um composto-base como hexano ou benzeno, ou um sufixo).",
+ "9": "O FormChem não conseguiu ler o nome a partir do caractere {0} (\"{1}\").",
+ "10": "O FormChem leu o nome, mas {0}.",
+ "11": "não foi possível completar a estrutura",
+ "12": "O nome pode ser lido de mais de uma maneira; o FormChem desenhou a leitura com menos suposições.",
+ "13": "O nome não traz descritores estereoquímicos, então os estereocentros e as ligações duplas são desenhados sem especificação.",
+ "14": "Nenhum nome sistemático: {0}.",
+ "15": "O nome sistemático construído pelo FormChem não foi lido de volta como a mesma estrutura, por isso não é exibido.",
+ "16": "essa ligação dupla não pode ser E nem Z",
+ "17": "o localizador do descritor {0} não é uma posição do composto-base",
+ "18": "a posição {0} não inicia uma ligação dupla que possa ser E ou Z",
+ "19": "{0} precisa de exatamente uma ligação dupla que possa ser cis ou trans; esta estrutura tem {1}",
+ "20": "{0} não é claro para esta ligação dupla; informe E ou Z",
+ "21": "({0}) precisa de um localizador: a estrutura tem {1} estereocentros",
+ "22": "a posição {0} não é um estereocentro, então ({1}) não se aplica",
+ "23": "({0}) precisa de um localizador: a estrutura tem {1} ligações duplas que podem ser E ou Z",
+ "24": "a posição {0} não pode receber {1}",
+ "25": "essa ligação dupla não pode receber {0}",
+ "26": "{0} não diz qual configuração se quer dizer, então a estrutura é desenhada sem estereoquímica.",
+ "27": "{0} não tem ponto de ligação",
+ "28": "não há espaço para {0} em {1}",
+ "29": "{0} não pode se ligar ali",
+ "30": "cadeias com mais de {0} carbonos ainda não são lidas",
+ "31": "{0} é pequeno demais para ser um anel",
+ "32": "{0}-{1} é um tautômero que o FormChem ainda não desenha a partir de um nome",
+ "33": "o localizador {0} não é uma posição de {1}",
+ "34": "{0} não é uma posição da cadeia",
+ "35": "uma ligação múltipla não pode começar na posição {0} de {1}",
+ "36": "a posição {0} de {1} não pode ter essa ligação múltipla",
+ "37": "não há espaço para uma ligação múltipla na posição {0} de {1}",
+ "38": "não há espaço para as ligações múltiplas de {0}",
+ "39": "As posições das ligações múltiplas de {0} não foram informadas; desenhadas nas menores posições.",
+ "40": "-{0} precisa de uma cadeia aberta; em um anel, o sufixo é carbaldeído, ácido carboxílico, carbonitrila ou carboxamida",
+ "41": "uma cadeia só tem duas extremidades para -{0}",
+ "42": "{0} é curto demais para dois grupos -{1}",
+ "43": "não há espaço para -{0} em {1}",
+ "44": "A posição de -{0} em {1} não foi informada; desenhado na menor posição.",
+ "45": "-{0} deve ficar no fim da cadeia, não em {1}",
+ "46": "não há espaço para -{0} em {1}",
+ "47": "orto, meta e para precisam de um anel de benzeno",
+ "48": "orto, meta ou para com um único grupo precisa de um composto-base como fenol, anilina ou tolueno",
+ "49": "não há espaço para {0} em {1}",
+ "50": "não há espaço para {0} grupos {1} em {2}",
+ "51": "A posição de {0} em {1} não foi informada; desenhado na menor posição livre.",
+ "52": "{0} não pode ter substituintes",
+ "53": "um grupo acila se liga pelo seu carbono carbonílico",
+ "54": "{0} não tem posição livre",
+ "55": "A posição de ligação de {0} não foi informada; posição {1} presumida.",
+ "56": "{0} não tem mais espaço para se ligar",
+ "57": "os localizadores {0} antes de {1} não são usados",
+ "58": "{0} não pode ficar como palavra separada",
+ "59": "\"{0}\" precisa de {1} grupo antes, o nome traz {2}",
+ "60": "\"{0}\" precisa de {1} grupos antes, o nome traz {2}",
+ "61": "o nome traz {0} grupo alquila para {1} posição de éster",
+ "62": "o nome traz {0} grupo alquila para {1} posições de éster",
+ "63": "o nome traz {0} grupos alquila para {1} posição de éster",
+ "64": "o nome traz {0} grupos alquila para {1} posições de éster",
+ "65": "a estrutura que ele descreve não é válida ({0})",
+ "66": "-ona em {0} seria um aldeído; um aldeído é nomeado com -al",
+ "67": "a posição {0} de {1}",
+ "68": "substituintes idênticos demais",
+ "69": "localizadores misturados",
+ "70": "tipos de ligação incomuns ainda não são nomeados",
+ "71": "um sistema de anéis que o FormChem ainda não consegue nomear",
+ "72": "anéis aromáticos com ligações duplas exocíclicas (como as piridonas) ainda não são nomeados",
+ "73": "isótopos e radicais ainda não são nomeados",
+ "74": "halogênios hipervalentes não são nomeados",
+ "75": "grupos de nitrogênio carregados, exceto nitro, ainda não são nomeados",
+ "76": "átomos carregados ainda não são nomeados",
+ "77": "óxidos de enxofre, nitrogênio e fósforo ainda não são nomeados",
+ "78": "este grupo de oxigênio ainda não é nomeado",
+ "79": "sulfóxidos, sulfonas e outros grupos de enxofre ainda não são nomeados",
+ "80": "iminas, azo e grupos de nitrogênio semelhantes ainda não são nomeados",
+ "81": "{0} ainda não é nomeado",
+ "82": "cadeias de substituintes com mais de 20 carbonos não são nomeadas",
+ "83": "grupos acila insaturados ainda não são nomeados",
+ "84": "grupos ilideno substituídos ainda não são nomeados",
+ "85": "grupos ilideno de anel ainda não são nomeados",
+ "86": "anéis ligados duas vezes ainda não são nomeados",
+ "87": "nenhuma numeração encontrada para um substituinte de anel",
+ "88": "ésteres com partes alcoólicas diferentes ainda não são nomeados",
+ "89": "nenhuma cadeia ou anel principal encontrado",
+ "90": "ésteres cíclicos (lactonas) ainda não são nomeados",
+ "91": "substituintes em mais de um nitrogênio de amina ou amida ainda não são nomeados",
+ "92": "estereocentros fora da cadeia ou do anel principal ainda não são nomeados",
+ "93": "a geometria de ligação dupla fora da cadeia principal ainda não é nomeada",
+ "94": "centros pseudoassimétricos ainda não são nomeados",
+ "95": "esta geometria de ligação dupla ainda não é nomeada",
+ "96": "cadeias com mais de 20 carbonos não são nomeadas",
+ "97": "grupos idênticos demais",
+ "98": "a estrutura tem erros de valência",
+ "99": "sais e misturas ainda não são nomeados de forma sistemática",
+ "100": "estruturas com mais de {0} átomos pesados ainda não são nomeadas de forma sistemática",
+ "101": "compostos de {0} ainda não são nomeados de forma sistemática",
+ "102": "átomos de consulta e grupos R não têm nome",
+ "103": "hidretos de um único heteroátomo são nomeados somente a partir do dicionário",
+ "104": "{0} não é um objeto deste desenho.",
+ "105": "{0} não tem átomos.",
+ "106": "O fragmento não tem átomos.",
+ "107": "O desenho não tem página.",
+ "108": "{0} não é um espectro deste desenho.",
+ "109": "A estrutura {0} a que esta previsão pertence não está mais no desenho.",
+ "110": "O desenho {0} foi fechado.",
+ "111": "Deslocamento químico (ppm)",
+ "112": "Tempo (s)",
+ "113": "Refletância",
+ "114": "Abundância relativa",
+ "115": "##{0}= aparece mais de uma vez; o primeiro valor foi mantido.",
+ "116": "##XYDATA={0} não é uma lista de variáveis conhecida; foi lida como (X++(Y..Y)).",
+ "117": "##{0}={1} não é uma lista de variáveis conhecida; foi lida como (XY..XY).",
+ "118": "Os pontos não estavam em ordem de x e foram ordenados.",
+ "119": "Não foi possível ler ##.SHIFT REFERENCE={0}; os deslocamentos não foram referenciados.",
+ "120": "##.SHIFT REFERENCE indica o ponto {0}, fora dos {1} pontos; os deslocamentos não foram referenciados.",
+ "121": "Os deslocamentos foram referenciados de modo que o ponto {0} indica {1} ppm ({2}).",
+ "122": "O arquivo não informa o núcleo observado.",
+ "123": "São dados de RMN no domínio do tempo (um FID); são mostrados como adquiridos, sem transformada de Fourier.",
+ "124": "As frequências em Hz foram divididas pela frequência de observação ({0} MHz) para obter ppm.",
+ "125": "Não há ##.SHIFT REFERENCE; 0 Hz foi tomado como 0 ppm.",
+ "126": "Não há ##.OBSERVE FREQUENCY, então o eixo de deslocamento permanece em Hz.",
+ "127": "A transmitância estava armazenada como fração e é mostrada como porcentagem.",
+ "128": "O bloco {0} contém mais de {1} pontos.",
+ "129": "##DATA TYPE={0} com unidades de x {1} não corresponde a nenhuma técnica conhecida; é desenhado como um espectro simples.",
+ "130": "##BLOCKS={0}, mas o bloco LINK contém {1} blocos; todos os blocos encontrados foram lidos.",
+ "131": "Este não é um arquivo JCAMP-DX: ele não tem registro ##TITLE=.",
+ "132": "O arquivo contém {0} blocos em sequência sem um bloco LINK; cada um foi lido.",
+ "133": "Dois blocos compartilham o mesmo ##BLOCK_ID.",
+ "134": "O arquivo não contém nenhum espectro que o FormChem possa desenhar ({0}).",
+ "135": "O bloco \"{0}\" não foi desenhado: {1}.",
+ "136": "um bloco de estrutura (JCAMP-CS); ele é mantido no arquivo, mas não é desenhado",
+ "137": "ele não contém XYDATA, XYPOINTS, PEAK TABLE nem NTUPLES",
+ "138": "sua tabela de dados não contém pontos",
+ "139": "sua tabela NTUPLES não declara símbolos",
+ "140": "espectros NTUPLES 2D ainda não são compatíveis",
+ "141": "sua tabela NTUPLES não tem páginas legíveis",
+ "142": "O arquivo contém caracteres fora do ASCII; foi lido como UTF-8.",
+ "143": "O arquivo contém bytes que não são ASCII nem UTF-8; foi lido como Latin-1.",
+ "144": "Linhas fora de qualquer registro de dados rotulado foram ignoradas.",
+ "145": "Um ##END= sem um bloco antes dele foi ignorado.",
+ "146": "Registros antes do primeiro ##TITLE= ou depois do último ##END= foram ignorados.",
+ "147": "O arquivo termina sem ##END=; os blocos abertos foram fechados.",
+ "148": "Página NTUPLES {0}",
+ "149": "A página {0} de NTUPLES não tem ##DATA TABLE=; foi ignorada.",
+ "150": "A página {0} de NTUPLES usa símbolos ({1}) não declarados em ##SYMBOL=; foi ignorada.",
+ "151": "{0} tem uma forma de tabela de dados que o FormChem não lê ({1}); foi ignorado.",
+ "152": "A tabela NTUPLES não tem ##END NTUPLES=; foi lida até o fim do bloco.",
+ "153": "A tabela NTUPLES não tem lista ##SYMBOL=.",
+ "154": "Este é um espectro 2D (duas variáveis independentes); espectros 2D não são desenhados nesta versão.",
+ "155": "A tabela NTUPLES tem {0} páginas; somente as primeiras {1} foram lidas.",
+ "156": "A página imaginária não compartilha os valores de x da página real; foi deixada de fora.",
+ "157": "A tabela NTUPLES contém {0} páginas; a página {1} é mostrada e {2} outras páginas foram deixadas de fora.",
+ "158": "##DELTAX={0} difere de (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; o espaçamento calculado é usado.",
+ "159": "{0} não tem FIRSTX, LASTX e NPOINTS completos; o espaçamento vem de ##DELTAX.",
+ "160": "Uma linha de dados começou com um valor DIF; ela continua a partir do último valor da linha anterior.",
+ "161": "Um valor de verificação de Y não coincidiu com o último valor da linha anterior; a linha foi continuada a partir do valor anterior.",
+ "162": "{0} caracteres em {1} não puderam ser lidos e foram ignorados.",
+ "163": "Linhas DIF sem valor de verificação de Y em seguida: {0}.",
+ "164": "{0} não contém pontos de dados.",
+ "165": "{0} contém {1} pontos, mas ##NPOINTS={2}; os valores de x das linhas se ajustam a {3} pontos de FIRSTX a LASTX, então esse espaçamento foi usado.",
+ "166": "{0} contém {1} pontos, mas ##NPOINTS={2}; os pontos lidos foram mantidos.",
+ "167": "O valor de x de uma linha não coincide com sua posição a partir de FIRSTX e do espaçamento; a posição foi usada.",
+ "168": "{0} não tem FIRSTX, LASTX e NPOINTS; o espaçamento foi tomado dos valores de x das linhas.",
+ "169": "{0} não dá meio de posicionar seus pontos no eixo x; eles foram numerados 0, 1, 2 e assim por diante.",
+ "170": "A primeira linha começa em x = {0}, mas ##FIRSTX={1}; FIRSTX foi usado.",
+ "171": "O primeiro valor de Y {0} não coincide com ##FIRSTY={1}.",
+ "172": "{0} termina com um grupo incompleto de {1} valores; foi descartado.",
+ "173": "Não foi possível ler {0}: {1}.",
+ "174": "O espectro pede o bloco {0}, mas o arquivo dele contém 1 bloco.",
+ "175": "O espectro pede o bloco {0}, mas o arquivo dele contém {1} blocos.",
+ "176": "O espectro não tem origem.",
+ "177": "O arquivo {0} do espectro não está no desenho.",
+ "178": "Nenhum previsor para {0} está disponível neste motor.",
+ "179": "A previsão falhou: {0}",
+ "180": "A origem do espectro não é um arquivo nem uma previsão.",
+ "181": "O desenho não tem o espectro {0}.",
+ "182": "Espectros de barras não têm áreas para integrar.",
+ "183": "value deve ser maior que zero.",
+ "184": "from e to devem ser dois valores de x diferentes.",
+ "185": "O espectro não tem a integral {0}.",
+ "186": "Este espectro não tem arquivo original; exporte-o sem original=1.",
+ "187": "O FormChem coloca imagens PNG, JPEG, GIF, WebP e SVG e espectros JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/pt-BR/part14.json b/frontend/src/i18n/locales/pt-BR/part14.json
new file mode 100644
index 00000000..3e2c2d29
--- /dev/null
+++ b/frontend/src/i18n/locales/pt-BR/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Exibição",
+ "1": "Superfície",
+ "2": "Nada para exportar: a vista 3D está vazia.",
+ "3": "Falha na exportação",
+ "4": "Selecione uma estrutura para exibir em 3D.",
+ "5": "Gerar 3D",
+ "6": "Inserir Vista 3D",
+ "7": "Escolha um arquivo PDB, mmCIF, SDF ou MOL.",
+ "8": "Não foi possível colocar a estrutura 3D na página",
+ "9": "Selecione um objeto 3D aberto a partir de um arquivo PDB ou mmCIF.",
+ "10": "Este modelo não tem ligantes.",
+ "11": "Não foi possível extrair o ligante",
+ "12": "Ainda não há coordenadas 3D: Gerar 3D cria um confôrmero a partir do desenho.",
+ "13": "Arquivo de Estrutura 3D...",
+ "14": "Extrair Ligante...",
+ "15": "Exportar Estrutura 3D...",
+ "16": "Varredura Diedra...",
+ "17": "Medir em 3D",
+ "18": "Exportar Vista 3D como PNG...",
+ "19": "Exportar Vista 3D como glTF...",
+ "20": "Extraído {0}: {1} (ordens de ligação inferidas)",
+ "21": "Extraído {0}: {1}",
+ "22": "Abra primeiro a Vista 3D",
+ "23": "Abre o painel Vista 3D na estrutura selecionada (ou no objeto 3D selecionado na página) e acompanha a seleção. Uma estrutura precisa antes de coordenadas 3D: Gerar 3D as cria.",
+ "24": "Gera um confôrmero 3D da estrutura selecionada a partir do desenho 2D (mantendo cunhas, geometria de ligações duplas e cargas), minimiza-o com o campo de força escolhido e o armazena no desenho em uma única etapa de desfazer; a Vista 3D o exibe.",
+ "25": "Minimiza o confôrmero exibido da estrutura selecionada com o campo de força escolhido na Vista 3D (MMFF94 por padrão, UFF quando o MMFF94 não tem parâmetros) e informa a energia antes e depois, em uma única etapa de desfazer.",
+ "26": "Gera um conjunto de confôrmeros da estrutura selecionada (ETKDG, filtrado por RMSD, cada um minimizado) e mantém os que estão dentro de uma janela de energia; com n, window e method, executa sem a caixa de diálogo.",
+ "27": "Confôrmeros a gerar",
+ "28": "Janela de energia em kcal/mol",
+ "29": "Coloca na página, ao lado da estrutura selecionada, uma vista 3D dela (gerando antes as coordenadas 3D se ela não tiver) e abre o painel Vista 3D vinculado a ela; girar ou mudar o estilo do modelo atualiza a imagem na página.",
+ "30": "Abre um arquivo PDB, mmCIF, SDF ou MOL como objeto 3D na página (proteínas como fita e ligantes como esferas e bastões, sem águas e com o ligante em foco) e o exibe na Vista 3D.",
+ "31": "Transforma um ligante do objeto 3D selecionado (aberto a partir de um arquivo PDB ou mmCIF) em uma estrutura 2D ao lado dele, em uma única etapa de desfazer: ordens de ligação a partir de um modelo interno para ligantes comuns ou, caso contrário, inferidas da geometria e informadas; as coordenadas do arquivo passam a ser seu confôrmero. Com ligand usa esse; sem ele, pergunta quando o modelo tem vários.",
+ "32": "Chave do ligante cadeia:het:número, ou um código het",
+ "33": "Selecione um objeto 3D aberto a partir de um arquivo PDB ou mmCIF",
+ "34": "Salva as coordenadas 3D da estrutura selecionada com todos os hidrogênios: molfile MDL (o confôrmero exibido), arquivo SD (todos os confôrmeros, com campos de dados de energia e método), PDB ou XYZ (o confôrmero exibido ou todos como modelos ou quadros); um objeto 3D aberto a partir de um arquivo PDB ou mmCIF salva o arquivo original. Sem format, pergunta.",
+ "35": "Formato de arquivo",
+ "36": "Todos os confôrmeros em vez do exibido (padrão true para sdf)",
+ "37": "Varre o diedro dos quatro átomos escolhidos na Vista 3D (ou sua última medição de diedro) com minimização relaxada e representa o ângulo em função da energia.",
+ "38": "Mede uma distância (dois átomos), um ângulo (três) ou um diedro (quatro) na Vista 3D e a lista; com atoms (ids de átomos do fragmento como a1, hidrogênios como a1:h0, ou números de série do PDB) mede esses; caso contrário, passa para a seleção.",
+ "39": "De dois a quatro ids de átomos",
+ "40": "Salva a Vista 3D como imagem PNG no tamanho exibido na tela; transparent omite o fundo.",
+ "41": "Salva a Vista 3D como arquivo glTF 2.0 binário (.glb): átomos como esferas e ligações como cilindros com as cores dos elementos, 1 ångström = 1 cm, para visualizadores 3D, apresentações e impressão.",
+ "42": "Sem Superfície",
+ "43": "Remove a superfície molecular da Vista 3D.",
+ "44": "Superfície de van der Waals",
+ "45": "Mostra a superfície de van der Waals na Vista 3D.",
+ "46": "Superfície Acessível ao Solvente",
+ "47": "Mostra a superfície acessível ao solvente (sonda de 1,4 ångström) na Vista 3D.",
+ "48": "Superfície Excluída do Solvente",
+ "49": "Mostra a superfície excluída do solvente na Vista 3D.",
+ "50": "Superfície com Mapa de ESP",
+ "51": "Colore a superfície por um potencial eletrostático aproximado, calculado com as cargas parciais empíricas do motor (vermelho negativo, azul positivo), com uma legenda que informa o método.",
+ "52": "Mostra a Vista 3D no estilo fio; em um objeto 3D da página, a escolha é salva com ele.",
+ "53": "Mostra a Vista 3D no estilo bastão; em um objeto 3D da página, a escolha é salva com ele.",
+ "54": "Esferas e Bastões",
+ "55": "Mostra a Vista 3D no estilo esferas e bastões; em um objeto 3D da página, a escolha é salva com ele.",
+ "56": "Preenchimento Espacial",
+ "57": "Mostra a Vista 3D no estilo de preenchimento espacial; em um objeto 3D da página, a escolha é salva com ele.",
+ "58": "Fita",
+ "59": "Mostra a Vista 3D no estilo de fita (proteínas e ácidos nucleicos; os ligantes continuam como esferas e bastões); em um objeto 3D da página, a escolha é salva com ele.",
+ "60": "Ângulo diedro (graus)",
+ "61": "Energia relativa (kcal/mol)",
+ "62": "Mínimo {0}°",
+ "63": "Exportar Estrutura 3D",
+ "64": "Todos os confôrmeros (registros SDF, modelos PDB, quadros XYZ)",
+ "65": "1 confôrmero armazenado; todos os hidrogênios são gravados com sua posição 3D.",
+ "66": "Extrair Ligante",
+ "67": "Ligante",
+ "68": "O ligante passa a ser uma estrutura 2D ao lado do modelo, com as coordenadas do arquivo mantidas como seu confôrmero.",
+ "69": "Extrair",
+ "70": "Arquivo SD (.sdf)",
+ "71": "Molfile MDL (.mol)",
+ "72": "{0} confôrmeros armazenados; todos os hidrogênios são gravados com sua posição 3D.",
+ "73": "Confôrmeros",
+ "74": "Janela de energia (kcal/mol)",
+ "75": "Embedding ETKDG com semente fixa, quase duplicatas removidas com 0,5 Å de RMSD de átomos pesados, cada um minimizado; o de menor energia passa a ser o confôrmero exibido.",
+ "76": "Gerar",
+ "77": "Perfil de energia da varredura diedra",
+ "78": "Varredura Diedra",
+ "79": "De (graus)",
+ "80": "Até (graus)",
+ "81": "Passo (graus)",
+ "82": "Manter cada ponto como confôrmero (uma etapa de desfazer)",
+ "83": "Executar Varredura",
+ "84": "Uma varredura relaxada: em cada ângulo o diedro é mantido fixo e todo o resto é minimizado.",
+ "85": "O ângulo final deve ser maior que o inicial.",
+ "86": "Varrendo...",
+ "87": "Falha na varredura",
+ "88": "barreira {0} kcal/mol",
+ "89": "Estilo de exibição",
+ "90": "Colorir a superfície pelo potencial eletrostático a partir de cargas parciais empíricas",
+ "91": "ESP",
+ "92": "Minimizar",
+ "93": "Varredura...",
+ "94": "Focar o ligante",
+ "95": "Redefinir vista",
+ "96": "Girar",
+ "97": "Exportar a vista 3D",
+ "98": "Medir",
+ "99": "Medições",
+ "100": "Imagem PNG",
+ "101": "Imagem PNG, Transparente",
+ "102": "glTF Binário (.glb)",
+ "103": "O 3D precisa de WebGL, que esta janela não oferece.",
+ "104": "Carregando o visualizador 3D...",
+ "105": "Não foi possível carregar o visualizador 3D",
+ "106": "Abra um desenho e selecione uma estrutura para vê-la em 3D.",
+ "107": "Selecione uma estrutura na página para vê-la em 3D.",
+ "108": "Não foi possível ler a estrutura 3D",
+ "109": "Este confôrmero não pode ser gravado como molfile",
+ "110": "O giro está desativado: o sistema pede movimento reduzido",
+ "111": "Um modelo PDB ou CIF não tem confôrmeros.",
+ "112": "Energias relativas à mais baixa; clique em uma para exibi-la.",
+ "113": "Gerar 3D ou Confôrmeros... preenchem esta lista.",
+ "114": "Cargas parciais indisponíveis",
+ "115": "o motor ainda não tem rotas 3D",
+ "116": "não convergiu",
+ "117": "Escolha quatro átomos ligados em sequência (um diedro) e depois clique em Varredura.",
+ "118": "Marque Manter cada ponto como confôrmero para ver as geometrias.",
+ "119": "Mostrar confôrmero",
+ "120": "Atualizar vista 3D",
+ "121": "Não foi possível atualizar a imagem instantânea da página",
+ "122": "Sem superfície",
+ "123": "Van der Waals",
+ "124": "Acessível ao solvente",
+ "125": "Excluída do solvente",
+ "126": "Distância",
+ "127": "Ângulo",
+ "128": "Diedro",
+ "129": "{0} kcal/mol, {1}, não convergiu",
+ "130": "Escolhidos {0} / {1}: {2}",
+ "131": "Clique em {0} átomos para medir",
+ "132": "ESP ({0}): {1}, vermelho {2} e a azul +{3} e",
+ "133": "Distância {0}: {1}",
+ "134": "Ângulo {0}: {1}",
+ "135": "Diedro {0}: {1}",
+ "136": "Gerado: {0}",
+ "137": "Minimizado: {0}",
+ "138": "Confôrmeros mantidos: {0} de {1}",
+ "139": "Confôrmeros mantidos: {0}",
+ "140": "Diedro {0}",
+ "141": "Falha na codificação do PNG"
+}
diff --git a/frontend/src/i18n/locales/pt-BR/part15.json b/frontend/src/i18n/locales/pt-BR/part15.json
new file mode 100644
index 00000000..fecd9e7a
--- /dev/null
+++ b/frontend/src/i18n/locales/pt-BR/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "aproximado, a partir de cargas empíricas",
+ "1": "{0} estereocentro(s) ou ligação(ões) dupla(s) estavam sem especificação; uma configuração foi escolhida.",
+ "2": "{0} rótulo(s) estereoquímico(s) do desenho não são reproduzidos em 3D.",
+ "3": "Foi gerado o membro desenhado do(s) grupo(s) de estereoquímica aprimorada {0}; o modelo 3D é um estereoisômero da mistura (relativa ou racêmica) descrita pelo desenho.",
+ "4": "Embedding feito {0} vezes (sementes {1}) para manter a estereoquímica desenhada.",
+ "5": "{0} par(es) de átomos pesados estão mais próximos que {1} do seu contato de van der Waals.",
+ "6": "Campo de força universal usado: {0}.",
+ "7": "sem parâmetros de {0} para {1}",
+ "8": "{0} não conseguiu atribuir tipo a todos os átomos",
+ "9": "{0} confôrmero(s) alteraram a estereoquímica desenhada durante a minimização e foram deixados de fora.",
+ "10": "Mais de 300 átomos pesados: a qualidade da amostragem de confôrmeros diminui nesse tamanho.",
+ "11": "A ligação central está em um anel; o anel é tensionado para seguir o ângulo.",
+ "12": "A estrutura não tinha coordenadas 3D; a varredura começou a partir de um novo embedding.",
+ "13": "A estrutura mudou enquanto o 3D era calculado; execute o comando novamente.",
+ "14": "O desenho não tem o objeto {0}.",
+ "15": "{0} ainda não tem coordenadas 3D; gere o 3D primeiro.",
+ "16": "{0} não tem o confôrmero {1}.",
+ "17": "A estrutura não tem átomos.",
+ "18": "O 3D precisa de átomos reais: {0} átomo(s) são rótulos, grupos R ou pontos de ligação ({1}).",
+ "19": "Não foi possível adicionar os hidrogênios: {0}",
+ "20": "A estrutura tem {0} átomos com hidrogênios; o 3D suporta até {1}.",
+ "21": "As coordenadas 3D não se ajustam a esta estrutura (nada para {0}); gere o 3D novamente.",
+ "22": "As coordenadas 3D não se ajustam a esta estrutura (o número de hidrogênios mudou); gere o 3D novamente.",
+ "23": "Não foi possível fazer o embedding da estrutura em 3D: {0}",
+ "24": "Não foi possível fazer o embedding da estrutura em 3D; verifique suas valências e a estereoquímica.",
+ "25": "Não foi possível fazer o embedding dos confôrmeros: {0}",
+ "26": "Nenhum confôrmero pôde passar pelo embedding; verifique as valências e a estereoquímica da estrutura.",
+ "27": "Todos os confôrmeros gerados perderam a estereoquímica desenhada após a minimização.",
+ "28": "Nenhum campo de força tem parâmetros para esta estrutura ({0}).",
+ "29": "Não foi possível configurar o campo de força universal: {0}",
+ "30": "Não foi possível configurar o campo de força universal.",
+ "31": "Átomo(s) desconhecido(s) {0}; use ids de átomos do fragmento ou um hidrogênio como a1:h0.",
+ "32": "Os quatro átomos devem ser diferentes.",
+ "33": "Os quatro átomos devem formar uma cadeia de ligações (a1-a2-a3-a4).",
+ "34": "Não foi possível gravar o arquivo 3D: {0}",
+ "35": "O arquivo não é um arquivo PDB, mmCIF, SDF ou MOL que o FormChem consiga ler.",
+ "36": "O arquivo tem mais de {0} átomos.",
+ "37": "O arquivo PDB não tem registros ATOM nem HETATM.",
+ "38": "A tabela atom_site do mmCIF não tem as colunas Cartn_x, Cartn_y e Cartn_z.",
+ "39": "O CIF tem coordenadas fracionárias, mas não uma cela unitária completa.",
+ "40": "O CIF não tem tabela atom_site.",
+ "41": "O CIF não tem átomos legíveis.",
+ "42": "O arquivo não tem registros.",
+ "43": "O arquivo tem {0} registros; a importação 3D lê até {1}.",
+ "44": "Nenhum registro do arquivo pôde ser lido.",
+ "45": "{0} não é um arquivo PDB nem mmCIF.",
+ "46": "{0} não pôde ser transformado em um desenho do FormChem: {1}.",
+ "47": "Modelo PDB colocado como objeto 3D: {0}.",
+ "48": "Modelo mmCIF colocado como objeto 3D: {0}.",
+ "49": "{0} linha(s) ATOM ou HETATM tinham coordenadas ilegíveis e foram ignoradas.",
+ "50": "{0} linha(s) de atom_site tinham coordenadas ilegíveis e foram ignoradas.",
+ "51": "CIF de molécula pequena: a unidade assimétrica é lida a partir das coordenadas fracionárias; os equivalentes por simetria não são gerados.",
+ "52": "{0} tem problemas de valência; foi lido sem sanitização.",
+ "53": "{0} tem apenas coordenadas 2D; nenhum confôrmero foi mantido.",
+ "54": "{0} hidrogênio(s) não estavam no arquivo e foram posicionados a partir da geometria.",
+ "55": "{0} não pôde ser lido: {1}",
+ "56": "{0} não pôde ser lido.",
+ "57": "Registro {0}",
+ "58": "A estrutura",
+ "59": "As coordenadas 3D do arquivo foram mantidas como o confôrmero de 1 estrutura; não é preciso Gerar 3D para vê-las.",
+ "60": "As coordenadas 3D do arquivo foram mantidas como o confôrmero de {0} estruturas; não é preciso Gerar 3D para vê-las.",
+ "61": "{0} é um íon simples; não há estrutura a extrair.",
+ "62": "Não foi possível ler os átomos de {0}.",
+ "63": "Nenhum ligante {0} na estrutura; ligantes: {1}.",
+ "64": "O desenho não tem o modelo 3D {0}.",
+ "65": "O FormChem coloca imagens PNG, JPEG, GIF, WebP e SVG, espectros JCAMP-DX e arquivos de estrutura PDB, mmCIF, SDF e MOL."
+}
diff --git a/frontend/src/i18n/locales/ru/part12.json b/frontend/src/i18n/locales/ru/part12.json
new file mode 100644
index 00000000..dbdfbb76
--- /dev/null
+++ b/frontend/src/i18n/locales/ru/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Спектр",
+ "1": "Нарисуйте или выделите структуру, чтобы получить её название.",
+ "2": "Не удалось вычислить названия",
+ "3": "У FormChem нет названия для этой структуры.",
+ "4": "Копировать название",
+ "5": "Название скопировано: {0}",
+ "6": "Химическое название для вставки; пропустите, чтобы открыть диалог",
+ "7": "Копирует название выделенной структуры (или структур на странице) как обычный текст: тривиальное название, если FormChem его знает, иначе систематическое, которое предлагается, только если читается обратно в ту же структуру.",
+ "8": "trivial или systematic: какое название копировать; пропустите, чтобы взять первое",
+ "9": "Предсказанный спектр актуален.",
+ "10": "Обновить предсказанный спектр",
+ "11": "Сначала выделите одну структуру",
+ "12": "Сначала выделите предсказанный спектр",
+ "13": "Добавлен предсказанный спектр ЯМР 1H ({0})",
+ "14": "Добавлен предсказанный спектр ЯМР 13C ({0})",
+ "15": "Предсказанный спектр обновлён ({0})",
+ "16": "Идентификатор фрагмента структуры; по умолчанию выделенная структура или единственная на странице",
+ "17": "Частота спектрометра в MHz (по умолчанию 400 для 1H, 100 для 13C)",
+ "18": "Добавляет рядом с выделенной структурой предсказанный спектр ЯМР 1H одним шагом отмены: объект-спектр, рассчитанный по собственным правилам инкрементов FormChem (без базы данных химических сдвигов), мультиплеты и интегралы которого связаны с атомами структуры; в заголовке указаны метод, версия и частота. Кривая всякий раз пересчитывается по структуре и не сохраняется.",
+ "19": "Добавляет рядом с выделенной структурой предсказанный спектр ЯМР 13C одним шагом отмены: объект-спектр, рассчитанный по собственным правилам инкрементов FormChem (без базы данных химических сдвигов), пики которого связаны с атомами структуры; в заголовке указаны метод, версия и частота. Кривая всякий раз пересчитывается по структуре и не сохраняется.",
+ "20": "Не удалось предсказать спектр",
+ "21": "Предсказать спектр ЯМР 1H",
+ "22": "Предсказать спектр ЯМР 13C",
+ "23": "Пересчитывает мультиплеты, интегралы или пики предсказанного спектра после изменения его структуры, с текущей версией предсказателя, одним шагом отмены; если спектр актуален, ничего не меняется.",
+ "24": "Идентификатор предсказанного спектра; по умолчанию выделенный или открытый в редакторе спектров",
+ "25": "Не удалось обновить спектр",
+ "26": "В этом диапазоне новых пиков нет.",
+ "27": "Протяните указатель по диапазону в редакторе спектров, чтобы проинтегрировать его.",
+ "28": "Связать пик с атомами",
+ "29": "Разорвать связь пика",
+ "30": "Ось Y спектра",
+ "31": "Спектр из файла...",
+ "32": "Редактировать спектр...",
+ "33": "Отметить пики",
+ "34": "Интегрировать",
+ "35": "Пропускание или оптическая плотность",
+ "36": "Экспортировать спектр...",
+ "37": "Сначала выделите спектр",
+ "38": "нет спектра с идентификатором {0}",
+ "39": "Отмечено пиков: {0} (уже были: {1})",
+ "40": "Отмечено пиков: {0}",
+ "41": "Интегралы есть только у спектров ЯМР",
+ "42": "Сначала выберите пик, интеграл или мультиплет в редакторе спектров",
+ "43": "Все атомы должны принадлежать одной структуре",
+ "44": "Между пропусканием и оптической плотностью переключаются только спектры ИК, КР и УФ-видимые",
+ "45": "Экспортировано: {0}",
+ "46": "Идентификатор объекта-спектра; по умолчанию выделенный спектр или открытый в редакторе спектров",
+ "47": "Импортирует файл спектра JCAMP-DX в текущий рисунок (один объект-спектр на блок данных, файл сохраняется байт в байт) одним шагом отмены на файл. Без path открывает диалог выбора файла.",
+ "48": "Абсолютный путь к файлу .jdx, .dx или .jcamp",
+ "49": "Не удалось импортировать спектр",
+ "50": "Открывает редактор спектров для выделенного спектра (то же, что двойной щелчок по нему).",
+ "51": "Не удалось открыть спектр",
+ "52": "Находит пики спектра в диапазоне (по умолчанию показанном) и добавляет их в список пиков, пропуская уже имеющиеся, одним шагом отмены.",
+ "53": "Начало диапазона в единицах оси x (cm-1, nm, m/z, ppm)",
+ "54": "Конец диапазона в единицах оси x",
+ "55": "Необязательный порог обнаружения в единицах оси y",
+ "56": "Заменить список пиков вместо добавления к нему",
+ "57": "Не удалось отметить пики",
+ "58": "Добавляет интеграл ЯМР по диапазону, масштабированный так же, как существующие интегралы (или к значению value с перемасштабированием остальных), одним шагом отмены. Без from и to переключает редактор спектров на инструмент интегрирования.",
+ "59": "Начало диапазона в ppm",
+ "60": "Конец диапазона в ppm",
+ "61": "Значение, которое должен показывать этот интеграл, например число протонов",
+ "62": "Не удалось проинтегрировать",
+ "63": "Связывает пик, интеграл или мультиплет с атомами структуры одним шагом отмены. Без atoms использует выделенные атомы или ждёт, пока пользователь щёлкнет по атомам на рисунке.",
+ "64": "Идентификатор пика, интеграла или мультиплета; по умолчанию выбранный в редакторе спектров",
+ "65": "Идентификатор структуры (фрагмента), которой принадлежат атомы",
+ "66": "Идентификаторы атомов",
+ "67": "Не удалось связать пик",
+ "68": "Удаляет связь пика, интеграла или мультиплета с атомами одним шагом отмены.",
+ "69": "Не удалось разорвать связь пика",
+ "70": "Показывает спектр ИК, КР или УФ-видимый как пропускание или оптическую плотность (без mode переключает) одним шагом отмены.",
+ "71": "Показываемая ось Y; пропустите, чтобы переключить",
+ "72": "Не удалось изменить ось Y",
+ "73": "Сохраняет спектр как JCAMP-DX (с таблицей пиков, если пики есть) или как CSV со всеми точками, через движок.",
+ "74": "Формат файла, по умолчанию jdx",
+ "75": "При jdx: исходный импортированный файл без изменений",
+ "76": "Абсолютный путь для записи; пропустите, чтобы спросить",
+ "77": "Не удалось экспортировать спектр",
+ "78": "Вставить спектр из файла",
+ "79": "В файле нет спектра, который FormChem мог бы нарисовать",
+ "80": "Вставить спектр",
+ "81": "Не удалось поместить спектр: его файл не попал в рисунок.",
+ "82": "Вставлено спектров: {0}",
+ "83": "Длина волны (µm)",
+ "84": "Волновое число (cm⁻¹)",
+ "85": "Рамановский сдвиг (cm⁻¹)",
+ "86": "Длина волны (nm)",
+ "87": "Частота (Hz)",
+ "88": "δ (ppm)",
+ "89": "Пропускание (%)",
+ "90": "Пропускание",
+ "91": "Оптическая плотность",
+ "92": "Относительное содержание (%)",
+ "93": "Интенсивность",
+ "94": "ЯМР {0}",
+ "95": "МС",
+ "96": "УФ-видимый",
+ "97": "КР",
+ "98": "ИК",
+ "99": "Предсказанный {0}, {1} MHz ({2})",
+ "100": "Предсказанный {0}, {1} MHz",
+ "101": "Предсказанный {0} ({1})",
+ "102": "Предсказанный {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Спектр недоступен: {0}",
+ "105": "Загрузка спектра",
+ "106": "Тривиальное название",
+ "107": "Систематическое",
+ "108": "Высокая достоверность",
+ "109": "Средняя достоверность",
+ "110": "Низкая достоверность",
+ "111": "Не прочитано",
+ "112": "Названия FormChem",
+ "113": "Не удалось прочитать название",
+ "114": "Вставить структуру по названию",
+ "115": "Структура по названию",
+ "116": "Название, например аспирин или 2-метилпропан-1-ол",
+ "117": "Химическое название",
+ "118": "Введите название, чтобы увидеть его структуру.",
+ "119": "Для этого названия нет структуры",
+ "120": "Словарь",
+ "121": "Систематический разбор",
+ "122": "Правила наименования, проверка обратным разбором",
+ "123": "Инструменты спектра",
+ "124": "Показать весь спектр",
+ "125": "Ось Y",
+ "126": "Показать этот диапазон на странице",
+ "127": "Дважды щёлкните спектр на рисунке, чтобы редактировать его здесь.",
+ "128": "Пики и интегралы",
+ "129": "Предсказанный",
+ "130": "Значение интеграла",
+ "131": "Связать с атомами",
+ "132": "Разорвать связь",
+ "133": "1 атом",
+ "134": "Атомы для связи",
+ "135": "Щёлкните по другим атомам, затем нажмите «Готово».",
+ "136": "Щёлкните на рисунке по атомам, относящимся к этому пику, затем нажмите «Готово».",
+ "137": "В этом диапазоне нечего интегрировать.",
+ "138": "Удалить пик",
+ "139": "Добавить пик",
+ "140": "Связано с 1 атомом",
+ "141": "Задать диапазон спектра",
+ "142": "Введите положительное число.",
+ "143": "Не удалось задать интеграл",
+ "144": "Сдвиг и масштаб: перетаскивайте для сдвига, колесом масштабируйте, Shift-перетаскивание масштабирует до диапазона",
+ "145": "Масштаб по диапазону: протяните указатель по графику",
+ "146": "Отметка пиков: протяните указатель по диапазону",
+ "147": "Добавить или удалить пик: щёлкните рядом с пиком",
+ "148": "Интегрирование: протяните указатель по диапазону",
+ "149": "Пик",
+ "150": "Интеграл",
+ "151": "Мультиплет",
+ "152": "Атомов: {0}",
+ "153": "Связано с {0}",
+ "154": "Перетаскивайте для сдвига, колесом масштабируйте, Shift-перетаскивание масштабирует до диапазона. Щёлкните подпись, чтобы выделить её.",
+ "155": "Протяните указатель по графику, чтобы масштабировать до этого диапазона.",
+ "156": "Протяните указатель по диапазону, чтобы отметить его пики.",
+ "157": "Щёлкните рядом с пиком, чтобы добавить его; щёлкните подпись пика, чтобы удалить.",
+ "158": "Протяните указатель по диапазону, чтобы проинтегрировать его.",
+ "159": "Связано с атомами: {0}"
+}
diff --git a/frontend/src/i18n/locales/ru/part13.json b/frontend/src/i18n/locales/ru/part13.json
new file mode 100644
index 00000000..1924f3aa
--- /dev/null
+++ b/frontend/src/i18n/locales/ru/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "движок вернул пустой файл",
+ "1": "название длиннее {0} символов",
+ "2": "фрагменты крупнее {0} атомов не получают названий",
+ "3": "В структуре есть подписи, R-группы или любые атомы, у которых нет названия.",
+ "4": "Структуру не удалось прочитать как молекулу (проверьте валентности).",
+ "5": "Нет структуры, которую можно назвать.",
+ "6": "Названия с обращённым индексом (сначала основа, затем запятая и заместители) не читаются; запишите название в обычном порядке, например 1,2-dichlorobenzene.",
+ "7": "D- и L- читаются только для аминокислот и сахаров из словаря FormChem; для других названий укажите дескрипторы R или S.",
+ "8": "FormChem прочитал название целиком, но оно не образует полного названия структуры (возможно, нет основы, такой как hexane или benzene, или суффикса).",
+ "9": "FormChem не смог прочитать название начиная с символа {0} (\"{1}\").",
+ "10": "FormChem прочитал название, но {0}.",
+ "11": "структуру не удалось достроить",
+ "12": "Название можно прочитать несколькими способами; FormChem нарисовал вариант с наименьшим числом допущений.",
+ "13": "В названии нет стереодескрипторов, поэтому стереоцентры и двойные связи нарисованы без уточнения.",
+ "14": "Нет систематического названия: {0}.",
+ "15": "Построенное FormChem систематическое название при обратном чтении не дало ту же структуру, поэтому оно не показано.",
+ "16": "эта двойная связь не может быть E или Z",
+ "17": "локант дескриптора {0} не является положением основы",
+ "18": "положение {0} не начинает двойную связь, которая может быть E или Z",
+ "19": "для {0} нужна ровно одна двойная связь, которая может быть цис или транс; в этой структуре их {1}",
+ "20": "{0} неоднозначно для этой двойной связи; укажите вместо него E или Z",
+ "21": "для ({0}) нужен локант: в структуре стереоцентров: {1}",
+ "22": "положение {0} не является стереоцентром, поэтому ({1}) неприменимо",
+ "23": "для ({0}) нужен локант: в структуре двойных связей, которые могут быть E или Z: {1}",
+ "24": "положению {0} нельзя придать {1}",
+ "25": "этой двойной связи нельзя придать {0}",
+ "26": "{0} не указывает, какая конфигурация имеется в виду, поэтому структура нарисована без стереохимии.",
+ "27": "у {0} нет точки присоединения",
+ "28": "нет места для {0} в {1}",
+ "29": "{0} не может образовать связь там",
+ "30": "цепи длиннее {0} атомов углерода пока не читаются",
+ "31": "{0} слишком мал для кольца",
+ "32": "{0}-{1} это таутомер, который FormChem пока не рисует по названию",
+ "33": "локант {0} не является положением {1}",
+ "34": "{0} не является положением в цепи",
+ "35": "кратная связь не может начинаться в положении {0} из {1}",
+ "36": "в положении {0} из {1} не может быть такой кратной связи",
+ "37": "нет места для кратной связи в положении {0} из {1}",
+ "38": "нет места для кратных связей {0}",
+ "39": "Положения кратных связей {0} не указаны; нарисованы в наименьших положениях.",
+ "40": "для -{0} нужна открытая цепь; у кольца суффикс carbaldehyde, carboxylic acid, carbonitrile или carboxamide",
+ "41": "у цепи только два конца для -{0}",
+ "42": "{0} слишком короток для двух групп -{1}",
+ "43": "нет места для -{0} в {1}",
+ "44": "Положение -{0} в {1} не указано; нарисовано в наименьшем положении.",
+ "45": "-{0} должен быть в конце цепи, а не в {1}",
+ "46": "нет места для -{0} в {1}",
+ "47": "орто, мета и пара требуют бензольного кольца",
+ "48": "орто, мета или пара с одной группой требуют основы, такой как phenol, aniline или toluene",
+ "49": "нет места для {0} в {1}",
+ "50": "нет места для {0} групп {1} в {2}",
+ "51": "Положение {0} в {1} не указано; нарисовано в наименьшем свободном положении.",
+ "52": "{0} не может нести заместители",
+ "53": "ацильная группа присоединяется по карбонильному углероду",
+ "54": "у {0} нет свободного положения",
+ "55": "Положение присоединения {0} не указано; принято положение {1}.",
+ "56": "у {0} не осталось места для присоединения",
+ "57": "локанты {0} перед {1} не используются",
+ "58": "{0} не может стоять отдельным словом",
+ "59": "\"{0}\" требует перед собой групп: {1}, а в названии их {2}",
+ "60": "\"{0}\" требует перед собой групп: {1}, а в названии их {2}",
+ "61": "число алкильных групп в названии ({0}) не соответствует числу положений сложного эфира ({1})",
+ "62": "число алкильных групп в названии ({0}) не соответствует числу положений сложного эфира ({1})",
+ "63": "число алкильных групп в названии ({0}) не соответствует числу положений сложного эфира ({1})",
+ "64": "число алкильных групп в названии ({0}) не соответствует числу положений сложного эфира ({1})",
+ "65": "описываемая структура недопустима ({0})",
+ "66": "-one в {0} был бы альдегидом; альдегид называется с -al",
+ "67": "положение {0} из {1}",
+ "68": "слишком много одинаковых заместителей",
+ "69": "смешанные локанты",
+ "70": "необычные типы связей пока не называются",
+ "71": "кольцевая система, которую FormChem пока не умеет называть",
+ "72": "ароматические кольца с экзоциклическими двойными связями (например, пиридоны) пока не называются",
+ "73": "изотопы и радикалы пока не называются",
+ "74": "гипервалентные галогены не называются",
+ "75": "заряженные азотные группы, кроме нитро, пока не называются",
+ "76": "заряженные атомы пока не называются",
+ "77": "оксиды серы, азота и фосфора пока не называются",
+ "78": "эта кислородная группа пока не называется",
+ "79": "сульфоксиды, сульфоны и другие серные группы пока не называются",
+ "80": "имины, азо- и подобные азотные группы пока не называются",
+ "81": "{0} пока не называется",
+ "82": "заместители с цепями длиннее 20 атомов углерода не называются",
+ "83": "ненасыщенные ацильные группы пока не называются",
+ "84": "замещённые илиденовые группы пока не называются",
+ "85": "кольцевые илиденовые группы пока не называются",
+ "86": "дважды присоединённые кольца пока не называются",
+ "87": "для кольцевого заместителя не найдена нумерация",
+ "88": "сложные эфиры с разными спиртовыми частями пока не называются",
+ "89": "не найдена основная цепь или кольцо",
+ "90": "циклические сложные эфиры (лактоны) пока не называются",
+ "91": "заместители у более чем одного атома азота амина или амида пока не называются",
+ "92": "стереоцентры вне основной цепи или кольца пока не называются",
+ "93": "геометрия двойной связи вне основной цепи пока не называется",
+ "94": "псевдоасимметрические центры пока не называются",
+ "95": "эта геометрия двойной связи пока не называется",
+ "96": "цепи длиннее 20 атомов углерода не называются",
+ "97": "слишком много одинаковых групп",
+ "98": "в структуре ошибки валентности",
+ "99": "соли и смеси пока не получают систематических названий",
+ "100": "структуры с числом тяжёлых атомов больше {0} пока не получают систематических названий",
+ "101": "соединения {0} пока не получают систематических названий",
+ "102": "атомы запроса и R-группы не имеют названия",
+ "103": "гидриды отдельных гетероатомов называются только по словарю",
+ "104": "{0} не является объектом этого рисунка.",
+ "105": "У {0} нет атомов.",
+ "106": "У фрагмента нет атомов.",
+ "107": "У рисунка нет страницы.",
+ "108": "{0} не является спектром этого рисунка.",
+ "109": "Структуры {0}, к которой относится это предсказание, больше нет на рисунке.",
+ "110": "Рисунок {0} был закрыт.",
+ "111": "Химический сдвиг (ppm)",
+ "112": "Время (s)",
+ "113": "Отражение",
+ "114": "Относительное содержание",
+ "115": "##{0}= встречается более одного раза; сохранено первое значение.",
+ "116": "##XYDATA={0} не является известным списком переменных; прочитано как (X++(Y..Y)).",
+ "117": "##{0}={1} не является известным списком переменных; прочитано как (XY..XY).",
+ "118": "Точки шли не в порядке x и были отсортированы.",
+ "119": "##.SHIFT REFERENCE={0} не удалось прочитать; сдвиги не привязаны к эталону.",
+ "120": "##.SHIFT REFERENCE указывает точку {0}, вне {1} точек; сдвиги не привязаны к эталону.",
+ "121": "Сдвиги привязаны к эталону так, что точка {0} равна {1} ppm ({2}).",
+ "122": "В файле не указано наблюдаемое ядро.",
+ "123": "Это данные ЯМР во временной области (FID); они показаны как получены, без преобразования Фурье.",
+ "124": "Частоты в Hz разделены на частоту наблюдения ({0} MHz), чтобы получить ppm.",
+ "125": "##.SHIFT REFERENCE отсутствует; 0 Hz принят за 0 ppm.",
+ "126": "##.OBSERVE FREQUENCY отсутствует, поэтому ось сдвигов остаётся в Hz.",
+ "127": "Пропускание было сохранено как доля и показано в процентах.",
+ "128": "Блок {0} содержит более {1} точек.",
+ "129": "##DATA TYPE={0} с единицами x {1} не соответствует известному методу; рисуется как простой спектр.",
+ "130": "##BLOCKS={0}, но блок LINK содержит блоков: {1}; прочитаны все найденные блоки.",
+ "131": "Это не файл JCAMP-DX: в нём нет записи ##TITLE=.",
+ "132": "В файле {0} блоков подряд без блока LINK; каждый прочитан.",
+ "133": "Два блока имеют один ##BLOCK_ID.",
+ "134": "В файле нет спектра, который FormChem мог бы нарисовать ({0}).",
+ "135": "Блок \"{0}\" не нарисован: {1}.",
+ "136": "блок структуры (JCAMP-CS); он сохраняется в файле, но не рисуется",
+ "137": "в нём нет XYDATA, XYPOINTS, PEAK TABLE или NTUPLES",
+ "138": "в его таблице данных нет точек",
+ "139": "в его таблице NTUPLES не объявлены символы",
+ "140": "2D-спектры NTUPLES пока не поддерживаются",
+ "141": "в его таблице NTUPLES нет читаемых страниц",
+ "142": "В файле есть символы вне ASCII; он прочитан как UTF-8.",
+ "143": "В файле есть байты, не относящиеся ни к ASCII, ни к UTF-8; он прочитан как Latin-1.",
+ "144": "Строки вне каких-либо размеченных записей данных проигнорированы.",
+ "145": "##END= без предшествующего блока проигнорирован.",
+ "146": "Записи до первого ##TITLE= или после последнего ##END= проигнорированы.",
+ "147": "Файл заканчивается без ##END=; открытые блоки закрыты.",
+ "148": "страница NTUPLES {0}",
+ "149": "В странице NTUPLES {0} нет ##DATA TABLE=; она пропущена.",
+ "150": "Страница NTUPLES {0} использует символы ({1}), не объявленные в ##SYMBOL=; она пропущена.",
+ "151": "{0}: форма таблицы данных, которую FormChem не читает ({1}); пропущено.",
+ "152": "В таблице NTUPLES нет ##END NTUPLES=; она прочитана до конца блока.",
+ "153": "В таблице NTUPLES нет списка ##SYMBOL=.",
+ "154": "Это 2D-спектр (две независимые переменные); 2D-спектры в этой версии не рисуются.",
+ "155": "В таблице NTUPLES страниц: {0}; прочитаны только первые {1}.",
+ "156": "Мнимая страница не имеет общих значений x с вещественной; она исключена.",
+ "157": "В таблице NTUPLES страниц: {0}; показана страница {1}, остальных страниц исключено: {2}.",
+ "158": "##DELTAX={0} отличается от (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; используется вычисленный шаг.",
+ "159": "{0}: нет полного набора FIRSTX, LASTX и NPOINTS; шаг берётся из ##DELTAX.",
+ "160": "Строка данных началась со значения DIF; она продолжается от последнего значения предыдущей строки.",
+ "161": "Контрольное значение Y не совпало с последним значением предыдущей строки; строка продолжена от более раннего значения.",
+ "162": "{1}: не удалось прочитать и пропущено символов: {0}.",
+ "163": "Строк DIF, за которыми не следовало контрольное значение Y: {0}.",
+ "164": "{0}: нет точек данных.",
+ "165": "{0}: точек {1}, но ##NPOINTS={2}; значения x строк подходят для {3} точек от FIRSTX до LASTX, поэтому использован этот шаг.",
+ "166": "{0}: точек {1}, но ##NPOINTS={2}; прочитанные точки сохранены.",
+ "167": "Значение x строки не соответствует её положению от FIRSTX с учётом шага; использовано положение.",
+ "168": "{0}: нет FIRSTX, LASTX и NPOINTS; шаг взят из значений x строк.",
+ "169": "{0}: нет способа разместить точки на оси x; они пронумерованы 0, 1, 2 и так далее.",
+ "170": "Первая строка начинается с x = {0}, но ##FIRSTX={1}; использован FIRSTX.",
+ "171": "Первое значение Y {0} не совпадает с ##FIRSTY={1}.",
+ "172": "{0}: данные заканчиваются неполной группой из {1} значений; она отброшена.",
+ "173": "Не удалось прочитать {0}: {1}.",
+ "174": "Спектр запрашивает блок {0}, но в его файле 1 блок.",
+ "175": "Спектр запрашивает блок {0}, но в его файле блоков: {1}.",
+ "176": "У спектра нет источника.",
+ "177": "Файла {0} спектра нет на рисунке.",
+ "178": "В этом движке нет предсказателя для {0}.",
+ "179": "Предсказание не удалось: {0}",
+ "180": "Источник спектра не является ни файлом, ни предсказанием.",
+ "181": "На рисунке нет спектра {0}.",
+ "182": "У линейчатых спектров нет площадей для интегрирования.",
+ "183": "value должно быть больше нуля.",
+ "184": "from и to должны быть двумя разными значениями x.",
+ "185": "У спектра нет интеграла {0}.",
+ "186": "У этого спектра нет исходного файла; экспортируйте без original=1.",
+ "187": "FormChem помещает картинки PNG, JPEG, GIF, WebP и SVG и спектры JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/ru/part14.json b/frontend/src/i18n/locales/ru/part14.json
new file mode 100644
index 00000000..54734a6c
--- /dev/null
+++ b/frontend/src/i18n/locales/ru/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Отображение",
+ "1": "Поверхность",
+ "2": "Нечего экспортировать: 3D-вид пуст.",
+ "3": "Не удалось экспортировать",
+ "4": "Выделите структуру, чтобы показать её в 3D.",
+ "5": "Построить 3D",
+ "6": "Вставить 3D-вид",
+ "7": "Выберите файл PDB, mmCIF, SDF или MOL.",
+ "8": "Не удалось поместить 3D-структуру на страницу",
+ "9": "Выделите 3D-объект, открытый из файла PDB или mmCIF.",
+ "10": "В этой модели нет лигандов.",
+ "11": "Не удалось извлечь лиганд",
+ "12": "3D-координат пока нет: «Построить 3D» создаёт конформер по рисунку.",
+ "13": "Файл 3D-структуры...",
+ "14": "Извлечь лиганд...",
+ "15": "Экспортировать 3D-структуру...",
+ "16": "Сканирование двугранного угла...",
+ "17": "Измерение в 3D",
+ "18": "Экспортировать 3D-вид как PNG...",
+ "19": "Экспортировать 3D-вид как glTF...",
+ "20": "Извлечён {0}: {1} (порядки связей определены по геометрии)",
+ "21": "Извлечён {0}: {1}",
+ "22": "Сначала откройте 3D-вид",
+ "23": "Открывает панель 3D-вида для выделенной структуры (или выделенного 3D-объекта на странице) и следует за выделением. Сначала структуре нужны 3D-координаты: их создаёт «Построить 3D».",
+ "24": "Строит 3D-конформер выделенной структуры по её 2D-рисунку (клинья, геометрия двойных связей и заряды сохраняются), минимизирует его в выбранном силовом поле и сохраняет в рисунке одним шагом отмены; 3D-вид показывает его.",
+ "25": "Минимизирует показанный конформер выделенной структуры в силовом поле, выбранном в 3D-виде (по умолчанию MMFF94, UFF, если у MMFF94 нет параметров), и сообщает энергию до и после, одним шагом отмены.",
+ "26": "Создаёт ансамбль конформеров выделенной структуры (ETKDG, отсев по RMSD, каждый минимизирован) и оставляет те, что в пределах энергетического окна; с n, window и method работает без диалога.",
+ "27": "Число создаваемых конформеров",
+ "28": "Энергетическое окно в kcal/mol",
+ "29": "Помещает рядом с выделенной структурой на страницу её 3D-вид (сначала строя 3D-координаты, если их нет) и открывает связанную с ним панель 3D-вида; поворот или смена стиля модели обновляет картинку на странице.",
+ "30": "Открывает файл PDB, mmCIF, SDF или MOL как 3D-объект на странице (белки в виде ленты, лиганды как шары и стержни, вода скрыта, лиганд в фокусе) и показывает его в 3D-виде.",
+ "31": "Превращает лиганд выделенного 3D-объекта (открытого из файла PDB или mmCIF) в 2D-структуру рядом с ним одним шагом отмены: порядки связей берутся из встроенного шаблона для распространённых лигандов, иначе определяются по геометрии и сообщаются; координаты из файла становятся её конформером. С ligand берёт указанный лиганд; без него спрашивает, если в модели их несколько.",
+ "32": "Ключ лиганда chain:het:number или код het",
+ "33": "Выделите 3D-объект, открытый из файла PDB или mmCIF",
+ "34": "Сохраняет 3D-координаты выделенной структуры со всеми атомами водорода: молфайл MDL (показанный конформер), файл SD (все конформеры, с полями данных об энергии и методе), PDB или XYZ (показанный конформер или все конформеры как модели или кадры); 3D-объект, открытый из файла PDB или mmCIF, сохраняет свой исходный файл. Без format спрашивает.",
+ "35": "Формат файла",
+ "36": "Все конформеры вместо показанного (по умолчанию true для sdf)",
+ "37": "Сканирует двугранный угол по четырём атомам, выбранным в 3D-виде (или по последнему измеренному двугранному углу) с релаксированной минимизацией и строит график энергии от угла.",
+ "38": "Измеряет расстояние (два атома), угол (три) или двугранный угол (четыре) в 3D-виде и добавляет в список; с atoms (идентификаторы атомов фрагмента вроде a1, водороды как a1:h0, или серийные номера PDB) измеряет их, иначе переключается на выбор атомов.",
+ "39": "От двух до четырёх идентификаторов атомов",
+ "40": "Сохраняет 3D-вид как картинку PNG в размере на экране; transparent убирает фон.",
+ "41": "Сохраняет 3D-вид как двоичный файл glTF 2.0 (.glb): атомы как сферы, связи как цилиндры с цветами элементов, 1 ангстрем = 1 см, для 3D-просмотрщиков, слайдов и печати.",
+ "42": "Без поверхности",
+ "43": "Убирает молекулярную поверхность из 3D-вида.",
+ "44": "Поверхность Ван-дер-Ваальса",
+ "45": "Показывает поверхность Ван-дер-Ваальса в 3D-виде.",
+ "46": "Поверхность, доступная растворителю",
+ "47": "Показывает поверхность, доступную растворителю (зонд 1,4 ангстрем), в 3D-виде.",
+ "48": "Поверхность, исключённая растворителем",
+ "49": "Показывает поверхность, исключённую растворителем, в 3D-виде.",
+ "50": "Поверхность с картой ЭСП",
+ "51": "Окрашивает поверхность по приближённому электростатическому потенциалу (ЭСП) из эмпирических парциальных зарядов движка (красный отрицательный, синий положительный) с легендой, называющей метод.",
+ "52": "Показывает 3D-вид в стиле каркаса; для 3D-объекта на странице выбор сохраняется вместе с ним.",
+ "53": "Показывает 3D-вид в стиле стержней; для 3D-объекта на странице выбор сохраняется вместе с ним.",
+ "54": "Шары и стержни",
+ "55": "Показывает 3D-вид в стиле шаров и стержней; для 3D-объекта на странице выбор сохраняется вместе с ним.",
+ "56": "Заполнение пространства",
+ "57": "Показывает 3D-вид в стиле заполнения пространства; для 3D-объекта на странице выбор сохраняется вместе с ним.",
+ "58": "Лента",
+ "59": "Показывает 3D-вид в ленточном стиле (белки и нуклеиновые кислоты; лиганды остаются шарами и стержнями); для 3D-объекта на странице выбор сохраняется вместе с ним.",
+ "60": "Двугранный угол (градусы)",
+ "61": "Относительная энергия (kcal/mol)",
+ "62": "Минимум {0}°",
+ "63": "Экспорт 3D-структуры",
+ "64": "Все конформеры (записи SDF, модели PDB, кадры XYZ)",
+ "65": "Сохранён 1 конформер; все атомы водорода записываются с их 3D-положениями.",
+ "66": "Извлечь лиганд",
+ "67": "Лиганд",
+ "68": "Лиганд становится 2D-структурой рядом с моделью, а его координаты из файла сохраняются как его конформер.",
+ "69": "Извлечь",
+ "70": "Файл SD (.sdf)",
+ "71": "Молфайл MDL (.mol)",
+ "72": "Сохранено конформеров: {0}; все атомы водорода записываются с их 3D-положениями.",
+ "73": "Конформеры",
+ "74": "Энергетическое окно (kcal/mol)",
+ "75": "Вложение ETKDG с фиксированным начальным числом, близкие дубликаты отсеиваются при RMSD тяжёлых атомов 0,5 Å, каждый конформер минимизирован; самый низкий становится показанным конформером.",
+ "76": "Создать",
+ "77": "Энергетический профиль сканирования двугранного угла",
+ "78": "Сканирование двугранного угла",
+ "79": "От (градусы)",
+ "80": "До (градусы)",
+ "81": "Шаг (градусы)",
+ "82": "Сохранять каждую точку как конформер (один шаг отмены)",
+ "83": "Запустить сканирование",
+ "84": "Релаксированное сканирование: при каждом угле двугранный угол удерживается, а всё остальное минимизируется.",
+ "85": "Конечный угол должен быть больше начального.",
+ "86": "Сканирование...",
+ "87": "Сканирование не удалось",
+ "88": "барьер {0} kcal/mol",
+ "89": "Стиль отображения",
+ "90": "Окрасить поверхность по электростатическому потенциалу из эмпирических парциальных зарядов",
+ "91": "ЭСП",
+ "92": "Минимизировать",
+ "93": "Сканировать...",
+ "94": "Сфокусироваться на лиганде",
+ "95": "Сбросить вид",
+ "96": "Вращение",
+ "97": "Экспортировать 3D-вид",
+ "98": "Измерить",
+ "99": "Измерения",
+ "100": "Изображение PNG",
+ "101": "Изображение PNG, прозрачное",
+ "102": "Двоичный glTF (.glb)",
+ "103": "Для 3D нужен WebGL, которого это окно не предоставляет.",
+ "104": "Загрузка 3D-просмотрщика...",
+ "105": "Не удалось загрузить 3D-просмотрщик",
+ "106": "Откройте рисунок и выделите структуру, чтобы увидеть её в 3D.",
+ "107": "Выделите структуру на странице, чтобы увидеть её в 3D.",
+ "108": "Не удалось прочитать 3D-структуру",
+ "109": "Этот конформер нельзя записать как молфайл",
+ "110": "Вращение выключено: система просит уменьшить анимацию",
+ "111": "В модели PDB или CIF нет конформеров.",
+ "112": "Энергии относительно самого низкого; щёлкните по строке, чтобы показать конформер.",
+ "113": "Этот список заполняют «Построить 3D» и «Конформеры...».",
+ "114": "Парциальные заряды недоступны",
+ "115": "в движке пока нет 3D-маршрутов",
+ "116": "не сошлось",
+ "117": "Выберите четыре связанных подряд атома (двугранный угол), затем нажмите «Сканировать».",
+ "118": "Отметьте «Сохранять каждую точку как конформер», чтобы увидеть геометрии.",
+ "119": "Показать конформер",
+ "120": "Обновить 3D-вид",
+ "121": "Не удалось обновить снимок страницы",
+ "122": "Без поверхности",
+ "123": "Ван-дер-Ваальса",
+ "124": "Доступная растворителю",
+ "125": "Исключённая растворителем",
+ "126": "Расстояние",
+ "127": "Угол",
+ "128": "Двугранный угол",
+ "129": "{0} kcal/mol, {1}, не сошлось",
+ "130": "Выбрано {0} / {1}: {2}",
+ "131": "Щёлкните по атомам, чтобы измерить; нужно атомов: {0}",
+ "132": "ЭСП ({0}): {1}, красный {2} e до синего +{3} e",
+ "133": "Расстояние {0}: {1}",
+ "134": "Угол {0}: {1}",
+ "135": "Двугранный угол {0}: {1}",
+ "136": "Построено: {0}",
+ "137": "Минимизировано: {0}",
+ "138": "Оставлено конформеров: {0} из {1}",
+ "139": "Оставлено конформеров: {0}",
+ "140": "Двугранный угол {0}",
+ "141": "Не удалось закодировать PNG"
+}
diff --git a/frontend/src/i18n/locales/ru/part15.json b/frontend/src/i18n/locales/ru/part15.json
new file mode 100644
index 00000000..0bad6fd5
--- /dev/null
+++ b/frontend/src/i18n/locales/ru/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "приближённо, по эмпирическим зарядам",
+ "1": "Стереоцентров или двойных связей без указанной конфигурации: {0}; выбрана одна конфигурация.",
+ "2": "Стереометок рисунка, не воспроизводимых в 3D: {0}.",
+ "3": "Построен нарисованный представитель групп расширенной стереохимии {0}; 3D-модель это один стереоизомер смеси (относительной или рацемической), которую описывает рисунок.",
+ "4": "Вложение выполнено {0} раз (начальные числа {1}), чтобы сохранить нарисованную стереохимию.",
+ "5": "Пар тяжёлых атомов ближе {1} их контакта Ван-дер-Ваальса: {0}.",
+ "6": "Использовано универсальное силовое поле: {0}.",
+ "7": "нет параметров {0} для {1}",
+ "8": "{0} не смогло определить тип каждого атома",
+ "9": "Конформеров, изменивших нарисованную стереохимию при минимизации и исключённых: {0}.",
+ "10": "Более 300 тяжёлых атомов: при таком размере качество выборки конформеров падает.",
+ "11": "Центральная связь находится в кольце; кольцо напрягается, чтобы следовать углу.",
+ "12": "У структуры не было 3D-координат; сканирование началось с нового вложения.",
+ "13": "Структура изменилась во время расчёта 3D; выполните команду снова.",
+ "14": "В рисунке нет объекта {0}.",
+ "15": "У {0} пока нет 3D-координат; сначала постройте 3D.",
+ "16": "У {0} нет конформера {1}.",
+ "17": "В структуре нет атомов.",
+ "18": "Для 3D нужны настоящие атомы: {0} атомов являются подписями, R-группами или точками присоединения ({1}).",
+ "19": "Не удалось добавить атомы водорода: {0}",
+ "20": "Атомов с водородами в структуре: {0}; 3D обрабатывает не более {1}.",
+ "21": "3D-координаты не подходят к этой структуре (нет данных для {0}); постройте 3D снова.",
+ "22": "3D-координаты не подходят к этой структуре (число водородов изменилось); постройте 3D снова.",
+ "23": "Не удалось выполнить 3D-вложение структуры: {0}",
+ "24": "Не удалось выполнить 3D-вложение структуры; проверьте её валентности и стереохимию.",
+ "25": "Не удалось выполнить вложение конформеров: {0}",
+ "26": "Не удалось вложить ни одного конформера; проверьте валентности и стереохимию структуры.",
+ "27": "Каждый вложенный конформер потерял нарисованную стереохимию после минимизации.",
+ "28": "Ни у одного силового поля нет параметров для этой структуры ({0}).",
+ "29": "Не удалось настроить универсальное силовое поле: {0}",
+ "30": "Не удалось настроить универсальное силовое поле.",
+ "31": "Неизвестные атомы: {0}; используйте идентификаторы атомов фрагмента или водород как a1:h0.",
+ "32": "Четыре атома должны быть разными.",
+ "33": "Четыре атома должны образовывать цепочку связей (a1-a2-a3-a4).",
+ "34": "Не удалось записать 3D-файл: {0}",
+ "35": "Файл не является файлом PDB, mmCIF, SDF или MOL, который FormChem может прочитать.",
+ "36": "В файле больше {0} атомов.",
+ "37": "В файле PDB нет записей ATOM или HETATM.",
+ "38": "В таблице atom_site mmCIF нет столбцов Cartn_x, Cartn_y и Cartn_z.",
+ "39": "В CIF есть дробные координаты, но нет полной элементарной ячейки.",
+ "40": "В CIF нет таблицы atom_site.",
+ "41": "В CIF нет читаемых атомов.",
+ "42": "В файле нет записей.",
+ "43": "В файле записей: {0}; 3D-импорт читает до {1}.",
+ "44": "Не удалось прочитать ни одной записи файла.",
+ "45": "Это не файл PDB или mmCIF: {0}",
+ "46": "Не удалось превратить в рисунок FormChem: {0}, причина: {1}.",
+ "47": "Модель PDB помещена как 3D-объект: {0}.",
+ "48": "Модель mmCIF помещена как 3D-объект: {0}.",
+ "49": "Строк ATOM или HETATM с нечитаемыми координатами, которые пропущены: {0}.",
+ "50": "Строк atom_site с нечитаемыми координатами, которые пропущены: {0}.",
+ "51": "CIF малой молекулы: асимметрическая единица читается по дробным координатам; симметричные копии не создаются.",
+ "52": "{0}: проблемы с валентностью; прочитано без санитарной обработки.",
+ "53": "{0}: только 2D-координаты; конформер не сохранён.",
+ "54": "Атомов водорода, которых не было в файле и которые размещены по геометрии: {0}.",
+ "55": "{0}: не удалось прочитать, причина: {1}",
+ "56": "{0}: не удалось прочитать.",
+ "57": "Запись {0}",
+ "58": "Структура",
+ "59": "3D-координаты файла сохранены как конформер 1 структуры; «Построить 3D» для их просмотра не нужно.",
+ "60": "3D-координаты файла сохранены как конформеры; структур: {0}; «Построить 3D» для их просмотра не нужно.",
+ "61": "{0} это одиночный ион; нет структуры для извлечения.",
+ "62": "Не удалось прочитать атомы {0}.",
+ "63": "В структуре нет лиганда {0}; лиганды: {1}.",
+ "64": "В рисунке нет 3D-модели {0}.",
+ "65": "FormChem помещает картинки PNG, JPEG, GIF, WebP и SVG, спектры JCAMP-DX и файлы структур PDB, mmCIF, SDF и MOL."
+}
diff --git a/frontend/src/i18n/locales/sv/part12.json b/frontend/src/i18n/locales/sv/part12.json
new file mode 100644
index 00000000..dc46aa95
--- /dev/null
+++ b/frontend/src/i18n/locales/sv/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spektrum",
+ "1": "Rita eller markera en struktur som ska namnges.",
+ "2": "Namn kunde inte beräknas",
+ "3": "FormChem har inget namn för den här strukturen.",
+ "4": "Kopiera namn",
+ "5": "Namn kopierat: {0}",
+ "6": "Kemiskt namn som ska infogas; utelämna det för att öppna dialogrutan",
+ "7": "Kopierar namnet på den markerade strukturen (eller på sidans strukturer) som oformaterad text: trivialnamnet när FormChem känner till ett, annars det systematiska namnet, som bara erbjuds när det läses tillbaka till samma struktur.",
+ "8": "trivial eller systematic för att välja vilket namn som kopieras; utelämna det för det första",
+ "9": "Det förutsagda spektrumet är uppdaterat.",
+ "10": "Uppdatera förutsagt spektrum",
+ "11": "Markera först en struktur",
+ "12": "Markera först ett förutsagt spektrum",
+ "13": "Förutsagt 1H NMR-spektrum tillagt ({0})",
+ "14": "Förutsagt 13C NMR-spektrum tillagt ({0})",
+ "15": "Förutsagt spektrum uppdaterat ({0})",
+ "16": "Strukturens fragment-id; standard är den markerade strukturen eller den enda på sidan",
+ "17": "Spektrometerns frekvens i MHz (standard 400 för 1H, 100 för 13C)",
+ "18": "Lägger till ett förutsagt 1H NMR-spektrum av den markerade strukturen bredvid den, som ett ångrasteg: ett spektrumobjekt beräknat med FormChems egna inkrementregler (ingen databas över kemiska skift), vars multipletter och integraler är kopplade till strukturens atomer, med metod, version och frekvens som titel. Kurvan beräknas om från strukturen och lagras aldrig.",
+ "19": "Lägger till ett förutsagt 13C NMR-spektrum av den markerade strukturen bredvid den, som ett ångrasteg: ett spektrumobjekt beräknat med FormChems egna inkrementregler (ingen databas över kemiska skift), vars toppar är kopplade till strukturens atomer, med metod, version och frekvens som titel. Kurvan beräknas om från strukturen och lagras aldrig.",
+ "20": "Kunde inte förutsäga spektrumet",
+ "21": "Förutsäg 1H NMR-spektrum",
+ "22": "Förutsäg 13C NMR-spektrum",
+ "23": "Beräknar om multipletterna, integralerna eller topparna i ett förutsagt spektrum efter att dess struktur ändrats, med den körande versionen av prediktorn, som ett ångrasteg; ingenting ändras när det är uppdaterat.",
+ "24": "Id för det förutsagda spektrumet; standard är det markerade eller det som är öppet i spektrumredigeraren",
+ "25": "Kunde inte uppdatera spektrumet",
+ "26": "Inga nya toppar i det intervallet.",
+ "27": "Dra över ett intervall i spektrumredigeraren för att integrera det.",
+ "28": "Koppla topp till atomer",
+ "29": "Ta bort toppens koppling",
+ "30": "Spektrumets Y-axel",
+ "31": "Spektrum från fil...",
+ "32": "Redigera spektrum...",
+ "33": "Hitta toppar",
+ "34": "Integrera",
+ "35": "Transmittans eller absorbans",
+ "36": "Exportera spektrum...",
+ "37": "Markera först ett spektrum",
+ "38": "inget spektrum med id {0}",
+ "39": "Toppar hittade: {0} (redan där: {1})",
+ "40": "Toppar hittade: {0}",
+ "41": "Integraler gäller NMR-spektra",
+ "42": "Markera först en topp, en integral eller en multiplett i spektrumredigeraren",
+ "43": "Atomerna måste alla tillhöra en struktur",
+ "44": "Bara IR-, Raman- och UV-Vis-spektra kan växla mellan transmittans och absorbans",
+ "45": "Exporterat: {0}",
+ "46": "Id för spektrumobjektet; standard är det markerade spektrumet eller det som är öppet i spektrumredigeraren",
+ "47": "Importerar en JCAMP-DX-spektrumfil till den aktiva ritningen (ett spektrumobjekt per datablock, filen bevaras byte för byte), som ett ångrasteg per fil. Utan path öppnas en fildialog.",
+ "48": "Absolut sökväg till en .jdx-, .dx- eller .jcamp-fil",
+ "49": "Kunde inte importera spektrumet",
+ "50": "Öppnar spektrumredigeraren för det markerade spektrumet (samma sak som att dubbelklicka på det).",
+ "51": "Kunde inte öppna spektrumet",
+ "52": "Hittar ett spektrums toppar i ett intervall (standard det visade intervallet) och lägger till dem i dess topplista, utan toppar som redan finns där, som ett ångrasteg.",
+ "53": "Intervallets början i x-enheten (cm-1, nm, m/z, ppm)",
+ "54": "Intervallets slut i x-enheten",
+ "55": "Valfri detektionströskel i y-enheter",
+ "56": "Ersätt topplistan i stället för att lägga till i den",
+ "57": "Kunde inte hitta toppar",
+ "58": "Lägger till en NMR-integral över ett intervall, skalad som de befintliga integralerna (eller till value, så att resten skalas om), som ett ångrasteg. Utan from och to växlar spektrumredigeraren till sitt integreringsverktyg.",
+ "59": "Intervallets början i ppm",
+ "60": "Intervallets slut i ppm",
+ "61": "Värde som den här integralen ska visa, till exempel ett antal protoner",
+ "62": "Kunde inte integrera",
+ "63": "Kopplar en topp, en integral eller en multiplett till atomer i en struktur, som ett ångrasteg. Utan atoms används de markerade atomerna, eller så väntar den på att användaren klickar på atomer i ritningen.",
+ "64": "Id för topp, integral eller multiplett; standard är den som är markerad i spektrumredigeraren",
+ "65": "Id för den struktur (fragment) som atomerna tillhör",
+ "66": "Atom-id",
+ "67": "Kunde inte koppla toppen",
+ "68": "Tar bort atomkopplingen från en topp, en integral eller en multiplett, som ett ångrasteg.",
+ "69": "Kunde inte ta bort toppens koppling",
+ "70": "Visar ett IR-, Raman- eller UV-Vis-spektrum som transmittans eller absorbans (växlar när mode utelämnas), som ett ångrasteg.",
+ "71": "Y-axel som ska visas; utelämna för att växla",
+ "72": "Kunde inte ändra y-axeln",
+ "73": "Sparar ett spektrum som JCAMP-DX (med sin topptabell när det har toppar) eller som CSV med alla punkter, via motorn.",
+ "74": "Filformat, standard jdx",
+ "75": "Med jdx: den ursprungliga importerade filen oförändrad",
+ "76": "Absolut sökväg att skriva till; utelämna för att få frågan",
+ "77": "Kunde inte exportera spektrumet",
+ "78": "Infoga spektrum från fil",
+ "79": "Filen innehåller inget spektrum som FormChem kan rita",
+ "80": "Infoga spektrum",
+ "81": "Spektrumet kunde inte placeras: dess fil nådde inte fram till ritningen.",
+ "82": "Spektra infogade: {0}",
+ "83": "Våglängd (µm)",
+ "84": "Vågtal (cm⁻¹)",
+ "85": "Ramanskift (cm⁻¹)",
+ "86": "Våglängd (nm)",
+ "87": "Frekvens (Hz)",
+ "88": "δ (ppm)",
+ "89": "Transmittans (%)",
+ "90": "Transmittans",
+ "91": "Absorbans",
+ "92": "Relativ förekomst (%)",
+ "93": "Intensitet",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Förutsagt {0}, {1} MHz ({2})",
+ "100": "Förutsagt {0}, {1} MHz",
+ "101": "Förutsagt {0} ({1})",
+ "102": "Förutsagt {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spektrumet är inte tillgängligt: {0}",
+ "105": "Läser in spektrum",
+ "106": "Trivialnamn",
+ "107": "Systematiskt",
+ "108": "Hög säkerhet",
+ "109": "Medelhög säkerhet",
+ "110": "Låg säkerhet",
+ "111": "Inte läst",
+ "112": "FormChem-namn",
+ "113": "Kunde inte läsa namnet",
+ "114": "Infoga struktur från namn",
+ "115": "Struktur från namn",
+ "116": "Ett namn, till exempel aspirin eller 2-methylpropan-1-ol",
+ "117": "Kemiskt namn",
+ "118": "Skriv ett namn för att se dess struktur.",
+ "119": "Ingen struktur för det här namnet",
+ "120": "Ordbok",
+ "121": "Systematisk tolkare",
+ "122": "Regelbaserad namngivare, kontrollerad genom återläsning",
+ "123": "Spektrumverktyg",
+ "124": "Visa hela spektrumet",
+ "125": "Y-axel",
+ "126": "Visa det här intervallet på sidan",
+ "127": "Dubbelklicka på ett spektrum i ritningen för att redigera det här.",
+ "128": "Toppar och integraler",
+ "129": "Förutsagt",
+ "130": "Integralvärde",
+ "131": "Koppla till atomer",
+ "132": "Ta bort koppling",
+ "133": "1 atom",
+ "134": "Atomer att koppla",
+ "135": "Klicka på fler atomer och sedan på Klar.",
+ "136": "Klicka på de atomer i ritningen som hör till den här toppen och sedan på Klar.",
+ "137": "Inget att integrera i det intervallet.",
+ "138": "Ta bort topp",
+ "139": "Lägg till topp",
+ "140": "Kopplad till 1 atom",
+ "141": "Ange spektrumintervall",
+ "142": "Skriv ett positivt tal.",
+ "143": "Kunde inte ange integralen",
+ "144": "Panorera och zooma: dra för att panorera, använd hjulet för att zooma, Shift-dra för att zooma till ett intervall",
+ "145": "Zooma till ett intervall: dra över diagrammet",
+ "146": "Hitta toppar: dra över ett intervall",
+ "147": "Lägg till eller ta bort en topp: klicka nära en topp",
+ "148": "Integrera: dra över ett intervall",
+ "149": "Topp",
+ "150": "Integral",
+ "151": "Multiplett",
+ "152": "{0} atomer",
+ "153": "Kopplad till {0}",
+ "154": "Dra för att panorera, använd hjulet för att zooma, Shift-dra för att zooma till ett intervall. Klicka på en etikett för att markera den.",
+ "155": "Dra över diagrammet för att zooma till det intervallet.",
+ "156": "Dra över ett intervall för att hitta dess toppar.",
+ "157": "Klicka nära en topp för att lägga till den; klicka på en toppetikett för att ta bort den.",
+ "158": "Dra över ett intervall för att integrera det.",
+ "159": "Kopplad till {0} atomer"
+}
diff --git a/frontend/src/i18n/locales/sv/part13.json b/frontend/src/i18n/locales/sv/part13.json
new file mode 100644
index 00000000..141dddcd
--- /dev/null
+++ b/frontend/src/i18n/locales/sv/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "motorn returnerade en tom fil",
+ "1": "namnet är längre än {0} tecken",
+ "2": "fragment på över {0} atomer namnges inte",
+ "3": "Strukturen innehåller etiketter, R-grupper eller godtyckliga atomer, som inte har något namn.",
+ "4": "Strukturen kunde inte läsas som en molekyl (kontrollera valenser).",
+ "5": "Det finns ingen struktur att namnge.",
+ "6": "Inverterade indexnamn (stam först, sedan ett kommatecken och substituenterna) läses inte; skriv namnet i normal ordning, till exempel 1,2-dichlorobenzene.",
+ "7": "D- och L- läses bara för aminosyrorna och sockerarterna i FormChems ordbok; ange R- eller S-deskriptorer för andra namn.",
+ "8": "FormChem läste hela namnet, men det utgör inte ett fullständigt strukturnamn (en stam som hexane eller benzene, eller ett suffix, kan saknas).",
+ "9": "FormChem kunde inte läsa namnet från tecken {0} (\"{1}\").",
+ "10": "FormChem läste namnet, men {0}.",
+ "11": "strukturen kunde inte slutföras",
+ "12": "Namnet kan läsas på mer än ett sätt; FormChem ritade den läsning som kräver minst antaganden.",
+ "13": "Namnet anger inga stereodeskriptorer, så stereocentra och dubbelbindningar ritas ospecificerade.",
+ "14": "Inget systematiskt namn: {0}.",
+ "15": "Det systematiska namn som FormChem byggde lästes inte tillbaka till samma struktur, så det visas inte.",
+ "16": "den dubbelbindningen kan inte vara E eller Z",
+ "17": "deskriptorns lokant {0} är inte en position i stammen",
+ "18": "position {0} startar inte en dubbelbindning som kan vara E eller Z",
+ "19": "{0} kräver exakt en dubbelbindning som kan vara cis eller trans; den här strukturen har {1}",
+ "20": "{0} är oklart för den här dubbelbindningen; ange E eller Z i stället",
+ "21": "({0}) behöver en lokant: strukturen har {1} stereocentra",
+ "22": "position {0} är inte ett stereocentrum, så ({1}) kan inte tillämpas",
+ "23": "({0}) behöver en lokant: strukturen har {1} dubbelbindningar som kan vara E eller Z",
+ "24": "position {0} kan inte få {1}",
+ "25": "den dubbelbindningen kan inte få {0}",
+ "26": "{0} anger inte vilken konfiguration som avses, så strukturen ritas utan stereo.",
+ "27": "{0} har ingen fästpunkt",
+ "28": "det finns inte plats för {0} vid {1}",
+ "29": "{0} kan inte binda där",
+ "30": "kedjor på mer än {0} kolatomer läses inte ännu",
+ "31": "{0} är för liten för att vara en ring",
+ "32": "{0}-{1} är en tautomer som FormChem inte ritar från ett namn ännu",
+ "33": "lokant {0} är inte en position i {1}",
+ "34": "{0} är inte en kedjeposition",
+ "35": "en multipelbindning kan inte starta vid position {0} i {1}",
+ "36": "position {0} i {1} kan inte bära den multipelbindningen",
+ "37": "det finns inte plats för en multipelbindning vid position {0} i {1}",
+ "38": "det finns inte plats för multipelbindningarna i {0}",
+ "39": "Positionerna för multipelbindningarna i {0} angavs inte; ritade vid de lägsta positionerna.",
+ "40": "-{0} kräver en öppen kedja; på en ring är suffixet carbaldehyd, karboxylsyra, carbonitril eller karboxamid",
+ "41": "en kedja har bara två ändar för -{0}",
+ "42": "{0} är för kort för två -{1}-grupper",
+ "43": "det finns inte plats för -{0} på {1}",
+ "44": "Positionen för -{0} på {1} angavs inte; ritad vid den lägsta positionen.",
+ "45": "-{0} måste sitta i kedjans ände, inte vid {1}",
+ "46": "det finns inte plats för -{0} vid {1}",
+ "47": "ortho, meta och para kräver en bensenring",
+ "48": "ortho, meta eller para med en enda grupp kräver en stam som phenol, aniline eller toluene",
+ "49": "det finns inte plats för {0} på {1}",
+ "50": "det finns inte plats för {0} {1}-grupper på {2}",
+ "51": "Positionen för {0} på {1} angavs inte; ritad vid den lägsta lediga positionen.",
+ "52": "{0} kan inte bära substituenter",
+ "53": "en acylgrupp sitter fast vid sin karbonylkol",
+ "54": "{0} har ingen ledig position",
+ "55": "Fästpositionen för {0} angavs inte; position {1} antas.",
+ "56": "{0} har ingen plats kvar att fästa vid",
+ "57": "lokanterna {0} före {1} används inte",
+ "58": "{0} kan inte stå som ett eget ord",
+ "59": "\"{0}\" behöver {1} grupp före sig, namnet ger {2}",
+ "60": "\"{0}\" behöver {1} grupper före sig, namnet ger {2}",
+ "61": "namnet ger {0} alkylgrupp för {1} esterposition",
+ "62": "namnet ger {0} alkylgrupp för {1} esterpositioner",
+ "63": "namnet ger {0} alkylgrupper för {1} esterposition",
+ "64": "namnet ger {0} alkylgrupper för {1} esterpositioner",
+ "65": "strukturen som det beskriver är inte giltig ({0})",
+ "66": "-one vid {0} skulle vara en aldehyd; en aldehyd namnges med -al",
+ "67": "position {0} i {1}",
+ "68": "för många identiska substituenter",
+ "69": "blandade lokanter",
+ "70": "ovanliga bindningstyper namnges inte ännu",
+ "71": "ett ringsystem som FormChem inte kan namnge ännu",
+ "72": "aromatiska ringar med exocykliska dubbelbindningar (som pyridoner) namnges inte ännu",
+ "73": "isotoper och radikaler namnges inte ännu",
+ "74": "hypervalenta halogener namnges inte",
+ "75": "laddade kvävegrupper andra än nitro namnges inte ännu",
+ "76": "laddade atomer namnges inte ännu",
+ "77": "oxider av svavel, kväve och fosfor namnges inte ännu",
+ "78": "den här syregruppen namnges inte ännu",
+ "79": "sulfoxider, sulfoner och andra svavelgrupper namnges inte ännu",
+ "80": "iminer, azo och liknande kvävegrupper namnges inte ännu",
+ "81": "{0} namnges inte ännu",
+ "82": "substituentkedjor på över 20 kolatomer namnges inte",
+ "83": "omättade acylgrupper namnges inte ännu",
+ "84": "substituerade ylidengrupper namnges inte ännu",
+ "85": "ringylidengrupper namnges inte ännu",
+ "86": "ringar som fästs två gånger namnges inte ännu",
+ "87": "ingen numrering hittades för en ringsubstituent",
+ "88": "estrar med olika alkoholdelar namnges inte ännu",
+ "89": "ingen stamkedja eller stamring hittades",
+ "90": "cykliska estrar (laktoner) namnges inte ännu",
+ "91": "substituenter på mer än en amin- eller amidkväve namnges inte ännu",
+ "92": "stereocentra utanför stamkedjan eller stamringen namnges inte ännu",
+ "93": "dubbelbindningsgeometri utanför stamkedjan namnges inte ännu",
+ "94": "pseudoasymmetriska centra namnges inte ännu",
+ "95": "den här dubbelbindningsgeometrin namnges inte ännu",
+ "96": "kedjor på över 20 kolatomer namnges inte",
+ "97": "för många identiska grupper",
+ "98": "strukturen har valensfel",
+ "99": "salter och blandningar namnges inte systematiskt ännu",
+ "100": "strukturer med fler än {0} tunga atomer namnges inte systematiskt ännu",
+ "101": "föreningar av {0} namnges inte systematiskt ännu",
+ "102": "frågeatomer och R-grupper har inget namn",
+ "103": "hydrider av enstaka heteroatomer namnges bara från ordboken",
+ "104": "{0} är inte ett objekt i den här ritningen.",
+ "105": "{0} har inga atomer.",
+ "106": "Fragmentet har inga atomer.",
+ "107": "Ritningen har ingen sida.",
+ "108": "{0} är inte ett spektrum i den här ritningen.",
+ "109": "Strukturen {0} som den här prediktionen hör till finns inte längre i ritningen.",
+ "110": "Ritningen {0} stängdes.",
+ "111": "Kemiskt skift (ppm)",
+ "112": "Tid (s)",
+ "113": "Reflektans",
+ "114": "Relativ förekomst",
+ "115": "##{0}= förekommer mer än en gång; det första värdet behölls.",
+ "116": "##XYDATA={0} är inte en känd variabellista; den lästes som (X++(Y..Y)).",
+ "117": "##{0}={1} är inte en känd variabellista; den lästes som (XY..XY).",
+ "118": "Punkterna var inte i x-ordning och sorterades.",
+ "119": "##.SHIFT REFERENCE={0} kunde inte läsas; skiften refererades inte.",
+ "120": "##.SHIFT REFERENCE pekar på punkt {0}, utanför de {1} punkterna; skiften refererades inte.",
+ "121": "Skiften refererades så att punkt {0} visar {1} ppm ({2}).",
+ "122": "Filen anger inte den observerade kärnan.",
+ "123": "Det här är NMR-data i tidsdomänen (en FID); de visas som registrerade, utan Fouriertransform.",
+ "124": "Frekvenser i Hz delades med observationsfrekvensen ({0} MHz) för att ge ppm.",
+ "125": "Det finns ingen ##.SHIFT REFERENCE; 0 Hz togs som 0 ppm.",
+ "126": "Det finns ingen ##.OBSERVE FREQUENCY, så skiftaxeln förblir i Hz.",
+ "127": "Transmittans lagrades som en bråkdel och visas som procent.",
+ "128": "Block {0} innehåller mer än {1} punkter.",
+ "129": "##DATA TYPE={0} med x-enheterna {1} anger ingen känd teknik; den ritas som ett vanligt spektrum.",
+ "130": "##BLOCKS={0}, men LINK-blocket innehåller {1} block; alla block som hittades lästes.",
+ "131": "Det här är inte en JCAMP-DX-fil: den har ingen ##TITLE=-post.",
+ "132": "Filen innehåller {0} block efter varandra utan ett LINK-block; vart och ett lästes.",
+ "133": "Två block har samma ##BLOCK_ID.",
+ "134": "Filen innehåller inget spektrum som FormChem kan rita ({0}).",
+ "135": "Blocket \"{0}\" ritades inte: {1}.",
+ "136": "ett strukturblock (JCAMP-CS); det finns kvar i filen men ritas inte",
+ "137": "det innehåller ingen XYDATA, XYPOINTS, PEAK TABLE eller NTUPLES",
+ "138": "dess datatabell innehåller inga punkter",
+ "139": "dess NTUPLES-tabell deklarerar inga symboler",
+ "140": "2D NTUPLES-spektra stöds inte ännu",
+ "141": "dess NTUPLES-tabell har inga läsbara sidor",
+ "142": "Filen innehåller tecken utanför ASCII; den lästes som UTF-8.",
+ "143": "Filen innehåller byte som varken är ASCII eller UTF-8; den lästes som Latin-1.",
+ "144": "Rader utanför alla märkta datapost ignorerades.",
+ "145": "En ##END= utan ett block före sig ignorerades.",
+ "146": "Poster före den första ##TITLE= eller efter den sista ##END= ignorerades.",
+ "147": "Filen slutar utan ##END=; de öppna blocken stängdes.",
+ "148": "NTUPLES-sida {0}",
+ "149": "NTUPLES-sida {0} har ingen ##DATA TABLE=; den hoppades över.",
+ "150": "NTUPLES-sida {0} använder symboler ({1}) som inte deklarerats i ##SYMBOL=; den hoppades över.",
+ "151": "{0} har en datatabellform som FormChem inte läser ({1}); den hoppades över.",
+ "152": "NTUPLES-tabellen har ingen ##END NTUPLES=; den lästes till blockets slut.",
+ "153": "NTUPLES-tabellen har ingen ##SYMBOL=-lista.",
+ "154": "Det här är ett 2D-spektrum (två oberoende variabler); 2D-spektra ritas inte i den här versionen.",
+ "155": "NTUPLES-tabellen har {0} sidor; bara de första {1} lästes.",
+ "156": "Den imaginära sidan delar inte den reella sidans x-värden; den utelämnades.",
+ "157": "NTUPLES-tabellen innehåller {0} sidor; sida {1} visas och {2} andra sidor utelämnades.",
+ "158": "##DELTAX={0} avviker från (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; det beräknade avståndet används.",
+ "159": "{0} har inte fullständig FIRSTX, LASTX och NPOINTS; avståndet kommer från ##DELTAX.",
+ "160": "En datarad började med ett DIF-värde; den fortsätter från föregående rads sista värde.",
+ "161": "Ett Y-kontrollvärde stämde inte med föregående rads sista värde; raden fortsattes från det tidigare värdet.",
+ "162": "{0} tecken i {1} kunde inte läsas och hoppades över.",
+ "163": "{0} DIF-rader följdes inte av ett Y-kontrollvärde.",
+ "164": "{0} innehåller inga datapunkter.",
+ "165": "{0} innehåller {1} punkter men ##NPOINTS={2}; radernas X-värden passar {3} punkter från FIRSTX till LASTX, så det avståndet användes.",
+ "166": "{0} innehåller {1} punkter men ##NPOINTS={2}; de lästa punkterna behölls.",
+ "167": "En rads X-värde stämmer inte med dess position utifrån FIRSTX och avståndet; positionen användes.",
+ "168": "{0} har inte FIRSTX, LASTX och NPOINTS; avståndet togs från radernas X-värden.",
+ "169": "{0} ger inget sätt att placera sina punkter på x-axeln; de numrerades 0, 1, 2 och så vidare.",
+ "170": "Den första raden börjar vid x = {0}, men ##FIRSTX={1}; FIRSTX användes.",
+ "171": "Det första Y-värdet {0} stämmer inte med ##FIRSTY={1}.",
+ "172": "{0} slutar med en ofullständig grupp på {1} värden; den togs bort.",
+ "173": "Kunde inte läsa {0}: {1}.",
+ "174": "Spektrumet ber om block {0}, men dess fil innehåller 1 block.",
+ "175": "Spektrumet ber om block {0}, men dess fil innehåller {1} block.",
+ "176": "Spektrumet har ingen källa.",
+ "177": "Spektrumets fil {0} finns inte i ritningen.",
+ "178": "Ingen prediktor för {0} finns i den här motorn.",
+ "179": "Prediktionen misslyckades: {0}",
+ "180": "Spektrumets källa är varken en fil eller en prediktion.",
+ "181": "Ritningen har inget spektrum {0}.",
+ "182": "Stickspektra har inga areor att integrera.",
+ "183": "value måste vara större än noll.",
+ "184": "from och to måste vara två olika x-värden.",
+ "185": "Spektrumet har ingen integral {0}.",
+ "186": "Det här spektrumet har ingen originalfil; exportera det utan original=1.",
+ "187": "FormChem placerar PNG-, JPEG-, GIF-, WebP- och SVG-bilder samt JCAMP-DX-spektra."
+}
diff --git a/frontend/src/i18n/locales/sv/part14.json b/frontend/src/i18n/locales/sv/part14.json
new file mode 100644
index 00000000..27728552
--- /dev/null
+++ b/frontend/src/i18n/locales/sv/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Visning",
+ "1": "Yta",
+ "2": "Inget att exportera: 3D-vyn är tom.",
+ "3": "Exporten misslyckades",
+ "4": "Markera en struktur som ska visas i 3D.",
+ "5": "Bygg 3D",
+ "6": "Infoga 3D-vy",
+ "7": "Välj en PDB-, mmCIF-, SDF- eller MOL-fil.",
+ "8": "Kunde inte placera 3D-strukturen på sidan",
+ "9": "Markera ett 3D-objekt som öppnats från en PDB- eller mmCIF-fil.",
+ "10": "Den här modellen har inga ligander.",
+ "11": "Kunde inte extrahera liganden",
+ "12": "Inga 3D-koordinater ännu: Bygg 3D skapar en konformer från ritningen.",
+ "13": "3D-strukturfil...",
+ "14": "Extrahera ligand...",
+ "15": "Exportera 3D-struktur...",
+ "16": "Dihedralskanning...",
+ "17": "Mät i 3D",
+ "18": "Exportera 3D-vy som PNG...",
+ "19": "Exportera 3D-vy som glTF...",
+ "20": "Extraherade {0}: {1} (bindningsordningar härledda)",
+ "21": "Extraherade {0}: {1}",
+ "22": "Öppna 3D-vyn först",
+ "23": "Öppnar 3D-vypanelen för den markerade strukturen (eller det markerade 3D-objektet på sidan) och följer markeringen. En struktur behöver först 3D-koordinater: Bygg 3D skapar dem.",
+ "24": "Bygger en 3D-konformer av den markerade strukturen från dess 2D-ritning (kilar, dubbelbindningsgeometri och laddningar behålls), minimerar den med det valda kraftfältet och lagrar den i ritningen som ett ångrasteg; 3D-vyn visar den.",
+ "25": "Minimerar den visade konformeren av den markerade strukturen med kraftfältet som valts i 3D-vyn (MMFF94 som standard, UFF när MMFF94 saknar parametrar) och rapporterar energin före och efter, som ett ångrasteg.",
+ "26": "Genererar ett konformerensemble av den markerade strukturen (ETKDG, rensat efter RMSD, var och en minimerad) och behåller de inom ett energifönster; med n, window och method körs det utan dialogrutan.",
+ "27": "Konformerer som ska genereras",
+ "28": "Energifönster i kcal/mol",
+ "29": "Placerar en 3D-vy av den markerade strukturen på sidan bredvid den (och bygger först 3D-koordinater om den saknar dem) och öppnar 3D-vypanelen bunden till den; när modellen vrids eller får ny stil uppdateras bilden på sidan.",
+ "30": "Öppnar en PDB-, mmCIF-, SDF- eller MOL-fil som ett 3D-objekt på sidan (proteiner som cartoon med ligander som kula och stav, vatten dolt, liganden i fokus) och visar den i 3D-vyn.",
+ "31": "Gör en ligand från det markerade 3D-objektet (öppnat från en PDB- eller mmCIF-fil) till en 2D-struktur bredvid det, som ett ångrasteg: bindningsordningar från en inbyggd mall för vanliga ligander, annars härledda från geometrin och rapporterade; filens koordinater blir dess konformer. Med ligand tas just den; utan den frågar den när modellen har flera.",
+ "32": "Ligandnyckel kedja:het:nummer, eller en het-kod",
+ "33": "Markera ett 3D-objekt som öppnats från en PDB- eller mmCIF-fil",
+ "34": "Sparar den markerade strukturens 3D-koordinater med alla väten: MDL molfile (den visade konformeren), SD-fil (varje konformer, med energi- och metoddatafält), PDB eller XYZ (den visade konformeren, eller varje konformer som modeller eller bildrutor); ett 3D-objekt som öppnats från en PDB- eller mmCIF-fil sparar sin ursprungliga fil. Utan format frågar den.",
+ "35": "Filformat",
+ "36": "Varje konformer i stället för den visade (standard true för sdf)",
+ "37": "Skannar dihedralvinkeln för de fyra atomer som valts i 3D-vyn (eller dess senaste dihedralmätning) med relaxerad minimering och plottar vinkel mot energi.",
+ "38": "Mäter ett avstånd (två atomer), en vinkel (tre) eller en dihedralvinkel (fyra) i 3D-vyn och listar den; med atoms (fragmentets atom-id som a1, väten som a1:h0, eller PDB-serienummer) mäts dessa, annars växlar den till val av atomer.",
+ "39": "Två till fyra atom-id",
+ "40": "Sparar 3D-vyn som en PNG-bild i dess storlek på skärmen; transparent utelämnar bakgrunden.",
+ "41": "Sparar 3D-vyn som en binär glTF 2.0-fil (.glb): atomer som sfärer och bindningar som cylindrar med grundämnesfärger, 1 ångström = 1 cm, för 3D-visare, bilder och utskrift.",
+ "42": "Ingen yta",
+ "43": "Tar bort molekylytan från 3D-vyn.",
+ "44": "Van der Waals-yta",
+ "45": "Visar van der Waals-ytan i 3D-vyn.",
+ "46": "Lösningsmedelstillgänglig yta",
+ "47": "Visar den lösningsmedelstillgängliga ytan (probe 1,4 ångström) i 3D-vyn.",
+ "48": "Lösningsmedelsexkluderad yta",
+ "49": "Visar den lösningsmedelsexkluderade ytan i 3D-vyn.",
+ "50": "ESP-kartlagd yta",
+ "51": "Färgar ytan efter en approximativ elektrostatisk potential från motorns empiriska partialladdningar (rött negativt, blått positivt), med en förklaring som anger metoden.",
+ "52": "Visar 3D-vyn i trådstil; för ett 3D-objekt på sidan sparas valet med det.",
+ "53": "Visar 3D-vyn i stavstil; för ett 3D-objekt på sidan sparas valet med det.",
+ "54": "Kula och stav",
+ "55": "Visar 3D-vyn i kula-och-stav-stil; för ett 3D-objekt på sidan sparas valet med det.",
+ "56": "Rymdfyllande",
+ "57": "Visar 3D-vyn i rymdfyllande stil; för ett 3D-objekt på sidan sparas valet med det.",
+ "58": "Cartoon",
+ "59": "Visar 3D-vyn i cartoonstil (proteiner och nukleinsyror; ligander förblir kula och stav); för ett 3D-objekt på sidan sparas valet med det.",
+ "60": "Dihedralvinkel (grader)",
+ "61": "Relativ energi (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "Exportera 3D-struktur",
+ "64": "Varje konformer (SDF-poster, PDB-modeller, XYZ-bildrutor)",
+ "65": "1 konformer lagrad; varje väte skrivs med sin 3D-position.",
+ "66": "Extrahera ligand",
+ "67": "Ligand",
+ "68": "Liganden blir en 2D-struktur bredvid modellen, och dess koordinater från filen behålls som dess konformer.",
+ "69": "Extrahera",
+ "70": "SD-fil (.sdf)",
+ "71": "MDL molfile (.mol)",
+ "72": "{0} konformerer lagrade; varje väte skrivs med sin 3D-position.",
+ "73": "Konformerer",
+ "74": "Energifönster (kcal/mol)",
+ "75": "ETKDG-inbäddning med fast seed, nästan dubbletter rensade vid 0,5 Å RMSD för tunga atomer, var och en minimerad; den lägsta blir den visade konformeren.",
+ "76": "Generera",
+ "77": "Energiprofil för dihedralskanning",
+ "78": "Dihedralskanning",
+ "79": "Från (grader)",
+ "80": "Till (grader)",
+ "81": "Steg (grader)",
+ "82": "Behåll varje punkt som en konformer (ett ångrasteg)",
+ "83": "Kör skanning",
+ "84": "En relaxerad skanning: vid varje vinkel hålls dihedralvinkeln fast och allt annat minimeras.",
+ "85": "Slutvinkeln måste vara större än startvinkeln.",
+ "86": "Skannar...",
+ "87": "Skanningen misslyckades",
+ "88": "barriär {0} kcal/mol",
+ "89": "Visningsstil",
+ "90": "Färga ytan efter elektrostatisk potential från empiriska partialladdningar",
+ "91": "ESP",
+ "92": "Minimera",
+ "93": "Skanna...",
+ "94": "Fokusera på liganden",
+ "95": "Återställ vy",
+ "96": "Rotera",
+ "97": "Exportera 3D-vyn",
+ "98": "Mät",
+ "99": "Mätningar",
+ "100": "PNG-bild",
+ "101": "PNG-bild, transparent",
+ "102": "glTF binär (.glb)",
+ "103": "3D kräver WebGL, vilket det här fönstret inte erbjuder.",
+ "104": "Läser in 3D-visaren...",
+ "105": "3D-visaren kunde inte läsas in",
+ "106": "Öppna en ritning och markera en struktur för att se den i 3D.",
+ "107": "Markera en struktur på sidan för att se den i 3D.",
+ "108": "Kunde inte läsa 3D-strukturen",
+ "109": "Den här konformeren kan inte skrivas som en molfile",
+ "110": "Rotation är av: systemet ber om minskad rörelse",
+ "111": "En PDB- eller CIF-modell har inga konformerer.",
+ "112": "Energier relativt den lägsta; klicka på en för att visa den.",
+ "113": "Bygg 3D eller Konformerer... fyller den här listan.",
+ "114": "Partialladdningar är inte tillgängliga",
+ "115": "motorn har inga 3D-rutter ännu",
+ "116": "inte konvergerad",
+ "117": "Välj fyra bundna atomer i rad (en dihedralvinkel) och klicka sedan på Skanna.",
+ "118": "Kryssa i Behåll varje punkt som en konformer för att se geometrierna.",
+ "119": "Visa konformer",
+ "120": "Uppdatera 3D-vy",
+ "121": "Kunde inte uppdatera sidans ögonblicksbild",
+ "122": "Ingen yta",
+ "123": "Van der Waals",
+ "124": "Lösningsmedelstillgänglig",
+ "125": "Lösningsmedelsexkluderad",
+ "126": "Avstånd",
+ "127": "Vinkel",
+ "128": "Dihedralvinkel",
+ "129": "{0} kcal/mol, {1}, inte konvergerad",
+ "130": "Valde {0} / {1}: {2}",
+ "131": "Klicka på {0} atomer för att mäta",
+ "132": "ESP ({0}): {1}, rött {2} e till blått +{3} e",
+ "133": "Avstånd {0}: {1}",
+ "134": "Vinkel {0}: {1}",
+ "135": "Dihedralvinkel {0}: {1}",
+ "136": "Byggd: {0}",
+ "137": "Minimerad: {0}",
+ "138": "{0} konformerer behölls av {1}",
+ "139": "{0} konformerer behölls",
+ "140": "Dihedralvinkel {0}",
+ "141": "PNG-kodningen misslyckades"
+}
diff --git a/frontend/src/i18n/locales/sv/part15.json b/frontend/src/i18n/locales/sv/part15.json
new file mode 100644
index 00000000..033ff0ad
--- /dev/null
+++ b/frontend/src/i18n/locales/sv/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "approximativ, från empiriska laddningar",
+ "1": "{0} stereocentra eller dubbelbindningar var ospecificerade; en konfiguration valdes.",
+ "2": "{0} stereomärken i ritningen återges inte i 3D.",
+ "3": "Den ritade medlemmen av den eller de utökade stereogrupperna {0} byggdes; 3D-modellen är en stereoisomer av blandningen (relativ eller racemisk) som ritningen beskriver.",
+ "4": "Inbäddad {0} gånger (seeds {1}) för att behålla den ritade stereon.",
+ "5": "{0} par tunga atomer är närmare varandra än {1} av deras van der Waals-kontakt.",
+ "6": "Universellt kraftfält använt: {0}.",
+ "7": "inga {0}-parametrar för {1}",
+ "8": "{0} kunde inte typbestämma alla atomer",
+ "9": "{0} konformerer ändrade den ritade stereon under minimeringen och utelämnades.",
+ "10": "Fler än 300 tunga atomer: kvaliteten på konformerurvalet sjunker vid den här storleken.",
+ "11": "Den centrala bindningen ligger i en ring; ringen spänns för att följa vinkeln.",
+ "12": "Strukturen hade inga 3D-koordinater; skanningen startade från en ny inbäddning.",
+ "13": "Strukturen ändrades medan 3D beräknades; kör kommandot igen.",
+ "14": "Ritningen har inget objekt {0}.",
+ "15": "{0} har inga 3D-koordinater ännu; bygg 3D först.",
+ "16": "{0} har ingen konformer {1}.",
+ "17": "Strukturen har inga atomer.",
+ "18": "3D kräver riktiga atomer: {0} atomer är etiketter, R-grupper eller fästpunkter ({1}).",
+ "19": "Väten kunde inte läggas till: {0}",
+ "20": "Strukturen har {0} atomer med väten; 3D hanterar upp till {1}.",
+ "21": "3D-koordinaterna passar inte den här strukturen (inget för {0}); bygg 3D igen.",
+ "22": "3D-koordinaterna passar inte den här strukturen (antalet väten har ändrats); bygg 3D igen.",
+ "23": "Strukturen kunde inte bäddas in i 3D: {0}",
+ "24": "Strukturen kunde inte bäddas in i 3D; kontrollera dess valenser och stereo.",
+ "25": "Konformerer kunde inte bäddas in: {0}",
+ "26": "Ingen konformer kunde bäddas in; kontrollera strukturens valenser och stereo.",
+ "27": "Varje inbäddad konformer förlorade den ritade stereon efter minimeringen.",
+ "28": "Inget kraftfält har parametrar för den här strukturen ({0}).",
+ "29": "Det universella kraftfältet kunde inte ställas in: {0}",
+ "30": "Det universella kraftfältet kunde inte ställas in.",
+ "31": "Okända atomer {0}; använd fragmentets atom-id eller ett väte som a1:h0.",
+ "32": "De fyra atomerna måste vara olika.",
+ "33": "De fyra atomerna måste bilda en kedja av bindningar (a1-a2-a3-a4).",
+ "34": "3D-filen kunde inte skrivas: {0}",
+ "35": "Filen är inte en PDB-, mmCIF-, SDF- eller MOL-fil som FormChem kan läsa.",
+ "36": "Filen har fler än {0} atomer.",
+ "37": "PDB-filen har inga ATOM- eller HETATM-poster.",
+ "38": "mmCIF-tabellen atom_site saknar kolumnerna Cartn_x, Cartn_y och Cartn_z.",
+ "39": "CIF-filen har bråkkoordinater men ingen fullständig enhetscell.",
+ "40": "CIF-filen har ingen atom_site-tabell.",
+ "41": "CIF-filen har inga läsbara atomer.",
+ "42": "Filen har inga poster.",
+ "43": "Filen har {0} poster; 3D-import läser upp till {1}.",
+ "44": "Ingen post i filen kunde läsas.",
+ "45": "{0} är inte en PDB- eller mmCIF-fil.",
+ "46": "{0} kunde inte göras om till en FormChem-ritning: {1}.",
+ "47": "PDB-modell placerad som 3D-objekt: {0}.",
+ "48": "mmCIF-modell placerad som 3D-objekt: {0}.",
+ "49": "{0} ATOM- eller HETATM-rader hade oläsbara koordinater och hoppades över.",
+ "50": "{0} atom_site-rader hade oläsbara koordinater och hoppades över.",
+ "51": "CIF för små molekyler: den asymmetriska enheten läses från bråkkoordinater; symmetripartners genereras inte.",
+ "52": "{0} har valensproblem; den lästes utan sanering.",
+ "53": "{0} har bara 2D-koordinater; ingen konformer behölls.",
+ "54": "{0} väten fanns inte i filen och placerades utifrån geometrin.",
+ "55": "{0} kunde inte läsas: {1}",
+ "56": "{0} kunde inte läsas.",
+ "57": "Post {0}",
+ "58": "Strukturen",
+ "59": "Filens 3D-koordinater behölls som konformer av 1 struktur; Bygg 3D behövs inte för att se dem.",
+ "60": "Filens 3D-koordinater behölls som konformer av {0} strukturer; Bygg 3D behövs inte för att se dem.",
+ "61": "{0} är en enskild jon; det finns ingen struktur att extrahera.",
+ "62": "Atomerna i {0} kunde inte läsas.",
+ "63": "Ingen ligand {0} i strukturen; ligander: {1}.",
+ "64": "Ritningen har ingen 3D-modell {0}.",
+ "65": "FormChem placerar PNG-, JPEG-, GIF-, WebP- och SVG-bilder, JCAMP-DX-spektra samt PDB-, mmCIF-, SDF- och MOL-strukturfiler."
+}
diff --git a/frontend/src/i18n/locales/th/part12.json b/frontend/src/i18n/locales/th/part12.json
new file mode 100644
index 00000000..f8ce91bb
--- /dev/null
+++ b/frontend/src/i18n/locales/th/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "สเปกตรัม",
+ "1": "วาดหรือเลือกโครงสร้างที่จะตั้งชื่อ",
+ "2": "ไม่สามารถคำนวณชื่อได้",
+ "3": "FormChem ไม่มีชื่อสำหรับโครงสร้างนี้",
+ "4": "คัดลอกชื่อ",
+ "5": "คัดลอกชื่อแล้ว: {0}",
+ "6": "ชื่อสารเคมีที่จะแทรก; ไม่ระบุเพื่อเปิดกล่องโต้ตอบ",
+ "7": "คัดลอกชื่อของโครงสร้างที่เลือก (หรือโครงสร้างทั้งหมดในหน้า) เป็นข้อความธรรมดา: ชื่อสามัญเมื่อ FormChem รู้จัก มิฉะนั้นเป็นชื่อระบบ ซึ่งจะให้เฉพาะเมื่ออ่านย้อนกลับได้เป็นโครงสร้างเดิม",
+ "8": "trivial หรือ systematic เพื่อเลือกชื่อที่จะคัดลอก; ไม่ระบุจะใช้ชื่อแรก",
+ "9": "สเปกตรัมที่ทำนายเป็นปัจจุบันแล้ว",
+ "10": "รีเฟรชสเปกตรัมที่ทำนาย",
+ "11": "เลือกโครงสร้างหนึ่งก่อน",
+ "12": "เลือกสเปกตรัมที่ทำนายก่อน",
+ "13": "เพิ่มสเปกตรัม 1H NMR ที่ทำนายแล้ว ({0})",
+ "14": "เพิ่มสเปกตรัม 13C NMR ที่ทำนายแล้ว ({0})",
+ "15": "รีเฟรชสเปกตรัมที่ทำนายแล้ว ({0})",
+ "16": "id ของชิ้นส่วนโครงสร้าง; ค่าเริ่มต้นคือโครงสร้างที่เลือก หรือโครงสร้างเดียวในหน้า",
+ "17": "ความถี่ของเครื่องสเปกโตรมิเตอร์เป็น MHz (ค่าเริ่มต้น 400 สำหรับ 1H, 100 สำหรับ 13C)",
+ "18": "เพิ่มสเปกตรัม 1H NMR ที่ทำนายของโครงสร้างที่เลือกไว้ข้างกัน เลิกทำได้หนึ่งขั้น: เป็นวัตถุสเปกตรัมที่คำนวณด้วยกฎอินครีเมนต์ของ FormChem เอง (ไม่ใช้ฐานข้อมูลเคมิคัลชิฟต์) มัลติเพลตและอินทิกรัลเชื่อมโยงกับอะตอมของโครงสร้าง และชื่อเรื่องระบุวิธี รุ่น และความถี่ เส้นโค้งคำนวณใหม่จากโครงสร้างเสมอ ไม่เคยบันทึกไว้",
+ "19": "เพิ่มสเปกตรัม 13C NMR ที่ทำนายของโครงสร้างที่เลือกไว้ข้างกัน เลิกทำได้หนึ่งขั้น: เป็นวัตถุสเปกตรัมที่คำนวณด้วยกฎอินครีเมนต์ของ FormChem เอง (ไม่ใช้ฐานข้อมูลเคมิคัลชิฟต์) พีกเชื่อมโยงกับอะตอมของโครงสร้าง และชื่อเรื่องระบุวิธี รุ่น และความถี่ เส้นโค้งคำนวณใหม่จากโครงสร้างเสมอ ไม่เคยบันทึกไว้",
+ "20": "ไม่สามารถทำนายสเปกตรัมได้",
+ "21": "ทำนายสเปกตรัม 1H NMR",
+ "22": "ทำนายสเปกตรัม 13C NMR",
+ "23": "คำนวณมัลติเพลต อินทิกรัล หรือพีกของสเปกตรัมที่ทำนายใหม่หลังโครงสร้างเปลี่ยน ด้วยตัวทำนายรุ่นที่ใช้อยู่ เลิกทำได้หนึ่งขั้น; ถ้าเป็นปัจจุบันแล้วจะไม่มีอะไรเปลี่ยน",
+ "24": "id ของสเปกตรัมที่ทำนาย; ค่าเริ่มต้นคืออันที่เลือก หรืออันที่เปิดอยู่ในตัวแก้ไขสเปกตรัม",
+ "25": "ไม่สามารถรีเฟรชสเปกตรัมได้",
+ "26": "ไม่มีพีกใหม่ในช่วงนั้น",
+ "27": "ลากข้ามช่วงในตัวแก้ไขสเปกตรัมเพื่ออินทิเกรตช่วงนั้น",
+ "28": "เชื่อมโยงพีกกับอะตอม",
+ "29": "เลิกเชื่อมโยงพีก",
+ "30": "แกน Y ของสเปกตรัม",
+ "31": "สเปกตรัมจากไฟล์...",
+ "32": "แก้ไขสเปกตรัม...",
+ "33": "เลือกพีก",
+ "34": "อินทิเกรต",
+ "35": "ทรานสมิตแตนซ์หรือแอบซอร์แบนซ์",
+ "36": "ส่งออกสเปกตรัม...",
+ "37": "เลือกสเปกตรัมก่อน",
+ "38": "ไม่มีสเปกตรัมนี้: id {0}",
+ "39": "เลือกพีกแล้ว: {0} (มีอยู่แล้ว: {1})",
+ "40": "เลือกพีกแล้ว: {0}",
+ "41": "อินทิกรัลใช้กับสเปกตรัม NMR เท่านั้น",
+ "42": "เลือกพีก อินทิกรัล หรือมัลติเพลตในตัวแก้ไขสเปกตรัมก่อน",
+ "43": "อะตอมทั้งหมดต้องอยู่ในโครงสร้างเดียวกัน",
+ "44": "เฉพาะสเปกตรัม IR, รามาน และ UV-Vis เท่านั้นที่สลับระหว่างทรานสมิตแตนซ์และแอบซอร์แบนซ์ได้",
+ "45": "ส่งออกแล้ว: {0}",
+ "46": "id ของวัตถุสเปกตรัม; ค่าเริ่มต้นคือสเปกตรัมที่เลือก หรืออันที่เปิดอยู่ในตัวแก้ไขสเปกตรัม",
+ "47": "นำเข้าไฟล์สเปกตรัม JCAMP-DX ลงในแบบวาดที่ใช้งานอยู่ (หนึ่งวัตถุสเปกตรัมต่อหนึ่งบล็อกข้อมูล เก็บไฟล์ไว้ไบต์ต่อไบต์) เลิกทำได้หนึ่งขั้นต่อไฟล์ ถ้าไม่ระบุ path จะเปิดกล่องโต้ตอบไฟล์",
+ "48": "พาธแบบสัมบูรณ์ของไฟล์ .jdx, .dx หรือ .jcamp",
+ "49": "ไม่สามารถนำเข้าสเปกตรัมได้",
+ "50": "เปิดตัวแก้ไขสเปกตรัมสำหรับสเปกตรัมที่เลือก (เหมือนการดับเบิลคลิก)",
+ "51": "ไม่สามารถเปิดสเปกตรัมได้",
+ "52": "หาพีกของสเปกตรัมในช่วงหนึ่ง (ค่าเริ่มต้นคือช่วงที่แสดงอยู่) แล้วเพิ่มลงในรายการพีก โดยข้ามพีกที่มีอยู่แล้ว เลิกทำได้หนึ่งขั้น",
+ "53": "จุดเริ่มต้นของช่วงในหน่วยแกน x (cm-1, nm, m/z, ppm)",
+ "54": "จุดสิ้นสุดของช่วงในหน่วยแกน x",
+ "55": "เกณฑ์การตรวจจับ (ไม่บังคับ) ในหน่วยแกน y",
+ "56": "แทนที่รายการพีกแทนการเพิ่ม",
+ "57": "ไม่สามารถเลือกพีกได้",
+ "58": "เพิ่มอินทิกรัล NMR เหนือช่วงหนึ่ง โดยปรับสเกลตามอินทิกรัลที่มีอยู่ (หรือให้ได้ค่า value แล้วปรับสเกลที่เหลือใหม่) เลิกทำได้หนึ่งขั้น ถ้าไม่ระบุ from และ to จะสลับตัวแก้ไขสเปกตรัมไปที่เครื่องมืออินทิเกรต",
+ "59": "จุดเริ่มต้นของช่วงเป็น ppm",
+ "60": "จุดสิ้นสุดของช่วงเป็น ppm",
+ "61": "ค่าที่อินทิกรัลนี้ควรแสดง เช่น จำนวนโปรตอน",
+ "62": "ไม่สามารถอินทิเกรตได้",
+ "63": "เชื่อมโยงพีก อินทิกรัล หรือมัลติเพลตกับอะตอมของโครงสร้าง เลิกทำได้หนึ่งขั้น ถ้าไม่ระบุ atoms จะใช้อะตอมที่เลือก หรือรอให้ผู้ใช้คลิกอะตอมในแบบวาด",
+ "64": "id ของพีก อินทิกรัล หรือมัลติเพลต; ค่าเริ่มต้นคืออันที่เลือกในตัวแก้ไขสเปกตรัม",
+ "65": "id ของโครงสร้าง (ชิ้นส่วน) ที่อะตอมอยู่",
+ "66": "id ของอะตอม",
+ "67": "ไม่สามารถเชื่อมโยงพีกได้",
+ "68": "ลบการเชื่อมโยงอะตอมของพีก อินทิกรัล หรือมัลติเพลต เลิกทำได้หนึ่งขั้น",
+ "69": "ไม่สามารถเลิกเชื่อมโยงพีกได้",
+ "70": "แสดงสเปกตรัม IR, รามาน หรือ UV-Vis เป็นทรานสมิตแตนซ์หรือแอบซอร์แบนซ์ (สลับถ้าไม่ระบุ mode) เลิกทำได้หนึ่งขั้น",
+ "71": "แกน Y ที่จะแสดง; ไม่ระบุเพื่อสลับ",
+ "72": "ไม่สามารถเปลี่ยนแกน Y ได้",
+ "73": "บันทึกสเปกตรัมเป็น JCAMP-DX (พร้อมตารางพีกถ้ามีพีก) หรือเป็น CSV ของทุกจุด ผ่านเอนจิน",
+ "74": "รูปแบบไฟล์ ค่าเริ่มต้น jdx",
+ "75": "เมื่อเป็น jdx: ไฟล์ต้นฉบับที่นำเข้าโดยไม่แก้ไข",
+ "76": "พาธแบบสัมบูรณ์ที่จะเขียน; ไม่ระบุเพื่อถามก่อน",
+ "77": "ไม่สามารถส่งออกสเปกตรัมได้",
+ "78": "แทรกสเปกตรัมจากไฟล์",
+ "79": "ไฟล์ไม่มีสเปกตรัมที่ FormChem วาดได้",
+ "80": "แทรกสเปกตรัม",
+ "81": "ไม่สามารถวางสเปกตรัมได้: ไฟล์ของสเปกตรัมไม่ถึงแบบวาด",
+ "82": "แทรกสเปกตรัมแล้ว: {0}",
+ "83": "ความยาวคลื่น (µm)",
+ "84": "เลขคลื่น (cm⁻¹)",
+ "85": "รามานชิฟต์ (cm⁻¹)",
+ "86": "ความยาวคลื่น (nm)",
+ "87": "ความถี่ (Hz)",
+ "88": "δ (ppm)",
+ "89": "ทรานสมิตแตนซ์ (%)",
+ "90": "ทรานสมิตแตนซ์",
+ "91": "แอบซอร์แบนซ์",
+ "92": "ความอุดมสัมพัทธ์ (%)",
+ "93": "ความเข้ม",
+ "94": "NMR {0}",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "รามาน",
+ "98": "IR",
+ "99": "ทำนาย {0}, {1} MHz ({2})",
+ "100": "ทำนาย {0}, {1} MHz",
+ "101": "ทำนาย {0} ({1})",
+ "102": "ทำนาย {0}",
+ "103": "{0}, {1} MHz",
+ "104": "ใช้สเปกตรัมไม่ได้: {0}",
+ "105": "กำลังโหลดสเปกตรัม",
+ "106": "ชื่อสามัญ",
+ "107": "ชื่อระบบ",
+ "108": "ความมั่นใจสูง",
+ "109": "ความมั่นใจปานกลาง",
+ "110": "ความมั่นใจต่ำ",
+ "111": "อ่านไม่ได้",
+ "112": "การตั้งชื่อของ FormChem",
+ "113": "ไม่สามารถอ่านชื่อได้",
+ "114": "แทรกโครงสร้างจากชื่อ",
+ "115": "โครงสร้างจากชื่อ",
+ "116": "ชื่อ เช่น aspirin หรือ 2-methylpropan-1-ol",
+ "117": "ชื่อสารเคมี",
+ "118": "พิมพ์ชื่อเพื่อดูโครงสร้าง",
+ "119": "ไม่มีโครงสร้างสำหรับชื่อนี้",
+ "120": "พจนานุกรม",
+ "121": "ตัวแยกวิเคราะห์ชื่อระบบ",
+ "122": "ตัวตั้งชื่อตามกฎ ตรวจสอบแบบย้อนกลับแล้ว",
+ "123": "เครื่องมือสเปกตรัม",
+ "124": "แสดงสเปกตรัมทั้งหมด",
+ "125": "แกน Y",
+ "126": "แสดงช่วงนี้ในหน้า",
+ "127": "ดับเบิลคลิกสเปกตรัมในแบบวาดเพื่อแก้ไขที่นี่",
+ "128": "พีกและอินทิกรัล",
+ "129": "ที่ทำนาย",
+ "130": "ค่าอินทิกรัล",
+ "131": "เชื่อมโยงกับอะตอม",
+ "132": "เลิกเชื่อมโยง",
+ "133": "1 อะตอม",
+ "134": "อะตอมที่จะเชื่อมโยง",
+ "135": "คลิกอะตอมเพิ่ม แล้วกด เสร็จ",
+ "136": "คลิกอะตอมในแบบวาดที่เป็นของพีกนี้ แล้วกด เสร็จ",
+ "137": "ไม่มีอะไรให้อินทิเกรตในช่วงนั้น",
+ "138": "ลบพีก",
+ "139": "เพิ่มพีก",
+ "140": "เชื่อมโยงกับ 1 อะตอมแล้ว",
+ "141": "ตั้งช่วงของสเปกตรัม",
+ "142": "พิมพ์จำนวนบวก",
+ "143": "ไม่สามารถตั้งค่าอินทิกรัลได้",
+ "144": "เลื่อนและซูม: ลากเพื่อเลื่อน หมุนล้อเพื่อซูม Shift+ลากเพื่อซูมไปที่ช่วง",
+ "145": "ซูมไปที่ช่วง: ลากข้ามกราฟ",
+ "146": "เลือกพีก: ลากข้ามช่วง",
+ "147": "เพิ่มหรือลบพีก: คลิกใกล้พีก",
+ "148": "อินทิเกรต: ลากข้ามช่วง",
+ "149": "พีก",
+ "150": "อินทิกรัล",
+ "151": "มัลติเพลต",
+ "152": "{0} อะตอม",
+ "153": "เชื่อมโยงกับ {0}",
+ "154": "ลากเพื่อเลื่อน หมุนล้อเพื่อซูม Shift+ลากเพื่อซูมไปที่ช่วง คลิกป้ายชื่อเพื่อเลือก",
+ "155": "ลากข้ามกราฟเพื่อซูมไปที่ช่วงนั้น",
+ "156": "ลากข้ามช่วงเพื่อเลือกพีกในช่วงนั้น",
+ "157": "คลิกใกล้พีกเพื่อเพิ่ม; คลิกป้ายชื่อพีกเพื่อลบ",
+ "158": "ลากข้ามช่วงเพื่ออินทิเกรตช่วงนั้น",
+ "159": "เชื่อมโยงกับ {0} อะตอมแล้ว"
+}
diff --git a/frontend/src/i18n/locales/th/part13.json b/frontend/src/i18n/locales/th/part13.json
new file mode 100644
index 00000000..ab4ad59c
--- /dev/null
+++ b/frontend/src/i18n/locales/th/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "เอนจินส่งไฟล์ว่างกลับมา",
+ "1": "ชื่อยาวเกิน {0} อักขระ",
+ "2": "ไม่ตั้งชื่อชิ้นส่วนที่มีอะตอมเกิน {0} อะตอม",
+ "3": "โครงสร้างมีป้ายชื่อ หมู่ R หรืออะตอมใดก็ได้ ซึ่งไม่มีชื่อ",
+ "4": "อ่านโครงสร้างเป็นโมเลกุลไม่ได้ (ตรวจสอบเวเลนซ์)",
+ "5": "ไม่มีโครงสร้างให้ตั้งชื่อ",
+ "6": "ไม่อ่านชื่อแบบดัชนีกลับด้าน (สารแม่ก่อน ตามด้วยจุลภาคและหมู่แทนที่); เขียนชื่อตามลำดับปกติ เช่น 1,2-dichlorobenzene",
+ "7": "D- และ L- อ่านได้เฉพาะกรดอะมิโนและน้ำตาลในพจนานุกรมของ FormChem; สำหรับชื่ออื่นให้ระบุตัวระบุ R หรือ S",
+ "8": "FormChem อ่านชื่อได้ทั้งหมด แต่ไม่ได้เป็นชื่อโครงสร้างที่สมบูรณ์ (อาจขาดสารแม่ เช่น hexane หรือ benzene หรือขาดคำลงท้าย)",
+ "9": "FormChem อ่านชื่อไม่ได้ตั้งแต่อักขระที่ {0} (\"{1}\")",
+ "10": "FormChem อ่านชื่อได้ แต่ {0}",
+ "11": "สร้างโครงสร้างให้สมบูรณ์ไม่ได้",
+ "12": "ชื่อนี้อ่านได้มากกว่าหนึ่งแบบ; FormChem วาดตามแบบที่ใช้สมมติฐานน้อยที่สุด",
+ "13": "ชื่อไม่ระบุตัวระบุสเตอริโอ จึงวาดศูนย์สเตอริโอและพันธะคู่โดยไม่ระบุสเตอริโอ",
+ "14": "ไม่มีชื่อระบบ: {0}",
+ "15": "ชื่อระบบที่ FormChem สร้างอ่านย้อนกลับแล้วไม่ได้โครงสร้างเดิม จึงไม่แสดง",
+ "16": "พันธะคู่นั้นเป็น E หรือ Z ไม่ได้",
+ "17": "ตำแหน่ง {0} ของตัวระบุไม่ใช่ตำแหน่งของสารแม่",
+ "18": "ตำแหน่ง {0} ไม่ใช่จุดเริ่มต้นของพันธะคู่ที่เป็น E หรือ Z ได้",
+ "19": "{0} ต้องมีพันธะคู่ที่เป็น cis หรือ trans ได้เพียงหนึ่งพันธะพอดี; โครงสร้างนี้มี {1}",
+ "20": "{0} ไม่ชัดเจนสำหรับพันธะคู่นี้; ให้ระบุ E หรือ Z แทน",
+ "21": "({0}) ต้องมีเลขตำแหน่ง: โครงสร้างนี้มีศูนย์สเตอริโอ {1} ตำแหน่ง",
+ "22": "ตำแหน่ง {0} ไม่ใช่ศูนย์สเตอริโอ จึงใช้ ({1}) ไม่ได้",
+ "23": "({0}) ต้องมีเลขตำแหน่ง: โครงสร้างนี้มีพันธะคู่ที่เป็น E หรือ Z ได้ {1} พันธะ",
+ "24": "ตำแหน่ง {0} ระบุ {1} ไม่ได้",
+ "25": "พันธะคู่นั้นระบุ {0} ไม่ได้",
+ "26": "{0} ไม่ได้บอกว่าหมายถึงการจัดเรียงแบบใด จึงวาดโครงสร้างโดยไม่ระบุสเตอริโอ",
+ "27": "{0} ไม่มีจุดเชื่อมต่อ",
+ "28": "ไม่มีที่ว่างสำหรับ {0} ที่ {1}",
+ "29": "{0} สร้างพันธะที่นั่นไม่ได้",
+ "30": "ยังไม่อ่านสายโซ่ที่ยาวเกิน {0} คาร์บอน",
+ "31": "{0} เล็กเกินกว่าจะเป็นวง",
+ "32": "{0}-{1} เป็นทอโทเมอร์ที่ FormChem ยังไม่วาดจากชื่อ",
+ "33": "เลขตำแหน่ง {0} ไม่ใช่ตำแหน่งของ {1}",
+ "34": "{0} ไม่ใช่ตำแหน่งบนสายโซ่",
+ "35": "พันธะพหุคูณเริ่มที่ตำแหน่ง {0} ของ {1} ไม่ได้",
+ "36": "ตำแหน่ง {0} ของ {1} มีพันธะพหุคูณนั้นไม่ได้",
+ "37": "ไม่มีที่ว่างสำหรับพันธะพหุคูณที่ตำแหน่ง {0} ของ {1}",
+ "38": "ไม่มีที่ว่างสำหรับพันธะพหุคูณของ {0}",
+ "39": "ไม่ได้ระบุตำแหน่งพันธะพหุคูณของ {0}; วาดที่ตำแหน่งต่ำสุด",
+ "40": "-{0} ต้องใช้สายโซ่เปิด; บนวงคำลงท้ายคือ carbaldehyde, carboxylic acid, carbonitrile หรือ carboxamide",
+ "41": "สายโซ่มีปลายเพียงสองด้านสำหรับ -{0}",
+ "42": "{0} สั้นเกินไปสำหรับหมู่ -{1} สองหมู่",
+ "43": "ไม่มีที่ว่างสำหรับ -{0} บน {1}",
+ "44": "ไม่ได้ระบุตำแหน่งของ -{0} บน {1}; วาดที่ตำแหน่งต่ำสุด",
+ "45": "-{0} ต้องอยู่ที่ปลายสายโซ่ ไม่ใช่ที่ {1}",
+ "46": "ไม่มีที่ว่างสำหรับ -{0} ที่ {1}",
+ "47": "ortho, meta และ para ต้องใช้วงเบนซีน",
+ "48": "ortho, meta หรือ para ที่มีหมู่เดียวต้องมีสารแม่ เช่น phenol, aniline หรือ toluene",
+ "49": "ไม่มีที่ว่างสำหรับ {0} บน {1}",
+ "50": "ไม่มีที่ว่างสำหรับหมู่ {0} จำนวน {1} หมู่บน {2}",
+ "51": "ไม่ได้ระบุตำแหน่งของ {0} บน {1}; วาดที่ตำแหน่งว่างต่ำสุด",
+ "52": "{0} มีหมู่แทนที่ไม่ได้",
+ "53": "หมู่แอซิลเชื่อมต่อที่คาร์บอนคาร์บอนิล",
+ "54": "{0} ไม่มีตำแหน่งว่าง",
+ "55": "ไม่ได้ระบุตำแหน่งเชื่อมต่อของ {0}; สมมติเป็นตำแหน่ง {1}",
+ "56": "{0} ไม่เหลือที่ว่างให้เชื่อมต่อ",
+ "57": "ไม่ใช้เลขตำแหน่ง {0} ก่อน {1}",
+ "58": "{0} ใช้เป็นคำแยกต่างหากไม่ได้",
+ "59": "\"{0}\" ต้องมีหมู่ {1} หมู่ก่อนหน้า แต่ชื่อให้ไว้ {2}",
+ "60": "\"{0}\" ต้องมีหมู่ {1} หมู่ก่อนหน้า แต่ชื่อให้ไว้ {2}",
+ "61": "ชื่อให้หมู่แอลคิล {0} หมู่สำหรับตำแหน่งเอสเทอร์ {1} ตำแหน่ง",
+ "62": "ชื่อให้หมู่แอลคิล {0} หมู่สำหรับตำแหน่งเอสเทอร์ {1} ตำแหน่ง",
+ "63": "ชื่อให้หมู่แอลคิล {0} หมู่สำหรับตำแหน่งเอสเทอร์ {1} ตำแหน่ง",
+ "64": "ชื่อให้หมู่แอลคิล {0} หมู่สำหรับตำแหน่งเอสเทอร์ {1} ตำแหน่ง",
+ "65": "โครงสร้างที่ชื่อนี้อธิบายไม่ถูกต้อง ({0})",
+ "66": "-one ที่ตำแหน่ง {0} จะเป็นแอลดีไฮด์; แอลดีไฮด์ตั้งชื่อด้วย -al",
+ "67": "ตำแหน่ง {0} ของ {1}",
+ "68": "มีหมู่แทนที่เหมือนกันมากเกินไป",
+ "69": "เลขตำแหน่งปนกัน",
+ "70": "ยังไม่ตั้งชื่อพันธะชนิดผิดปกติ",
+ "71": "ระบบวงที่ FormChem ยังตั้งชื่อไม่ได้",
+ "72": "ยังไม่ตั้งชื่อวงอะโรมาติกที่มีพันธะคู่นอกวง (เช่น ไพริโดน)",
+ "73": "ยังไม่ตั้งชื่อไอโซโทปและแรดิคัล",
+ "74": "ไม่ตั้งชื่อฮาโลเจนที่มีเวเลนซ์เกิน",
+ "75": "ยังไม่ตั้งชื่อหมู่ไนโตรเจนที่มีประจุนอกจากไนโตร",
+ "76": "ยังไม่ตั้งชื่ออะตอมที่มีประจุ",
+ "77": "ยังไม่ตั้งชื่อออกไซด์ของซัลเฟอร์ ไนโตรเจน และฟอสฟอรัส",
+ "78": "ยังไม่ตั้งชื่อหมู่ออกซิเจนนี้",
+ "79": "ยังไม่ตั้งชื่อซัลฟอกไซด์ ซัลโฟน และหมู่ซัลเฟอร์อื่น ๆ",
+ "80": "ยังไม่ตั้งชื่ออิมีน เอโซ และหมู่ไนโตรเจนที่คล้ายกัน",
+ "81": "ยังไม่ตั้งชื่อ {0}",
+ "82": "ไม่ตั้งชื่อสายโซ่หมู่แทนที่ที่ยาวเกิน 20 คาร์บอน",
+ "83": "ยังไม่ตั้งชื่อหมู่แอซิลไม่อิ่มตัว",
+ "84": "ยังไม่ตั้งชื่อหมู่อิลิดีนที่มีหมู่แทนที่",
+ "85": "ยังไม่ตั้งชื่อหมู่อิลิดีนของวง",
+ "86": "ยังไม่ตั้งชื่อวงที่เชื่อมต่อสองตำแหน่ง",
+ "87": "ไม่พบการกำหนดเลขสำหรับหมู่แทนที่ของวง",
+ "88": "ยังไม่ตั้งชื่อเอสเทอร์ที่มีส่วนแอลกอฮอล์ต่างกัน",
+ "89": "ไม่พบสายโซ่หรือวงของสารแม่",
+ "90": "ยังไม่ตั้งชื่อเอสเทอร์วง (แลกโทน)",
+ "91": "ยังไม่ตั้งชื่อโครงสร้างที่มีหมู่แทนที่บนไนโตรเจนของเอมีนหรืออะไมด์มากกว่าหนึ่งตัว",
+ "92": "ยังไม่ตั้งชื่อศูนย์สเตอริโอที่อยู่นอกสายโซ่หรือวงของสารแม่",
+ "93": "ยังไม่ตั้งชื่อรูปทรงเรขาคณิตของพันธะคู่ที่อยู่นอกสายโซ่ของสารแม่",
+ "94": "ยังไม่ตั้งชื่อจุดศูนย์กลางเทียมไม่สมมาตร",
+ "95": "ยังไม่ตั้งชื่อรูปทรงเรขาคณิตของพันธะคู่นี้",
+ "96": "ไม่ตั้งชื่อสายโซ่ที่ยาวเกิน 20 คาร์บอน",
+ "97": "มีหมู่เหมือนกันมากเกินไป",
+ "98": "โครงสร้างมีข้อผิดพลาดเรื่องเวเลนซ์",
+ "99": "ยังไม่ตั้งชื่อเกลือและสารผสมแบบระบบ",
+ "100": "ยังไม่ตั้งชื่อแบบระบบสำหรับโครงสร้างที่มีอะตอมหนักเกิน {0} อะตอม",
+ "101": "ยังไม่ตั้งชื่อแบบระบบสำหรับสารประกอบของ {0}",
+ "102": "อะตอมคิวรีและหมู่ R ไม่มีชื่อ",
+ "103": "ไฮไดรด์ของเฮเทอโรอะตอมเดี่ยวตั้งชื่อจากพจนานุกรมเท่านั้น",
+ "104": "{0} ไม่ใช่วัตถุของแบบวาดนี้",
+ "105": "{0} ไม่มีอะตอม",
+ "106": "ชิ้นส่วนไม่มีอะตอม",
+ "107": "แบบวาดไม่มีหน้า",
+ "108": "{0} ไม่ใช่สเปกตรัมของแบบวาดนี้",
+ "109": "โครงสร้าง {0} ที่การทำนายนี้เป็นของ ไม่อยู่ในแบบวาดแล้ว",
+ "110": "แบบวาด {0} ถูกปิดแล้ว",
+ "111": "เคมิคัลชิฟต์ (ppm)",
+ "112": "เวลา (s)",
+ "113": "รีเฟลกแตนซ์",
+ "114": "ความอุดมสัมพัทธ์",
+ "115": "พบ ##{0}= มากกว่าหนึ่งครั้ง; เก็บค่าแรกไว้",
+ "116": "##XYDATA={0} ไม่ใช่รายการตัวแปรที่รู้จัก; อ่านเป็น (X++(Y..Y))",
+ "117": "##{0}={1} ไม่ใช่รายการตัวแปรที่รู้จัก; อ่านเป็น (XY..XY)",
+ "118": "จุดไม่ได้เรียงตามค่า x จึงเรียงใหม่",
+ "119": "อ่าน ##.SHIFT REFERENCE={0} ไม่ได้; ไม่ได้อ้างอิงค่าเคมิคัลชิฟต์",
+ "120": "##.SHIFT REFERENCE ระบุจุด {0} ซึ่งอยู่นอกช่วง {1} จุด; ไม่ได้อ้างอิงค่าเคมิคัลชิฟต์",
+ "121": "อ้างอิงค่าเคมิคัลชิฟต์ให้จุด {0} อ่านได้ {1} ppm ({2})",
+ "122": "ไฟล์ไม่ระบุนิวเคลียสที่สังเกต",
+ "123": "นี่คือข้อมูล NMR โดเมนเวลา (FID); แสดงตามที่วัดได้ โดยไม่แปลงฟูเรียร์",
+ "124": "นำความถี่ใน Hz หารด้วยความถี่สังเกต ({0} MHz) เพื่อให้ได้ ppm",
+ "125": "ไม่มี ##.SHIFT REFERENCE; ถือ 0 Hz เป็น 0 ppm",
+ "126": "ไม่มี ##.OBSERVE FREQUENCY แกนเคมิคัลชิฟต์จึงคงเป็น Hz",
+ "127": "ทรานสมิตแตนซ์ถูกเก็บเป็นเศษส่วน และแสดงเป็นเปอร์เซ็นต์",
+ "128": "บล็อก {0} มีมากกว่า {1} จุด",
+ "129": "##DATA TYPE={0} ที่มีหน่วยแกน x เป็น {1} ไม่ตรงกับเทคนิคที่รู้จัก; วาดเป็นสเปกตรัมธรรมดา",
+ "130": "##BLOCKS={0} แต่บล็อก LINK มี {1} บล็อก; อ่านทุกบล็อกที่พบ",
+ "131": "นี่ไม่ใช่ไฟล์ JCAMP-DX: ไม่มีเรคอร์ด ##TITLE=",
+ "132": "ไฟล์มี {0} บล็อกต่อกันโดยไม่มีบล็อก LINK; อ่านทีละบล็อก",
+ "133": "สองบล็อกใช้ ##BLOCK_ID เดียวกัน",
+ "134": "ไฟล์ไม่มีสเปกตรัมที่ FormChem วาดได้ ({0})",
+ "135": "ไม่ได้วาดบล็อก \"{0}\": {1}",
+ "136": "เป็นบล็อกโครงสร้าง (JCAMP-CS); เก็บไว้ในไฟล์แต่ไม่วาด",
+ "137": "ไม่มี XYDATA, XYPOINTS, PEAK TABLE หรือ NTUPLES",
+ "138": "ตารางข้อมูลไม่มีจุดเลย",
+ "139": "ตาราง NTUPLES ไม่ได้ประกาศสัญลักษณ์",
+ "140": "ยังไม่รองรับสเปกตรัม NTUPLES 2 มิติ",
+ "141": "ตาราง NTUPLES ไม่มีหน้าที่อ่านได้",
+ "142": "ไฟล์มีอักขระนอก ASCII; อ่านเป็น UTF-8",
+ "143": "ไฟล์มีไบต์ที่ไม่ใช่ ASCII หรือ UTF-8; อ่านเป็น Latin-1",
+ "144": "ข้ามบรรทัดที่อยู่นอกเรคอร์ดข้อมูลที่มีป้ายกำกับ",
+ "145": "ข้าม ##END= ที่ไม่มีบล็อกอยู่ก่อนหน้า",
+ "146": "ข้ามเรคอร์ดก่อน ##TITLE= แรกหรือหลัง ##END= สุดท้าย",
+ "147": "ไฟล์จบโดยไม่มี ##END=; ปิดบล็อกที่ยังเปิดอยู่",
+ "148": "หน้า NTUPLES {0}",
+ "149": "หน้า NTUPLES {0} ไม่มี ##DATA TABLE=; ข้ามไป",
+ "150": "หน้า NTUPLES {0} ใช้สัญลักษณ์ ({1}) ที่ไม่ได้ประกาศใน ##SYMBOL=; ข้ามไป",
+ "151": "{0} มีรูปแบบตารางข้อมูลที่ FormChem อ่านไม่ได้ ({1}); ข้ามไป",
+ "152": "ตาราง NTUPLES ไม่มี ##END NTUPLES=; อ่านจนสุดบล็อก",
+ "153": "ตาราง NTUPLES ไม่มีรายการ ##SYMBOL=",
+ "154": "นี่คือสเปกตรัม 2 มิติ (ตัวแปรอิสระสองตัว); เวอร์ชันนี้ไม่วาดสเปกตรัม 2 มิติ",
+ "155": "ตาราง NTUPLES มี {0} หน้า; อ่านเพียง {1} หน้าแรก",
+ "156": "หน้าส่วนจินตภาพไม่ใช้ค่า x ร่วมกับหน้าส่วนจริง; ตัดออก",
+ "157": "ตาราง NTUPLES มี {0} หน้า; แสดงหน้า {1} และตัดอีก {2} หน้าออก",
+ "158": "##DELTAX={0} ต่างจาก (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; ใช้ระยะห่างที่คำนวณได้",
+ "159": "{0} ไม่มี FIRSTX, LASTX และ NPOINTS ครบ; ระยะห่างมาจาก ##DELTAX",
+ "160": "บรรทัดข้อมูลขึ้นต้นด้วยค่า DIF; ต่อจากค่าสุดท้ายของบรรทัดก่อนหน้า",
+ "161": "ค่าตรวจสอบ Y ไม่ตรงกับค่าสุดท้ายของบรรทัดก่อนหน้า; ต่อบรรทัดจากค่าก่อนหน้า",
+ "162": "อ่านอักขระ {0} ตัวใน {1} ไม่ได้และข้ามไป",
+ "163": "บรรทัด DIF {0} บรรทัดไม่มีค่าตรวจสอบ Y ตามมา",
+ "164": "{0} ไม่มีจุดข้อมูล",
+ "165": "{0} มี {1} จุด แต่ ##NPOINTS={2}; ค่า X ของบรรทัดพอดีกับ {3} จุดจาก FIRSTX ถึง LASTX จึงใช้ระยะห่างนั้น",
+ "166": "{0} มี {1} จุด แต่ ##NPOINTS={2}; เก็บจุดที่อ่านได้ไว้",
+ "167": "ค่า X ของบรรทัดไม่ตรงกับตำแหน่งจาก FIRSTX และระยะห่าง; ใช้ตำแหน่งที่คำนวณได้",
+ "168": "{0} ไม่มี FIRSTX, LASTX และ NPOINTS; ระยะห่างมาจากค่า X ของบรรทัด",
+ "169": "{0} ไม่มีวิธีวางจุดบนแกน x; จึงกำหนดหมายเลข 0, 1, 2 เป็นต้นให้จุด",
+ "170": "บรรทัดแรกเริ่มที่ x = {0} แต่ ##FIRSTX={1}; ใช้ FIRSTX",
+ "171": "ค่า Y แรก {0} ไม่ตรงกับ ##FIRSTY={1}",
+ "172": "{0} จบด้วยกลุ่มค่า {1} ค่าที่ไม่สมบูรณ์; ตัดทิ้ง",
+ "173": "อ่าน {0} ไม่ได้: {1}",
+ "174": "สเปกตรัมขอบล็อก {0} แต่ไฟล์มีเพียง 1 บล็อก",
+ "175": "สเปกตรัมขอบล็อก {0} แต่ไฟล์มี {1} บล็อก",
+ "176": "สเปกตรัมไม่มีแหล่งที่มา",
+ "177": "ไฟล์ {0} ของสเปกตรัมไม่อยู่ในแบบวาด",
+ "178": "เอนจินนี้ไม่มีตัวทำนายสำหรับ {0}",
+ "179": "การทำนายล้มเหลว: {0}",
+ "180": "แหล่งที่มาของสเปกตรัมไม่ใช่ทั้งไฟล์และการทำนาย",
+ "181": "แบบวาดไม่มีสเปกตรัม {0}",
+ "182": "สเปกตรัมแบบแท่งไม่มีพื้นที่ให้อินทิเกรต",
+ "183": "ค่าต้องมากกว่าศูนย์",
+ "184": "from และ to ต้องเป็นค่า x สองค่าที่ต่างกัน",
+ "185": "สเปกตรัมไม่มีอินทิกรัล {0}",
+ "186": "สเปกตรัมนี้ไม่มีไฟล์ต้นฉบับ; ส่งออกโดยไม่ใส่ original=1",
+ "187": "FormChem วางได้เฉพาะรูปภาพ PNG, JPEG, GIF, WebP และ SVG และสเปกตรัม JCAMP-DX"
+}
diff --git a/frontend/src/i18n/locales/th/part14.json b/frontend/src/i18n/locales/th/part14.json
new file mode 100644
index 00000000..80e3edf2
--- /dev/null
+++ b/frontend/src/i18n/locales/th/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "การแสดงผล",
+ "1": "พื้นผิว",
+ "2": "ไม่มีอะไรให้ส่งออก: มุมมอง 3D ว่างเปล่า",
+ "3": "ส่งออกไม่สำเร็จ",
+ "4": "เลือกโครงสร้างที่จะแสดงแบบ 3D",
+ "5": "สร้าง 3D",
+ "6": "แทรกมุมมอง 3D",
+ "7": "เลือกไฟล์ PDB, mmCIF, SDF หรือ MOL",
+ "8": "ไม่สามารถวางโครงสร้าง 3D บนหน้าได้",
+ "9": "เลือกวัตถุ 3D ที่เปิดจากไฟล์ PDB หรือ mmCIF",
+ "10": "โมเดลนี้ไม่มีลิแกนด์",
+ "11": "ไม่สามารถดึงลิแกนด์ออกมาได้",
+ "12": "ยังไม่มีพิกัด 3D: สร้าง 3D จะสร้างคอนฟอร์เมอร์จากแบบวาด",
+ "13": "ไฟล์โครงสร้าง 3D...",
+ "14": "ดึงลิแกนด์...",
+ "15": "ส่งออกโครงสร้าง 3D...",
+ "16": "สแกนไดฮีดรัล...",
+ "17": "วัดใน 3D",
+ "18": "ส่งออกมุมมอง 3D เป็น PNG...",
+ "19": "ส่งออกมุมมอง 3D เป็น glTF...",
+ "20": "ดึงออกมาแล้ว {0}: {1} (อนุมานอันดับพันธะ)",
+ "21": "ดึงออกมาแล้ว {0}: {1}",
+ "22": "เปิดมุมมอง 3D ก่อน",
+ "23": "เปิดแผงมุมมอง 3D สำหรับโครงสร้างที่เลือก (หรือวัตถุ 3D ที่เลือกบนหน้า) และตามการเลือก โครงสร้างต้องมีพิกัด 3D ก่อน: สร้าง 3D จะสร้างให้",
+ "24": "สร้างคอนฟอร์เมอร์ 3D ของโครงสร้างที่เลือกจากแบบวาด 2D (คงลิ่ม เรขาคณิตพันธะคู่ และประจุไว้) ทำให้พลังงานต่ำสุดด้วยสนามแรงที่เลือก และเก็บไว้ในแบบวาด เลิกทำได้หนึ่งขั้น มุมมอง 3D จะแสดงคอนฟอร์เมอร์นั้น",
+ "25": "ทำให้คอนฟอร์เมอร์ที่แสดงของโครงสร้างที่เลือกมีพลังงานต่ำสุดด้วยสนามแรงที่เลือกในมุมมอง 3D (ค่าเริ่มต้น MMFF94 ใช้ UFF เมื่อ MMFF94 ไม่มีพารามิเตอร์) และรายงานพลังงานก่อนและหลัง เลิกทำได้หนึ่งขั้น",
+ "26": "สร้างชุดคอนฟอร์เมอร์ของโครงสร้างที่เลือก (ETKDG ตัดตาม RMSD ทำให้แต่ละตัวมีพลังงานต่ำสุด) และเก็บตัวที่อยู่ในช่วงพลังงาน; ถ้าระบุ n, window และ method จะทำงานโดยไม่เปิดกล่องโต้ตอบ",
+ "27": "จำนวนคอนฟอร์เมอร์ที่จะสร้าง",
+ "28": "ช่วงพลังงานเป็น kcal/mol",
+ "29": "วางมุมมอง 3D ของโครงสร้างที่เลือกไว้บนหน้าข้างกัน (สร้างพิกัด 3D ก่อนถ้ายังไม่มี) และเปิดแผงมุมมอง 3D ที่ผูกกับมัน; การหมุนหรือเปลี่ยนสไตล์ของโมเดลจะอัปเดตภาพบนหน้า",
+ "30": "เปิดไฟล์ PDB, mmCIF, SDF หรือ MOL เป็นวัตถุ 3D บนหน้า (โปรตีนเป็นการ์ตูน ลิแกนด์เป็นบอลแอนด์สติก ซ่อนน้ำ โฟกัสที่ลิแกนด์) และแสดงในมุมมอง 3D",
+ "31": "เปลี่ยนลิแกนด์ของวัตถุ 3D ที่เลือก (เปิดจากไฟล์ PDB หรือ mmCIF) เป็นโครงสร้าง 2D ข้างกัน เลิกทำได้หนึ่งขั้น: อันดับพันธะมาจากแม่แบบในตัวสำหรับลิแกนด์ทั่วไป มิฉะนั้นอนุมานจากเรขาคณิตและรายงานไว้ พิกัดจากไฟล์กลายเป็นคอนฟอร์เมอร์ของมัน ถ้าระบุ ligand จะใช้ตัวนั้น ถ้าไม่ระบุและโมเดลมีหลายตัวจะถาม",
+ "32": "คีย์ลิแกนด์ chain:het:number หรือรหัส het",
+ "33": "เลือกวัตถุ 3D ที่เปิดจากไฟล์ PDB หรือ mmCIF",
+ "34": "บันทึกพิกัด 3D ของโครงสร้างที่เลือกพร้อมไฮโดรเจนทุกตัว: MDL molfile (คอนฟอร์เมอร์ที่แสดง), ไฟล์ SD (ทุกคอนฟอร์เมอร์ พร้อมฟิลด์ข้อมูลพลังงานและวิธี), PDB หรือ XYZ (คอนฟอร์เมอร์ที่แสดง หรือทุกคอนฟอร์เมอร์เป็นโมเดลหรือเฟรม); วัตถุ 3D ที่เปิดจากไฟล์ PDB หรือ mmCIF จะบันทึกไฟล์ต้นฉบับ ถ้าไม่ระบุ format จะถาม",
+ "35": "รูปแบบไฟล์",
+ "36": "ทุกคอนฟอร์เมอร์แทนที่จะเป็นเฉพาะที่แสดง (ค่าเริ่มต้นเป็น true สำหรับ sdf)",
+ "37": "สแกนมุมไดฮีดรัลของสี่อะตอมที่เลือกในมุมมอง 3D (หรือการวัดไดฮีดรัลล่าสุด) ด้วยการทำให้พลังงานต่ำสุดแบบผ่อนคลาย และพล็อตมุมเทียบกับพลังงาน",
+ "38": "วัดระยะ (สองอะตอม) มุม (สาม) หรือไดฮีดรัล (สี่) ในมุมมอง 3D และแสดงรายการ; ถ้าระบุ atoms (id อะตอมของชิ้นส่วน เช่น a1 ไฮโดรเจนเป็น a1:h0 หรือหมายเลขลำดับ PDB) จะวัดอะตอมเหล่านั้น มิฉะนั้นสลับไปโหมดเลือก",
+ "39": "id อะตอมสองถึงสี่ตัว",
+ "40": "บันทึกมุมมอง 3D เป็นภาพ PNG ตามขนาดบนหน้าจอ; transparent จะตัดพื้นหลังออก",
+ "41": "บันทึกมุมมอง 3D เป็นไฟล์ glTF 2.0 แบบไบนารี (.glb): อะตอมเป็นทรงกลมและพันธะเป็นทรงกระบอกตามสีของธาตุ 1 อังสตรอม = 1 cm สำหรับตัวดู 3D สไลด์ และการพิมพ์",
+ "42": "ไม่มีพื้นผิว",
+ "43": "เอาพื้นผิวโมเลกุลออกจากมุมมอง 3D",
+ "44": "พื้นผิวแวนเดอร์วาลส์",
+ "45": "แสดงพื้นผิวแวนเดอร์วาลส์ในมุมมอง 3D",
+ "46": "พื้นผิวที่ตัวทำละลายเข้าถึงได้",
+ "47": "แสดงพื้นผิวที่ตัวทำละลายเข้าถึงได้ (โพรบ 1.4 อังสตรอม) ในมุมมอง 3D",
+ "48": "พื้นผิวที่ตัวทำละลายเข้าไม่ได้",
+ "49": "แสดงพื้นผิวที่ตัวทำละลายเข้าไม่ได้ในมุมมอง 3D",
+ "50": "พื้นผิวระบายสี ESP",
+ "51": "ระบายสีพื้นผิวตามศักย์ไฟฟ้าสถิตโดยประมาณจากประจุบางส่วนเชิงประสบการณ์ของเอนจิน (แดงคือลบ น้ำเงินคือบวก) พร้อมคำอธิบายสีที่ระบุวิธี",
+ "52": "แสดงมุมมอง 3D แบบสไตล์ลวด; สำหรับวัตถุ 3D บนหน้า ตัวเลือกจะถูกบันทึกไปกับวัตถุ",
+ "53": "แสดงมุมมอง 3D แบบสไตล์แท่ง; สำหรับวัตถุ 3D บนหน้า ตัวเลือกจะถูกบันทึกไปกับวัตถุ",
+ "54": "บอลแอนด์สติก",
+ "55": "แสดงมุมมอง 3D แบบสไตล์บอลแอนด์สติก; สำหรับวัตถุ 3D บนหน้า ตัวเลือกจะถูกบันทึกไปกับวัตถุ",
+ "56": "ทรงกลมเต็มพื้นที่",
+ "57": "แสดงมุมมอง 3D แบบสไตล์ทรงกลมเต็มพื้นที่; สำหรับวัตถุ 3D บนหน้า ตัวเลือกจะถูกบันทึกไปกับวัตถุ",
+ "58": "การ์ตูน",
+ "59": "แสดงมุมมอง 3D แบบสไตล์การ์ตูน (โปรตีนและกรดนิวคลีอิก; ลิแกนด์ยังเป็นบอลแอนด์สติก); สำหรับวัตถุ 3D บนหน้า ตัวเลือกจะถูกบันทึกไปกับวัตถุ",
+ "60": "มุมไดฮีดรัล (องศา)",
+ "61": "พลังงานสัมพัทธ์ (kcal/mol)",
+ "62": "ต่ำสุด {0}°",
+ "63": "ส่งออกโครงสร้าง 3D",
+ "64": "ทุกคอนฟอร์เมอร์ (เรคอร์ด SDF โมเดล PDB เฟรม XYZ)",
+ "65": "เก็บคอนฟอร์เมอร์ 1 ตัว; ไฮโดรเจนทุกตัวถูกเขียนพร้อมตำแหน่ง 3D",
+ "66": "ดึงลิแกนด์",
+ "67": "ลิแกนด์",
+ "68": "ลิแกนด์จะกลายเป็นโครงสร้าง 2D ข้างโมเดล โดยพิกัดจากไฟล์ยังคงเป็นคอนฟอร์เมอร์ของมัน",
+ "69": "ดึงออก",
+ "70": "ไฟล์ SD (.sdf)",
+ "71": "MDL Molfile (.mol)",
+ "72": "เก็บคอนฟอร์เมอร์ {0} ตัว; ไฮโดรเจนทุกตัวถูกเขียนพร้อมตำแหน่ง 3D",
+ "73": "คอนฟอร์เมอร์",
+ "74": "ช่วงพลังงาน (kcal/mol)",
+ "75": "การฝัง ETKDG ด้วยซีดคงที่ ตัดตัวที่ซ้ำกันเกือบทั้งหมดที่ RMSD อะตอมหนัก 0.5 Å แล้วทำให้แต่ละตัวมีพลังงานต่ำสุด; ตัวที่ต่ำสุดจะเป็นคอนฟอร์เมอร์ที่แสดง",
+ "76": "สร้าง",
+ "77": "โพรไฟล์พลังงานของการสแกนไดฮีดรัล",
+ "78": "สแกนไดฮีดรัล",
+ "79": "จาก (องศา)",
+ "80": "ถึง (องศา)",
+ "81": "ขั้น (องศา)",
+ "82": "เก็บแต่ละจุดเป็นคอนฟอร์เมอร์ (เลิกทำได้หนึ่งขั้น)",
+ "83": "เริ่มสแกน",
+ "84": "การสแกนแบบผ่อนคลาย: ที่แต่ละมุมจะตรึงไดฮีดรัลไว้และทำให้ส่วนอื่นทั้งหมดมีพลังงานต่ำสุด",
+ "85": "มุมสิ้นสุดต้องมากกว่ามุมเริ่มต้น",
+ "86": "กำลังสแกน...",
+ "87": "สแกนไม่สำเร็จ",
+ "88": "กำแพงพลังงาน {0} kcal/mol",
+ "89": "สไตล์การแสดงผล",
+ "90": "ระบายสีพื้นผิวตามศักย์ไฟฟ้าสถิตจากประจุบางส่วนเชิงประสบการณ์",
+ "91": "ESP",
+ "92": "ทำพลังงานต่ำสุด",
+ "93": "สแกน...",
+ "94": "โฟกัสลิแกนด์",
+ "95": "รีเซ็ตมุมมอง",
+ "96": "หมุน",
+ "97": "ส่งออกมุมมอง 3D",
+ "98": "วัด",
+ "99": "ค่าที่วัด",
+ "100": "ภาพ PNG",
+ "101": "ภาพ PNG พื้นหลังโปร่งใส",
+ "102": "glTF ไบนารี (.glb)",
+ "103": "3D ต้องใช้ WebGL ซึ่งหน้าต่างนี้ไม่รองรับ",
+ "104": "กำลังโหลดตัวดู 3D...",
+ "105": "โหลดตัวดู 3D ไม่ได้",
+ "106": "เปิดแบบวาดและเลือกโครงสร้างเพื่อดูแบบ 3D",
+ "107": "เลือกโครงสร้างบนหน้าเพื่อดูแบบ 3D",
+ "108": "ไม่สามารถอ่านโครงสร้าง 3D ได้",
+ "109": "คอนฟอร์เมอร์นี้เขียนเป็น molfile ไม่ได้",
+ "110": "การหมุนปิดอยู่: ระบบขอให้ลดการเคลื่อนไหว",
+ "111": "โมเดล PDB หรือ CIF ไม่มีคอนฟอร์เมอร์",
+ "112": "พลังงานเทียบกับค่าต่ำสุด; คลิกที่รายการเพื่อแสดง",
+ "113": "สร้าง 3D หรือ คอนฟอร์เมอร์... จะเติมรายการนี้",
+ "114": "ไม่มีประจุบางส่วน",
+ "115": "เอนจินยังไม่มีเส้นทาง 3D",
+ "116": "ยังไม่ลู่เข้า",
+ "117": "เลือกสี่อะตอมที่ต่อกันเป็นแถว (ไดฮีดรัล) แล้วสแกน",
+ "118": "ติ๊ก เก็บแต่ละจุดเป็นคอนฟอร์เมอร์ เพื่อดูรูปทรง",
+ "119": "แสดงคอนฟอร์เมอร์",
+ "120": "อัปเดตมุมมอง 3D",
+ "121": "ไม่สามารถอัปเดตภาพสแนปช็อตของหน้าได้",
+ "122": "ไม่มีพื้นผิว",
+ "123": "แวนเดอร์วาลส์",
+ "124": "ตัวทำละลายเข้าถึงได้",
+ "125": "ตัวทำละลายเข้าไม่ได้",
+ "126": "ระยะ",
+ "127": "มุม",
+ "128": "ไดฮีดรัล",
+ "129": "{0} kcal/mol, {1}, ยังไม่ลู่เข้า",
+ "130": "เลือกแล้ว {0} / {1}: {2}",
+ "131": "คลิก {0} อะตอมเพื่อวัด",
+ "132": "ESP ({0}): {1}, แดง {2} e ถึงน้ำเงิน +{3} e",
+ "133": "ระยะ {0}: {1}",
+ "134": "มุม {0}: {1}",
+ "135": "ไดฮีดรัล {0}: {1}",
+ "136": "สร้างแล้ว: {0}",
+ "137": "ทำพลังงานต่ำสุดแล้ว: {0}",
+ "138": "เก็บคอนฟอร์เมอร์ {0} จาก {1} ตัว",
+ "139": "เก็บคอนฟอร์เมอร์ {0} ตัว",
+ "140": "ไดฮีดรัล {0}",
+ "141": "การเข้ารหัส PNG ไม่สำเร็จ"
+}
diff --git a/frontend/src/i18n/locales/th/part15.json b/frontend/src/i18n/locales/th/part15.json
new file mode 100644
index 00000000..0d7fef8f
--- /dev/null
+++ b/frontend/src/i18n/locales/th/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "โดยประมาณ จากประจุเชิงประสบการณ์",
+ "1": "มี {0} ศูนย์สเตอริโอหรือพันธะคู่ที่ไม่ได้ระบุ; เลือกการจัดเรียงหนึ่งแบบ",
+ "2": "ป้ายสเตอริโอ {0} รายการของแบบวาดไม่ถูกสร้างซ้ำใน 3D",
+ "3": "สร้างสมาชิกที่วาดไว้ของกลุ่มสเตอริโอขั้นสูง {0}; โมเดล 3D เป็นสเตอริโอไอโซเมอร์หนึ่งตัวของสารผสม (สัมพัทธ์หรือราซีมิก) ที่แบบวาดอธิบาย",
+ "4": "ฝัง {0} ครั้ง (ซีด {1}) เพื่อคงสเตอริโอที่วาดไว้",
+ "5": "อะตอมหนัก {0} คู่อยู่ใกล้กันกว่า {1} ของระยะสัมผัสแวนเดอร์วาลส์",
+ "6": "ใช้สนามแรงสากล (UFF): {0}",
+ "7": "ไม่มีพารามิเตอร์ {0} สำหรับ {1}",
+ "8": "{0} กำหนดชนิดให้ทุกอะตอมไม่ได้",
+ "9": "คอนฟอร์เมอร์ {0} ตัวเปลี่ยนสเตอริโอที่วาดไว้ระหว่างการทำพลังงานต่ำสุด จึงถูกตัดออก",
+ "10": "อะตอมหนักเกิน 300 อะตอม: คุณภาพการสุ่มตัวอย่างคอนฟอร์เมอร์ลดลงที่ขนาดนี้",
+ "11": "พันธะกลางอยู่ในวง; วงจะถูกบีบให้ตามมุม",
+ "12": "โครงสร้างไม่มีพิกัด 3D; การสแกนเริ่มจากการฝังใหม่",
+ "13": "โครงสร้างเปลี่ยนไประหว่างคำนวณ 3D; รันคำสั่งอีกครั้ง",
+ "14": "แบบวาดไม่มีวัตถุ {0}",
+ "15": "{0} ยังไม่มีพิกัด 3D; สร้าง 3D ก่อน",
+ "16": "{0} ไม่มีคอนฟอร์เมอร์ {1}",
+ "17": "โครงสร้างไม่มีอะตอม",
+ "18": "3D ต้องใช้อะตอมจริง: {0} อะตอมเป็นป้ายชื่อ หมู่ R หรือจุดเชื่อมต่อ ({1})",
+ "19": "เพิ่มไฮโดรเจนไม่ได้: {0}",
+ "20": "โครงสร้างมี {0} อะตอมรวมไฮโดรเจน; 3D รองรับได้ถึง {1}",
+ "21": "พิกัด 3D ไม่ตรงกับโครงสร้างนี้ (ไม่มีข้อมูลสำหรับ {0}); สร้าง 3D ใหม่",
+ "22": "พิกัด 3D ไม่ตรงกับโครงสร้างนี้ (จำนวนไฮโดรเจนเปลี่ยน); สร้าง 3D ใหม่",
+ "23": "ฝังโครงสร้างใน 3D ไม่ได้: {0}",
+ "24": "ฝังโครงสร้างใน 3D ไม่ได้; ตรวจสอบเวเลนซ์และสเตอริโอ",
+ "25": "ฝังคอนฟอร์เมอร์ไม่ได้: {0}",
+ "26": "ไม่มีคอนฟอร์เมอร์ที่ฝังได้; ตรวจสอบเวเลนซ์และสเตอริโอของโครงสร้าง",
+ "27": "ทุกคอนฟอร์เมอร์ที่ฝังไว้สูญเสียสเตอริโอที่วาดไว้หลังทำพลังงานต่ำสุด",
+ "28": "ไม่มีสนามแรงใดที่มีพารามิเตอร์สำหรับโครงสร้างนี้ ({0})",
+ "29": "ตั้งค่าสนามแรงสากลไม่ได้: {0}",
+ "30": "ตั้งค่าสนามแรงสากลไม่ได้",
+ "31": "ไม่รู้จักอะตอม {0}; ใช้ id อะตอมของชิ้นส่วน หรือระบุไฮโดรเจนเป็น a1:h0",
+ "32": "ทั้งสี่อะตอมต้องต่างกัน",
+ "33": "ทั้งสี่อะตอมต้องเป็นสายของพันธะ (a1-a2-a3-a4)",
+ "34": "เขียนไฟล์ 3D ไม่ได้: {0}",
+ "35": "ไฟล์นี้ไม่ใช่ไฟล์ PDB, mmCIF, SDF หรือ MOL ที่ FormChem อ่านได้",
+ "36": "ไฟล์มีอะตอมเกิน {0} อะตอม",
+ "37": "ไฟล์ PDB ไม่มีเรคอร์ด ATOM หรือ HETATM",
+ "38": "ตาราง atom_site ของ mmCIF ไม่มีคอลัมน์ Cartn_x, Cartn_y และ Cartn_z",
+ "39": "CIF มีพิกัดเศษส่วนแต่ไม่มีหน่วยเซลล์ที่สมบูรณ์",
+ "40": "CIF ไม่มีตาราง atom_site",
+ "41": "CIF ไม่มีอะตอมที่อ่านได้",
+ "42": "ไฟล์ไม่มีเรคอร์ด",
+ "43": "ไฟล์มี {0} เรคอร์ด; การนำเข้า 3D อ่านได้ถึง {1}",
+ "44": "อ่านเรคอร์ดใดของไฟล์ไม่ได้เลย",
+ "45": "{0} ไม่ใช่ไฟล์ PDB หรือ mmCIF",
+ "46": "เปลี่ยน {0} เป็นแบบวาดของ FormChem ไม่ได้: {1}",
+ "47": "วางโมเดล PDB เป็นวัตถุ 3D แล้ว: {0}",
+ "48": "วางโมเดล mmCIF เป็นวัตถุ 3D แล้ว: {0}",
+ "49": "บรรทัด ATOM หรือ HETATM {0} บรรทัดมีพิกัดที่อ่านไม่ได้ จึงข้ามไป",
+ "50": "แถว atom_site {0} แถวมีพิกัดที่อ่านไม่ได้ จึงข้ามไป",
+ "51": "CIF ของโมเลกุลขนาดเล็ก: อ่านหน่วยอสมมาตรจากพิกัดเศษส่วน; ไม่สร้างอะตอมสมมาตรคู่",
+ "52": "{0} มีปัญหาเรื่องเวเลนซ์; อ่านโดยไม่ผ่านการซานิไทซ์",
+ "53": "{0} มีเฉพาะพิกัด 2D; ไม่ได้เก็บคอนฟอร์เมอร์ไว้",
+ "54": "ไฮโดรเจน {0} อะตอมไม่อยู่ในไฟล์ จึงวางตามเรขาคณิต",
+ "55": "อ่าน {0} ไม่ได้: {1}",
+ "56": "อ่าน {0} ไม่ได้",
+ "57": "เรคอร์ด {0}",
+ "58": "โครงสร้าง",
+ "59": "เก็บพิกัด 3D ของไฟล์ไว้เป็นคอนฟอร์เมอร์ของ 1 โครงสร้าง; ไม่ต้องสร้าง 3D เพื่อดู",
+ "60": "เก็บพิกัด 3D ของไฟล์ไว้เป็นคอนฟอร์เมอร์ของ {0} โครงสร้าง; ไม่ต้องสร้าง 3D เพื่อดู",
+ "61": "{0} เป็นไอออนเดี่ยว; ไม่มีโครงสร้างให้ดึง",
+ "62": "อ่านอะตอมของ {0} ไม่ได้",
+ "63": "ไม่มีลิแกนด์ {0} ในโครงสร้าง; ลิแกนด์ที่มี: {1}",
+ "64": "แบบวาดไม่มีโมเดล 3D {0}",
+ "65": "FormChem วางได้เฉพาะรูปภาพ PNG, JPEG, GIF, WebP และ SVG สเปกตรัม JCAMP-DX และไฟล์โครงสร้าง PDB, mmCIF, SDF และ MOL"
+}
diff --git a/frontend/src/i18n/locales/tr/part12.json b/frontend/src/i18n/locales/tr/part12.json
new file mode 100644
index 00000000..7e1a2406
--- /dev/null
+++ b/frontend/src/i18n/locales/tr/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Spektrum",
+ "1": "Adını görmek için bir yapı çizin veya seçin.",
+ "2": "Adlar hesaplanamadı",
+ "3": "FormChem'in bu yapı için bir adı yok.",
+ "4": "Adı Kopyala",
+ "5": "Ad kopyalandı: {0}",
+ "6": "Eklenecek kimyasal ad; iletişim kutusunu açmak için boş bırakın",
+ "7": "Seçili yapının (veya sayfadaki yapıların) adını düz metin olarak kopyalar: FormChem biliyorsa yaygın ad, yoksa sistematik ad; sistematik ad yalnızca aynı yapıya geri okunuyorsa sunulur.",
+ "8": "trivial veya systematic: hangi adın kopyalanacağı; ilkini almak için boş bırakın",
+ "9": "Öngörülen spektrum güncel.",
+ "10": "Öngörülen Spektrumu Yenile",
+ "11": "Önce bir yapı seçin",
+ "12": "Önce öngörülen bir spektrum seçin",
+ "13": "Öngörülen 1H NMR spektrumu eklendi ({0})",
+ "14": "Öngörülen 13C NMR spektrumu eklendi ({0})",
+ "15": "Öngörülen spektrum yenilendi ({0})",
+ "16": "Yapının parça kimliği; varsayılan seçili yapı veya sayfadaki tek yapı",
+ "17": "Spektrometre frekansı, MHz cinsinden (varsayılan 1H için 400, 13C için 100)",
+ "18": "Seçili yapının yanına, tek bir geri alma adımı olarak, öngörülen bir 1H NMR spektrumu ekler: FormChem'in kendi artım kurallarıyla (kimyasal kayma veritabanı yok) hesaplanmış, multipletleri ve integralleri yapının atomlarına bağlı, başlığında yöntem, sürüm ve frekans bulunan bir spektrum nesnesi. Eğri her seferinde yapıdan yeniden hesaplanır, hiçbir zaman saklanmaz.",
+ "19": "Seçili yapının yanına, tek bir geri alma adımı olarak, öngörülen bir 13C NMR spektrumu ekler: FormChem'in kendi artım kurallarıyla (kimyasal kayma veritabanı yok) hesaplanmış, pikleri yapının atomlarına bağlı, başlığında yöntem, sürüm ve frekans bulunan bir spektrum nesnesi. Eğri her seferinde yapıdan yeniden hesaplanır, hiçbir zaman saklanmaz.",
+ "20": "Spektrum öngörülemedi",
+ "21": "1H NMR Spektrumu Öngör",
+ "22": "13C NMR Spektrumu Öngör",
+ "23": "Yapısı değiştikten sonra öngörülen bir spektrumun multipletlerini, integrallerini veya piklerini çalışan öngörücü sürümüyle, tek bir geri alma adımı olarak yeniden hesaplar; güncelse hiçbir şey değişmez.",
+ "24": "Öngörülen spektrum kimliği; varsayılan seçili olan veya Spektrum düzenleyicisinde açık olan",
+ "25": "Spektrum yenilenemedi",
+ "26": "Bu aralıkta yeni pik yok.",
+ "27": "İntegre etmek için Spektrum düzenleyicisinde bir aralık üzerinde sürükleyin.",
+ "28": "Piki Atomlara Bağla",
+ "29": "Pikin Bağlantısını Kaldır",
+ "30": "Spektrum Y Ekseni",
+ "31": "Dosyadan Spektrum...",
+ "32": "Spektrumu Düzenle...",
+ "33": "Pikleri Seç",
+ "34": "İntegre Et",
+ "35": "Geçirgenlik veya Absorbans",
+ "36": "Spektrumu Dışa Aktar...",
+ "37": "Önce bir spektrum seçin",
+ "38": "bu kimlikle spektrum yok: {0}",
+ "39": "Seçilen pik: {0} (zaten vardı: {1})",
+ "40": "Seçilen pik: {0}",
+ "41": "İntegraller NMR spektrumları içindir",
+ "42": "Önce Spektrum düzenleyicisinde bir pik, integral veya multiplet seçin",
+ "43": "Tüm atomlar aynı yapıya ait olmalıdır",
+ "44": "Yalnızca IR, Raman ve UV-Vis spektrumları geçirgenlik ile absorbans arasında geçiş yapar",
+ "45": "Dışa aktarıldı: {0}",
+ "46": "Spektrum nesnesi kimliği; varsayılan seçili spektrum veya Spektrum düzenleyicisinde açık olan",
+ "47": "Bir JCAMP-DX spektrum dosyasını etkin çizime aktarır (her veri bloğu için bir spektrum nesnesi, dosya bayt bayt korunur), dosya başına tek bir geri alma adımı olarak. path verilmezse bir dosya iletişim kutusu açar.",
+ "48": "Bir .jdx, .dx veya .jcamp dosyasının mutlak yolu",
+ "49": "Spektrum içe aktarılamadı",
+ "50": "Seçili spektrum için Spektrum düzenleyicisini açar (üzerine çift tıklamayla aynı).",
+ "51": "Spektrum açılamadı",
+ "52": "Bir spektrumun piklerini bir aralıkta (varsayılan gösterilen aralık) bulur ve zaten olanları atlayarak pik listesine ekler, tek bir geri alma adımı olarak.",
+ "53": "Aralığın başı, x birimiyle (cm-1, nm, m/z, ppm)",
+ "54": "Aralığın sonu, x birimiyle",
+ "55": "İsteğe bağlı algılama eşiği, y birimiyle",
+ "56": "Pik listesine eklemek yerine listeyi değiştir",
+ "57": "Pikler seçilemedi",
+ "58": "Bir aralık üzerine, mevcut integraller gibi ölçeklenmiş (veya value değerine, geri kalanları yeniden ölçeklenerek) bir NMR integrali ekler, tek bir geri alma adımı olarak. from ve to olmadan Spektrum düzenleyicisini integral aracına geçirir.",
+ "59": "Aralığın başı, ppm cinsinden",
+ "60": "Aralığın sonu, ppm cinsinden",
+ "61": "Bu integralin göstermesi gereken değer, örneğin proton sayısı",
+ "62": "İntegre edilemedi",
+ "63": "Bir pik, integral veya multipleti bir yapının atomlarına bağlar, tek bir geri alma adımı olarak. atoms olmadan seçili atomları kullanır veya kişinin çizimde atomlara tıklamasını bekler.",
+ "64": "Pik, integral veya multiplet kimliği; varsayılan Spektrum düzenleyicisinde seçili olan",
+ "65": "Atomların ait olduğu yapının (parçanın) kimliği",
+ "66": "Atom kimlikleri",
+ "67": "Pik bağlanamadı",
+ "68": "Bir pik, integral veya multipletin atom bağlantısını kaldırır, tek bir geri alma adımı olarak.",
+ "69": "Pikin bağlantısı kaldırılamadı",
+ "70": "Bir IR, Raman veya UV-Vis spektrumunu geçirgenlik veya absorbans olarak gösterir (mode olmadan geçiş yapar), tek bir geri alma adımı olarak.",
+ "71": "Gösterilecek Y ekseni; geçiş yapmak için boş bırakın",
+ "72": "Y ekseni değiştirilemedi",
+ "73": "Bir spektrumu motor aracılığıyla JCAMP-DX (pikleri varsa pik tablosuyla) veya her noktanın CSV'si olarak kaydeder.",
+ "74": "Dosya biçimi, varsayılan jdx",
+ "75": "jdx ile: içe aktarılan özgün dosya olduğu gibi",
+ "76": "Yazılacak mutlak yol; sormak için boş bırakın",
+ "77": "Spektrum dışa aktarılamadı",
+ "78": "Dosyadan Spektrum Ekle",
+ "79": "Dosyada FormChem'in çizebileceği bir spektrum yok",
+ "80": "Spektrum Ekle",
+ "81": "Spektrum yerleştirilemedi: dosyası çizime ulaşmadı.",
+ "82": "Eklenen spektrum: {0}",
+ "83": "Dalga boyu (µm)",
+ "84": "Dalga sayısı (cm⁻¹)",
+ "85": "Raman kayması (cm⁻¹)",
+ "86": "Dalga boyu (nm)",
+ "87": "Frekans (Hz)",
+ "88": "δ (ppm)",
+ "89": "Geçirgenlik (%)",
+ "90": "Geçirgenlik",
+ "91": "Absorbans",
+ "92": "Bağıl bolluk (%)",
+ "93": "Şiddet",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Öngörülen {0}, {1} MHz ({2})",
+ "100": "Öngörülen {0}, {1} MHz",
+ "101": "Öngörülen {0} ({1})",
+ "102": "Öngörülen {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Spektrum kullanılamıyor: {0}",
+ "105": "Spektrum yükleniyor",
+ "106": "Yaygın ad",
+ "107": "Sistematik",
+ "108": "Yüksek güven",
+ "109": "Orta güven",
+ "110": "Düşük güven",
+ "111": "Okunamadı",
+ "112": "FormChem adları",
+ "113": "Ad okunamadı",
+ "114": "Addan Yapı Ekle",
+ "115": "Addan Yapı",
+ "116": "Bir ad, örneğin aspirin veya 2-metilpropan-1-ol",
+ "117": "Kimyasal ad",
+ "118": "Yapısını görmek için bir ad yazın.",
+ "119": "Bu ad için yapı yok",
+ "120": "Sözlük",
+ "121": "Sistematik ayrıştırıcı",
+ "122": "Kural tabanlı adlandırıcı, gidiş dönüş denetimli",
+ "123": "Spektrum araçları",
+ "124": "Tüm spektrumu göster",
+ "125": "Y ekseni",
+ "126": "Bu aralığı sayfada göster",
+ "127": "Burada düzenlemek için çizimdeki bir spektrumu çift tıklayın.",
+ "128": "Pikler ve integraller",
+ "129": "Öngörülen",
+ "130": "İntegral değeri",
+ "131": "Atomlara Bağla",
+ "132": "Bağlantıyı Kaldır",
+ "133": "1 atom",
+ "134": "Bağlanacak atomlar",
+ "135": "Başka atomlara tıklayın, sonra Bitti'ye basın.",
+ "136": "Çizimde bu pike ait atomlara tıklayın, sonra Bitti'ye basın.",
+ "137": "Bu aralıkta integre edilecek bir şey yok.",
+ "138": "Piki Kaldır",
+ "139": "Pik Ekle",
+ "140": "1 atoma bağlandı",
+ "141": "Spektrum Aralığını Ayarla",
+ "142": "Pozitif bir sayı yazın.",
+ "143": "İntegral ayarlanamadı",
+ "144": "Kaydırma ve yakınlaştırma: kaydırmak için sürükleyin, yakınlaştırmak için tekerleği çevirin, aralığa yakınlaştırmak için Shift ile sürükleyin",
+ "145": "Aralığa yakınlaştır: grafik üzerinde sürükleyin",
+ "146": "Pik seç: bir aralık üzerinde sürükleyin",
+ "147": "Pik ekle veya kaldır: bir pikin yakınına tıklayın",
+ "148": "İntegre et: bir aralık üzerinde sürükleyin",
+ "149": "Pik",
+ "150": "İntegral",
+ "151": "Multiplet",
+ "152": "Atom sayısı: {0}",
+ "153": "Bağlandı: {0}",
+ "154": "Kaydırmak için sürükleyin, yakınlaştırmak için tekerleği çevirin, aralığa yakınlaştırmak için Shift ile sürükleyin. Seçmek için bir etikete tıklayın.",
+ "155": "O aralığa yakınlaştırmak için grafik üzerinde sürükleyin.",
+ "156": "Piklerini seçmek için bir aralık üzerinde sürükleyin.",
+ "157": "Eklemek için bir pikin yakınına tıklayın; kaldırmak için pik etiketine tıklayın.",
+ "158": "İntegre etmek için bir aralık üzerinde sürükleyin.",
+ "159": "Bağlanan atom sayısı: {0}"
+}
diff --git a/frontend/src/i18n/locales/tr/part13.json b/frontend/src/i18n/locales/tr/part13.json
new file mode 100644
index 00000000..88378ce2
--- /dev/null
+++ b/frontend/src/i18n/locales/tr/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "motor boş bir dosya döndürdü",
+ "1": "ad {0} karakterden uzun",
+ "2": "{0} atomdan büyük parçalar adlandırılmaz",
+ "3": "Yapıda adı olmayan etiketler, R grupları veya herhangi bir atom var.",
+ "4": "Yapı bir molekül olarak okunamadı (değerlikleri denetleyin).",
+ "5": "Adlandırılacak bir yapı yok.",
+ "6": "Ters dizin adları (önce ana yapı, sonra virgül ve sübstitüentler) okunmaz; adı normal sırayla yazın, örneğin 1,2-dichlorobenzene.",
+ "7": "D- ve L-, yalnızca FormChem sözlüğündeki amino asitler ve şekerler için okunur; diğer adlar için R veya S tanımlayıcıları verin.",
+ "8": "FormChem adın tamamını okudu, ancak bu tam bir yapı adı oluşturmuyor (hexane veya benzene gibi bir ana yapı ya da bir sonek eksik olabilir).",
+ "9": "FormChem adı {0}. karakterden itibaren okuyamadı (\"{1}\").",
+ "10": "FormChem adı okudu, ancak {0}.",
+ "11": "yapı tamamlanamadı",
+ "12": "Ad birden fazla şekilde okunabilir; FormChem en az varsayım gerektiren okumayı çizdi.",
+ "13": "Ad stereo tanımlayıcı vermiyor, bu yüzden stereomerkezler ve çift bağlar belirtilmemiş olarak çizildi.",
+ "14": "Sistematik ad yok: {0}.",
+ "15": "FormChem'in oluşturduğu sistematik ad aynı yapıya geri okunmadı, bu yüzden gösterilmiyor.",
+ "16": "bu çift bağ E veya Z olamaz",
+ "17": "{0} tanımlayıcı lokantı ana yapının bir konumu değil",
+ "18": "{0} konumu, E veya Z olabilecek bir çift bağ başlatmıyor",
+ "19": "{0} için cis veya trans olabilecek tam olarak bir çift bağ gerekir; bu yapıdaki sayı: {1}",
+ "20": "{0} bu çift bağ için belirsiz; bunun yerine E veya Z verin",
+ "21": "({0}) için bir lokant gerekir: yapıda {1} stereomerkez var",
+ "22": "{0} konumu bir stereomerkez değil, bu yüzden ({1}) uygulanamaz",
+ "23": "({0}) için bir lokant gerekir: yapıda E veya Z olabilecek {1} çift bağ var",
+ "24": "{0} konumunda şu verilemez: {1}",
+ "25": "bu çift bağda şu verilemez: {0}",
+ "26": "{0} hangi konfigürasyonun kastedildiğini söylemiyor, bu yüzden yapı stereo olmadan çizildi.",
+ "27": "{0} için bağlanma noktası yok",
+ "28": "{0} için yer yok, şurada: {1}",
+ "29": "{0} oraya bağlanamaz",
+ "30": "{0} karbondan uzun zincirler henüz okunmuyor",
+ "31": "{0} bir halka olamayacak kadar küçük",
+ "32": "{0}-{1}, FormChem'in henüz addan çizmediği bir tautomer",
+ "33": "{0} lokantı şu yapının bir konumu değil: {1}",
+ "34": "{0} bir zincir konumu değil",
+ "35": "çoklu bağ {0}. konumda başlayamaz, yapı: {1}",
+ "36": "{1} üzerinde {0}. konum o çoklu bağı taşıyamaz",
+ "37": "çoklu bağ için yer yok, {0}. konum, yapı: {1}",
+ "38": "çoklu bağlara yer yok: {0}",
+ "39": "{0} çoklu bağ konumları verilmedi; en düşük konumlara çizildi.",
+ "40": "-{0} için açık bir zincir gerekir; halkada sonek carbaldehyde, carboxylic acid, carbonitrile veya carboxamide olur",
+ "41": "bir zincirin yalnızca iki ucu var, sonek: -{0}",
+ "42": "{0}, iki -{1} grubu için çok kısa",
+ "43": "-{0} için yer yok, yapı: {1}",
+ "44": "{1} üzerinde -{0} konumu verilmedi; en düşük konuma çizildi.",
+ "45": "-{0} zincirin ucunda olmalı, şurada değil: {1}",
+ "46": "-{0} için yer yok, şurada: {1}",
+ "47": "orto, meta ve para için bir benzen halkası gerekir",
+ "48": "tek gruplu orto, meta veya para için phenol, aniline veya toluene gibi bir ana yapı gerekir",
+ "49": "{0} için yer yok, yapı: {1}",
+ "50": "{0} adet {1} grubu için yer yok, yapı: {2}",
+ "51": "{1} üzerinde {0} konumu verilmedi; en düşük boş konuma çizildi.",
+ "52": "{0} sübstitüent taşıyamaz",
+ "53": "bir açil grubu karbonil karbonundan bağlanır",
+ "54": "{0} için boş konum yok",
+ "55": "{0} bağlanma konumu verilmedi; {1} konumu varsayıldı.",
+ "56": "{0} için bağlanacak yer kalmadı",
+ "57": "{1} öncesindeki {0} lokantları kullanılmaz",
+ "58": "{0} ayrı bir sözcük olarak duramaz",
+ "59": "\"{0}\" öncesinde {1} grup gerektirir, addaki sayı: {2}",
+ "60": "\"{0}\" öncesinde {1} grup gerektirir, addaki sayı: {2}",
+ "61": "ad, {1} ester konumu için {0} alkil grubu veriyor",
+ "62": "ad, {1} ester konumu için {0} alkil grubu veriyor",
+ "63": "ad, {1} ester konumu için {0} alkil grubu veriyor",
+ "64": "ad, {1} ester konumu için {0} alkil grubu veriyor",
+ "65": "tarif ettiği yapı geçerli değil ({0})",
+ "66": "{0} konumundaki -one bir aldehit olurdu; aldehit -al ile adlandırılır",
+ "67": "{0}. konum, yapı: {1}",
+ "68": "çok fazla özdeş sübstitüent",
+ "69": "karışık lokantlar",
+ "70": "olağandışı bağ türleri henüz adlandırılmıyor",
+ "71": "FormChem'in henüz adlandıramadığı bir halka sistemi",
+ "72": "ekzosiklik çift bağlı aromatik halkalar (piridonlar gibi) henüz adlandırılmıyor",
+ "73": "izotoplar ve radikaller henüz adlandırılmıyor",
+ "74": "hipervalent halojenler adlandırılmıyor",
+ "75": "nitro dışındaki yüklü azot grupları henüz adlandırılmıyor",
+ "76": "yüklü atomlar henüz adlandırılmıyor",
+ "77": "kükürt, azot ve fosfor oksitleri henüz adlandırılmıyor",
+ "78": "bu oksijen grubu henüz adlandırılmıyor",
+ "79": "sülfoksitler, sülfonlar ve diğer kükürt grupları henüz adlandırılmıyor",
+ "80": "iminler, azo ve benzeri azot grupları henüz adlandırılmıyor",
+ "81": "{0} henüz adlandırılmıyor",
+ "82": "20 karbondan uzun sübstitüent zincirleri adlandırılmıyor",
+ "83": "doymamış açil grupları henüz adlandırılmıyor",
+ "84": "sübstitüe iliden grupları henüz adlandırılmıyor",
+ "85": "halka iliden grupları henüz adlandırılmıyor",
+ "86": "iki kez bağlanan halkalar henüz adlandırılmıyor",
+ "87": "bir halka sübstitüenti için numaralandırma bulunamadı",
+ "88": "farklı alkol kısımlı esterler henüz adlandırılmıyor",
+ "89": "ana zincir veya halka bulunamadı",
+ "90": "halkalı esterler (laktonlar) henüz adlandırılmıyor",
+ "91": "birden fazla amin veya amit azotu üzerindeki sübstitüentler henüz adlandırılmıyor",
+ "92": "ana zincir veya halka dışındaki stereomerkezler henüz adlandırılmıyor",
+ "93": "ana zincir dışındaki çift bağ geometrisi henüz adlandırılmıyor",
+ "94": "psödo-asimetrik merkezler henüz adlandırılmıyor",
+ "95": "bu çift bağ geometrisi henüz adlandırılmıyor",
+ "96": "20 karbondan uzun zincirler adlandırılmıyor",
+ "97": "çok fazla özdeş grup",
+ "98": "yapıda değerlik hataları var",
+ "99": "tuzlar ve karışımlar henüz sistematik olarak adlandırılmıyor",
+ "100": "{0} ağır atomdan fazlası olan yapılar henüz sistematik olarak adlandırılmıyor",
+ "101": "{0} bileşikleri henüz sistematik olarak adlandırılmıyor",
+ "102": "sorgu atomlarının ve R gruplarının adı yok",
+ "103": "tek heteroatomlu hidritler yalnızca sözlükten adlandırılır",
+ "104": "{0} bu çizimin bir nesnesi değil.",
+ "105": "{0} için atom yok.",
+ "106": "Parçada atom yok.",
+ "107": "Çizimin sayfası yok.",
+ "108": "{0} bu çizimin bir spektrumu değil.",
+ "109": "Bu öngörünün ait olduğu {0} yapısı artık çizimde yok.",
+ "110": "{0} çizimi kapatıldı.",
+ "111": "Kimyasal kayma (ppm)",
+ "112": "Zaman (s)",
+ "113": "Yansıma",
+ "114": "Bağıl bolluk",
+ "115": "##{0}= birden fazla kez geçiyor; ilk değer korundu.",
+ "116": "##XYDATA={0} bilinen bir değişken listesi değil; (X++(Y..Y)) olarak okundu.",
+ "117": "##{0}={1} bilinen bir değişken listesi değil; (XY..XY) olarak okundu.",
+ "118": "Noktalar x sırasında değildi ve sıralandı.",
+ "119": "##.SHIFT REFERENCE={0} okunamadı; kaymalar referanslanmadı.",
+ "120": "##.SHIFT REFERENCE, {1} noktanın dışında kalan {0}. noktayı gösteriyor; kaymalar referanslanmadı.",
+ "121": "Kaymalar, {0}. nokta {1} ppm olacak şekilde referanslandı ({2}).",
+ "122": "Dosya gözlenen çekirdeği belirtmiyor.",
+ "123": "Bu zaman alanı NMR verisi (bir FID); Fourier dönüşümü olmadan, elde edildiği gibi gösteriliyor.",
+ "124": "Hz cinsinden frekanslar, ppm elde etmek için gözlem frekansına ({0} MHz) bölündü.",
+ "125": "##.SHIFT REFERENCE yok; 0 Hz, 0 ppm olarak alındı.",
+ "126": "##.OBSERVE FREQUENCY yok, bu yüzden kayma ekseni Hz olarak kalıyor.",
+ "127": "Geçirgenlik kesir olarak saklanmıştı ve yüzde olarak gösteriliyor.",
+ "128": "{0} bloğu {1} noktadan fazlasını içeriyor.",
+ "129": "{1} x birimli ##DATA TYPE={0} bilinen bir tekniği belirtmiyor; sade bir spektrum olarak çiziliyor.",
+ "130": "##BLOCKS={0}, ancak LINK bloğu {1} blok içeriyor; bulunan tüm bloklar okundu.",
+ "131": "Bu bir JCAMP-DX dosyası değil: ##TITLE= kaydı yok.",
+ "132": "Dosya LINK bloğu olmadan art arda {0} blok içeriyor; her biri okundu.",
+ "133": "İki blok aynı ##BLOCK_ID değerini paylaşıyor.",
+ "134": "Dosyada FormChem'in çizebileceği bir spektrum yok ({0}).",
+ "135": "\"{0}\" bloğu çizilmedi: {1}.",
+ "136": "bir yapı bloğu (JCAMP-CS); dosyada saklanıyor ama çizilmiyor",
+ "137": "XYDATA, XYPOINTS, PEAK TABLE veya NTUPLES içermiyor",
+ "138": "veri tablosunda nokta yok",
+ "139": "NTUPLES tablosu hiç simge bildirmiyor",
+ "140": "2B NTUPLES spektrumları henüz desteklenmiyor",
+ "141": "NTUPLES tablosunda okunabilir sayfa yok",
+ "142": "Dosya ASCII dışı karakterler içeriyor; UTF-8 olarak okundu.",
+ "143": "Dosya ASCII veya UTF-8 olmayan baytlar içeriyor; Latin-1 olarak okundu.",
+ "144": "Etiketli hiçbir veri kaydına ait olmayan satırlar yok sayıldı.",
+ "145": "Öncesinde blok olmayan bir ##END= yok sayıldı.",
+ "146": "İlk ##TITLE= öncesindeki veya son ##END= sonrasındaki kayıtlar yok sayıldı.",
+ "147": "Dosya ##END= olmadan bitiyor; açık bloklar kapatıldı.",
+ "148": "NTUPLES sayfası {0}",
+ "149": "NTUPLES sayfası {0} için ##DATA TABLE= yok; atlandı.",
+ "150": "NTUPLES sayfası {0}, ##SYMBOL= içinde bildirilmemiş simgeler ({1}) kullanıyor; atlandı.",
+ "151": "{0}: FormChem'in okumadığı bir veri tablosu biçimi ({1}); atlandı.",
+ "152": "NTUPLES tablosunda ##END NTUPLES= yok; bloğun sonuna kadar okundu.",
+ "153": "NTUPLES tablosunda ##SYMBOL= listesi yok.",
+ "154": "Bu bir 2B spektrum (iki bağımsız değişken); 2B spektrumlar bu sürümde çizilmiyor.",
+ "155": "NTUPLES tablosunda {0} sayfa var; yalnızca ilk {1} okundu.",
+ "156": "Sanal sayfa, gerçek sayfanın x değerlerini paylaşmıyor; dışarıda bırakıldı.",
+ "157": "NTUPLES tablosunda {0} sayfa var; {1}. sayfa gösteriliyor ve diğer {2} sayfa dışarıda bırakıldı.",
+ "158": "##DELTAX={0}, (LASTX - FIRSTX) / (NPOINTS - 1) = {1} değerinden farklı; hesaplanan aralık kullanılıyor.",
+ "159": "{0}: tam bir FIRSTX, LASTX ve NPOINTS yok; aralık ##DELTAX'tan geliyor.",
+ "160": "Bir veri satırı DIF değeriyle başladı; önceki satırın son değerinden devam ediyor.",
+ "161": "Bir Y denetim değeri önceki satırın son değeriyle eşleşmedi; satır önceki değerden devam ettirildi.",
+ "162": "{1}: {0} karakter okunamadı ve atlandı.",
+ "163": "{0} DIF satırının ardından Y denetim değeri gelmedi.",
+ "164": "{0}: veri noktası yok.",
+ "165": "{0}: {1} nokta var ama ##NPOINTS={2}; satır X değerleri FIRSTX ile LASTX arasında {3} noktaya uyuyor, bu yüzden bu aralık kullanıldı.",
+ "166": "{0}: {1} nokta var ama ##NPOINTS={2}; okunan noktalar korundu.",
+ "167": "Bir satırın X değeri, FIRSTX ve aralığa göre konumuyla eşleşmiyor; konum kullanıldı.",
+ "168": "{0}: FIRSTX, LASTX ve NPOINTS yok; aralık satır X değerlerinden alındı.",
+ "169": "{0}: noktaları x ekseninde yerleştirmenin yolu yok; 0, 1, 2 diye numaralandırıldılar.",
+ "170": "İlk satır x = {0} değerinde başlıyor ama ##FIRSTX={1}; FIRSTX kullanıldı.",
+ "171": "İlk Y değeri {0}, ##FIRSTY={1} ile eşleşmiyor.",
+ "172": "{0}: veri, {1} değerlik eksik bir grupla bitiyor; atıldı.",
+ "173": "{0} okunamadı: {1}.",
+ "174": "Spektrum {0}. bloğu istiyor, ama dosyasında 1 blok var.",
+ "175": "Spektrum {0}. bloğu istiyor, ama dosyasında {1} blok var.",
+ "176": "Spektrumun kaynağı yok.",
+ "177": "Spektrumun dosyası {0} çizimde yok.",
+ "178": "Bu motorda {0} için öngörücü yok.",
+ "179": "Öngörü başarısız oldu: {0}",
+ "180": "Spektrumun kaynağı ne bir dosya ne de bir öngörü.",
+ "181": "Çizimde {0} spektrumu yok.",
+ "182": "Çubuk spektrumlarda integre edilecek alan yok.",
+ "183": "value sıfırdan büyük olmalı.",
+ "184": "from ve to iki farklı x değeri olmalı.",
+ "185": "Spektrumun {0} integrali yok.",
+ "186": "Bu spektrumun özgün dosyası yok; original=1 olmadan dışa aktarın.",
+ "187": "FormChem PNG, JPEG, GIF, WebP ve SVG resimlerini ve JCAMP-DX spektrumlarını yerleştirir."
+}
diff --git a/frontend/src/i18n/locales/tr/part14.json b/frontend/src/i18n/locales/tr/part14.json
new file mode 100644
index 00000000..e08d2217
--- /dev/null
+++ b/frontend/src/i18n/locales/tr/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Görünüm",
+ "1": "Yüzey",
+ "2": "Dışa aktarılacak bir şey yok: 3B görünüm boş.",
+ "3": "Dışa aktarma başarısız oldu",
+ "4": "3B olarak göstermek için bir yapı seçin.",
+ "5": "3B Oluştur",
+ "6": "3B Görünüm Ekle",
+ "7": "Bir PDB, mmCIF, SDF veya MOL dosyası seçin.",
+ "8": "3B yapı sayfaya yerleştirilemedi",
+ "9": "Bir PDB veya mmCIF dosyasından açılmış bir 3B nesne seçin.",
+ "10": "Bu modelde ligand yok.",
+ "11": "Ligand çıkarılamadı",
+ "12": "Henüz 3B koordinat yok: 3B Oluştur, çizimden bir konformer yapar.",
+ "13": "3B Yapı Dosyası...",
+ "14": "Ligand Çıkar...",
+ "15": "3B Yapıyı Dışa Aktar...",
+ "16": "Dihedral Tarama...",
+ "17": "3B'de Ölç",
+ "18": "3B Görünümü PNG Olarak Dışa Aktar...",
+ "19": "3B Görünümü glTF Olarak Dışa Aktar...",
+ "20": "Çıkarıldı {0}: {1} (bağ dereceleri çıkarım yoluyla belirlendi)",
+ "21": "Çıkarıldı {0}: {1}",
+ "22": "Önce 3B Görünümü açın",
+ "23": "Seçili yapı (veya sayfadaki seçili 3B nesne) için 3B Görünüm panelini açar ve seçimi izler. Bir yapının önce 3B koordinatlara ihtiyacı vardır: bunları 3B Oluştur yapar.",
+ "24": "Seçili yapının 2B çiziminden (kama bağlar, çift bağ geometrisi ve yükler korunarak) bir 3B konformer oluşturur, seçilen kuvvet alanıyla minimize eder ve tek bir geri alma adımı olarak çizimde saklar; 3B Görünüm onu gösterir.",
+ "25": "Seçili yapının gösterilen konformerini 3B Görünümde seçilen kuvvet alanıyla minimize eder (varsayılan MMFF94, MMFF94'ün parametresi yoksa UFF) ve öncesi ile sonrası enerjiyi bildirir, tek bir geri alma adımı olarak.",
+ "26": "Seçili yapının bir konformer topluluğunu üretir (ETKDG, RMSD ile ayıklanmış, her biri minimize edilmiş) ve enerji penceresi içinde kalanları tutar; n, window ve method ile iletişim kutusu olmadan çalışır.",
+ "27": "Üretilecek konformer sayısı",
+ "28": "kcal/mol cinsinden enerji penceresi",
+ "29": "Seçili yapının yanına sayfada bir 3B görünüm yerleştirir (3B koordinatı yoksa önce oluşturarak) ve ona bağlı 3B Görünüm panelini açar; modeli döndürmek veya stilini değiştirmek sayfadaki resmi günceller.",
+ "30": "Bir PDB, mmCIF, SDF veya MOL dosyasını sayfada 3B nesne olarak açar (proteinler şerit olarak, ligandlar top ve çubuk olarak, sular gizli, ligand odakta) ve 3B Görünümde gösterir.",
+ "31": "Seçili 3B nesnenin (bir PDB veya mmCIF dosyasından açılmış) bir ligandını, yanında tek bir geri alma adımı olarak 2B bir yapıya dönüştürür: bağ dereceleri yaygın ligandlar için yerleşik bir şablondan alınır, aksi halde geometriden çıkarılır ve bildirilir; dosya koordinatları onun konformeri olur. ligand ile belirtileni alır; onsuz, modelde birkaç ligand varsa sorar.",
+ "32": "chain:het:number biçiminde ligand anahtarı veya bir het kodu",
+ "33": "Bir PDB veya mmCIF dosyasından açılmış bir 3B nesne seçin",
+ "34": "Seçili yapının 3B koordinatlarını tüm hidrojenlerle kaydeder: MDL molfile (gösterilen konformer), SD dosyası (tüm konformerler, enerji ve yöntem veri alanlarıyla), PDB veya XYZ (gösterilen konformer ya da tüm konformerler model veya kare olarak); bir PDB veya mmCIF dosyasından açılmış 3B nesne özgün dosyasını kaydeder. format olmadan sorar.",
+ "35": "Dosya biçimi",
+ "36": "Gösterilen yerine tüm konformerler (sdf için varsayılan true)",
+ "37": "3B Görünümde seçilen dört atomun (veya son dihedral ölçümünün) dihedral açısını gevşetilmiş minimizasyonla tarar ve açıya karşı enerjiyi çizer.",
+ "38": "3B Görünümde bir uzaklık (iki atom), açı (üç) veya dihedral açı (dört) ölçer ve listeler; atoms ile (a1 gibi fragment atom kimlikleri, hidrojenler a1:h0 olarak veya PDB seri numaraları) bunları ölçer, yoksa seçim moduna geçer.",
+ "39": "İki ila dört atom kimliği",
+ "40": "3B Görünümü ekrandaki boyutunda PNG resmi olarak kaydeder; transparent arka planı dışarıda bırakır.",
+ "41": "3B Görünümü ikili glTF 2.0 dosyası (.glb) olarak kaydeder: atomlar küre, bağlar element renklerinde silindir olarak, 1 angstrom = 1 cm, 3B görüntüleyiciler, slaytlar ve baskı için.",
+ "42": "Yüzey Yok",
+ "43": "Moleküler yüzeyi 3B Görünümden kaldırır.",
+ "44": "Van der Waals Yüzeyi",
+ "45": "Van der Waals yüzeyini 3B Görünümde gösterir.",
+ "46": "Çözücüye Erişilebilir Yüzey",
+ "47": "Çözücüye erişilebilir yüzeyi (1,4 angstrom prob) 3B Görünümde gösterir.",
+ "48": "Çözücüden Dışlanan Yüzey",
+ "49": "Çözücüden dışlanan yüzeyi 3B Görünümde gösterir.",
+ "50": "ESP Haritalı Yüzey",
+ "51": "Yüzeyi, motorun deneysel kısmi yüklerinden yaklaşık bir elektrostatik potansiyele (ESP) göre renklendirir (kırmızı negatif, mavi pozitif), yöntemi adlandıran bir gösterge ile.",
+ "52": "3B Görünümü tel kafes stilinde gösterir; sayfadaki bir 3B nesnede seçim onunla birlikte kaydedilir.",
+ "53": "3B Görünümü çubuk stilinde gösterir; sayfadaki bir 3B nesnede seçim onunla birlikte kaydedilir.",
+ "54": "Top ve Çubuk",
+ "55": "3B Görünümü top ve çubuk stilinde gösterir; sayfadaki bir 3B nesnede seçim onunla birlikte kaydedilir.",
+ "56": "Uzay Dolduran",
+ "57": "3B Görünümü uzay dolduran stilde gösterir; sayfadaki bir 3B nesnede seçim onunla birlikte kaydedilir.",
+ "58": "Şerit",
+ "59": "3B Görünümü şerit stilinde gösterir (proteinler ve nükleik asitler; ligandlar top ve çubuk kalır); sayfadaki bir 3B nesnede seçim onunla birlikte kaydedilir.",
+ "60": "Dihedral açı (derece)",
+ "61": "Bağıl enerji (kcal/mol)",
+ "62": "Minimum {0}°",
+ "63": "3B Yapıyı Dışa Aktar",
+ "64": "Tüm konformerler (SDF kayıtları, PDB modelleri, XYZ kareleri)",
+ "65": "1 konformer saklandı; her hidrojen 3B konumuyla yazılır.",
+ "66": "Ligand Çıkar",
+ "67": "Ligand",
+ "68": "Ligand, modelin yanında 2B bir yapıya dönüşür; dosyadaki koordinatları konformeri olarak korunur.",
+ "69": "Çıkar",
+ "70": "SD Dosyası (.sdf)",
+ "71": "MDL Molfile (.mol)",
+ "72": "Saklanan konformer sayısı: {0}; her hidrojen 3B konumuyla yazılır.",
+ "73": "Konformerler",
+ "74": "Enerji penceresi (kcal/mol)",
+ "75": "Sabit tohumlu ETKDG gömme, yakın kopyalar 0,5 Å ağır atom RMSD'sinde ayıklanır, her biri minimize edilir; en düşük olan gösterilen konformer olur.",
+ "76": "Üret",
+ "77": "Dihedral tarama enerji profili",
+ "78": "Dihedral Tarama",
+ "79": "Başlangıç (derece)",
+ "80": "Bitiş (derece)",
+ "81": "Adım (derece)",
+ "82": "Her noktayı konformer olarak sakla (tek geri alma adımı)",
+ "83": "Taramayı Çalıştır",
+ "84": "Gevşetilmiş tarama: her açıda dihedral sabit tutulur ve geri kalan her şey minimize edilir.",
+ "85": "Bitiş açısı başlangıç açısından büyük olmalıdır.",
+ "86": "Taranıyor...",
+ "87": "Tarama başarısız oldu",
+ "88": "bariyer {0} kcal/mol",
+ "89": "Görüntü stili",
+ "90": "Yüzeyi deneysel kısmi yüklerden elektrostatik potansiyele göre renklendir",
+ "91": "ESP",
+ "92": "Minimize Et",
+ "93": "Tara...",
+ "94": "Ligandı odakla",
+ "95": "Görünümü sıfırla",
+ "96": "Döndür",
+ "97": "3B görünümü dışa aktar",
+ "98": "Ölç",
+ "99": "Ölçümler",
+ "100": "PNG Resmi",
+ "101": "PNG Resmi, Saydam",
+ "102": "glTF İkili (.glb)",
+ "103": "3B için WebGL gerekir, bu pencere onu sunmuyor.",
+ "104": "3B görüntüleyici yükleniyor...",
+ "105": "3B görüntüleyici yüklenemedi",
+ "106": "3B olarak görmek için bir çizim açın ve bir yapı seçin.",
+ "107": "3B olarak görmek için sayfada bir yapı seçin.",
+ "108": "3B yapı okunamadı",
+ "109": "Bu konformer molfile olarak yazılamaz",
+ "110": "Döndürme kapalı: sistem azaltılmış hareket istiyor",
+ "111": "Bir PDB veya CIF modelinde konformer yoktur.",
+ "112": "Enerjiler en düşüğe göredir; göstermek için birine tıklayın.",
+ "113": "Bu listeyi 3B Oluştur veya Konformerler... doldurur.",
+ "114": "Kısmi yükler kullanılamıyor",
+ "115": "motorda henüz 3B yolları yok",
+ "116": "yakınsamadı",
+ "117": "Arka arkaya bağlı dört atom seçin (bir dihedral), sonra Tara.",
+ "118": "Geometrileri görmek için Her noktayı konformer olarak sakla seçeneğini işaretleyin.",
+ "119": "Konformeri göster",
+ "120": "3B görünümü güncelle",
+ "121": "Sayfa görüntüsü güncellenemedi",
+ "122": "Yüzey yok",
+ "123": "Van der Waals",
+ "124": "Çözücüye erişilebilir",
+ "125": "Çözücüden dışlanan",
+ "126": "Uzaklık",
+ "127": "Açı",
+ "128": "Dihedral",
+ "129": "{0} kcal/mol, {1}, yakınsamadı",
+ "130": "Seçilen {0} / {1}: {2}",
+ "131": "Ölçmek için {0} atoma tıklayın",
+ "132": "ESP ({0}): {1}, kırmızı {2} e ile mavi +{3} e arası",
+ "133": "Uzaklık {0}: {1}",
+ "134": "Açı {0}: {1}",
+ "135": "Dihedral {0}: {1}",
+ "136": "Oluşturuldu: {0}",
+ "137": "Minimize edildi: {0}",
+ "138": "Korunan konformer sayısı: {0}, toplam: {1}",
+ "139": "Korunan konformer sayısı: {0}",
+ "140": "Dihedral {0}",
+ "141": "PNG kodlaması başarısız oldu"
+}
diff --git a/frontend/src/i18n/locales/tr/part15.json b/frontend/src/i18n/locales/tr/part15.json
new file mode 100644
index 00000000..01d4b509
--- /dev/null
+++ b/frontend/src/i18n/locales/tr/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "yaklaşık, deneysel yüklerden",
+ "1": "Belirtilmemiş stereomerkez veya çift bağ sayısı: {0}; bir konfigürasyon seçildi.",
+ "2": "Çizimdeki 3B'de yeniden üretilmeyen stereo etiketi sayısı: {0}.",
+ "3": "Gelişmiş stereo grup(lar)ı {0} için çizilen üye oluşturuldu; 3B model, çizimin tarif ettiği karışımın (bağıl veya rasemik) bir stereoizomeridir.",
+ "4": "Çizilen stereoyu korumak için {0} kez gömüldü (tohumlar {1}).",
+ "5": "van der Waals temaslarının {1} altına yaklaşan ağır atom çifti sayısı: {0}.",
+ "6": "Evrensel kuvvet alanı kullanıldı: {0}.",
+ "7": "{0} parametresi yok, şunun için: {1}",
+ "8": "{0} her atomun tipini belirleyemedi",
+ "9": "Minimizasyon sırasında çizilen stereoyu değiştirdiği için dışarıda bırakılan konformer sayısı: {0}.",
+ "10": "300'den fazla ağır atom: bu boyutta konformer örnekleme kalitesi düşer.",
+ "11": "Merkezdeki bağ bir halkada; halka açıyı izlemek için gerilir.",
+ "12": "Yapının 3B koordinatı yoktu; tarama yeni bir gömmeyle başladı.",
+ "13": "3B hesaplanırken yapı değişti; komutu yeniden çalıştırın.",
+ "14": "Çizimde {0} nesnesi yok.",
+ "15": "{0} için henüz 3B koordinat yok; önce 3B oluşturun.",
+ "16": "{0} için {1} konformeri yok.",
+ "17": "Yapıda atom yok.",
+ "18": "3B gerçek atomlar ister: {0} atom etiket, R grubu veya bağlanma noktası ({1}).",
+ "19": "Hidrojenler eklenemedi: {0}",
+ "20": "Yapıda hidrojenli atom sayısı: {0}; 3B en fazla {1} atomu işler.",
+ "21": "3B koordinatlar bu yapıya uymuyor ({0} için veri yok); 3B'yi yeniden oluşturun.",
+ "22": "3B koordinatlar bu yapıya uymuyor (hidrojen sayısı değişti); 3B'yi yeniden oluşturun.",
+ "23": "Yapı 3B olarak gömülemedi: {0}",
+ "24": "Yapı 3B olarak gömülemedi; değerliklerini ve stereosunu denetleyin.",
+ "25": "Konformerler gömülemedi: {0}",
+ "26": "Hiçbir konformer gömülemedi; yapının değerliklerini ve stereosunu denetleyin.",
+ "27": "Gömülen her konformer minimizasyondan sonra çizilen stereoyu kaybetti.",
+ "28": "Hiçbir kuvvet alanının bu yapı için parametresi yok ({0}).",
+ "29": "Evrensel kuvvet alanı kurulamadı: {0}",
+ "30": "Evrensel kuvvet alanı kurulamadı.",
+ "31": "Bilinmeyen atomlar: {0}; fragment atom kimliklerini veya hidrojen için a1:h0 biçimini kullanın.",
+ "32": "Dört atom birbirinden farklı olmalıdır.",
+ "33": "Dört atom bir bağ zinciri oluşturmalıdır (a1-a2-a3-a4).",
+ "34": "3B dosya yazılamadı: {0}",
+ "35": "Dosya, FormChem'in okuyabildiği bir PDB, mmCIF, SDF veya MOL dosyası değil.",
+ "36": "Dosyada {0} atomdan fazlası var.",
+ "37": "PDB dosyasında ATOM veya HETATM kaydı yok.",
+ "38": "mmCIF atom_site tablosunda Cartn_x, Cartn_y ve Cartn_z sütunları yok.",
+ "39": "CIF'te kesirli koordinatlar var ama eksiksiz bir birim hücre yok.",
+ "40": "CIF'te atom_site tablosu yok.",
+ "41": "CIF'te okunabilir atom yok.",
+ "42": "Dosyada kayıt yok.",
+ "43": "Dosyadaki kayıt sayısı: {0}; 3B içe aktarma en fazla {1} okur.",
+ "44": "Dosyanın hiçbir kaydı okunamadı.",
+ "45": "PDB veya mmCIF dosyası değil: {0}",
+ "46": "FormChem çizimine dönüştürülemedi: {0}, neden: {1}.",
+ "47": "PDB modeli 3B nesne olarak yerleştirildi: {0}.",
+ "48": "mmCIF modeli 3B nesne olarak yerleştirildi: {0}.",
+ "49": "Koordinatları okunamadığı için atlanan ATOM veya HETATM satırı sayısı: {0}.",
+ "50": "Koordinatları okunamadığı için atlanan atom_site satırı sayısı: {0}.",
+ "51": "Küçük molekül CIF'i: asimetrik birim kesirli koordinatlardan okunur; simetri eşleri üretilmez.",
+ "52": "{0}: değerlik sorunları var; arındırma yapılmadan okundu.",
+ "53": "{0}: yalnızca 2B koordinatlar var; konformer saklanmadı.",
+ "54": "Dosyada olmayıp geometriden yerleştirilen hidrojen sayısı: {0}.",
+ "55": "{0}: okunamadı, neden: {1}",
+ "56": "{0}: okunamadı.",
+ "57": "Kayıt {0}",
+ "58": "Yapı",
+ "59": "Dosyanın 3B koordinatları 1 yapının konformeri olarak korundu; görüntülemek için 3B Oluştur gerekmez.",
+ "60": "Dosyanın 3B koordinatları konformer olarak korundu; yapı sayısı: {0}; görüntülemek için 3B Oluştur gerekmez.",
+ "61": "{0} tek bir iyon; çıkarılacak yapı yok.",
+ "62": "{0} atomları okunamadı.",
+ "63": "Yapıda {0} ligandı yok; ligandlar: {1}.",
+ "64": "Çizimde {0} 3B modeli yok.",
+ "65": "FormChem PNG, JPEG, GIF, WebP ve SVG resimlerini, JCAMP-DX spektrumlarını ve PDB, mmCIF, SDF ve MOL yapı dosyalarını yerleştirir."
+}
diff --git a/frontend/src/i18n/locales/uk/part12.json b/frontend/src/i18n/locales/uk/part12.json
new file mode 100644
index 00000000..6508ebbb
--- /dev/null
+++ b/frontend/src/i18n/locales/uk/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Спектр",
+ "1": "Намалюйте або виділіть структуру, щоб отримати її назву.",
+ "2": "Не вдалося обчислити назви",
+ "3": "У FormChem немає назви для цієї структури.",
+ "4": "Копіювати назву",
+ "5": "Назву скопійовано: {0}",
+ "6": "Хімічна назва для вставлення; пропустіть, щоб відкрити діалог",
+ "7": "Копіює назву виділеної структури (або структур на сторінці) як звичайний текст: тривіальну назву, якщо FormChem її знає, інакше систематичну, яка пропонується, лише якщо читається назад у ту саму структуру.",
+ "8": "trivial або systematic: яку назву копіювати; пропустіть, щоб узяти першу",
+ "9": "Передбачений спектр актуальний.",
+ "10": "Оновити передбачений спектр",
+ "11": "Спершу виділіть одну структуру",
+ "12": "Спершу виділіть передбачений спектр",
+ "13": "Додано передбачений спектр ЯМР 1H ({0})",
+ "14": "Додано передбачений спектр ЯМР 13C ({0})",
+ "15": "Передбачений спектр оновлено ({0})",
+ "16": "Ідентифікатор фрагмента структури; за замовчуванням виділена структура або єдина на сторінці",
+ "17": "Частота спектрометра в MHz (за замовчуванням 400 для 1H, 100 для 13C)",
+ "18": "Додає поруч із виділеною структурою передбачений спектр ЯМР 1H одним кроком скасування: об’єкт-спектр, обчислений за власними правилами інкрементів FormChem (без бази даних хімічних зсувів), мультиплети й інтеграли якого пов’язані з атомами структури; у заголовку вказано метод, версію й частоту. Криву щоразу перераховують зі структури, її не зберігають.",
+ "19": "Додає поруч із виділеною структурою передбачений спектр ЯМР 13C одним кроком скасування: об’єкт-спектр, обчислений за власними правилами інкрементів FormChem (без бази даних хімічних зсувів), піки якого пов’язані з атомами структури; у заголовку вказано метод, версію й частоту. Криву щоразу перераховують зі структури, її не зберігають.",
+ "20": "Не вдалося передбачити спектр",
+ "21": "Передбачити спектр ЯМР 1H",
+ "22": "Передбачити спектр ЯМР 13C",
+ "23": "Перераховує мультиплети, інтеграли або піки передбаченого спектра після зміни його структури, з поточною версією передбачувача, одним кроком скасування; якщо спектр актуальний, нічого не змінюється.",
+ "24": "Ідентифікатор передбаченого спектра; за замовчуванням виділений або відкритий у редакторі спектрів",
+ "25": "Не вдалося оновити спектр",
+ "26": "У цьому діапазоні нових піків немає.",
+ "27": "Протягніть вказівник діапазоном у редакторі спектрів, щоб проінтегрувати його.",
+ "28": "Пов’язати пік з атомами",
+ "29": "Розірвати зв’язок піка",
+ "30": "Вісь Y спектра",
+ "31": "Спектр із файлу...",
+ "32": "Редагувати спектр...",
+ "33": "Позначити піки",
+ "34": "Інтегрувати",
+ "35": "Пропускання або оптична густина",
+ "36": "Експортувати спектр...",
+ "37": "Спершу виділіть спектр",
+ "38": "немає спектра з ідентифікатором {0}",
+ "39": "Позначено піків: {0} (уже були: {1})",
+ "40": "Позначено піків: {0}",
+ "41": "Інтеграли є лише в спектрах ЯМР",
+ "42": "Спершу виберіть пік, інтеграл або мультиплет у редакторі спектрів",
+ "43": "Усі атоми мають належати одній структурі",
+ "44": "Між пропусканням і оптичною густиною перемикаються лише спектри ІЧ, КР і УФ-видимі",
+ "45": "Експортовано: {0}",
+ "46": "Ідентифікатор об’єкта-спектра; за замовчуванням виділений спектр або відкритий у редакторі спектрів",
+ "47": "Імпортує файл спектра JCAMP-DX в активний малюнок (один об’єкт-спектр на блок даних, файл зберігається байт у байт) одним кроком скасування на файл. Без path відкриває діалог вибору файлу.",
+ "48": "Абсолютний шлях до файлу .jdx, .dx або .jcamp",
+ "49": "Не вдалося імпортувати спектр",
+ "50": "Відкриває редактор спектрів для виділеного спектра (те саме, що подвійне клацання на ньому).",
+ "51": "Не вдалося відкрити спектр",
+ "52": "Знаходить піки спектра в діапазоні (за замовчуванням показаному) і додає їх до списку піків, пропускаючи вже наявні, одним кроком скасування.",
+ "53": "Початок діапазону в одиницях осі x (cm-1, nm, m/z, ppm)",
+ "54": "Кінець діапазону в одиницях осі x",
+ "55": "Необов’язковий поріг виявлення в одиницях осі y",
+ "56": "Замінити список піків замість додавання до нього",
+ "57": "Не вдалося позначити піки",
+ "58": "Додає інтеграл ЯМР за діапазоном, масштабований так само, як наявні інтеграли (або до значення value з переналаштуванням решти), одним кроком скасування. Без from і to перемикає редактор спектрів на інструмент інтегрування.",
+ "59": "Початок діапазону в ppm",
+ "60": "Кінець діапазону в ppm",
+ "61": "Значення, яке має показувати цей інтеграл, наприклад кількість протонів",
+ "62": "Не вдалося проінтегрувати",
+ "63": "Пов’язує пік, інтеграл або мультиплет з атомами структури одним кроком скасування. Без atoms використовує виділені атоми або чекає, поки користувач клацне атоми на малюнку.",
+ "64": "Ідентифікатор піка, інтеграла або мультиплета; за замовчуванням вибраний у редакторі спектрів",
+ "65": "Ідентифікатор структури (фрагмента), якій належать атоми",
+ "66": "Ідентифікатори атомів",
+ "67": "Не вдалося пов’язати пік",
+ "68": "Прибирає зв’язок піка, інтеграла або мультиплета з атомами одним кроком скасування.",
+ "69": "Не вдалося розірвати зв’язок піка",
+ "70": "Показує спектр ІЧ, КР або УФ-видимий як пропускання чи оптичну густину (без mode перемикає) одним кроком скасування.",
+ "71": "Вісь Y для показу; пропустіть, щоб перемкнути",
+ "72": "Не вдалося змінити вісь Y",
+ "73": "Зберігає спектр як JCAMP-DX (з таблицею піків, якщо піки є) або як CSV з усіма точками через рушій.",
+ "74": "Формат файлу, за замовчуванням jdx",
+ "75": "З jdx: початковий імпортований файл без змін",
+ "76": "Абсолютний шлях для запису; пропустіть, щоб запитати",
+ "77": "Не вдалося експортувати спектр",
+ "78": "Вставити спектр із файлу",
+ "79": "У файлі немає спектра, який FormChem міг би намалювати",
+ "80": "Вставити спектр",
+ "81": "Не вдалося розмістити спектр: його файл не потрапив у малюнок.",
+ "82": "Вставлено спектрів: {0}",
+ "83": "Довжина хвилі (µm)",
+ "84": "Хвильове число (cm⁻¹)",
+ "85": "Раманівський зсув (cm⁻¹)",
+ "86": "Довжина хвилі (nm)",
+ "87": "Частота (Hz)",
+ "88": "δ (ppm)",
+ "89": "Пропускання (%)",
+ "90": "Пропускання",
+ "91": "Оптична густина",
+ "92": "Відносна поширеність (%)",
+ "93": "Інтенсивність",
+ "94": "ЯМР {0}",
+ "95": "МС",
+ "96": "УФ-видимий",
+ "97": "КР",
+ "98": "ІЧ",
+ "99": "Передбачений {0}, {1} MHz ({2})",
+ "100": "Передбачений {0}, {1} MHz",
+ "101": "Передбачений {0} ({1})",
+ "102": "Передбачений {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Спектр недоступний: {0}",
+ "105": "Завантаження спектра",
+ "106": "Тривіальна назва",
+ "107": "Систематична",
+ "108": "Висока достовірність",
+ "109": "Середня достовірність",
+ "110": "Низька достовірність",
+ "111": "Не прочитано",
+ "112": "Назви FormChem",
+ "113": "Не вдалося прочитати назву",
+ "114": "Вставити структуру за назвою",
+ "115": "Структура за назвою",
+ "116": "Назва, наприклад аспірин або 2-метилпропан-1-ол",
+ "117": "Хімічна назва",
+ "118": "Введіть назву, щоб побачити її структуру.",
+ "119": "Для цієї назви немає структури",
+ "120": "Словник",
+ "121": "Систематичний розбір",
+ "122": "Правила найменування, перевірка зворотним розбором",
+ "123": "Інструменти спектра",
+ "124": "Показати весь спектр",
+ "125": "Вісь Y",
+ "126": "Показати цей діапазон на сторінці",
+ "127": "Двічі клацніть спектр на малюнку, щоб редагувати його тут.",
+ "128": "Піки та інтеграли",
+ "129": "Передбачений",
+ "130": "Значення інтеграла",
+ "131": "Пов’язати з атомами",
+ "132": "Розірвати зв’язок",
+ "133": "1 атом",
+ "134": "Атоми для зв’язку",
+ "135": "Клацніть інші атоми, потім натисніть «Готово».",
+ "136": "Клацніть на малюнку атоми, що належать цьому піку, потім натисніть «Готово».",
+ "137": "У цьому діапазоні нічого інтегрувати.",
+ "138": "Видалити пік",
+ "139": "Додати пік",
+ "140": "Пов’язано з 1 атомом",
+ "141": "Задати діапазон спектра",
+ "142": "Введіть додатне число.",
+ "143": "Не вдалося задати інтеграл",
+ "144": "Зсув і масштаб: перетягуйте для зсуву, коліщатком масштабуйте, Shift-перетягування масштабує до діапазону",
+ "145": "Масштаб за діапазоном: протягніть вказівник графіком",
+ "146": "Позначення піків: протягніть вказівник діапазоном",
+ "147": "Додати або видалити пік: клацніть поруч із піком",
+ "148": "Інтегрування: протягніть вказівник діапазоном",
+ "149": "Пік",
+ "150": "Інтеграл",
+ "151": "Мультиплет",
+ "152": "Атомів: {0}",
+ "153": "Пов’язано з {0}",
+ "154": "Перетягуйте для зсуву, коліщатком масштабуйте, Shift-перетягування масштабує до діапазону. Клацніть підпис, щоб виділити його.",
+ "155": "Протягніть вказівник графіком, щоб масштабувати до цього діапазону.",
+ "156": "Протягніть вказівник діапазоном, щоб позначити його піки.",
+ "157": "Клацніть поруч із піком, щоб додати його; клацніть підпис піка, щоб видалити.",
+ "158": "Протягніть вказівник діапазоном, щоб проінтегрувати його.",
+ "159": "Пов’язано з атомами: {0}"
+}
diff --git a/frontend/src/i18n/locales/uk/part13.json b/frontend/src/i18n/locales/uk/part13.json
new file mode 100644
index 00000000..87a40d2f
--- /dev/null
+++ b/frontend/src/i18n/locales/uk/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "рушій повернув порожній файл",
+ "1": "назва довша за {0} символів",
+ "2": "фрагменти понад {0} атомів не отримують назв",
+ "3": "У структурі є підписи, R-групи або будь-які атоми, які не мають назви.",
+ "4": "Структуру не вдалося прочитати як молекулу (перевірте валентності).",
+ "5": "Немає структури, яку можна назвати.",
+ "6": "Назви з оберненим індексом (спочатку основа, потім кома й замісники) не читаються; запишіть назву у звичайному порядку, наприклад 1,2-dichlorobenzene.",
+ "7": "D- і L- читаються лише для амінокислот і цукрів зі словника FormChem; для інших назв вкажіть дескриптори R або S.",
+ "8": "FormChem прочитав назву повністю, але вона не утворює повної назви структури (можливо, бракує основи, як-от hexane або benzene, чи суфікса).",
+ "9": "FormChem не зміг прочитати назву, починаючи із символу {0} (\"{1}\").",
+ "10": "FormChem прочитав назву, але {0}.",
+ "11": "структуру не вдалося добудувати",
+ "12": "Назву можна прочитати кількома способами; FormChem намалював варіант із найменшою кількістю припущень.",
+ "13": "У назві немає стереодескрипторів, тому стереоцентри й подвійні зв’язки намальовано без уточнення.",
+ "14": "Немає систематичної назви: {0}.",
+ "15": "Побудована FormChem систематична назва під час зворотного читання не дала ту саму структуру, тому її не показано.",
+ "16": "цей подвійний зв’язок не може бути E або Z",
+ "17": "локант дескриптора {0} не є положенням основи",
+ "18": "положення {0} не починає подвійного зв’язку, який може бути E або Z",
+ "19": "для {0} потрібен рівно один подвійний зв’язок, який може бути цис або транс; у цій структурі їх {1}",
+ "20": "{0} неоднозначне для цього подвійного зв’язку; укажіть натомість E або Z",
+ "21": "для ({0}) потрібен локант: у структурі стереоцентрів: {1}",
+ "22": "положення {0} не є стереоцентром, тому ({1}) не застосовується",
+ "23": "для ({0}) потрібен локант: у структурі подвійних зв’язків, які можуть бути E або Z: {1}",
+ "24": "положенню {0} не можна надати {1}",
+ "25": "цьому подвійному зв’язку не можна надати {0}",
+ "26": "{0} не вказує, яку конфігурацію мають на увазі, тому структуру намальовано без стереохімії.",
+ "27": "у {0} немає точки приєднання",
+ "28": "немає місця для {0} у {1}",
+ "29": "{0} не може утворити там зв’язок",
+ "30": "ланцюги довші за {0} атомів вуглецю поки що не читаються",
+ "31": "{0} замалий для кільця",
+ "32": "{0}-{1} — це таутомер, який FormChem поки що не малює за назвою",
+ "33": "локант {0} не є положенням {1}",
+ "34": "{0} не є положенням у ланцюгу",
+ "35": "кратний зв’язок не може починатися в положенні {0} з {1}",
+ "36": "у положенні {0} з {1} не може бути такого кратного зв’язку",
+ "37": "немає місця для кратного зв’язку в положенні {0} з {1}",
+ "38": "немає місця для кратних зв’язків {0}",
+ "39": "Положення кратних зв’язків {0} не вказано; намальовано в найнижчих положеннях.",
+ "40": "для -{0} потрібен відкритий ланцюг; у кільця суфікс carbaldehyde, carboxylic acid, carbonitrile або carboxamide",
+ "41": "у ланцюга лише два кінці для -{0}",
+ "42": "{0} закороткий для двох груп -{1}",
+ "43": "немає місця для -{0} у {1}",
+ "44": "Положення -{0} у {1} не вказано; намальовано в найнижчому положенні.",
+ "45": "-{0} має бути в кінці ланцюга, а не в {1}",
+ "46": "немає місця для -{0} у {1}",
+ "47": "орто, мета й пара потребують бензенового кільця",
+ "48": "орто, мета або пара з однією групою потребують основи, як-от phenol, aniline або toluene",
+ "49": "немає місця для {0} у {1}",
+ "50": "немає місця для {0} груп {1} у {2}",
+ "51": "Положення {0} у {1} не вказано; намальовано в найнижчому вільному положенні.",
+ "52": "{0} не може нести замісники",
+ "53": "ацильна група приєднується за карбонільним вуглецем",
+ "54": "у {0} немає вільного положення",
+ "55": "Положення приєднання {0} не вказано; прийнято положення {1}.",
+ "56": "у {0} не лишилося місця для приєднання",
+ "57": "локанти {0} перед {1} не використовуються",
+ "58": "{0} не може стояти окремим словом",
+ "59": "\"{0}\" вимагає перед собою груп: {1}, а в назві їх {2}",
+ "60": "\"{0}\" вимагає перед собою груп: {1}, а в назві їх {2}",
+ "61": "кількість алкільних груп у назві ({0}) не відповідає кількості положень складного ефіру ({1})",
+ "62": "кількість алкільних груп у назві ({0}) не відповідає кількості положень складного ефіру ({1})",
+ "63": "кількість алкільних груп у назві ({0}) не відповідає кількості положень складного ефіру ({1})",
+ "64": "кількість алкільних груп у назві ({0}) не відповідає кількості положень складного ефіру ({1})",
+ "65": "структура, яку вона описує, недопустима ({0})",
+ "66": "-one в {0} був би альдегідом; альдегід називають із -al",
+ "67": "положення {0} з {1}",
+ "68": "забагато однакових замісників",
+ "69": "змішані локанти",
+ "70": "незвичні типи зв’язків поки що не називаються",
+ "71": "кільцева система, яку FormChem поки що не вміє називати",
+ "72": "ароматичні кільця з екзоциклічними подвійними зв’язками (наприклад, піридони) поки що не називаються",
+ "73": "ізотопи й радикали поки що не називаються",
+ "74": "гіпервалентні галогени не називаються",
+ "75": "заряджені азотні групи, крім нітро, поки що не називаються",
+ "76": "заряджені атоми поки що не називаються",
+ "77": "оксиди сірки, азоту й фосфору поки що не називаються",
+ "78": "ця киснева група поки що не називається",
+ "79": "сульфоксиди, сульфони й інші сірчані групи поки що не називаються",
+ "80": "іміни, азо- та подібні азотні групи поки що не називаються",
+ "81": "{0} поки що не називається",
+ "82": "замісники з ланцюгами довшими за 20 атомів вуглецю не називаються",
+ "83": "ненасичені ацильні групи поки що не називаються",
+ "84": "заміщені іліденові групи поки що не називаються",
+ "85": "кільцеві іліденові групи поки що не називаються",
+ "86": "двічі приєднані кільця поки що не називаються",
+ "87": "для кільцевого замісника не знайдено нумерації",
+ "88": "складні ефіри з різними спиртовими частинами поки що не називаються",
+ "89": "не знайдено основного ланцюга чи кільця",
+ "90": "циклічні складні ефіри (лактони) поки що не називаються",
+ "91": "замісники в більш ніж одного атома азоту аміну чи аміду поки що не називаються",
+ "92": "стереоцентри поза основним ланцюгом чи кільцем поки що не називаються",
+ "93": "геометрія подвійного зв’язку поза основним ланцюгом поки що не називається",
+ "94": "псевдоасиметричні центри поки що не називаються",
+ "95": "ця геометрія подвійного зв’язку поки що не називається",
+ "96": "ланцюги довші за 20 атомів вуглецю не називаються",
+ "97": "забагато однакових груп",
+ "98": "у структурі помилки валентності",
+ "99": "солі та суміші поки що не отримують систематичних назв",
+ "100": "структури з кількістю важких атомів понад {0} поки що не отримують систематичних назв",
+ "101": "сполуки {0} поки що не отримують систематичних назв",
+ "102": "атоми запиту й R-групи не мають назви",
+ "103": "гідриди окремих гетероатомів називаються лише за словником",
+ "104": "{0} не є об’єктом цього малюнка.",
+ "105": "У {0} немає атомів.",
+ "106": "У фрагмента немає атомів.",
+ "107": "У малюнка немає сторінки.",
+ "108": "{0} не є спектром цього малюнка.",
+ "109": "Структури {0}, до якої належить це передбачення, більше немає на малюнку.",
+ "110": "Малюнок {0} було закрито.",
+ "111": "Хімічний зсув (ppm)",
+ "112": "Час (s)",
+ "113": "Відбиття",
+ "114": "Відносна поширеність",
+ "115": "##{0}= трапляється більше одного разу; збережено перше значення.",
+ "116": "##XYDATA={0} не є відомим списком змінних; прочитано як (X++(Y..Y)).",
+ "117": "##{0}={1} не є відомим списком змінних; прочитано як (XY..XY).",
+ "118": "Точки йшли не в порядку x і були відсортовані.",
+ "119": "##.SHIFT REFERENCE={0} не вдалося прочитати; зсуви не прив’язано до еталона.",
+ "120": "##.SHIFT REFERENCE указує точку {0}, поза {1} точками; зсуви не прив’язано до еталона.",
+ "121": "Зсуви прив’язано до еталона так, що точка {0} дорівнює {1} ppm ({2}).",
+ "122": "У файлі не вказано спостережуване ядро.",
+ "123": "Це дані ЯМР у часовій області (FID); їх показано як отримано, без перетворення Фур’є.",
+ "124": "Частоти в Hz поділено на частоту спостереження ({0} MHz), щоб отримати ppm.",
+ "125": "##.SHIFT REFERENCE відсутній; 0 Hz прийнято за 0 ppm.",
+ "126": "##.OBSERVE FREQUENCY відсутній, тому вісь зсувів лишається в Hz.",
+ "127": "Пропускання було збережено як частку й показано у відсотках.",
+ "128": "Блок {0} містить понад {1} точок.",
+ "129": "##DATA TYPE={0} з одиницями x {1} не відповідає відомому методу; малюється як простий спектр.",
+ "130": "##BLOCKS={0}, але блок LINK містить блоків: {1}; прочитано всі знайдені блоки.",
+ "131": "Це не файл JCAMP-DX: у ньому немає запису ##TITLE=.",
+ "132": "У файлі {0} блоків поспіль без блока LINK; кожен прочитано.",
+ "133": "Два блоки мають один ##BLOCK_ID.",
+ "134": "У файлі немає спектра, який FormChem міг би намалювати ({0}).",
+ "135": "Блок \"{0}\" не намальовано: {1}.",
+ "136": "блок структури (JCAMP-CS); його збережено у файлі, але не намальовано",
+ "137": "у ньому немає XYDATA, XYPOINTS, PEAK TABLE або NTUPLES",
+ "138": "у його таблиці даних немає точок",
+ "139": "у його таблиці NTUPLES не оголошено символів",
+ "140": "2D-спектри NTUPLES поки що не підтримуються",
+ "141": "у його таблиці NTUPLES немає читабельних сторінок",
+ "142": "У файлі є символи поза ASCII; його прочитано як UTF-8.",
+ "143": "У файлі є байти, що не належать ні ASCII, ні UTF-8; його прочитано як Latin-1.",
+ "144": "Рядки поза будь-якими позначеними записами даних проігноровано.",
+ "145": "##END= без попереднього блока проігноровано.",
+ "146": "Записи до першого ##TITLE= або після останнього ##END= проігноровано.",
+ "147": "Файл закінчується без ##END=; відкриті блоки закрито.",
+ "148": "сторінка NTUPLES {0}",
+ "149": "У сторінці NTUPLES {0} немає ##DATA TABLE=; її пропущено.",
+ "150": "Сторінка NTUPLES {0} використовує символи ({1}), не оголошені в ##SYMBOL=; її пропущено.",
+ "151": "{0}: форма таблиці даних, якої FormChem не читає ({1}); пропущено.",
+ "152": "У таблиці NTUPLES немає ##END NTUPLES=; її прочитано до кінця блока.",
+ "153": "У таблиці NTUPLES немає списку ##SYMBOL=.",
+ "154": "Це 2D-спектр (дві незалежні змінні); 2D-спектри в цій версії не малюються.",
+ "155": "У таблиці NTUPLES сторінок: {0}; прочитано лише перші {1}.",
+ "156": "Уявна сторінка не має спільних значень x з дійсною; її виключено.",
+ "157": "У таблиці NTUPLES сторінок: {0}; показано сторінку {1}, інших сторінок виключено: {2}.",
+ "158": "##DELTAX={0} відрізняється від (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; використовується обчислений крок.",
+ "159": "{0}: немає повного набору FIRSTX, LASTX і NPOINTS; крок береться з ##DELTAX.",
+ "160": "Рядок даних почався зі значення DIF; він продовжується від останнього значення попереднього рядка.",
+ "161": "Контрольне значення Y не збіглося з останнім значенням попереднього рядка; рядок продовжено від раннішого значення.",
+ "162": "{1}: не вдалося прочитати й пропущено символів: {0}.",
+ "163": "Рядків DIF, за якими не було контрольного значення Y: {0}.",
+ "164": "{0}: немає точок даних.",
+ "165": "{0}: точок {1}, але ##NPOINTS={2}; значення x рядків підходять для {3} точок від FIRSTX до LASTX, тому використано цей крок.",
+ "166": "{0}: точок {1}, але ##NPOINTS={2}; прочитані точки збережено.",
+ "167": "Значення x рядка не відповідає його положенню від FIRSTX з урахуванням кроку; використано положення.",
+ "168": "{0}: немає FIRSTX, LASTX і NPOINTS; крок узято зі значень x рядків.",
+ "169": "{0}: немає способу розмістити точки на осі x; їх пронумеровано 0, 1, 2 і так далі.",
+ "170": "Перший рядок починається з x = {0}, але ##FIRSTX={1}; використано FIRSTX.",
+ "171": "Перше значення Y {0} не збігається з ##FIRSTY={1}.",
+ "172": "{0}: дані закінчуються неповною групою з {1} значень; її відкинуто.",
+ "173": "Не вдалося прочитати {0}: {1}.",
+ "174": "Спектр запитує блок {0}, але в його файлі 1 блок.",
+ "175": "Спектр запитує блок {0}, але в його файлі блоків: {1}.",
+ "176": "У спектра немає джерела.",
+ "177": "Файла {0} спектра немає на малюнку.",
+ "178": "У цьому рушії немає передбачувача для {0}.",
+ "179": "Передбачення не вдалося: {0}",
+ "180": "Джерело спектра не є ні файлом, ні передбаченням.",
+ "181": "На малюнку немає спектра {0}.",
+ "182": "У лінійчастих спектрів немає площ для інтегрування.",
+ "183": "value має бути більшим за нуль.",
+ "184": "from і to мають бути двома різними значеннями x.",
+ "185": "У спектра немає інтеграла {0}.",
+ "186": "У цього спектра немає початкового файлу; експортуйте без original=1.",
+ "187": "FormChem розміщує зображення PNG, JPEG, GIF, WebP і SVG та спектри JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/uk/part14.json b/frontend/src/i18n/locales/uk/part14.json
new file mode 100644
index 00000000..668f7f6d
--- /dev/null
+++ b/frontend/src/i18n/locales/uk/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Відображення",
+ "1": "Поверхня",
+ "2": "Нічого експортувати: 3D-вигляд порожній.",
+ "3": "Не вдалося експортувати",
+ "4": "Виділіть структуру, щоб показати її в 3D.",
+ "5": "Побудувати 3D",
+ "6": "Вставити 3D-вигляд",
+ "7": "Виберіть файл PDB, mmCIF, SDF або MOL.",
+ "8": "Не вдалося розмістити 3D-структуру на сторінці",
+ "9": "Виділіть 3D-об’єкт, відкритий із файлу PDB або mmCIF.",
+ "10": "У цій моделі немає лігандів.",
+ "11": "Не вдалося видобути ліганд",
+ "12": "3D-координат поки немає: «Побудувати 3D» створює конформер за малюнком.",
+ "13": "Файл 3D-структури...",
+ "14": "Видобути ліганд...",
+ "15": "Експортувати 3D-структуру...",
+ "16": "Сканування двогранного кута...",
+ "17": "Вимірювання в 3D",
+ "18": "Експортувати 3D-вигляд як PNG...",
+ "19": "Експортувати 3D-вигляд як glTF...",
+ "20": "Видобуто {0}: {1} (порядки зв’язків визначено за геометрією)",
+ "21": "Видобуто {0}: {1}",
+ "22": "Спершу відкрийте 3D-вигляд",
+ "23": "Відкриває панель 3D-вигляду для виділеної структури (або виділеного 3D-об’єкта на сторінці) і стежить за виділенням. Спершу структурі потрібні 3D-координати: їх створює «Побудувати 3D».",
+ "24": "Будує 3D-конформер виділеної структури за її 2D-малюнком (клини, геометрія подвійних зв’язків і заряди зберігаються), мінімізує його у вибраному силовому полі та зберігає в малюнку одним кроком скасування; 3D-вигляд показує його.",
+ "25": "Мінімізує показаний конформер виділеної структури в силовому полі, вибраному в 3D-вигляді (за замовчуванням MMFF94, UFF, якщо для MMFF94 немає параметрів), і повідомляє енергію до та після, одним кроком скасування.",
+ "26": "Створює ансамбль конформерів виділеної структури (ETKDG, відсів за RMSD, кожен мінімізовано) і залишає ті, що в межах енергетичного вікна; з n, window і method працює без діалогу.",
+ "27": "Кількість конформерів для створення",
+ "28": "Енергетичне вікно в kcal/mol",
+ "29": "Розміщує на сторінці поруч із виділеною структурою її 3D-вигляд (спершу будуючи 3D-координати, якщо їх немає) і відкриває пов’язану з ним панель 3D-вигляду; обертання чи зміна стилю моделі оновлює картинку на сторінці.",
+ "30": "Відкриває файл PDB, mmCIF, SDF або MOL як 3D-об’єкт на сторінці (білки у вигляді стрічки, ліганди як кулі й стрижні, вода прихована, ліганд у фокусі) і показує його в 3D-вигляді.",
+ "31": "Перетворює ліганд виділеного 3D-об’єкта (відкритого з файлу PDB або mmCIF) на 2D-структуру поруч із ним одним кроком скасування: порядки зв’язків беруться зі вбудованого шаблону для поширених лігандів, інакше визначаються за геометрією й повідомляються; координати з файлу стають її конформером. З ligand бере вказаний ліганд; без нього питає, якщо в моделі їх кілька.",
+ "32": "Ключ ліганда chain:het:number або код het",
+ "33": "Виділіть 3D-об’єкт, відкритий із файлу PDB або mmCIF",
+ "34": "Зберігає 3D-координати виділеної структури з усіма атомами водню: молфайл MDL (показаний конформер), файл SD (усі конформери, з полями даних про енергію та метод), PDB або XYZ (показаний конформер або всі конформери як моделі чи кадри); 3D-об’єкт, відкритий із файлу PDB або mmCIF, зберігає свій початковий файл. Без format питає.",
+ "35": "Формат файлу",
+ "36": "Усі конформери замість показаного (за замовчуванням true для sdf)",
+ "37": "Сканує двогранний кут за чотирма атомами, вибраними в 3D-вигляді (або за останнім виміряним двогранним кутом) із релаксованою мінімізацією та будує графік енергії від кута.",
+ "38": "Вимірює відстань (два атоми), кут (три) або двогранний кут (чотири) у 3D-вигляді й додає до списку; з atoms (ідентифікатори атомів фрагмента на кшталт a1, атоми водню як a1:h0, або серійні номери PDB) вимірює їх, інакше перемикається на вибір атомів.",
+ "39": "Від двох до чотирьох ідентифікаторів атомів",
+ "40": "Зберігає 3D-вигляд як картинку PNG у розмірі на екрані; transparent прибирає тло.",
+ "41": "Зберігає 3D-вигляд як двійковий файл glTF 2.0 (.glb): атоми як сфери, зв’язки як циліндри з кольорами елементів, 1 ангстрем = 1 см, для 3D-переглядачів, слайдів і друку.",
+ "42": "Без поверхні",
+ "43": "Прибирає молекулярну поверхню з 3D-вигляду.",
+ "44": "Поверхня Ван-дер-Ваальса",
+ "45": "Показує поверхню Ван-дер-Ваальса в 3D-вигляді.",
+ "46": "Поверхня, доступна розчиннику",
+ "47": "Показує поверхню, доступну розчиннику (зонд 1,4 ангстрем), у 3D-вигляді.",
+ "48": "Поверхня, виключена розчинником",
+ "49": "Показує поверхню, виключену розчинником, у 3D-вигляді.",
+ "50": "Поверхня з картою ЕСП",
+ "51": "Забарвлює поверхню за наближеним електростатичним потенціалом (ЕСП) з емпіричних часткових зарядів рушія (червоний від’ємний, синій додатний) з легендою, що називає метод.",
+ "52": "Показує 3D-вигляд у стилі каркаса; для 3D-об’єкта на сторінці вибір зберігається разом із ним.",
+ "53": "Показує 3D-вигляд у стилі стрижнів; для 3D-об’єкта на сторінці вибір зберігається разом із ним.",
+ "54": "Кулі й стрижні",
+ "55": "Показує 3D-вигляд у стилі куль і стрижнів; для 3D-об’єкта на сторінці вибір зберігається разом із ним.",
+ "56": "Заповнення простору",
+ "57": "Показує 3D-вигляд у стилі заповнення простору; для 3D-об’єкта на сторінці вибір зберігається разом із ним.",
+ "58": "Стрічка",
+ "59": "Показує 3D-вигляд у стрічковому стилі (білки та нуклеїнові кислоти; ліганди лишаються кулями й стрижнями); для 3D-об’єкта на сторінці вибір зберігається разом із ним.",
+ "60": "Двогранний кут (градуси)",
+ "61": "Відносна енергія (kcal/mol)",
+ "62": "Мінімум {0}°",
+ "63": "Експорт 3D-структури",
+ "64": "Усі конформери (записи SDF, моделі PDB, кадри XYZ)",
+ "65": "Збережено 1 конформер; усі атоми водню записуються з їхніми 3D-положеннями.",
+ "66": "Видобути ліганд",
+ "67": "Ліганд",
+ "68": "Ліганд стає 2D-структурою поруч із моделлю, а його координати з файлу зберігаються як його конформер.",
+ "69": "Видобути",
+ "70": "Файл SD (.sdf)",
+ "71": "Молфайл MDL (.mol)",
+ "72": "Збережено конформерів: {0}; усі атоми водню записуються з їхніми 3D-положеннями.",
+ "73": "Конформери",
+ "74": "Енергетичне вікно (kcal/mol)",
+ "75": "Вбудовування ETKDG з фіксованим початковим числом, близькі дублікати відсіюються за RMSD важких атомів 0,5 Å, кожен конформер мінімізовано; найнижчий стає показаним конформером.",
+ "76": "Створити",
+ "77": "Енергетичний профіль сканування двогранного кута",
+ "78": "Сканування двогранного кута",
+ "79": "Від (градуси)",
+ "80": "До (градуси)",
+ "81": "Крок (градуси)",
+ "82": "Зберігати кожну точку як конформер (один крок скасування)",
+ "83": "Запустити сканування",
+ "84": "Релаксоване сканування: за кожного кута двогранний кут утримується, а все інше мінімізується.",
+ "85": "Кінцевий кут має бути більшим за початковий.",
+ "86": "Сканування...",
+ "87": "Сканування не вдалося",
+ "88": "бар’єр {0} kcal/mol",
+ "89": "Стиль відображення",
+ "90": "Забарвити поверхню за електростатичним потенціалом з емпіричних часткових зарядів",
+ "91": "ЕСП",
+ "92": "Мінімізувати",
+ "93": "Сканувати...",
+ "94": "Сфокусуватися на ліганді",
+ "95": "Скинути вигляд",
+ "96": "Обертання",
+ "97": "Експортувати 3D-вигляд",
+ "98": "Виміряти",
+ "99": "Вимірювання",
+ "100": "Зображення PNG",
+ "101": "Зображення PNG, прозоре",
+ "102": "Двійковий glTF (.glb)",
+ "103": "Для 3D потрібен WebGL, якого це вікно не надає.",
+ "104": "Завантаження 3D-переглядача...",
+ "105": "Не вдалося завантажити 3D-переглядач",
+ "106": "Відкрийте малюнок і виділіть структуру, щоб побачити її в 3D.",
+ "107": "Виділіть структуру на сторінці, щоб побачити її в 3D.",
+ "108": "Не вдалося прочитати 3D-структуру",
+ "109": "Цей конформер не можна записати як молфайл",
+ "110": "Обертання вимкнено: система просить зменшити анімацію",
+ "111": "У моделі PDB або CIF немає конформерів.",
+ "112": "Енергії відносно найнижчої; клацніть рядок, щоб показати конформер.",
+ "113": "Цей список заповнюють «Побудувати 3D» і «Конформери...».",
+ "114": "Часткові заряди недоступні",
+ "115": "у рушії поки немає 3D-маршрутів",
+ "116": "не зійшлося",
+ "117": "Виберіть чотири пов’язані поспіль атоми (двогранний кут), потім натисніть «Сканувати».",
+ "118": "Позначте «Зберігати кожну точку як конформер», щоб побачити геометрії.",
+ "119": "Показати конформер",
+ "120": "Оновити 3D-вигляд",
+ "121": "Не вдалося оновити знімок сторінки",
+ "122": "Без поверхні",
+ "123": "Ван-дер-Ваальса",
+ "124": "Доступна розчиннику",
+ "125": "Виключена розчинником",
+ "126": "Відстань",
+ "127": "Кут",
+ "128": "Двогранний кут",
+ "129": "{0} kcal/mol, {1}, не зійшлося",
+ "130": "Вибрано {0} / {1}: {2}",
+ "131": "Клацніть атоми, щоб виміряти; потрібно атомів: {0}",
+ "132": "ЕСП ({0}): {1}, червоний {2} e до синього +{3} e",
+ "133": "Відстань {0}: {1}",
+ "134": "Кут {0}: {1}",
+ "135": "Двогранний кут {0}: {1}",
+ "136": "Побудовано: {0}",
+ "137": "Мінімізовано: {0}",
+ "138": "Залишено конформерів: {0} з {1}",
+ "139": "Залишено конформерів: {0}",
+ "140": "Двогранний кут {0}",
+ "141": "Не вдалося закодувати PNG"
+}
diff --git a/frontend/src/i18n/locales/uk/part15.json b/frontend/src/i18n/locales/uk/part15.json
new file mode 100644
index 00000000..e97170be
--- /dev/null
+++ b/frontend/src/i18n/locales/uk/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "наближено, за емпіричними зарядами",
+ "1": "Стереоцентрів або подвійних зв’язків без указаної конфігурації: {0}; вибрано одну конфігурацію.",
+ "2": "Стереоміток малюнка, не відтворюваних у 3D: {0}.",
+ "3": "Побудовано намальованого представника груп розширеної стереохімії {0}; 3D-модель — це один стереоізомер суміші (відносної або рацемічної), яку описує малюнок.",
+ "4": "Вбудовування виконано {0} разів (початкові числа {1}), щоб зберегти намальовану стереохімію.",
+ "5": "Пар важких атомів ближче {1} їхнього контакту Ван-дер-Ваальса: {0}.",
+ "6": "Використано універсальне силове поле: {0}.",
+ "7": "немає параметрів {0} для {1}",
+ "8": "{0} не змогло визначити тип кожного атома",
+ "9": "Конформерів, що змінили намальовану стереохімію під час мінімізації й виключені: {0}.",
+ "10": "Понад 300 важких атомів: за такого розміру якість добору конформерів падає.",
+ "11": "Центральний зв’язок у кільці; кільце напружується, щоб слідувати куту.",
+ "12": "У структури не було 3D-координат; сканування почалося з нового вбудовування.",
+ "13": "Структура змінилася під час обчислення 3D; виконайте команду знову.",
+ "14": "У малюнку немає об’єкта {0}.",
+ "15": "У {0} поки немає 3D-координат; спершу побудуйте 3D.",
+ "16": "У {0} немає конформера {1}.",
+ "17": "У структурі немає атомів.",
+ "18": "Для 3D потрібні справжні атоми: {0} атомів є підписами, R-групами або точками приєднання ({1}).",
+ "19": "Не вдалося додати атоми водню: {0}",
+ "20": "Атомів з воднями в структурі: {0}; 3D обробляє не більше {1}.",
+ "21": "3D-координати не підходять до цієї структури (немає даних для {0}); побудуйте 3D знову.",
+ "22": "3D-координати не підходять до цієї структури (кількість воднів змінилася); побудуйте 3D знову.",
+ "23": "Не вдалося виконати 3D-вбудовування структури: {0}",
+ "24": "Не вдалося виконати 3D-вбудовування структури; перевірте її валентності та стереохімію.",
+ "25": "Не вдалося виконати вбудовування конформерів: {0}",
+ "26": "Не вдалося вбудувати жодного конформера; перевірте валентності та стереохімію структури.",
+ "27": "Кожен вбудований конформер утратив намальовану стереохімію після мінімізації.",
+ "28": "Жодне силове поле не має параметрів для цієї структури ({0}).",
+ "29": "Не вдалося налаштувати універсальне силове поле: {0}",
+ "30": "Не вдалося налаштувати універсальне силове поле.",
+ "31": "Невідомі атоми: {0}; використовуйте ідентифікатори атомів фрагмента або водень як a1:h0.",
+ "32": "Чотири атоми мають бути різними.",
+ "33": "Чотири атоми мають утворювати ланцюжок зв’язків (a1-a2-a3-a4).",
+ "34": "Не вдалося записати 3D-файл: {0}",
+ "35": "Файл не є файлом PDB, mmCIF, SDF або MOL, який FormChem може прочитати.",
+ "36": "У файлі більше {0} атомів.",
+ "37": "У файлі PDB немає записів ATOM або HETATM.",
+ "38": "У таблиці atom_site mmCIF немає стовпців Cartn_x, Cartn_y і Cartn_z.",
+ "39": "У CIF є дробові координати, але немає повної елементарної комірки.",
+ "40": "У CIF немає таблиці atom_site.",
+ "41": "У CIF немає читабельних атомів.",
+ "42": "У файлі немає записів.",
+ "43": "У файлі записів: {0}; 3D-імпорт читає до {1}.",
+ "44": "Не вдалося прочитати жодного запису файлу.",
+ "45": "Це не файл PDB або mmCIF: {0}",
+ "46": "Не вдалося перетворити на малюнок FormChem: {0}, причина: {1}.",
+ "47": "Модель PDB розміщено як 3D-об’єкт: {0}.",
+ "48": "Модель mmCIF розміщено як 3D-об’єкт: {0}.",
+ "49": "Рядків ATOM або HETATM з нечитабельними координатами, які пропущено: {0}.",
+ "50": "Рядків atom_site з нечитабельними координатами, які пропущено: {0}.",
+ "51": "CIF малої молекули: асиметричну одиницю прочитано за дробовими координатами; симетричні копії не створюються.",
+ "52": "{0}: проблеми з валентністю; прочитано без санітарної обробки.",
+ "53": "{0}: лише 2D-координати; конформер не збережено.",
+ "54": "Атомів водню, яких не було у файлі й які розміщено за геометрією: {0}.",
+ "55": "{0}: не вдалося прочитати, причина: {1}",
+ "56": "{0}: не вдалося прочитати.",
+ "57": "Запис {0}",
+ "58": "Структура",
+ "59": "3D-координати файлу збережено як конформер 1 структури; «Побудувати 3D» для їх перегляду не потрібне.",
+ "60": "3D-координати файлу збережено як конформери; структур: {0}; «Побудувати 3D» для їх перегляду не потрібне.",
+ "61": "{0} — одиночний іон; немає структури для видобування.",
+ "62": "Не вдалося прочитати атоми {0}.",
+ "63": "У структурі немає ліганда {0}; ліганди: {1}.",
+ "64": "У малюнку немає 3D-моделі {0}.",
+ "65": "FormChem розміщує зображення PNG, JPEG, GIF, WebP і SVG, спектри JCAMP-DX і файли структур PDB, mmCIF, SDF і MOL."
+}
diff --git a/frontend/src/i18n/locales/vi/part12.json b/frontend/src/i18n/locales/vi/part12.json
new file mode 100644
index 00000000..f2dadabf
--- /dev/null
+++ b/frontend/src/i18n/locales/vi/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "Phổ",
+ "1": "Hãy vẽ hoặc chọn một cấu trúc để đặt tên.",
+ "2": "Không thể tính tên",
+ "3": "FormChem không có tên cho cấu trúc này.",
+ "4": "Sao chép tên",
+ "5": "Đã sao chép tên: {0}",
+ "6": "Tên hóa học cần chèn; bỏ trống để mở hộp thoại",
+ "7": "Sao chép tên của cấu trúc đã chọn (hoặc các cấu trúc trên trang) dưới dạng văn bản thuần: tên thông thường nếu FormChem biết, nếu không thì tên hệ thống, chỉ được đưa ra khi đọc ngược lại ra đúng cấu trúc đó.",
+ "8": "trivial hoặc systematic để chọn tên cần sao chép; bỏ trống để lấy tên đầu tiên",
+ "9": "Phổ dự đoán đã được cập nhật.",
+ "10": "Làm mới phổ dự đoán",
+ "11": "Hãy chọn một cấu trúc trước",
+ "12": "Hãy chọn một phổ dự đoán trước",
+ "13": "Đã thêm phổ 1H NMR dự đoán ({0})",
+ "14": "Đã thêm phổ 13C NMR dự đoán ({0})",
+ "15": "Đã làm mới phổ dự đoán ({0})",
+ "16": "ID mảnh của cấu trúc; mặc định là cấu trúc đã chọn, hoặc cấu trúc duy nhất trên trang",
+ "17": "Tần số máy đo phổ tính bằng MHz (mặc định 400 cho 1H, 100 cho 13C)",
+ "18": "Thêm phổ 1H NMR dự đoán của cấu trúc đã chọn ngay bên cạnh nó, trong một bước hoàn tác: một đối tượng phổ được tính theo quy tắc gia số riêng của FormChem (không có cơ sở dữ liệu độ dịch chuyển hóa học), có các đa vạch và tích phân được liên kết với các nguyên tử của cấu trúc, đặt tiêu đề theo phương pháp, phiên bản và tần số. Đường cong luôn được tính lại từ cấu trúc, không bao giờ được lưu.",
+ "19": "Thêm phổ 13C NMR dự đoán của cấu trúc đã chọn ngay bên cạnh nó, trong một bước hoàn tác: một đối tượng phổ được tính theo quy tắc gia số riêng của FormChem (không có cơ sở dữ liệu độ dịch chuyển hóa học), có các đỉnh được liên kết với các nguyên tử của cấu trúc, đặt tiêu đề theo phương pháp, phiên bản và tần số. Đường cong luôn được tính lại từ cấu trúc, không bao giờ được lưu.",
+ "20": "Không thể dự đoán phổ",
+ "21": "Dự đoán phổ 1H NMR",
+ "22": "Dự đoán phổ 13C NMR",
+ "23": "Tính lại các đa vạch, tích phân hoặc đỉnh của phổ dự đoán sau khi cấu trúc của nó thay đổi, bằng phiên bản bộ dự đoán đang chạy, trong một bước hoàn tác; không có gì thay đổi nếu phổ đã được cập nhật.",
+ "24": "ID phổ dự đoán; mặc định là phổ đã chọn hoặc phổ đang mở trong trình sửa phổ",
+ "25": "Không thể làm mới phổ",
+ "26": "Không có đỉnh mới trong khoảng đó.",
+ "27": "Kéo qua một khoảng trong trình sửa phổ để lấy tích phân.",
+ "28": "Liên kết đỉnh với nguyên tử",
+ "29": "Bỏ liên kết đỉnh",
+ "30": "Trục Y của phổ",
+ "31": "Phổ từ tệp...",
+ "32": "Sửa phổ...",
+ "33": "Chọn đỉnh",
+ "34": "Lấy tích phân",
+ "35": "Độ truyền qua hoặc độ hấp thụ",
+ "36": "Xuất phổ...",
+ "37": "Hãy chọn một phổ trước",
+ "38": "không có phổ nào có id {0}",
+ "39": "Đã chọn đỉnh: {0} (đã có sẵn: {1})",
+ "40": "Đã chọn đỉnh: {0}",
+ "41": "Tích phân chỉ dùng cho phổ NMR",
+ "42": "Hãy chọn một đỉnh, tích phân hoặc đa vạch trong trình sửa phổ trước",
+ "43": "Tất cả các nguyên tử phải thuộc cùng một cấu trúc",
+ "44": "Chỉ phổ IR, Raman và UV-Vis mới chuyển đổi giữa độ truyền qua và độ hấp thụ",
+ "45": "Đã xuất: {0}",
+ "46": "ID đối tượng phổ; mặc định là phổ đã chọn hoặc phổ đang mở trong trình sửa phổ",
+ "47": "Nhập một tệp phổ JCAMP-DX vào bản vẽ đang dùng (mỗi khối dữ liệu một đối tượng phổ, tệp được giữ nguyên từng byte), trong một bước hoàn tác cho mỗi tệp. Không có path thì mở hộp thoại chọn tệp.",
+ "48": "Đường dẫn tuyệt đối của tệp .jdx, .dx hoặc .jcamp",
+ "49": "Không thể nhập phổ",
+ "50": "Mở trình sửa phổ cho phổ đã chọn (giống như nhấp đúp vào nó).",
+ "51": "Không thể mở phổ",
+ "52": "Tìm các đỉnh của một phổ trong một khoảng (mặc định là khoảng đang hiển thị) và thêm vào danh sách đỉnh, bỏ qua các đỉnh đã có, trong một bước hoàn tác.",
+ "53": "Đầu khoảng theo đơn vị x (cm-1, nm, m/z, ppm)",
+ "54": "Cuối khoảng theo đơn vị x",
+ "55": "Ngưỡng phát hiện tùy chọn theo đơn vị y",
+ "56": "Thay thế danh sách đỉnh thay vì thêm vào",
+ "57": "Không thể chọn đỉnh",
+ "58": "Thêm tích phân NMR trên một khoảng, được chia tỷ lệ như các tích phân hiện có (hoặc theo value, chia lại tỷ lệ phần còn lại), trong một bước hoàn tác. Không có from và to thì chuyển trình sửa phổ sang công cụ lấy tích phân.",
+ "59": "Đầu khoảng tính bằng ppm",
+ "60": "Cuối khoảng tính bằng ppm",
+ "61": "Giá trị mà tích phân này cần hiển thị, ví dụ số proton",
+ "62": "Không thể lấy tích phân",
+ "63": "Liên kết một đỉnh, tích phân hoặc đa vạch với các nguyên tử của một cấu trúc, trong một bước hoàn tác. Không có atoms thì dùng các nguyên tử đã chọn, hoặc chờ người dùng nhấp vào các nguyên tử trong bản vẽ.",
+ "64": "ID đỉnh, tích phân hoặc đa vạch; mặc định là mục đã chọn trong trình sửa phổ",
+ "65": "ID cấu trúc (mảnh) mà các nguyên tử thuộc về",
+ "66": "ID nguyên tử",
+ "67": "Không thể liên kết đỉnh",
+ "68": "Gỡ liên kết nguyên tử của một đỉnh, tích phân hoặc đa vạch, trong một bước hoàn tác.",
+ "69": "Không thể bỏ liên kết đỉnh",
+ "70": "Hiển thị phổ IR, Raman hoặc UV-Vis theo độ truyền qua hoặc độ hấp thụ (chuyển đổi nếu không có mode), trong một bước hoàn tác.",
+ "71": "Trục Y cần hiển thị; bỏ trống để chuyển đổi",
+ "72": "Không thể đổi trục y",
+ "73": "Lưu một phổ dưới dạng JCAMP-DX (kèm bảng đỉnh nếu có đỉnh) hoặc CSV của mọi điểm, thông qua engine.",
+ "74": "Định dạng tệp, mặc định jdx",
+ "75": "Với jdx: tệp gốc đã nhập, giữ nguyên",
+ "76": "Đường dẫn tuyệt đối để ghi; bỏ trống để hỏi",
+ "77": "Không thể xuất phổ",
+ "78": "Chèn phổ từ tệp",
+ "79": "Tệp không chứa phổ nào mà FormChem có thể vẽ",
+ "80": "Chèn phổ",
+ "81": "Không thể đặt phổ: tệp của nó không tới được bản vẽ.",
+ "82": "Số phổ đã chèn: {0}",
+ "83": "Bước sóng (µm)",
+ "84": "Số sóng (cm⁻¹)",
+ "85": "Độ dịch chuyển Raman (cm⁻¹)",
+ "86": "Bước sóng (nm)",
+ "87": "Tần số (Hz)",
+ "88": "δ (ppm)",
+ "89": "Độ truyền qua (%)",
+ "90": "Độ truyền qua",
+ "91": "Độ hấp thụ",
+ "92": "Độ phổ biến tương đối (%)",
+ "93": "Cường độ",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "Raman",
+ "98": "IR",
+ "99": "Dự đoán {0}, {1} MHz ({2})",
+ "100": "Dự đoán {0}, {1} MHz",
+ "101": "Dự đoán {0} ({1})",
+ "102": "Dự đoán {0}",
+ "103": "{0}, {1} MHz",
+ "104": "Phổ không khả dụng: {0}",
+ "105": "Đang tải phổ",
+ "106": "Tên thông thường",
+ "107": "Hệ thống",
+ "108": "Độ tin cậy cao",
+ "109": "Độ tin cậy trung bình",
+ "110": "Độ tin cậy thấp",
+ "111": "Không đọc được",
+ "112": "Tên FormChem",
+ "113": "Không thể đọc tên",
+ "114": "Chèn cấu trúc từ tên",
+ "115": "Cấu trúc từ tên",
+ "116": "Một tên, chẳng hạn aspirin hoặc 2-metylpropan-1-ol",
+ "117": "Tên hóa học",
+ "118": "Nhập một tên để xem cấu trúc của nó.",
+ "119": "Không có cấu trúc cho tên này",
+ "120": "Từ điển",
+ "121": "Bộ phân tích hệ thống",
+ "122": "Bộ đặt tên theo quy tắc, có kiểm tra khứ hồi",
+ "123": "Công cụ phổ",
+ "124": "Hiện toàn bộ phổ",
+ "125": "Trục Y",
+ "126": "Hiện khoảng này trên trang",
+ "127": "Nhấp đúp vào một phổ trong bản vẽ để sửa tại đây.",
+ "128": "Đỉnh và tích phân",
+ "129": "Dự đoán",
+ "130": "Giá trị tích phân",
+ "131": "Liên kết với nguyên tử",
+ "132": "Bỏ liên kết",
+ "133": "1 nguyên tử",
+ "134": "Nguyên tử cần liên kết",
+ "135": "Nhấp vào các nguyên tử khác, rồi chọn Xong.",
+ "136": "Nhấp vào các nguyên tử trong bản vẽ thuộc về đỉnh này, rồi chọn Xong.",
+ "137": "Không có gì để lấy tích phân trong khoảng đó.",
+ "138": "Xóa đỉnh",
+ "139": "Thêm đỉnh",
+ "140": "Đã liên kết với 1 nguyên tử",
+ "141": "Đặt khoảng của phổ",
+ "142": "Nhập một số dương.",
+ "143": "Không thể đặt tích phân",
+ "144": "Kéo và thu phóng: kéo để dịch, lăn con lăn để thu phóng, Shift-kéo để thu phóng vào một khoảng",
+ "145": "Thu phóng vào một khoảng: kéo qua đồ thị",
+ "146": "Chọn đỉnh: kéo qua một khoảng",
+ "147": "Thêm hoặc xóa đỉnh: nhấp gần một đỉnh",
+ "148": "Lấy tích phân: kéo qua một khoảng",
+ "149": "Đỉnh",
+ "150": "Tích phân",
+ "151": "Đa vạch",
+ "152": "Số nguyên tử: {0}",
+ "153": "Đã liên kết với {0}",
+ "154": "Kéo để dịch, lăn con lăn để thu phóng, Shift-kéo để thu phóng vào một khoảng. Nhấp vào một nhãn để chọn nó.",
+ "155": "Kéo qua đồ thị để thu phóng vào khoảng đó.",
+ "156": "Kéo qua một khoảng để chọn các đỉnh của nó.",
+ "157": "Nhấp gần một đỉnh để thêm nó; nhấp vào nhãn đỉnh để xóa.",
+ "158": "Kéo qua một khoảng để lấy tích phân của nó.",
+ "159": "Đã liên kết với số nguyên tử: {0}"
+}
diff --git a/frontend/src/i18n/locales/vi/part13.json b/frontend/src/i18n/locales/vi/part13.json
new file mode 100644
index 00000000..5e5c7c87
--- /dev/null
+++ b/frontend/src/i18n/locales/vi/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "engine trả về một tệp rỗng",
+ "1": "tên dài hơn {0} ký tự",
+ "2": "các mảnh trên {0} nguyên tử không được đặt tên",
+ "3": "Cấu trúc có nhãn, nhóm R hoặc nguyên tử bất kỳ, những thứ không có tên.",
+ "4": "Không thể đọc cấu trúc thành phân tử (hãy kiểm tra hóa trị).",
+ "5": "Không có cấu trúc để đặt tên.",
+ "6": "Tên chỉ số đảo (gốc trước, rồi dấu phẩy và các nhóm thế) không được đọc; hãy viết tên theo thứ tự thông thường, chẳng hạn 1,2-dichlorobenzene.",
+ "7": "D- và L- chỉ được đọc cho các amino axit và đường trong từ điển của FormChem; hãy cho mô tả R hoặc S với các tên khác.",
+ "8": "FormChem đã đọc toàn bộ tên, nhưng nó không tạo thành tên cấu trúc hoàn chỉnh (có thể thiếu một mạch chính như hexane hoặc benzene, hoặc một hậu tố).",
+ "9": "FormChem không thể đọc tên từ ký tự {0} (\"{1}\").",
+ "10": "FormChem đã đọc tên, nhưng {0}.",
+ "11": "không thể hoàn thiện cấu trúc",
+ "12": "Tên có thể đọc theo nhiều cách; FormChem đã vẽ cách đọc ít giả định nhất.",
+ "13": "Tên không cho mô tả lập thể nào, nên các tâm lập thể và liên kết đôi được vẽ ở dạng không xác định.",
+ "14": "Không có tên hệ thống: {0}.",
+ "15": "Tên hệ thống mà FormChem tạo ra khi đọc ngược lại không ra cùng cấu trúc, nên không được hiển thị.",
+ "16": "liên kết đôi đó không thể là E hoặc Z",
+ "17": "chỉ số vị trí của mô tả {0} không phải là vị trí của mạch chính",
+ "18": "vị trí {0} không bắt đầu liên kết đôi nào có thể là E hoặc Z",
+ "19": "{0} cần đúng một liên kết đôi có thể là cis hoặc trans; cấu trúc này có {1}",
+ "20": "{0} không rõ đối với liên kết đôi này; hãy cho E hoặc Z thay thế",
+ "21": "({0}) cần một chỉ số vị trí: cấu trúc có {1} tâm lập thể",
+ "22": "vị trí {0} không phải là tâm lập thể, nên ({1}) không áp dụng được",
+ "23": "({0}) cần một chỉ số vị trí: cấu trúc có {1} liên kết đôi có thể là E hoặc Z",
+ "24": "không thể gán cho vị trí {0}: {1}",
+ "25": "không thể gán cho liên kết đôi đó: {0}",
+ "26": "{0} không nói rõ cấu hình nào được ngụ ý, nên cấu trúc được vẽ không có lập thể.",
+ "27": "{0} không có điểm gắn",
+ "28": "không còn chỗ cho {0} tại {1}",
+ "29": "{0} không thể tạo liên kết ở đó",
+ "30": "các chuỗi dài hơn {0} cacbon chưa được đọc",
+ "31": "{0} quá nhỏ để thành vòng",
+ "32": "{0}-{1} là một tautomer mà FormChem chưa vẽ được từ tên",
+ "33": "chỉ số vị trí {0} không phải là vị trí của {1}",
+ "34": "{0} không phải là vị trí trên chuỗi",
+ "35": "liên kết bội không thể bắt đầu ở vị trí {0} của {1}",
+ "36": "vị trí {0} của {1} không thể mang liên kết bội đó",
+ "37": "không còn chỗ cho liên kết bội ở vị trí {0} của {1}",
+ "38": "không còn chỗ cho các liên kết bội của {0}",
+ "39": "Vị trí các liên kết bội của {0} không được cho; được vẽ ở các vị trí thấp nhất.",
+ "40": "-{0} cần một chuỗi hở; trên vòng, hậu tố là carbaldehyde, carboxylic acid, carbonitrile hoặc carboxamide",
+ "41": "một chuỗi chỉ có hai đầu cho -{0}",
+ "42": "{0} quá ngắn cho hai nhóm -{1}",
+ "43": "không còn chỗ cho -{0} trên {1}",
+ "44": "Vị trí của -{0} trên {1} không được cho; được vẽ ở vị trí thấp nhất.",
+ "45": "-{0} phải ở cuối chuỗi, không phải ở {1}",
+ "46": "không còn chỗ cho -{0} tại {1}",
+ "47": "ortho, meta và para cần một vòng benzen",
+ "48": "ortho, meta hoặc para với một nhóm cần một mạch chính như phenol, aniline hoặc toluene",
+ "49": "không còn chỗ cho {0} trên {1}",
+ "50": "không còn chỗ cho {0} nhóm {1} trên {2}",
+ "51": "Vị trí của {0} trên {1} không được cho; được vẽ ở vị trí trống thấp nhất.",
+ "52": "{0} không thể mang nhóm thế",
+ "53": "một nhóm acyl được gắn tại cacbon cacbonyl của nó",
+ "54": "{0} không có vị trí trống",
+ "55": "Vị trí gắn của {0} không được cho; giả định là vị trí {1}.",
+ "56": "{0} không còn chỗ để gắn",
+ "57": "các chỉ số vị trí {0} trước {1} không được dùng",
+ "58": "{0} không thể đứng thành một từ riêng",
+ "59": "\"{0}\" cần {1} nhóm đứng trước, nhưng tên cho {2}",
+ "60": "\"{0}\" cần {1} nhóm đứng trước, nhưng tên cho {2}",
+ "61": "tên cho {0} nhóm alkyl cho {1} vị trí este",
+ "62": "tên cho {0} nhóm alkyl cho {1} vị trí este",
+ "63": "tên cho {0} nhóm alkyl cho {1} vị trí este",
+ "64": "tên cho {0} nhóm alkyl cho {1} vị trí este",
+ "65": "cấu trúc mà nó mô tả không hợp lệ ({0})",
+ "66": "-one tại {0} sẽ là một aldehyde; aldehyde được gọi tên bằng -al",
+ "67": "vị trí {0} của {1}",
+ "68": "quá nhiều nhóm thế giống nhau",
+ "69": "chỉ số vị trí hỗn hợp",
+ "70": "các loại liên kết khác thường chưa được đặt tên",
+ "71": "một hệ vòng mà FormChem chưa đặt tên được",
+ "72": "các vòng thơm có liên kết đôi ngoài vòng (như pyridone) chưa được đặt tên",
+ "73": "đồng vị và gốc tự do chưa được đặt tên",
+ "74": "các halogen siêu hóa trị không được đặt tên",
+ "75": "các nhóm nitơ mang điện ngoài nitro chưa được đặt tên",
+ "76": "các nguyên tử mang điện chưa được đặt tên",
+ "77": "các oxit của lưu huỳnh, nitơ và photpho chưa được đặt tên",
+ "78": "nhóm oxy này chưa được đặt tên",
+ "79": "sulfoxide, sulfone và các nhóm lưu huỳnh khác chưa được đặt tên",
+ "80": "imine, azo và các nhóm nitơ tương tự chưa được đặt tên",
+ "81": "{0} chưa được đặt tên",
+ "82": "các chuỗi nhóm thế dài hơn 20 cacbon không được đặt tên",
+ "83": "các nhóm acyl không no chưa được đặt tên",
+ "84": "các nhóm ylidene có nhóm thế chưa được đặt tên",
+ "85": "các nhóm ylidene vòng chưa được đặt tên",
+ "86": "các vòng gắn hai lần chưa được đặt tên",
+ "87": "không tìm thấy cách đánh số cho nhóm thế vòng",
+ "88": "các este có phần ancol khác nhau chưa được đặt tên",
+ "89": "không tìm thấy chuỗi hoặc vòng chính",
+ "90": "các este vòng (lacton) chưa được đặt tên",
+ "91": "các nhóm thế trên nhiều hơn một nitơ amin hoặc amit chưa được đặt tên",
+ "92": "các tâm lập thể ngoài chuỗi hoặc vòng chính chưa được đặt tên",
+ "93": "hình học liên kết đôi ngoài chuỗi chính chưa được đặt tên",
+ "94": "các tâm giả bất đối chưa được đặt tên",
+ "95": "hình học liên kết đôi này chưa được đặt tên",
+ "96": "các chuỗi dài hơn 20 cacbon không được đặt tên",
+ "97": "quá nhiều nhóm giống nhau",
+ "98": "cấu trúc có lỗi hóa trị",
+ "99": "muối và hỗn hợp chưa được đặt tên hệ thống",
+ "100": "các cấu trúc có hơn {0} nguyên tử nặng chưa được đặt tên hệ thống",
+ "101": "các hợp chất của {0} chưa được đặt tên hệ thống",
+ "102": "nguyên tử truy vấn và nhóm R không có tên",
+ "103": "hiđrua của một dị nguyên tử chỉ được đặt tên từ từ điển",
+ "104": "{0} không phải là đối tượng của bản vẽ này.",
+ "105": "{0} không có nguyên tử.",
+ "106": "Mảnh không có nguyên tử.",
+ "107": "Bản vẽ không có trang.",
+ "108": "{0} không phải là phổ của bản vẽ này.",
+ "109": "Cấu trúc {0} mà dự đoán này thuộc về không còn trong bản vẽ.",
+ "110": "Bản vẽ {0} đã bị đóng.",
+ "111": "Độ dịch chuyển hóa học (ppm)",
+ "112": "Thời gian (s)",
+ "113": "Độ phản xạ",
+ "114": "Độ phổ biến tương đối",
+ "115": "##{0}= xuất hiện nhiều hơn một lần; giá trị đầu tiên được giữ lại.",
+ "116": "##XYDATA={0} không phải là danh sách biến đã biết; được đọc như (X++(Y..Y)).",
+ "117": "##{0}={1} không phải là danh sách biến đã biết; được đọc như (XY..XY).",
+ "118": "Các điểm không theo thứ tự x và đã được sắp xếp.",
+ "119": "##.SHIFT REFERENCE={0} không đọc được; các độ dịch chuyển không được quy chiếu.",
+ "120": "##.SHIFT REFERENCE nêu điểm {0}, nằm ngoài {1} điểm; các độ dịch chuyển không được quy chiếu.",
+ "121": "Các độ dịch chuyển được quy chiếu sao cho điểm {0} bằng {1} ppm ({2}).",
+ "122": "Tệp không nêu hạt nhân được quan sát.",
+ "123": "Đây là dữ liệu NMR miền thời gian (một FID); nó được hiển thị như khi thu được, không qua biến đổi Fourier.",
+ "124": "Các tần số tính bằng Hz được chia cho tần số quan sát ({0} MHz) để ra ppm.",
+ "125": "Không có ##.SHIFT REFERENCE; 0 Hz được lấy là 0 ppm.",
+ "126": "Không có ##.OBSERVE FREQUENCY, nên trục độ dịch chuyển giữ nguyên theo Hz.",
+ "127": "Độ truyền qua được lưu dưới dạng phân số và được hiển thị theo phần trăm.",
+ "128": "Khối {0} chứa hơn {1} điểm.",
+ "129": "##DATA TYPE={0} với đơn vị x {1} không nêu kỹ thuật nào đã biết; được vẽ như một phổ thông thường.",
+ "130": "##BLOCKS={0} nhưng khối LINK chứa {1} khối; mọi khối tìm thấy đều được đọc.",
+ "131": "Đây không phải là tệp JCAMP-DX: không có bản ghi ##TITLE=.",
+ "132": "Tệp chứa {0} khối nối tiếp nhau không có khối LINK; mỗi khối đều được đọc.",
+ "133": "Hai khối dùng chung một ##BLOCK_ID.",
+ "134": "Tệp không chứa phổ nào mà FormChem có thể vẽ ({0}).",
+ "135": "Khối \"{0}\" không được vẽ: {1}.",
+ "136": "một khối cấu trúc (JCAMP-CS); nó được giữ trong tệp nhưng không được vẽ",
+ "137": "nó không chứa XYDATA, XYPOINTS, PEAK TABLE hoặc NTUPLES",
+ "138": "bảng dữ liệu của nó không có điểm nào",
+ "139": "bảng NTUPLES của nó không khai báo ký hiệu nào",
+ "140": "phổ NTUPLES 2D chưa được hỗ trợ",
+ "141": "bảng NTUPLES của nó không có trang nào đọc được",
+ "142": "Tệp chứa các ký tự ngoài ASCII; nó được đọc như UTF-8.",
+ "143": "Tệp chứa các byte không phải ASCII hay UTF-8; nó được đọc như Latin-1.",
+ "144": "Các dòng nằm ngoài mọi bản ghi dữ liệu có nhãn đã bị bỏ qua.",
+ "145": "Một ##END= không có khối đứng trước đã bị bỏ qua.",
+ "146": "Các bản ghi trước ##TITLE= đầu tiên hoặc sau ##END= cuối cùng đã bị bỏ qua.",
+ "147": "Tệp kết thúc mà không có ##END=; các khối đang mở đã được đóng.",
+ "148": "trang NTUPLES {0}",
+ "149": "Trang NTUPLES {0} không có ##DATA TABLE=; đã bỏ qua.",
+ "150": "Trang NTUPLES {0} dùng các ký hiệu ({1}) không được khai báo trong ##SYMBOL=; đã bỏ qua.",
+ "151": "{0} có dạng bảng dữ liệu mà FormChem không đọc ({1}); đã bỏ qua.",
+ "152": "Bảng NTUPLES không có ##END NTUPLES=; nó được đọc đến hết khối.",
+ "153": "Bảng NTUPLES không có danh sách ##SYMBOL=.",
+ "154": "Đây là phổ 2D (hai biến độc lập); phổ 2D không được vẽ trong phiên bản này.",
+ "155": "Bảng NTUPLES có {0} trang; chỉ {1} trang đầu được đọc.",
+ "156": "Trang ảo không dùng chung giá trị x với trang thực; nó bị loại ra.",
+ "157": "Bảng NTUPLES chứa {0} trang; trang {1} được hiển thị và {2} trang khác bị loại ra.",
+ "158": "##DELTAX={0} khác với (LASTX - FIRSTX) / (NPOINTS - 1) = {1}; khoảng cách đã tính được dùng.",
+ "159": "{0} không có đủ FIRSTX, LASTX và NPOINTS; khoảng cách lấy từ ##DELTAX.",
+ "160": "Một dòng dữ liệu bắt đầu bằng giá trị DIF; nó tiếp nối từ giá trị cuối của dòng trước.",
+ "161": "Một giá trị kiểm tra Y không khớp với giá trị cuối của dòng trước; dòng được tiếp nối từ giá trị trước đó.",
+ "162": "{0} ký tự trong {1} không đọc được và đã bị bỏ qua.",
+ "163": "{0} dòng DIF không được theo sau bởi giá trị kiểm tra Y.",
+ "164": "{0} không chứa điểm dữ liệu nào.",
+ "165": "{0} chứa {1} điểm nhưng ##NPOINTS={2}; các giá trị X của dòng khớp {3} điểm từ FIRSTX đến LASTX, nên khoảng cách đó được dùng.",
+ "166": "{0} chứa {1} điểm nhưng ##NPOINTS={2}; các điểm đã đọc được giữ lại.",
+ "167": "Giá trị X của một dòng không khớp với vị trí của nó tính từ FIRSTX và khoảng cách; vị trí được dùng.",
+ "168": "{0} không có FIRSTX, LASTX và NPOINTS; khoảng cách được lấy từ các giá trị X của dòng.",
+ "169": "{0} không cho cách đặt các điểm lên trục x; chúng được đánh số 0, 1, 2 và cứ thế.",
+ "170": "Dòng đầu bắt đầu ở x = {0} nhưng ##FIRSTX={1}; FIRSTX được dùng.",
+ "171": "Giá trị Y đầu tiên {0} không khớp với ##FIRSTY={1}.",
+ "172": "{0} kết thúc bằng một nhóm {1} giá trị chưa đầy đủ; nó bị bỏ.",
+ "173": "Không thể đọc {0}: {1}.",
+ "174": "Phổ yêu cầu khối {0}, nhưng tệp của nó có 1 khối.",
+ "175": "Phổ yêu cầu khối {0}, nhưng tệp của nó có {1} khối.",
+ "176": "Phổ không có nguồn.",
+ "177": "Tệp {0} của phổ không có trong bản vẽ.",
+ "178": "Engine này không có bộ dự đoán cho {0}.",
+ "179": "Dự đoán thất bại: {0}",
+ "180": "Nguồn của phổ không phải là tệp cũng không phải là dự đoán.",
+ "181": "Bản vẽ không có phổ {0}.",
+ "182": "Phổ vạch không có diện tích để lấy tích phân.",
+ "183": "value phải lớn hơn không.",
+ "184": "from và to phải là hai giá trị x khác nhau.",
+ "185": "Phổ không có tích phân {0}.",
+ "186": "Phổ này không có tệp gốc; hãy xuất mà không có original=1.",
+ "187": "FormChem đặt các ảnh PNG, JPEG, GIF, WebP và SVG cùng các phổ JCAMP-DX."
+}
diff --git a/frontend/src/i18n/locales/vi/part14.json b/frontend/src/i18n/locales/vi/part14.json
new file mode 100644
index 00000000..8255ff6a
--- /dev/null
+++ b/frontend/src/i18n/locales/vi/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "Hiển thị",
+ "1": "Bề mặt",
+ "2": "Không có gì để xuất: khung nhìn 3D trống.",
+ "3": "Xuất không thành công",
+ "4": "Hãy chọn một cấu trúc để hiển thị trong 3D.",
+ "5": "Dựng 3D",
+ "6": "Chèn khung nhìn 3D",
+ "7": "Hãy chọn một tệp PDB, mmCIF, SDF hoặc MOL.",
+ "8": "Không thể đặt cấu trúc 3D lên trang",
+ "9": "Hãy chọn một đối tượng 3D được mở từ tệp PDB hoặc mmCIF.",
+ "10": "Mô hình này không có phối tử.",
+ "11": "Không thể tách phối tử",
+ "12": "Chưa có tọa độ 3D: Dựng 3D tạo một cấu dạng từ bản vẽ.",
+ "13": "Tệp cấu trúc 3D...",
+ "14": "Tách phối tử...",
+ "15": "Xuất cấu trúc 3D...",
+ "16": "Quét góc nhị diện...",
+ "17": "Đo trong 3D",
+ "18": "Xuất khung nhìn 3D dưới dạng PNG...",
+ "19": "Xuất khung nhìn 3D dưới dạng glTF...",
+ "20": "Đã tách {0}: {1} (bậc liên kết được suy ra)",
+ "21": "Đã tách {0}: {1}",
+ "22": "Hãy mở khung nhìn 3D trước",
+ "23": "Mở bảng khung nhìn 3D cho cấu trúc đã chọn (hoặc đối tượng 3D đã chọn trên trang) và theo dõi lựa chọn. Cấu trúc cần có tọa độ 3D trước: Dựng 3D tạo ra chúng.",
+ "24": "Dựng một cấu dạng 3D của cấu trúc đã chọn từ bản vẽ 2D của nó (giữ nguyên liên kết nêm, hình học liên kết đôi và điện tích), cực tiểu hóa nó bằng trường lực đã chọn và lưu vào bản vẽ trong một bước hoàn tác; khung nhìn 3D hiển thị nó.",
+ "25": "Cực tiểu hóa năng lượng cấu dạng đang hiển thị của cấu trúc đã chọn bằng trường lực được chọn trong khung nhìn 3D (mặc định MMFF94, UFF khi MMFF94 không có tham số) và báo cáo năng lượng trước và sau, trong một bước hoàn tác.",
+ "26": "Tạo một tập hợp cấu dạng của cấu trúc đã chọn (ETKDG, lọc theo RMSD, mỗi cấu dạng được cực tiểu hóa) và giữ lại những cấu dạng nằm trong cửa sổ năng lượng; với n, window và method thì chạy không cần hộp thoại.",
+ "27": "Số cấu dạng cần tạo",
+ "28": "Cửa sổ năng lượng tính bằng kcal/mol",
+ "29": "Đặt khung nhìn 3D của cấu trúc đã chọn lên trang bên cạnh nó (dựng tọa độ 3D trước nếu chưa có) và mở bảng khung nhìn 3D gắn với nó; xoay hoặc đổi kiểu mô hình sẽ cập nhật hình trên trang.",
+ "30": "Mở tệp PDB, mmCIF, SDF hoặc MOL làm đối tượng 3D trên trang (protein dạng ruy băng, phối tử dạng quả cầu và que, nước bị ẩn, phối tử được lấy nét) và hiển thị nó trong khung nhìn 3D.",
+ "31": "Biến một phối tử của đối tượng 3D đã chọn (mở từ tệp PDB hoặc mmCIF) thành cấu trúc 2D bên cạnh nó trong một bước hoàn tác: bậc liên kết lấy từ mẫu dựng sẵn cho các phối tử thông dụng, nếu không thì được suy ra từ hình học và được báo cáo; tọa độ trong tệp trở thành cấu dạng của nó. Với ligand thì lấy phối tử đó; không có thì hỏi khi mô hình có nhiều phối tử.",
+ "32": "Khóa phối tử chain:het:number, hoặc mã het",
+ "33": "Hãy chọn một đối tượng 3D được mở từ tệp PDB hoặc mmCIF",
+ "34": "Lưu tọa độ 3D của cấu trúc đã chọn cùng mọi nguyên tử hiđro: molfile MDL (cấu dạng đang hiển thị), tệp SD (mọi cấu dạng, kèm trường dữ liệu năng lượng và phương pháp), PDB hoặc XYZ (cấu dạng đang hiển thị, hoặc mọi cấu dạng dưới dạng mô hình hay khung hình); đối tượng 3D mở từ tệp PDB hoặc mmCIF sẽ lưu tệp gốc của nó. Không có format thì hỏi.",
+ "35": "Định dạng tệp",
+ "36": "Mọi cấu dạng thay vì cấu dạng đang hiển thị (mặc định true cho sdf)",
+ "37": "Quét góc nhị diện của bốn nguyên tử được chọn trong khung nhìn 3D (hoặc phép đo nhị diện gần nhất) bằng cực tiểu hóa thư giãn và vẽ đồ thị góc theo năng lượng.",
+ "38": "Đo khoảng cách (hai nguyên tử), góc (ba) hoặc góc nhị diện (bốn) trong khung nhìn 3D và liệt kê nó; với atoms (ID nguyên tử của mảnh như a1, hiđro là a1:h0, hoặc số thứ tự PDB) thì đo các nguyên tử đó, nếu không thì chuyển sang chế độ chọn.",
+ "39": "Từ hai đến bốn ID nguyên tử",
+ "40": "Lưu khung nhìn 3D thành ảnh PNG với kích thước trên màn hình; transparent bỏ nền.",
+ "41": "Lưu khung nhìn 3D thành tệp glTF 2.0 nhị phân (.glb): nguyên tử là quả cầu và liên kết là hình trụ theo màu nguyên tố, 1 angstrom = 1 cm, dùng cho trình xem 3D, trang trình bày và in ấn.",
+ "42": "Không có bề mặt",
+ "43": "Gỡ bề mặt phân tử khỏi khung nhìn 3D.",
+ "44": "Bề mặt van der Waals",
+ "45": "Hiển thị bề mặt van der Waals trong khung nhìn 3D.",
+ "46": "Bề mặt tiếp cận dung môi",
+ "47": "Hiển thị bề mặt tiếp cận dung môi (đầu dò 1,4 angstrom) trong khung nhìn 3D.",
+ "48": "Bề mặt loại trừ dung môi",
+ "49": "Hiển thị bề mặt loại trừ dung môi trong khung nhìn 3D.",
+ "50": "Bề mặt ánh xạ ESP",
+ "51": "Tô màu bề mặt theo thế tĩnh điện gần đúng từ các điện tích riêng phần kinh nghiệm của engine (đỏ âm, xanh dương dương), kèm chú giải nêu phương pháp.",
+ "52": "Hiển thị khung nhìn 3D theo kiểu khung dây; với đối tượng 3D trên trang, lựa chọn được lưu cùng nó.",
+ "53": "Hiển thị khung nhìn 3D theo kiểu que; với đối tượng 3D trên trang, lựa chọn được lưu cùng nó.",
+ "54": "Quả cầu và que",
+ "55": "Hiển thị khung nhìn 3D theo kiểu quả cầu và que; với đối tượng 3D trên trang, lựa chọn được lưu cùng nó.",
+ "56": "Choán không gian",
+ "57": "Hiển thị khung nhìn 3D theo kiểu choán không gian; với đối tượng 3D trên trang, lựa chọn được lưu cùng nó.",
+ "58": "Ruy băng",
+ "59": "Hiển thị khung nhìn 3D theo kiểu ruy băng (protein và axit nucleic; phối tử vẫn là quả cầu và que); với đối tượng 3D trên trang, lựa chọn được lưu cùng nó.",
+ "60": "Góc nhị diện (độ)",
+ "61": "Năng lượng tương đối (kcal/mol)",
+ "62": "Cực tiểu {0}°",
+ "63": "Xuất cấu trúc 3D",
+ "64": "Mọi cấu dạng (bản ghi SDF, mô hình PDB, khung hình XYZ)",
+ "65": "Đã lưu 1 cấu dạng; mọi nguyên tử hiđro được ghi cùng vị trí 3D của chúng.",
+ "66": "Tách phối tử",
+ "67": "Phối tử",
+ "68": "Phối tử trở thành cấu trúc 2D bên cạnh mô hình, với tọa độ từ tệp được giữ làm cấu dạng của nó.",
+ "69": "Tách",
+ "70": "Tệp SD (.sdf)",
+ "71": "Molfile MDL (.mol)",
+ "72": "Số cấu dạng đã lưu: {0}; mọi nguyên tử hiđro được ghi cùng vị trí 3D của chúng.",
+ "73": "Cấu dạng",
+ "74": "Cửa sổ năng lượng (kcal/mol)",
+ "75": "Nhúng ETKDG với hạt giống cố định, các bản gần trùng bị lọc ở RMSD nguyên tử nặng 0,5 Å, mỗi cấu dạng được cực tiểu hóa; cấu dạng thấp nhất trở thành cấu dạng đang hiển thị.",
+ "76": "Tạo",
+ "77": "Biểu đồ năng lượng của phép quét nhị diện",
+ "78": "Quét góc nhị diện",
+ "79": "Từ (độ)",
+ "80": "Đến (độ)",
+ "81": "Bước (độ)",
+ "82": "Giữ mỗi điểm làm một cấu dạng (một bước hoàn tác)",
+ "83": "Chạy quét",
+ "84": "Quét thư giãn: tại mỗi góc, góc nhị diện được giữ cố định và mọi thứ còn lại được cực tiểu hóa.",
+ "85": "Góc kết thúc phải lớn hơn góc bắt đầu.",
+ "86": "Đang quét...",
+ "87": "Quét không thành công",
+ "88": "rào cản {0} kcal/mol",
+ "89": "Kiểu hiển thị",
+ "90": "Tô màu bề mặt theo thế tĩnh điện từ các điện tích riêng phần kinh nghiệm",
+ "91": "ESP",
+ "92": "Cực tiểu hóa",
+ "93": "Quét...",
+ "94": "Lấy nét phối tử",
+ "95": "Đặt lại khung nhìn",
+ "96": "Xoay tự động",
+ "97": "Xuất khung nhìn 3D",
+ "98": "Đo",
+ "99": "Các phép đo",
+ "100": "Ảnh PNG",
+ "101": "Ảnh PNG, nền trong suốt",
+ "102": "glTF nhị phân (.glb)",
+ "103": "3D cần WebGL, mà cửa sổ này không cung cấp.",
+ "104": "Đang tải trình xem 3D...",
+ "105": "Không thể tải trình xem 3D",
+ "106": "Hãy mở một bản vẽ và chọn một cấu trúc để xem nó trong 3D.",
+ "107": "Hãy chọn một cấu trúc trên trang để xem nó trong 3D.",
+ "108": "Không thể đọc cấu trúc 3D",
+ "109": "Cấu dạng này không thể ghi thành molfile",
+ "110": "Xoay tự động đã tắt: hệ thống yêu cầu giảm chuyển động",
+ "111": "Mô hình PDB hoặc CIF không có cấu dạng.",
+ "112": "Năng lượng tương đối so với thấp nhất; nhấp vào một mục để hiển thị.",
+ "113": "Dựng 3D hoặc Cấu dạng... sẽ điền vào danh sách này.",
+ "114": "Không có điện tích riêng phần",
+ "115": "engine chưa có tuyến 3D",
+ "116": "chưa hội tụ",
+ "117": "Hãy chọn bốn nguyên tử liên kết liên tiếp (một góc nhị diện), rồi Quét.",
+ "118": "Hãy đánh dấu Giữ mỗi điểm làm một cấu dạng để xem các hình học.",
+ "119": "Hiển thị cấu dạng",
+ "120": "Cập nhật khung nhìn 3D",
+ "121": "Không thể cập nhật ảnh chụp trang",
+ "122": "Không có bề mặt",
+ "123": "van der Waals",
+ "124": "Tiếp cận dung môi",
+ "125": "Loại trừ dung môi",
+ "126": "Khoảng cách",
+ "127": "Góc",
+ "128": "Nhị diện",
+ "129": "{0} kcal/mol, {1}, chưa hội tụ",
+ "130": "Đã chọn {0} / {1}: {2}",
+ "131": "Nhấp vào {0} nguyên tử để đo",
+ "132": "ESP ({0}): {1}, đỏ {2} e đến xanh dương +{3} e",
+ "133": "Khoảng cách {0}: {1}",
+ "134": "Góc {0}: {1}",
+ "135": "Nhị diện {0}: {1}",
+ "136": "Đã dựng: {0}",
+ "137": "Đã cực tiểu hóa: {0}",
+ "138": "Đã giữ {0} cấu dạng trong số {1}",
+ "139": "Đã giữ {0} cấu dạng",
+ "140": "Nhị diện {0}",
+ "141": "Mã hóa PNG không thành công"
+}
diff --git a/frontend/src/i18n/locales/vi/part15.json b/frontend/src/i18n/locales/vi/part15.json
new file mode 100644
index 00000000..058f9fb1
--- /dev/null
+++ b/frontend/src/i18n/locales/vi/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "gần đúng, từ điện tích kinh nghiệm",
+ "1": "{0} tâm lập thể hoặc liên kết đôi chưa được xác định; một cấu hình đã được chọn.",
+ "2": "{0} nhãn lập thể của bản vẽ không được tái tạo trong 3D.",
+ "3": "Đã dựng thành viên được vẽ của nhóm lập thể nâng cao {0}; mô hình 3D là một đồng phân lập thể của hỗn hợp (tương đối hoặc raxemic) mà bản vẽ mô tả.",
+ "4": "Đã nhúng {0} lần (hạt giống {1}) để giữ lập thể đã vẽ.",
+ "5": "{0} cặp nguyên tử nặng gần nhau hơn {1} khoảng tiếp xúc van der Waals của chúng.",
+ "6": "Đã dùng trường lực phổ quát: {0}.",
+ "7": "không có tham số {0} cho {1}",
+ "8": "{0} không thể xác định kiểu của mọi nguyên tử",
+ "9": "{0} cấu dạng đã làm đổi lập thể đã vẽ trong lúc cực tiểu hóa và bị loại ra.",
+ "10": "Hơn 300 nguyên tử nặng: chất lượng lấy mẫu cấu dạng giảm ở kích thước này.",
+ "11": "Liên kết trung tâm nằm trong một vòng; vòng bị kéo căng để theo góc.",
+ "12": "Cấu trúc chưa có tọa độ 3D; phép quét bắt đầu từ một lần nhúng mới.",
+ "13": "Cấu trúc đã thay đổi trong lúc tính 3D; hãy chạy lại lệnh.",
+ "14": "Bản vẽ không có đối tượng {0}.",
+ "15": "{0} chưa có tọa độ 3D; hãy dựng 3D trước.",
+ "16": "{0} không có cấu dạng {1}.",
+ "17": "Cấu trúc không có nguyên tử.",
+ "18": "3D cần nguyên tử thật: {0} nguyên tử là nhãn, nhóm R hoặc điểm gắn ({1}).",
+ "19": "Không thể thêm hiđro: {0}",
+ "20": "Cấu trúc có {0} nguyên tử kể cả hiđro; 3D xử lý tối đa {1}.",
+ "21": "Tọa độ 3D không khớp với cấu trúc này (không có gì cho {0}); hãy dựng lại 3D.",
+ "22": "Tọa độ 3D không khớp với cấu trúc này (số hiđro đã đổi); hãy dựng lại 3D.",
+ "23": "Không thể nhúng cấu trúc vào 3D: {0}",
+ "24": "Không thể nhúng cấu trúc vào 3D; hãy kiểm tra hóa trị và lập thể của nó.",
+ "25": "Không thể nhúng các cấu dạng: {0}",
+ "26": "Không thể nhúng cấu dạng nào; hãy kiểm tra hóa trị và lập thể của cấu trúc.",
+ "27": "Mọi cấu dạng đã nhúng đều mất lập thể đã vẽ sau khi cực tiểu hóa.",
+ "28": "Không có trường lực nào có tham số cho cấu trúc này ({0}).",
+ "29": "Không thể thiết lập trường lực phổ quát: {0}",
+ "30": "Không thể thiết lập trường lực phổ quát.",
+ "31": "Nguyên tử không xác định {0}; hãy dùng ID nguyên tử của mảnh hoặc hiđro dạng a1:h0.",
+ "32": "Bốn nguyên tử phải khác nhau.",
+ "33": "Bốn nguyên tử phải tạo thành một chuỗi liên kết (a1-a2-a3-a4).",
+ "34": "Không thể ghi tệp 3D: {0}",
+ "35": "Tệp không phải là tệp PDB, mmCIF, SDF hay MOL mà FormChem đọc được.",
+ "36": "Tệp có hơn {0} nguyên tử.",
+ "37": "Tệp PDB không có bản ghi ATOM hay HETATM.",
+ "38": "Bảng atom_site của mmCIF không có các cột Cartn_x, Cartn_y và Cartn_z.",
+ "39": "CIF có tọa độ phân số nhưng không có ô đơn vị đầy đủ.",
+ "40": "CIF không có bảng atom_site.",
+ "41": "CIF không có nguyên tử nào đọc được.",
+ "42": "Tệp không có bản ghi nào.",
+ "43": "Tệp có {0} bản ghi; nhập 3D đọc tối đa {1}.",
+ "44": "Không đọc được bản ghi nào của tệp.",
+ "45": "{0} không phải là tệp PDB hay mmCIF.",
+ "46": "Không thể biến {0} thành bản vẽ FormChem: {1}.",
+ "47": "Mô hình PDB được đặt làm đối tượng 3D: {0}.",
+ "48": "Mô hình mmCIF được đặt làm đối tượng 3D: {0}.",
+ "49": "{0} dòng ATOM hoặc HETATM có tọa độ không đọc được và đã bị bỏ qua.",
+ "50": "{0} hàng atom_site có tọa độ không đọc được và đã bị bỏ qua.",
+ "51": "CIF phân tử nhỏ: đơn vị bất đối xứng được đọc từ tọa độ phân số; các bản đối xứng không được tạo.",
+ "52": "{0} có vấn đề về hóa trị; nó được đọc mà không làm sạch.",
+ "53": "{0} chỉ có tọa độ 2D; không có cấu dạng nào được giữ.",
+ "54": "{0} hiđro không có trong tệp và được đặt từ hình học.",
+ "55": "Không thể đọc {0}: {1}",
+ "56": "Không thể đọc {0}.",
+ "57": "Bản ghi {0}",
+ "58": "Cấu trúc",
+ "59": "Tọa độ 3D của tệp được giữ làm cấu dạng của 1 cấu trúc; không cần Dựng 3D để xem chúng.",
+ "60": "Tọa độ 3D của tệp được giữ làm cấu dạng của {0} cấu trúc; không cần Dựng 3D để xem chúng.",
+ "61": "{0} là một ion đơn; không có cấu trúc để tách.",
+ "62": "Không đọc được các nguyên tử của {0}.",
+ "63": "Không có phối tử {0} trong cấu trúc; các phối tử: {1}.",
+ "64": "Bản vẽ không có mô hình 3D {0}.",
+ "65": "FormChem đặt các ảnh PNG, JPEG, GIF, WebP và SVG, phổ JCAMP-DX và tệp cấu trúc PDB, mmCIF, SDF và MOL."
+}
diff --git a/frontend/src/i18n/locales/zh-Hans/part12.json b/frontend/src/i18n/locales/zh-Hans/part12.json
new file mode 100644
index 00000000..cc09dcdf
--- /dev/null
+++ b/frontend/src/i18n/locales/zh-Hans/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "谱图",
+ "1": "请绘制或选择要命名的结构。",
+ "2": "无法计算名称",
+ "3": "FormChem 没有这个结构的名称。",
+ "4": "复制名称",
+ "5": "已复制名称:{0}",
+ "6": "要插入的化学名称;省略则打开对话框",
+ "7": "将所选结构(或页面上的结构)的名称作为纯文本复制:FormChem 知道俗名时复制俗名,否则复制系统名称,系统名称只有在能读回同一结构时才会提供。",
+ "8": "trivial 或 systematic,用于选择复制哪种名称;省略则取第一个",
+ "9": "预测谱图已是最新。",
+ "10": "刷新预测谱图",
+ "11": "请先选择一个结构",
+ "12": "请先选择一个预测谱图",
+ "13": "已添加预测的 1H NMR 谱图({0})",
+ "14": "已添加预测的 13C NMR 谱图({0})",
+ "15": "已刷新预测谱图({0})",
+ "16": "结构的片段 ID;默认为所选结构,或页面上唯一的结构",
+ "17": "谱仪频率,单位 MHz(1H 默认 400,13C 默认 100)",
+ "18": "在所选结构旁添加预测的 1H NMR 谱图,作为一个撤销步骤:这是按 FormChem 自带的增量规则(不使用化学位移数据库)计算出的谱图对象,其多重峰和积分与结构的原子相链接,标题注明方法、版本和频率。曲线由结构重新计算,从不存储。",
+ "19": "在所选结构旁添加预测的 13C NMR 谱图,作为一个撤销步骤:这是按 FormChem 自带的增量规则(不使用化学位移数据库)计算出的谱图对象,其峰与结构的原子相链接,标题注明方法、版本和频率。曲线由结构重新计算,从不存储。",
+ "20": "无法预测谱图",
+ "21": "预测 1H NMR 谱图",
+ "22": "预测 13C NMR 谱图",
+ "23": "在结构改变后,用当前预测器版本重新计算预测谱图的多重峰、积分或峰,作为一个撤销步骤;已是最新时不会有任何变化。",
+ "24": "预测谱图的 ID;默认为所选的谱图,或在谱图编辑器中打开的谱图",
+ "25": "无法刷新谱图",
+ "26": "该范围内没有新的峰。",
+ "27": "在谱图编辑器中拖过一个范围即可对其积分。",
+ "28": "将峰链接到原子",
+ "29": "取消峰链接",
+ "30": "谱图 Y 轴",
+ "31": "从文件导入谱图...",
+ "32": "编辑谱图...",
+ "33": "拾峰",
+ "34": "积分",
+ "35": "透射率或吸光度",
+ "36": "导出谱图...",
+ "37": "请先选择一个谱图",
+ "38": "没有此谱图:id {0}",
+ "39": "已拾取峰:{0}(已有:{1})",
+ "40": "已拾取峰:{0}",
+ "41": "积分仅适用于 NMR 谱图",
+ "42": "请先在谱图编辑器中选择一个峰、积分或多重峰",
+ "43": "这些原子必须都属于同一个结构",
+ "44": "只有 IR、拉曼和 UV-Vis 谱图可以在透射率和吸光度之间切换",
+ "45": "已导出:{0}",
+ "46": "谱图对象的 ID;默认为所选的谱图,或在谱图编辑器中打开的谱图",
+ "47": "将 JCAMP-DX 谱图文件导入当前绘图(每个数据块生成一个谱图对象,文件按字节原样保留),每个文件作为一个撤销步骤。不指定 path 时会打开文件对话框。",
+ "48": ".jdx、.dx 或 .jcamp 文件的绝对路径",
+ "49": "无法导入谱图",
+ "50": "为所选谱图打开谱图编辑器(与双击它相同)。",
+ "51": "无法打开谱图",
+ "52": "在某个范围内(默认为当前显示的范围)查找谱图的峰并添加到其峰列表,跳过已有的峰,作为一个撤销步骤。",
+ "53": "范围起点,使用 x 轴单位(cm-1、nm、m/z、ppm)",
+ "54": "范围终点,使用 x 轴单位",
+ "55": "可选的检测阈值,使用 y 轴单位",
+ "56": "替换峰列表,而不是追加",
+ "57": "无法拾峰",
+ "58": "在某个范围上添加 NMR 积分,按现有积分的比例缩放(或按 value 取值并重新缩放其余积分),作为一个撤销步骤。省略 from 和 to 时,会将谱图编辑器切换到积分工具。",
+ "59": "范围起点,单位 ppm",
+ "60": "范围终点,单位 ppm",
+ "61": "此积分应显示的值,例如质子数",
+ "62": "无法积分",
+ "63": "将峰、积分或多重峰链接到结构的原子,作为一个撤销步骤。省略 atoms 时使用所选原子,或等待用户在绘图中点击原子。",
+ "64": "峰、积分或多重峰的 ID;默认为在谱图编辑器中选中的那个",
+ "65": "这些原子所属结构(片段)的 ID",
+ "66": "原子 ID",
+ "67": "无法链接峰",
+ "68": "移除峰、积分或多重峰与原子的链接,作为一个撤销步骤。",
+ "69": "无法取消峰的链接",
+ "70": "将 IR、拉曼或 UV-Vis 谱图显示为透射率或吸光度(不指定 mode 时切换),作为一个撤销步骤。",
+ "71": "要显示的 Y 轴;省略则切换",
+ "72": "无法更改 Y 轴",
+ "73": "通过引擎将谱图保存为 JCAMP-DX(有峰时附带峰表)或包含每个点的 CSV。",
+ "74": "文件格式,默认 jdx",
+ "75": "选 jdx 时:保存未经改动的原始导入文件",
+ "76": "要写入的绝对路径;省略则询问",
+ "77": "无法导出谱图",
+ "78": "从文件插入谱图",
+ "79": "文件中没有 FormChem 能绘制的谱图",
+ "80": "插入谱图",
+ "81": "无法放置谱图:它的文件没有送达绘图。",
+ "82": "已插入谱图:{0}",
+ "83": "波长 (µm)",
+ "84": "波数 (cm⁻¹)",
+ "85": "拉曼位移 (cm⁻¹)",
+ "86": "波长 (nm)",
+ "87": "频率 (Hz)",
+ "88": "δ (ppm)",
+ "89": "透射率 (%)",
+ "90": "透射率",
+ "91": "吸光度",
+ "92": "相对丰度 (%)",
+ "93": "强度",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "拉曼",
+ "98": "IR",
+ "99": "预测 {0}, {1} MHz ({2})",
+ "100": "预测 {0}, {1} MHz",
+ "101": "预测 {0} ({1})",
+ "102": "预测 {0}",
+ "103": "{0}, {1} MHz",
+ "104": "谱图不可用:{0}",
+ "105": "正在加载谱图",
+ "106": "俗名",
+ "107": "系统名称",
+ "108": "置信度高",
+ "109": "置信度中",
+ "110": "置信度低",
+ "111": "未能读取",
+ "112": "FormChem 命名",
+ "113": "无法读取名称",
+ "114": "由名称插入结构",
+ "115": "由名称生成结构",
+ "116": "名称,例如 aspirin 或 2-methylpropan-1-ol",
+ "117": "化学名称",
+ "118": "输入名称即可查看其结构。",
+ "119": "没有与此名称对应的结构",
+ "120": "词典",
+ "121": "系统名称解析器",
+ "122": "基于规则的命名器,已往返校验",
+ "123": "谱图工具",
+ "124": "显示整个谱图",
+ "125": "Y 轴",
+ "126": "在页面上显示此范围",
+ "127": "双击绘图中的谱图,即可在此编辑。",
+ "128": "峰和积分",
+ "129": "预测",
+ "130": "积分值",
+ "131": "链接到原子",
+ "132": "取消链接",
+ "133": "1 个原子",
+ "134": "要链接的原子",
+ "135": "继续点击更多原子,然后点击“完成”。",
+ "136": "在绘图中点击属于此峰的原子,然后点击“完成”。",
+ "137": "该范围内没有可积分的内容。",
+ "138": "移除峰",
+ "139": "添加峰",
+ "140": "已链接到 1 个原子",
+ "141": "设置谱图范围",
+ "142": "请输入一个正数。",
+ "143": "无法设置积分",
+ "144": "平移和缩放:拖动平移,滚轮缩放,Shift 加拖动缩放到某个范围",
+ "145": "缩放到某个范围:在图上拖过该范围",
+ "146": "拾峰:拖过一个范围",
+ "147": "添加或移除峰:点击峰附近",
+ "148": "积分:拖过一个范围",
+ "149": "峰",
+ "150": "积分",
+ "151": "多重峰",
+ "152": "{0} 个原子",
+ "153": "已链接到 {0}",
+ "154": "拖动平移,滚轮缩放,Shift 加拖动缩放到某个范围。点击标签即可选中。",
+ "155": "在图上拖过一个范围,即可缩放到该范围。",
+ "156": "拖过一个范围,即可拾取其中的峰。",
+ "157": "点击峰附近即可添加;点击峰标签即可移除。",
+ "158": "拖过一个范围,即可对其积分。",
+ "159": "已链接到 {0} 个原子"
+}
diff --git a/frontend/src/i18n/locales/zh-Hans/part13.json b/frontend/src/i18n/locales/zh-Hans/part13.json
new file mode 100644
index 00000000..282922e5
--- /dev/null
+++ b/frontend/src/i18n/locales/zh-Hans/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "引擎返回了空文件",
+ "1": "名称超过 {0} 个字符",
+ "2": "超过 {0} 个原子的片段不予命名",
+ "3": "结构中含有标签、R 基或任意原子,无法命名。",
+ "4": "无法将结构读取为分子(请检查价态)。",
+ "5": "没有可命名的结构。",
+ "6": "不读取倒置索引式名称(母体在前,其后是逗号和取代基);请按正常顺序书写名称,例如 1,2-dichlorobenzene。",
+ "7": "D- 和 L- 只适用于 FormChem 词典中的氨基酸和糖;其他名称请给出 R 或 S 描述符。",
+ "8": "FormChem 读完了整个名称,但它不是完整的结构名称(可能缺少 hexane 或 benzene 之类的母体,或缺少后缀)。",
+ "9": "FormChem 无法从第 {0} 个字符(\"{1}\")起读取名称。",
+ "10": "FormChem 读取了名称,但{0}。",
+ "11": "无法补全该结构",
+ "12": "该名称有不止一种读法;FormChem 采用了假设最少的读法来绘制。",
+ "13": "名称没有给出立体描述符,因此立体中心和双键按未指定绘制。",
+ "14": "没有系统名称:{0}。",
+ "15": "FormChem 生成的系统名称无法读回同一结构,因此不予显示。",
+ "16": "该双键不能是 E 或 Z",
+ "17": "描述符的位次 {0} 不是母体上的位置",
+ "18": "{0} 位不是可以为 E 或 Z 的双键的起点",
+ "19": "{0} 需要恰好一个可以为 cis 或 trans 的双键;此结构有 {1} 个",
+ "20": "对于这个双键,{0} 含义不明确;请改用 E 或 Z",
+ "21": "({0}) 需要位次:此结构有 {1} 个立体中心",
+ "22": "{0} 位不是立体中心,因此 ({1}) 不适用",
+ "23": "({0}) 需要位次:此结构有 {1} 个可以为 E 或 Z 的双键",
+ "24": "{0} 位不能指定 {1}",
+ "25": "该双键不能指定 {0}",
+ "26": "{0} 没有说明指的是哪种构型,因此结构按无立体绘制。",
+ "27": "{0} 没有连接点",
+ "28": "{1} 上没有位置可放 {0}",
+ "29": "{0} 不能在那里成键",
+ "30": "碳数超过 {0} 的链暂不读取",
+ "31": "{0} 太小,不能成环",
+ "32": "{0}-{1} 是 FormChem 目前还不能根据名称绘制的互变异构体",
+ "33": "位次 {0} 不是 {1} 上的位置",
+ "34": "{0} 不是链上的位置",
+ "35": "多重键不能从 {1} 的 {0} 位开始",
+ "36": "{1} 的 {0} 位不能带有该多重键",
+ "37": "{1} 的 {0} 位没有位置可放多重键",
+ "38": "{0} 上没有位置可放其多重键",
+ "39": "没有给出 {0} 的多重键位置;已绘制在最小位次。",
+ "40": "-{0} 需要开链;在环上,后缀应为 carbaldehyde、carboxylic acid、carbonitrile 或 carboxamide",
+ "41": "链只有两个端点,最多只能有两个 -{0}",
+ "42": "{0} 太短,放不下两个 -{1}",
+ "43": "{1} 上没有位置可放 -{0}",
+ "44": "没有给出 {1} 上 -{0} 的位置;已绘制在最小位次。",
+ "45": "-{0} 必须位于链的末端,不能位于 {1}",
+ "46": "{1} 上没有位置可放 -{0}",
+ "47": "ortho、meta 和 para 需要苯环",
+ "48": "只有一个基团时,ortho、meta 或 para 需要 phenol、aniline 或 toluene 之类的母体",
+ "49": "{1} 上没有位置可放 {0}",
+ "50": "{2} 上没有位置可放 {1} 个 {0} 基",
+ "51": "没有给出 {1} 上 {0} 的位置;已绘制在最小的空位。",
+ "52": "{0} 不能带取代基",
+ "53": "酰基通过其羰基碳连接",
+ "54": "{0} 没有空位",
+ "55": "没有给出 {0} 的连接位置;假定为 {1} 位。",
+ "56": "{0} 已没有可供连接的位置",
+ "57": "{1} 之前的位次 {0} 未被使用",
+ "58": "{0} 不能作为单独的词出现",
+ "59": "\"{0}\" 之前需要 {1} 个基团,而名称给出了 {2} 个",
+ "60": "\"{0}\" 之前需要 {1} 个基团,而名称给出了 {2} 个",
+ "61": "名称给出了 {0} 个烷基,对应 {1} 个酯位置",
+ "62": "名称给出了 {0} 个烷基,对应 {1} 个酯位置",
+ "63": "名称给出了 {0} 个烷基,对应 {1} 个酯位置",
+ "64": "名称给出了 {0} 个烷基,对应 {1} 个酯位置",
+ "65": "它所描述的结构无效({0})",
+ "66": "{0} 位的 -one 会成为醛;醛应以 -al 命名",
+ "67": "{1} 的 {0} 位",
+ "68": "相同的取代基太多",
+ "69": "位次混杂",
+ "70": "特殊的键类型暂不命名",
+ "71": "FormChem 暂时无法命名的环系",
+ "72": "带环外双键的芳环(如吡啶酮)暂不命名",
+ "73": "同位素和自由基暂不命名",
+ "74": "高价卤素不予命名",
+ "75": "硝基以外的带电氮基团暂不命名",
+ "76": "带电原子暂不命名",
+ "77": "硫、氮和磷的氧化物暂不命名",
+ "78": "此含氧基团暂不命名",
+ "79": "亚砜、砜及其他含硫基团暂不命名",
+ "80": "亚胺、偶氮及类似的含氮基团暂不命名",
+ "81": "{0} 暂不命名",
+ "82": "超过 20 个碳的取代基链不予命名",
+ "83": "不饱和酰基暂不命名",
+ "84": "取代的亚基暂不命名",
+ "85": "环亚基暂不命名",
+ "86": "两处连接的环暂不命名",
+ "87": "找不到环取代基的编号",
+ "88": "醇部分不同的酯暂不命名",
+ "89": "找不到母体链或母体环",
+ "90": "环酯(内酯)暂不命名",
+ "91": "多个胺氮或酰胺氮上带取代基的结构暂不命名",
+ "92": "母体链或母体环之外的立体中心暂不命名",
+ "93": "母体链之外的双键几何构型暂不命名",
+ "94": "伪不对称中心暂不命名",
+ "95": "此双键的几何构型暂不命名",
+ "96": "超过 20 个碳的链不予命名",
+ "97": "相同的基团太多",
+ "98": "结构存在价态错误",
+ "99": "盐和混合物暂不按系统方法命名",
+ "100": "重原子超过 {0} 个的结构暂不按系统方法命名",
+ "101": "{0} 的化合物暂不按系统方法命名",
+ "102": "查询原子和 R 基没有名称",
+ "103": "单杂原子氢化物仅根据词典命名",
+ "104": "{0} 不是此绘图中的对象。",
+ "105": "{0} 没有原子。",
+ "106": "片段没有原子。",
+ "107": "绘图没有页面。",
+ "108": "{0} 不是此绘图中的谱图。",
+ "109": "此预测所属的结构 {0} 已不在绘图中。",
+ "110": "绘图 {0} 已关闭。",
+ "111": "化学位移 (ppm)",
+ "112": "时间 (s)",
+ "113": "反射率",
+ "114": "相对丰度",
+ "115": "##{0}= 出现了不止一次;保留了第一个值。",
+ "116": "##XYDATA={0} 不是已知的变量列表;已按 (X++(Y..Y)) 读取。",
+ "117": "##{0}={1} 不是已知的变量列表;已按 (XY..XY) 读取。",
+ "118": "各点不是按 x 顺序排列的,已排序。",
+ "119": "无法读取 ##.SHIFT REFERENCE={0};化学位移未做参考校正。",
+ "120": "##.SHIFT REFERENCE 指定的点 {0} 超出了 {1} 个点的范围;化学位移未做参考校正。",
+ "121": "已对化学位移做参考校正,使点 {0} 为 {1} ppm ({2})。",
+ "122": "文件没有指明所观测的核。",
+ "123": "这是时域 NMR 数据 (FID);按采集时的样子显示,未做傅里叶变换。",
+ "124": "已将以 Hz 为单位的频率除以观测频率 ({0} MHz),换算为 ppm。",
+ "125": "没有 ##.SHIFT REFERENCE;已将 0 Hz 视为 0 ppm。",
+ "126": "没有 ##.OBSERVE FREQUENCY,因此化学位移轴仍以 Hz 表示。",
+ "127": "透射率以小数形式存储,现以百分数显示。",
+ "128": "块 {0} 含有超过 {1} 个点。",
+ "129": "x 单位为 {1} 的 ##DATA TYPE={0} 不对应任何已知的测试技术;已按普通谱图绘制。",
+ "130": "##BLOCKS={0},但 LINK 块含有 {1} 个块;已读取找到的所有块。",
+ "131": "这不是 JCAMP-DX 文件:它没有 ##TITLE= 记录。",
+ "132": "文件含有 {0} 个依次排列的块,没有 LINK 块;已逐个读取。",
+ "133": "两个块使用了同一个 ##BLOCK_ID。",
+ "134": "文件中没有 FormChem 能绘制的谱图({0})。",
+ "135": "块 \"{0}\" 未绘制:{1}。",
+ "136": "这是结构块 (JCAMP-CS);保留在文件中,但不绘制",
+ "137": "它不含 XYDATA、XYPOINTS、PEAK TABLE 或 NTUPLES",
+ "138": "其数据表不含任何点",
+ "139": "其 NTUPLES 表没有声明任何符号",
+ "140": "暂不支持二维 NTUPLES 谱图",
+ "141": "其 NTUPLES 表没有可读取的页",
+ "142": "文件含有 ASCII 以外的字符;已按 UTF-8 读取。",
+ "143": "文件含有既不是 ASCII 也不是 UTF-8 的字节;已按 Latin-1 读取。",
+ "144": "已忽略不在任何带标签数据记录中的行。",
+ "145": "已忽略前面没有块的 ##END=。",
+ "146": "已忽略第一个 ##TITLE= 之前或最后一个 ##END= 之后的记录。",
+ "147": "文件结尾没有 ##END=;已关闭未结束的块。",
+ "148": "NTUPLES 第 {0} 页",
+ "149": "NTUPLES 第 {0} 页没有 ##DATA TABLE=;已跳过。",
+ "150": "NTUPLES 第 {0} 页使用了未在 ##SYMBOL= 中声明的符号 ({1});已跳过。",
+ "151": "{0} 的数据表形式是 FormChem 无法读取的 ({1});已跳过。",
+ "152": "NTUPLES 表没有 ##END NTUPLES=;已读取到块的末尾。",
+ "153": "NTUPLES 表没有 ##SYMBOL= 列表。",
+ "154": "这是二维谱图(两个独立变量);此版本不绘制二维谱图。",
+ "155": "NTUPLES 表有 {0} 页;只读取了前 {1} 页。",
+ "156": "虚部页与实部页的 x 值不一致;已将其舍去。",
+ "157": "NTUPLES 表有 {0} 页;显示第 {1} 页,其他 {2} 页已舍去。",
+ "158": "##DELTAX={0} 与 (LASTX - FIRSTX) / (NPOINTS - 1) = {1} 不一致;使用计算得到的间隔。",
+ "159": "{0} 没有完整的 FIRSTX、LASTX 和 NPOINTS;间隔取自 ##DELTAX。",
+ "160": "某数据行以 DIF 值开头;已从上一行的最后一个值继续。",
+ "161": "某个 Y 校验值与上一行的最后一个值不一致;已从之前的值继续该行。",
+ "162": "{1} 中有 {0} 个字符无法读取,已跳过。",
+ "163": "有 {0} 个 DIF 行后面没有 Y 校验值。",
+ "164": "{0} 不含数据点。",
+ "165": "{0} 含有 {1} 个点,但 ##NPOINTS={2};各行的 X 值与从 FIRSTX 到 LASTX 的 {3} 个点相符,因此采用了该间隔。",
+ "166": "{0} 含有 {1} 个点,但 ##NPOINTS={2};已保留读取到的点。",
+ "167": "某行的 X 值与按 FIRSTX 和间隔算出的位置不一致;已采用算出的位置。",
+ "168": "{0} 没有 FIRSTX、LASTX 和 NPOINTS;间隔取自各行的 X 值。",
+ "169": "{0} 没有给出把各点放到 x 轴上的方法;各点已按 0、1、2 等编号。",
+ "170": "第一行从 x = {0} 开始,但 ##FIRSTX={1};已采用 FIRSTX。",
+ "171": "第一个 Y 值 {0} 与 ##FIRSTY={1} 不一致。",
+ "172": "{0} 以一个不完整的、含 {1} 个值的分组结尾;已舍去。",
+ "173": "无法读取 {0}:{1}。",
+ "174": "该谱图要求第 {0} 个块,但其文件只有 1 个块。",
+ "175": "该谱图要求第 {0} 个块,但其文件有 {1} 个块。",
+ "176": "该谱图没有来源。",
+ "177": "该谱图的文件 {0} 不在绘图中。",
+ "178": "此引擎中没有 {0} 的预测器。",
+ "179": "预测失败:{0}",
+ "180": "该谱图的来源既不是文件,也不是预测。",
+ "181": "绘图中没有谱图 {0}。",
+ "182": "棒状谱图没有可积分的面积。",
+ "183": "值必须大于零。",
+ "184": "from 和 to 必须是两个不同的 x 值。",
+ "185": "该谱图没有积分 {0}。",
+ "186": "此谱图没有原始文件;请不带 original=1 导出。",
+ "187": "FormChem 可放置 PNG、JPEG、GIF、WebP 和 SVG 图片以及 JCAMP-DX 谱图。"
+}
diff --git a/frontend/src/i18n/locales/zh-Hans/part14.json b/frontend/src/i18n/locales/zh-Hans/part14.json
new file mode 100644
index 00000000..9b3881a5
--- /dev/null
+++ b/frontend/src/i18n/locales/zh-Hans/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "显示",
+ "1": "表面",
+ "2": "没有可导出的内容:3D 视图是空的。",
+ "3": "导出失败",
+ "4": "请选择要以 3D 显示的结构。",
+ "5": "生成 3D",
+ "6": "插入 3D 视图",
+ "7": "请选择 PDB、mmCIF、SDF 或 MOL 文件。",
+ "8": "无法将 3D 结构放到页面上",
+ "9": "请选择从 PDB 或 mmCIF 文件打开的 3D 对象。",
+ "10": "此模型没有配体。",
+ "11": "无法提取配体",
+ "12": "还没有 3D 坐标:“生成 3D”会根据绘图生成构象。",
+ "13": "3D 结构文件...",
+ "14": "提取配体...",
+ "15": "导出 3D 结构...",
+ "16": "二面角扫描...",
+ "17": "在 3D 中测量",
+ "18": "将 3D 视图导出为 PNG...",
+ "19": "将 3D 视图导出为 glTF...",
+ "20": "已提取 {0}:{1}(键级为推断)",
+ "21": "已提取 {0}:{1}",
+ "22": "请先打开 3D 视图",
+ "23": "为所选结构(或页面上所选的 3D 对象)打开 3D 视图面板,并跟随选择变化。结构需要先有 3D 坐标:“生成 3D”可以生成。",
+ "24": "根据 2D 绘图为所选结构生成 3D 构象(保留楔形键、双键几何和电荷),用所选力场对其最小化,并作为一个撤销步骤存入绘图;3D 视图会显示它。",
+ "25": "用 3D 视图中选定的力场(默认 MMFF94,MMFF94 没有参数时用 UFF)对所选结构当前显示的构象做能量最小化,并报告最小化前后的能量,作为一个撤销步骤。",
+ "26": "为所选结构生成构象系综(ETKDG,按 RMSD 去重,逐个最小化),并保留能量窗口内的构象;指定 n、window 和 method 时不弹出对话框直接运行。",
+ "27": "要生成的构象数",
+ "28": "能量窗口,单位 kcal/mol",
+ "29": "在所选结构旁的页面上放置它的 3D 视图(如果还没有 3D 坐标则先生成),并打开与之绑定的 3D 视图面板;旋转或更改模型样式时,页面上的图像会随之更新。",
+ "30": "将 PDB、mmCIF、SDF 或 MOL 文件作为 3D 对象在页面上打开(蛋白质以卡通显示,配体以球棍显示,隐藏水分子,聚焦配体),并在 3D 视图中显示。",
+ "31": "将所选 3D 对象(从 PDB 或 mmCIF 文件打开)的配体转为它旁边的 2D 结构,作为一个撤销步骤:常见配体的键级来自内置模板,其余则由几何推断并给出报告;文件中的坐标成为它的构象。指定 ligand 时取该配体;未指定而模型有多个配体时会询问。",
+ "32": "配体键 chain:het:number,或 het 代码",
+ "33": "请选择从 PDB 或 mmCIF 文件打开的 3D 对象",
+ "34": "保存所选结构带全部氢的 3D 坐标:MDL molfile(当前显示的构象)、SD 文件(所有构象,附能量和方法数据字段)、PDB 或 XYZ(当前显示的构象,或将所有构象作为模型或帧);从 PDB 或 mmCIF 文件打开的 3D 对象则保存其原始文件。不指定 format 时会询问。",
+ "35": "文件格式",
+ "36": "导出所有构象而不只是当前显示的构象(sdf 默认为 true)",
+ "37": "对在 3D 视图中选取的四个原子(或最近一次二面角测量)的二面角做弛豫最小化扫描,并绘制角度与能量的关系图。",
+ "38": "在 3D 视图中测量距离(两个原子)、角度(三个)或二面角(四个)并列出;指定 atoms(片段原子 ID 如 a1,氢为 a1:h0,或 PDB 序号)时测量这些原子,否则切换到拾取模式。",
+ "39": "两到四个原子 ID",
+ "40": "将 3D 视图按屏幕上的大小保存为 PNG 图片;指定 transparent 则不含背景。",
+ "41": "将 3D 视图保存为二进制 glTF 2.0 文件 (.glb):原子为球体,键为圆柱,带元素颜色,1 埃 = 1 cm,适用于 3D 查看器、幻灯片和打印。",
+ "42": "无表面",
+ "43": "从 3D 视图中移除分子表面。",
+ "44": "范德华表面",
+ "45": "在 3D 视图中显示范德华表面。",
+ "46": "溶剂可及表面",
+ "47": "在 3D 视图中显示溶剂可及表面(探针 1.4 埃)。",
+ "48": "溶剂排除表面",
+ "49": "在 3D 视图中显示溶剂排除表面。",
+ "50": "ESP 映射表面",
+ "51": "按引擎的经验部分电荷算出的近似静电势为表面着色(红色为负,蓝色为正),并附说明方法的图例。",
+ "52": "以线框样式显示 3D 视图;对页面上的 3D 对象,该选择会随对象保存。",
+ "53": "以棍状样式显示 3D 视图;对页面上的 3D 对象,该选择会随对象保存。",
+ "54": "球棍",
+ "55": "以球棍样式显示 3D 视图;对页面上的 3D 对象,该选择会随对象保存。",
+ "56": "空间填充",
+ "57": "以空间填充样式显示 3D 视图;对页面上的 3D 对象,该选择会随对象保存。",
+ "58": "卡通",
+ "59": "以卡通样式显示 3D 视图(蛋白质和核酸;配体保持球棍);对页面上的 3D 对象,该选择会随对象保存。",
+ "60": "二面角(度)",
+ "61": "相对能量 (kcal/mol)",
+ "62": "最小值 {0}°",
+ "63": "导出 3D 结构",
+ "64": "所有构象(SDF 记录、PDB 模型、XYZ 帧)",
+ "65": "已存储 1 个构象;所有氢都按其 3D 位置写入。",
+ "66": "提取配体",
+ "67": "配体",
+ "68": "配体会成为模型旁的 2D 结构,文件中的坐标保留为它的构象。",
+ "69": "提取",
+ "70": "SD 文件 (.sdf)",
+ "71": "MDL Molfile (.mol)",
+ "72": "已存储 {0} 个构象;所有氢都按其 3D 位置写入。",
+ "73": "构象",
+ "74": "能量窗口 (kcal/mol)",
+ "75": "以固定种子做 ETKDG 嵌入,重原子 RMSD 0.5 Å 以内的近似重复构象被去除,逐个最小化;能量最低的成为当前显示的构象。",
+ "76": "生成",
+ "77": "二面角扫描能量曲线",
+ "78": "二面角扫描",
+ "79": "起始(度)",
+ "80": "终止(度)",
+ "81": "步长(度)",
+ "82": "将每个点保留为构象(一个撤销步骤)",
+ "83": "运行扫描",
+ "84": "弛豫扫描:在每个角度固定二面角,并对其余部分做最小化。",
+ "85": "终止角必须大于起始角。",
+ "86": "正在扫描...",
+ "87": "扫描失败",
+ "88": "能垒 {0} kcal/mol",
+ "89": "显示样式",
+ "90": "按经验部分电荷算出的静电势为表面着色",
+ "91": "ESP",
+ "92": "最小化",
+ "93": "扫描...",
+ "94": "聚焦配体",
+ "95": "重置视图",
+ "96": "旋转",
+ "97": "导出 3D 视图",
+ "98": "测量",
+ "99": "测量值",
+ "100": "PNG 图像",
+ "101": "PNG 图像,透明",
+ "102": "glTF 二进制 (.glb)",
+ "103": "3D 需要 WebGL,而此窗口不支持。",
+ "104": "正在加载 3D 查看器...",
+ "105": "无法加载 3D 查看器",
+ "106": "打开一个绘图并选择结构,即可以 3D 查看。",
+ "107": "在页面上选择一个结构,即可以 3D 查看。",
+ "108": "无法读取 3D 结构",
+ "109": "此构象无法写成 molfile",
+ "110": "旋转已关闭:系统要求减少动态效果",
+ "111": "PDB 或 CIF 模型没有构象。",
+ "112": "能量相对于最低者;点击某一项即可显示。",
+ "113": "“生成 3D”或“构象...”会填充此列表。",
+ "114": "部分电荷不可用",
+ "115": "引擎尚无 3D 路由",
+ "116": "未收敛",
+ "117": "依次选取四个相连的原子(二面角),然后扫描。",
+ "118": "勾选“将每个点保留为构象”即可查看这些几何结构。",
+ "119": "显示构象",
+ "120": "更新 3D 视图",
+ "121": "无法更新页面快照",
+ "122": "无表面",
+ "123": "范德华",
+ "124": "溶剂可及",
+ "125": "溶剂排除",
+ "126": "距离",
+ "127": "角度",
+ "128": "二面角",
+ "129": "{0} kcal/mol,{1},未收敛",
+ "130": "已选取 {0} / {1}:{2}",
+ "131": "点击 {0} 个原子进行测量",
+ "132": "ESP ({0}):{1},红 {2} e 至蓝 +{3} e",
+ "133": "距离 {0}:{1}",
+ "134": "角度 {0}:{1}",
+ "135": "二面角 {0}:{1}",
+ "136": "已生成:{0}",
+ "137": "已最小化:{0}",
+ "138": "在 {1} 个构象中保留了 {0} 个",
+ "139": "保留了 {0} 个构象",
+ "140": "二面角 {0}",
+ "141": "PNG 编码失败"
+}
diff --git a/frontend/src/i18n/locales/zh-Hans/part15.json b/frontend/src/i18n/locales/zh-Hans/part15.json
new file mode 100644
index 00000000..a85fa49b
--- /dev/null
+++ b/frontend/src/i18n/locales/zh-Hans/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "近似值,基于经验电荷",
+ "1": "有 {0} 个立体中心或双键未指定;已选择其中一种构型。",
+ "2": "绘图中有 {0} 个立体标记不会在 3D 中重现。",
+ "3": "已生成增强立体组 {0} 中所绘的成员;3D 模型是绘图所描述的混合物(相对构型或外消旋)中的一个立体异构体。",
+ "4": "为保持所绘立体,已嵌入 {0} 次(种子 {1})。",
+ "5": "有 {0} 对重原子的距离小于其范德华接触距离的 {1}。",
+ "6": "使用了通用力场 (UFF):{0}。",
+ "7": "没有适用于 {1} 的 {0} 参数",
+ "8": "{0} 无法为所有原子指定类型",
+ "9": "有 {0} 个构象在最小化时改变了所绘立体,已被舍去。",
+ "10": "重原子超过 300 个:此规模下构象采样的质量会下降。",
+ "11": "中心键位于环中;环会被拉伸以符合该角度。",
+ "12": "结构没有 3D 坐标;扫描从新的嵌入开始。",
+ "13": "计算 3D 期间结构发生了变化;请再次运行该命令。",
+ "14": "绘图中没有对象 {0}。",
+ "15": "{0} 还没有 3D 坐标;请先生成 3D。",
+ "16": "{0} 没有构象 {1}。",
+ "17": "结构没有原子。",
+ "18": "3D 需要真实的原子:有 {0} 个原子是标签、R 基或连接点 ({1})。",
+ "19": "无法添加氢:{0}",
+ "20": "该结构含氢共有 {0} 个原子;3D 最多处理 {1} 个。",
+ "21": "3D 坐标与此结构不匹配(缺少 {0} 的坐标);请重新生成 3D。",
+ "22": "3D 坐标与此结构不匹配(氢的数量已改变);请重新生成 3D。",
+ "23": "无法将结构嵌入 3D:{0}",
+ "24": "无法将结构嵌入 3D;请检查其价态和立体。",
+ "25": "无法嵌入构象:{0}",
+ "26": "没有任何构象可以嵌入;请检查结构的价态和立体。",
+ "27": "所有嵌入的构象在最小化后都丢失了所绘立体。",
+ "28": "没有力场含有此结构的参数 ({0})。",
+ "29": "无法设置通用力场:{0}",
+ "30": "无法设置通用力场。",
+ "31": "未知原子 {0};请使用片段原子 ID,氢写作 a1:h0。",
+ "32": "四个原子必须互不相同。",
+ "33": "四个原子必须构成一条键链 (a1-a2-a3-a4)。",
+ "34": "无法写入 3D 文件:{0}",
+ "35": "该文件不是 FormChem 能读取的 PDB、mmCIF、SDF 或 MOL 文件。",
+ "36": "文件的原子数超过 {0}。",
+ "37": "PDB 文件没有 ATOM 或 HETATM 记录。",
+ "38": "mmCIF 的 atom_site 表没有 Cartn_x、Cartn_y 和 Cartn_z 列。",
+ "39": "CIF 含有分数坐标,但没有完整的晶胞。",
+ "40": "CIF 没有 atom_site 表。",
+ "41": "CIF 中没有可读取的原子。",
+ "42": "文件没有记录。",
+ "43": "文件有 {0} 条记录;3D 导入最多读取 {1} 条。",
+ "44": "无法读取文件中的任何记录。",
+ "45": "{0} 不是 PDB 或 mmCIF 文件。",
+ "46": "无法将 {0} 转成 FormChem 绘图:{1}。",
+ "47": "PDB 模型已作为 3D 对象放置:{0}。",
+ "48": "mmCIF 模型已作为 3D 对象放置:{0}。",
+ "49": "有 {0} 行 ATOM 或 HETATM 的坐标无法读取,已跳过。",
+ "50": "有 {0} 行 atom_site 的坐标无法读取,已跳过。",
+ "51": "小分子 CIF:不对称单元由分数坐标读取;不生成对称等价原子。",
+ "52": "{0} 存在价态问题;读取时未做净化处理。",
+ "53": "{0} 只有 2D 坐标;未保留构象。",
+ "54": "有 {0} 个氢不在文件中,已按几何位置添加。",
+ "55": "无法读取 {0}:{1}",
+ "56": "无法读取 {0}。",
+ "57": "记录 {0}",
+ "58": "该结构",
+ "59": "文件的 3D 坐标已保留为 1 个结构的构象;查看时无需“生成 3D”。",
+ "60": "文件的 3D 坐标已保留为 {0} 个结构的构象;查看时无需“生成 3D”。",
+ "61": "{0} 是单个离子;没有可提取的结构。",
+ "62": "无法读取 {0} 的原子。",
+ "63": "结构中没有配体 {0};现有配体:{1}。",
+ "64": "绘图中没有 3D 模型 {0}。",
+ "65": "FormChem 可放置 PNG、JPEG、GIF、WebP 和 SVG 图片、JCAMP-DX 谱图以及 PDB、mmCIF、SDF 和 MOL 结构文件。"
+}
diff --git a/frontend/src/i18n/locales/zh-Hant/part12.json b/frontend/src/i18n/locales/zh-Hant/part12.json
new file mode 100644
index 00000000..c30cadd2
--- /dev/null
+++ b/frontend/src/i18n/locales/zh-Hant/part12.json
@@ -0,0 +1,162 @@
+{
+ "0": "譜圖",
+ "1": "請繪製或選取要命名的結構。",
+ "2": "無法計算名稱",
+ "3": "FormChem 沒有這個結構的名稱。",
+ "4": "複製名稱",
+ "5": "已複製名稱:{0}",
+ "6": "要插入的化學名稱;省略則開啟對話方塊",
+ "7": "將所選結構(或頁面上的結構)的名稱以純文字複製:FormChem 知道俗名時複製俗名,否則複製系統名稱,系統名稱只有在能讀回同一結構時才會提供。",
+ "8": "trivial 或 systematic,用於選擇複製哪種名稱;省略則取第一個",
+ "9": "預測譜圖已是最新。",
+ "10": "重新整理預測譜圖",
+ "11": "請先選取一個結構",
+ "12": "請先選取一個預測譜圖",
+ "13": "已新增預測的 1H NMR 譜圖({0})",
+ "14": "已新增預測的 13C NMR 譜圖({0})",
+ "15": "已重新整理預測譜圖({0})",
+ "16": "結構的片段 ID;預設為所選結構,或頁面上唯一的結構",
+ "17": "譜儀頻率,單位 MHz(1H 預設 400,13C 預設 100)",
+ "18": "在所選結構旁新增預測的 1H NMR 譜圖,作為一個復原步驟:這是依 FormChem 自帶的增量規則(不使用化學位移資料庫)計算出的譜圖物件,其多重峰和積分與結構的原子相連結,標題註明方法、版本和頻率。曲線由結構重新計算,從不儲存。",
+ "19": "在所選結構旁新增預測的 13C NMR 譜圖,作為一個復原步驟:這是依 FormChem 自帶的增量規則(不使用化學位移資料庫)計算出的譜圖物件,其峰與結構的原子相連結,標題註明方法、版本和頻率。曲線由結構重新計算,從不儲存。",
+ "20": "無法預測譜圖",
+ "21": "預測 1H NMR 譜圖",
+ "22": "預測 13C NMR 譜圖",
+ "23": "在結構改變後,以目前的預測器版本重新計算預測譜圖的多重峰、積分或峰,作為一個復原步驟;已是最新時不會有任何變化。",
+ "24": "預測譜圖的 ID;預設為所選的譜圖,或在譜圖編輯器中開啟的譜圖",
+ "25": "無法重新整理譜圖",
+ "26": "該範圍內沒有新的峰。",
+ "27": "在譜圖編輯器中拖曳過一個範圍即可對其積分。",
+ "28": "將峰連結到原子",
+ "29": "取消峰連結",
+ "30": "譜圖 Y 軸",
+ "31": "從檔案匯入譜圖...",
+ "32": "編輯譜圖...",
+ "33": "拾峰",
+ "34": "積分",
+ "35": "穿透率或吸光度",
+ "36": "匯出譜圖...",
+ "37": "請先選取一個譜圖",
+ "38": "沒有此譜圖:id {0}",
+ "39": "已拾取峰:{0}(已有:{1})",
+ "40": "已拾取峰:{0}",
+ "41": "積分僅適用於 NMR 譜圖",
+ "42": "請先在譜圖編輯器中選取一個峰、積分或多重峰",
+ "43": "這些原子必須都屬於同一個結構",
+ "44": "只有 IR、拉曼和 UV-Vis 譜圖可以在穿透率和吸光度之間切換",
+ "45": "已匯出:{0}",
+ "46": "譜圖物件的 ID;預設為所選的譜圖,或在譜圖編輯器中開啟的譜圖",
+ "47": "將 JCAMP-DX 譜圖檔案匯入目前的繪圖(每個資料區塊產生一個譜圖物件,檔案以位元組原樣保留),每個檔案作為一個復原步驟。不指定 path 時會開啟檔案對話方塊。",
+ "48": ".jdx、.dx 或 .jcamp 檔案的絕對路徑",
+ "49": "無法匯入譜圖",
+ "50": "為所選譜圖開啟譜圖編輯器(與按兩下它相同)。",
+ "51": "無法開啟譜圖",
+ "52": "在某個範圍內(預設為目前顯示的範圍)尋找譜圖的峰並加入其峰清單,略過已有的峰,作為一個復原步驟。",
+ "53": "範圍起點,使用 x 軸單位(cm-1、nm、m/z、ppm)",
+ "54": "範圍終點,使用 x 軸單位",
+ "55": "選用的偵測閾值,使用 y 軸單位",
+ "56": "取代峰清單,而不是附加",
+ "57": "無法拾峰",
+ "58": "在某個範圍上新增 NMR 積分,依現有積分的比例縮放(或依 value 取值並重新縮放其餘積分),作為一個復原步驟。省略 from 和 to 時,會將譜圖編輯器切換到積分工具。",
+ "59": "範圍起點,單位 ppm",
+ "60": "範圍終點,單位 ppm",
+ "61": "此積分應顯示的值,例如質子數",
+ "62": "無法積分",
+ "63": "將峰、積分或多重峰連結到結構的原子,作為一個復原步驟。省略 atoms 時使用所選原子,或等待使用者在繪圖中點選原子。",
+ "64": "峰、積分或多重峰的 ID;預設為在譜圖編輯器中選取的那個",
+ "65": "這些原子所屬結構(片段)的 ID",
+ "66": "原子 ID",
+ "67": "無法連結峰",
+ "68": "移除峰、積分或多重峰與原子的連結,作為一個復原步驟。",
+ "69": "無法取消峰的連結",
+ "70": "將 IR、拉曼或 UV-Vis 譜圖顯示為穿透率或吸光度(不指定 mode 時切換),作為一個復原步驟。",
+ "71": "要顯示的 Y 軸;省略則切換",
+ "72": "無法變更 Y 軸",
+ "73": "透過引擎將譜圖儲存為 JCAMP-DX(有峰時附帶峰表)或包含每個點的 CSV。",
+ "74": "檔案格式,預設 jdx",
+ "75": "選 jdx 時:儲存未經更動的原始匯入檔案",
+ "76": "要寫入的絕對路徑;省略則詢問",
+ "77": "無法匯出譜圖",
+ "78": "從檔案插入譜圖",
+ "79": "檔案中沒有 FormChem 能繪製的譜圖",
+ "80": "插入譜圖",
+ "81": "無法放置譜圖:它的檔案沒有送達繪圖。",
+ "82": "已插入譜圖:{0}",
+ "83": "波長 (µm)",
+ "84": "波數 (cm⁻¹)",
+ "85": "拉曼位移 (cm⁻¹)",
+ "86": "波長 (nm)",
+ "87": "頻率 (Hz)",
+ "88": "δ (ppm)",
+ "89": "穿透率 (%)",
+ "90": "穿透率",
+ "91": "吸光度",
+ "92": "相對豐度 (%)",
+ "93": "強度",
+ "94": "{0} NMR",
+ "95": "MS",
+ "96": "UV-Vis",
+ "97": "拉曼",
+ "98": "IR",
+ "99": "預測 {0}, {1} MHz ({2})",
+ "100": "預測 {0}, {1} MHz",
+ "101": "預測 {0} ({1})",
+ "102": "預測 {0}",
+ "103": "{0}, {1} MHz",
+ "104": "譜圖無法使用:{0}",
+ "105": "正在載入譜圖",
+ "106": "俗名",
+ "107": "系統名稱",
+ "108": "信賴度高",
+ "109": "信賴度中",
+ "110": "信賴度低",
+ "111": "未能讀取",
+ "112": "FormChem 命名",
+ "113": "無法讀取名稱",
+ "114": "由名稱插入結構",
+ "115": "由名稱產生結構",
+ "116": "名稱,例如 aspirin 或 2-methylpropan-1-ol",
+ "117": "化學名稱",
+ "118": "輸入名稱即可檢視其結構。",
+ "119": "沒有與此名稱對應的結構",
+ "120": "字典",
+ "121": "系統名稱解析器",
+ "122": "以規則為基礎的命名器,已往返驗證",
+ "123": "譜圖工具",
+ "124": "顯示整個譜圖",
+ "125": "Y 軸",
+ "126": "在頁面上顯示此範圍",
+ "127": "按兩下繪圖中的譜圖,即可在此編輯。",
+ "128": "峰和積分",
+ "129": "預測",
+ "130": "積分值",
+ "131": "連結到原子",
+ "132": "取消連結",
+ "133": "1 個原子",
+ "134": "要連結的原子",
+ "135": "繼續點選更多原子,然後按「完成」。",
+ "136": "在繪圖中點選屬於此峰的原子,然後按「完成」。",
+ "137": "該範圍內沒有可積分的內容。",
+ "138": "移除峰",
+ "139": "新增峰",
+ "140": "已連結到 1 個原子",
+ "141": "設定譜圖範圍",
+ "142": "請輸入一個正數。",
+ "143": "無法設定積分",
+ "144": "平移和縮放:拖曳平移,滾輪縮放,Shift 加拖曳縮放到某個範圍",
+ "145": "縮放到某個範圍:在圖上拖曳過該範圍",
+ "146": "拾峰:拖曳過一個範圍",
+ "147": "新增或移除峰:點選峰附近",
+ "148": "積分:拖曳過一個範圍",
+ "149": "峰",
+ "150": "積分",
+ "151": "多重峰",
+ "152": "{0} 個原子",
+ "153": "已連結到 {0}",
+ "154": "拖曳平移,滾輪縮放,Shift 加拖曳縮放到某個範圍。點選標籤即可選取。",
+ "155": "在圖上拖曳過一個範圍,即可縮放到該範圍。",
+ "156": "拖曳過一個範圍,即可拾取其中的峰。",
+ "157": "點選峰附近即可新增;點選峰標籤即可移除。",
+ "158": "拖曳過一個範圍,即可對其積分。",
+ "159": "已連結到 {0} 個原子"
+}
diff --git a/frontend/src/i18n/locales/zh-Hant/part13.json b/frontend/src/i18n/locales/zh-Hant/part13.json
new file mode 100644
index 00000000..a84e70fd
--- /dev/null
+++ b/frontend/src/i18n/locales/zh-Hant/part13.json
@@ -0,0 +1,190 @@
+{
+ "0": "引擎傳回了空檔案",
+ "1": "名稱超過 {0} 個字元",
+ "2": "超過 {0} 個原子的片段不予命名",
+ "3": "結構中含有標籤、R 基或任意原子,無法命名。",
+ "4": "無法將結構讀取為分子(請檢查價態)。",
+ "5": "沒有可命名的結構。",
+ "6": "不讀取倒置索引式名稱(母體在前,其後是逗號和取代基);請依正常順序書寫名稱,例如 1,2-dichlorobenzene。",
+ "7": "D- 和 L- 只適用於 FormChem 字典中的胺基酸和糖;其他名稱請給出 R 或 S 描述符。",
+ "8": "FormChem 讀完了整個名稱,但它不是完整的結構名稱(可能缺少 hexane 或 benzene 之類的母體,或缺少後綴)。",
+ "9": "FormChem 無法從第 {0} 個字元(\"{1}\")起讀取名稱。",
+ "10": "FormChem 讀取了名稱,但{0}。",
+ "11": "無法補全該結構",
+ "12": "該名稱有不止一種讀法;FormChem 採用了假設最少的讀法來繪製。",
+ "13": "名稱沒有給出立體描述符,因此立體中心和雙鍵依未指定繪製。",
+ "14": "沒有系統名稱:{0}。",
+ "15": "FormChem 產生的系統名稱無法讀回同一結構,因此不予顯示。",
+ "16": "該雙鍵不能是 E 或 Z",
+ "17": "描述符的位次 {0} 不是母體上的位置",
+ "18": "{0} 位不是可以為 E 或 Z 的雙鍵的起點",
+ "19": "{0} 需要恰好一個可以為 cis 或 trans 的雙鍵;此結構有 {1} 個",
+ "20": "對於這個雙鍵,{0} 含義不明確;請改用 E 或 Z",
+ "21": "({0}) 需要位次:此結構有 {1} 個立體中心",
+ "22": "{0} 位不是立體中心,因此 ({1}) 不適用",
+ "23": "({0}) 需要位次:此結構有 {1} 個可以為 E 或 Z 的雙鍵",
+ "24": "{0} 位不能指定 {1}",
+ "25": "該雙鍵不能指定 {0}",
+ "26": "{0} 沒有說明指的是哪種構型,因此結構依無立體繪製。",
+ "27": "{0} 沒有連接點",
+ "28": "{1} 上沒有位置可放 {0}",
+ "29": "{0} 不能在那裡成鍵",
+ "30": "碳數超過 {0} 的鏈暫不讀取",
+ "31": "{0} 太小,不能成環",
+ "32": "{0}-{1} 是 FormChem 目前還不能根據名稱繪製的互變異構物",
+ "33": "位次 {0} 不是 {1} 上的位置",
+ "34": "{0} 不是鏈上的位置",
+ "35": "多重鍵不能從 {1} 的 {0} 位開始",
+ "36": "{1} 的 {0} 位不能帶有該多重鍵",
+ "37": "{1} 的 {0} 位沒有位置可放多重鍵",
+ "38": "{0} 上沒有位置可放其多重鍵",
+ "39": "沒有給出 {0} 的多重鍵位置;已繪製在最小位次。",
+ "40": "-{0} 需要開鏈;在環上,後綴應為 carbaldehyde、carboxylic acid、carbonitrile 或 carboxamide",
+ "41": "鏈只有兩個端點,最多只能有兩個 -{0}",
+ "42": "{0} 太短,放不下兩個 -{1}",
+ "43": "{1} 上沒有位置可放 -{0}",
+ "44": "沒有給出 {1} 上 -{0} 的位置;已繪製在最小位次。",
+ "45": "-{0} 必須位於鏈的末端,不能位於 {1}",
+ "46": "{1} 上沒有位置可放 -{0}",
+ "47": "ortho、meta 和 para 需要苯環",
+ "48": "只有一個基團時,ortho、meta 或 para 需要 phenol、aniline 或 toluene 之類的母體",
+ "49": "{1} 上沒有位置可放 {0}",
+ "50": "{2} 上沒有位置可放 {1} 個 {0} 基",
+ "51": "沒有給出 {1} 上 {0} 的位置;已繪製在最小的空位。",
+ "52": "{0} 不能帶取代基",
+ "53": "醯基透過其羰基碳連接",
+ "54": "{0} 沒有空位",
+ "55": "沒有給出 {0} 的連接位置;假定為 {1} 位。",
+ "56": "{0} 已沒有可供連接的位置",
+ "57": "{1} 之前的位次 {0} 未被使用",
+ "58": "{0} 不能作為單獨的詞出現",
+ "59": "\"{0}\" 之前需要 {1} 個基團,而名稱給出了 {2} 個",
+ "60": "\"{0}\" 之前需要 {1} 個基團,而名稱給出了 {2} 個",
+ "61": "名稱給出了 {0} 個烷基,對應 {1} 個酯位置",
+ "62": "名稱給出了 {0} 個烷基,對應 {1} 個酯位置",
+ "63": "名稱給出了 {0} 個烷基,對應 {1} 個酯位置",
+ "64": "名稱給出了 {0} 個烷基,對應 {1} 個酯位置",
+ "65": "它所描述的結構無效({0})",
+ "66": "{0} 位的 -one 會成為醛;醛應以 -al 命名",
+ "67": "{1} 的 {0} 位",
+ "68": "相同的取代基太多",
+ "69": "位次混雜",
+ "70": "特殊的鍵類型暫不命名",
+ "71": "FormChem 暫時無法命名的環系",
+ "72": "帶環外雙鍵的芳環(如吡啶酮)暫不命名",
+ "73": "同位素和自由基暫不命名",
+ "74": "高價鹵素不予命名",
+ "75": "硝基以外的帶電氮基團暫不命名",
+ "76": "帶電原子暫不命名",
+ "77": "硫、氮和磷的氧化物暫不命名",
+ "78": "此含氧基團暫不命名",
+ "79": "亞碸、碸及其他含硫基團暫不命名",
+ "80": "亞胺、偶氮及類似的含氮基團暫不命名",
+ "81": "{0} 暫不命名",
+ "82": "超過 20 個碳的取代基鏈不予命名",
+ "83": "不飽和醯基暫不命名",
+ "84": "取代的亞基暫不命名",
+ "85": "環亞基暫不命名",
+ "86": "兩處連接的環暫不命名",
+ "87": "找不到環取代基的編號",
+ "88": "醇部分不同的酯暫不命名",
+ "89": "找不到母體鏈或母體環",
+ "90": "環酯(內酯)暫不命名",
+ "91": "多個胺氮或醯胺氮上帶取代基的結構暫不命名",
+ "92": "母體鏈或母體環之外的立體中心暫不命名",
+ "93": "母體鏈之外的雙鍵幾何構型暫不命名",
+ "94": "偽不對稱中心暫不命名",
+ "95": "此雙鍵的幾何構型暫不命名",
+ "96": "超過 20 個碳的鏈不予命名",
+ "97": "相同的基團太多",
+ "98": "結構存在價態錯誤",
+ "99": "鹽和混合物暫不依系統方法命名",
+ "100": "重原子超過 {0} 個的結構暫不依系統方法命名",
+ "101": "{0} 的化合物暫不依系統方法命名",
+ "102": "查詢原子和 R 基沒有名稱",
+ "103": "單雜原子氫化物僅根據字典命名",
+ "104": "{0} 不是此繪圖中的物件。",
+ "105": "{0} 沒有原子。",
+ "106": "片段沒有原子。",
+ "107": "繪圖沒有頁面。",
+ "108": "{0} 不是此繪圖中的譜圖。",
+ "109": "此預測所屬的結構 {0} 已不在繪圖中。",
+ "110": "繪圖 {0} 已關閉。",
+ "111": "化學位移 (ppm)",
+ "112": "時間 (s)",
+ "113": "反射率",
+ "114": "相對豐度",
+ "115": "##{0}= 出現了不止一次;保留了第一個值。",
+ "116": "##XYDATA={0} 不是已知的變數清單;已依 (X++(Y..Y)) 讀取。",
+ "117": "##{0}={1} 不是已知的變數清單;已依 (XY..XY) 讀取。",
+ "118": "各點不是依 x 順序排列的,已排序。",
+ "119": "無法讀取 ##.SHIFT REFERENCE={0};化學位移未做參考校正。",
+ "120": "##.SHIFT REFERENCE 指定的點 {0} 超出了 {1} 個點的範圍;化學位移未做參考校正。",
+ "121": "已對化學位移做參考校正,使點 {0} 為 {1} ppm ({2})。",
+ "122": "檔案沒有指明所觀測的核。",
+ "123": "這是時域 NMR 資料 (FID);依擷取時的樣子顯示,未做傅立葉轉換。",
+ "124": "已將以 Hz 為單位的頻率除以觀測頻率 ({0} MHz),換算為 ppm。",
+ "125": "沒有 ##.SHIFT REFERENCE;已將 0 Hz 視為 0 ppm。",
+ "126": "沒有 ##.OBSERVE FREQUENCY,因此化學位移軸仍以 Hz 表示。",
+ "127": "穿透率以小數形式儲存,現以百分比顯示。",
+ "128": "區塊 {0} 含有超過 {1} 個點。",
+ "129": "x 單位為 {1} 的 ##DATA TYPE={0} 不對應任何已知的測試技術;已依一般譜圖繪製。",
+ "130": "##BLOCKS={0},但 LINK 區塊含有 {1} 個區塊;已讀取找到的所有區塊。",
+ "131": "這不是 JCAMP-DX 檔案:它沒有 ##TITLE= 記錄。",
+ "132": "檔案含有 {0} 個依序排列的區塊,沒有 LINK 區塊;已逐個讀取。",
+ "133": "兩個區塊使用了同一個 ##BLOCK_ID。",
+ "134": "檔案中沒有 FormChem 能繪製的譜圖({0})。",
+ "135": "區塊 \"{0}\" 未繪製:{1}。",
+ "136": "這是結構區塊 (JCAMP-CS);保留在檔案中,但不繪製",
+ "137": "它不含 XYDATA、XYPOINTS、PEAK TABLE 或 NTUPLES",
+ "138": "其資料表不含任何點",
+ "139": "其 NTUPLES 表沒有宣告任何符號",
+ "140": "暫不支援二維 NTUPLES 譜圖",
+ "141": "其 NTUPLES 表沒有可讀取的頁",
+ "142": "檔案含有 ASCII 以外的字元;已依 UTF-8 讀取。",
+ "143": "檔案含有既不是 ASCII 也不是 UTF-8 的位元組;已依 Latin-1 讀取。",
+ "144": "已忽略不在任何帶標籤資料記錄中的行。",
+ "145": "已忽略前面沒有區塊的 ##END=。",
+ "146": "已忽略第一個 ##TITLE= 之前或最後一個 ##END= 之後的記錄。",
+ "147": "檔案結尾沒有 ##END=;已關閉未結束的區塊。",
+ "148": "NTUPLES 第 {0} 頁",
+ "149": "NTUPLES 第 {0} 頁沒有 ##DATA TABLE=;已略過。",
+ "150": "NTUPLES 第 {0} 頁使用了未在 ##SYMBOL= 中宣告的符號 ({1});已略過。",
+ "151": "{0} 的資料表形式是 FormChem 無法讀取的 ({1});已略過。",
+ "152": "NTUPLES 表沒有 ##END NTUPLES=;已讀取到區塊的末尾。",
+ "153": "NTUPLES 表沒有 ##SYMBOL= 清單。",
+ "154": "這是二維譜圖(兩個獨立變數);此版本不繪製二維譜圖。",
+ "155": "NTUPLES 表有 {0} 頁;只讀取了前 {1} 頁。",
+ "156": "虛部頁與實部頁的 x 值不一致;已將其捨去。",
+ "157": "NTUPLES 表有 {0} 頁;顯示第 {1} 頁,其他 {2} 頁已捨去。",
+ "158": "##DELTAX={0} 與 (LASTX - FIRSTX) / (NPOINTS - 1) = {1} 不一致;使用計算得到的間隔。",
+ "159": "{0} 沒有完整的 FIRSTX、LASTX 和 NPOINTS;間隔取自 ##DELTAX。",
+ "160": "某資料行以 DIF 值開頭;已從上一行的最後一個值繼續。",
+ "161": "某個 Y 檢核值與上一行的最後一個值不一致;已從之前的值繼續該行。",
+ "162": "{1} 中有 {0} 個字元無法讀取,已略過。",
+ "163": "有 {0} 個 DIF 行後面沒有 Y 檢核值。",
+ "164": "{0} 不含資料點。",
+ "165": "{0} 含有 {1} 個點,但 ##NPOINTS={2};各行的 X 值與從 FIRSTX 到 LASTX 的 {3} 個點相符,因此採用了該間隔。",
+ "166": "{0} 含有 {1} 個點,但 ##NPOINTS={2};已保留讀取到的點。",
+ "167": "某行的 X 值與依 FIRSTX 和間隔算出的位置不一致;已採用算出的位置。",
+ "168": "{0} 沒有 FIRSTX、LASTX 和 NPOINTS;間隔取自各行的 X 值。",
+ "169": "{0} 沒有給出把各點放到 x 軸上的方法;各點已依 0、1、2 等編號。",
+ "170": "第一行從 x = {0} 開始,但 ##FIRSTX={1};已採用 FIRSTX。",
+ "171": "第一個 Y 值 {0} 與 ##FIRSTY={1} 不一致。",
+ "172": "{0} 以一個不完整的、含 {1} 個值的群組結尾;已捨去。",
+ "173": "無法讀取 {0}:{1}。",
+ "174": "該譜圖要求第 {0} 個區塊,但其檔案只有 1 個區塊。",
+ "175": "該譜圖要求第 {0} 個區塊,但其檔案有 {1} 個區塊。",
+ "176": "該譜圖沒有來源。",
+ "177": "該譜圖的檔案 {0} 不在繪圖中。",
+ "178": "此引擎中沒有 {0} 的預測器。",
+ "179": "預測失敗:{0}",
+ "180": "該譜圖的來源既不是檔案,也不是預測。",
+ "181": "繪圖中沒有譜圖 {0}。",
+ "182": "棒狀譜圖沒有可積分的面積。",
+ "183": "值必須大於零。",
+ "184": "from 和 to 必須是兩個不同的 x 值。",
+ "185": "該譜圖沒有積分 {0}。",
+ "186": "此譜圖沒有原始檔案;請不帶 original=1 匯出。",
+ "187": "FormChem 可放置 PNG、JPEG、GIF、WebP 和 SVG 圖片以及 JCAMP-DX 譜圖。"
+}
diff --git a/frontend/src/i18n/locales/zh-Hant/part14.json b/frontend/src/i18n/locales/zh-Hant/part14.json
new file mode 100644
index 00000000..83abf4d0
--- /dev/null
+++ b/frontend/src/i18n/locales/zh-Hant/part14.json
@@ -0,0 +1,144 @@
+{
+ "0": "顯示",
+ "1": "表面",
+ "2": "沒有可匯出的內容:3D 檢視是空的。",
+ "3": "匯出失敗",
+ "4": "請選取要以 3D 顯示的結構。",
+ "5": "產生 3D",
+ "6": "插入 3D 檢視",
+ "7": "請選擇 PDB、mmCIF、SDF 或 MOL 檔案。",
+ "8": "無法將 3D 結構放到頁面上",
+ "9": "請選取從 PDB 或 mmCIF 檔案開啟的 3D 物件。",
+ "10": "此模型沒有配體。",
+ "11": "無法擷取配體",
+ "12": "還沒有 3D 座標:「產生 3D」會根據繪圖產生構象。",
+ "13": "3D 結構檔案...",
+ "14": "擷取配體...",
+ "15": "匯出 3D 結構...",
+ "16": "二面角掃描...",
+ "17": "在 3D 中測量",
+ "18": "將 3D 檢視匯出為 PNG...",
+ "19": "將 3D 檢視匯出為 glTF...",
+ "20": "已擷取 {0}:{1}(鍵級為推斷)",
+ "21": "已擷取 {0}:{1}",
+ "22": "請先開啟 3D 檢視",
+ "23": "為所選結構(或頁面上所選的 3D 物件)開啟 3D 檢視面板,並跟隨選取變化。結構需要先有 3D 座標:「產生 3D」可以產生。",
+ "24": "根據 2D 繪圖為所選結構產生 3D 構象(保留楔形鍵、雙鍵幾何和電荷),以所選力場對其最小化,並作為一個復原步驟存入繪圖;3D 檢視會顯示它。",
+ "25": "以 3D 檢視中選定的力場(預設 MMFF94,MMFF94 沒有參數時用 UFF)對所選結構目前顯示的構象做能量最小化,並回報最小化前後的能量,作為一個復原步驟。",
+ "26": "為所選結構產生構象系綜(ETKDG,依 RMSD 去重,逐個最小化),並保留能量視窗內的構象;指定 n、window 和 method 時不跳出對話方塊直接執行。",
+ "27": "要產生的構象數",
+ "28": "能量視窗,單位 kcal/mol",
+ "29": "在所選結構旁的頁面上放置它的 3D 檢視(如果還沒有 3D 座標則先產生),並開啟與之綁定的 3D 檢視面板;旋轉或變更模型樣式時,頁面上的圖像會隨之更新。",
+ "30": "將 PDB、mmCIF、SDF 或 MOL 檔案作為 3D 物件在頁面上開啟(蛋白質以卡通顯示,配體以球棍顯示,隱藏水分子,聚焦配體),並在 3D 檢視中顯示。",
+ "31": "將所選 3D 物件(從 PDB 或 mmCIF 檔案開啟)的配體轉為它旁邊的 2D 結構,作為一個復原步驟:常見配體的鍵級來自內建範本,其餘則由幾何推斷並提出報告;檔案中的座標成為它的構象。指定 ligand 時取該配體;未指定而模型有多個配體時會詢問。",
+ "32": "配體鍵 chain:het:number,或 het 代碼",
+ "33": "請選取從 PDB 或 mmCIF 檔案開啟的 3D 物件",
+ "34": "儲存所選結構帶全部氫的 3D 座標:MDL molfile(目前顯示的構象)、SD 檔案(所有構象,附能量和方法資料欄位)、PDB 或 XYZ(目前顯示的構象,或將所有構象作為模型或畫格);從 PDB 或 mmCIF 檔案開啟的 3D 物件則儲存其原始檔案。不指定 format 時會詢問。",
+ "35": "檔案格式",
+ "36": "匯出所有構象而不只是目前顯示的構象(sdf 預設為 true)",
+ "37": "對在 3D 檢視中選取的四個原子(或最近一次二面角測量)的二面角做弛豫最小化掃描,並繪製角度與能量的關係圖。",
+ "38": "在 3D 檢視中測量距離(兩個原子)、角度(三個)或二面角(四個)並列出;指定 atoms(片段原子 ID 如 a1,氫為 a1:h0,或 PDB 序號)時測量這些原子,否則切換到選取模式。",
+ "39": "兩到四個原子 ID",
+ "40": "將 3D 檢視依螢幕上的大小儲存為 PNG 圖片;指定 transparent 則不含背景。",
+ "41": "將 3D 檢視儲存為二進位 glTF 2.0 檔案 (.glb):原子為球體,鍵為圓柱,帶元素顏色,1 埃 = 1 cm,適用於 3D 檢視器、投影片和列印。",
+ "42": "無表面",
+ "43": "從 3D 檢視中移除分子表面。",
+ "44": "凡得瓦表面",
+ "45": "在 3D 檢視中顯示凡得瓦表面。",
+ "46": "溶劑可及表面",
+ "47": "在 3D 檢視中顯示溶劑可及表面(探針 1.4 埃)。",
+ "48": "溶劑排除表面",
+ "49": "在 3D 檢視中顯示溶劑排除表面。",
+ "50": "ESP 對應表面",
+ "51": "依引擎的經驗部分電荷算出的近似靜電位為表面著色(紅色為負,藍色為正),並附說明方法的圖例。",
+ "52": "以線框樣式顯示 3D 檢視;對頁面上的 3D 物件,該選擇會隨物件儲存。",
+ "53": "以棍狀樣式顯示 3D 檢視;對頁面上的 3D 物件,該選擇會隨物件儲存。",
+ "54": "球棍",
+ "55": "以球棍樣式顯示 3D 檢視;對頁面上的 3D 物件,該選擇會隨物件儲存。",
+ "56": "空間填充",
+ "57": "以空間填充樣式顯示 3D 檢視;對頁面上的 3D 物件,該選擇會隨物件儲存。",
+ "58": "卡通",
+ "59": "以卡通樣式顯示 3D 檢視(蛋白質和核酸;配體保持球棍);對頁面上的 3D 物件,該選擇會隨物件儲存。",
+ "60": "二面角(度)",
+ "61": "相對能量 (kcal/mol)",
+ "62": "最小值 {0}°",
+ "63": "匯出 3D 結構",
+ "64": "所有構象(SDF 記錄、PDB 模型、XYZ 畫格)",
+ "65": "已儲存 1 個構象;所有氫都依其 3D 位置寫入。",
+ "66": "擷取配體",
+ "67": "配體",
+ "68": "配體會成為模型旁的 2D 結構,檔案中的座標保留為它的構象。",
+ "69": "擷取",
+ "70": "SD 檔案 (.sdf)",
+ "71": "MDL Molfile (.mol)",
+ "72": "已儲存 {0} 個構象;所有氫都依其 3D 位置寫入。",
+ "73": "構象",
+ "74": "能量視窗 (kcal/mol)",
+ "75": "以固定種子做 ETKDG 嵌入,重原子 RMSD 0.5 Å 以內的近似重複構象被去除,逐個最小化;能量最低的成為目前顯示的構象。",
+ "76": "產生",
+ "77": "二面角掃描能量曲線",
+ "78": "二面角掃描",
+ "79": "起始(度)",
+ "80": "終止(度)",
+ "81": "步長(度)",
+ "82": "將每個點保留為構象(一個復原步驟)",
+ "83": "執行掃描",
+ "84": "弛豫掃描:在每個角度固定二面角,並對其餘部分做最小化。",
+ "85": "終止角必須大於起始角。",
+ "86": "正在掃描...",
+ "87": "掃描失敗",
+ "88": "能障 {0} kcal/mol",
+ "89": "顯示樣式",
+ "90": "依經驗部分電荷算出的靜電位為表面著色",
+ "91": "ESP",
+ "92": "最小化",
+ "93": "掃描...",
+ "94": "聚焦配體",
+ "95": "重設檢視",
+ "96": "旋轉",
+ "97": "匯出 3D 檢視",
+ "98": "測量",
+ "99": "測量值",
+ "100": "PNG 影像",
+ "101": "PNG 影像,透明",
+ "102": "glTF 二進位 (.glb)",
+ "103": "3D 需要 WebGL,而此視窗不支援。",
+ "104": "正在載入 3D 檢視器...",
+ "105": "無法載入 3D 檢視器",
+ "106": "開啟一個繪圖並選取結構,即可以 3D 檢視。",
+ "107": "在頁面上選取一個結構,即可以 3D 檢視。",
+ "108": "無法讀取 3D 結構",
+ "109": "此構象無法寫成 molfile",
+ "110": "旋轉已關閉:系統要求減少動態效果",
+ "111": "PDB 或 CIF 模型沒有構象。",
+ "112": "能量相對於最低者;點選某一項即可顯示。",
+ "113": "「產生 3D」或「構象...」會填入此清單。",
+ "114": "部分電荷無法使用",
+ "115": "引擎尚無 3D 路由",
+ "116": "未收斂",
+ "117": "依序選取四個相連的原子(二面角),然後掃描。",
+ "118": "勾選「將每個點保留為構象」即可檢視這些幾何結構。",
+ "119": "顯示構象",
+ "120": "更新 3D 檢視",
+ "121": "無法更新頁面快照",
+ "122": "無表面",
+ "123": "凡得瓦",
+ "124": "溶劑可及",
+ "125": "溶劑排除",
+ "126": "距離",
+ "127": "角度",
+ "128": "二面角",
+ "129": "{0} kcal/mol,{1},未收斂",
+ "130": "已選取 {0} / {1}:{2}",
+ "131": "點選 {0} 個原子進行測量",
+ "132": "ESP ({0}):{1},紅 {2} e 至藍 +{3} e",
+ "133": "距離 {0}:{1}",
+ "134": "角度 {0}:{1}",
+ "135": "二面角 {0}:{1}",
+ "136": "已產生:{0}",
+ "137": "已最小化:{0}",
+ "138": "在 {1} 個構象中保留了 {0} 個",
+ "139": "保留了 {0} 個構象",
+ "140": "二面角 {0}",
+ "141": "PNG 編碼失敗"
+}
diff --git a/frontend/src/i18n/locales/zh-Hant/part15.json b/frontend/src/i18n/locales/zh-Hant/part15.json
new file mode 100644
index 00000000..6e4e0bd0
--- /dev/null
+++ b/frontend/src/i18n/locales/zh-Hant/part15.json
@@ -0,0 +1,68 @@
+{
+ "0": "近似值,基於經驗電荷",
+ "1": "有 {0} 個立體中心或雙鍵未指定;已選擇其中一種構型。",
+ "2": "繪圖中有 {0} 個立體標記不會在 3D 中重現。",
+ "3": "已產生增強立體群組 {0} 中所繪的成員;3D 模型是繪圖所描述的混合物(相對構型或外消旋)中的一個立體異構物。",
+ "4": "為保持所繪立體,已嵌入 {0} 次(種子 {1})。",
+ "5": "有 {0} 對重原子的距離小於其凡得瓦接觸距離的 {1}。",
+ "6": "使用了通用力場 (UFF):{0}。",
+ "7": "沒有適用於 {1} 的 {0} 參數",
+ "8": "{0} 無法為所有原子指定類型",
+ "9": "有 {0} 個構象在最小化時改變了所繪立體,已被捨去。",
+ "10": "重原子超過 300 個:此規模下構象取樣的品質會下降。",
+ "11": "中心鍵位於環中;環會被拉伸以符合該角度。",
+ "12": "結構沒有 3D 座標;掃描從新的嵌入開始。",
+ "13": "計算 3D 期間結構發生了變化;請再次執行該命令。",
+ "14": "繪圖中沒有物件 {0}。",
+ "15": "{0} 還沒有 3D 座標;請先產生 3D。",
+ "16": "{0} 沒有構象 {1}。",
+ "17": "結構沒有原子。",
+ "18": "3D 需要真實的原子:有 {0} 個原子是標籤、R 基或連接點 ({1})。",
+ "19": "無法加入氫:{0}",
+ "20": "該結構含氫共有 {0} 個原子;3D 最多處理 {1} 個。",
+ "21": "3D 座標與此結構不相符(缺少 {0} 的座標);請重新產生 3D。",
+ "22": "3D 座標與此結構不相符(氫的數量已改變);請重新產生 3D。",
+ "23": "無法將結構嵌入 3D:{0}",
+ "24": "無法將結構嵌入 3D;請檢查其價態和立體。",
+ "25": "無法嵌入構象:{0}",
+ "26": "沒有任何構象可以嵌入;請檢查結構的價態和立體。",
+ "27": "所有嵌入的構象在最小化後都失去了所繪立體。",
+ "28": "沒有力場含有此結構的參數 ({0})。",
+ "29": "無法設定通用力場:{0}",
+ "30": "無法設定通用力場。",
+ "31": "未知原子 {0};請使用片段原子 ID,氫寫作 a1:h0。",
+ "32": "四個原子必須互不相同。",
+ "33": "四個原子必須構成一條鍵鏈 (a1-a2-a3-a4)。",
+ "34": "無法寫入 3D 檔案:{0}",
+ "35": "該檔案不是 FormChem 能讀取的 PDB、mmCIF、SDF 或 MOL 檔案。",
+ "36": "檔案的原子數超過 {0}。",
+ "37": "PDB 檔案沒有 ATOM 或 HETATM 記錄。",
+ "38": "mmCIF 的 atom_site 表沒有 Cartn_x、Cartn_y 和 Cartn_z 欄。",
+ "39": "CIF 含有分數座標,但沒有完整的晶胞。",
+ "40": "CIF 沒有 atom_site 表。",
+ "41": "CIF 中沒有可讀取的原子。",
+ "42": "檔案沒有記錄。",
+ "43": "檔案有 {0} 筆記錄;3D 匯入最多讀取 {1} 筆。",
+ "44": "無法讀取檔案中的任何記錄。",
+ "45": "{0} 不是 PDB 或 mmCIF 檔案。",
+ "46": "無法將 {0} 轉成 FormChem 繪圖:{1}。",
+ "47": "PDB 模型已作為 3D 物件放置:{0}。",
+ "48": "mmCIF 模型已作為 3D 物件放置:{0}。",
+ "49": "有 {0} 行 ATOM 或 HETATM 的座標無法讀取,已略過。",
+ "50": "有 {0} 列 atom_site 的座標無法讀取,已略過。",
+ "51": "小分子 CIF:不對稱單元由分數座標讀取;不產生對稱等價原子。",
+ "52": "{0} 存在價態問題;讀取時未做淨化處理。",
+ "53": "{0} 只有 2D 座標;未保留構象。",
+ "54": "有 {0} 個氫不在檔案中,已依幾何位置加入。",
+ "55": "無法讀取 {0}:{1}",
+ "56": "無法讀取 {0}。",
+ "57": "記錄 {0}",
+ "58": "該結構",
+ "59": "檔案的 3D 座標已保留為 1 個結構的構象;檢視時無需「產生 3D」。",
+ "60": "檔案的 3D 座標已保留為 {0} 個結構的構象;檢視時無需「產生 3D」。",
+ "61": "{0} 是單一離子;沒有可擷取的結構。",
+ "62": "無法讀取 {0} 的原子。",
+ "63": "結構中沒有配體 {0};現有配體:{1}。",
+ "64": "繪圖中沒有 3D 模型 {0}。",
+ "65": "FormChem 可放置 PNG、JPEG、GIF、WebP 和 SVG 圖片、JCAMP-DX 譜圖以及 PDB、mmCIF、SDF 和 MOL 結構檔案。"
+}
diff --git a/frontend/src/io/glb.ts b/frontend/src/io/glb.ts
new file mode 100644
index 00000000..a4f9eb56
--- /dev/null
+++ b/frontend/src/io/glb.ts
@@ -0,0 +1,215 @@
+export type Vec3 = [number, number, number];
+
+export interface SceneAtom { at: Vec3; colour: Vec3; radius: number }
+export interface SceneBond { a: number; b: number; order: number; radius: number }
+export interface Scene3d { atoms: SceneAtom[]; bonds: SceneBond[] }
+
+export interface GlbOptions { scale?: number; generator?: string; name?: string; detail?: 'low' | 'medium' | 'high' }
+
+const MAGIC = 0x46546c67;
+const JSON_CHUNK = 0x4e4f534a;
+const BIN_CHUNK = 0x004e4942;
+const FLOAT = 5126;
+const UINT = 5125;
+const ARRAY_BUFFER = 34962;
+const ELEMENT_ARRAY_BUFFER = 34963;
+const BOND_GAP = 0.9;
+
+const DETAIL = { low: [6, 8, 8], medium: [10, 14, 12], high: [16, 24, 18] } as const;
+
+class Mesh {
+ pos: number[] = [];
+ nrm: number[] = [];
+ col: number[] = [];
+ idx: number[] = [];
+
+ vertex(p: Vec3, n: Vec3, c: Vec3): number {
+ this.pos.push(p[0], p[1], p[2]);
+ this.nrm.push(n[0], n[1], n[2]);
+ this.col.push(c[0], c[1], c[2]);
+ return this.pos.length / 3 - 1;
+ }
+
+ tri(a: number, b: number, c: number): void { this.idx.push(a, b, c); }
+}
+
+const sub = (a: Vec3, b: Vec3): Vec3 => [a[0] - b[0], a[1] - b[1], a[2] - b[2]];
+const add = (a: Vec3, b: Vec3): Vec3 => [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
+const mul = (a: Vec3, k: number): Vec3 => [a[0] * k, a[1] * k, a[2] * k];
+const dot = (a: Vec3, b: Vec3): number => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+const cross = (a: Vec3, b: Vec3): Vec3 => [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
+const len = (a: Vec3): number => Math.hypot(a[0], a[1], a[2]);
+const unit = (a: Vec3): Vec3 => { const l = len(a); return l > 1e-12 ? mul(a, 1 / l) : [0, 0, 1]; };
+
+function anyNormal(d: Vec3): Vec3 {
+ const ref: Vec3 = Math.abs(d[0]) < 0.9 ? [1, 0, 0] : [0, 1, 0];
+ return unit(cross(d, ref));
+}
+
+const linear = (c: number): number => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);
+export const srgbToLinear = (c: Vec3): Vec3 => [linear(c[0]), linear(c[1]), linear(c[2])];
+
+function sphere(m: Mesh, centre: Vec3, r: number, colour: Vec3, rings: number, segs: number): void {
+ const first = m.pos.length / 3;
+ for (let i = 0; i <= rings; i++) {
+ const th = (Math.PI * i) / rings;
+ const st = Math.sin(th), ct = Math.cos(th);
+ for (let j = 0; j <= segs; j++) {
+ const ph = (2 * Math.PI * j) / segs;
+ const n: Vec3 = [st * Math.cos(ph), ct, st * Math.sin(ph)];
+ m.vertex(add(centre, mul(n, r)), n, colour);
+ }
+ }
+ const row = segs + 1;
+ for (let i = 0; i < rings; i++) {
+ for (let j = 0; j < segs; j++) {
+ const a = first + i * row + j, b = a + row;
+ if (i > 0) m.tri(a, a + 1, b);
+ if (i < rings - 1) m.tri(a + 1, b + 1, b);
+ }
+ }
+}
+
+function tube(m: Mesh, from: Vec3, to: Vec3, r: number, colour: Vec3, segs: number): void {
+ const d = sub(to, from);
+ if (len(d) < 1e-9) return;
+ const axis = unit(d);
+ const u = anyNormal(axis);
+ const v = cross(axis, u);
+ const first = m.pos.length / 3;
+ for (let j = 0; j <= segs; j++) {
+ const ph = (2 * Math.PI * j) / segs;
+ const n = add(mul(u, Math.cos(ph)), mul(v, Math.sin(ph)));
+ m.vertex(add(from, mul(n, r)), n, colour);
+ m.vertex(add(to, mul(n, r)), n, colour);
+ }
+ for (let j = 0; j < segs; j++) {
+ const a = first + 2 * j;
+ m.tri(a, a + 2, a + 1);
+ m.tri(a + 1, a + 2, a + 3);
+ }
+}
+
+function bondPlane(scene: Scene3d, b: SceneBond, axis: Vec3, links: number[][]): Vec3 {
+ for (const end of [b.a, b.b]) {
+ for (const n of links[end] ?? []) {
+ if (n === b.a || n === b.b) continue;
+ const side = sub(scene.atoms[n].at, scene.atoms[end].at);
+ const off = sub(side, mul(axis, dot(side, axis)));
+ if (len(off) > 1e-6) return unit(off);
+ }
+ }
+ return anyNormal(axis);
+}
+
+function bond(m: Mesh, scene: Scene3d, b: SceneBond, links: number[][], segs: number): void {
+ const A = scene.atoms[b.a], B = scene.atoms[b.b];
+ if (!A || !B) return;
+ const axis = unit(sub(B.at, A.at));
+ const mid = mul(add(A.at, B.at), 0.5);
+ const n = Math.max(1, Math.min(3, Math.round(b.order)));
+ const r = n === 1 ? b.radius : b.radius * 0.6;
+ const side = n === 1 ? ([0, 0, 0] as Vec3) : bondPlane(scene, b, axis, links);
+ const gap = r * 2.4;
+ for (let k = 0; k < n; k++) {
+ const off = mul(side, (k - (n - 1) / 2) * gap);
+ const a = add(A.at, off), c = add(mid, off), z = add(B.at, off);
+ tube(m, a, c, r, A.colour, segs);
+ tube(m, c, z, r, B.colour, segs);
+ }
+}
+
+export function sceneMesh(scene: Scene3d, detail: GlbOptions['detail'] = 'medium'): Mesh {
+ const many = scene.atoms.length > 2000;
+ const [rings, segs, tubeSegs] = DETAIL[many && detail !== 'low' ? 'low' : detail];
+ const m = new Mesh();
+ const links: number[][] = scene.atoms.map(() => []);
+ for (const b of scene.bonds) {
+ links[b.a]?.push(b.b);
+ links[b.b]?.push(b.a);
+ }
+ for (const a of scene.atoms) if (a.radius > 0) sphere(m, a.at, a.radius, a.colour, rings, segs);
+ for (const b of scene.bonds) if (b.radius > 0) bond(m, scene, { ...b, radius: Math.min(b.radius, BOND_GAP) }, links, tubeSegs);
+ return m;
+}
+
+function bounds(pos: Float32Array): { min: number[]; max: number[] } {
+ const min = [Infinity, Infinity, Infinity], max = [-Infinity, -Infinity, -Infinity];
+ for (let i = 0; i < pos.length; i += 3) {
+ for (let k = 0; k < 3; k++) {
+ const v = pos[i + k];
+ if (v < min[k]) min[k] = v;
+ if (v > max[k]) max[k] = v;
+ }
+ }
+ return { min, max };
+}
+
+const pad4 = (n: number): number => (n + 3) & ~3;
+
+export function writeGlb(scene: Scene3d, opts: GlbOptions = {}): Uint8Array {
+ const scale = opts.scale ?? 0.01;
+ const m = sceneMesh(scene, opts.detail);
+ const count = m.pos.length / 3;
+ let cx = 0, cy = 0, cz = 0;
+ for (const a of scene.atoms) { cx += a.at[0]; cy += a.at[1]; cz += a.at[2]; }
+ const nA = Math.max(1, scene.atoms.length);
+ cx /= nA; cy /= nA; cz /= nA;
+ const pos = new Float32Array(m.pos.length);
+ for (let i = 0; i < m.pos.length; i += 3) {
+ pos[i] = (m.pos[i] - cx) * scale;
+ pos[i + 1] = (m.pos[i + 1] - cy) * scale;
+ pos[i + 2] = (m.pos[i + 2] - cz) * scale;
+ }
+ const nrm = new Float32Array(m.nrm);
+ const col = new Float32Array(m.col.length);
+ for (let i = 0; i < m.col.length; i++) col[i] = linear(m.col[i]);
+ const idx = new Uint32Array(m.idx);
+
+ const views = [pos, nrm, col, idx];
+ const offsets: number[] = [];
+ let total = 0;
+ for (const v of views) { offsets.push(total); total = pad4(total + v.byteLength); }
+ const bin = new Uint8Array(total);
+ views.forEach((v, i) => bin.set(new Uint8Array(v.buffer, v.byteOffset, v.byteLength), offsets[i]));
+
+ const { min, max } = bounds(pos);
+ const gltf = {
+ asset: { version: '2.0', generator: opts.generator ?? 'FormChem' },
+ scene: 0,
+ scenes: [{ name: opts.name ?? 'Molecule', nodes: [0] }],
+ nodes: [{ name: opts.name ?? 'Molecule', mesh: 0 }],
+ meshes: [{ name: 'ball-and-stick', primitives: [{ attributes: { POSITION: 0, NORMAL: 1, COLOR_0: 2 }, indices: 3, material: 0, mode: 4 }] }],
+ materials: [{ name: 'element-colours', pbrMetallicRoughness: { baseColorFactor: [1, 1, 1, 1], metallicFactor: 0, roughnessFactor: 0.55 } }],
+ buffers: [{ byteLength: total }],
+ bufferViews: [
+ { buffer: 0, byteOffset: offsets[0], byteLength: pos.byteLength, target: ARRAY_BUFFER },
+ { buffer: 0, byteOffset: offsets[1], byteLength: nrm.byteLength, target: ARRAY_BUFFER },
+ { buffer: 0, byteOffset: offsets[2], byteLength: col.byteLength, target: ARRAY_BUFFER },
+ { buffer: 0, byteOffset: offsets[3], byteLength: idx.byteLength, target: ELEMENT_ARRAY_BUFFER },
+ ],
+ accessors: [
+ { bufferView: 0, componentType: FLOAT, count, type: 'VEC3', min, max },
+ { bufferView: 1, componentType: FLOAT, count, type: 'VEC3' },
+ { bufferView: 2, componentType: FLOAT, count, type: 'VEC3' },
+ { bufferView: 3, componentType: UINT, count: idx.length, type: 'SCALAR' },
+ ],
+ };
+
+ const text = new TextEncoder().encode(JSON.stringify(gltf));
+ const jsonLen = pad4(text.length);
+ const out = new Uint8Array(12 + 8 + jsonLen + 8 + total);
+ const dv = new DataView(out.buffer);
+ dv.setUint32(0, MAGIC, true);
+ dv.setUint32(4, 2, true);
+ dv.setUint32(8, out.length, true);
+ dv.setUint32(12, jsonLen, true);
+ dv.setUint32(16, JSON_CHUNK, true);
+ out.set(text, 20);
+ out.fill(0x20, 20 + text.length, 20 + jsonLen);
+ const binAt = 20 + jsonLen;
+ dv.setUint32(binAt, total, true);
+ dv.setUint32(binAt + 4, BIN_CHUNK, true);
+ out.set(bin, binAt + 8);
+ return out;
+}
diff --git a/frontend/src/styles/dialogs.css b/frontend/src/styles/dialogs.css
index 4fb11f23..ec3674af 100644
--- a/frontend/src/styles/dialogs.css
+++ b/frontend/src/styles/dialogs.css
@@ -27,9 +27,9 @@
textarea.fc-input { height: auto; min-height: 88px; padding: 8px 10px; line-height: 1.5; resize: vertical; }
select.fc-input { padding-right: 6px; }
.fc-note { margin: 0; color: var(--text-muted); font-size: var(--fc-12); line-height: 1.45; }
-.fc-note a, .fc-text a { color: var(--accent-ink); text-underline-offset: 3px; }
-.fc-text { margin: 0; color: var(--text-secondary); font-size: var(--fc-13); line-height: 1.55; }
-.fc-text .fc-key { margin: 0 2px; }
+.fc-note a, p.fc-text a { color: var(--accent-ink); text-underline-offset: 3px; }
+p.fc-text { margin: 0; color: var(--text-secondary); font-size: var(--fc-13); line-height: 1.55; }
+p.fc-text .fc-key { margin: 0 2px; }
.fc-confirm-text { color: var(--text-secondary); font-size: var(--fc-13); }
.fc-check-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.fc-check-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-0); }
diff --git a/frontend/src/styles/names.css b/frontend/src/styles/names.css
new file mode 100644
index 00000000..76c38113
--- /dev/null
+++ b/frontend/src/styles/names.css
@@ -0,0 +1,31 @@
+.fc-nd-dialog .fc-dialog-body { gap: var(--space-2); }
+.fc-nd-input { font-size: var(--fc-14); }
+.fc-nd-preview { position: relative; display: grid; place-items: center; box-sizing: border-box; height: 208px; padding: var(--space-2); overflow: hidden; border: 1px solid var(--line-1); border-radius: var(--radius-md); background: #ffffff; color: #111111; transition: opacity var(--transition-fast); }
+.fc-nd-preview.is-shown .fc-nd-thumb { opacity: 0.45; }
+.fc-nd-thumb { position: absolute; top: 50%; left: 50%; display: block; width: min(calc(100% - 2 * var(--space-2)), var(--fc-nd-side, 100%)); height: min(calc(100% - 2 * var(--space-2)), var(--fc-nd-side, 100%)); transform: translate(-50%, -50%); transition: opacity var(--transition-fast); }
+.fc-nd-thumb[hidden], .fc-nd-empty[hidden] { display: none; }
+.fc-nd-empty { margin: 0; color: #6b7280; font-size: var(--fc-12); text-align: center; }
+.fc-nd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-2); min-height: 22px; color: var(--text-secondary); font-size: var(--fc-12); }
+.fc-nd-meta.is-empty { visibility: hidden; }
+.fc-nd-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: var(--radius-pill); color: var(--text-secondary); font-size: var(--fc-11); white-space: nowrap; }
+.fc-nd-chip.is-high { border-color: color-mix(in srgb, var(--ok) 55%, var(--line-2)); color: var(--ok-ink); }
+.fc-nd-chip.is-medium, .fc-nd-chip.is-low { border-color: color-mix(in srgb, var(--warn) 55%, var(--line-2)); color: var(--warn-ink); }
+.fc-nd-chip.is-none { border-color: color-mix(in srgb, var(--danger) 55%, var(--line-2)); color: var(--danger-ink); }
+.fc-nd-method { min-width: 0; overflow-wrap: anywhere; }
+.fc-nd-formula { margin-left: auto; color: var(--text-primary); font-variant-numeric: tabular-nums; }
+.fc-nd-info { display: grid; align-content: start; gap: 4px; min-height: 58px; }
+.fc-nd-where { margin: 0; color: var(--text-secondary); font: var(--fc-12)/1.4 var(--font-mono); overflow-wrap: anywhere; }
+.fc-nd-where[hidden], .fc-nd-notes[hidden] { display: none; }
+.fc-nd-where mark { border-radius: 2px; background: color-mix(in srgb, var(--danger) 28%, transparent); color: var(--text-primary); }
+.fc-nd-notes { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; color: var(--text-muted); font-size: var(--fc-12); line-height: 1.45; }
+.fc-nd-notes.is-error .fc-nd-note:first-child { color: var(--danger-ink); }
+
+.fc-apn-list { display: grid; margin: 0; padding: 0; list-style: none; }
+.fc-apn-list[hidden], .fc-apn-empty[hidden] { display: none; }
+.fc-apn-row { display: grid; gap: 1px; padding: var(--space-1) 0; border-bottom: 1px solid var(--line-0); cursor: help; }
+.fc-apn-row:last-child { border-bottom: 0; }
+.fc-apn-text { color: var(--text-primary); font: var(--fc-12)/1.35 var(--font-ui); overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; transition: opacity var(--transition-fast); }
+.fc-apn-meta { color: var(--text-muted); font-size: var(--fc-11); line-height: 1.3; }
+.fc-apn-row.is-medium .fc-apn-meta { color: var(--warn-ink); }
+.fc-apn-empty { margin: 0; min-height: var(--space-7); color: var(--text-muted); font: var(--fc-12)/1.35 var(--font-ui); }
+.fc-apn.is-shown .fc-apn-text { opacity: 0.5; }
diff --git a/frontend/src/styles/spectrum.css b/frontend/src/styles/spectrum.css
new file mode 100644
index 00000000..d970ae3b
--- /dev/null
+++ b/frontend/src/styles/spectrum.css
@@ -0,0 +1,75 @@
+.fc-workspace > .fc-spv { grid-column: 3; grid-row: 1; width: 0; min-height: 0; overflow: hidden; background: var(--surface-0); border-left: 0 solid var(--line-1); }
+.fc-spv.is-open { width: var(--fc-spv-w, 432px); border-left-width: 1px; }
+.fc-spv.is-animated { transition: width var(--transition-normal), border-left-width var(--transition-normal); }
+
+.fc-spv-in { display: grid; grid-template-rows: 36px 36px 280px auto minmax(0, 1fr); width: var(--fc-spv-w, 432px); height: 100%; min-height: 0; color: var(--text-primary); font-size: var(--fc-12); }
+.fc-spv-head { display: flex; align-items: center; gap: var(--space-2); min-width: 0; padding: 0 var(--space-2) 0 var(--space-4); border-bottom: 1px solid var(--line-1); }
+.fc-spv-title { flex: none; color: var(--text-secondary); font-size: var(--fc-11); font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; }
+.fc-spv-name { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--text-muted); font-size: var(--fc-12); text-overflow: ellipsis; white-space: nowrap; }
+
+.fc-spv-tools { display: flex; align-items: center; gap: 2px; min-width: 0; padding: 0 var(--space-2); border-bottom: 1px solid var(--line-0); }
+.fc-spv-tools .fc-icon-btn { flex: none; color: var(--text-secondary); }
+.fc-spv-tools .fc-icon-btn[hidden] { display: none; }
+.fc-spv-tools .fc-icon-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }
+.fc-spv-mode.is-active { background: color-mix(in srgb, var(--accent-color) 18%, transparent); color: var(--accent-color); }
+.fc-spv-sep { flex: none; width: 1px; height: 18px; margin: 0 4px; background: var(--line-1); }
+.fc-spv-spacer { flex: 1 1 auto; }
+.fc-spv-ymode { display: inline-flex; flex: none; margin-left: 4px; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
+.fc-spv-ymode[hidden] { display: none; }
+.fc-spv-seg { height: calc(var(--ctl-sm) - 2px); min-width: 30px; padding: 0 6px; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: var(--fc-11); cursor: pointer; }
+.fc-spv-seg + .fc-spv-seg { border-left: 1px solid var(--line-2); }
+.fc-spv-seg[aria-pressed="true"] { background: color-mix(in srgb, var(--accent-color) 18%, transparent); color: var(--accent-color); }
+
+.fc-spv-plot { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-bottom: 1px solid var(--line-0); background: var(--surface-1); }
+.fc-spv-svg { display: block; width: 100%; height: 100%; color: var(--text-primary); cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
+.fc-spv-svg .fc-spec-status text, .fc-spv-svg .fc-spec-tick { fill-opacity: 0.85; }
+.fc-spv-readout { position: absolute; right: var(--space-2); bottom: 4px; color: var(--text-muted); font: var(--fc-11)/1 var(--font-mono); pointer-events: none; white-space: pre; }
+.fc-spv-band { fill: color-mix(in srgb, var(--accent-color) 14%, transparent); stroke: var(--accent-color); stroke-width: 1; stroke-dasharray: 3 2; pointer-events: none; }
+.fc-spv-band.is-integrate { fill: color-mix(in srgb, #4dabf7 18%, transparent); stroke: #4dabf7; }
+.fc-spv-mark { fill: color-mix(in srgb, var(--accent-color) 10%, transparent); stroke: none; pointer-events: none; }
+.fc-spv-mark.is-selected { stroke: var(--accent-color); stroke-width: 1; }
+.fc-spv-mark.is-lit { fill: color-mix(in srgb, var(--accent-color) 30%, transparent); }
+.fc-spv-mark.is-linking { stroke: var(--accent-color); stroke-width: 1.5; stroke-dasharray: 3 2; }
+
+.fc-spv-hint { display: flex; align-items: center; gap: var(--space-2); min-height: 30px; padding: 4px var(--space-4); border-bottom: 1px solid var(--line-0); color: var(--text-muted); font-size: var(--fc-11); line-height: 1.4; }
+.fc-spv-hint-text { flex: 1 1 auto; min-width: 0; }
+.fc-spv-linkbar { display: inline-flex; flex: none; gap: 4px; }
+.fc-spv-linkbar[hidden] { display: none; }
+
+.fc-spv-body { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
+.fc-spv-empty { margin: 0; padding: var(--space-4); color: var(--text-muted); font-size: var(--fc-12); line-height: 1.5; }
+.fc-spv-empty[hidden] { display: none; }
+.fc-spv-list { margin: 0; padding: 0; list-style: none; }
+.fc-spv-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px repeat(3, auto); align-items: center; column-gap: 2px; min-height: 30px; padding: 0 var(--space-2) 0 var(--space-3); border-bottom: 1px solid var(--line-0); }
+.fc-spv-row.is-selected { background: color-mix(in srgb, var(--accent-color) 8%, transparent); }
+.fc-spv-row.is-lit { background: color-mix(in srgb, var(--accent-color) 18%, transparent); }
+.fc-spv-row.is-linking { box-shadow: inset 2px 0 0 var(--accent-color); }
+.fc-spv-pick { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; height: 28px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
+.fc-spv-kind { flex: none; color: var(--text-secondary); font-size: var(--fc-11); }
+.fc-spv-pos { min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
+.fc-spv-val { width: 60px; height: var(--ctl-sm); padding: 0 6px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface-field); color: var(--text-primary); font: inherit; font-variant-numeric: tabular-nums; text-align: right; outline: 0; }
+.fc-spv-val:focus { border-color: var(--accent-color); }
+.fc-spv-val[hidden] { visibility: hidden; display: block; }
+.fc-spv-atoms { overflow: hidden; color: var(--text-muted); font-size: var(--fc-11); text-align: right; text-overflow: ellipsis; white-space: nowrap; }
+.fc-spv-row .fc-icon-btn { color: var(--text-secondary); }
+.fc-spv-row .fc-icon-btn[hidden] { visibility: hidden; display: inline-flex; }
+.fc-spv :where(button, input):focus-visible { outline: 2px solid var(--accent-color); outline-offset: 1px; }
+
+.fc-spec-links { pointer-events: none; }
+.fc-spec-link-atom { fill: color-mix(in srgb, var(--accent-color) 28%, transparent); stroke: var(--accent-color); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
+.fc-spec-link-atom.is-pending { fill: color-mix(in srgb, var(--accent-color) 14%, transparent); stroke-dasharray: 3 2; }
+.fc-spec-link-mark { fill: color-mix(in srgb, var(--accent-color) 24%, transparent); stroke: var(--accent-color); stroke-width: 1; vector-effect: non-scaling-stroke; }
+
+@media (max-width: 899px) {
+ .fc-workspace > .fc-spv { position: absolute; top: 0; right: 0; bottom: 0; z-index: var(--z-rail); }
+ .fc-spv.is-open { box-shadow: var(--shadow-lg); }
+}
+
+@media (max-width: 599px) {
+ .fc-spv.is-open { width: 100%; }
+ .fc-spv-in { width: 100vw; }
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .fc-spv.is-animated { transition: none; }
+}
diff --git a/frontend/src/styles/view3d.css b/frontend/src/styles/view3d.css
new file mode 100644
index 00000000..2b06fa8f
--- /dev/null
+++ b/frontend/src/styles/view3d.css
@@ -0,0 +1,65 @@
+.fc-v3d { position: fixed; top: calc(var(--fc-titlebar-h, 40px) + 16px); right: 16px; z-index: var(--z-companion); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; width: min(760px, calc(100vw - 32px)); height: min(540px, calc(100vh - 96px)); min-width: 420px; min-height: 340px; overflow: hidden; resize: both; border: 1px solid var(--line-3, var(--line-2)); border-radius: var(--radius-lg); background: var(--surface-2); box-shadow: var(--shadow-lg); color: var(--text-primary); font-size: var(--fc-13); }
+.fc-v3d[hidden] { display: none; }
+.fc-v3d-head { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line-1); cursor: grab; user-select: none; touch-action: none; }
+.fc-v3d-head:active { cursor: grabbing; }
+.fc-v3d-title { font-weight: 600; }
+.fc-v3d-source { flex: 1; min-width: 0; overflow: hidden; color: var(--text-muted); font: var(--fc-12)/1 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
+.fc-v3d-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line-1); }
+.fc-v3d-bar .fc-input { width: auto; height: 26px; padding: 0 6px; font-size: var(--fc-12); }
+.fc-v3d-bar .fc-btn { height: 26px; gap: 5px; }
+.fc-v3d-group { display: inline-flex; gap: 2px; }
+.fc-v3d-spacer { flex: 1; }
+.fc-v3d .fc-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface-1); }
+.fc-v3d .fc-seg button { height: 22px; padding: 0 8px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-secondary); font: 500 var(--fc-12)/1 inherit; cursor: pointer; }
+.fc-v3d .fc-seg button.is-on { background: var(--surface-raised); color: var(--text-primary); }
+.fc-v3d .fc-seg button:disabled { opacity: 0.4; cursor: default; }
+.fc-v3d .fc-seg button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 1px; }
+.fc-v3d .fc-btn.is-on, .fc-v3d .fc-icon-btn.is-on { background: var(--accent-wash); color: var(--accent-ink); }
+.fc-v3d .fc-icon-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }
+.fc-v3d .fc-icon-btn.is-xs { width: 20px; height: 20px; }
+.fc-v3d-main { display: grid; grid-template-columns: minmax(0, 1fr) 224px; min-height: 0; }
+.fc-v3d-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--surface-1); contain: strict; }
+.fc-v3d-gl { position: absolute; inset: 0; }
+.fc-v3d-gl.is-blank { visibility: hidden; }
+.fc-v3d-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 24px; color: var(--text-muted); text-align: center; pointer-events: none; }
+.fc-v3d-empty[hidden] { display: none; }
+.fc-v3d-legend { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: var(--z-local-2); display: grid; gap: 4px; padding: 6px 8px; border-radius: var(--radius); background: var(--glass-bg); color: var(--text-secondary); font-size: var(--fc-12); pointer-events: none; }
+.fc-v3d-legend[hidden] { display: none; }
+.fc-v3d-legend-bar { display: block; height: 8px; border-radius: 4px; background: linear-gradient(to right, #d7302f, #f4f4f4, #2c5fd0); }
+.fc-v3d-side { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; min-height: 0; border-left: 1px solid var(--line-1); }
+.fc-v3d-sec { display: flex; flex-direction: column; min-height: 0; padding: 8px 0 4px; border-bottom: 1px solid var(--line-1); }
+.fc-v3d-sec:last-child { border-bottom: 0; }
+.fc-v3d-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px 6px; color: var(--text-secondary); font-size: var(--fc-12); font-weight: 600; }
+.fc-v3d-sec-head .fc-seg button { padding: 0 5px; font-size: 11px; }
+.fc-v3d-confs, .fc-v3d-marks { flex: 1; min-height: 0; margin: 0; padding: 0; overflow: auto; list-style: none; }
+.fc-v3d-confs li { display: grid; grid-template-columns: 2.4ch minmax(0, 1fr) auto; align-items: center; gap: 6px; height: 26px; padding: 0 10px; color: var(--text-secondary); font: var(--fc-12)/1 var(--font-mono); cursor: pointer; }
+.fc-v3d-confs li:hover { background: var(--bg-tertiary); color: var(--text-primary); }
+.fc-v3d-confs li.is-active { background: var(--accent-wash); color: var(--text-primary); box-shadow: inset 2px 0 0 var(--accent-color); }
+.fc-v3d-confs li:focus-visible { outline: 2px solid var(--accent-color); outline-offset: -2px; }
+.fc-v3d-conf-n { color: var(--text-muted); }
+.fc-v3d-conf-m { color: var(--text-muted); font-size: 11px; }
+.fc-v3d-marks li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; font: var(--fc-12)/1 var(--font-mono); }
+.fc-v3d-mark-atoms { overflow: hidden; color: var(--text-secondary); text-overflow: ellipsis; white-space: nowrap; }
+.fc-v3d-mark-v { font-weight: 600; }
+.fc-v3d-hint { min-height: 2.6em; margin: 4px 10px 0; color: var(--text-muted); font-size: 11px; line-height: 1.3; }
+.fc-v3d-status { min-height: 28px; padding: 6px 12px; overflow: hidden; border-top: 1px solid var(--line-1); color: var(--text-secondary); font-size: var(--fc-12); text-overflow: ellipsis; white-space: nowrap; }
+.fc-v3d-menu { position: absolute; z-index: var(--z-local-5); display: grid; width: 200px; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--radius-md); background: var(--surface-2); box-shadow: var(--shadow-lg); }
+.fc-v3d-menu[hidden] { display: none; }
+.fc-v3d-menu button { height: 28px; padding: 0 10px; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; }
+.fc-v3d-menu button:hover, .fc-v3d-menu button:focus-visible { background: var(--bg-tertiary); outline: 0; }
+.fc-v3d-scan-atoms { margin: 0 0 8px; color: var(--text-secondary); font: var(--fc-12)/1.3 var(--font-mono); }
+.fc-v3d-scan-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
+.fc-v3d-scan-row .fc-field { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
+.fc-v3d-scan-plot { margin-top: 8px; border: 1px solid var(--line-1); border-radius: var(--radius-md); background: var(--surface-1); aspect-ratio: 420 / 220; }
+.fc-scan-plot { display: block; width: 100%; height: 100%; color: var(--accent-color); font-family: var(--font-mono); }
+.fc-scan-gridline { stroke: var(--line-1); stroke-width: 1; }
+.fc-scan-base { stroke: var(--line-2); stroke-width: 1; }
+.fc-scan-tick { fill: var(--text-muted); font-size: 10px; }
+.fc-scan-title { fill: var(--text-secondary); font-size: 10px; }
+.fc-scan-readout { fill: var(--text-primary); font-size: 11px; }
+.fc-scan-line { stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
+.fc-scan-dot { fill: currentColor; stroke: var(--surface-1); stroke-width: 2; }
+.fc-scan-hit { fill: transparent; cursor: pointer; }
+.fc-scan-min { fill: none; stroke: var(--text-primary); stroke-width: 2; pointer-events: none; }
+.fc-v3d-scan-status { min-height: 2.6em; }
+@media (prefers-reduced-motion: reduce) { .fc-v3d { transition: none; } }
diff --git a/frontend/src/types/3dmol.d.ts b/frontend/src/types/3dmol.d.ts
new file mode 100644
index 00000000..536aabc4
--- /dev/null
+++ b/frontend/src/types/3dmol.d.ts
@@ -0,0 +1 @@
+declare module '3dmol/build/3Dmol.es6-min.js';
diff --git a/frontend/src/ui/analysis-name.ts b/frontend/src/ui/analysis-name.ts
new file mode 100644
index 00000000..58c34d62
--- /dev/null
+++ b/frontend/src/ui/analysis-name.ts
@@ -0,0 +1,158 @@
+import type { FormChemDocument, Fragment } from '../engine/model';
+import { namesApi, type NameItem, type NamesOfStructure, type NameSource } from '../engine/names-api';
+import { t } from '../i18n';
+import { copyButtonHtml, copyText, flashCopied } from './dialogs';
+import { el, patchList, pendingClass, q, setClass, setDisabled, setHidden, setText, setTitle } from './dom';
+import { confidenceLabel, engineLabel, methodLabel } from './name-dialog';
+import { toast } from './toast';
+
+const DASH = '–';
+const DEBOUNCE_MS = 160;
+
+export interface NameSection {
+ readonly root: HTMLElement;
+ update(doc: FormChemDocument | null, fragments: readonly Fragment[]): void;
+ current(): NamesOfStructure | null;
+ copyText(): string;
+ destroy(): void;
+}
+
+let latest: NameSection | null = null;
+
+export function currentNameSection(): NameSection | null {
+ return latest;
+}
+
+export function nameSource(doc: FormChemDocument, frags: readonly Fragment[]): NameSource | null {
+ if (!frags.length) return null;
+ const fragment: Fragment = frags.length === 1 ? frags[0] : { id: 'f~names', kind: 'fragment', atoms: {}, bonds: {} };
+ if (frags.length > 1) for (const f of frags) { Object.assign(fragment.atoms, f.atoms); Object.assign(fragment.bonds, f.bonds); }
+ const src: NameSource = { fragment };
+ if (doc.expansions && Object.keys(doc.expansions).length) src.expansions = doc.expansions;
+ return src;
+}
+
+export function nameTitle(item: NameItem, r: NamesOfStructure): string {
+ return `${item.text}\n${t('Method')}: ${methodLabel(item.method)} · ${engineLabel(r)}\n${confidenceLabel(item.confidence)}`;
+}
+
+const sameRefs = (a: readonly unknown[], b: readonly unknown[]): boolean => a.length === b.length && a.every((x, i) => x === b[i]);
+
+export function mountAnalysisName(host: HTMLElement): NameSection {
+ const root = el(`
+ ${copyButtonHtml()}
+
+${DASH}
+
+ `);
+ setText(q(root, '.fc-apx-title'), t('Name'));
+ const list = q(root, '.fc-apn-list');
+ const empty = q(root, '.fc-apn-empty');
+ const note = q(root, '.fc-apx-note');
+ const copyBtn = q(root, '[data-copy]');
+ host.appendChild(root);
+
+ let result: NamesOfStructure | null = null;
+ let inputs: unknown[] = [];
+ let timer = 0;
+ let ctrl: AbortController | null = null;
+ let pending: (() => void) | null = null;
+ let ticket = 0;
+
+ const settle = (): void => {
+ pending?.();
+ pending = null;
+ root.setAttribute('aria-busy', 'false');
+ };
+
+ const showNote = (text: string, error: boolean): void => {
+ setText(note, text);
+ setClass(note, 'is-error', error);
+ setHidden(note, !text);
+ };
+
+ const fill = (li: HTMLElement, n: NameItem): void => {
+ setText(q(li, '.fc-apn-meta'), `${n.kind === 'trivial' ? t('Common name') : t('Systematic')} · ${methodLabel(n.method)}`);
+ setClass(li, 'is-medium', n.confidence !== 'high');
+ if (result) setTitle(li, nameTitle(n, result));
+ };
+
+ const paint = (): void => {
+ const items = result?.names ?? [];
+ patchList(list, items, {
+ key: (n) => `${n.kind}:${n.text}`,
+ create: (n) => {
+ const li = el(` `);
+ setText(q(li, '.fc-apn-text'), n.text);
+ fill(li, n);
+ return li;
+ },
+ update: fill,
+ });
+ setHidden(list, !items.length);
+ setHidden(empty, !!items.length);
+ setDisabled(copyBtn, !items.length);
+ showNote(items.length ? (result?.warnings.find((w) => w.code === 'round_trip')?.text ?? '') : (result?.reason ?? ''), false);
+ };
+
+ const fetchNow = (src: NameSource): void => {
+ ctrl?.abort();
+ const c = new AbortController();
+ ctrl = c;
+ const mine = ++ticket;
+ pending ??= pendingClass(root, 200, 250);
+ root.setAttribute('aria-busy', 'true');
+ namesApi.toName(src, c.signal).then((r) => {
+ if (mine !== ticket) return;
+ result = r;
+ paint();
+ settle();
+ }, (e: unknown) => {
+ if (mine !== ticket || c.signal.aborted) return;
+ settle();
+ showNote(`${t('Names could not be computed')}: ${t(e instanceof Error ? e.message : String(e))}`, true);
+ });
+ };
+
+ const text = (): string => result?.names[0]?.text ?? '';
+
+ copyBtn.addEventListener('click', () => {
+ const value = text();
+ if (!value) return;
+ void copyText(value).then((ok) => flashCopied(copyBtn, ok, () => toast(t('Could not copy to the clipboard'), 'error')));
+ });
+
+ paint();
+
+ const section: NameSection = {
+ root,
+ update(doc, fragments) {
+ const frags = fragments.filter((f) => Object.keys(f.atoms).length > 0);
+ const next = [doc?.expansions, ...frags];
+ if (doc && frags.length && sameRefs(next, inputs)) return;
+ inputs = next;
+ window.clearTimeout(timer);
+ const src = doc ? nameSource(doc, frags) : null;
+ if (!src) {
+ ticket++;
+ ctrl?.abort();
+ settle();
+ result = null;
+ paint();
+ return;
+ }
+ timer = window.setTimeout(() => fetchNow(src), DEBOUNCE_MS);
+ },
+ current: () => result,
+ copyText: text,
+ destroy() {
+ window.clearTimeout(timer);
+ ctrl?.abort();
+ settle();
+ root.remove();
+ if (latest === section) latest = null;
+ },
+ };
+ latest = section;
+ return section;
+}
diff --git a/frontend/src/ui/analysis-panel.ts b/frontend/src/ui/analysis-panel.ts
index 89eed60a..ad05688a 100644
--- a/frontend/src/ui/analysis-panel.ts
+++ b/frontend/src/ui/analysis-panel.ts
@@ -3,6 +3,7 @@ import { documentCounts, hillFormula } from '../chem/formula';
import type { DocEvent } from '../engine/client-api';
import { isFragment, type Derived, type DerivedFragment, type FormChemDocument, type Fragment, type Id } from '../engine/model';
import { t } from '../i18n';
+import { mountAnalysisName, type NameSection } from './analysis-name';
import { mountAnalysisProperties, type PropertiesSection } from './analysis-properties';
import { setStatusFormula } from './status';
import { mountOnce, q, setAttr, setClass, setHidden, setText } from './dom';
@@ -24,6 +25,7 @@ const DASH = '–';
let panel: HTMLElement | null = null;
let props: PropertiesSection | null = null;
+let nameSection: NameSection | null = null;
let open = false;
const listeners = new Set<(open: boolean) => void>();
@@ -54,6 +56,7 @@ export function mountAnalysisPanel(host: HTMLElement): void {
`);
panel = host;
+ nameSection = mountAnalysisName(q(host, '.fc-ap-body'));
props = mountAnalysisProperties(q(host, '.fc-ap-body'));
open = readOpen();
apply();
@@ -152,6 +155,7 @@ function combinedAnalysis(frags: DerivedFragment[], formula: string, charge: num
export function refreshAnalysis(): void {
const s = source;
const frags = s ? pageFragments(s.doc) : [];
+ if (open) nameSection?.update(s?.doc ?? null, frags);
if (open) props?.update(s?.doc ?? null, frags);
if (!s || !frags.length) {
setAnalysis(null);
diff --git a/frontend/src/ui/home.ts b/frontend/src/ui/home.ts
index 21940273..6d6a36f2 100644
--- a/frontend/src/ui/home.ts
+++ b/frontend/src/ui/home.ts
@@ -35,7 +35,7 @@ const RECENT_ON_START = 8;
const FORMATS = ['FCHEM', 'MOL', 'SDF', 'RXN', 'SMILES', 'CDXML', 'CDX', 'CML', 'CIF', 'PDB', 'JDX'];
const KINDS: ListKind[] = ['recent', 'templates', 'databases', 'trash'];
-export const STRUCTURE_ACCEPT = '.fchem,.mol,.mdl,.sdf,.sd,.rxn,.rdf,.rd,.smi,.smiles,.cxsmi,.cxsmiles,.sma,.smarts,.inchi,.cdxml,.cdx,.cml,.cif,.pdb,.jdx,.dx,.svg,.png,.pdf,.eps';
+export const STRUCTURE_ACCEPT = '.fchem,.mol,.mdl,.sdf,.sd,.rxn,.rdf,.rd,.smi,.smiles,.cxsmi,.cxsmiles,.sma,.smarts,.inchi,.cdxml,.cdx,.cml,.cif,.mmcif,.pdb,.ent,.jdx,.dx,.jcamp,.svg,.png,.pdf,.eps';
export function chooseStructureFiles(multiple = true): Promise {
return new Promise((resolve) => {
diff --git a/frontend/src/ui/icons.ts b/frontend/src/ui/icons.ts
index c4816937..474b18e2 100644
--- a/frontend/src/ui/icons.ts
+++ b/frontend/src/ui/icons.ts
@@ -316,6 +316,10 @@ export const ICONS: Record = {
assignWedges: L(` `),
substructure: L(' '),
periodicTable: L(' '),
+ spectrum: L(' '),
+ peakPick: L(' '),
+ integral: L(' '),
+ boxZoom: L(' '),
};
export function icon(name: string, size = 16): string {
diff --git a/frontend/src/ui/name-dialog.ts b/frontend/src/ui/name-dialog.ts
new file mode 100644
index 00000000..c1212b78
--- /dev/null
+++ b/frontend/src/ui/name-dialog.ts
@@ -0,0 +1,256 @@
+import type { EngineDocumentClient } from '../engine/client';
+import { resolveStyle, type Fragment } from '../engine/model';
+import { namesApi, type NameConfidence, type StructureFromName } from '../engine/names-api';
+import { session } from '../engine/session';
+import { t } from '../i18n';
+import { Dialog } from './dialogs';
+import { el, escapeHtml, patchList, pendingClass, q, setAttr, setClass, setDisabled, setHidden, setHtml, setStyleVar, setText, setTitle } from './dom';
+import { placeTemplateOps, type TemplateHooks } from './template-dialog';
+import { templateThumb, thumbBounds } from './template-thumb';
+import { toast } from './toast';
+
+const DEBOUNCE_MS = 220;
+const PX_PER_POINT = 2.6;
+const errText = (e: unknown): string => t(e instanceof Error ? e.message : String(e));
+
+const METHODS: Record = {
+ dictionary: 'Dictionary',
+ 'systematic parser': 'Systematic parser',
+ 'rule-based namer, round-trip checked': 'Rule-based namer, round-trip checked',
+};
+
+export function confidenceLabel(c: NameConfidence): string {
+ if (c === 'high') return t('High confidence');
+ if (c === 'medium') return t('Medium confidence');
+ if (c === 'low') return t('Low confidence');
+ return t('Not read');
+}
+
+export function methodLabel(method: string): string {
+ return t(METHODS[method] ?? method);
+}
+
+export function engineLabel(r: { engine: string; version: string }): string {
+ const who = r.engine === 'formchem' ? t('FormChem names') : r.engine;
+ return [who, r.version].filter(Boolean).join(' ');
+}
+
+function bondLength(): number | undefined {
+ return session.active ? resolveStyle(session.active.doc).bond_length : undefined;
+}
+
+export function resolveName(name: string, signal?: AbortSignal): Promise {
+ return namesApi.toStructure(name, { bondLength: bondLength() }, signal);
+}
+
+export async function insertStructureFromName(found: StructureFromName, hooks: TemplateHooks = {}, fromAgent = false): Promise {
+ const refuse = (text: string): undefined => {
+ toast(text, 'error');
+ if (fromAgent) throw new Error(text);
+ return undefined;
+ };
+ if (!found.fragment) return refuse(`${t('Could not read the name')}: ${t(found.error?.text ?? 'it holds no structure')}`);
+ const had = session.active;
+ let created = '';
+ const c: EngineDocumentClient | null = had ?? await session.create(hooks.createOptions?.() ?? {}).catch((e: unknown) => { created = errText(e); return null; });
+ if (!c) return refuse(`${t('Could not create a drawing')}: ${created}`);
+ let frag: Fragment = found.fragment;
+ const length = resolveStyle(c.doc).bond_length;
+ if (!had && Math.abs(length - 14.4) > 1e-6) {
+ try {
+ const again = await namesApi.toStructure(found.name, { bondLength: length });
+ if (again.fragment) frag = again.fragment;
+ } catch { void 0; }
+ }
+ const xs = Object.values(frag.atoms).map((a) => a.x), ys = Object.values(frag.atoms).map((a) => a.y);
+ const bounds = { x: Math.min(...xs), y: Math.min(...ys), w: Math.max(...xs) - Math.min(...xs), h: Math.max(...ys) - Math.min(...ys) };
+ const placed = placeTemplateOps(c, { id: frag.id, name: found.name, objects: [frag], order: [frag.id], bounds }, hooks.placement?.(c) ?? null);
+ if (!placed) return refuse(t('The drawing has no page to insert into.'));
+ let errors: string[] = [];
+ const off = c.on((e) => { if (e.type === 'rejected') errors = e.errors; });
+ const tx = c.commit(`${t('Insert Structure from Name')}: ${found.name}`, placed.ops);
+ off();
+ if (!tx) return refuse(`${t('Could not insert the structure')}: ${errors[0] ?? ''}`);
+ hooks.inserted?.(c, placed.fragments);
+ const how = `${found.method}, ${found.confidence} confidence, ${found.engine} ${found.version}`;
+ return `Inserted "${found.name}" as ${found.smiles ?? frag.id} (${how}) into "${c.title || 'Untitled'}" (${c.id}) as one undo step`;
+}
+
+export async function insertName(name: string, hooks: TemplateHooks = {}, fromAgent = false): Promise {
+ const text = name.trim();
+ let found: StructureFromName;
+ try {
+ found = await resolveName(text);
+ } catch (e) {
+ const msg = `${t('Could not read the name')}: ${errText(e)}`;
+ toast(msg, 'error');
+ if (fromAgent) throw new Error(msg);
+ return undefined;
+ }
+ return insertStructureFromName(found, hooks, fromAgent);
+}
+
+class NameDialog extends Dialog {
+ private readonly input = el(' ');
+ private readonly preview = el('');
+ private readonly meta = el('
');
+ private readonly where = el('
');
+ private readonly notes = el('');
+ private readonly insertBtn: HTMLButtonElement;
+ private hooks: TemplateHooks = {};
+ private found: StructureFromName | null = null;
+ private timer = 0;
+ private ctrl: AbortController | null = null;
+ private running: Promise | null = null;
+ private settle: (() => void) | null = null;
+ private ticket = 0;
+ private busy = false;
+
+ constructor() {
+ super(t('Structure from Name'), 520);
+ setClass(this.frame, 'fc-nd-dialog', true);
+ setAttr(this.input, 'placeholder', t('A name, such as aspirin or 2-methylpropan-1-ol'));
+ setAttr(this.input, 'aria-label', t('Chemical name'));
+ const row = this.field(t('Name'), this.input);
+ setClass(row, 'is-stack', true);
+ const info = el('
');
+ info.append(this.where, this.notes);
+ this.body.append(this.preview, this.meta, info);
+ this.button(t('Cancel'), 'ghost', () => this.close());
+ this.insertBtn = this.button(t('Insert'), 'primary', () => void this.commit());
+ this.input.addEventListener('input', () => this.schedule());
+ this.input.addEventListener('keydown', (e) => {
+ if (e.key !== 'Enter' || e.isComposing) return;
+ e.preventDefault();
+ void this.commit();
+ });
+ this.onClose = () => { window.clearTimeout(this.timer); this.ctrl?.abort(); };
+ this.paint();
+ }
+
+ show(hooks: TemplateHooks, text?: string, known?: StructureFromName): void {
+ this.hooks = hooks;
+ if (typeof text === 'string') this.input.value = text;
+ this.open(this.input);
+ this.input.select();
+ if (known && known.name === this.input.value.trim()) {
+ this.ticket++;
+ this.found = known;
+ this.paint();
+ } else {
+ this.schedule(0);
+ }
+ }
+
+ private schedule(delay = DEBOUNCE_MS): void {
+ window.clearTimeout(this.timer);
+ const name = this.input.value.trim();
+ if (!name) {
+ this.ticket++;
+ this.ctrl?.abort();
+ this.found = null;
+ this.paint();
+ return;
+ }
+ this.timer = window.setTimeout(() => { this.running = this.lookup(name); }, delay);
+ }
+
+ private async lookup(name: string): Promise {
+ this.ctrl?.abort();
+ const ctrl = new AbortController();
+ this.ctrl = ctrl;
+ const mine = ++this.ticket;
+ this.settle ??= pendingClass(this.preview, 200, 250);
+ try {
+ const found = await resolveName(name, ctrl.signal);
+ if (mine !== this.ticket) return;
+ this.found = found;
+ } catch (e) {
+ if (mine !== this.ticket || ctrl.signal.aborted) return;
+ this.found = { name, smiles: null, inchikey: null, confidence: 'none', method: '', engine: '', version: '', warnings: [], error: { text: errText(e) }, fragment: null, formula: null };
+ } finally {
+ if (mine === this.ticket) { this.settle?.(); this.settle = null; }
+ }
+ this.paint();
+ }
+
+ private paint(): void {
+ const f = this.found;
+ const thumb = q(this.preview, '.fc-nd-thumb');
+ const empty = q(this.preview, '.fc-nd-empty');
+ const svg = f?.fragment ? templateThumb([f.fragment], [f.fragment.id]) : '';
+ const b = f?.fragment ? thumbBounds([f.fragment]) : null;
+ if (b) setStyleVar(thumb, '--fc-nd-side', `${Math.round((Math.max(b.w, b.h, 24) + 16) * PX_PER_POINT)}px`);
+ setHtml(thumb, svg, svg ? `n:${f?.inchikey ?? ''}:${f?.name ?? ''}` : 'blank');
+ setHidden(thumb, !svg);
+ setText(empty, !this.input.value.trim() ? t('Type a name to see its structure.') : f?.error ? t('No structure for this name') : '');
+ setHidden(empty, !!svg);
+ const chip = q(this.meta, '.fc-nd-chip');
+ setText(chip, f ? confidenceLabel(f.confidence) : '');
+ for (const c of ['high', 'medium', 'low', 'none'] as const) setClass(chip, `is-${c}`, f?.confidence === c);
+ setText(q(this.meta, '.fc-nd-method'), f?.method ? `${methodLabel(f.method)} · ${engineLabel(f)}` : '');
+ setText(q(this.meta, '.fc-nd-formula'), f?.formula ?? '');
+ setClass(this.meta, 'is-empty', !f);
+ const pos = f?.error?.position;
+ if (f?.error && typeof pos === 'number' && pos >= 0) {
+ const shown = this.input.value.trim();
+ setHtml(this.where, `${escapeHtml(shown.slice(0, pos))}${escapeHtml(shown.slice(pos)) || ' '} `, `w:${pos}:${shown}`);
+ setHidden(this.where, false);
+ } else {
+ setHidden(this.where, true);
+ }
+ const texts = [...(f?.error ? [f.error.text] : []), ...(f?.warnings.map((w) => w.text) ?? [])];
+ patchList(this.notes, [...new Set(texts)], {
+ key: (s) => s,
+ create: (s) => { const li = document.createElement('li'); li.className = 'fc-nd-note'; setText(li, t(s)); return li; },
+ update: () => undefined,
+ });
+ setClass(this.notes, 'is-error', !!f?.error);
+ setHidden(this.notes, !texts.length);
+ setDisabled(this.insertBtn, !f?.fragment || this.busy);
+ setTitle(this.insertBtn, f?.smiles ?? '');
+ }
+
+ private async commit(): Promise {
+ if (this.busy) return;
+ window.clearTimeout(this.timer);
+ const name = this.input.value.trim();
+ if (!name) return;
+ if (!this.found || this.found.name !== name) {
+ this.running = this.lookup(name);
+ }
+ await this.running;
+ const f = this.found;
+ if (!f?.fragment) { this.input.focus(); return; }
+ this.busy = true;
+ this.paint();
+ try {
+ const done = await insertStructureFromName(f, this.hooks);
+ if (done) this.close();
+ } finally {
+ this.busy = false;
+ this.paint();
+ }
+ }
+}
+
+let dialog: NameDialog | null = null;
+
+export function nameDialog(hooks: TemplateHooks = {}, text?: string, known?: StructureFromName): void {
+ dialog ??= new NameDialog();
+ dialog.show(hooks, text, known);
+}
+
+export async function offerName(text: string, hooks: TemplateHooks = {}): Promise {
+ const name = text.trim();
+ if (!name || name.length > 300 || name.includes('\n')) return false;
+ let found: StructureFromName;
+ try {
+ found = await resolveName(name);
+ } catch {
+ return false;
+ }
+ if (!found.fragment) return false;
+ nameDialog(hooks, name, found);
+ return true;
+}
diff --git a/frontend/src/ui/scan-plot.ts b/frontend/src/ui/scan-plot.ts
new file mode 100644
index 00000000..6a9ff588
--- /dev/null
+++ b/frontend/src/ui/scan-plot.ts
@@ -0,0 +1,140 @@
+import { t } from '../i18n';
+
+export interface PlotPoint { angle: number; energy: number }
+
+const NS = 'http://www.w3.org/2000/svg';
+const W = 420, H = 220;
+const M = { l: 48, r: 14, t: 14, b: 36 };
+const PW = W - M.l - M.r, PH = H - M.t - M.b;
+
+function node(tag: K, attrs: Record = {}, parent?: Element): SVGElementTagNameMap[K] {
+ const n = document.createElementNS(NS, tag);
+ for (const [k, v] of Object.entries(attrs)) n.setAttribute(k, v);
+ parent?.appendChild(n);
+ return n;
+}
+
+function set(n: Element, k: string, v: string): void {
+ if (n.getAttribute(k) !== v) n.setAttribute(k, v);
+}
+
+function setText(n: Element, s: string): void {
+ if (n.textContent !== s) n.textContent = s;
+}
+
+function niceStep(span: number, target: number): number {
+ const raw = span / Math.max(1, target);
+ const p = 10 ** Math.floor(Math.log10(raw || 1));
+ const f = raw / p;
+ return (f <= 1 ? 1 : f <= 2 ? 2 : f <= 5 ? 5 : 10) * p;
+}
+
+function ticks(lo: number, hi: number, target: number): number[] {
+ const step = niceStep(hi - lo, target);
+ const out: number[] = [];
+ for (let v = Math.ceil(lo / step - 1e-9) * step; v <= hi + 1e-9; v += step) out.push(Math.round(v * 1e6) / 1e6);
+ return out;
+}
+
+function keyed(group: Element, keys: string[], make: (k: string) => Element): Map {
+ const have = new Map();
+ for (const c of Array.from(group.children)) have.set(c.getAttribute('data-key') ?? '', c);
+ const out = new Map();
+ for (const k of keys) {
+ let n = have.get(k);
+ if (!n) { n = make(k); n.setAttribute('data-key', k); group.appendChild(n); }
+ out.set(k, n);
+ have.delete(k);
+ }
+ for (const n of have.values()) n.remove();
+ return out;
+}
+
+export class ScanPlot {
+ readonly svg: SVGSVGElement;
+ private grid: SVGGElement;
+ private xAxis: SVGGElement;
+ private yAxis: SVGGElement;
+ private line: SVGPathElement;
+ private dots: SVGGElement;
+ private minMark: SVGCircleElement;
+ private readout: SVGTextElement;
+ private points: PlotPoint[] = [];
+ private onPick: ((i: number) => void) | null = null;
+
+ constructor(label: string) {
+ this.svg = node('svg', { viewBox: `0 0 ${W} ${H}`, class: 'fc-scan-plot', role: 'img', 'aria-label': label });
+ this.grid = node('g', { class: 'fc-scan-grid' }, this.svg);
+ this.xAxis = node('g', { class: 'fc-scan-axis' }, this.svg);
+ this.yAxis = node('g', { class: 'fc-scan-axis' }, this.svg);
+ node('line', { x1: String(M.l), y1: String(M.t + PH), x2: String(M.l + PW), y2: String(M.t + PH), class: 'fc-scan-base' }, this.svg);
+ const xt = node('text', { x: String(M.l + PW / 2), y: String(H - 4), class: 'fc-scan-title', 'text-anchor': 'middle' }, this.svg);
+ xt.textContent = t('Dihedral angle (degrees)');
+ const yt = node('text', { x: '12', y: String(M.t + PH / 2), class: 'fc-scan-title', 'text-anchor': 'middle', transform: `rotate(-90 12 ${M.t + PH / 2})` }, this.svg);
+ yt.textContent = t('Relative energy (kcal/mol)');
+ this.line = node('path', { class: 'fc-scan-line', fill: 'none' }, this.svg);
+ this.dots = node('g', { class: 'fc-scan-dots' }, this.svg);
+ this.minMark = node('circle', { r: '6', class: 'fc-scan-min', visibility: 'hidden' }, this.svg);
+ this.readout = node('text', { x: String(M.l + PW), y: String(M.t + 10), class: 'fc-scan-readout', 'text-anchor': 'end' }, this.svg);
+ this.svg.addEventListener('pointerleave', () => this.hover(-1));
+ }
+
+ pick(fn: ((i: number) => void) | null): void { this.onPick = fn; }
+
+ update(points: PlotPoint[]): void {
+ this.points = points;
+ const has = points.length > 0;
+ const xs = points.map((p) => p.angle), es = points.map((p) => p.energy);
+ const x0 = has ? Math.min(...xs) : -180, x1 = has ? Math.max(...xs) : 180;
+ const e0 = has ? Math.min(0, ...es) : 0, e1 = has ? Math.max(1, ...es) : 10;
+ const yStep = niceStep(e1 - e0, 4);
+ const yTop = Math.max(e0 + yStep, Math.ceil(e1 / yStep - 1e-9) * yStep);
+ const sx = (a: number): number => M.l + ((a - x0) / Math.max(1e-9, x1 - x0)) * PW;
+ const sy = (e: number): number => M.t + PH - ((e - e0) / Math.max(1e-9, yTop - e0)) * PH;
+
+ const xt = ticks(x0, x1, 6);
+ const xNodes = keyed(this.xAxis, xt.map(String), () => node('text', { class: 'fc-scan-tick', 'text-anchor': 'middle' }));
+ for (const v of xt) {
+ const n = xNodes.get(String(v)) as Element;
+ set(n, 'x', sx(v).toFixed(1)); set(n, 'y', String(M.t + PH + 14)); setText(n, String(v));
+ }
+ const yt = ticks(e0, yTop, 4);
+ const yNodes = keyed(this.yAxis, yt.map(String), () => node('text', { class: 'fc-scan-tick', 'text-anchor': 'end' }));
+ const gNodes = keyed(this.grid, yt.map(String), () => node('line', { class: 'fc-scan-gridline' }));
+ for (const v of yt) {
+ const y = sy(v).toFixed(1);
+ const n = yNodes.get(String(v)) as Element;
+ set(n, 'x', String(M.l - 6)); set(n, 'y', String(Number(y) + 4)); setText(n, String(v));
+ const g = gNodes.get(String(v)) as Element;
+ set(g, 'x1', String(M.l)); set(g, 'x2', String(M.l + PW)); set(g, 'y1', y); set(g, 'y2', y);
+ }
+
+ set(this.line, 'd', points.map((p, i) => `${i ? 'L' : 'M'}${sx(p.angle).toFixed(1)} ${sy(p.energy).toFixed(1)}`).join(''));
+ const dots = keyed(this.dots, points.map((p) => String(p.angle)), (k) => {
+ const c = node('circle', { r: '4', class: 'fc-scan-dot', tabindex: '-1' });
+ const hit = node('circle', { r: '11', class: 'fc-scan-hit' });
+ const g = node('g', {});
+ g.append(c, hit);
+ g.addEventListener('pointerenter', () => this.hover(this.points.findIndex((p) => String(p.angle) === k)));
+ g.addEventListener('click', () => { const i = this.points.findIndex((p) => String(p.angle) === k); if (i >= 0) this.onPick?.(i); });
+ return g;
+ });
+ for (const p of points) {
+ const g = dots.get(String(p.angle)) as Element;
+ for (const c of Array.from(g.children)) { set(c, 'cx', sx(p.angle).toFixed(1)); set(c, 'cy', sy(p.energy).toFixed(1)); }
+ }
+ let min = -1;
+ points.forEach((p, i) => { if (min < 0 || p.energy < points[min].energy) min = i; });
+ set(this.minMark, 'visibility', min >= 0 ? 'visible' : 'hidden');
+ if (min >= 0) { set(this.minMark, 'cx', sx(points[min].angle).toFixed(1)); set(this.minMark, 'cy', sy(points[min].energy).toFixed(1)); }
+ this.hover(-1);
+ }
+
+ private hover(i: number): void {
+ const p = this.points[i];
+ if (p) { setText(this.readout, `${p.angle.toFixed(0)}° ${p.energy.toFixed(2)} kcal/mol`); return; }
+ let min: PlotPoint | null = null;
+ for (const q of this.points) if (!min || q.energy < min.energy) min = q;
+ setText(this.readout, min ? t(`Minimum ${min.angle.toFixed(0)}°`) : '');
+ }
+}
diff --git a/frontend/src/ui/spectrum-panel.ts b/frontend/src/ui/spectrum-panel.ts
new file mode 100644
index 00000000..4a05cb34
--- /dev/null
+++ b/frontend/src/ui/spectrum-panel.ts
@@ -0,0 +1,639 @@
+import { commandStateChanged } from '../app/commands-shell';
+import { atomsOfSelection } from '../canvas/tools/common';
+import { OBJECT_OPEN_EVENT, type ObjectOpenDetail } from '../canvas/tools/select';
+import { fmt, inflate, type Box } from '../canvas/render/geom';
+import { formatX, fullX, hasYAxis, vx, vy, type PlotFrame, type Range } from '../canvas/render/spectrum-axes';
+import { OVERLAY_COLOURS, spectrumPlot, type PlotMark, type PlotPaint } from '../canvas/render/spectrum';
+import { spectrumCache } from '../canvas/render/spectrum-data';
+import { focusForMark, spectrumLinks } from '../canvas/spectrum-links';
+import { patchChildren, specKey, svgEl, type NodeSpec } from '../canvas/render/svg';
+import type { CanvasView } from '../canvas/view';
+import { addPeakOps, findMark, linkOps, markLabel, removeMarkOps, spectrumOf, viewOps, yModeOps, type AnyMark } from '../chem/spectrum-ops';
+import { commands } from '../commands/registry';
+import type { DocumentClient } from '../engine/client-api';
+import type { Id, SpectrumObject } from '../engine/model';
+import { spectraApi, type SpectrumData, type YMode } from '../engine/spectra-api';
+import { t } from '../i18n';
+import { el, escapeHtml, patchList, q, qa, setAttr, setClass, setDisabled, setHidden, setText, setTitle, setValue } from './dom';
+import { icon } from './icons';
+import { toast } from './toast';
+
+export type PlotMode = 'pan' | 'box' | 'pick' | 'peak' | 'integrate';
+
+interface Gesture { kind: 'pan' | 'band'; x0: number; from: number; to: number; moved: boolean; pointer: number }
+
+const MODES: Array<[PlotMode, string, string]> = [
+ ['pan', 'hand', 'Pan and zoom: drag to pan, wheel to zoom, Shift-drag to zoom to a range'],
+ ['box', 'boxZoom', 'Zoom to a range: drag across the plot'],
+ ['pick', 'peakPick', 'Pick peaks: drag across a range'],
+ ['peak', 'add', 'Add or remove a peak: click near a peak'],
+ ['integrate', 'integral', 'Integrate: drag across a range'],
+];
+
+const DASH = '–';
+const PEAK_SNAP_PX = 8;
+const IDLE_MS = 160;
+
+let section: HTMLElement | null = null;
+let view: CanvasView | null = null;
+let open = false;
+let target: Id | null = null;
+let client: DocumentClient | null = null;
+let clientOff: (() => void) | null = null;
+let mode: PlotMode = 'pan';
+let range: Range | null = null;
+let size = { w: 0, h: 0 };
+let gesture: Gesture | null = null;
+let idleTimer: number | undefined;
+let gestureActive = false;
+let lastFrame: PlotFrame | null = null;
+let lastMarks: PlotMark[] = [];
+let lastData: SpectrumData | null = null;
+let selected: Id | null = null;
+let linking: { mark: Id; frag: Id | null; atoms: Id[] } | null = null;
+let plotKey = '';
+let markKey = '';
+let queued = false;
+const listeners = new Set<(open: boolean) => void>();
+
+const svgParts: { svg: SVGSVGElement | null; plot: SVGGElement | null; marks: SVGGElement | null; band: SVGRectElement | null } = { svg: null, plot: null, marks: null, band: null };
+
+const obj = (): SpectrumObject | null => (client ? spectrumOf(client.doc, target) : null);
+
+function markup(): string {
+ const modeBtns = MODES.map(([m, ic, tip]) => `${icon(ic, 15)} `).join('');
+ return `
+
${escapeHtml(t('Spectrum'))} ${icon('close', 14)}
+
${modeBtns}
+${icon('zoomFit', 15)}
+%T A
+
+${icon('fitView', 15)}
+${icon('download', 15)}
+
+
+
${escapeHtml(t('Done'))} ${escapeHtml(t('Cancel'))}
+
+
${escapeHtml(t('Double-click a spectrum in the drawing to edit it here.'))}
+
+
+
`;
+}
+
+function apply(): void {
+ if (!section) return;
+ setClass(section, 'is-open', open);
+ const inner = q(section, '.fc-spv-in');
+ setAttr(inner, 'aria-hidden', open ? null : 'true');
+ if (open) inner.removeAttribute('inert'); else inner.setAttribute('inert', '');
+}
+
+export function mountSpectrumPanel(host: HTMLElement, canvas: CanvasView): HTMLElement {
+ if (section) return section;
+ const node = el(``);
+ host.appendChild(node);
+ section = node;
+ view = canvas;
+ const svg = q(node, '.fc-spv-svg');
+ svgParts.svg = svg;
+ svgParts.plot = svgEl('g', { class: 'fc-spv-plotg' });
+ svgParts.marks = svgEl('g', { class: 'fc-spv-marks' });
+ svgParts.band = svgEl('rect', { class: 'fc-spv-band', x: '0', y: '0', width: '0', height: '0', visibility: 'hidden' });
+ svg.append(svgParts.marks, svgParts.plot, svgParts.band);
+ wire(node);
+ apply();
+ canvas.on('client', () => follow(canvas.client));
+ follow(canvas.client);
+ spectrumCache.subscribe(() => refreshSoon());
+ spectrumLinks.subscribe(() => drawMarks());
+ document.addEventListener(OBJECT_OPEN_EVENT, (e) => {
+ const d = (e as CustomEvent).detail;
+ if (d?.kind === 'spectrum') openSpectrumEditor(d.object);
+ });
+ new ResizeObserver(() => {
+ const r = q(node, '.fc-spv-plot').getBoundingClientRect();
+ const next = { w: Math.round(r.width), h: Math.round(r.height) };
+ if (next.w !== size.w || next.h !== size.h) { size = next; refreshSoon(); }
+ }).observe(q(node, '.fc-spv-plot'));
+ requestAnimationFrame(() => requestAnimationFrame(() => node.classList.add('is-animated')));
+ return node;
+}
+
+function follow(next: DocumentClient | null): void {
+ if (next === client) return;
+ clientOff?.();
+ clientOff = null;
+ client = next;
+ if (next) clientOff = next.on((e) => { if (e.type === 'tx' || e.type === 'reset' || e.type === 'preview') refreshSoon(); });
+ if (!obj()) { target = null; range = null; selected = null; stopLinking(false); }
+ refreshSoon();
+}
+
+export function isSpectrumEditorOpen(): boolean { return open; }
+export function spectrumEditorTarget(): Id | null { return open ? target : null; }
+
+export function onSpectrumEditorToggle(fn: (open: boolean) => void): () => void {
+ listeners.add(fn);
+ return () => { listeners.delete(fn); };
+}
+
+export function setSpectrumEditorOpen(on: boolean): void {
+ if (on === open) return;
+ open = on;
+ if (!on) { stopLinking(false); spectrumLinks.clear('panel'); }
+ apply();
+ refreshSoon();
+ for (const l of [...listeners]) l(on);
+ commandStateChanged();
+}
+
+export function openSpectrumEditor(id: Id): void {
+ if (id !== target) { target = id; range = null; selected = null; stopLinking(false); plotKey = ''; }
+ setSpectrumEditorOpen(true);
+ refreshSoon();
+}
+
+export function closeSpectrumEditor(): void { setSpectrumEditorOpen(false); }
+
+export function selectSpectrumMark(id: Id | null): void {
+ selected = id;
+ refreshSoon();
+}
+
+export function spectrumEditorMark(): Id | null { return open ? selected : null; }
+
+export function spectrumEditorRange(): Range | null { return open ? currentRange() : null; }
+
+export function setSpectrumEditorMode(next: PlotMode): void {
+ mode = next;
+ refreshSoon();
+}
+
+function refreshSoon(): void {
+ if (queued) return;
+ queued = true;
+ requestAnimationFrame(() => { queued = false; refresh(); });
+}
+
+function panelPaint(): PlotPaint {
+ return { ink: 'currentColor', overlay: OVERLAY_COLOURS, integral: '#4dabf7', lineWidth: 1, font: { family: 'Arimo', size: 11 }, size: 10 };
+}
+
+function plotBox(o: SpectrumObject): Box {
+ const left = hasYAxis(o.technique) ? 52 : 14;
+ const bottom = o.technique === 'nmr' && o.integrals?.length ? 58 : 42;
+ return { x: left, y: 22, w: Math.max(40, size.w - left - 14), h: Math.max(40, size.h - 22 - bottom) };
+}
+
+function shownObject(o: SpectrumObject): SpectrumObject {
+ if (!range) return o;
+ return { ...o, view: { ...(o.view ?? {}), x_from: range.from, x_to: range.to } };
+}
+
+function refresh(): void {
+ if (!section) return;
+ const o = open ? obj() : null;
+ setHidden(q(section, '.fc-spv-empty'), !!o);
+ const name = o ? spectrumName(o) : '';
+ setText(q(section, '.fc-spv-name'), name);
+ setTitle(q(section, '.fc-spv-name'), name);
+ syncTools(o);
+ drawPlot(o);
+ syncList(o);
+ drawMarks();
+ syncHint(o);
+}
+
+function spectrumName(o: SpectrumObject): string {
+ const n = t(o.technique === 'nmr' ? `${o.nucleus ?? '1H'} NMR` : o.technique === 'uvvis' ? 'UV-Vis' : o.technique.toUpperCase());
+ if ('predicted' in o.source) {
+ const p = o.source.predicted;
+ return `${n} · ${t('Predicted')} · ${[p.method, p.version].filter(Boolean).join(' ')}${p.frequency ? ` · ${p.frequency} MHz` : ''}`;
+ }
+ return lastData?.title ? `${n} · ${lastData.title}` : n;
+}
+
+function syncTools(o: SpectrumObject | null): void {
+ if (!section) return;
+ for (const b of qa(section, '.fc-spv-mode')) {
+ const m = b.dataset.mode as PlotMode;
+ setAttr(b, 'aria-pressed', m === mode ? 'true' : 'false');
+ setClass(b, 'is-active', m === mode);
+ setDisabled(b, !o || (m === 'integrate' && o.technique !== 'nmr'));
+ setHidden(b, m === 'integrate' && !!o && o.technique !== 'nmr');
+ }
+ const yGroup = q(section, '.fc-spv-ymode');
+ const canY = !!o && (o.technique === 'ir' || o.technique === 'uvvis' || o.technique === 'raman') && (lastData?.yModes.length ?? 0) !== 1;
+ setHidden(yGroup, !canY);
+ const ym = lastFrame?.yMode ?? null;
+ for (const b of qa(yGroup, '[data-ymode]')) setAttr(b, 'aria-pressed', b.dataset.ymode === ym ? 'true' : 'false');
+ for (const k of ['reset', 'apply', 'export']) setDisabled(q(section, `[data-spv="${k}"]`), !o);
+}
+
+function drawPlot(o: SpectrumObject | null): void {
+ const { svg, plot } = svgParts;
+ if (!svg || !plot) return;
+ setAttr(svg, 'width', String(size.w));
+ setAttr(svg, 'height', String(size.h));
+ if (!o || !client || size.w < 40 || size.h < 40) {
+ if (plotKey !== '') { plotKey = ''; patchChildren(plot, []); }
+ lastFrame = null;
+ lastMarks = [];
+ return;
+ }
+ const shown = shownObject(o);
+ const out = spectrumPlot(client.doc, shown, panelPaint(), gestureActive ? undefined : window.devicePixelRatio || 1, plotBox(o), 'fc-spv-clip');
+ lastFrame = out.state.frame;
+ lastMarks = out.marks;
+ lastData = out.state.data;
+ const key = specKey(out.specs);
+ if (key === plotKey) return;
+ plotKey = key;
+ patchChildren(plot, out.specs);
+}
+
+function drawMarks(): void {
+ const g = svgParts.marks;
+ if (!g) return;
+ const f = spectrumLinks.focus;
+ const lit = new Set(f.marks.filter((m) => m.spectrum === target).map((m) => m.mark));
+ const specs: NodeSpec[] = [];
+ for (const m of lastMarks) {
+ const on = lit.has(m.id), sel = m.id === selected, link = linking?.mark === m.id;
+ if (!on && !sel && !link) continue;
+ const b = inflate(m.hit, 2);
+ specs.push({ tag: 'rect', a: { x: fmt(b.x), y: fmt(b.y), width: fmt(b.w), height: fmt(b.h), rx: '3', class: `fc-spv-mark${on ? ' is-lit' : ''}${sel ? ' is-selected' : ''}${link ? ' is-linking' : ''}` } });
+ }
+ const key = specKey(specs);
+ if (key !== markKey) { markKey = key; patchChildren(g, specs); }
+ if (section) for (const row of qa(section, '.fc-spv-row')) setClass(row, 'is-lit', lit.has(row.dataset.key ?? ''));
+}
+
+interface Row { id: Id; kind: 'peak' | 'integral' | 'multiplet'; mark: AnyMark }
+
+function rowsOf(o: SpectrumObject | null): Row[] {
+ if (!o) return [];
+ return [
+ ...(o.peaks ?? []).map((m): Row => ({ id: m.id, kind: 'peak', mark: m })),
+ ...(o.integrals ?? []).map((m): Row => ({ id: m.id, kind: 'integral', mark: m })),
+ ...(o.multiplets ?? []).map((m): Row => ({ id: m.id, kind: 'multiplet', mark: m })),
+ ];
+}
+
+const KIND_LABEL: Record = { peak: 'Peak', integral: 'Integral', multiplet: 'Multiplet' };
+
+function rowNode(r: Row): HTMLElement {
+ return el(`
+
+
+
+${icon('link', 14)}
+${icon('unlink', 14)}
+${icon('delete', 14)}
+ `);
+}
+
+function syncRow(node: HTMLElement, r: Row, o: SpectrumObject): void {
+ setText(q(node, '.fc-spv-kind'), t(KIND_LABEL[r.kind]));
+ setText(q(node, '.fc-spv-pos'), markLabel(o, r.mark));
+ const input = q(node, '.fc-spv-val');
+ setHidden(input, r.kind !== 'integral');
+ if (r.kind === 'integral') setValue(input, 'value' in r.mark && r.mark.value !== undefined ? String(r.mark.value) : '');
+ const n = r.mark.atoms?.atoms.length ?? 0;
+ setText(q(node, '.fc-spv-atoms'), n === 1 ? t('1 atom') : n ? t(`${n} atoms`) : DASH);
+ setHidden(q(node, '[data-row="unlink"]'), !n);
+ setClass(node, 'is-selected', r.id === selected);
+ setClass(node, 'is-linking', linking?.mark === r.id);
+ setTitle(node, r.mark.atoms ? t(`Linked to ${r.mark.atoms.atoms.join(', ')}`) : '');
+}
+
+function syncList(o: SpectrumObject | null): void {
+ if (!section) return;
+ const list = q(section, '.fc-spv-list');
+ const rows = rowsOf(o);
+ if (!o) { patchList(list, [], { key: (r: Row) => r.id, create: rowNode, update: () => undefined }); return; }
+ patchList(list, rows, { key: (r) => r.id, create: (r) => { const n = rowNode(r); syncRow(n, r, o); return n; }, update: (n, r) => syncRow(n, r, o) });
+}
+
+const HINTS: Record = {
+ pan: 'Drag to pan, wheel to zoom, Shift-drag to zoom to a range. Click a label to select it.',
+ box: 'Drag across the plot to zoom to that range.',
+ pick: 'Drag across a range to pick its peaks.',
+ peak: 'Click near a peak to add it; click a peak label to remove it.',
+ integrate: 'Drag across a range to integrate it.',
+};
+
+function syncHint(o: SpectrumObject | null): void {
+ if (!section) return;
+ const bar = q(section, '.fc-spv-linkbar');
+ setHidden(bar, !linking);
+ let text = o ? t(HINTS[mode]) : '';
+ if (linking) {
+ const n = linking.atoms.length;
+ text = n ? `${t('Atoms to link')}: ${n}. ${t('Click more atoms, then Done.')}` : t('Click the atoms in the drawing that belong to this peak, then Done.');
+ }
+ setText(q(section, '.fc-spv-hint-text'), text);
+}
+
+function local(e: PointerEvent | WheelEvent | MouseEvent): [number, number] {
+ const r = svgParts.svg!.getBoundingClientRect();
+ return [e.clientX - r.left, e.clientY - r.top];
+}
+
+function fullRange(o: SpectrumObject): Range {
+ return fullX(o, lastData);
+}
+
+function currentRange(): Range | null {
+ return lastFrame ? { from: lastFrame.x.from, to: lastFrame.x.to } : null;
+}
+
+function clampRange(o: SpectrumObject, r: Range): Range {
+ const full = fullRange(o);
+ const lo = Math.min(full.from, full.to), hi = Math.max(full.from, full.to);
+ const span = Math.max(Math.abs(r.to - r.from), (hi - lo) / 5000);
+ if (span >= hi - lo) return { ...full };
+ const dir = Math.sign(r.to - r.from) || Math.sign(full.to - full.from) || 1;
+ let a = Math.min(r.from, r.to);
+ a = Math.max(lo, Math.min(hi - span, a));
+ return dir > 0 ? { from: a, to: a + span } : { from: a + span, to: a };
+}
+
+function setRange(r: Range | null, during: boolean): void {
+ const o = obj();
+ range = r && o ? clampRange(o, r) : null;
+ gestureActive = during;
+ window.clearTimeout(idleTimer);
+ if (during) idleTimer = window.setTimeout(() => { gestureActive = false; refreshSoon(); }, IDLE_MS);
+ refreshSoon();
+}
+
+function markAt(p: [number, number]): PlotMark | null {
+ let best: PlotMark | null = null, bd = Infinity;
+ for (const m of lastMarks) {
+ const b = inflate(m.hit, 2);
+ if (p[0] < b.x || p[0] > b.x + b.w || p[1] < b.y || p[1] > b.y + b.h) continue;
+ const d = Math.abs(m.at[0] - p[0]);
+ if (d < bd) { bd = d; best = m; }
+ }
+ return best;
+}
+
+function snapPeak(f: PlotFrame, px: number): { x: number; y: number | null } {
+ const d = lastData;
+ const x = vx(f, px);
+ if (!d || !d.x.length) return { x, y: null };
+ const lo = Math.min(vx(f, px - PEAK_SNAP_PX), vx(f, px + PEAK_SNAP_PX)), hi = Math.max(vx(f, px - PEAK_SNAP_PX), vx(f, px + PEAK_SNAP_PX));
+ const dips = f.yMode === 'transmittance';
+ let bi = -1;
+ for (let i = 0; i < d.x.length; i++) {
+ if (d.x[i] < lo || d.x[i] > hi) continue;
+ if (bi < 0 || (dips ? d.y[i] < d.y[bi] : d.y[i] > d.y[bi])) bi = i;
+ }
+ return bi >= 0 ? { x: d.x[bi], y: d.y[bi] } : { x, y: null };
+}
+
+const errText = (e: unknown): string => t(e instanceof Error ? e.message : String(e));
+
+async function runBand(o: SpectrumObject, r: Range): Promise {
+ if (!client) return;
+ if (mode === 'box' || (mode === 'pan')) { setRange(r, false); return; }
+ const c = client;
+ try {
+ if (mode === 'pick') {
+ const done = await spectraApi.pickPeaks(c, o, r);
+ toast(done.changed ? t(`Peaks picked: ${done.count}`) : t('No new peaks in that range.'));
+ } else if (mode === 'integrate') {
+ const done = await spectraApi.integrate(c, o, r);
+ if (!done.changed) toast(t('Nothing to integrate in that range.'));
+ }
+ } catch (e) {
+ toast(`${t(mode === 'pick' ? 'Could not pick peaks' : 'Could not integrate')}: ${errText(e)}`, 'error');
+ }
+}
+
+function clickPlot(o: SpectrumObject, p: [number, number]): void {
+ if (!client || !lastFrame) return;
+ const hit = markAt(p);
+ if (mode === 'peak') {
+ if (hit && hit.kind === 'peak') {
+ client.commit(t('Remove Peak'), removeMarkOps(o, hit.id));
+ if (selected === hit.id) selected = null;
+ return;
+ }
+ const b = lastFrame.box;
+ if (p[0] < b.x || p[0] > b.x + b.w) return;
+ const s = snapPeak(lastFrame, p[0]);
+ const added = addPeakOps(o, s.x, s.y);
+ if (client.commit(t('Add Peak'), added.ops)) selected = added.id;
+ refreshSoon();
+ return;
+ }
+ selected = hit ? hit.id : null;
+ refreshSoon();
+}
+
+function readout(p: [number, number] | null): void {
+ if (!section) return;
+ const node = q(section, '.fc-spv-readout');
+ const f = lastFrame, o = obj();
+ if (!p || !f || !o || p[0] < f.box.x || p[0] > f.box.x + f.box.w || p[1] < f.box.y || p[1] > f.box.y + f.box.h) { setText(node, ''); return; }
+ const y = vy(f, p[1]);
+ setText(node, `x ${formatX(o, vx(f, p[0]))} y ${Math.abs(y) >= 100 ? y.toFixed(0) : y.toPrecision(3)}`);
+}
+
+function hoverMark(p: [number, number] | null): void {
+ const o = obj();
+ const m = p && !gesture ? markAt(p) : null;
+ if (o && m) spectrumLinks.set(focusForMark(o, m.id, m.atoms, 'panel'));
+ else spectrumLinks.clear('panel');
+}
+
+function showBand(a: number, b: number): void {
+ const band = svgParts.band, f = lastFrame;
+ if (!band || !f) return;
+ const x0 = Math.max(f.box.x, Math.min(a, b)), x1 = Math.min(f.box.x + f.box.w, Math.max(a, b));
+ setAttr(band, 'x', fmt(x0));
+ setAttr(band, 'y', fmt(f.box.y));
+ setAttr(band, 'width', fmt(Math.max(0, x1 - x0)));
+ setAttr(band, 'height', fmt(f.box.h));
+ setAttr(band, 'class', `fc-spv-band is-${mode}`);
+ setAttr(band, 'visibility', 'visible');
+}
+
+function hideBand(): void {
+ if (svgParts.band) setAttr(svgParts.band, 'visibility', 'hidden');
+}
+
+function wirePlot(svg: SVGSVGElement): void {
+ svg.addEventListener('pointerdown', (e) => {
+ const o = obj(), f = lastFrame;
+ if (!o || !f || e.button !== 0) return;
+ const p = local(e);
+ const r = currentRange() ?? { from: f.x.from, to: f.x.to };
+ const band = mode === 'box' || mode === 'pick' || mode === 'integrate' || (mode === 'pan' && e.shiftKey);
+ gesture = { kind: band ? 'band' : 'pan', x0: p[0], from: r.from, to: r.to, moved: false, pointer: e.pointerId };
+ svg.setPointerCapture(e.pointerId);
+ e.preventDefault();
+ });
+ svg.addEventListener('pointermove', (e) => {
+ const p = local(e);
+ readout(p);
+ const g = gesture, f = lastFrame;
+ if (!g || !f || g.pointer !== e.pointerId) { hoverMark(p); return; }
+ if (!g.moved && Math.abs(p[0] - g.x0) < 3) return;
+ g.moved = true;
+ if (g.kind === 'band') { showBand(g.x0, p[0]); return; }
+ const dv = -((p[0] - g.x0) / f.box.w) * (g.to - g.from);
+ setRange({ from: g.from + dv, to: g.to + dv }, true);
+ });
+ const end = (e: PointerEvent): void => {
+ const g = gesture, o = obj(), f = lastFrame;
+ gesture = null;
+ hideBand();
+ if (!g || g.pointer !== e.pointerId || !o || !f) return;
+ const p = local(e);
+ if (!g.moved) { clickPlot(o, p); return; }
+ if (g.kind === 'band') {
+ const a = vx(f, Math.max(f.box.x, Math.min(f.box.x + f.box.w, g.x0))), b = vx(f, Math.max(f.box.x, Math.min(f.box.x + f.box.w, p[0])));
+ if (Math.abs(sxOf(f, a) - sxOf(f, b)) < 3) return;
+ const dir = Math.sign(f.x.to - f.x.from) || 1;
+ const r = dir > 0 ? { from: Math.min(a, b), to: Math.max(a, b) } : { from: Math.max(a, b), to: Math.min(a, b) };
+ void runBand(o, r);
+ return;
+ }
+ setRange(range, false);
+ };
+ svg.addEventListener('pointerup', end);
+ svg.addEventListener('pointercancel', end);
+ svg.addEventListener('pointerleave', () => { readout(null); if (!gesture) spectrumLinks.clear('panel'); });
+ svg.addEventListener('wheel', (e) => {
+ const f = lastFrame;
+ if (!f || !obj()) return;
+ e.preventDefault();
+ const p = local(e);
+ const v = vx(f, Math.max(f.box.x, Math.min(f.box.x + f.box.w, p[0])));
+ const k = Math.exp(Math.max(-1, Math.min(1, (e.deltaMode === 1 ? e.deltaY * 16 : e.deltaY) * 0.0015)));
+ setRange({ from: v + (f.x.from - v) * k, to: v + (f.x.to - v) * k }, true);
+ }, { passive: false });
+ svg.addEventListener('dblclick', () => { if (mode === 'pan' || mode === 'box') setRange(null, false); });
+}
+
+const sxOf = (f: PlotFrame, v: number): number => f.box.x + ((v - f.x.from) / (f.x.to - f.x.from || 1)) * f.box.w;
+
+function startLinking(id: Id): void {
+ const o = obj();
+ if (!o || !client || !view) return;
+ const picked = atomsOfSelection(client.doc, view.selection(), false);
+ const groups = [...picked.entries()].filter(([, s]) => s.size);
+ if (groups.length === 1) {
+ const [frag, atoms] = groups[0];
+ client.commit(t('Link Peak to Atoms'), linkOps(o, id, { object: frag, atoms: [...atoms] }));
+ toast(atoms.size === 1 ? t('Linked to 1 atom') : t(`Linked to ${atoms.size} atoms`));
+ return;
+ }
+ const have = findMark(o, id)?.mark.atoms;
+ linking = { mark: id, frag: have?.object ?? null, atoms: have ? [...have.atoms] : [] };
+ selected = id;
+ spectrumLinks.setPending(linking.frag ? { frag: linking.frag, atoms: linking.atoms } : null);
+ view.root.addEventListener('pointerdown', canvasPick, true);
+ document.addEventListener('keydown', linkKeys, true);
+ refreshSoon();
+}
+
+export function linkSpectrumMark(id: Id | null = selected): boolean {
+ if (!id || !obj() || !findMark(obj()!, id)) return false;
+ startLinking(id);
+ return true;
+}
+
+function canvasPick(e: PointerEvent): void {
+ if (!linking || !view || e.button !== 0) return;
+ const h = view.hitTest(view.toDoc(e.clientX, e.clientY));
+ if (h.kind !== 'atom') return;
+ e.preventDefault();
+ e.stopPropagation();
+ if (linking.frag !== h.frag) linking = { ...linking, frag: h.frag, atoms: [] };
+ const at = linking.atoms.indexOf(h.atom);
+ linking.atoms = at >= 0 ? linking.atoms.filter((a) => a !== h.atom) : [...linking.atoms, h.atom];
+ spectrumLinks.setPending({ frag: h.frag, atoms: [...linking.atoms] });
+ refreshSoon();
+}
+
+function linkKeys(e: KeyboardEvent): void {
+ if (!linking) return;
+ if (e.key === 'Escape') { e.preventDefault(); e.stopPropagation(); stopLinking(false); }
+ else if (e.key === 'Enter') { e.preventDefault(); e.stopPropagation(); stopLinking(true); }
+}
+
+function stopLinking(commit: boolean): void {
+ const l = linking;
+ linking = null;
+ view?.root.removeEventListener('pointerdown', canvasPick, true);
+ document.removeEventListener('keydown', linkKeys, true);
+ spectrumLinks.setPending(null);
+ const o = obj();
+ if (commit && l && o && client) {
+ const ops = linkOps(o, l.mark, l.frag && l.atoms.length ? { object: l.frag, atoms: l.atoms } : null);
+ if (ops.length) client.commit(t(l.atoms.length ? 'Link Peak to Atoms' : 'Unlink Peak'), ops);
+ }
+ refreshSoon();
+}
+
+function setYMode(m: YMode): void {
+ const o = obj();
+ if (o && client) client.commit(t('Spectrum Y Axis'), yModeOps(o, m));
+}
+
+function applyView(): void {
+ const o = obj(), r = currentRange();
+ if (!o || !client || !r) return;
+ const full = fullRange(o);
+ const whole = Math.abs(r.from - full.from) + Math.abs(r.to - full.to) < Math.abs(full.to - full.from) * 1e-4;
+ const ops = viewOps(o, whole ? { x_from: undefined, x_to: undefined } : { x_from: Math.round(r.from * 1e4) / 1e4, x_to: Math.round(r.to * 1e4) / 1e4 });
+ if (ops.length) client.commit(t('Set Spectrum Range'), ops);
+}
+
+function wire(node: HTMLElement): void {
+ wirePlot(q(node, '.fc-spv-svg'));
+ node.addEventListener('click', (e) => {
+ const b = e.target instanceof Element ? e.target.closest('button') : null;
+ if (!b || !node.contains(b)) return;
+ if (b.dataset.mode) { mode = b.dataset.mode as PlotMode; refreshSoon(); return; }
+ if (b.dataset.ymode) { setYMode(b.dataset.ymode as YMode); return; }
+ const act = b.dataset.spv;
+ if (act === 'close') closeSpectrumEditor();
+ else if (act === 'reset') setRange(null, false);
+ else if (act === 'apply') applyView();
+ else if (act === 'export' && target) commands.run('export-spectrum', { object: target });
+ else if (act === 'link-done') stopLinking(true);
+ else if (act === 'link-cancel') stopLinking(false);
+ const row = b.closest('.fc-spv-row');
+ const id = row?.dataset.key;
+ const o = obj();
+ if (!row || !id || !o || !client) return;
+ const what = b.dataset.row;
+ if (what === 'select') { selected = selected === id ? null : id; refreshSoon(); }
+ else if (what === 'link') startLinking(id);
+ else if (what === 'unlink') client.commit(t('Unlink Peak'), linkOps(o, id, null));
+ else if (what === 'remove') { client.commit(t('Remove'), removeMarkOps(o, id)); if (selected === id) selected = null; }
+ });
+ node.addEventListener('change', (e) => {
+ const input = e.target instanceof HTMLInputElement && e.target.dataset.row === 'value' ? e.target : null;
+ const id = input?.closest('.fc-spv-row')?.dataset.key;
+ const o = obj();
+ if (!input || !id || !o || !client) return;
+ const v = Number(input.value.replace(',', '.'));
+ if (!(v > 0)) { toast(t('Type a positive number.'), 'error'); refreshSoon(); return; }
+ spectraApi.setIntegralValue(client, o, id, v).catch((err: unknown) => toast(`${t('Could not set the integral')}: ${errText(err)}`, 'error'));
+ });
+ node.addEventListener('pointerover', (e) => {
+ const row = e.target instanceof Element ? e.target.closest('.fc-spv-row') : null;
+ const o = obj();
+ const id = row?.dataset.key;
+ if (!o || !id) return;
+ const m = findMark(o, id);
+ if (m) spectrumLinks.set(focusForMark(o, id, m.mark.atoms, 'panel'));
+ });
+ q(node, '.fc-spv-list').addEventListener('pointerleave', () => spectrumLinks.clear('panel'));
+}
diff --git a/frontend/src/ui/structure3d-dialogs.ts b/frontend/src/ui/structure3d-dialogs.ts
new file mode 100644
index 00000000..1eb18949
--- /dev/null
+++ b/frontend/src/ui/structure3d-dialogs.ts
@@ -0,0 +1,113 @@
+import type { LigandInfo } from '../engine/three-api';
+import { t } from '../i18n';
+import { Dialog } from './dialogs';
+import { el, q, setDisabled, setText } from './dom';
+
+export type File3dFormat = 'mol' | 'sdf' | 'pdb' | 'xyz';
+export interface File3dAsk { format: File3dFormat; all: boolean }
+
+const FORMATS: readonly [File3dFormat, string][] = [
+ ['sdf', 'SD File (.sdf)'],
+ ['mol', 'MDL Molfile (.mol)'],
+ ['pdb', 'PDB (.pdb)'],
+ ['xyz', 'XYZ (.xyz)'],
+];
+
+class Export3dDialog extends Dialog {
+ private readonly format = el(' ');
+ private readonly all = el(' ');
+ private readonly note = el('
');
+ private resolve: ((v: File3dAsk | null) => void) | null = null;
+ private count = 1;
+
+ constructor() {
+ super(t('Export 3D Structure'), 400);
+ for (const [key, label] of FORMATS) {
+ const o = el(' ');
+ o.value = key;
+ setText(o, t(label));
+ this.format.appendChild(o);
+ }
+ this.field(t('Format'), this.format);
+ const every = el(' ');
+ every.prepend(this.all);
+ setText(q(every, 'span'), t('Every conformer (SDF records, PDB models, XYZ frames)'));
+ this.body.appendChild(every);
+ this.body.appendChild(this.note);
+ this.format.addEventListener('change', () => this.sync());
+ this.button(t('Cancel'), 'ghost', () => this.finish(null));
+ this.button(t('Export'), 'primary', () => this.finish({ format: this.format.value as File3dFormat, all: this.all.checked && this.format.value !== 'mol' }));
+ this.onClose = () => this.finish(null);
+ }
+
+ ask(count: number): Promise {
+ this.resolve?.(null);
+ this.count = count;
+ this.format.value = count > 1 ? 'sdf' : 'mol';
+ this.sync();
+ this.open(this.format);
+ return new Promise((r) => { this.resolve = r; });
+ }
+
+ private sync(): void {
+ const single = this.format.value === 'mol' || this.count < 2;
+ setDisabled(this.all, single);
+ setText(this.note, this.count === 1 ? t('1 conformer stored; every hydrogen is written with its 3D position.') : t(`${this.count} conformers stored; every hydrogen is written with its 3D position.`));
+ }
+
+ private finish(v: File3dAsk | null): void {
+ const r = this.resolve;
+ this.resolve = null;
+ if (this.isOpen) this.close();
+ r?.(v);
+ }
+}
+
+class LigandDialog extends Dialog {
+ private readonly pick = el(' ');
+ private resolve: ((v: string | null) => void) | null = null;
+
+ constructor() {
+ super(t('Extract Ligand'), 420);
+ this.field(t('Ligand'), this.pick);
+ const note = el('
');
+ setText(note, t('The ligand becomes a 2D structure beside the model, with its coordinates from the file kept as its conformer.'));
+ this.body.appendChild(note);
+ this.button(t('Cancel'), 'ghost', () => this.finish(null));
+ this.button(t('Extract'), 'primary', () => this.finish(this.pick.value || null));
+ this.onClose = () => this.finish(null);
+ }
+
+ ask(ligands: LigandInfo[], chosen: string | undefined): Promise {
+ this.resolve?.(null);
+ this.pick.replaceChildren(...ligands.map((l) => {
+ const o = el(' ');
+ o.value = l.key;
+ setText(o, `${l.key}${l.name ? ` ${l.name}` : ''} (${l.atoms})`);
+ return o;
+ }));
+ if (chosen && ligands.some((l) => l.key === chosen)) this.pick.value = chosen;
+ this.open(this.pick);
+ return new Promise((r) => { this.resolve = r; });
+ }
+
+ private finish(v: string | null): void {
+ const r = this.resolve;
+ this.resolve = null;
+ if (this.isOpen) this.close();
+ r?.(v);
+ }
+}
+
+let exportDialog: Export3dDialog | null = null;
+let ligandDialog: LigandDialog | null = null;
+
+export function askFile3d(conformers: number): Promise {
+ exportDialog ??= new Export3dDialog();
+ return exportDialog.ask(conformers);
+}
+
+export function askLigand(ligands: LigandInfo[], chosen?: string): Promise {
+ ligandDialog ??= new LigandDialog();
+ return ligandDialog.ask(ligands, chosen);
+}
diff --git a/frontend/src/ui/view3d-dialogs.ts b/frontend/src/ui/view3d-dialogs.ts
new file mode 100644
index 00000000..0ec2a5e4
--- /dev/null
+++ b/frontend/src/ui/view3d-dialogs.ts
@@ -0,0 +1,167 @@
+import { FORCE_FIELDS, methodLabel, type ForceField, type ScanAnswer } from '../engine/three-api';
+import { t } from '../i18n';
+import { Dialog } from './dialogs';
+import { el, q, setDisabled, setText } from './dom';
+import { ScanPlot } from './scan-plot';
+
+export interface ConformerAsk { n: number; window: number; method: ForceField }
+export interface ScanAsk { start: number; end: number; step: number; method: ForceField; store: boolean }
+
+const methodSelect = (value: ForceField): HTMLSelectElement => {
+ const s = el(`${FORCE_FIELDS.map((m) => `${m} `).join('')} `);
+ s.value = value;
+ return s;
+};
+
+const numberInput = (value: number, min: number, max: number, step: number): HTMLInputElement =>
+ el(` `);
+
+const clampNum = (input: HTMLInputElement, lo: number, hi: number, fallback: number): number => {
+ const v = Number(input.value);
+ return Number.isFinite(v) ? Math.min(hi, Math.max(lo, v)) : fallback;
+};
+
+class ConformersDialog extends Dialog {
+ private readonly n = numberInput(50, 1, 1000, 1);
+ private readonly win = numberInput(10, 0.1, 100, 0.5);
+ private readonly method = methodSelect('MMFF94');
+ private resolve: ((v: ConformerAsk | null) => void) | null = null;
+
+ constructor() {
+ super(t('Conformers'), 380);
+ this.field(t('Conformers to generate'), this.n);
+ this.field(t('Energy window (kcal/mol)'), this.win);
+ this.field(t('Force field'), this.method);
+ const note = el('
');
+ setText(note, t('ETKDG embedding with a fixed seed, near duplicates pruned at 0.5 Å heavy-atom RMSD, each minimised; the lowest becomes the shown conformer.'));
+ this.body.appendChild(note);
+ this.button(t('Cancel'), 'ghost', () => this.finish(null));
+ this.button(t('Generate'), 'primary', () => this.finish({ n: Math.round(clampNum(this.n, 1, 1000, 50)), window: clampNum(this.win, 0.1, 100, 10), method: this.method.value as ForceField }));
+ this.onClose = () => this.finish(null);
+ this.body.addEventListener('keydown', (e) => { if (e.key === 'Enter') { e.preventDefault(); q(this.foot, '.fc-btn-primary').click(); } });
+ }
+
+ ask(method: ForceField): Promise {
+ this.resolve?.(null);
+ this.method.value = method;
+ this.open(this.n);
+ return new Promise((r) => { this.resolve = r; });
+ }
+
+ private finish(v: ConformerAsk | null): void {
+ const r = this.resolve;
+ this.resolve = null;
+ if (this.isOpen) this.close();
+ r?.(v);
+ }
+}
+
+let conformersDialog: ConformersDialog | null = null;
+
+export function askConformers(method: ForceField): Promise {
+ conformersDialog ??= new ConformersDialog();
+ return conformersDialog.ask(method);
+}
+
+export interface ScanHost {
+ atoms: string;
+ method: ForceField;
+ run(ask: ScanAsk, signal: AbortSignal): Promise;
+ show(index: number, answer: ScanAnswer): void;
+}
+
+class ScanDialog extends Dialog {
+ private readonly atoms = el('
');
+ private readonly start = numberInput(-180, -180, 180, 5);
+ private readonly end = numberInput(180, -180, 180, 5);
+ private readonly step = numberInput(10, 1, 90, 1);
+ private readonly method = methodSelect('MMFF94');
+ private readonly store = el(' ');
+ private readonly plot = new ScanPlot(t('Dihedral scan energy profile'));
+ private readonly status = el('
');
+ private readonly run: HTMLButtonElement;
+ private host: ScanHost | null = null;
+ private abort: AbortController | null = null;
+ private answer: ScanAnswer | null = null;
+
+ constructor() {
+ super(t('Dihedral Scan'), 480);
+ this.body.appendChild(this.atoms);
+ const row = el('
');
+ this.body.appendChild(row);
+ for (const [label, input] of [[t('From (degrees)'), this.start], [t('To (degrees)'), this.end], [t('Step (degrees)'), this.step]] as const) {
+ const f = el(' ');
+ setText(q(f, 'span'), label);
+ f.appendChild(input);
+ row.appendChild(f);
+ }
+ this.field(t('Force field'), this.method);
+ const keep = el(' ');
+ keep.prepend(this.store);
+ setText(q(keep, 'span'), t('Keep each point as a conformer (one undo step)'));
+ this.body.appendChild(keep);
+ const box = el('
');
+ box.appendChild(this.plot.svg);
+ this.body.appendChild(box);
+ this.body.appendChild(this.status);
+ this.plot.pick((i) => { if (this.answer && this.host) this.host.show(i, this.answer); });
+ this.button(t('Close'), 'ghost', () => this.close());
+ this.run = this.button(t('Run Scan'), 'primary', () => void this.go());
+ this.onClose = () => { this.abort?.abort(); this.abort = null; };
+ }
+
+ openFor(host: ScanHost): void {
+ this.host = host;
+ this.answer = null;
+ setText(this.atoms, host.atoms);
+ this.method.value = host.method;
+ this.plot.update([]);
+ setText(this.status, t('A relaxed scan: at each angle the dihedral is held and everything else is minimised.'));
+ setDisabled(this.run, false);
+ this.open(this.run);
+ }
+
+ private async go(): Promise {
+ const host = this.host;
+ if (!host) return;
+ const start = clampNum(this.start, -180, 180, -180), end = clampNum(this.end, -180, 180, 180), step = clampNum(this.step, 1, 90, 10);
+ if (end <= start) { setText(this.status, t('The end angle must be greater than the start angle.')); return; }
+ this.abort?.abort();
+ const ctl = new AbortController();
+ this.abort = ctl;
+ setDisabled(this.run, true);
+ setText(this.status, t('Scanning...'));
+ try {
+ const a = await host.run({ start, end, step, method: this.method.value as ForceField, store: this.store.checked }, ctl.signal);
+ if (ctl.signal.aborted) return;
+ this.answer = a;
+ this.plot.update(a.points.map((p) => ({ angle: p.angle, energy: p.relative })));
+ const lo = a.minimum, hi = a.maximum;
+ const parts = [
+ lo ? t(`Minimum ${lo.angle.toFixed(0)}°`) : '',
+ hi && lo ? t(`barrier ${(hi.energy - lo.energy).toFixed(2)} kcal/mol`) : '',
+ methodLabel(a.method, a.engine),
+ ...a.warnings.map((w) => t(w.text)),
+ ].filter(Boolean);
+ setText(this.status, parts.join(' · '));
+ } catch (e) {
+ if (!ctl.signal.aborted) setText(this.status, `${t('Scan failed')}: ${t(e instanceof Error ? e.message : String(e))}`);
+ } finally {
+ if (this.abort === ctl) this.abort = null;
+ setDisabled(this.run, false);
+ }
+ }
+
+ get keptConformers(): boolean { return this.store.checked; }
+}
+
+let scanDialog: ScanDialog | null = null;
+
+export function openScan(host: ScanHost): void {
+ scanDialog ??= new ScanDialog();
+ scanDialog.openFor(host);
+}
+
+export function scanKeepsConformers(): boolean {
+ return scanDialog?.keptConformers ?? false;
+}
diff --git a/frontend/src/ui/view3d-lib.ts b/frontend/src/ui/view3d-lib.ts
new file mode 100644
index 00000000..4fe498af
--- /dev/null
+++ b/frontend/src/ui/view3d-lib.ts
@@ -0,0 +1,77 @@
+export interface Atom3d {
+ x: number;
+ y: number;
+ z: number;
+ elem: string;
+ serial: number;
+ index: number;
+ bonds: number[];
+ bondOrder: number[];
+ atom?: string;
+ resn?: string;
+ resi?: number;
+ chain?: string;
+ hetflag?: boolean;
+ properties?: Record;
+ partialCharge?: number;
+}
+
+export type Selection3d = Record;
+export type Style3d = Record;
+
+export interface Model3d {
+ selectedAtoms(sel: Selection3d): Atom3d[];
+ setStyle(sel: Selection3d, style: Style3d, add?: boolean): void;
+}
+
+export interface Viewer3d {
+ addModel(data: string, format: string, options?: Record): Model3d;
+ removeAllModels(): void;
+ setStyle(sel: Selection3d, style: Style3d): void;
+ addStyle(sel: Selection3d, style: Style3d): void;
+ addSurface(kind: number, style: Record, atoms?: Selection3d, all?: Selection3d): Promise;
+ removeAllSurfaces(): void;
+ addLabel(text: string, opts: Record): unknown;
+ removeAllLabels(): void;
+ addCylinder(spec: Record): unknown;
+ removeAllShapes(): void;
+ setClickable(sel: Selection3d, on: boolean, fn: ((atom: Atom3d) => void) | null): void;
+ setBackgroundColor(colour: string, alpha: number): void;
+ zoomTo(sel?: Selection3d, ms?: number): void;
+ zoom(factor: number, ms?: number): void;
+ center(sel?: Selection3d): void;
+ render(): void;
+ resize(): void;
+ spin(axis: string | boolean, speed?: number): void;
+ getView(): number[];
+ setView(v: number[]): void;
+ setViewChangeCallback(fn: ((view: number[]) => void) | null): void;
+ pngURI(): string;
+ getCanvas(): HTMLCanvasElement;
+ selectedAtoms(sel: Selection3d): Atom3d[];
+ clear(): void;
+}
+
+export interface Lib3d {
+ createViewer(host: HTMLElement, config: Record): Viewer3d;
+ SurfaceType: { VDW: number; MS: number; SAS: number; SES: number };
+ setSyncSurface?(on: boolean): void;
+}
+
+let loading: Promise | null = null;
+
+export function load3dmol(): Promise {
+ loading ??= import('3dmol/build/3Dmol.es6-min.js')
+ .then((m: unknown) => m as Lib3d)
+ .catch((e: unknown) => { loading = null; throw e; });
+ return loading;
+}
+
+export function webglAvailable(): boolean {
+ try {
+ const c = document.createElement('canvas');
+ return !!(c.getContext('webgl2') ?? c.getContext('webgl'));
+ } catch {
+ return false;
+ }
+}
diff --git a/frontend/src/ui/view3d-panel.ts b/frontend/src/ui/view3d-panel.ts
new file mode 100644
index 00000000..0ed1ddac
--- /dev/null
+++ b/frontend/src/ui/view3d-panel.ts
@@ -0,0 +1,931 @@
+import '../styles/view3d.css';
+import { uploadMedia } from '../canvas/tools/image';
+import { activeConformer, conformerMolblock } from '../chem/conformer-mol';
+import { formatMeasure, measure, MEASURE_ATOMS, type MeasureKind } from '../chem/geom3d';
+import type { DocEvent, DocumentClient } from '../engine/client-api';
+import { newId, type Conformer, type FormChemDocument, type Fragment, type Id, type Model3dLabel, type Model3dObject, type Model3dStyle } from '../engine/model';
+import type { Op } from '../engine/ops';
+import { methodLabel, threeApi, untilRev, type ForceField, type ScanAnswer } from '../engine/three-api';
+import { t } from '../i18n';
+import { ApiError } from '../io/api';
+import { el, escapeHtml, overlayRoot, patchList, q, qa, setAttr, setClass, setDisabled, setHidden, setText, setTitle } from './dom';
+import { icon } from './icons';
+import { toast } from './toast';
+import { askConformers, openScan } from './view3d-dialogs';
+import { load3dmol, webglAvailable } from './view3d-lib';
+import { Scene3dViewer, type Camera3d, type Mark3d, type Source3d, type Surface3d } from './view3d-viewer';
+
+export interface View3dHost {
+ client(): DocumentClient | null;
+ selectedFragment(): Id | null;
+ onSelection(fn: () => void): () => void;
+}
+
+export interface View3dTarget { object?: Id; fragment?: Id }
+
+export type SurfaceChoice = 'none' | 'vdw' | 'sas' | 'ses';
+
+interface Mark { id: Id; kind: MeasureKind; atoms: string[]; value: number }
+
+const DISPLAYS: { key: Model3dStyle; label: string }[] = [
+ { key: 'wire', label: 'Wire' },
+ { key: 'stick', label: 'Stick' },
+ { key: 'ballstick', label: 'Ball and Stick' },
+ { key: 'spacefill', label: 'Space Filling' },
+ { key: 'cartoon', label: 'Cartoon' },
+];
+const SURFACES: { key: SurfaceChoice; label: string }[] = [
+ { key: 'none', label: 'No surface' },
+ { key: 'vdw', label: 'Van der Waals' },
+ { key: 'sas', label: 'Solvent accessible' },
+ { key: 'ses', label: 'Solvent excluded' },
+];
+const MEASURES: { key: MeasureKind; label: string }[] = [
+ { key: 'distance', label: 'Distance' },
+ { key: 'angle', label: 'Angle' },
+ { key: 'dihedral', label: 'Dihedral' },
+];
+const WRITE_DELAY_MS = 700;
+const SURFACE_OPACITY = 0.72;
+const REDUCED = '(prefers-reduced-motion: reduce)';
+
+const errText = (e: unknown): string => t(e instanceof Error ? e.message : String(e));
+const missingRoute = (e: unknown): boolean => e instanceof ApiError && (e.status === 404 || e.status === 405);
+
+function markup(): string {
+ const h = (s: string): string => escapeHtml(t(s));
+ const seg = (attr: string, items: { key: string; label: string }[]): string =>
+ items.map((i) => `${h(i.label)} `).join('');
+ return `
+
+${icon('model3d', 16)}${h('3D View')}
+${icon('close', 14)}
+
+
+
${seg('display', DISPLAYS)}
+
${SURFACES.map((s) => `${h(s.label)} `).join('')}
+
${h('ESP')}
+
+
+${icon('model3d', 14)}${h('Build 3D')}
+${icon('magic', 14)}${h('Minimise')} MMFF94 MMFF94s UFF
+${icon('layers', 14)}${h('Conformers...')}
+${icon('chartLine', 14)}${h('Scan...')}
+
+${icon('search', 14)}
+${icon('fitView', 14)}
+${icon('orbit', 14)}
+${icon('download', 14)}
+
+
+
+ `;
+}
+
+const exportMenu = (): string => ``;
+
+export type ExportKind = 'png' | 'png-clear' | 'glb';
+
+export class View3dPanel {
+ readonly root: HTMLElement;
+ private readonly gl: HTMLElement;
+ private readonly empty: HTMLElement;
+ private readonly status: HTMLElement;
+ private readonly source: HTMLElement;
+ private readonly confs: HTMLElement;
+ private readonly marksList: HTMLElement;
+ private readonly surfaceSel: HTMLSelectElement;
+ private readonly methodSel: HTMLSelectElement;
+ private readonly legend: HTMLElement;
+ private readonly menu: HTMLElement;
+ private host: View3dHost | null = null;
+ private viewer: Scene3dViewer | null = null;
+ private starting: Promise | null = null;
+ private client: DocumentClient | null = null;
+ private clientOff: (() => void) | null = null;
+ private selOff: (() => void) | null = null;
+ private object: Id | null = null;
+ private fragment: Id | null = null;
+ private local: { src: Source3d; name: string; n: number } | null = null;
+ private localSeq = 0;
+ private loadedKey = '';
+ private loadTicket = 0;
+ private display: Model3dStyle = 'ballstick';
+ private surface: SurfaceChoice = 'none';
+ private esp = false;
+ private espRun = 0;
+ private espText = '';
+ private measureKind: MeasureKind = 'distance';
+ private picked: number[] = [];
+ private lastPicked: number[] = [];
+ private marks = new Map();
+ private spinning = false;
+ private userMoved = false;
+ private writeTimer: number | undefined;
+ private writing = false;
+ private syncQueued = false;
+ private busy = '';
+ private engine = '';
+ private readonly ids = new WeakMap();
+ private idSeq = 0;
+ readonly reduced = window.matchMedia(REDUCED);
+
+ constructor() {
+ this.root = el(markup());
+ this.gl = q(this.root, '.fc-v3d-gl');
+ this.empty = q(this.root, '.fc-v3d-empty');
+ this.status = q(this.root, '.fc-v3d-status');
+ this.source = q(this.root, '.fc-v3d-source');
+ this.confs = q(this.root, '.fc-v3d-confs');
+ this.marksList = q(this.root, '.fc-v3d-marks');
+ this.surfaceSel = q(this.root, '.fc-v3d-surface');
+ this.methodSel = q(this.root, '.fc-v3d-method');
+ this.legend = q(this.root, '.fc-v3d-legend');
+ this.menu = el(exportMenu());
+ this.root.appendChild(this.menu);
+ overlayRoot().appendChild(this.root);
+ this.wire();
+ this.paintControls();
+ }
+
+ get isOpen(): boolean { return !this.root.hidden; }
+ get boundObject(): Id | null { return this.object; }
+
+ private wire(): void {
+ const r = this.root;
+ r.addEventListener('click', (e) => {
+ const b = (e.target as HTMLElement).closest('[data-act],[data-display],[data-measure],[data-exp]');
+ if (!b || (b as HTMLButtonElement).disabled) return;
+ if (b.dataset.display) this.setDisplay(b.dataset.display as Model3dStyle);
+ else if (b.dataset.measure) this.setMeasure(b.dataset.measure as MeasureKind);
+ else if (b.dataset.exp) { this.toggleMenu(false); void this.exportAs(b.dataset.exp as ExportKind); }
+ else this.act(b.dataset.act ?? '');
+ });
+ this.surfaceSel.addEventListener('change', () => this.setSurface(this.surfaceSel.value as SurfaceChoice));
+ this.root.addEventListener('keydown', (e) => {
+ if (e.key !== 'Escape') return;
+ e.stopPropagation();
+ if (!this.menu.hidden) this.toggleMenu(false);
+ else if (this.picked.length) this.pick(-1);
+ else this.close();
+ });
+ this.gl.addEventListener('pointerdown', () => { this.userMoved = true; });
+ this.gl.addEventListener('wheel', () => { this.userMoved = true; }, { passive: true });
+ this.confs.addEventListener('click', (e) => {
+ const row = (e.target as HTMLElement).closest('[data-key]');
+ if (row?.dataset.key) void this.showConformer(row.dataset.key);
+ });
+ this.marksList.addEventListener('click', (e) => {
+ const b = (e.target as HTMLElement).closest