From 4520ee9e476b1945d38a77169ee05a20261c6d76 Mon Sep 17 00:00:00 2001 From: Jas Kalayan Date: Tue, 15 Sep 2026 11:05:36 +0100 Subject: [PATCH] update molecular formula pattern to include dashes in the formula e.g. for C40H46N20O18P3-3 --- biosim_schema/schema/components/biosim_composition.yaml | 3 ++- project/linkml/jsonschema/biosim_schema.schema.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/biosim_schema/schema/components/biosim_composition.yaml b/biosim_schema/schema/components/biosim_composition.yaml index 0323fb8..b19f7d1 100644 --- a/biosim_schema/schema/components/biosim_composition.yaml +++ b/biosim_schema/schema/components/biosim_composition.yaml @@ -371,10 +371,11 @@ slots: molecular_formula: description: The molecular formula of a molecule\ - pattern: "^([A-Z][a-z]?\\d*)+([+-]|\\d+[+-])?$" + pattern: "^([A-Z][a-z]?\\d*)+([+-]\\d*|\\d+[+-])?$" examples: - value: "C8H10N4O2" - value: "C10H16N+" + - value: "C40H46N20O18P3-3" range: string annotations: engine_mapping: diff --git a/project/linkml/jsonschema/biosim_schema.schema.json b/project/linkml/jsonschema/biosim_schema.schema.json index 4d85eac..2797888 100644 --- a/project/linkml/jsonschema/biosim_schema.schema.json +++ b/project/linkml/jsonschema/biosim_schema.schema.json @@ -1344,7 +1344,7 @@ }, "molecular_formula": { "description": "The molecular formula of a molecule\\", - "pattern": "^([A-Z][a-z]?\\d*)+([+-]|\\d+[+-])?$", + "pattern": "^([A-Z][a-z]?\\d*)+([+-]\\d*|\\d+[+-])?$", "type": [ "string", "null"