Skip to content

Commit b93adb3

Browse files
committed
Expose max_errors and set to 20 for opt and FFopt
1 parent 5605bce commit b93adb3

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

atomate/qchem/fireworks/core.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def __init__(
3434
qchem_input_params=None,
3535
db_file=None,
3636
parents=None,
37+
max_errors=5,
3738
**kwargs
3839
):
3940
"""
@@ -83,6 +84,7 @@ def __init__(
8384
input_file=input_file,
8485
output_file=output_file,
8586
max_cores=max_cores,
87+
max_errors=max_errors,
8688
job_type="normal",
8789
)
8890
)
@@ -108,6 +110,7 @@ def __init__(
108110
qchem_input_params=None,
109111
db_file=None,
110112
parents=None,
113+
max_errors=5,
111114
**kwargs
112115
):
113116
"""
@@ -157,6 +160,7 @@ def __init__(
157160
input_file=input_file,
158161
output_file=output_file,
159162
max_cores=max_cores,
163+
max_errors=max_errors,
160164
job_type="normal",
161165
)
162166
)
@@ -182,6 +186,7 @@ def __init__(
182186
qchem_input_params=None,
183187
db_file=None,
184188
parents=None,
189+
max_errors=20,
185190
**kwargs
186191
):
187192
"""
@@ -232,6 +237,7 @@ def __init__(
232237
input_file=input_file,
233238
output_file=output_file,
234239
max_cores=max_cores,
240+
max_errors=max_errors,
235241
job_type="normal",
236242
)
237243
)
@@ -257,6 +263,7 @@ def __init__(
257263
qchem_input_params=None,
258264
db_file=None,
259265
parents=None,
266+
max_errors=5,
260267
**kwargs
261268
):
262269
"""
@@ -307,6 +314,7 @@ def __init__(
307314
input_file=input_file,
308315
output_file=output_file,
309316
max_cores=max_cores,
317+
max_errors=max_errors,
310318
job_type="normal",
311319
)
312320
)
@@ -332,6 +340,7 @@ def __init__(
332340
qchem_input_params=None,
333341
db_file=None,
334342
parents=None,
343+
max_errors=5,
335344
**kwargs
336345
):
337346
"""
@@ -382,6 +391,7 @@ def __init__(
382391
input_file=input_file,
383392
output_file=output_file,
384393
max_cores=max_cores,
394+
max_errors=max_errors,
385395
job_type="normal",
386396
)
387397
)
@@ -408,6 +418,7 @@ def __init__(
408418
scan_variables=None,
409419
db_file=None,
410420
parents=None,
421+
max_errors=5,
411422
**kwargs
412423
):
413424
"""
@@ -467,6 +478,7 @@ def __init__(
467478
input_file=input_file,
468479
output_file=output_file,
469480
max_cores=max_cores,
481+
max_errors=max_errors,
470482
job_type="normal",
471483
)
472484
)
@@ -499,6 +511,7 @@ def __init__(
499511
scale=1.0,
500512
db_file=None,
501513
parents=None,
514+
max_errors=20,
502515
**kwargs
503516
):
504517
"""
@@ -586,6 +599,7 @@ def __init__(
586599
max_molecule_perturb_scale=max_molecule_perturb_scale,
587600
linked=linked,
588601
freq_before_opt=freq_before_opt,
602+
max_errors=max_errors,
589603
)
590604
)
591605
t.append(
@@ -621,6 +635,7 @@ def __init__(
621635
scale=1,
622636
db_file=None,
623637
parents=None,
638+
max_errors=5,
624639
**kwargs
625640
):
626641
"""
@@ -719,6 +734,7 @@ def __init__(
719734
transition_state=True,
720735
linked=linked,
721736
freq_before_opt=freq_before_opt,
737+
max_errors=max_errors,
722738
)
723739
)
724740
t.append(
@@ -819,6 +835,7 @@ def __init__(
819835
qchem_input_params=None,
820836
db_file=None,
821837
parents=None,
838+
max_errors=5,
822839
**kwargs
823840
):
824841
"""
@@ -871,6 +888,7 @@ def __init__(
871888
input_file=input_file,
872889
output_file=output_file,
873890
max_cores=max_cores,
891+
max_errors=max_errors,
874892
job_type="normal",
875893
)
876894
)

atomate/qchem/fireworks/tests/test_core.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def test_SinglePointFW_defaults(self):
7272
input_file="mol.qin",
7373
output_file="mol.qout",
7474
max_cores=">>max_cores<<",
75+
max_errors=5,
7576
job_type="normal",
7677
).as_dict(),
7778
)
@@ -115,6 +116,7 @@ def test_SinglePointFW_not_defaults(self):
115116
input_file="mol.qin",
116117
output_file="mol.qout",
117118
max_cores=12,
119+
max_errors=5,
118120
job_type="normal",
119121
).as_dict(),
120122
)
@@ -149,6 +151,7 @@ def test_OptimizeFW_defaults(self):
149151
input_file="mol.qin",
150152
output_file="mol.qout",
151153
max_cores=">>max_cores<<",
154+
max_errors=20,
152155
job_type="normal",
153156
).as_dict(),
154157
)
@@ -192,6 +195,7 @@ def test_OptimizeFW_not_defaults(self):
192195
input_file="mol.qin",
193196
output_file="mol.qout",
194197
max_cores=12,
198+
max_errors=20,
195199
job_type="normal",
196200
).as_dict(),
197201
)
@@ -226,6 +230,7 @@ def test_TransitionStateFW_defaults(self):
226230
input_file="mol.qin",
227231
output_file="mol.qout",
228232
max_cores=">>max_cores<<",
233+
max_errors=5,
229234
job_type="normal",
230235
).as_dict(),
231236
)
@@ -271,6 +276,7 @@ def test_TransitionStateFW_not_defaults(self):
271276
input_file="mol.qin",
272277
output_file="mol.qout",
273278
max_cores=12,
279+
max_errors=5,
274280
job_type="normal",
275281
).as_dict(),
276282
)
@@ -309,6 +315,7 @@ def test_FrequencyFW_defaults(self):
309315
input_file="mol.qin",
310316
output_file="mol.qout",
311317
max_cores=">>max_cores<<",
318+
max_errors=5,
312319
job_type="normal",
313320
).as_dict(),
314321
)
@@ -352,6 +359,7 @@ def test_FrequencyFW_not_defaults(self):
352359
input_file="mol.qin",
353360
output_file="mol.qout",
354361
max_cores=12,
362+
max_errors=5,
355363
job_type="normal",
356364
).as_dict(),
357365
)
@@ -391,6 +399,7 @@ def test_FrequencyFlatteningOptimizeFW_defaults(self):
391399
max_molecule_perturb_scale=0.3,
392400
linked=True,
393401
freq_before_opt=False,
402+
max_errors=20,
394403
).as_dict(),
395404
)
396405
self.assertEqual(
@@ -426,6 +435,7 @@ def test_FrequencyFlatteningOptimizeFW_not_defaults(self):
426435
mode=np.zeros((len(self.act_mol), 3)),
427436
scale=0.2,
428437
parents=None,
438+
max_errors=20,
429439
)
430440
self.assertEqual(
431441
firework.tasks[0].as_dict(),
@@ -455,6 +465,7 @@ def test_FrequencyFlatteningOptimizeFW_not_defaults(self):
455465
max_molecule_perturb_scale=0.2,
456466
linked=False,
457467
freq_before_opt=True,
468+
max_errors=20,
458469
).as_dict(),
459470
)
460471
self.assertEqual(
@@ -500,6 +511,7 @@ def test_FrequencyFlatteningTransitionStateFW_defaults(self):
500511
transition_state=True,
501512
freq_before_opt=True,
502513
linked=True,
514+
max_errors=5,
503515
).as_dict(),
504516
)
505517
self.assertEqual(
@@ -544,6 +556,7 @@ def test_FrequencyFlatteningTransitionStateFW_not_defaults(self):
544556
scale=0.2,
545557
db_file=db_file,
546558
parents=None,
559+
max_errors=5,
547560
)
548561
self.assertEqual(
549562
firework.tasks[0].as_dict(),
@@ -574,6 +587,7 @@ def test_FrequencyFlatteningTransitionStateFW_not_defaults(self):
574587
transition_state=True,
575588
linked=False,
576589
freq_before_opt=False,
590+
max_errors=5,
577591
).as_dict(),
578592
)
579593
self.assertEqual(
@@ -620,6 +634,7 @@ def test_PESScanFW_defaults(self):
620634
input_file="mol.qin",
621635
output_file="mol.qout",
622636
max_cores=">>max_cores<<",
637+
max_errors=5,
623638
job_type="normal",
624639
).as_dict(),
625640
)
@@ -668,6 +683,7 @@ def test_PESScanFW_not_defaults(self):
668683
output_file="mol.qout",
669684
max_cores=12,
670685
job_type="normal",
686+
max_errors=5,
671687
).as_dict(),
672688
)
673689
self.assertEqual(
@@ -752,6 +768,7 @@ def test_CubeAndCritic2FW_defaults(self):
752768
input_file="mol.qin",
753769
output_file="mol.qout",
754770
max_cores=">>max_cores<<",
771+
max_errors=5,
755772
job_type="normal",
756773
).as_dict(),
757774
)
@@ -802,6 +819,7 @@ def test_CubeAndCritic2FW_not_defaults(self):
802819
input_file="mol.qin",
803820
output_file="mol.qout",
804821
max_cores=12,
822+
max_errors=5,
805823
job_type="normal",
806824
).as_dict(),
807825
)

0 commit comments

Comments
 (0)