Skip to content
Snippets Groups Projects
Commit 728aaba1 authored by James Graham's avatar James Graham
Browse files

Refactor JSON schema for molecules

parent ed65258c
No related branches found
No related tags found
No related merge requests found
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"required": ["molecules"],
"additionalProperties": false,
"properties": {
"version":{
"type": "object"
},
"notes": {
"type": "string"
},
"version": {"type": "object"},
"notes": {"type": "string"},
"include": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true
"uniqueItems": true,
"items": {"type": "string"}
},
"molecules": {
"type": "object",
"additionalProperties": {
"additionalProperties": {"$ref": "#/definitions/molecule"}
}
},
"definitions": {
"molecule": {
"type": "object",
"anyOf": [
{"required": ["templates"]},
{"required": ["atoms"]}
],
"properties": {
"polymer_type": {
"comment": {"type": "string"},
"templates": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true
"minLength": 1,
"items": {"type": "string"}
},
"comment": {
"type": "string"
"polymer_type": {
"type": "array",
"uniqueItems": true,
"items": {"type": "string"}
},
"atoms": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {"type": "string"},
"type": {"type": "string"},
"charge": {"type": "float"}
"uniqueItems": true,
"minLength": 1,
"items": {"$ref": "#/definitions/atom"}
},
"additionalProperties": false,
"required": ["name", "type"]
"lengths": {
"type": "array",
"uniqueItems": true,
"items": {"$ref": "#/definitions/length"}
},
"uniqueItems": true
"angles": {
"type": "array",
"uniqueItems": true,
"items": {"$ref": "#/definitions/angle"}
},
"lengths": {
"dihedrals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {"type": "string"},
"atoms": {
"uniqueItems": true,
"items": {"$ref": "#/definitions/dihedral"}
},
"impropers": {
"type": "array",
"items": {"type": "string"},
"minItems": 2,
"maxItems": 2,
"uniqueItems": true
"uniqueItems": true,
"items": {"$ref": "#/definitions/dihedral"}
}
}
},
"uniqueItems": true
"atom": {
"type": "object",
"required": ["name", "type"],
"additionalProperties": false,
"properties": {
"name": {"type": "string"},
"type": {"type": "string"},
"charge": {"type": "number"}
}
},
"angles": {
"type": "array",
"items": {
"length": {
"type": "object",
"required": ["type", "atoms"],
"additionalProperties": false,
"properties": {
"type": {"type": "string"},
"atoms": {
"type": "array",
"items": {"type": "string"},
"minItems": 3,
"maxItems": 3,
"uniqueItems": true
"minLength": 2,
"maxLength": 2,
"uniqueItems": true,
"items": {"type": "string"}
}
}
},
"uniqueItems": true
},
"dihedrals": {
"type": "array",
"items": {
"angle": {
"type": "object",
"required": ["type", "atoms"],
"additionalProperties": false,
"properties": {
"type": {"type": "string"},
"atoms": {
"type": "array",
"items": {"type": "string"},
"minItems": 4,
"maxItems": 4,
"uniqueItems": true
"minLength": 3,
"maxLength": 3,
"uniqueItems": true,
"items": {"type": "string"}
}
}
},
"uniqueItems": true
},
"impropers": {
"type": "array",
"items": {
"dihedral": {
"type": "object",
"required": ["type", "atoms"],
"additionalProperties": false,
"properties": {
"type": {"type": "string"},
"atoms": {
"type": "array",
"items": {"type": "string"},
"minItems": 4,
"maxItems": 4,
"uniqueItems": true
}
"minLength": 4,
"maxLength": 4,
"uniqueItems": true,
"items": {"type": "string"}
}
},
"uniqueItems": true
}
}
}
}
\ No newline at end of file
},
"required": [
"notes",
"molecules"
]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment