diff --git a/ccinput/drivers/pysis.py b/ccinput/drivers/pysis.py index 1aa6424..4b08e28 100644 --- a/ccinput/drivers/pysis.py +++ b/ccinput/drivers/pysis.py @@ -14,7 +14,7 @@ class PysisDriver: SUPPORTED_PACKAGES = ["xtb", "orca"] - IGNORED_ORCA_BLOCKS = ["%MaxCore"] + IGNORED_ORCA_BLOCKS = ["MaxCore", "pal"] SUPPORTED_KEYWORDS = { CalcType.TS: "tsopt", @@ -187,11 +187,19 @@ def handle_main_parameters(self): ).replace("SP ", ""), ) + BLOCK_TEMPLATE = """%{} + {} + end""" + cleaned_blocks = [] - for block in orca_inp.blocks: - block_name = block.split("\n")[0].split()[0] - if block_name not in self.IGNORED_ORCA_BLOCKS: - cleaned_blocks.append(block.replace('"', '\\"')) + for block, content in orca_inp.blocks.items(): + if block not in self.IGNORED_ORCA_BLOCKS: + cleaned_blocks.append( + BLOCK_TEMPLATE.format( + block, + "\n".join([l.replace('"', '\\"') for l in content]).strip(), + ) + ) cleaned_blocks_lines = "\n".join(cleaned_blocks) if cleaned_blocks_lines.strip() != "": diff --git a/ccinput/packages/orca.py b/ccinput/packages/orca.py index 5e23bc9..d8a31a6 100644 --- a/ccinput/packages/orca.py +++ b/ccinput/packages/orca.py @@ -61,11 +61,10 @@ def __init__(self, calc): self.calc = calc self.has_scan = False self.pal = 0 - self.blocks = [] + self.blocks = {} self.command_line = "" self.additional_commands = "" self.xyz_structure = "" - self.block_lines = "" self.input_file = "" self.specifications = {} self.solvation_radii = {} @@ -103,6 +102,12 @@ def clean(self, s): ) return "".join([c for c in s if c in WHITELIST]) + def add_to_block(self, block, lines): + if block in self.blocks: + self.blocks[block] += lines + else: + self.blocks[block] = lines + def handle_specifications(self): _specifications = ( self.clean(self.calc.parameters.specifications).lower().strip() @@ -115,10 +120,7 @@ def handle_specifications(self): while ind < len(sspecs): spec = sspecs[ind] if spec == "--phirshfeld": - HIRSHFELD_BLOCK = """%output - Print[ P_Hirshfeld] 1 - end""" - self.blocks.append(HIRSHFELD_BLOCK) + self.add_to_block("output", ["Print[ P_Hirshfeld] 1"]) elif spec == "--nimages": nimages = sspecs[ind + 1] try: @@ -156,7 +158,7 @@ def handle_command(self): elif self.calc.type == CalcType.TS: self.command_line = "OPTTS " if self.calc.parameters.theory_level != "xtb": - self.blocks.append("%geom\nCalc_Hess true\nend") + self.add_to_block("geom", ["Calc_Hess true"]) elif self.calc.type == CalcType.MO: self.command_line = "SP " struct = clean_xyz(self.calc.xyz) @@ -184,8 +186,9 @@ def handle_command(self): else: raise InvalidParameter("Unimplemented multiplicity") - mo_block = f"""%plots - dim1 45 + self.add_to_block( + "plots", + f"""dim1 45 dim2 45 dim3 45 min1 0 @@ -199,9 +202,10 @@ def handle_command(self): MO("in-LUMO.cube",{n_LUMO},0); MO("in-LUMOA.cube",{n_LUMO1},0); MO("in-LUMOB.cube",{n_LUMO2},0); - end - """ - self.blocks.append(mo_block) + """.split( + "\n" + ), + ) elif self.calc.type == CalcType.FREQ: self.command_line = "FREQ " elif self.calc.type == CalcType.CONSTR_OPT: @@ -220,31 +224,33 @@ def handle_command(self): freeze.append(constr.to_orca()) if len(scans) > 0: - scan_block = """%geom Scan + scan_block = """Scan {} end - end""" - self.blocks.append(scan_block.format("".join(scans).strip())) + """ + self.add_to_block( + "geom", scan_block.format("".join(scans).strip()).split("\n") + ) if len(freeze) > 0: - freeze_block = """%geom Constraints + freeze_block = """Constraints {} end - end""" - self.blocks.append(freeze_block.format("".join(freeze).strip())) + """ + self.add_to_block( + "geom", freeze_block.format("".join(freeze).strip()).split("\n") + ) elif self.calc.type == CalcType.SP: self.command_line = "SP " elif self.calc.type == CalcType.MEP: #### Second structure to handle self.command_line = "NEB " - neb_block = """%neb - product "{}.xyz" - nimages {} - end""" if "nimages" in self.specifications: nimages = self.specifications["nimages"] else: nimages = 8 - self.blocks.append(neb_block.format(self.calc.aux_name, nimages)) + self.add_to_block( + "neb", [f'product "{self.calc.aux_name}.xyz"', f"nimages {nimages}"] + ) method = get_method(self.calc.parameters.method, "orca") if self.calc.parameters.theory_level not in [ @@ -279,10 +285,6 @@ def handle_custom_basis_sets(self): if a not in unique_atoms: unique_atoms.append(a) - BS_TEMPLATE = """%basis - {} - end""" - custom_bs = "" for el, bs_keyword in self.calc.parameters.custom_basis_sets.items(): if el not in unique_atoms: @@ -340,7 +342,7 @@ def handle_custom_basis_sets(self): custom_bs += "end" if custom_bs != "": - self.blocks.append(BS_TEMPLATE.format(custom_bs.strip())) + self.add_to_block("basis", custom_bs.split("\n")) def handle_xyz(self): lines = [i + "\n" for i in clean_xyz(self.calc.xyz).split("\n") if i != ""] @@ -354,12 +356,7 @@ def handle_pal_mem(self): self.pal = self.calc.nproc self.mem_per_core = int(self.calc.mem / self.calc.nproc) - pal_mem_block = f"""%MaxCore {self.mem_per_core} - %pal - nprocs {self.pal} - end""" - - self.blocks.append(pal_mem_block) + self.add_to_block("pal", [f"nprocs {self.pal}"]) def parse_custom_solvation_radii(self): for radius in self.calc.parameters.custom_solvation_radii.split(";"): @@ -404,8 +401,6 @@ def handle_solvation(self): radii_set = self.calc.parameters.solvation_radii custom_radii = self.calc.parameters.custom_solvation_radii - solv_block = "" - if self.calc.parameters.method[:3].lower() == "xtb": self.command_line += f" ALPB({solvent_keyword})" elif model == "smd": @@ -419,18 +414,15 @@ def handle_solvation(self): self.solvation_radii[35] = 2.60 radii_specs = self.get_radii_specs() - solv_block = f"""%cpcm - smd true - SMDsolvent "{solvent_keyword}" - {radii_specs}end""" - self.blocks.append(solv_block) + + self.add_to_block( + "cpcm", ["smd true", f'SMDsolvent "{solvent_keyword}"', radii_specs] + ) elif model == "cpcm": self.command_line += f"CPCM({solvent_keyword}) " radii_specs = self.get_radii_specs() if radii_specs != "": - solv_block = f"""%cpcm - {radii_specs}end""" - self.blocks.append(solv_block) + self.add_to_block("cpcm", [radii_specs]) if radii_set not in ["", "default", "bondi"]: raise UnimplementedError( "As of now, ccinput does not know how to request " @@ -443,7 +435,17 @@ def handle_solvation(self): ) def create_input_file(self): - self.block_lines = "\n".join(self.blocks) + self.block_lines = "" + for name, content in sorted(self.blocks.items(), key=lambda i: i[0]): + self.block_lines += """%{} + {} + end + """.format( + name, "\n".join(content).strip() + ) + + self.block_lines += f"""%MaxCore {self.mem_per_core}""" + cmd = f"{self.command_line} {self.additional_commands}".replace(" ", " ") raw = self.TEMPLATE.format( cmd, diff --git a/ccinput/tests/test_orca.py b/ccinput/tests/test_orca.py index 200230a..37f5f3d 100644 --- a/ccinput/tests/test_orca.py +++ b/ccinput/tests/test_orca.py @@ -20,10 +20,10 @@ def test_sp_SE(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 1000 %pal nprocs 1 end + %MaxCore 1000 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -46,10 +46,10 @@ def test_sp_HF(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -74,14 +74,14 @@ def test_sp_HF_SMD(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -106,14 +106,14 @@ def test_sp_HF_SMD_lowercase(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -139,16 +139,16 @@ def test_sp_HF_SMD18(self): *xyz -1 1 I 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" radius[53] 2.74 radius[35] 2.60 end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -174,16 +174,16 @@ def test_sp_HF_SMD18_lowercase(self): *xyz -1 1 I 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" radius[53] 2.74 radius[35] 2.60 end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -208,14 +208,14 @@ def test_solvation_octanol_smd(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "1-octanol" end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -240,10 +240,10 @@ def test_sp_HF_CPCM(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -268,14 +268,14 @@ def test_solvent_synonym(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -300,10 +300,10 @@ def test_solvation_octanol_cpcm1(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -328,10 +328,10 @@ def test_solvation_octanol_cpcm2(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -370,10 +370,10 @@ def test_sp_DFT(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -397,10 +397,10 @@ def test_sp_DFT_specifications(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -424,10 +424,10 @@ def test_sp_DFT_multiple_specifications(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -451,10 +451,10 @@ def test_sp_DFT_duplicate_specifications(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -478,10 +478,10 @@ def test_sp_MP2(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -505,10 +505,10 @@ def test_sp_MP2_default_aux(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -532,10 +532,10 @@ def test_sp_MP2_override_aux(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -559,10 +559,10 @@ def test_sp_MP2_without_RI(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -586,10 +586,10 @@ def test_sp_DLPNO_CCSDT(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -613,10 +613,10 @@ def test_sp_DLPNO_CCSDT_default_aux(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -640,10 +640,10 @@ def test_sp_DLPNO_CCSDT_default_aux_specifications(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -668,10 +668,10 @@ def test_sp_DLPNO_CCSDT_default_aux_solvation(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -695,10 +695,10 @@ def test_sp_CCSDT(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -720,10 +720,10 @@ def test_opt_SE(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 1000 %pal nprocs 1 end + %MaxCore 1000 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -746,10 +746,10 @@ def test_opt_HF(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -772,10 +772,10 @@ def test_opt_DFT(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -797,10 +797,10 @@ def test_freq_SE(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 1000 %pal nprocs 1 end + %MaxCore 1000 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -823,10 +823,10 @@ def test_freq_HF(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -849,10 +849,10 @@ def test_freq_DFT(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -886,14 +886,15 @@ def test_scan_bond_DFT(self): O 0.62360 0.07990 1.25870 H 0.94410 0.53240 2.04240 * - %geom Scan + %geom + Scan B 0 1 = 9.00, 1.40, 10 end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -925,14 +926,15 @@ def test_scan_bond_DFT_auto(self): O 0.62360 0.07990 1.25870 H 0.94410 0.53240 2.04240 * - %geom Scan + %geom + Scan B 0 1 = 1.07, 1.40, 10 end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -994,14 +996,15 @@ def test_scan_angle_DFT(self): O 0.62360 0.07990 1.25870 H 0.94410 0.53240 2.04240 * - %geom Scan + %geom + Scan A 1 0 2 = 9.00, 90.00, 10 end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1033,14 +1036,15 @@ def test_scan_dihedral_DFT(self): O 0.62360 0.07990 1.25870 H 0.94410 0.53240 2.04240 * - %geom Scan + %geom + Scan D 3 0 4 7 = 9.00, 1.00, 10 end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1086,14 +1090,15 @@ def test_freeze_bond_DFT(self): O 0.62360 0.07990 1.25870 H 0.94410 0.53240 2.04240 * - %geom Constraints + %geom + Constraints { B 0 1 C } end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1125,14 +1130,15 @@ def test_freeze_angle_DFT(self): O 0.62360 0.07990 1.25870 H 0.94410 0.53240 2.04240 * - %geom Constraints + %geom + Constraints { A 1 0 2 C } end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1164,14 +1170,15 @@ def test_freeze_dihedral_DFT(self): O 0.62360 0.07990 1.25870 H 0.94410 0.53240 2.04240 * - %geom Constraints + %geom + Constraints { D 3 0 4 7 C } end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1194,10 +1201,10 @@ def test_nmr_DFT(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1221,10 +1228,10 @@ def test_irrelevant_gen_bs(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1253,10 +1260,10 @@ def test_ts_DFT(self): %geom Calc_Hess true end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1283,10 +1290,10 @@ def test_ts_xtb(self): H 0.59453997172323 -0.48560162159600 0.83949232123172 H 0.66998093862168 -0.58930117433261 -0.87511947469677 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1315,16 +1322,16 @@ def test_ts_DFT_custom_bs(self): H 0.59453997172323 -0.48560162159600 0.83949232123172 H 0.66998093862168 -0.58930117433261 -0.87511947469677 * - %geom - Calc_Hess true - end %basis NewGTO N "Def2-SVP" end end - %MaxCore 125 + %geom + Calc_Hess true + end %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1351,16 +1358,16 @@ def test_ts_DFT_custom_bs_synonym(self): H 0.59453997172323 -0.48560162159600 0.83949232123172 H 0.66998093862168 -0.58930117433261 -0.87511947469677 * - %geom - Calc_Hess true - end %basis NewGTO N "Def2-SVP" end end - %MaxCore 125 + %geom + Calc_Hess true + end %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1410,10 +1417,10 @@ def test_opt_DFT_custom_bs_ecp(self): NewGTO I "Def2-TZVPD" end NewECP I "def2-ECP" end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1464,10 +1471,10 @@ def test_opt_DFT_two_custom_bs_ecp(self): NewECP I "def2-ECP" end NewGTO H "Def2-TZVP" end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1517,10 +1524,10 @@ def test_opt_DFT_custom_bs_ecp_synonym(self): NewGTO I "Def2-TZVPD" end NewECP I "def2-ECP" end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1617,10 +1624,10 @@ def test_opt_DFT_custom_bs_explicit(self): 2 4.3334300 -14.0030500 1 end end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1655,10 +1662,10 @@ def test_NEB(self): product "calc2.xyz" nimages 8 end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1694,11 +1701,10 @@ def test_NEB2(self): product "calc2.xyz" nimages 12 end - %MaxCore 125 %pal nprocs 8 end - + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1734,11 +1740,10 @@ def test_NEB_aux_name(self): product "product.xyz" nimages 12 end - %MaxCore 125 %pal nprocs 8 end - + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1763,10 +1768,10 @@ def test_hirshfeld_pop(self): %output Print[ P_Hirshfeld] 1 end - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1811,6 +1816,9 @@ def test_mo(self): H -7.17360 2.91710 -4.11310 H -5.61500 4.53870 -5.19320 * + %pal + nprocs 8 + end %plots dim1 45 dim2 45 @@ -1827,11 +1835,7 @@ def test_mo(self): MO("in-LUMOA.cube",68,0); MO("in-LUMOB.cube",69,0); end - %MaxCore 125 - %pal - nprocs 8 - end """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1854,10 +1858,10 @@ def test_nproc(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 1000 %pal nprocs 1 end + %MaxCore 1000 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1879,10 +1883,10 @@ def test_opt_freq(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 1000 %pal nprocs 1 end + %MaxCore 1000 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1906,10 +1910,10 @@ def test_d3(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1933,10 +1937,10 @@ def test_d3bj(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 %pal nprocs 8 end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -1978,15 +1982,15 @@ def test_SMD_custom_radius(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" radius[17] 1.00 end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -2012,16 +2016,16 @@ def test_SMD_custom_radii(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" radius[17] 1.00 radius[35] 2.00 end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -2048,10 +2052,6 @@ def test_SMD_custom_radius_and_SMD18(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" @@ -2059,6 +2059,10 @@ def test_SMD_custom_radius_and_SMD18(self): radius[53] 2.74 radius[35] 2.60 end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -2085,16 +2089,16 @@ def test_SMD_custom_radius_and_SMD18_clash(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm smd true SMDsolvent "chloroform" radius[53] 3.00 radius[35] 2.60 end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -2120,13 +2124,13 @@ def test_CPCM_custom_radius(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm radius[17] 1.00 end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file)) @@ -2152,14 +2156,14 @@ def test_CPCM_custom_radii(self): *xyz -1 1 Cl 0.0 0.0 0.0 * - %MaxCore 125 - %pal - nprocs 8 - end %cpcm radius[17] 1.00 radius[35] 2.00 end + %pal + nprocs 8 + end + %MaxCore 125 """ self.assertTrue(self.is_equivalent(REF, inp.input_file))