-
Notifications
You must be signed in to change notification settings - Fork 36
/
molecule.py
169 lines (169 loc) · 6.58 KB
/
molecule.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
"""
The json-schema for the Molecule definition
"""
molecule = {
"$schema": "http://json-schema.org/draft-04/schema#",
"name": "qcschema_molecule",
"version": "2.dev",
"description": "The MolSSI Quantum Chemistry Molecular Schema",
"type": "object",
"properties": {
"schema_name": {
"guidance": "required properties schema_name within molecule block (instead of 'qcschema_[in|out]put' from one level higher) starts with schema_name=qcschema_molecule and schema_version=2",
"type": "string",
"pattern": "^(qcschema_molecule)$"
},
"schema_version": {
"type": "integer"
},
"symbols": {
"description": "(nat, ) atom symbols in title case.",
"type": "array",
"items": {
"type": "string"
}
},
"geometry": {
"description": "(3 * nat, ) vector of XYZ coordinates [a0] of the atoms.",
"guidance": "Atom ordering is fixed; that is, a consumer who shuffles atoms must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-atom results (e.g., gradient).",
"type": "array",
"items": {
"type": "number"
}
},
"masses": {
"description": "(nat, ) atom masses [u]; canonical weights assumed if not given.",
"type": "array",
"items": {
"type": "number"
}
},
"atomic_numbers": {
"description": "(nat, ) atomic numbers, nuclear charge for atoms. Ghostedness should be indicated through 'real' field, not zeros here.",
"type": "array",
"items": {
"type": "number",
"multipleOf": 1.0
}
},
"mass_numbers": {
"description": "(nat, ) mass numbers for atoms, if known isotope, else -1.",
"type": "array",
"items": {
"type": "number",
"multipleOf": 1.0
}
},
"atom_labels": {
"description": "(nat, ) atom labels with any user tagging information.",
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"description": "The name of the molecule.",
"type": "string"
},
"comment": {
"description": "Any additional comment one would attach to the molecule.",
"type": "string"
},
"molecular_charge": {
"description": "The overall charge of the molecule.",
"type": "number",
"default": 0.0
},
"molecular_multiplicity": {
"description": "The overall multiplicity of the molecule.",
"type": "number",
"multipleOf": 1.0,
"default": 1
},
"real": {
"description": "(nat, ) list describing if atoms are real (T) or ghost (F).",
"type": "array",
"items": {
"type": "boolean"
}
},
"connectivity": {
"description": "A list describing bonds within a molecule. Each element is a (atom1, atom2, order) tuple.",
"guidance": "Bonds may be freely reordered and inverted.",
"type": "array",
"items": {
"type": "array",
"minItems": 3,
"maxItems": 3,
"items": [
{
"description": "Atom number (0-indexed) at one end of bond.",
"type": "number",
"multipleOf": 1.0
},
{
"description": "Atom number (0-indexed) at other end of bond.",
"type": "number",
"multipleOf": 1.0
},
{
"description": "Bond order.",
"type": "number",
"minimum": 0,
"maximum": 5,
}
]
}
},
"fragments": {
"description":
"(nfr, <varies>) list of indices (0-indexed) grouping atoms into molecular fragments within the topology.",
"guidance": "Fragment ordering is fixed; that is, a consumer who shuffles fragments must not reattach the input (pre-shuffling) molecule schema instance to any output (post-shuffling) per-fragment results (e.g., n-body energy arrays).",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number",
"multipleOf": 1.0
}
}
},
"fragment_charges": {
"description": "(nfr, ) list of charges associated with each fragment tuple.",
"type": "array",
"items": {
"type": "number"
}
},
"fragment_multiplicities": {
"description": "(nfr, ) list of multiplicities associated with each fragment tuple.",
"type": "array",
"items": {
"type": "number",
"multipleOf": 1.0
}
},
"fix_com": {
"description": "Whether translation of geometry is allowed (fix F) or disallowed (fix T).",
"guidance": "A consumer who translates the geometry must not reattach the input (pre-translation) molecule schema instance to any output (post-translation) origin-sensitive results (e.g., an ordinary energy when EFP present).",
"type": "boolean",
"default": False
},
"fix_orientation": {
"description": "Whether rotation of geometry is allowed (fix F) or disallowed (fix T).",
"guidance": "A consumer who rotates the geometry must not reattach the input (pre-rotation) molecule schema instance to any output (post-rotation) frame-sensitive results (e.g., molecular vibrations).",
"type": "boolean",
"default": False
},
"fix_symmetry":{
"description": "Maximal point group symmetry at which `geometry` should be treated. Lowercase.",
"type": "string"
},
"provenance": {
"type": "object",
"$ref": "#/definitions/provenance"
}
},
"required": ["symbols", "geometry", "schema_name", "schema_version"],
"description": "The physical cartesian representation of the molecular system"
}