{"library":"ord-schema-protobufjs","title":"Open Reaction Database Schema (JavaScript)","description":"Compiled protobuf definitions for the Open Reaction Database, a structured format for capturing organic reaction data. This npm package (v0.5.1) provides the generated protobuf messages (e.g., Reaction, Compound) for Node.js and browser via protobuf.js. Updated irregularly alongside the ORD schema. Key differentiator: enables programmatic access to the standardized ORD schema for reaction data interchange, supporting datasets, conditions, outcomes, and analyses. Used for reading/writing reaction records, validating against the ORD spec, and integrating with ORD-compatible datasets. Ships TypeScript declarations.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install ord-schema-protobufjs"],"cli":null},"imports":["import { Reaction } from 'ord-schema-protobufjs'","import { Compound } from 'ord-schema-protobufjs'","import ordSchema from 'ord-schema-protobufjs'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { Reaction, Compound } from 'ord-schema-protobufjs';\n\n// Create a new Reaction message\nconst reaction = Reaction.create({\n  identifiers: [{ value: 'OCCO', type: Compound.CompoundIdentifier.SMILES }],\n  inputs: {\n    'substrate': {\n      components: [{\n        substance: {\n          identifiers: [{ value: 'CCO', type: Compound.CompoundIdentifier.SMILES }]\n        }\n      }]\n    }\n  },\n  conditions: {\n    temperature: { setpoint: { value: 80, units: 'CELSIUS' } },\n    time: { duration: { value: 2, units: 'HOUR' } }\n  }\n});\n\n// Verify the message\nconst err = Reaction.verify(reaction);\nif (err) throw Error(err);\n\n// Encode to binary\nconst buffer = Reaction.encode(reaction).finish();\nconsole.log('Encoded length:', buffer.length);\n\n// Decode back\nconst decoded = Reaction.decode(buffer);\nconsole.log('Decoded reaction temperature:', decoded.conditions?.temperature?.setpoint?.value);","lang":"typescript","description":"Creates a simple reaction with SMILES identifiers, conditions, and demonstrates encode/decode round-trip.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}