Skip to content

Instantly share code, notes, and snippets.

@ghutchis
Last active August 4, 2022 14:17
Show Gist options
  • Save ghutchis/3a31e5b597dafb15de9ea048cad35268 to your computer and use it in GitHub Desktop.
Save ghutchis/3a31e5b597dafb15de9ea048cad35268 to your computer and use it in GitHub Desktop.
Draft pydantic model for Chemical JSON (cjson)
from __future__ import annotations
from typing import List, Optional
from pydantic import BaseModel, Field
# todo:
# - double-check open-spin systems
# - other suggestions
class Elements(BaseModel):
"""List of elements for the atoms in the molecule.
Length must match the number of atoms.
"""
number: List[int]
class Coords(BaseModel):
"""Coordinates for the atoms in the molecule.
Length must match the number of atoms*3 (x, y, z).
Attributes:
3d: List of 3d Cartesian coordinates (in Angstrom) for the atoms [ x, y, z, x, y, z, ... ]
3dFractional: Optional list of 3d fractional coordinates for the atoms [ x, y, z, x, y, z, ... ]
3dSets: List of lists of 3d Cartesian coordinates (in Angstrom) for the atoms [ [x, y, z], [x, y, z], ... ]
"""
field_3d: List[float] = Field(..., alias="3d")
field_3dFractional: Optional[List[float]] = Field(alias="3dFractional")
field_3dSets: Optional[List[List[float]]] = Field(alias="3dSets")
class Atoms(BaseModel):
"""Atoms in the molecule.
Attributes:
elements: List of atomic numbers for the atoms.
coords: List of coordinates.
formalCharges: Optional list of formal charges for the atoms.
labels: Optional list of custom labels for atoms (e.g., 'R' / 'S' or '0.12', etc.)
layer: Optional list of layer numbers for the atoms (generally just 1 for most molecules).
"""
elements: Elements
coords: Coords
formalCharges: Optional[List[int]] = None
labels: Optional[List[str]] = None
layer: Optional[List[int]] = None
class Connections(BaseModel):
"""Connections - list of connections between atom indices.
Length must be the number of bonds * 2
"""
index: List[int]
class Bonds(BaseModel):
"""
Bonds between atoms, including connections and bond orders for the atoms in the molecule. (Optional)
"""
connections: Connections
order: List[int]
class BasisSet(BaseModel):
"""Basis Set information (optional)
At the moment, implied to be Gaussian basis sets.
Attributes:
coefficients: List of coefficients for the basis functions.
exponents: List of exponents for the basis functions.
primitivesPerShell: List of number of primitives per shell.
shellToAtomMap: List atom indices for the basis functions.
shellTypes: List of shell types for the basis functions (l-value, so s=0, p=1, d=2, etc.).
"""
coefficients: List[float]
exponents: List[float]
primitivesPerShell: List[int]
shellToAtomMap: List[int]
shellTypes: List[int]
class Orbitals(BaseModel):
"""Information about molecular orbital energies and coefficients. (Optional)
Attributes:
energies: List of energies for the molecular orbitals (in eV)
electronCount: Number of electrons in the species
occupations: List of occupations for the molecular orbitals
moCoefficients: List of coefficients for the molecular orbitals (requires BasisSet to be present).
alphaCoefficients: List of coefficients for the alpha molecular orbitals (requires BasisSet to be present).
betaCoefficients: List of coefficients for the beta molecular orbitals (requires BasisSet to be present).
symmetry: Symmetry of the orbital (e.g., a1, eg, t1g, etc.)
"""
electronCount: int
energies: Optional[List[float]]
moCoefficients: Optional[List[float]]
alphaCoefficients: Optional[List[float]]
betaCoefficients: Optional[List[float]]
occupations: Optional[List[int]]
symmetries: Optional[List[List[str]]]
class Electronic(BaseModel):
"""Electronic spectra (optional)
Attributes:
energies: List of excitation energies for the electronic spectra (in eV)
intensities: List of intensities for the electronic spectra
rotation: Optional list of rotation angles for the CD spectra (in degrees)
"""
energies: List[float]
intensities: List[float]
rotation: Optional[List[float]]
class Nmr(BaseModel):
"""NMR spectra (optional)
Attributes:
shifts: List of absolute chemical shifts for the NMR spectra (in ppm)
"""
shifts: List[float]
class Spectra(BaseModel):
"""Spectra (optional)
Objects for non-vibrational spectra, including electronic, NMR, and other spectra.
Attributes:
electronic: Optional electronic spectra
nmr: Optional NMR spectra
"""
electronic: Optional[Electronic]
nmr: Optional[Nmr]
class Properties(BaseModel):
"""Properties of the molecule / system. (Optional)
A set of key-value properties.
Attributes:
totalCharge: Total charge of the system.
spinMultiplicity: Spin multiplicity of the system (2S+1, e.g., 1, 2, 3, etc.).
totalEnergy: Total energy of the system (in eV).
"""
molecularMass: Optional[float] = None
meltingPoint: Optional[float] = None
boilingPoint: Optional[float] = None
totalCharge: Optional[int] = 0
spinMultiplicity: Optional[int] = 1
totalEnergy: Optional[float]
class InputParameters(BaseModel):
"""Input parameters for the calculation. (Optional)
Attributes:
basis: Basis set used for the calculation (e.g. "6-31G(d)" or "Custom").
theory: Method used for the calculation (e.g. "DFT" or "HF" or "MP2").
functional: Functional used for the calculation if DFT (e.g. "B3LYP" or "Custom").
task: "Energy" or "Optimize" or "Frequencies" or "Transition State" or "Custom".
"""
basis: Optional[str] = None
functional: Optional[str] = None
task: Optional[str] = None
theory: Optional[str] = None
class PartialCharges(BaseModel):
"""Partial charges for the atoms in the molecule. (Optional)
Keys represent the partial charge method, followed by the computed partial charges.
e.g.
- "Mulliken": [ 0.01, 0.02, 0.03, ... ]
- "Gasteiger": [ 0.01, 0.02, 0.03, ... ]
"""
Mulliken: List[float]
class UnitCell(BaseModel):
"""Unit cell for the system. (Optional)
Attributes:
a: Unit cell a-axis length (in Angstrom).
b: Unit cell b-axis length (in Angstrom).
c: Unit cell c-axis length (in Angstrom).
alpha: Unit cell alpha angle (in degrees).
beta: Unit cell beta angle (in degrees).
gamma: Unit cell gamma angle (in degrees).
cellVectors: Optional list of cell vectors (in Angstrom): [ x1, y1, z1, x2, y2, z2, ... ]
"""
a: float
b: float
c: float
alpha: float
beta: float
gamma: float
cellVectors: Optional[List[float]] = Field(
min_items=9, max_items=9, default_factory=0.0
)
class Vibrations(BaseModel):
"""Vibrations for the molecule. (Optional)
Attributes:
frequencies: List of frequencies (in cm-1) for the vibrations.
intensities: List of IR intensities for the vibrations.
ramanIntensities: Optional list of Raman intensities for the vibrations.
modes: List of mode numbers (e.g, [ 1, 2, 3, 4, 5, 6, ... ])
eigenvectors: List of eigenvectors (displacements in Angstroms) for the vibrations.
symmetries: Optional list of symmetries for the vibrations (e.g., 'a1g', 'eg' ...)
"""
frequencies: List[float]
modes: List[int]
intensities: List[float]
ramanIntensities: Optional[List[float]]
eigenVectors: List[List[float]]
symmetries: Optional[List[str]]
class Enable(BaseModel):
"""Optional enable flags for different render types for each layer
Length of each much match the number of layers.
"""
Ball_and_Stick: Optional[List[bool]] = Field(alias="Ball and Stick")
Cartoons: Optional[List[bool]]
Close_Contacts: Optional[List[bool]] = Field(alias="Close Contacts")
Labels: Optional[List[bool]]
Licorice: Optional[List[bool]]
Van_der_Waals: Optional[List[bool]] = Field(alias="Van der Waals")
Wireframe: Optional[List[bool]]
class Settings(BaseModel):
"""Settings for the render types. (Optional)"""
Ball_and_Stick: Optional[List[str]] = Field(alias="Ball and Stick")
Cartoons: Optional[List[str]]
Wireframe: Optional[List[str]]
class Layer(BaseModel):
"""Layer settings for the molecule. (Optional)
Attributes:
enable: Enable flags for different render types for each layer.
settings: Settings for the render types.
locked: List of locked layers (e.g., atoms in this layer should not change)
visible: List of visible layers (e.g., atoms in this layer should be visible / invisible)
"""
enable: Enable
locked: List[bool]
settings: Settings
visible: List[bool]
class CJSONModel(BaseModel):
"""Full Chemical JSON model.
Attributes:
chemicalJson: Version number of the Chemical JSON format. Currently 1. Only changed for backwards-incompatible changes to the schema.
atoms: Atoms object. Required.
bonds: Bonds object. Optional.
properties: Properties object. Optional.
inputParameters: InputParameters object. Optional.
partialCharges: PartialCharges object. Optional.
vibrations: Vibrations object. Optional.
unitCell: UnitCell object. Optional.
layer: Layer object. Optional (used by the GUI for rendering / settings)
basisSet: BasisSet object. Optional.
orbitals: Orbitals object. Optional. Requires BasisSet to be present.
"""
chemicalJson: int = 1
atoms: Atoms
name: Optional[str] = None
inchi: Optional[str] = None
formula: Optional[str] = None
bonds: Optional[Bonds] = None
properties: Optional[Properties] = None
inputParameters: Optional[InputParameters] = None
partialCharges: Optional[PartialCharges] = None
vibrations: Optional[Vibrations] = None
unitCell: Optional[UnitCell] = None
layer: Optional[Layer] = None
basisSet: Optional[BasisSet] = None
orbitals: Optional[Orbitals] = None
spectra: Optional[Spectra] = None
if __name__ == "__main__":
print(CJSONModel.schema_json(indent=2))
{
"title": "CJSONModel",
"description": "Full Chemical JSON model.\n\nAttributes:\n chemicalJson: Version number of the Chemical JSON format. Currently 1. Only changed for backwards-incompatible changes to the schema.\n atoms: Atoms object. Required.\n bonds: Bonds object. Optional.\n properties: Properties object. Optional.\n inputParameters: InputParameters object. Optional.\n partialCharges: PartialCharges object. Optional.\n vibrations: Vibrations object. Optional.\n unitCell: UnitCell object. Optional.\n layer: Layer object. Optional (used by the GUI for rendering / settings)\n basisSet: BasisSet object. Optional.\n orbitals: Orbitals object. Optional. Requires BasisSet to be present.",
"type": "object",
"properties": {
"chemicalJson": {
"title": "Chemicaljson",
"default": 1,
"type": "integer"
},
"atoms": {
"$ref": "#/definitions/Atoms"
},
"name": {
"title": "Name",
"type": "string"
},
"inchi": {
"title": "Inchi",
"type": "string"
},
"formula": {
"title": "Formula",
"type": "string"
},
"bonds": {
"$ref": "#/definitions/Bonds"
},
"properties": {
"$ref": "#/definitions/Properties"
},
"inputParameters": {
"$ref": "#/definitions/InputParameters"
},
"partialCharges": {
"$ref": "#/definitions/PartialCharges"
},
"vibrations": {
"$ref": "#/definitions/Vibrations"
},
"unitCell": {
"$ref": "#/definitions/UnitCell"
},
"layer": {
"$ref": "#/definitions/Layer"
},
"basisSet": {
"$ref": "#/definitions/BasisSet"
},
"orbitals": {
"$ref": "#/definitions/Orbitals"
},
"spectra": {
"$ref": "#/definitions/Spectra"
}
},
"required": [
"atoms"
],
"definitions": {
"Elements": {
"title": "Elements",
"description": "List of elements for the atoms in the molecule.\n\nLength must match the number of atoms.",
"type": "object",
"properties": {
"number": {
"title": "Number",
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"number"
]
},
"Coords": {
"title": "Coords",
"description": "Coordinates for the atoms in the molecule.\n\nLength must match the number of atoms*3 (x, y, z).\nAttributes:\n 3d: List of 3d Cartesian coordinates (in Angstrom) for the atoms [ x, y, z, x, y, z, ... ]\n 3dFractional: Optional list of 3d fractional coordinates for the atoms [ x, y, z, x, y, z, ... ]\n 3dSets: List of lists of 3d Cartesian coordinates (in Angstrom) for the atoms [ [x, y, z], [x, y, z], ... ]",
"type": "object",
"properties": {
"3d": {
"title": "3D",
"type": "array",
"items": {
"type": "number"
}
},
"3dFractional": {
"title": "3Dfractional",
"type": "array",
"items": {
"type": "number"
}
},
"3dSets": {
"title": "3Dsets",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
}
},
"required": [
"3d"
]
},
"Atoms": {
"title": "Atoms",
"description": "Atoms in the molecule.\n\nAttributes:\n elements: List of atomic numbers for the atoms.\n coords: List of coordinates.\n formalCharges: Optional list of formal charges for the atoms.\n labels: Optional list of custom labels for atoms (e.g., 'R' / 'S' or '0.12', etc.)\n layer: Optional list of layer numbers for the atoms (generally just 1 for most molecules).",
"type": "object",
"properties": {
"elements": {
"$ref": "#/definitions/Elements"
},
"coords": {
"$ref": "#/definitions/Coords"
},
"formalCharges": {
"title": "Formalcharges",
"type": "array",
"items": {
"type": "integer"
}
},
"labels": {
"title": "Labels",
"type": "array",
"items": {
"type": "string"
}
},
"layer": {
"title": "Layer",
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"elements",
"coords"
]
},
"Connections": {
"title": "Connections",
"description": "Connections - list of connections between atom indices.\n\nLength must be the number of bonds * 2",
"type": "object",
"properties": {
"index": {
"title": "Index",
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"index"
]
},
"Bonds": {
"title": "Bonds",
"description": "Bonds between atoms, including connections and bond orders for the atoms in the molecule. (Optional)",
"type": "object",
"properties": {
"connections": {
"$ref": "#/definitions/Connections"
},
"order": {
"title": "Order",
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"connections",
"order"
]
},
"Properties": {
"title": "Properties",
"description": "Properties of the molecule / system. (Optional)\n\nA set of key-value properties.\n\nAttributes:\n totalCharge: Total charge of the system.\n spinMultiplicity: Spin multiplicity of the system (2S+1, e.g., 1, 2, 3, etc.).\n totalEnergy: Total energy of the system (in eV).",
"type": "object",
"properties": {
"molecularMass": {
"title": "Molecularmass",
"type": "number"
},
"meltingPoint": {
"title": "Meltingpoint",
"type": "number"
},
"boilingPoint": {
"title": "Boilingpoint",
"type": "number"
},
"totalCharge": {
"title": "Totalcharge",
"default": 0,
"type": "integer"
},
"spinMultiplicity": {
"title": "Spinmultiplicity",
"default": 1,
"type": "integer"
},
"totalEnergy": {
"title": "Totalenergy",
"type": "number"
}
}
},
"InputParameters": {
"title": "InputParameters",
"description": "Input parameters for the calculation. (Optional)\n\nAttributes:\n basis: Basis set used for the calculation (e.g. \"6-31G(d)\" or \"Custom\").\n theory: Method used for the calculation (e.g. \"DFT\" or \"HF\" or \"MP2\").\n functional: Functional used for the calculation if DFT (e.g. \"B3LYP\" or \"Custom\").\n task: \"Energy\" or \"Optimize\" or \"Frequencies\" or \"Transition State\" or \"Custom\".",
"type": "object",
"properties": {
"basis": {
"title": "Basis",
"type": "string"
},
"functional": {
"title": "Functional",
"type": "string"
},
"task": {
"title": "Task",
"type": "string"
},
"theory": {
"title": "Theory",
"type": "string"
}
}
},
"PartialCharges": {
"title": "PartialCharges",
"description": "Partial charges for the atoms in the molecule. (Optional)\n\nKeys represent the partial charge method, followed by the computed partial charges.\ne.g.\n- \"Mulliken\": [ 0.01, 0.02, 0.03, ... ]\n- \"Gasteiger\": [ 0.01, 0.02, 0.03, ... ]",
"type": "object",
"properties": {
"Mulliken": {
"title": "Mulliken",
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"Mulliken"
]
},
"Vibrations": {
"title": "Vibrations",
"description": "Vibrations for the molecule. (Optional)\n\nAttributes:\n frequencies: List of frequencies (in cm-1) for the vibrations.\n intensities: List of IR intensities for the vibrations.\n ramanIntensities: Optional list of Raman intensities for the vibrations.\n modes: List of mode numbers (e.g, [ 1, 2, 3, 4, 5, 6, ... ])\n eigenvectors: List of eigenvectors (displacements in Angstroms) for the vibrations.\n symmetries: Optional list of symmetries for the vibrations (e.g., 'a1g', 'eg' ...)",
"type": "object",
"properties": {
"frequencies": {
"title": "Frequencies",
"type": "array",
"items": {
"type": "number"
}
},
"modes": {
"title": "Modes",
"type": "array",
"items": {
"type": "integer"
}
},
"intensities": {
"title": "Intensities",
"type": "array",
"items": {
"type": "number"
}
},
"ramanIntensities": {
"title": "Ramanintensities",
"type": "array",
"items": {
"type": "number"
}
},
"eigenVectors": {
"title": "Eigenvectors",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
},
"symmetries": {
"title": "Symmetries",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"frequencies",
"modes",
"intensities",
"eigenVectors"
]
},
"UnitCell": {
"title": "UnitCell",
"description": "Unit cell for the system. (Optional)\n\nAttributes:\n a: Unit cell a-axis length (in Angstrom).\n b: Unit cell b-axis length (in Angstrom).\n c: Unit cell c-axis length (in Angstrom).\n alpha: Unit cell alpha angle (in degrees).\n beta: Unit cell beta angle (in degrees).\n gamma: Unit cell gamma angle (in degrees).\n cellVectors: Optional list of cell vectors (in Angstrom): [ x1, y1, z1, x2, y2, z2, ... ]",
"type": "object",
"properties": {
"a": {
"title": "A",
"type": "number"
},
"b": {
"title": "B",
"type": "number"
},
"c": {
"title": "C",
"type": "number"
},
"alpha": {
"title": "Alpha",
"type": "number"
},
"beta": {
"title": "Beta",
"type": "number"
},
"gamma": {
"title": "Gamma",
"type": "number"
},
"cellVectors": {
"title": "Cellvectors",
"minItems": 9,
"maxItems": 9,
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"a",
"b",
"c",
"alpha",
"beta",
"gamma"
]
},
"Enable": {
"title": "Enable",
"description": "Optional enable flags for different render types for each layer\n\nLength of each much match the number of layers.",
"type": "object",
"properties": {
"Ball and Stick": {
"title": "Ball And Stick",
"type": "array",
"items": {
"type": "boolean"
}
},
"Cartoons": {
"title": "Cartoons",
"type": "array",
"items": {
"type": "boolean"
}
},
"Close Contacts": {
"title": "Close Contacts",
"type": "array",
"items": {
"type": "boolean"
}
},
"Labels": {
"title": "Labels",
"type": "array",
"items": {
"type": "boolean"
}
},
"Licorice": {
"title": "Licorice",
"type": "array",
"items": {
"type": "boolean"
}
},
"Van der Waals": {
"title": "Van Der Waals",
"type": "array",
"items": {
"type": "boolean"
}
},
"Wireframe": {
"title": "Wireframe",
"type": "array",
"items": {
"type": "boolean"
}
}
}
},
"Settings": {
"title": "Settings",
"description": "Settings for the render types. (Optional)",
"type": "object",
"properties": {
"Ball and Stick": {
"title": "Ball And Stick",
"type": "array",
"items": {
"type": "string"
}
},
"Cartoons": {
"title": "Cartoons",
"type": "array",
"items": {
"type": "string"
}
},
"Wireframe": {
"title": "Wireframe",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"Layer": {
"title": "Layer",
"description": "Layer settings for the molecule. (Optional)\n\nAttributes:\n enable: Enable flags for different render types for each layer.\n settings: Settings for the render types.\n locked: List of locked layers (e.g., atoms in this layer should not change)\n visible: List of visible layers (e.g., atoms in this layer should be visible / invisible)",
"type": "object",
"properties": {
"enable": {
"$ref": "#/definitions/Enable"
},
"locked": {
"title": "Locked",
"type": "array",
"items": {
"type": "boolean"
}
},
"settings": {
"$ref": "#/definitions/Settings"
},
"visible": {
"title": "Visible",
"type": "array",
"items": {
"type": "boolean"
}
}
},
"required": [
"enable",
"locked",
"settings",
"visible"
]
},
"BasisSet": {
"title": "BasisSet",
"description": "Basis Set information (optional)\n\nAt the moment, implied to be Gaussian basis sets.\n\nAttributes:\n coefficients: List of coefficients for the basis functions.\n exponents: List of exponents for the basis functions.\n primitivesPerShell: List of number of primitives per shell.\n shellToAtomMap: List atom indices for the basis functions.\n shellTypes: List of shell types for the basis functions (l-value, so s=0, p=1, d=2, etc.).",
"type": "object",
"properties": {
"coefficients": {
"title": "Coefficients",
"type": "array",
"items": {
"type": "number"
}
},
"exponents": {
"title": "Exponents",
"type": "array",
"items": {
"type": "number"
}
},
"primitivesPerShell": {
"title": "Primitivespershell",
"type": "array",
"items": {
"type": "integer"
}
},
"shellToAtomMap": {
"title": "Shelltoatommap",
"type": "array",
"items": {
"type": "integer"
}
},
"shellTypes": {
"title": "Shelltypes",
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"coefficients",
"exponents",
"primitivesPerShell",
"shellToAtomMap",
"shellTypes"
]
},
"Orbitals": {
"title": "Orbitals",
"description": "Information about molecular orbital energies and coefficients. (Optional)\n\nAttributes:\n energies: List of energies for the molecular orbitals (in eV)\n electronCount: Number of electrons in the species\n occupations: List of occupations for the molecular orbitals\n moCoefficients: List of coefficients for the molecular orbitals (requires BasisSet to be present).\n alphaCoefficients: List of coefficients for the alpha molecular orbitals (requires BasisSet to be present).\n betaCoefficients: List of coefficients for the beta molecular orbitals (requires BasisSet to be present).\n symmetry: Symmetry of the orbital (e.g., a1, eg, t1g, etc.)",
"type": "object",
"properties": {
"electronCount": {
"title": "Electroncount",
"type": "integer"
},
"energies": {
"title": "Energies",
"type": "array",
"items": {
"type": "number"
}
},
"moCoefficients": {
"title": "Mocoefficients",
"type": "array",
"items": {
"type": "number"
}
},
"alphaCoefficients": {
"title": "Alphacoefficients",
"type": "array",
"items": {
"type": "number"
}
},
"betaCoefficients": {
"title": "Betacoefficients",
"type": "array",
"items": {
"type": "number"
}
},
"occupations": {
"title": "Occupations",
"type": "array",
"items": {
"type": "integer"
}
},
"symmetries": {
"title": "Symmetries",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"required": [
"electronCount"
]
},
"Electronic": {
"title": "Electronic",
"description": "Electronic spectra (optional)\n\nAttributes:\n energies: List of excitation energies for the electronic spectra (in eV)\n intensities: List of intensities for the electronic spectra\n rotation: Optional list of rotation angles for the CD spectra (in degrees)",
"type": "object",
"properties": {
"energies": {
"title": "Energies",
"type": "array",
"items": {
"type": "number"
}
},
"intensities": {
"title": "Intensities",
"type": "array",
"items": {
"type": "number"
}
},
"rotation": {
"title": "Rotation",
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"energies",
"intensities"
]
},
"Nmr": {
"title": "Nmr",
"description": "NMR spectra (optional)\n\nAttributes:\n shifts: List of absolute chemical shifts for the NMR spectra (in ppm)",
"type": "object",
"properties": {
"shifts": {
"title": "Shifts",
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"shifts"
]
},
"Spectra": {
"title": "Spectra",
"description": "Spectra (optional)\n\nObjects for non-vibrational spectra, including electronic, NMR, and other spectra.\n\nAttributes:\n electronic: Optional electronic spectra\n nmr: Optional NMR spectra",
"type": "object",
"properties": {
"electronic": {
"$ref": "#/definitions/Electronic"
},
"nmr": {
"$ref": "#/definitions/Nmr"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment