Skip to content

Ketcher format (current version)

even1024 edited this page Jan 20, 2021 · 10 revisions

Molecule schema

{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"title": "Molecule",
	"type": "object",
	"required": [
		"atoms"
	],
	"properties": {
		"stereoFlag": {
			"title": "Stereo Flag",
			"type": "string",
			"enum": [
				"ABS",
				"AND",
				"OR",
				"Mixed"
			]
		},
		"atoms": {
			"title": "Atoms",
			"type": "array",
			"items": {
				"oneOf": [
					{
						"$ref": "#/atom"
					},
					{
						"$ref": "#/hiso"
					},
					{
						"$ref": "#/rsite"
					},
					{
						"$ref": "#/atomlist"
					}
				]
			}
		},
		"bonds": {
			"title": "Bonds",
			"type": "array",
			"items": {
				"$ref": "#/bond"
			}
		},
		"hl_bonds": {
			"title": "Highlighted bonds",
			"type": "array",
			"items": {
				"type": "integer"
			}
		},
		"hl_atoms": {
			"title": "Highlighted atoms",
			"type": "array",
			"items": {
				"type": "integer"
			}
		},
		"sl_bonds": {
			"title": "Selected bonds",
			"type": "array",
			"items": {
				"type": "integer"
			}
		},
		"sl_atoms": {
			"title": "Selected atoms",
			"type": "array",
			"items": {
				"type": "integer"
			}
		},
		"sgroups": {
			"title": "SGroups",
			"type": "array",
			"items": {
				"$ref": "#/sgroup"
			}
		}
	}
}


=== Atom schema

{
	"$schema": "http://json-schema.org/draft-07/schema#",
	"title": "Atom",
	"type": "object",
	"required": [
		"label"
	],
	"properties": {
		"label": {
			"title": "Label",
			"type": "string",
			"enum": [
				"H", "He", 
                                "Li","Be","B","C","N","O","F","Ne",
				"Na","Mg","Al","Si","P","S","Cl","Ar",
				"K","Ca","Sc","Ti","V","Cr","Mn","Fe","Co","Ni","Cu","Zn","Ga","Ge","As","Se","Br","Kr",
				"Rb","Sr","Y","Zr","Nb","Mo","Tc","Ru","Rh","Pd","Ag","Cd","In","Sn","Sb","Te","I","Xe",
				"Cs","Ba","La","Ce","Pr","Nd","Pm","Sm","Eu","Gd","Tb","Dy","Ho","Er","Tm","Yb","Lu","Hf",
				"Ta","W","Re","Os","Ir","Pt","Au","Hg","Tl","Pb","Bi","Po","At","Rn",
				"Fr","Ra","Ac","Th","Pa","U","Np","Pu","Am","Cm","Bk","Cf","Es","Fm","Md","No","Lr","Rf",
				"Db","Sg","Bh","Hs","Mt","Ds","Rg","Cn","Nh","Fl","Mc","Lv","Ts","Og"
			]
		},
		"location": {
			"title": "Location",
			"type": "array",
			"items": {
				"type": "number",
				"maxItems": 3
			}
		},
		"charge": {
			"title": "Charge",
			"type": "integer",
			"minimum": -1000,
			"maximum": 1000
		},
		"explicitValence": {
			"title": "Valence",
			"type": "integer",
			"enum": [
				-1,
				0,
				1,
				2,
				3,
				4,
				5,
				6,
				7,
				8,
				9,
				10,
				11,
				12
			]
		},
		"isotope": {
			"title": "Isotope",
			"type": "integer",
			"minimum": 0
		},
		"radical": {
			"title": "Radical",
			"type": "integer",
			"enum": [
				0,
				2,
				1,
				3
			]
		},
		"attachmentPoints": {
			"title": "R-Group attachment points",
			"type": "integer",
			"enum": [
				0,
				1,
				2,
				3
			]
		},
		"stereoParity": {
			"title": "Stereo parity configuration",
			"type": "integer",
			"enum": [
				0,
				1,
				2,
				3
			]
		},
		"ringBondCount": {
			"title": "Ring bond count",
			"type": "integer",
			"enum": [
				0,
				-2,
				-1,
				2,
				3,
				4
			]
		},
		"substitutionCount": {
			"title": "Substitution count",
			"type": "integer",
			"enum": [
				0,
				-2,
				-1,
				1,
				2,
				3,
				4,
				5,
				6
			]
		},
		"unsaturatedAtom": {
			"title": "Unsaturated atom",
			"type": "boolean"
		},
		"hCount": {
			"title": "H-count",
			"type": "integer",
			"enum": [
				-1,
				0,
				1,
				2,
				3,
				4,
				5
			]
		},
		"mapping": {
			"title": "Atom-atom mapping",
			"type": "integer",
			"minimum": 0
		},
		"invRet": {
			"title": "Inversion",
			"type": "integer",
			"enum": [
				0,
				1,
				2
			]
		},
		"exactChangeFlag": {
			"title": "Exact change",
			"type": "boolean"
		}
	}
}

