{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "version": {
      "type": "object"
    },
    "notes": {
      "type": "string"
    },
    "include": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "_uniqueItems": true
    },
    "molecules": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "polymer_type": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "_uniqueItems": true
          },
          "comment": {
            "type": "string"
          },
          "atoms": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "charge": {
                  "type": "number"
                }
              },
              "additionalProperties": false,
              "required": [
                "name",
                "type"
              ]
            },
            "_uniqueItems": true
          },
          "lengths": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "atoms": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "minItems": 2,
                  "maxItems": 2,
                  "_uniqueItems": true
                }
              }
            },
            "_uniqueItems": true
          },
          "angles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "atoms": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "minItems": 3,
                  "maxItems": 3,
                  "_uniqueItems": true
                }
              }
            },
            "_uniqueItems": true
          },
          "dihedrals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "atoms": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "minItems": 4,
                  "maxItems": 4,
                  "_uniqueItems": true
                }
              }
            },
            "_uniqueItems": true
          },
          "impropers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "atoms": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "minItems": 4,
                  "maxItems": 4,
                  "_uniqueItems": true
                }
              }
            },
            "_uniqueItems": true
          }
        }
      }
    }
  },
  "required": [
    "notes",
    "molecules"
  ]
}