@@ -137,19 +137,30 @@ def test_SinglePointFW_not_defaults(self):
137
137
self .assertEqual (firework .name , "special single point" )
138
138
139
139
def test_ProtonEnergyFW (self ):
140
- H_site = Site ("H" , [0.0 , 0.0 , 0.0 ])
141
- H_site_inf = Site ("H" , [100000.0 , 0.0 , 0.0 ])
142
- H0_atom = Molecule .from_sites ([H_site ])
143
- H2_plus_mol = Molecule .from_sites ([H_site , H_site_inf ])
144
- H0_atom .set_charge_and_spin (0 , 2 )
145
- H2_plus_mol .set_charge_and_spin (1 , 2 )
140
+
141
+ H_site_1_H2O = Site ("H" , [0.18338 , 2.20176 , 0.01351 ])
142
+ H_site_2_H2O = Site ("H" , [- 1.09531 , 1.61602 , 0.70231 ])
143
+ O_site_H2O = Site ("O" , [- 0.80595 , 2.22952 , - 0.01914 ])
144
+ H2O_molecule = Molecule .from_sites ([H_site_1_H2O , H_site_2_H2O , O_site_H2O ])
145
+
146
+ H_site_1_H3O = Site ("H" , [0.11550 , 2.34733 , 0.00157 ])
147
+ H_site_2_H3O = Site ("H" , [- 1.17463 , 1.77063 , 0.67652 ])
148
+ H_site_3_H3O = Site ("H" , [- 1.29839 , 2.78012 , - 0.51436 ])
149
+ O_site_H3O = Site ("O" , [- 0.78481 , 1.99137 , - 0.20661 ])
150
+ H3O_ion = Molecule .from_sites (
151
+ [H_site_1_H3O , H_site_2_H3O , H_site_3_H3O , O_site_H3O ]
152
+ )
153
+
154
+ H2O_molecule .set_charge_and_spin (0 , 1 )
155
+ H3O_ion .set_charge_and_spin (1 , 1 )
156
+
146
157
firework = ProtonEnergyFW (qchem_input_params = {"smd_solvent" : "water" })
147
158
self .assertEqual (
148
159
firework .tasks [0 ].as_dict (),
149
160
WriteInputFromIOSet (
150
- molecule = H0_atom ,
151
- qchem_input_set = "SinglePointSet " ,
152
- input_file = "H0 .qin" ,
161
+ molecule = H2O_molecule ,
162
+ qchem_input_set = "OptSet " ,
163
+ input_file = "water .qin" ,
153
164
qchem_input_params = {"smd_solvent" : "water" },
154
165
).as_dict (),
155
166
)
@@ -158,8 +169,8 @@ def test_ProtonEnergyFW(self):
158
169
RunQChemCustodian (
159
170
qchem_cmd = ">>qchem_cmd<<" ,
160
171
multimode = ">>multimode<<" ,
161
- input_file = "H0 .qin" ,
162
- output_file = "H0 .qout" ,
172
+ input_file = "water .qin" ,
173
+ output_file = "water .qout" ,
163
174
max_cores = ">>max_cores<<" ,
164
175
max_errors = 5 ,
165
176
job_type = "normal" ,
@@ -169,9 +180,9 @@ def test_ProtonEnergyFW(self):
169
180
self .assertEqual (
170
181
firework .tasks [2 ].as_dict (),
171
182
WriteInputFromIOSet (
172
- molecule = H2_plus_mol ,
173
- qchem_input_set = "SinglePointSet " ,
174
- input_file = "H2_plus .qin" ,
183
+ molecule = H3O_ion ,
184
+ qchem_input_set = "OptSet " ,
185
+ input_file = "hydronium .qin" ,
175
186
qchem_input_params = {"smd_solvent" : "water" },
176
187
).as_dict (),
177
188
)
@@ -180,8 +191,8 @@ def test_ProtonEnergyFW(self):
180
191
RunQChemCustodian (
181
192
qchem_cmd = ">>qchem_cmd<<" ,
182
193
multimode = ">>multimode<<" ,
183
- input_file = "H2_plus .qin" ,
184
- output_file = "H2_plus .qout" ,
194
+ input_file = "hydronium .qin" ,
195
+ output_file = "hydronium .qout" ,
185
196
max_cores = ">>max_cores<<" ,
186
197
max_errors = 5 ,
187
198
job_type = "normal" ,
@@ -192,10 +203,10 @@ def test_ProtonEnergyFW(self):
192
203
firework .tasks [4 ].as_dict (),
193
204
ProtCalcToDb (
194
205
db_file = None ,
195
- input_file_H0 = "H0 .qin" ,
196
- output_file_H0 = "H0 .qout" ,
197
- input_file_H2 = "H2_plus .qin" ,
198
- output_file_H2 = "H2_plus .qout" ,
206
+ input_file_H2O = "water .qin" ,
207
+ output_file_H2O = "water .qout" ,
208
+ input_file_H3O = "hydronium .qin" ,
209
+ output_file_H3O = "hydronium .qout" ,
199
210
additional_fields = {"task_label" : "proton electronic energy" },
200
211
).as_dict (),
201
212
)
0 commit comments