=== Hydrogen isotopes

{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "hiso", "type": "object", "required": [ "label", "location" ], "properties": { "label": { "title": "Label", "type": "string", "enum": [ "D", "T" ] }, "location": { "title": "Location", "type": "array", "items": { "type": "number", "maxItems": 3 } }, "charge": { "title": "Charge", "type": "integer", "minimum": -1000, "maximum": 1000 } } }

=== R-Site

{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "R-site", "type": "object", "required": [ "type", "location" ], "properties": { "type": { "title": "R-site type", "type": "string", "enum": [ "rg-label" ] }, "location": { "title": "Location", "type": "array", "items": { "type": "number", "maxItems": 3 } }, "$refs": { "title": "R-group references", "type": "array", "items": { "type": "string", "pattern": "^rg-", "maxLength": 5 } }, "attachmentPoints": { "title": "R-Group attachment points", "type": "integer", "enum": [ 0, 1, 2, 3 ] } } }

=== Atom list

{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Atom list", "type": "object", "required": [ "type", "location" ], "properties": { "type": { "type": "string", "enum": [ "atom-list" ] }, "notList": { "type": "boolean" }, "location": { "title": "Location", "type": "array", "items": { "type": "number", "maxItems": 3 } }, "elements": { "title": "Elements list", "type": "array", "minItems": 2, "items": { "type": "string", "maxLength": 3 } }, "attachmentPoints": { "title": "R-Group attachment points", "type": "integer", "enum": [ 0, 1, 2, 3 ] } } }

=== Bond

{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Bond", "type": "object", "required": [ "atoms" ], "properties": { "type": { "title": "Bond type", "type": "integer", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] }, "atoms": { "title": "Atoms", "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "integer" } }, "stereo": { "title": "Bond stereo type", "type": "integer", "enum": [ 0, 1, 2, 3 ] }, "topology": { "title": "Topology", "type": "integer", "enum": [ 0, 1, 2 ] }, "center": { "title": "Reacting Center", "type": "integer", "enum": [ 0, -1, 1, 2, 4, 8, 12 ] }, "stereobox": { "title": "Stereo box", "type": "integer", "enum": [ 0, 1 ] } } }

=== S-Group

{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "SGroup", "allOf": [ { "required": [ "atoms" ], "properties": { "atoms": { "type": "array", "items": { "type": "integer" } } } }, { "oneOf": [ { "title": "Generic", "key": "GEN", "properties": { "type": { "enum": [ "GEN" ] } } }, { "title": "Multiple group", "key": "MUL", "required": [ "mul" ], "properties": { "type": { "enum": [ "MUL" ] }, "mul": { "title": "Repeat count", "type": "integer", "default": 1, "minimum": 1, "maximum": 1000 } } }, { "title": "SRU polymer", "key": "SRU", "required": [ "subscript", "connectivity" ], "properties": { "type": { "enum": [ "SRU" ] }, "subscript": { "title": "Polymer label", "type": "string", "pattern": "^[a-zA-Z]$" }, "connectivity": { "title": "Repetition rule", "type": "string", "enum": [ "HT", "HH", "EU" ] } } }, { "key": "SUP", "title": "Superatom", "properties": { "type": { "enum": [ "SUP" ] }, "name": { "title": "Superatom name", "type": "string", "minLength": 1 } } }, { "key": "DAT", "title": "Data-group", "required": [ "context", "fieldName", "fieldValue" ], "properties": { "type": { "enum": [ "DAT" ] }, "context": { "title": "Context", "enum": [ "Fragment", "Multifragment", "Bond", "Atom", "Group" ] }, "fieldName": { "title": "Field name", "type": "string", "minLength": 1 }, "fieldValue": { "title": "Field value", "type": "string", "minLength": 1 }, "display": { "title": "Display", "type": "boolean" }, "placement": { "title": "Placement", "type": "boolean" } } } ] } ] }

Clone this wiki locally