@@ -258,6 +258,56 @@ def test_scan_auto(self):
258
258
"""
259
259
self .assertTrue (self .is_equivalent (INPUT , xtb .input_file ))
260
260
261
+ def test_scan_two_coordinates (self ):
262
+ params = {
263
+ "type" : "Constrained Optimisation" ,
264
+ "file" : "ethanol.xyz" ,
265
+ "software" : "xtb" ,
266
+ "constraints" : "Scan_9_1.4_10/1_2;Scan_9_1.4_10/2_3" ,
267
+ }
268
+
269
+ xtb = self .generate_calculation (** params )
270
+
271
+ REF = "xtb ethanol.xyz --opt tight --input input"
272
+
273
+ self .assertTrue (self .is_equivalent (REF , xtb .command ))
274
+
275
+ INPUT = """$constrain
276
+ force constant=1.0
277
+ distance: 1, 2, auto
278
+ distance: 2, 3, auto
279
+ $scan
280
+ 1: 9.00, 1.40, 10
281
+ 2: 9.00, 1.40, 10
282
+ """
283
+ self .assertTrue (self .is_equivalent (INPUT , xtb .input_file ))
284
+
285
+ def test_scan_two_coordinates_concerted (self ):
286
+ params = {
287
+ "type" : "Constrained Optimisation" ,
288
+ "file" : "ethanol.xyz" ,
289
+ "software" : "xtb" ,
290
+ "constraints" : "Scan_9_1.4_10/1_2;Scan_9_1.4_10/2_3" ,
291
+ "specifications" : "--concerted" ,
292
+ }
293
+
294
+ xtb = self .generate_calculation (** params )
295
+
296
+ REF = "xtb ethanol.xyz --opt tight --input input"
297
+
298
+ self .assertTrue (self .is_equivalent (REF , xtb .command ))
299
+
300
+ INPUT = """$constrain
301
+ force constant=1.0
302
+ distance: 1, 2, auto
303
+ distance: 2, 3, auto
304
+ $scan
305
+ mode=concerted
306
+ 1: 9.00, 1.40, 10
307
+ 2: 9.00, 1.40, 10
308
+ """
309
+ self .assertTrue (self .is_equivalent (INPUT , xtb .input_file ))
310
+
261
311
def test_constrained_opt_no_constraint (self ):
262
312
params = {
263
313
"type" : "Constrained Optimisation" ,
@@ -266,7 +316,42 @@ def test_constrained_opt_no_constraint(self):
266
316
}
267
317
268
318
with self .assertRaises (InvalidParameter ):
269
- xtb = self .generate_calculation (** params )
319
+ self .generate_calculation (** params )
320
+
321
+ def test_freeze_concerted_exception (self ):
322
+ params = {
323
+ "type" : "Constrained Optimisation" ,
324
+ "file" : "ethanol.xyz" ,
325
+ "software" : "xtb" ,
326
+ "constraints" : "Freeze_9_1.4_10;Freeze_9_1.4_10" ,
327
+ "specifications" : "--concerted" ,
328
+ }
329
+
330
+ with self .assertRaises (InvalidParameter ):
331
+ self .generate_calculation (** params )
332
+
333
+ def test_scan_single_coordinate_concerted_exception (self ):
334
+ params = {
335
+ "type" : "Constrained Optimisation" ,
336
+ "file" : "ethanol.xyz" ,
337
+ "software" : "xtb" ,
338
+ "constraints" : "Scan_9_1.4_10/1_2;" ,
339
+ "specifications" : "--concerted" ,
340
+ }
341
+
342
+ with self .assertRaises (InvalidParameter ):
343
+ self .generate_calculation (** params )
344
+
345
+ def test_opt_concerted_exception (self ):
346
+ params = {
347
+ "type" : "Geometrical Optimisation" ,
348
+ "file" : "ethanol.xyz" ,
349
+ "software" : "xtb" ,
350
+ "specifications" : "--concerted" ,
351
+ }
352
+
353
+ with self .assertRaises (InvalidParameter ):
354
+ self .generate_calculation (** params )
270
355
271
356
def test_freeze (self ):
272
357
params = {
0 commit comments