├── BSSE ├── BSSECorrection.cmp └── BSSEGradient.cmp ├── EnergyExtrapolation ├── extrapolate_CPS_CBS.cmp ├── extrapolate_HFLD_CBS.cmp ├── extrapolate_PNO.cmp ├── extrapolate_Peterson.cmp ├── extrapolate_Xantheas_Feller.cmp ├── extrapolate_ep1.cmp ├── extrapolate_ep2.cmp └── extrapolate_ep3.cmp ├── GeneralChemistry ├── Umbrella.cmp └── wB97M2.cmp ├── GeometryOptimization ├── BSSEOptimization.cmp ├── extrapolatedGeomOptimization.cmp └── iterativeOptimization.cmp ├── HighAccuracyThermochemistry ├── G2_MP2.cmp ├── G2_MP2_SV.cmp ├── G2_MP2_SVP.cmp ├── ccCA_CBS_1.cmp ├── ccCA_CBS_2.cmp ├── ccCA_DZ_QCISD_T.cmp ├── ccCA_TZ_QCISD_T.cmp ├── ccCA_aTZ_QCISD_T.cmp ├── lw1x-jun.cmp ├── lw1x-no-diffuse-on-c.cmp ├── lw1x-p34-jun.cmp ├── lw1x-p34.cmp └── lw1x.cmp ├── IntermolecularInteractions └── DLPNO-CC-Energy.cmp ├── LICENSE ├── Polarizabilities ├── numerical │ └── numericalPolarizability.cmp ├── quad_polarizabilities │ └── numerical │ │ └── numerical_quadquad_polarizability.cmp └── semiNumerical │ └── semiNumericalPolarizability.cmp ├── PropertyExtrapolation ├── dipoleExtrapolationEP1.cmp ├── gradientExtrapolation.cmp └── polarizabilityExtrapolationEP1.cmp ├── README.md ├── Simple ├── helloWorld │ └── helloWorld.inp └── replaceNewJob │ └── replaceNewJob.inp ├── Solvation ├── dft_dipole_moment_solvent_induction.cmp └── dft_solvation_energy.cmp ├── Spectroscopy ├── AILFT_1shell.cmp ├── AILFT_2shell.cmp ├── CASCI_nevpts_xas_xmcd.cmp ├── mrci_xas.cmp └── mreom_xas.cmp └── UserContributed └── XYG3TypeDoubleHybrids ├── test.inp ├── xdh.cmp └── xdh_scs.cmp /BSSE/BSSECorrection.cmp: -------------------------------------------------------------------------------- 1 | #---------------------------------------------------------- 2 | # Author :Dimitrios G. Liakos 3 | # Date :May of 2024 4 | # 5 | # This is a script to perform BSSE corrected calculations 6 | # once the geometry, with one fragment as ghost atoms, is 7 | # provided 8 | # 9 | # There are two main options: 10 | # Option 1: 'DoCorrection'. 11 | # In case this is false only three single point 12 | # calculations are needed: 13 | # a. FragmentA (with ghost atoms) 14 | # b. FragmentB (with ghost atoms) 15 | # c. Total (whole dimer) 16 | # in case we need also the correction then we 17 | # perform two more calculations: 18 | # d. monomerA (no ghost atoms) 19 | # e. monomerB (no ghost atoms) 20 | # 21 | # Option 2: 'DoOptimization' 22 | # In case this set to true (default: false) the 23 | # geometry of the monomer will be optimized 24 | # 25 | # The script performs the following steps: 26 | # 27 | # STEP1: Perform a calculation with the given 28 | # input. This provides the energy 'enFragmentA'. 29 | # 30 | # STEP2: Read the geometry of step1 to create the rest of 31 | # neccesary xyz files. For this we use the command 32 | # 'CreateBSSE'. 33 | # 34 | # STEP3: Perform the rest of the calculations (depending 35 | # on the options) and read the corresponding energies. 36 | # 37 | # STEP4. Print the final results. 38 | # 39 | # NOTE 1: The xyz files that 'createBSSE' command creates 40 | # contain the geometries in BOHRS! 41 | # 42 | # NOTE 2: If the method is changed make sure you also adjust 43 | # the name of the property you read from property file 44 | # (default: SCF_Energy") 45 | # 46 | # NOTE 3: Charge and multiplicity should also be adjusted 47 | # default (0 and 1) 48 | # 49 | # NOTE 4: The initial structure (default 01.xyz) should containt at least one 50 | # Ghost atom (':' after the symbol of the element) 51 | # --------------------------------------------------------- 52 | # 53 | # ---------- Variables to change (e.g. through 'with') ------------------------------------# 54 | Variable molecule = "01.xyz"; 55 | Variable method = "BP86"; 56 | Variable basis = " "; 57 | Variable restOfInput = ""; 58 | Variable charge = 0; 59 | Variable mult = 1; 60 | Variable myPropName = "SCF_Energy"; 61 | variable myFilename = "compoundBSSE"; 62 | Variable DoCorrection = true; 63 | Variable DoOptimization = true; 64 | # 65 | # ----------------------- Rest of the variables --------------------------------- 66 | Geometry monomerA; 67 | Variable enFragA, enFragB, enTotal; 68 | Variable DE, DENoGhost, DECorrection; 69 | Variable enMonomerA = 0.0; 70 | Variable enMonomerB = 0.0; 71 | Variable res = -1; 72 | Variable optimization; 73 | Variable HartreeToKcal = 627.5096080305927; 74 | 75 | 76 | if (DoOptimization ) then 77 | optimization = "opt"; 78 | else 79 | optimization = " "; 80 | endif 81 | 82 | # -------------------------------------- 83 | # Calculation for Fragment A 84 | # -------------------------------------- 85 | New_Step 86 | !&{method} &{basis} &{restOfInput} 87 | *xyzfile &{charge} &{mult} &{Molecule} 88 | Step_End 89 | res = enFragA.readProperty(propertyName = myPropName); 90 | 91 | # ------------------------------------- 92 | # Read the geometry of monomer A 93 | # ------------------------------------- 94 | monomerA.Read(); 95 | 96 | # ------------------------------------- 97 | # Create the missing xyz files 98 | # ------------------------------------- 99 | monomerA.CreateBSSE(filename=myFilename); 100 | 101 | # ------------------------------------- 102 | # If we need the correction do MonomerA 103 | # ------------------------------------- 104 | if (DoCorrection) then 105 | New_Step 106 | !&{method} &{basis} &{restOfInput} &{optimization} Bohrs 107 | *xyzFile &{charge} &{mult} &{myFilename}_MonomerA.xyz 108 | Step_End 109 | res = enMonomerA.readProperty(propertyName = myPropName); 110 | endIf 111 | 112 | # ------------------------------------- 113 | # Calculation of Frament B 114 | # ------------------------------------- 115 | New_Step 116 | !&{method} &{basis} &{restOfInput} Bohrs 117 | *xyzFile &{charge} &{mult} &{myFilename}_FragmentB.xyz 118 | Step_End 119 | res = enFragB.readProperty(propertyName = myPropName); 120 | 121 | # ------------------------------------- 122 | # If we need the correction do MonomerB 123 | # ------------------------------------- 124 | if (DoCorrection) then 125 | New_Step 126 | !&{method} &{basis} &{restOfInput} &{optimization} Bohrs 127 | *xyzFile &{charge} &{mult} &{myFilename}_MonomerB.xyz 128 | Step_End 129 | res = enMonomerB.readProperty(propertyName = myPropName); 130 | endIf 131 | 132 | # ------------------------------------- 133 | # Calculation of Dimer 134 | # ------------------------------------- 135 | New_Step 136 | !&{method} &{basis} &{restOfInput} Bohrs 137 | *xyzFile &{charge} &{mult} &{myFilename}_Total.xyz 138 | Step_End 139 | res = enTotal.readProperty(propertyName = myPropName); 140 | 141 | DE = enTotal - enFragA - enFragB; 142 | # ------------------------------------- 143 | # Do some printing 144 | # ------------------------------------- 145 | print("\n\n"); 146 | print(" ------------------------------------\n"); 147 | print(" Compound BSSE Corrected results\n"); 148 | print(" ------------------------------------\n"); 149 | print("Method : %s\n",method); 150 | print("DoCorrection : %s\n",DoCorrection.GetString()); 151 | print("DoOptimization : %s\n",DoOptimization.GetString()); 152 | print("Energy of Fragment A (with ghost basis set) : %.8lf\n", enFragA); 153 | if (DoCorrection) then 154 | print("Energy of Monomer A (no ghost basis set) : %.8lf\n", enMonomerA); 155 | endif 156 | print("Energy of Fragment B (with ghost basis set) : %.8lf\n", enFragB); 157 | if (DoCorrection) then 158 | print("Energy of Monomer B (no ghost basis set) : %.8lf\n", enMonomerB); 159 | endif 160 | print("Energy of Dimer : %.8lf\n", enTotal); 161 | print("DeltaE (with ghost basis sets) : %.8lf (%.5lf kcal/mol)\n", DE, DE*HartreeToKcal); 162 | if (DoCorrection) then 163 | DENoGhost = enTotal - enMonomerA - enMonomerB; 164 | print( "DeltaE (no ghost basis sets) : %.8lf (%.5lf kcal/mol)\n", DENoGhost, DENoGhost*HartreeToKcal); 165 | print( "DeltaECorrection : %.8lf (%.5lf kcal/mol)\n", DE-DENoGhost, (DE-DENoGhost)*HartreeToKcal); 166 | EndIf 167 | End 168 | -------------------------------------------------------------------------------- /EnergyExtrapolation/extrapolate_HFLD_CBS.cmp: -------------------------------------------------------------------------------- 1 | # Name: Extrapolate-HFLD-CBS 2 | # 3 | # *************************************** DESCRIPTION **************************************************************** 4 | # This script is for CBS(3/4) extrapolation of closed-shell [1] and open-shell [2] HFLD energies computed with TightPNO 5 | # and TCutPNO = 1e-8. This computational level was shown as the gold standard [2] of HFLD computations. 6 | # 7 | # CBS(X/Y) denotes two-point CBS extrapolation of the HFLD energies obtained with two different basis sets of 8 | # consecutive cardinal numbers, i.e., X and Y, where Y = X +1. When the functional form of the reference [3] and 9 | # correlation [4] energies are taken as 10 | # 11 | # E_SCF_X = E_SCF_CBS + A*exp(-alpha*sqrt(X)) 12 | # E(corr)_X = E(corr)_CBS + B*X^(-beta) 13 | # 14 | # one obtains CBS-extrapolated reference (E_SCF_CBS) and correlation (E(corr)_CBS) energies in a compact form [5] as 15 | # 16 | # E_SCF_CBS = E_SCF_X + F_0*(E_SCF_Y - E_SCF_X) 17 | # E(corr)_CBS = E(corr)_X + F_corr*(E(corr)_Y - E(corr)_X) 18 | # 19 | # where 20 | # F_0 = exp(alpha*sqrt(Y)) / [exp(alpha*sqrt(Y)) - exp(alpha*sqrt(X))] 21 | # F_corr = Y^(beta) / Y^(beta) - X^(beta) 22 | # 23 | # The alpha and beta exponents [6] and the corresponding F values are tabulated below for the conveinence 24 | # for (aug-)cc-pVnZ type of basis functions. 25 | # 26 | # Reference Energy Correlation Energy 27 | # alpha F_0 beta F_corr 28 | # ---------------------------------------------- 29 | # (aug-)cc-pVnZ CBS(2/3) 4.42 1.325216 2.46 1.584336 30 | # CBS(3/4) 5.46 1.301304 3.05 1.711889 31 | # 32 | # 33 | # Herein we perform CBS(3/4) extrapolation for both HF and correlation (London dispersion) energies 34 | # with aug-cc-pVXZ (X = T and Q). The CBS extrapolated HFLD energy is then equal to 35 | # 36 | # E_Total_Total = E_SCF_CBS + E(corr)_CBS 37 | # 38 | # Note that there are several choices for the reference part of the open-shell HFLD. By default, UHF energy 39 | # is considered as the reference in ORCA, as discussed in [2]. 40 | # 41 | # 42 | # *************************************** LITERATURE **************************************************************** 43 | # 44 | #[1] Altun, A.; Neese, F.; Bistoni, F.JCTC, 2019, 15, 5894-5907 45 | #[2] Altun, A.; Neese, F.; Bistoni, F. JCTC, 2022, 18, 2292-2307 46 | #[3] Zhong, S.; Barnes, E.C.; Petersson, G.A. J. Chem. Phys. 2008, 129, 184116 47 | #[4] Helgaker, T.; Klopper, W.; Koch, H. J. Chem. Phys. 1997, 106, 9639 48 | #[5] Altun, A.; Neese, F.; Bistoni, F. JCTC, 2020, 16, 6142-6149 49 | #[6] Neese, F.; Valeev, E.F. JCTC, 2011, 7, 33-43 50 | # 51 | # ****************************************** METHOD *************************************************************** 52 | # 53 | # 54 | #Define some variables 55 | Variable Small_BS="aug-cc-pVTZ"; #The smaller basis set used in the extrapolation 56 | Variable Large_BS="aug-cc-pVQZ"; #The larger basis set used in the extrapolation 57 | Variable CBS="CBS(3/4)"; #CBS-extrapolated result 58 | Variable X, Y; #Cardinal number of basis sets 59 | variable F_0, F_corr; #The constants used in CBS extrapolation (see the table in the DESCRIPTION section) 60 | Variable E_SCF_X, E_SCF_Y; #The reference HF energies 61 | Variable E_LD_X; #The dispersion energy for basis set with X 62 | Variable E_LD_Y; #The dispersion energy for basis set with Y 63 | Variable E_Total_X; #Total HFLD energy for basis set with X 64 | Variable E_Total_Y; #Total HFLD energy for basis set with Y 65 | Variable E_SCF_CBS; #The CBS extrapolated SCF energy 66 | Variable E_LD_CBS; #The CBS extrapolated dispersion energy 67 | Variable E_Total_CBS; #The CBS extrapolated HFLD energy 68 | # 69 | # 70 | # The parameters for CBS(3/4) with aug-cc-pVnZ (n = T and Q) 71 | X = 3; #Triple zeta 72 | Y = 4; #Quadruple zeta 73 | F_0 = 1.301304; 74 | F_corr = 1.711889; 75 | # 76 | #------------------------------------------------------------------------------ 77 | #Calculation with the small basis set 78 | #(Calculation 1) 79 | New_Step 80 | !HFLD aug-cc-pVTZ RIJK aug-cc-pVTZ/JK aug-cc-pVQZ/C VeryTightSCF TightPNO 81 | % MDCI TCutPNO 1e-8 printlevel 3 END 82 | % BASIS auxjk "autoaux" auxc "autoaux" autoauxlmax true END 83 | # Here autoaux module is used. If wanted to use the standard "/C" basis specified 84 | # in the simple input line instead, take the %BASIS block in the comment for both 85 | # caculations. 86 | Step_End 87 | #Read the values 88 | Read E_SCF_X = SCF_ENERGY[1]; 89 | Read E_Total_X = JOB_INFO_TOTAL_EN[1]; 90 | E_LD_X = E_Total_X - E_SCF_X; 91 | # 92 | #------------------------------------------------------------------------------ 93 | #Calculation with the large basis set 94 | #(Calculation 2) 95 | New_Step 96 | !HFLD aug-cc-pVQZ RIJK aug-cc-pVQZ/JK aug-cc-pV5Z/C VeryTightSCF TightPNO 97 | % MDCI TCutPNO 1e-8 printlevel 3 END 98 | % BASIS auxjk "autoaux" auxc "autoaux" autoauxlmax true END 99 | Step_End 100 | #Read the values 101 | Read E_SCF_Y = SCF_ENERGY[2]; 102 | Read E_Total_Y = JOB_INFO_TOTAL_EN[2]; 103 | E_LD_Y = E_Total_Y - E_SCF_Y; 104 | # 105 | #------------------------------------------------------------------------------ 106 | # 107 | #CBS extrapolation of the reference energy 108 | E_SCF_CBS = E_SCF_X + F_0*(E_SCF_Y - E_SCF_X); 109 | # 110 | #CBS extrapolation of the dispersion energy 111 | E_LD_CBS = E_LD_X + F_corr*(E_LD_Y - E_LD_X); 112 | # 113 | #CBS extrapolated total energy 114 | E_Total_CBS = E_SCF_CBS + E_LD_CBS; 115 | # 116 | # 117 | print("\n\n================================================================================\n"); 118 | print("=========================== SUMMARY OF ENERGIES (Eh) ===========================\n"); 119 | print("================================================================================\n\n"); 120 | print("%33s %21s %21s \n", Small_BS, Large_BS, CBS); 121 | print(" ----------- ----------- -----------\n"); 122 | print("SCF Energy %22lf %21lf %21lf \n", E_SCF_X, E_SCF_Y, E_SCF_CBS); 123 | print("Dispersion Energy %15lf %21lf %21lf \n", E_LD_X, E_LD_Y, E_LD_CBS); 124 | print("HFLD Energy %21lf %21lf %21lf \n\n", E_Total_X, E_Total_Y, E_Total_CBS); 125 | # 126 | # 127 | #Final end 128 | End 129 | # 130 | -------------------------------------------------------------------------------- /EnergyExtrapolation/extrapolate_PNO.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Ahmet Altun 2 | # 3 | # *************************************** DESCRIPTION ******************************************************** 4 | # This script is for automating two point "Complete PNO Space (CPS)" extrapolation [1] of 5 | # DLPNO-CCSD(T)/TightPNO energies. 6 | # 7 | # The CPS extrapolation is applied on correlation energies from two separate calculations performed 8 | # exactly the same settings except TCutPNO values, set to A*10^-X and A*10^-Y, where A is a common 9 | # prefactor in both TCutPNO values, and Y = X + 1. The two-point CPS(X/Y) extrapolation formula 10 | # on top of the corresponding correlation energies is then as follows: 11 | # 12 | # E(CPS) =E(X)+F*(E(Y)-E(X)) 13 | # 14 | # where E(X) and E(Y) are the correlation energies obtaind with the loose and tight TCutPNO thresholds, 15 | # respectively (e.g., TCutPNO = 3e-6 and TCutPNO= 3e-7, respectively). E(CPS) is the CPS(X/Y)-extrapolated 16 | # correlation energy. 17 | # 18 | # Optimal value of F was found as 1.5 on a wide range of diverse interactions in the GMTKN55 superset [1], 19 | # and thus it should NOT be changed. 20 | 21 | # With the combination of 1e-5/1e-6, i.e., with CPS(5/6), the paper reports MAE between 0.2 and 0.3 kcal/mol 22 | # for relative energies on a variety of datasets of GMTKN55 superset. 23 | # 24 | # The combination 1e-6/1e-7, i.e., CPS(6/7), provides MAEs between 0.08 to 0.27 kcal/mol for the same set of 25 | # molecules. 26 | # 27 | # The CPS scheme eliminates largely the system size depenence of the correlation energies, and thus provides 28 | # accurate results also for very large molecular systems [2]. 29 | # 30 | # *************************************** LITERATURE ********************************************************* 31 | # 32 | # [1] A. Altun, F. Neese, G. Bistoni, JCTC 2020, 16, 10, 6142–6149 33 | # [2] A. Altun, S. Ghoush, C. Riplinger F. Neese, G. Bistoni, JPC A 2021, 125, 9932–9939 34 | # 35 | # *************************************** DETAILS ********************************************************* 36 | # 37 | # In Step 1, a calculation with a loose TCutPNO value is performed. 38 | # In Step 2, a calculation with a tight TCutPNO value is performed. 39 | # 40 | # Then, the results from Steps 1 and 2 are used to get the extrapolated correlation energy. 41 | # Finally, a summary table of unextrapolated and extrapolated energies are printed out in the output file. 42 | # 43 | # ****************************************** NOTES ******************************************************* 44 | # 45 | # NOTE 1: One can use different TCutPNO values and basis set than those used in this script. 46 | # NOTE 2: The exponents of TCutPNO values must be consecutive (e.g. 6/7, 7/8, etc.). 47 | # Here we use 6 and 7. 48 | # NOTE 3: Here we use the cc-pVTZ and the corresponding "/C" bases. 49 | # NOTE 4: To use autoaux module instead of the "/C" basis specified in the simple input line, take the lines 50 | # involving the BASIS block out of the comment for both Calculations 1 and 2. 51 | # NOTE 5: Do not change the F value. 52 | # 53 | # ****************************************** METHOD ******************************************************* 54 | # 55 | # --------------------------------------------------------------- 56 | # -------------------- Variables ------------------------------ 57 | # ---------- Variables that could be adjusted using 'with'----- 58 | variable molecule; 59 | variable charge = 0; 60 | variable mult = 1; 61 | variable method = "DLPNO-CCSD(T1)"; 62 | variable basis = "cc-pVTZ"; 63 | variable restOfInput = "TightPNO cc-pVQZ/C VeryTightSCF"; 64 | variable loose_TCutPNO = "1e-6"; # Loose TCutPNO value 65 | variable tight_TCutPNO = "1e-7"; # Tight TCutPNO value 66 | variable F = 1.5; # The mulitplier 67 | # ----------------- Rest of variables -------------------------- 68 | variable E_HF; # The SCF energy 69 | variable ECORR_X, ECORR_Y, ECORR_CPS; # The correlation energies 70 | variable ETOT_X, ETOT_Y, ETOT_CPS; # The total energies 71 | # 72 | # 73 | #-------------------------------------------------------------------------------------------------------------- 74 | # (Calculation 1) 75 | # The calculation with the loose TCutPNO 76 | #-------------------------------------------------------------------------------------------------------------- 77 | New_Step 78 | !&{method} &{basis} &{restOfInput} 79 | *xyzfile &{charge} &{mult} &{molecule} 80 | %MDCI 81 | TCutPNO &{loose_TCutPNO} 82 | End 83 | # % BASIS auxc "autoaux" autoauxlmax true END 84 | Step_End 85 | E_HF.ReadProperty(propertyName="MDCI_REF_ENERGY"); 86 | ECORR_X.ReadProperty(propertyName="MDCI_CORR_ENERGY"); 87 | ETOT_X = E_HF + ECORR_X; 88 | 89 | #--------------------------------------------------------------------------------------------------------------- 90 | # (Calculation 2) 91 | # The calculation with the tight TCutPNO 92 | #-------------------------------------------------------------------------------------------------------------- 93 | New_Step 94 | !&{method} &{basis} &{restOfInput} 95 | %MDCI 96 | TCutPNO &{tight_TCutPNO} 97 | End 98 | # % BASIS auxc "autoaux" autoauxlmax true END 99 | Step_End 100 | ECORR_Y.readProperty(propertyName="MDCI_CORR_ENERGY"); 101 | ETOT_Y = E_HF + ECORR_Y; 102 | 103 | #--------------------------------------------------------------------------------------------------------------- 104 | ECORR_CPS = ECORR_X + 1.5*(ECORR_Y - ECORR_X); 105 | ETOT_CPS = E_HF + ECORR_CPS; 106 | # 107 | print("\n\n================================================================================\n"); 108 | print("=========================== SUMMARY OF ENERGIES (Eh) ===========================\n"); 109 | print("================================================================================\n\n"); 110 | print(" Molecule : %s\n", molecule); 111 | print(" Charge : %-18d\n", charge); 112 | print(" Mult : %-18d\n", mult); 113 | print(" Method : %s\n", method); 114 | print(" Basis set : %s\n", basis); 115 | print(" Rest of input : %s\n", restOfInput); 116 | print(" SCF Energy : %-22.8lf\n", E_HF); 117 | print(" \n"); 118 | print(" Loose TCutPNO Tight TCutPNO CPS\n"); 119 | print(" ------------- ------------- -------------\n"); 120 | print("Correlation Energy %14.8lf %21.8lf %21.8lf \n", ECORR_X, ECORR_Y, ECORR_CPS); 121 | print("Total Energy %20.8lf %21.8lf %21.8lf \n", ETOT_X, ETOT_Y, ETOT_CPS); 122 | # 123 | End 124 | # 125 | -------------------------------------------------------------------------------- /EnergyExtrapolation/extrapolate_Peterson.cmp: -------------------------------------------------------------------------------- 1 | # Author: Dimitrios G. Liakos and Frank Neese 2 | # Date : June of 2024 3 | # 4 | # This is a three-point energy extrapolation scheme for the total 5 | # energy based on: 6 | # 7 | # 'Benchmark calculations with correlated molecular wave functions. 8 | # IV. The classical barrier height of the H+H2-4-H2+H reaction', 9 | # Kirk A. Peterson , David E. Woon, and Thorn H. Dunning, Jr. 10 | # J. Chem. Phys. 100 (10), 15 May 1994 11 | # 12 | # that uses the energy function: 13 | # 14 | # E(X) = E(CBS)+ Bexp(-(x-1))+Cexp(-(x-1)^2) 15 | # 16 | # for the total energy. 17 | # Using this form and DZ,TZ and QZ basis sets the E(CBS) is: 18 | # 19 | # E(CBS)= [eE(TZ)-E(DZ)+D(-exp(-1)E(TZ)+E(QZ)) ]/[exp(-1)-D(exp(-1)-1)] 20 | # 21 | # with D= [exp(-1)-exp(-5)]/[exp(-9)-exp(-3)] 22 | # 23 | # In the current implementation we perform the following steps: 24 | # 25 | # Step 1: Perform a calculation with basis set with cardinal number X (here aug-cc-pVDZ) 26 | # 27 | # Step 2: Perform a calculation with basis set with cardinal number X+1 (here aug-cc-pVTZ) 28 | # 29 | # Step 3: Perform a calculation with basis set with cardinal number X+2 (here aug-cc-pVQZ) 30 | # 31 | # Step 4: combine the energies to evaluate the CBS energy (E_CBS) 32 | # 33 | # Step 5: Print the result 34 | # 35 | # 36 | # NOTE 1: No empirical parameter is used here so one can change the method. Here we use 37 | # the DLPNO-CCSD(T) method, because of it's efficiency/accuracy ratio. 38 | # 39 | # NOTE 2: It worth mentioning that in the original publication Peterson et al. 40 | # used mainly multireference MRCI and Full-CI methods so the protocol could 41 | # be also appropriate for this kind of calculations 42 | # 43 | # 44 | # --------------------------------------------------------------- 45 | # -------------------- Variables ------------------------------ 46 | # ---------- Variables that could be adjusted using 'with'----- 47 | Variable molecule; 48 | Variable charge = 0; 49 | Variable mult = 1; 50 | Variable method = "DLPNO-CCSD(T1)"; 51 | Variable myProperty ="MDCI_Total_Energy"; 52 | # ----------------- Rest of variables -------------------------- 53 | variable X, Y, Z; # The cardinal numbers 54 | variable E_DZ, E_TZ, E_QZ; # The energies 55 | variable D; # Useful intermediate 56 | variable E_CBS; # The CBS energy 57 | 58 | X = 2; 59 | # --------------------------------------------------------------- 60 | # (Calculation 1) 61 | # Double zeta calculation 62 | # --------------------------------------------------------------- 63 | New_Step 64 | !&{method} aug-cc-pVDZ aug-cc-pVDZ/C VeryTightSCF 65 | *xyzfile &{charge} &{mult} &{molecule} 66 | Step_End 67 | E_DZ.readProperty(propertyName=myProperty); 68 | 69 | # --------------------------------------------------------------- 70 | # (Calculation 2) 71 | # Triple zeta calculation 72 | # --------------------------------------------------------------- 73 | New_Step 74 | !&{method} aug-cc-pVTZ aug-cc-pVTZ/C VeryTightSCF 75 | Step_End 76 | E_TZ.readProperty(propertyName=myProperty); 77 | 78 | # --------------------------------------------------------------- 79 | # (Calculation 3) 80 | # Quadruple zeta calculation 81 | # --------------------------------------------------------------- 82 | New_Step 83 | !&{method} aug-cc-pVQZ aug-cc-pVQZ/C VeryTightSCF 84 | Step_End 85 | E_QZ.readProperty(propertyName=myProperty); 86 | 87 | # --------------------------------------------------------------- 88 | # Perform the extrapolation 89 | # --------------------------------------------------------------- 90 | D = (exp(-(X-1)^2)-exp(-X^2+1))/(exp(-(X+1)^2)-exp(-X^2-1)); 91 | E_CBS = (e*E_TZ-E_DZ + D*(-exp(-1)*E_TZ+E_QZ))/((e-1)-D*(exp(-1)-1)); 92 | 93 | print("\n\n-------------------------------------------------------\n"); 94 | print(" extrapolation scheme by Kirk A. Peterson et al. \n"); 95 | print(" Kirk A. Peterson , David E. Woon, and Thorn H. Dunning, Jr.\n"); 96 | print(" J. Chem. Phys. 100 (10), (1994)\n"); 97 | print(" Molecule : %s\n", molecule); 98 | print(" Charge : %18d\n", charge); 99 | print(" Mult : %18d\n", mult); 100 | print(" Method : %s\n", method); 101 | print(" E(aug-cc-pVDZ) : %18.8lf\n", E_DZ); 102 | print(" E(aug-cc-pVTZ) : %18.8lf\n", E_TZ); 103 | print(" E(aug-cc-pVQZ) : %18.8lf\n", E_QZ); 104 | print(" CBS Energy : %18.8lf\n", E_CBS); 105 | print("-------------------------------------------------------\n"); 106 | EndRun 107 | -------------------------------------------------------------------------------- /EnergyExtrapolation/extrapolate_Xantheas_Feller.cmp: -------------------------------------------------------------------------------- 1 | # Author : Dimitrios G. Liakos and Frank Neese 2 | # Date : June of 2024 3 | # 4 | # This is a three-point extrapolation scheme to the complete basis set 5 | # limit for the total electronic energy, based on: 6 | # 7 | # 'Theoretical Estimate of the Enthalpy of Formation of HSO and 8 | # the HSO-SOH Isomerization Energy' 9 | # 10 | # Sotiris S. Xantheas’ and Thom H. Dunning, Jr, 11 | # J . Phys. Chem. 1993, 97, 18-19. 12 | # 13 | # Almost at the same time also this publication used the same extrapolation protocol: 14 | # 15 | # 'The use of systematic sequences of wave functions for estimating 16 | # the complete basis set, full configuration interaction limit in water' 17 | # 18 | # David Feller, 19 | # J. Chem. Phys. 1993, 98, 7059-7071 20 | # 21 | # The funtion that describes the convergence of the energy is used is: 22 | # 23 | # E(X)=E(CBS)+Bexp(-CX) 24 | # 25 | # And using three basis sets with cardinal numbers X, X+1 and X+2 the final 26 | # equation becomes: 27 | # 28 | # E(CBS}=[E(X+2)E(X)-E(X+1)E(X+1)]/[E(X+2)+E(X)-2E(X+1)] 29 | # 30 | # In the current implementation we perform the following steps: 31 | # 32 | # Step 1: Perform a calculation with basis set with cardinal number X (here aug-cc-pVDZ) 33 | # 34 | # Step 2: Perform a calculation with basis set with cardinal number X+1 (here aug-cc-pVTZ) 35 | # 36 | # Step 3: Perform a calculation with basis set with cardinal number X+2 (here aug-cc-pVQZ) 37 | # 38 | # Step 4: combine the energies to evaluate the CBS energy (E_CBS) 39 | # 40 | # Step 5: Print the result 41 | # 42 | # 43 | # 44 | # NOTE 1: No empirical parameter is used here so one can change the method. Here we use 45 | # the DLPNO-CCSD(T1) method, because of its accuracy/efficiency ratio 46 | # 47 | # 48 | # --------------------------------------------------------------- 49 | # -------------------- Variables ------------------------------ 50 | # ---------- Variables that could be adjusted using 'with'----- 51 | Variable molecule; 52 | Variable charge = 0; 53 | Variable mult = 1; 54 | Variable method = "DLPNO-CCSD(T1)"; 55 | Variable myProperty = "MDCI_Total_Energy"; 56 | # ----------------- Rest of variables -------------------------- 57 | variable E_DZ, E_TZ, E_QZ; # The energies 58 | variable E_CBS; # The CBS energy 59 | 60 | # --------------------------------------------------------------- 61 | # (Calculation 1) 62 | # Double zeta calculation 63 | # --------------------------------------------------------------- 64 | New_Step 65 | !&{method} aug-cc-pVDZ aug-cc-pVDZ/C VeryTightSCF 66 | *xyzfile &{charge} &{mult} &{molecule} 67 | Step_End 68 | E_DZ.readProperty(propertyName=myProperty); 69 | 70 | # --------------------------------------------------------------- 71 | # (Calculation 2) 72 | # Triple zeta calculation 73 | # --------------------------------------------------------------- 74 | New_Step 75 | !&{method} aug-cc-pVTZ aug-cc-pVTZ/C VeryTightSCF 76 | Step_End 77 | E_TZ.readProperty(propertyName=myProperty); 78 | 79 | # --------------------------------------------------------------- 80 | # (Calculation 3) 81 | # Quadruple zeta calculation 82 | # --------------------------------------------------------------- 83 | New_Step 84 | !&{method} aug-cc-pVQZ aug-cc-pVQZ/C VeryTightSCF 85 | Step_End 86 | E_QZ.readProperty(propertyName=myProperty); 87 | 88 | # --------------------------------------------------------------- 89 | # Perform the extrapolation 90 | # --------------------------------------------------------------- 91 | E_CBS = (E_QZ*E_DZ-E_TZ*E_TZ)/(E_QZ+E_DZ-2*E_TZ); 92 | 93 | print("\n\n-------------------------------------------------------\n"); 94 | print(" extrapolation scheme for total energies \n"); 95 | print(" Sotiris S. Xantheas’ and Thom H. Dunning, Jr,\n"); 96 | print(" J . Phys. Chem. 1993, 97, 18-19.\n"); 97 | print(" David Feller\n"); 98 | print(" J. Chem. Phys. 1993, 98, 7059-7071\n"); 99 | print(" Molecule : %s\n", molecule); 100 | print(" Charge : %-18d\n", charge); 101 | print(" Mult : %-18d\n", mult); 102 | print(" Method : %s\n", method); 103 | print(" E(aug-cc-pVDZ) : %-18.8lf\n", E_DZ); 104 | print(" E(aug-cc-pVTZ) : %-18.8lf\n", E_TZ); 105 | print(" E(aug-cc-pVQZ) : %-18.8lf\n", E_QZ); 106 | print(" CBS Energy : %-18.8lf\n", E_CBS); 107 | print("-------------------------------------------------------\n"); 108 | 109 | EndRun 110 | -------------------------------------------------------------------------------- /EnergyExtrapolation/extrapolate_ep1.cmp: -------------------------------------------------------------------------------- 1 | # Author: Dimitrios Liakos 2 | # Date : May of 2024 3 | # 4 | # 5 | # This protocol estimates the complete basis limit (CBS) extrapolated electronic energy. 6 | # It extrapolates separately the SCF part and the correlation part. 7 | # For the correlation part by default the script uses single reference methods 8 | # (e.g. DLPNO-CCSD, CCSD(T), CEPA ...etc.). 9 | # 10 | # 11 | # A description of the notation we use here : J. Phys. Chem. A 2012, 116, 19, 4801-4816 12 | # The exponents used for the extrapolations : J. Chem. Theory Comput., 7, 33-43 (2011) 13 | # Original formulation of the SCF extrapolation : J. Chem. Phys. 2008, 129, 184116 14 | # Original formulation of the correlation extrapolation : J. Chem. Phys. 1997, 106, 9639 15 | # 16 | # 17 | # 18 | # In the current implementation we perform the following steps: 19 | # 20 | # Step 1. Use cardinal numbers to evaluate intermeidate quatities eX and eY 21 | # 22 | # Step 2. Perform a calculation with basis set X (default: cc-pVDZ). 23 | # Read SCF_X and corr_X 24 | # 25 | # Step 3. Perform a calculation with basis set Y (default: cc-pVTZ). 26 | # Read SCF_Y and corr_Y 27 | # 28 | # Step 4. Extrapolate SCF energy 29 | # 30 | # CBS_SCF = (SCF_X*eY - SCF_Y*eX)/(eY-eX) 31 | # 32 | # Extrapolate correlation energy 33 | # 34 | # CBS_corr = (X^beta*corr_X - Y^beta*corr_Y)/(X^beta-Y^beta) 35 | # 36 | # Sum up to get totall extrapolated energy 37 | # 38 | # CBS_Total = CBS_SCF + CBS_corr 39 | # 40 | # Step 5. Print the results 41 | # 42 | # 43 | # NOTE 1. For SCF we use the function: 44 | # 45 | # SCF(X) = SCF(CBS)+Aexp(-a*SQRT(X)) 46 | # 47 | # NOTE 2. For correlation we use the equation: 48 | # 49 | # CBS(Corr)=(X^b*E_Corr(X))-Y^b*E_Corr(Y))/(X^b-Y^b): 50 | # 51 | # 52 | # NOTE 3: If the basis sets change, please make sure to adjust the 'alpha', 'beta' and 'cardinalValues' 53 | # accordingly. 54 | # 55 | # NOTE 4: The values of the variables can also be adjusted using the 'with' command in the ORCA input. 56 | # In this case if one want to experiment just with the exponents the values to be adjusted are: 57 | # alpha 58 | # beta 59 | # In case the same method is used but different basis sets, then the the values to adjust are: 60 | # basisSets 61 | # cardinalNumbers 62 | # alpha 63 | # beta 64 | # In case the method is changed then potentially also the reading properties should change 65 | # method 66 | # RefEnergy_prop 67 | # CorrEnergy_prop 68 | # 69 | # --------------------------------------------------------------- 70 | # -------------------- Variables ------------------------------ 71 | # ---------- Variables that could be adjusted using 'with'----- 72 | Variable molecule; 73 | Variable charge = 0; 74 | Variable mult = 1; 75 | Variable method = "CCSD(T) VeryTightSCF"; 76 | Variable RefEnergy_prop = "MDCI_Ref_Energy"; 77 | Variable CorrEnergy_prop = "MDCI_Corr_Energy"; 78 | Variable basisSets = {"cc-pVDZ", "cc-pVTZ"}; 79 | Variable cardinalNumbers = {2,3}; 80 | Variable alpha = 4.420; #based on F. Neese et al. JCTC, 7,33-43 (2011) 81 | Variable beta = 2.460; 82 | # ----------------- Rest of variables -------------------------- 83 | Variable X, Y; #The cardinal numbers 84 | Variable SCF_X, SCF_Y; #The SCF energies 85 | Variable eX, eY; #Useful temporary intermediates 86 | Variable corr_X, corr_Y; #The correlation energies 87 | Variable CBS_SCF, CBS_corr; #The extrapolated components 88 | Variable CBS_Total; #The extrapolated total energy 89 | Variable res = -1; 90 | 91 | 92 | # ------------------------------------------------- 93 | # Use X and Y cardinal numbers to evaluate 94 | # intermediate eX and eY values 95 | # ------------------------------------------------- 96 | X = cardinalNumbers[0]; 97 | Y = cardinalNumbers[1]; 98 | eX = exp(-alpha*sqrt(X)); 99 | eY = exp(-alpha*sqrt(Y)); 100 | 101 | # ------------------------------------------------- 102 | # Calculation with small basis set 103 | # ------------------------------------------------- 104 | New_Step 105 | !&{method} &{basisSets[0]} 106 | *xyzfile &{charge} &{mult} &{molecule} 107 | Step_End 108 | SCF_X.readproperty(propertyname=RefEnergy_prop); 109 | corr_X.readproperty(propertyname=CorrEnergy_prop); 110 | 111 | # ------------------------------------------------- 112 | # Calculation with big basis set 113 | # ------------------------------------------------- 114 | New_Step 115 | !&{method} &{basisSets[1]} 116 | Step_End 117 | res = SCF_Y.readproperty(propertyname=RefEnergy_prop); 118 | res = corr_Y.readproperty(propertyname=CorrEnergy_prop); 119 | 120 | # ------------------------------------------------- 121 | # Evaluate the extrapolate quatities 122 | # ------------------------------------------------- 123 | # Extrapolate the SCF energy 124 | CBS_SCF = (SCF_X*eY - SCF_Y*eX)/(eY-eX); 125 | 126 | # Extrapolate the correlation energy 127 | CBS_corr = (X^beta*corr_X - Y^beta*corr_Y)/(X^beta-Y^beta); 128 | 129 | # Sum up 130 | CBS_Total = CBS_SCF + CBS_corr; 131 | 132 | # ------------------------------------------------- 133 | # Print the results 134 | # ------------------------------------------------- 135 | print("\n\n------------------------------------------------------------------------------------\n"); 136 | print("------------------------------------------------------------------------------------\n"); 137 | print(" Extrapolation Scheme EP1 \n"); 138 | print(" (All energies in Hartrees)\n"); 139 | print("Description of the notation : J. Phys. Chem. A 2012, 116, 19, 4801-4816\n"); 140 | print("Used exponents : J. Chem. Theory Comput., 7, 33-43 (2011)\n"); 141 | print("Formulation of SCF extrapolation : J. Chem. Phys. 2008, 129, 184116\n"); 142 | print("Formulation of correlation extrapolation : J. Chem. Phys. 1997, 106, 9639\n"); 143 | print("------------------------------------------------------------------------------------\n"); 144 | print("Molecule : %s\n", molecule); 145 | print("Charge : %-d\n", charge); 146 | print("Multiplicity : %-d\n", mult); 147 | print("Computational method : %s\n", method); 148 | print("Basis sets : %s/%s\n", basisSets[0], basisSets[1]); 149 | print("Cardinal numbers : %d/%d\n", cardinalNumbers[0], cardinalNumbers[1]); 150 | print("Alpha : %-.4lf\n", alpha); 151 | print("Beta : %-.4lf\n", beta); 152 | print("------------------------------------ SCF Part -------------------------------------\n"); 153 | print("SCF Energy with %-14s : %-20.10lf\n", basisSets[0],SCF_X); 154 | print("SCF Energy with %-14s : %-20.10lf\n", basisSets[1],SCF_Y); 155 | print("CBS SCF Energy : %-20.10lf\n", CBS_SCF); 156 | print("-------------------------------- Correlation Part ---------------------------------\n"); 157 | print("Correlation Energy with %-14s : %-20.10lf\n", basisSets[0],corr_X); 158 | print("Correlation Energy with %-14s : %-20.10lf\n", basisSets[1],corr_Y); 159 | print("CBS Correlation Energy : %-20.10lf\n", CBS_Corr); 160 | print("------------------------------------ Total ----------------------------------------\n"); 161 | print("Total CBS Energy : %-20.10lf\n", CBS_Total); 162 | print("-----------------------------------------------------------------------------------\n"); 163 | print("-----------------------------------------------------------------------------------\n"); 164 | #Final end 165 | EndRun 166 | -------------------------------------------------------------------------------- /EnergyExtrapolation/extrapolate_ep2.cmp: -------------------------------------------------------------------------------- 1 | # Author: Dimitrios Liakos 2 | # Date : May of 2024 3 | # 4 | # 5 | # This protocol estimates the complete basis limit (CBS) extrapolated electronic energy. 6 | # It extrapolates separately the SCF part and the correlation part. 7 | # For the correlation part by default the script uses single reference methods 8 | # (e.g. DLPNO-CCSD, CCSD(T), CEPA ...etc.). 9 | # 10 | # 11 | # A description of the notation we use here : J. Phys. Chem. A 2012, 116, 19, 4801-4816 12 | # The exponents used for the extrapolations : J. Chem. Theory Comput., 7, 33-43 (2011) 13 | # Original formulation of the SCF extrapolation : J. Chem. Phys. 2008, 129, 184116 14 | # Original formulation of the correlation extrapolation : J. Chem. Phys. 1997, 106, 9639 15 | # 16 | # 17 | # 18 | # In the current implementation we perform the following steps: 19 | # 20 | # Step 1. Use cardinal numbers to evaluate intermeidate quatities eX and eY 21 | # 22 | # Step 2. Perform a calculation with basis set X (default: cc-pVDZ) and the 23 | # expensive method. Read corr_X_exp 24 | # 25 | # Step 3: Perform a calculation with a basis set X (default: cc-pVDZ) and the 26 | # cheaper method (default MP2). (Read SCF_X and corr_X) 27 | # 28 | # Step 4: Perform a calculation with a basis set Y (default: cc-pVTZ) and the 29 | # cheaper method (default MP2). (Read SCF_Y and corr_Y) 30 | # 31 | # Step 5. Extrapolate SCF energy 32 | # 33 | # CBS_SCF = (SCF_X*eY - SCF_Y*eX)/(eY-eX) 34 | # 35 | # Extrapolate correlation energy 36 | # 37 | # CBS_corr = (X^beta*corr_X - Y^beta*corr_Y)/(X^beta-Y^beta) 38 | # 39 | # Sum up to get totall extrapolated energy 40 | # 41 | # CBS_Total = CBS_SCF + CBS_corr + (corr_X_exp - corr_X) 42 | # 43 | # 44 | # Step 6. Print the results 45 | # 46 | # 47 | # NOTE 1. For SCF we use the function: 48 | # 49 | # SCF(X) = SCF(CBS)+Aexp(-a*SQRT(X)) 50 | # 51 | # NOTE 2. For correlation we use the equation: 52 | # 53 | # CBS(Corr)=(X^b*E_Corr(X))-Y^b*E_Corr(Y))/(X^b-Y^b): 54 | # 55 | # NOTE 3. The total CBS energy is given by 56 | # CBS_Total = CBS_SCF + CBS_corr + (corr_X_exp - corr_X) 57 | # 58 | # NOTE 4: If the basis sets change, please make sure to adjust the 'alpha', 'beta' and 'cardinalValues' 59 | # accordingly. 60 | # 61 | # NOTE 5: The values of the variables can also be adjusted using the 'with' command in the ORCA input. 62 | # In this case if one want to experiment just with the exponents the values to be adjusted are: 63 | # alpha 64 | # beta 65 | # In case the same method is used but different basis sets, then the the values to adjust are: 66 | # basisSets 67 | # cardinalNumbers 68 | # alpha 69 | # beta 70 | # In case the method is changed then potentially also the reading properties should change 71 | # method 72 | # method_exp 73 | # expCorrProperty 74 | # cheapCorrProperty 75 | # chaepSCFProperty 76 | # 77 | # --------------------------------------------------------------- 78 | # -------------------- Variables ------------------------------ 79 | # ---------- Variables that could be adjusted using 'with'----- 80 | Variable molecule; 81 | Variable charge = 0; 82 | Variable mult = 1; 83 | Variable method = "MP2 "; # The cheap method 84 | Variable method_exp = "CCSD(T) "; # The expensive method 85 | Variable restOfInput = "VeryTightSCF"; 86 | Variable basisSets = {"cc-pVDZ", "cc-pVTZ"}; 87 | Variable cardinalNumbers = {2,3}; 88 | Variable alpha = 4.420; #based on F. Neese et al. JCTC, 7,33-43 (2011) 89 | Variable beta = 2.460; 90 | Variable expCorrProperty = "MDCI_Corr_Energy"; # Property for the corr energy of the expensive method 91 | Variable cheapCorrProperty= "MP2_Corr_Energy"; # Property for the SCF energy of the cheap method 92 | Variable cheapSCFProperty = "MP2_Ref_Energy"; # Property for the corr energy of the cheap method 93 | # ----------------- Rest of variables -------------------------- 94 | Variable X, Y; # The cardinal numbers 95 | Variable SCF_X, SCF_Y; # The SCF energies 96 | Variable eX, eY; # Useful temporary intermediates 97 | Variable corr_X, corr_Y, corr_X_exp; # The correlation energies 98 | Variable CBS_SCF, CBS_corr; # The extrapolated components 99 | Variable CBS_Total; # The extrapolated total energy 100 | 101 | 102 | # ------------------------------------------------- 103 | # Use X and Y cardinal numbers to evaluate 104 | # intermediate eX and eY values 105 | # ------------------------------------------------- 106 | X = cardinalNumbers[0]; 107 | Y = cardinalNumbers[1]; 108 | eX = exp(-alpha*sqrt(X)); 109 | eY = exp(-alpha*sqrt(Y)); 110 | 111 | 112 | # ------------------------------------------------- 113 | # Calculation with small basis set and expensive method 114 | # ------------------------------------------------- 115 | New_Step 116 | !&{method_exp} &{basisSets[0]} &{restOfInput} 117 | *xyzfile &{charge} &{mult} &{molecule} 118 | Step_End 119 | corr_X_exp.readProperty(propertyName=expCorrProperty); 120 | 121 | # ------------------------------------------------- 122 | # Calculation with small basis set and cheap method 123 | # ------------------------------------------------- 124 | New_Step 125 | !&{method} &{basisSets[0]} &{restOfInput} 126 | Step_End 127 | SCF_X.readProperty(propertyName=cheapSCFProperty); 128 | corr_X.readProperty(propertyName=cheapCorrProperty); 129 | 130 | # ------------------------------------------------- 131 | # Calculation with large basis set and cheap method 132 | # ------------------------------------------------- 133 | New_Step 134 | !&{method} &{basisSets[1]} &{restOfInput} 135 | Step_End 136 | SCF_Y.readProperty(propertyName=cheapSCFProperty); 137 | corr_Y.readProperty(propertyName=cheapCorrProperty); 138 | 139 | # ------------------------------------------------- 140 | # Evaluate the extrapolated quatities 141 | # ------------------------------------------------- 142 | # Extrapolate SCF 143 | CBS_SCF = (SCF_X*eY - SCF_Y*eX)/(eY-eX); 144 | 145 | # Extrapolate the correlation energy 146 | CBS_corr = (X^beta*corr_X - Y^beta*corr_Y)/(X^beta-Y^beta); 147 | 148 | # Sum up 149 | CBS_Total = CBS_SCF + CBS_corr; 150 | 151 | # ------------------------------------------------- 152 | # Print the results 153 | # ------------------------------------------------- 154 | print("\n\n------------------------------------------------------------------------------------\n"); 155 | print("------------------------------------------------------------------------------------\n"); 156 | print(" Extrapolation Scheme EP2 \n"); 157 | print(" (All energies in Hartrees)\n"); 158 | print("Description of the notation : J. Phys. Chem. A 2012, 116, 19, 4801-4816\n"); 159 | print("Used exponents : J. Chem. Theory Comput., 7, 33-43 (2011)\n"); 160 | print("Formulation of SCF extrapolation : J. Chem. Phys. 2008, 129, 184116\n"); 161 | print("Formulation of correlation extrapolation : J. Chem. Phys. 1997, 106, 9639\n"); 162 | print("------------------------------------------------------------------------------------\n"); 163 | print("Molecule : %s\n", molecule); 164 | print("Charge : %-d\n", charge); 165 | print("Multiplicity : %-d\n", mult); 166 | print("Expensive method : %-s\n", method_exp); 167 | print("Cheap method : %-s\n", method); 168 | print("Basis sets : %s/%s\n", basisSets[0], basisSets[1]); 169 | print("Cardinal numbers : %d/%d\n", X, Y); 170 | print("Alpha : %.3lf\n", alpha); 171 | print("Beta : %.3lf\n", beta); 172 | print("\n -------------------- SCF Part ----------------------\n"); 173 | print("SCF Energy with %-14s : %-20.10lf\n", basisSets[0],SCF_X); 174 | print("SCF Energy with %-14s : %-20.10lf\n", basisSets[1],SCF_Y); 175 | print("CBS SCF Energy %-14s : %-20.10lf\n", "",CBS_SCF); 176 | print("\n ---------------- Correlation Part ------------------\n"); 177 | print("Corr. Energy with %-12s and %-18s : %-20.10lf\n", basisSets[0], method_exp, corr_X_exp); 178 | print("Corr. Energy with %-12s and %-18s : %-20.10lf\n", basisSets[0], method, corr_X); 179 | print("Corr. Energy with %-12s and %-18s : %-20.10lf\n", basisSets[1], method, corr_Y); 180 | print("CBS Corr. Energy %14s (no correction) : %-20.10lf\n", "",CBS_Corr); 181 | print("CBS Corr. Energy %14s : %-20.10lf\n", "", CBS_Corr + (corr_X_exp - corr_X)); 182 | print("\n -------------------- Total -------------------------\n"); 183 | print("Total CBS Energy (no correction) : %-20.10lf\n", CBS_Total); 184 | print("Total CBS Energy : %-20.10lf\n", CBS_Total + (corr_X_exp - corr_X)); 185 | 186 | #Final end 187 | EndRun 188 | -------------------------------------------------------------------------------- /EnergyExtrapolation/extrapolate_ep3.cmp: -------------------------------------------------------------------------------- 1 | # Author: Dimitrios Liakos 2 | # Date : May of 2024 3 | # 4 | # 5 | # This protocol estimates the complete basis limit (CBS) extrapolated electronic energy. 6 | # It extrapolates separately the SCF part and the correlation part. 7 | # For the correlation part by default the script uses single reference methods 8 | # (e.g. DLPNO-CCSD, CCSD(T), CEPA ...etc.). 9 | # 10 | # 11 | # 12 | # A description of the notation we use here : J. Phys. Chem. A 2012, 116, 19, 4801-4816 13 | # The exponents used for the extrapolations : J. Chem. Theory Comput., 7, 33-43 (2011) 14 | # Original formulation of the SCF extrapolation : J. Chem. Phys. 2008, 129, 184116 15 | # Original formulation of the correlation extrapolation : J. Chem. Phys. 1997, 106, 9639 16 | # 17 | # 18 | # In the current implementation we perform the following steps: 19 | # 20 | # Step 1. Use cardinal numbers to evaluate intermeidate quatities eX and eY 21 | # 22 | # Step 2. Perform a calculation with basis set X (default: cc-pVDZ) and the 23 | # expensive method (default: CCSD(T)). Read corr_X_exp 24 | # 25 | ## Step 3: Perform a calculation with a basis set X (default: cc-pVDZ) and the 26 | # cheaper method (default MP2). (Read SCF_X and corr_X) 27 | # 28 | # Step 4: Perform a calculation with a basis set Y (default: cc-pVTZ) and the 29 | # cheaper method (default MP2). (Read SCF_Y and corr_Y) 30 | # 31 | # Step 5: Perform a calculation with a basis set Z (default: cc-pVQZ) and the 32 | # cheaper method (default MP2). (Read SCF_Z and corr_Z) 33 | # 34 | # Step 6. Extrapolate SCF energy 35 | # 36 | # CBS_SCF = (SCF_Y*eZ - SCF_Z*eY)/(eZ-eY) 37 | # 38 | # Extrapolate correlation energy 39 | # 40 | # CBS_corr = (Y^beta*corr_Y - Z^beta*corr_Z)/(Y^beta-Z^beta) 41 | # 42 | # Sum up to get totall extrapolated energy 43 | # 44 | # CBS_Total = CBS_SCF + CBS_corr + (corr_X_exp - corr_X) 45 | # 46 | # 47 | # NOTE 1. For SCF we use the function: 48 | # 49 | # SCF(X) = SCF(CBS)+Aexp(-a*SQRT(X)) 50 | # 51 | # NOTE 2. For correlation we use the equation: 52 | # 53 | # CBS(Corr)=(X^b*E_Corr(X))-Y^b*E_Corr(Y))/(X^b-Y^b): 54 | # 55 | # NOTE 3. The total CBS energy is given by 56 | # CBS_Total = CBS_SCF + CBS_corr + (corr_X_exp - corr_X) 57 | # 58 | # NOTE 4: If the basis sets change, please make sure to adjust the 'alpha', 'beta' and 'cardinalValues' 59 | # accordingly. 60 | # 61 | # NOTE 5: The values of the variables can also be adjusted using the 'with' command in the ORCA input. 62 | # In this case if one want to experiment just with the exponents the values to be adjusted are: 63 | # alpha 64 | # beta 65 | # In case the same method is used but different basis sets, then the the values to adjust are: 66 | # basisSets 67 | # cardinalNumbers 68 | # alpha 69 | # beta 70 | # In case the method is changed then potentially also the reading properties should change 71 | # method 72 | # method_exp 73 | # expCorrProperty 74 | # cheapCorrProperty 75 | # chaepSCFProperty 76 | # ****************************************** METHOD ************************************************# 77 | # --------------------------------------------------------------- 78 | # -------------------- Variables ------------------------------ 79 | # ---------- Variables that could be adjusted using 'with'----- 80 | Variable molecule; 81 | Variable charge = 0; 82 | Variable mult = 1; 83 | Variable method = "MP2 "; # The cheap method 84 | Variable method_exp = "CCSD(T) "; # The expensive method 85 | Variable restOfInput = "VeryTightSCF"; # Rest of input 86 | Variable basisSets = {"cc-pVDZ", "cc-pVTZ", "cc-pVQZ"}; 87 | Variable cardinalNumbers = {2,3,4}; 88 | Variable alpha = 5.460; #based on F. Neese et al. JCTC, 7,33-43 (2011) 89 | Variable beta = 3.050; 90 | Variable expCorrProperty = "MDCI_Corr_Energy"; # Property for the corr energy of the expensive method 91 | Variable cheapCorrProperty= "MP2_Corr_Energy"; # Property for the SCF energy of the cheap method 92 | Variable cheapSCFProperty = "MP2_Ref_Energy"; # Property for the corr energy of the cheap method 93 | # ----------------- Rest of variables -------------------------- 94 | Variable X,Y,Z; # The cardinal numbers 95 | Variable SCF_X, SCF_Y, SCF_Z; #The SCF energies 96 | Variable eY, eZ; #Useful temporary intermediates 97 | Variable corr_X_exp, corr_X, corr_Y, corr_Z; #The correlation energies 98 | Variable CBS_SCF, CBS_corr; #The extrapolated components 99 | Variable CBS_Total; #The extrapolated total energy 100 | 101 | # ------------------------------------------------- 102 | # Use X and Y cardinal numbers to evaluate 103 | # intermediate eX and eY values 104 | # ------------------------------------------------- 105 | X = cardinalNumbers[0]; 106 | Y = cardinalNumbers[1]; 107 | Z = cardinalNumbers[2]; 108 | eY = exp(-alpha*sqrt(Y)); 109 | eZ = exp(-alpha*sqrt(Z)); 110 | 111 | 112 | # ------------------------------------------------- 113 | # Calculation with small basis set (X) and expensive method 114 | # ------------------------------------------------- 115 | New_Step 116 | !&{method_exp} &{basisSets[0]} &{restOfInput} 117 | *xyzfile &{charge} &{mult} &{molecule} 118 | Step_End 119 | corr_X_exp.readProperty(propertyName=expCorrProperty); 120 | 121 | # ------------------------------------------------- 122 | # Calculation with small basis set (X) and cheap method 123 | # ------------------------------------------------- 124 | New_Step 125 | !&{method} &{basisSets[0]} &{restOfInput} 126 | Step_End 127 | SCF_X.readProperty(propertyName=cheapSCFProperty); 128 | corr_X.readProperty(propertyName=cheapCorrProperty); 129 | 130 | # ------------------------------------------------- 131 | # Calculation with medium basis set (Y) and Cheap method 132 | # ------------------------------------------------- 133 | New_Step 134 | !&{method} &{basisSets[1]} &{restOfInput} 135 | Step_End 136 | SCF_Y.readProperty(propertyName=cheapSCFProperty); 137 | corr_Y.readProperty(propertyName=cheapCorrProperty); 138 | 139 | # ------------------------------------------------- 140 | # Calculation with large basis set (Z) and Cheap method 141 | # ------------------------------------------------- 142 | New_Step 143 | !&{method} &{basisSets[2]} &{restOfInput} 144 | Step_End 145 | SCF_Z.readProperty(propertyName=cheapSCFProperty); 146 | corr_Z.readProperty(propertyName=cheapCorrProperty); 147 | 148 | 149 | # ------------------------------------------------- 150 | # Do the extrapolation 151 | # ------------------------------------------------- 152 | # Extrapolate SCF 153 | CBS_SCF = (SCF_Y*eZ - SCF_Z*eY)/(eZ-eY); 154 | 155 | # Extrapolate the correlation energy 156 | CBS_corr = (Y^beta*corr_Y - Z^beta*corr_Z)/(Y^beta-Z^beta); 157 | 158 | # Sum up 159 | CBS_Total = CBS_SCF + CBS_corr + (corr_X_exp - corr_X); 160 | 161 | # ------------------------------------------------- 162 | # Print the results 163 | # ------------------------------------------------- 164 | print("\n\n------------------------------------------------------------------------------------\n"); 165 | print("------------------------------------------------------------------------------------\n"); 166 | print(" Extrapolation Scheme EP3 \n"); 167 | print(" (All energies in Hartrees)\n"); 168 | print("Description of the notation : J. Phys. Chem. A 2012, 116, 19, 4801-4816\n"); 169 | print("Used exponents : J. Chem. Theory Comput., 7, 33-43 (2011)\n"); 170 | print("Formulation of SCF extrapolation : J. Chem. Phys. 2008, 129, 184116\n"); 171 | print("Formulation of correlation extrapolation : J. Chem. Phys. 1997, 106, 9639\n"); 172 | print("------------------------------------------------------------------------------------\n"); 173 | print("Molecule : %s\n", molecule); 174 | print("Charge : %-d\n", charge); 175 | print("Multiplicity : %-d\n", mult); 176 | print("Expensive method : %-s\n", method_exp); 177 | print("Cheap method : %-s\n", method); 178 | print("Basis sets : %s/%s/%s\n", basisSets[0], basisSets[1], basisSets[2]); 179 | print("Cardinal numbers : %d/%d/%d\n", X, Y, Z); 180 | print("Alpha : %.3lf\n", alpha); 181 | print("Beta : %.3lf\n", beta); 182 | print("\n -------------------- SCF Part ----------------------\n"); 183 | print("SCF Energy with %-14s : %-20.10lf\n", basisSets[0],SCF_X); 184 | print("SCF Energy with %-14s : %-20.10lf\n", basisSets[1],SCF_Y); 185 | print("SCF Energy with %-14s : %-20.10lf\n", basisSets[2],SCF_Z); 186 | print("CBS SCF Energy %-14s : %-20.10lf\n", "",CBS_SCF); 187 | print("\n ---------------- Correlation Part ------------------\n"); 188 | print("Corr. Energy with %-12s and %-18s : %-20.10lf\n", basisSets[0], method_exp, corr_X_exp); 189 | print("Corr. Energy with %-12s and %-18s : %-20.10lf\n", basisSets[0], method, corr_X); 190 | print("Corr. Energy with %-12s and %-18s : %-20.10lf\n", basisSets[1], method, corr_Y); 191 | print("Corr. Energy with %-12s and %-18s : %-20.10lf\n", basisSets[2], method, corr_Z); 192 | print("CBS Corr. Energy %14s (no correction) : %-20.10lf\n", "",CBS_Corr); 193 | print("CBS Corr. Energy %14s : %-20.10lf\n", "", CBS_Corr + (corr_X_exp - corr_X)); 194 | print("\n -------------------- Total -------------------------\n"); 195 | print("Total CBS Energy (no correction) : %-20.10lf\n", CBS_Total); 196 | print("Total CBS Energy : %-20.10lf\n", CBS_Total + (corr_X_exp - corr_X)); 197 | 198 | 199 | #Final end 200 | EndRun 201 | -------------------------------------------------------------------------------- /GeneralChemistry/Umbrella.cmp: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------- 2 | # Umbrella coordinate mapping for NH3 3 | # Author: Frank Neese 4 | # ---------------------------------------------- 5 | variable JobName = "NH3-umbrella"; 6 | variable amin = 50.0; 7 | variable amax = 130.0; 8 | variable nsteps = 21; 9 | Variable energies[21]; 10 | 11 | Variable angle; 12 | Variable JobStep; 13 | Variable JobStep_m; 14 | variable step; 15 | 16 | Variable method = "BP86"; 17 | Variable basis = "def2-SVP def2/J"; 18 | 19 | step = 1.0*(amax-amin)/(nsteps-1); 20 | 21 | # Loop over the number of steps 22 | # ---------------------------- 23 | for iang from 0 to nsteps-1 do 24 | angle = amin + iang*step; 25 | JobStep = iang+1; 26 | JobStep_m= JobStep-1; 27 | if (iang>0) then 28 | Read_Geom(JobStep_m); 29 | New_step 30 | ! &{method} &{basis} TightSCF Opt 31 | %base "&{JobName}.step&{JobStep}" 32 | %geom constraints 33 | {A 1 0 2 &{angle} C} 34 | {A 1 0 3 &{angle} C} 35 | {A 1 0 4 &{angle} C} 36 | end 37 | end 38 | 39 | Step_End 40 | else 41 | New_step 42 | ! &{method} &{basis} TightSCF Opt 43 | %base "&{JobName}.step&{JobStep}" 44 | %geom constraints 45 | {A 1 0 2 &{angle} C} 46 | {A 1 0 3 &{angle} C} 47 | {A 1 0 4 &{angle} C} 48 | end 49 | end 50 | 51 | * int 0 1 52 | N 0 0 0 0.0 0.0 0.0 53 | DA 1 0 0 2.0 0.0 0.0 54 | H 1 2 0 1.06 &{angle} 0.0 55 | H 1 2 3 1.06 &{angle} 120.0 56 | H 1 2 3 1.06 &{angle} 240.0 57 | * 58 | Step_End 59 | endif 60 | energies[iang].readProperty(propertyName="SCF_ENERGY"); 61 | print(" index: %3d Angle %6.2lf Energy: %16.12lf Eh\n", iang, angle, energies[iang]); 62 | EndFor 63 | 64 | # Print a summary at the end of the calculation 65 | # --------------------------------------------- 66 | print("////////////////////////////////////////////////////////\n"); 67 | print("// POTENTIAL ENERGY RESULT\n"); 68 | print("////////////////////////////////////////////////////////\n"); 69 | variable minimum,maximum; 70 | variable Em,E0,Ep; 71 | variable i0,im,ip; 72 | for iang from 0 to nsteps-1 do 73 | angle = amin + 1.0*iang*step; 74 | JobStep = iang+1; 75 | minimum = 0; 76 | maximum = 0; 77 | i0 = iang; 78 | im = iang-1; 79 | ip = iang+1; 80 | E0 = energies[i0]; 81 | Em = E0; 82 | Ep = E0; 83 | if (iang>0 and iangEm and E0>Ep) then maximum=1; endif 89 | if (minimum = 1 ) then 90 | print(" %3d %6.2lf %16.12lf (-)\n",JobStep,angle, E0 ); 91 | endif 92 | if (maximum = 1 ) then 93 | print(" %3d %6.2lf %16.12lf (+)\n",JobStep,angle, E0 ); 94 | endif 95 | if (minimum=0 and maximum=0) then 96 | print(" %3d %6.2lf %16.12lf \n",JobStep,angle, E0 ); 97 | endif 98 | endfor 99 | print("////////////////////////////////////////////////////////\n"); 100 | 101 | End # end of compound block 102 | -------------------------------------------------------------------------------- /GeneralChemistry/wB97M2.cmp: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------------ 2 | # Energy calculation with the wB97M(2) double-hybrid functional, as defined in 3 | # N. Mardirossian, M. Head-Gordon, J. Chem. Phys. 2018, 148, 241736. 4 | # The final energy is calculated non-variatonally using wB97M-V orbitals. 5 | # Note that FrozenCore is on default - one can turn it off using kw2 = "NoFrozenCore". 6 | # Author: Georgi L. Stoychev 7 | # ------------------------------------------------------------------------------------ 8 | 9 | # Optional variables: 10 | Variable NLOpt = "SCNL"; # Consistent with Q-Chem. "NL" likely very similar. Only matters for Step 1. 11 | Variable Basis = "def2-TZVP"; # Should be TZ or higher for reliable results 12 | Variable AuxC = "def2-TZVP/C"; # RI-MP2 is used by default. Must be compatible with the Basis 13 | Variable AuxJ = "def2/J"; # RIJCOSX is used by default 14 | Variable RIMP2 = True; # Set to false to turn off RI-MP2 15 | Variable Grid = "defGrid2"; # Should be OK. 16 | Variable kw1 = ""; # Additional simple input keywords for step 1 17 | Variable kw2 = ""; # Additional simple input keywords for step 2 18 | 19 | # Output variables 20 | Variable EwB97MV, EwB97M2; # Will hold the final energies 21 | 22 | # Step 1: wB97M-V calculation to obtain the orbitals 23 | New_Step 24 | ! wB97M-V &{NLOpt} &{Grid} &{kw1} 25 | %basis 26 | Basis "&{Basis}" 27 | AuxJ "&{AuxJ}" 28 | end 29 | Step_End 30 | 31 | # Step 2: single iteration with the wB97M(2) functional + MP2 correlation to get the final energy 32 | ReadMOs(1); 33 | New_Step 34 | ! wB97M(2) &{NLOpt} &{Grid} &{kw2} NoIter CalcGuessEnergy 35 | %basis 36 | Basis "&{Basis}" 37 | AuxC "&{AuxC}" 38 | AuxJ "&{AuxJ}" 39 | end 40 | %scf 41 | IgnoreConv 1 42 | end 43 | %mp2 RI &{RIMP2} end 44 | Step_End 45 | 46 | Read EwB97MV = DFT_Total_En[1]; 47 | Read EwB97M2 = MP2_Total_Energy[2]; 48 | 49 | Print(""); 50 | Print("================================================================================\n"); 51 | Print(" wB97M-V Energy: %20.10lf\n",EwB97MV); 52 | Print(" wB97M(2) Energy: %20.10lf\n",EwB97M2); 53 | 54 | End 55 | -------------------------------------------------------------------------------- /GeometryOptimization/BSSEOptimization.cmp: -------------------------------------------------------------------------------- 1 | # Author: Frank Neese and Dimitrios G. Liakos 2 | # Date : May of 2024 3 | # --------------------------------------------------- 4 | # 5 | # This is a script that will use a compound script to 6 | # calculate BSSE corrected gradients and use them 7 | # in combination with ORCA External Optimizer to 8 | # perform a geometry optimization. 9 | # 10 | # We perform the following steps. 11 | # 1. Choose a compound script that calculates the BSSE 12 | # corrected gradient. 13 | # We achieve this with the compoundFilename 14 | # 15 | # 2. Create a script to run an ORCA calculalation with 16 | # the external optimizer and the BSSE cprrected 17 | # gradient. We do that by running a script that runs 18 | # an ORCA calculation that calculates the gradient 19 | # and then copy this gradient file back to the expected 20 | # name 21 | # 22 | # 3. Make a normal ORCA New_Step that calls the external 23 | # optimizer 24 | # 25 | # NOTE: Depending on the chosen method the property names of 26 | # myPropName has to be adjusted. For the gradient we do 27 | # not have this problem because we read the last 28 | # available in the corresponding property file. 29 | # 30 | # NOTE: Variable baseFilename should have the name of the calling 31 | # orca input file! 32 | # 33 | # ---------------------- Variables ------------------------------- 34 | # --- Variables to be adjusted (e.g. using 'with' ---------------------- 35 | Variable molecule = "01.xyz"; # xyz file of the initial structure 36 | Variable method = "BP86"; # The method we use for the calculation 37 | Variable basis = " "; # The basis set 38 | Variable restOfInput = ""; # The rest of the simple input 39 | Variable charge = 0; # Charge 40 | Variable mult = 1; # Spin multiplicity 41 | Variable myPropName = "SCF_Energy"; # The name of the property for the energy 42 | variable myFilename = "compoundBSSE"; # Name for the created xyz files 43 | Variable baseFilename = "run"; 44 | Variable gradCreateFile = "BSSEGradient.cmp";# The compound script that extrapolates the gradient 45 | Variable DoOptimization = false; # Optimize the monomers or not 46 | Variable produceEnGradFile = true; # Produce an ORCA engrad file 47 | Variable enGradFilename = "result.engrad"; # Filename of the ORCA engrad file 48 | # ------------------------------------------------------- 49 | # 50 | # Variables for the driver script 51 | Variable createDriverScript = true; # The shell script driver 52 | Variable driverScript; # A script to create the extrapolated energy gradient 53 | Variable driverScriptName = "runningScript"; 54 | Variable submitCommand = "orca"; 55 | # -------------------------------------------------------- 56 | 57 | # -------------------------------------------------------- 58 | # 59 | # Variables for the ORCA input 60 | Variable createORCAInput = true; 61 | Variable orcaInput; # The ORCA input for the gradient extrapolation 62 | Variable orcaInputName = "runGradient.inp"; 63 | # -------------------------------------------------------- 64 | 65 | # ------------------------------------------------ 66 | # 1. Maybe Create the necessary driver script 67 | # for the external optimizer and make it executable 68 | # NOTE: This will depenend on the operating system 69 | # ------------------------------------------------- 70 | if (createDriverScript) then 71 | driverScript = openFile(driverScriptName, "w"); 72 | write2File(driverScript, "source ~/.bashrc\n"); 73 | write2File(driverScript, "%s %s\n", submitCommand, orcaInputName ); 74 | write2File(driverScript, "cp %s %s_Compound_1_EXT.engrad\n", engradFilename, baseFilename); 75 | closeFile(driverScript); 76 | sys_cmd("chmod +x %s",driverScriptName); 77 | EndIf 78 | 79 | # ------------------------------------------------ 80 | # 2. Maybe Create the ORCA input that will run the 81 | # compound script for the gradient extrapolation 82 | # ------------------------------------------------- 83 | if (createORCAInput) then 84 | orcaInput = openFile(orcaInputName, "w"); 85 | Write2File(orcaInput, "%%Compound \"%s\"\n", gradCreateFile); 86 | Write2File(orcaInput, " with\n"); 87 | Write2File(orcaInput, " molecule =\"%s_Compound_1_EXT.xyz\"\;\n", baseFilename); 88 | Write2File(orcaInput, " charge = %d\;\n", charge); 89 | Write2File(orcaInput, " mutliplicity = %d\;\n", mult); 90 | Write2File(orcaInput, " method = \"%s\"\;\n", method); 91 | Write2File(orcaInput, " basis = \"%s\"\;\n", basis); 92 | Write2File(orcaInput, " restOfInput = \"%s\"\;\n", restOfInput); 93 | Write2File(orcaInput, " myPropName = \"%s\"\;\n", myPropName); 94 | Write2File(orcaInput, " myFilename = \"%s\"\;\n", myFilename); 95 | Write2File(orcaInput, " removeFiles = false\;\n"); 96 | Write2File(orcaInput, " DoOptimization = %s\;\n", DoOptimization.GetString()); 97 | Write2File(orcaInput, " produceEnGradFile = %s\;\n", produceEnGradFile.GetString()); 98 | Write2File(orcaInput, " enGradFilename = \"%s\"\;\n", enGradFilename); 99 | Write2File(orcaInput, "End\n"); 100 | closeFile(orcaInput); 101 | EndIf 102 | 103 | # ------------------------------------------------ 104 | # 3. Copy the initial XYZ file to the one needed 105 | # for the external optimizer 106 | # ------------------------------------------------- 107 | sys_cmd("cp %s %s_Compound_1_EXT.xyz", molecule, baseFilename); 108 | 109 | 110 | # -------------------------------------------------- 111 | # 1. Run the driver ORCA input file that calls the 112 | # External optimizer 113 | # -------------------------------------------------- 114 | New_Step 115 | !ExtOpt Opt 116 | *xyzfile &{charge} &{mult} &{baseFilename}_Compound_1_EXT.xyz 117 | %method 118 | ProgExt "./&{driverScriptName}" 119 | End 120 | Step_End 121 | 122 | End 123 | -------------------------------------------------------------------------------- /GeometryOptimization/extrapolatedGeomOptimization.cmp: -------------------------------------------------------------------------------- 1 | # Author: Frank Neese and Dimitrios G. Liakos 2 | # Date : May of 2024 3 | # --------------------------------------------------- 4 | # 5 | # This is a script that will use compound to extrapolate 6 | # the nuclear gradient and then uset the External Optimizer 7 | # of ORCA to perform a geometry optimization with 8 | # extrapolated gradients 9 | # 10 | # We perform the following steps. 11 | # 1. Choose an extrapolation scheme using one of the 12 | # available gradient extrapolation schemes. 13 | # We practically do that with the compoundFilename 14 | # 15 | # 2. Create a script to run an ORCA calculalation with 16 | # the external optimizer and the extrapolated 17 | # gradient. We do that by running a script that runs 18 | # an ORCA calculation that calculates the gradient 19 | # and then copy this gradient file back to the expected 20 | # name 21 | # 22 | # 3. Make a normal ORCA New_Step that calls the external 23 | # optimizer 24 | # 25 | # NOTE: Depending on the chosen method the property names of the 26 | # scfEnPropName and corrEnPropName have to be adjusted. For 27 | # the gradient we do not have this problem because we read 28 | # the last available one in the corresponding property file. 29 | # 30 | # NOTE: Variable baseFilename should have the name of the calling 31 | # orca input file!. 32 | # ---------------------- Variables ------------------------------- 33 | # --- Variables to be adjusted (e.g. using 'with' ---------------------- 34 | Variable molecule = "initial.xyz"; # xyz file of the initial structure 35 | Variable charge = 0; # Charge 36 | Variable multiplicity = 1; # Spin multiplicity 37 | Variable method = "MP2"; # The method we use for the calculation 38 | Variable LowerBasis = "cc-pVDZ"; # Small basis set 39 | Variable UpperBasis = "cc-pVTZ"; # Big basis set 40 | Variable restOfInput = "EnGrad "; # The rest of the simple input 41 | Variable addCorrelation = true; # If we have a correlation part 42 | Variable scfEnPropName = "MP2_Ref_Energy"; # The name of the property for the SCFenergy 43 | Variable corrEnPropName = "MP2_Corr_Energy"; # The name of the property for the correlation energy 44 | Variable LowerCardinal = 2; # Cardinal number of small basis set 45 | Variable UpperCardinal = 3; # Cardinal number of big basis set 46 | Variable alpha = 4.420; # Exponent for SCF extrapolation 47 | Variable beta = 2.460; # Exponent for corrleation extrapolation 48 | Variable gradExtrapolation = "gradientExtrapolation.cmp"; # The compound script that extrapolates the gradient 49 | Variable baseFilename = "run"; 50 | Variable produceEnGradFile = true; # Produce an ORCA engrad file 51 | Variable enGradFilename = "result.engrad"; # Filename of the ORCA engrad file 52 | # ------------------------------------------------------- 53 | # Variables for the driver script 54 | Variable createDriverScript = true; # The shell script driver 55 | Variable driverScript; # A script to create the extrapolated energy gradient 56 | Variable driverScriptName = "runningScript"; 57 | Variable submitCommand = "orca"; 58 | # -------------------------------------------------------- 59 | 60 | # -------------------------------------------------------- 61 | # Variables for the ORCA input 62 | Variable createORCAInput = true; 63 | Variable orcaInput; # The ORCA input for the gradient extrapolation 64 | Variable orcaInputName = "runGradient.inp"; 65 | # -------------------------------------------------------- 66 | 67 | # ------------------------------------------------ 68 | # 1. Maybe Create the necessary driver script 69 | # for the external optimizer and make it executable 70 | # NOTE: This will depenend on the operating system 71 | # ------------------------------------------------- 72 | if (createDriverScript) then 73 | driverScript = openFile(driverScriptName, "w"); 74 | write2File(driverScript, "%s %s\n", submitCommand, orcaInputName ); 75 | write2File(driverScript, "cp %s %s_Compound_1_EXT.engrad\n", engradFilename, baseFilename); 76 | closeFile(driverScript); 77 | sys_cmd("chmod +x %s",driverScriptName); 78 | EndIf 79 | 80 | # ------------------------------------------------ 81 | # 2. Maybe Create the ORCA input that will run the 82 | # compound script for the gradient extrapolation 83 | # ------------------------------------------------- 84 | if (createORCAInput) then 85 | orcaInput = openFile(orcaInputName, "w"); 86 | Write2File(orcaInput, "%%Compound \"%s\"\n", gradExtrapolation); 87 | Write2File(orcaInput, " with\n"); 88 | Write2File(orcaInput, " Molecule =\"%s_Compound_1_EXT.xyz\"\;\n", baseFilename); 89 | Write2File(orcaInput, " charge = %d\;\n", charge); 90 | Write2File(orcaInput, " mutliplicity = %d\;\n", multiplicity); 91 | Write2File(orcaInput, " Method = \"%s\"\;\n", method); 92 | Write2File(orcaInput, " restOfInput = \"%s\"\;\n", restOfInput); 93 | Write2File(orcaInput, " addCorrelation = %s\;\n", addCorrelation.GetString()); 94 | Write2File(orcaInput, " scfEnPropName = \"%s\"\;\n", scfEnPropName); 95 | Write2File(orcaInput, " corrEnPropName = \"%s\"\;\n", corrEnPropName); 96 | Write2File(orcaInput, " LowerBasis = \"%s\"\;\n", LowerBasis); 97 | Write2File(orcaInput, " UpperBasis = \"%s\"\;\n", UpperBasis); 98 | Write2File(orcaInput, " LowerCardinal = %d\;\n", LowerCardinal); 99 | Write2File(orcaInput, " UpperCardinal = %d\;\n", UpperCardinal); 100 | Write2File(orcaInput, " alpha = %.5lf\;\n", alpha); 101 | Write2File(orcaInput, " beta = %.5lf\;\n", beta); 102 | Write2File(orcaInput, " produceEnGradFile=true;\n"); 103 | Write2File(orcaInput, "End\n"); 104 | closeFile(orcaInput); 105 | EndIf 106 | 107 | # ------------------------------------------------ 108 | # 3. Copy the initial XYZ file to the one needed 109 | # for the external optimizer 110 | # ------------------------------------------------- 111 | sys_cmd("cp %s %s_Compound_1_EXT.xyz", Molecule, baseFilename); 112 | 113 | 114 | # -------------------------------------------------- 115 | # 1. Run the driver ORCA input file that calls the 116 | # External optimizer 117 | # -------------------------------------------------- 118 | New_Step 119 | !ExtOpt Opt 120 | *xyzfile &{charge} &{multiplicity} &{baseFilename}_Compound_1_EXT.xyz 121 | %method 122 | ProgExt "./&{driverScriptName}" 123 | End 124 | Step_End 125 | 126 | End 127 | -------------------------------------------------------------------------------- /GeometryOptimization/iterativeOptimization.cmp: -------------------------------------------------------------------------------- 1 | # Author: Dimitrios G. Liakos, Zikuan Wang and Frank Neese 2 | # Date : May/June of 2024 3 | # 4 | # *************************************** DESCRIPTION *********************************************** 5 | # iterative Optimization protocol to find structure with no negative 6 | # frequencies (i.e. real minima), or in case of transition state search, 7 | # find structure with exactly one imaginary frequency (i.e. saddle point) 8 | # 9 | # Step 1. Run a single point calculation (we need it for the first property file) 10 | # 11 | # Step 2. Loop and perform calculations with (optimization and frequencies) 12 | # 13 | # Step 3. Check the frequencies. If there are negative ones use the hessian 14 | # of the appropriate normal mode to adjust the geometry 15 | # 16 | # ------ Variables to adjust (e.g. using 'with') ------------------- 17 | Variable molecule ="initial.xyz"; 18 | Variable charge = 0; 19 | Variable mult = 2; 20 | Variable method = "B3LYP D3 def2-TZVP"; 21 | Variable MaxNTries = 25; # Number of maximum tries 22 | Variable CutOff = -10.0; # CutOff for a negative frequency 23 | Variable scaling = 0.6; # Scaling factor for normal mode 24 | Variable NNegativeTarget = 0; # Number of negative frequencies we allow. For TS optimization, change to 1 25 | Variable myFilename = "xyzInput.xyz"; 26 | # ------------------------------------------------------------------ 27 | # ------ Rest of variables ------------------- 28 | Geometry myGeom; 29 | Variable freqs, modes; 30 | Variable res = -1; 31 | Variable NNegative = 0; 32 | Variable OptDone; 33 | 34 | # ----------------------------------------------------------- 35 | # Perform a single point calculation. We need it for 36 | # the initial geometry from the property file 37 | # ----------------------------------------------------------- 38 | New_Step 39 | !&{method} 40 | *xyzfile &{charge} &{mult} &{molecule} 41 | Step_End 42 | myGeom.Read(); 43 | myGeom.WriteXYZFile(filename=myFilename); 44 | 45 | # ----------------------------------------------------------- 46 | # Start a for loop over number of tries 47 | # ---------------------------------------------------------- 48 | For itry From 1 To maxNTries Do 49 | # -------------------------------------------- 50 | # Perform a geometry optimization/Frequency calculation 51 | # -------------------------------------------- 52 | New_Step 53 | ! &{method} freq Opt Bohrs 54 | *xyzfile &{charge} &{mult} &{myFilename} 55 | Step_End 56 | res = freqs.readProperty(propertyName = "THERMO_FREQS"); 57 | res = modes.readProperty(propertyName = "HESSIAN_MODES"); 58 | myGeom.Read(); 59 | 60 | # --------------------------------------------- 61 | # check for sufficiently negative frequencies 62 | # --------------------------------------------- 63 | NNegative = 0; 64 | For ifreq From 0 to freqs.GetSize()-1 Do 65 | if ( freqs[ifreq] < CutOff ) then 66 | myGeom.FollowNormalMode(vibrationSN=ifreq+1, scalingFactor=scaling); 67 | NNegative = NNegative + 1; 68 | endif 69 | endfor 70 | myGeom.WriteXYZFile(filename=myFilename); 71 | If ( NNegative <= NNegativeTarget ) then 72 | goto OptDone; 73 | endif 74 | endfor 75 | 76 | # ----------------------------------------------------------------- 77 | # Either found correct geometry or reached maximum number of tries. 78 | # ----------------------------------------------------------------- 79 | OptDone : 80 | if (NNegative > NNegativeTarget) then 81 | print("ERROR The program did not find a structure with the desired\n number of imaginary frequencies.\n There are %d negative frequencies after %3d steps,\n which is larger than the desired number %d.", NNegative,itry,NNegativeTarget); 82 | else if (NNegative < NNegativeTarget) then 83 | print("ERROR The program did not find a structure with the desired\n number of imaginary frequencies.\n There are %d negative frequencies after %3d steps,\n which is smaller than the desired number %d.", NNegative,itry,NNegativeTarget); 84 | else 85 | print("\nSUCCESS optimized structure with (%d) negative\n frequencies found after %3d steps", NNegative, itry); 86 | endif 87 | 88 | End 89 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/G2_MP2.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos and Frank Neese 2 | # Revised: June of 2024 3 | # 4 | # This is a compound script that implements the 5 | # G2(MP2) composite method by L. A. Curtiss et al. 6 | # as described on: 7 | # 8 | # L. A. Curtiss et al. J. Chem. Phys 104, 5148, (1996) 9 | # 10 | # 11 | # In the current implementation we perform the following steps: 12 | # 13 | # Step 1. A single point calculation with HF/6-31G(d) 14 | # 15 | # Step 2. Based on the geometry decide if we are working with 16 | # an atom or a molecule 17 | # 18 | # Step 3. If it is a molecule do a geometry optimization and a 19 | # Frequency calculation. Get ZPEScaled 20 | # 21 | # Step 4. If it is a molecule optimize the geometry 22 | # using MP2/6-31G(d) 23 | # 24 | # Step 5. Obtain the correlation energy using 25 | # MP2/6-311G(d,p) (ESmallMP2) 26 | # 27 | # Step 6. Obtain the correlation energy using 28 | # MP2/6-311+G(3df,2p) (EBigMP2) 29 | # 30 | # Step 7. Evaluate the MP2 correction (DEMP2) 31 | # 32 | # Step 8. Obtain the total energy using QCISD(T)/6-311G(d,p) 33 | # 34 | # Step 9. Calculate the HLC correction 35 | # 36 | # Step 10 Calculate the total energy and print 37 | # --------------------------------------------------------------- 38 | # -------------------- Variables ------------------------------ 39 | # ---------- Variables that could be adjusted using 'with'----- 40 | Variable molecule; 41 | Variable charge = 0; 42 | Variable mult = 1; 43 | Variable Scale = 0.893; 44 | # ----------------- Rest of variables -------------------------- 45 | variable ESmallMP2, EBigMP2, EQCISDT; 46 | variable DEMP2; 47 | variable ZPE, ZPEScaled; 48 | variable aElectrons, bElectrons; 49 | variable alpha, beta, HLC; 50 | variable FinalEnergy; 51 | variable isMolecule = true; 52 | Geometry myGeom; 53 | Variable nAtoms = 0; 54 | 55 | # --------------------------------------------------------------- 56 | # (Calculation 1) Do a single point HF Calculation 57 | # the ZPE correction from HF 58 | # --------------------------------------------------------------- 59 | New_Step 60 | ! HF 6-31G(d) VeryTightSCF 61 | *xyzfile &{charge} &{mult} &{molecule} 62 | Step_End 63 | myGeom.Read(); 64 | nAtoms = myGeom.GetNumOfAtoms(); 65 | if (nAtoms = 1) then 66 | print("We are working with an atom\n"); 67 | isMolecule = false; 68 | else 69 | print("We are working with a molecule\n"); 70 | endIf 71 | 72 | # --------------------------------------------------------------- 73 | # (Calculation 2) If we are working with a molecule then 74 | # optimize and get the ZPE correction from HF 75 | # --------------------------------------------------------------- 76 | if (isMolecule) then 77 | New_Step 78 | ! HF 6-31G(d) VeryTightSCF TightOpt Freq 79 | STEP_END 80 | ZPE.readProperty(propertyName="THERMO_ZPE"); 81 | else 82 | ZPE = 0.0; 83 | endIf 84 | ZPEScaled = Scale*ZPE; 85 | 86 | # --------------------------------------------------------------- 87 | # (Calculation 3) 88 | # First optimize at the MP2 level with 6-31G(d) 89 | # --------------------------------------------------------------- 90 | if (isMolecule) then 91 | New_Step 92 | ! MP2 6-31G(d) TightOpt NoFrozenCore VeryTightSCF 93 | STEP_END 94 | endIf 95 | 96 | # --------------------------------------------------------------- 97 | # (Calculation 4) 98 | # The MP2 correlation energy with 6-311G(d,p) 99 | # --------------------------------------------------------------- 100 | New_Step 101 | !MP2 6-311G(d,p) 102 | Step_End 103 | ESmallMP2.readProperty(propertyName="MP2_Total_Energy"); 104 | 105 | # --------------------------------------------------------------- 106 | # (Calculation 5) 107 | # The MP2 correlation energy 6-311+G(3df,2p). 108 | # --------------------------------------------------------------- 109 | New_Step 110 | !MP2 6-311+G(3df,2p) 111 | Step_End 112 | EBigMP2.readProperty(propertyName="MP2_Total_Energy"); 113 | 114 | # --------------------------------------------------------------- 115 | # Calculate the DEMP2 correction 116 | # --------------------------------------------------------------- 117 | DEMP2 = EBigMP2 - ESmallMP2 ; 118 | 119 | # --------------------------------------------------------------- 120 | # (Calculation 6) 121 | # The total QCISD(T) energy with 6-311G(d,p) 122 | # --------------------------------------------------------------- 123 | New_Step 124 | !QCISD(T) 6-311G(d,p) 125 | Step_End 126 | EQCISDT.readProperty(propertyName="MDCI_Total_Energy"); 127 | 128 | # -------------------------------------------------------------- 129 | # For HLC correction we need the number of electrons 130 | # -------------------------------------------------------------- 131 | aElectrons.readProperty(propertyName="MDCI_CORR_ALPHA_ELECTRONS"); 132 | bElectrons.readProperty(propertyName="MDCI_CORR_BETA_ELECTRONS"); 133 | 134 | # -------------------------------------------------------------- 135 | # The HLC correction. The alpha and beta values come from the 136 | # referenced article. 137 | # -------------------------------------------------------------- 138 | alpha = 4.81; 139 | beta = 0.19; 140 | HLC = (-alpha*bElectrons-beta*aElectrons)/1000; 141 | 142 | # -------------------------------------------------------------- 143 | # Finally sum all contributions 144 | # -------------------------------------------------------------- 145 | FinalEnergy = EQCISDT + DEMP2 + HLC + ZPEScaled; 146 | 147 | # -------------------------------------------------------------- 148 | # Print the results 149 | # -------------------------------------------------------------- 150 | 151 | print("\n\n-------------------------------------------------------\n"); 152 | print(" G2(MP2) composite method by L. A. Curtiss et al. \n"); 153 | print(" L. A. Curtiss et al. J. Chem. Phys 104, 5148, (1996) \n "); 154 | print(" E = E(QCISD(T) + DEMP2 + HLC + ZPEScaled\n"); 155 | print(" (all energies in Hartrees) \n"); 156 | print(" Molecule : %s\n", molecule); 157 | print(" Charge : %18d\n", charge); 158 | print(" Mult : %18d\n", mult); 159 | print(" Scaling Factor : %18.3lf\n", Scale); 160 | print(" ZPE : %18.10lf\n", ZPE); 161 | print(" ZPEScaled : %18.10lf\n", ZPEScaled); 162 | print(" MP2 (small) : %18.10lf\n", ESmallMP2); 163 | print(" MP2 (big) : %18.10lf\n", EBigMP2); 164 | print(" DEMP2 : %18.10lf\n", DEMP2); 165 | print(" QCISD(T) : %18.10lf\n", EQCISDT); 166 | print(" alpha elecs : %18d\n", aElectrons); 167 | print(" beta elecs : %18d\n", bElectrons); 168 | print(" alpha : %18.3lf\n", alpha); 169 | print(" beta : %18.3lf\n", beta); 170 | print(" HLC : %18.10lf\n", HLC); 171 | print(" Final En : %18.10lf\n", FinalEnergy); 172 | print(" ------------------------------------------------------------\n\n"); 173 | 174 | 175 | END 176 | 177 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/G2_MP2_SV.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos and Frank Neese 2 | # Revised: June of 2024 3 | # 4 | # This is a compound script that implements the 5 | # G2(MP2, SV) composite method by L. A. Curtiss et al. 6 | # as described on: 7 | # 8 | # L. A. Curtiss et al. J. Chem. Phys 104, 5148, (1996) 9 | # 10 | # 11 | # In the current implementation we perform the following steps: 12 | # 13 | # Step 1. A single point calculation with HF/6-31G(d) 14 | # 15 | # Step 2. Based on the geometry decide if we are working with 16 | # an atom or a molecule 17 | # 18 | # Step 3. If it is a molecule do a geometry optimization and a 19 | # Frequency calculation. Get ZPEScaled 20 | # 21 | # Step 4. If it is a molecule optimize the geometry 22 | # using MP2/6-31G(d) 23 | # 24 | # Step 5. Obtain the correlation energy using 25 | # MP2/6-31G (ESmallMP2) 26 | # 27 | # Step 6. Obtain the correlation energy using 28 | # MP2/6-311+G(3df,2p) (EBigMP2) 29 | # 30 | # Step 7. Evaluate the MP2 correction (DEMP2) 31 | # 32 | # Step 8. Obtain the total energy using QCISD(T)/6-31G 33 | # 34 | # Step 9. Calculate the HLC correction 35 | # 36 | # Step 10 Calculate the total energy and print 37 | # 38 | # 39 | # --------------------------------------------------------------- 40 | # -------------------- Variables ------------------------------ 41 | # ---------- Variables that could be adjusted using 'with'----- 42 | Variable molecule; 43 | Variable charge = 0; 44 | Variable mult = 1; 45 | Variable Scale = 0.893; 46 | # ----------------- Rest of variables -------------------------- 47 | variable ESmallMP2, EBigMP2, EQCISDT; 48 | variable DEMP2; 49 | variable ZPE, ZPEScaled; 50 | variable aElectrons, bElectrons; 51 | variable alpha, beta, HLC; 52 | variable FinalEnergy; 53 | variable isMolecule = true; 54 | Geometry myGeom; 55 | Variable nAtoms = 0; 56 | 57 | 58 | # --------------------------------------------------------------- 59 | # (Calculation 1) Do a single point HF Calculation 60 | # the ZPE correction from HF 61 | # --------------------------------------------------------------- 62 | New_Step 63 | ! HF 6-31G(d) VeryTightSCF 64 | *xyzfile &{charge} &{mult} &{molecule} 65 | Step_End 66 | myGeom.Read(); 67 | nAtoms = myGeom.GetNumOfAtoms(); 68 | if (nAtoms = 1) then 69 | print("We are working with an atom\n"); 70 | isMolecule = false; 71 | else 72 | print("We are working with a molecule\n"); 73 | endIf 74 | 75 | # --------------------------------------------------------------- 76 | # (Calculation 2) If we are working with a molecule then 77 | # optimize and get the ZPE correction from HF 78 | # --------------------------------------------------------------- 79 | if (isMolecule) then 80 | New_Step 81 | ! HF 6-31G(d) VeryTightSCF TightOpt Freq 82 | STEP_END 83 | ZPE.readProperty(propertyName="THERMO_ZPE"); 84 | else 85 | ZPE = 0.0; 86 | endIf 87 | ZPEScaled = Scale*ZPE; 88 | 89 | 90 | # --------------------------------------------------------------- 91 | # (Calculation 3) 92 | # First optimize at the MP2 level with 6-31G(d) 93 | # --------------------------------------------------------------- 94 | if (isMolecule) then 95 | New_Step 96 | ! MP2 6-31G(d) TightOpt NoFrozenCore VeryTightSCF 97 | STEP_END 98 | endIf 99 | 100 | 101 | # --------------------------------------------------------------- 102 | # (Calculation 4) 103 | # The MP2 correlation energy with 6-31G 104 | # --------------------------------------------------------------- 105 | New_Step 106 | !MP2 6-31G 107 | Step_End 108 | ESmallMP2.readProperty(propertyName="MP2_Total_Energy"); 109 | 110 | # --------------------------------------------------------------- 111 | # (Calculation 5) 112 | # The MP2 correlation energy 6-311+G(3df,2p). 113 | # --------------------------------------------------------------- 114 | New_Step 115 | !MP2 6-311+G(3df,2p) 116 | Step_End 117 | EBigMP2.readProperty(propertyName="MP2_Total_Energy"); 118 | 119 | # --------------------------------------------------------------- 120 | # Calculate the DEMP2 correction 121 | # --------------------------------------------------------------- 122 | DEMP2 = EBigMP2 - ESmallMP2; 123 | 124 | # --------------------------------------------------------------- 125 | # (Calculation 6) 126 | # The total QCISD(T) energy with 6-31G 127 | # --------------------------------------------------------------- 128 | New_Step 129 | !QCISD(T) 6-31G 130 | Step_End 131 | EQCISDT.readProperty(propertyName="MDCI_Total_Energy"); 132 | 133 | # -------------------------------------------------------------- 134 | # For HLC correction we need the number of electrons 135 | # -------------------------------------------------------------- 136 | aElectrons.readProperty(propertyName="MDCI_CORR_ALPHA_ELECTRONS"); 137 | bElectrons.readProperty(propertyName="MDCI_CORR_BETA_ELECTRONS"); 138 | 139 | # -------------------------------------------------------------- 140 | # The HLC correction. The alpha and beta values come from the 141 | # referenced article. 142 | # -------------------------------------------------------------- 143 | alpha = 3.22; 144 | beta = 0.19; 145 | HLC = (-alpha*bElectrons-beta*aElectrons)/1000; 146 | 147 | # -------------------------------------------------------------- 148 | # Finally sum all contributions 149 | # -------------------------------------------------------------- 150 | FinalEnergy = EQCISDT + DEMP2 + HLC + ZPEScaled; 151 | 152 | # -------------------------------------------------------------- 153 | # Print the results 154 | # -------------------------------------------------------------- 155 | print("\n\n-------------------------------------------------------\n"); 156 | print(" G2(MP2, SVP) composite method by L. A. Curtiss et al. \n"); 157 | print(" L. A. Curtiss et al. J. Chem. Phys 104, 5148, (1996) \n "); 158 | print(" E = E(QCISD(T) + DEMP2 + HLC + ZPEScaled\n"); 159 | print(" (all energies in Hartrees) \n"); 160 | print(" Molecule : %s\n", molecule); 161 | print(" Charge : %18d\n", charge); 162 | print(" Mult : %18d\n", mult); 163 | print(" Scaling Factor : %18.3lf\n", Scale); 164 | print(" ZPE : %18.10lf\n", ZPE); 165 | print(" ZPEScaled : %18.10lf\n", ZPEScaled); 166 | print(" MP2 (small) : %18.10lf\n", ESmallMP2); 167 | print(" MP2 (big) : %18.10lf\n", EBigMP2); 168 | print(" DEMP2 : %18.10lf\n", DEMP2); 169 | print(" QCISD(T) : %18.10lf\n", EQCISDT); 170 | print(" alpha elecs : %18d\n", aElectrons); 171 | print(" beta elecs : %18d\n", bElectrons); 172 | print(" alpha : %18.3lf\n", alpha); 173 | print(" beta : %18.3lf\n", beta); 174 | print(" HLC : %18.10lf\n", HLC); 175 | print(" Final En : %18.10lf\n", FinalEnergy); 176 | print(" ------------------------------------------------------------\n\n"); 177 | 178 | 179 | END 180 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/G2_MP2_SVP.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos and Frank Neese 2 | # Revised: June of 2024 3 | # 4 | # This is a compound script that implements the 5 | # G2(MP2, SVP) composite method by L. A. Curtiss et al. 6 | # as described on: 7 | # 8 | # L. A. Curtiss et al. J. Chem. Phys 104, 5148, (1996) 9 | # 10 | # 11 | # In the current implementation we perform the following steps: 12 | # 13 | # Step 1. A single point calculation with HF/6-31G(d) 14 | # 15 | # Step 2. Based on the geometry decide if we are working with 16 | # an atom or a molecule 17 | # 18 | # Step 3. If it is a molecule do a geometry optimization and a 19 | # Frequency calculation. Get ZPEScaled 20 | # 21 | # Step 4. If it is a molecule optimize the geometry 22 | # using MP2/6-31G(d) 23 | # 24 | # Step 5. Obtain the correlation energy using 25 | # MP2/6-31G(d) (ESmallMP2) 26 | # 27 | # Step 6. Obtain the correlation energy using 28 | # MP2/6-311+G(3df,2p) (EBigMP2) 29 | # 30 | # Step 7. Evaluate the MP2 correction (DEMP2) 31 | # 32 | # Step 8. Obtain the total energy using QCISD(T)/6-31G(d) 33 | # 34 | # Step 9. Calculate the HLC correction 35 | # 36 | # Step 10 Calculate the total energy and print 37 | 38 | 39 | # --------------------------------------------------------------- 40 | # -------------------- Variables ------------------------------ 41 | # ---------- Variables that could be adjusted using 'with'----- 42 | Variable molecule; 43 | Variable charge = 0; 44 | Variable mult = 1; 45 | Variable Scale = 0.893; 46 | # ----------------- Rest of variables -------------------------- 47 | variable ESmallMP2, EBigMP2, EQCISDT; 48 | variable DEMP2; 49 | variable ZPE, ZPEScaled; 50 | variable aElectrons, bElectrons; 51 | variable alpha, beta, HLC; 52 | variable FinalEnergy; 53 | variable isMolecule = true; 54 | Geometry myGeom; 55 | Variable nAtoms = 0; 56 | 57 | # --------------------------------------------------------------- 58 | # (Calculation 1) Do a single point HF Calculation 59 | # the ZPE correction from HF 60 | # --------------------------------------------------------------- 61 | New_Step 62 | ! HF 6-31G(d) VeryTightSCF 63 | *xyzfile &{charge} &{mult} &{molecule} 64 | Step_End 65 | myGeom.Read(); 66 | nAtoms = myGeom.GetNumOfAtoms(); 67 | if (nAtoms = 1) then 68 | print("We are working with an atom\n"); 69 | isMolecule = false; 70 | else 71 | print("We are working with a molecule\n"); 72 | endIf 73 | 74 | # --------------------------------------------------------------- 75 | # (Calculation 2) If we are working with a molecule then 76 | # optimize and get the ZPE correction from HF 77 | # --------------------------------------------------------------- 78 | if (isMolecule) then 79 | New_Step 80 | ! HF 6-31G(d) VeryTightSCF TightOpt Freq 81 | STEP_END 82 | ZPE.readProperty(propertyName="THERMO_ZPE"); 83 | else 84 | ZPE = 0.0; 85 | endIf 86 | ZPEScaled = Scale*ZPE; 87 | 88 | 89 | # --------------------------------------------------------------- 90 | # (Calculation 3) 91 | # First optimize at the MP2 level with 6-31G(d) 92 | # --------------------------------------------------------------- 93 | if (isMolecule) then 94 | New_Step 95 | ! MP2 6-31G(d) TightOpt NoFrozenCore VeryTightSCF 96 | STEP_END 97 | endIf 98 | 99 | # --------------------------------------------------------------- 100 | # (Calculation 4) 101 | # The MP2 correlation energy with 6-31G(d) 102 | # --------------------------------------------------------------- 103 | New_Step 104 | !MP2 6-31G(d) 105 | Step_End 106 | ESmallMP2.readProperty(propertyName="MP2_Total_Energy"); 107 | 108 | # --------------------------------------------------------------- 109 | # (Calculation 5) 110 | # The MP2 correlation energy 6-311+G(3df,2p). 111 | # --------------------------------------------------------------- 112 | New_Step 113 | !MP2 6-311+G(3df,2p) 114 | Step_End 115 | EBigMP2.readProperty(propertyName="MP2_Total_Energy"); 116 | 117 | # --------------------------------------------------------------- 118 | # Calculate the DEMP2 correction 119 | # --------------------------------------------------------------- 120 | DEMP2 = EBigMP2 - ESmallMP2; 121 | 122 | # --------------------------------------------------------------- 123 | # (Calculation 6) 124 | # The total QCISD(T) energy with 6-31G(d) 125 | # -------------------------------------------------------------- 126 | New_Step 127 | !QCISD(T) 6-31G(d) 128 | Step_End 129 | EQCISDT.readProperty(propertyName="MDCI_Total_Energy"); 130 | 131 | # -------------------------------------------------------------- 132 | # For HLC correction we need the number of electrons 133 | # -------------------------------------------------------------- 134 | aElectrons.readProperty(propertyName="MDCI_CORR_ALPHA_ELECTRONS"); 135 | bElectrons.readProperty(propertyName="MDCI_CORR_BETA_ELECTRONS"); 136 | 137 | # -------------------------------------------------------------- 138 | # The HLC correction. The alpha and beta values come from the 139 | # referenced article. 140 | # -------------------------------------------------------------- 141 | alpha = 5.13; 142 | beta = 0.19; 143 | HLC = (-alpha*bElectrons-beta*aElectrons)/1000; 144 | 145 | # -------------------------------------------------------------- 146 | # Finally sum all contributions 147 | # -------------------------------------------------------------- 148 | FinalEnergy = EQCISDT + DEMP2 + HLC + ZPEScaled; 149 | 150 | # -------------------------------------------------------------- 151 | # Print the results 152 | # -------------------------------------------------------------- 153 | print("\n\n-------------------------------------------------------\n"); 154 | print(" G2(MP2, SVP) composite method by L. A. Curtiss et al. \n"); 155 | print(" L. A. Curtiss et al. J. Chem. Phys 104, 5148, (1996) \n "); 156 | print(" E = E(QCISD(T) + DEMP2 + HLC + ZPEScaled\n"); 157 | print(" (all energies in Hartrees) \n"); 158 | print(" Molecule : %s\n", molecule); 159 | print(" Charge : %18d\n", charge); 160 | print(" Mult : %18d\n", mult); 161 | print(" Scaling Factor : %18.3lf\n", Scale); 162 | print(" ZPE : %18.10lf\n", ZPE); 163 | print(" ZPEScaled : %18.10lf\n", ZPEScaled); 164 | print(" MP2 (small) : %18.10lf\n", ESmallMP2); 165 | print(" MP2 (big) : %18.10lf\n", EBigMP2); 166 | print(" DEMP2 : %18.10lf\n", DEMP2); 167 | print(" QCISD(T) : %18.10lf\n", EQCISDT); 168 | print(" alpha elecs : %18d\n", aElectrons); 169 | print(" beta elecs : %18d\n", bElectrons); 170 | print(" alpha : %18.3lf\n", alpha); 171 | print(" beta : %18.3lf\n", beta); 172 | print(" HLC : %18.10lf\n", HLC); 173 | print(" Final En : %18.10lf\n", FinalEnergy); 174 | print(" ------------------------------------------------------------\n\n"); 175 | 176 | 177 | 178 | END 179 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/ccCA_CBS_1.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos and Frank Neese 2 | # Revised: June of 2024 3 | # 4 | # 5 | # This is the ccCA-CBS-1 scheme by N. J. DeYonker, 6 | # T. R. Cundari, and A. K. Wilson based on: 7 | # J. Chem. Phys. 124, 114104 (2006) 8 | # 9 | # In the current implementation we perform the following steps: 10 | # 11 | # Step 1. A single point calculation with B3LYP/6-31G* 12 | # 13 | # Step 2. Based on the geometry decide if we are working with 14 | # an atom or a molecule 15 | # 16 | # Step 3. If it is a molecule do a geometry optimization and a 17 | # Frequency calculation. Get ZPEScaled 18 | # 19 | # Step 4. Perform a calculation using MP2/aug-cc-pVDZ (EMP2_aDZ) 20 | # 21 | # Step 5. Perform a calculation using MP2/aug-cc-pVTZ (EMP2_aTZ) 22 | # 23 | # Step 6. Perform a calculation using MP2/aug-cc-pVTZ (EMP2_aTZ) 24 | # 25 | # Step 7. Evaluate ERef= (E(aQZ)*(aDZ) - E(aTZ)^2)/(E(aQZ)+E(aDZ)-2*E(aTZ) 26 | # 27 | # Step 8. Perform a calculation using MP2/cc-pVTZ (EMP2_TZ) 28 | # 29 | # Step 9. Perform a calculation using QCISD(T)/cc-pVTZ (EQCISDT_TZ) 30 | # 31 | # Step 10.Evaluate DE_QCI = E(QCISD(T)/cc-pVTZ - E(MP2/cc-pVTZ) 32 | # 33 | # Step 11.Perform a calculation using MP2/NoFrozenCore/aug-cc-pCVTZ (EMP2Full) 34 | # 35 | # Step 12.Evaluate core-valence correction DECV = EMP2Full - EMP2_aTZ 36 | # 37 | # Step 13.Sum all terms to get final energy: 38 | # FinalEnergy = ERef + ZPEScaled + DE_QCI + DECV; 39 | # 40 | # 41 | # NOTE 1: For reference energy we use the extapolated CBS/MP2 energy 42 | # calculated with the extrapolation scheme proposed by S.S. Xantheas 43 | # and T.H. Dunning (JCP 97, 18-19 (1993) 44 | # and David Feller (J. Chem. Phys. 1993, 98, 7059-7071) 45 | # that uses the function: 46 | # E(X) = E(CBS)+ Bexp(-Cx) 47 | # for the total energy. Using this form for the energy and DZ,TZ and 48 | # QZ basis sets the E(CBS) can be estimated as: 49 | # E(CBS)= (E(DZ)*E(QZ)-E(TZ)*E(TZ))/(E(QZ)+E(DZ)-2E(TZ) 50 | # NOTE 2: For MP2 we use the RI version 51 | # 52 | # 53 | # --------------------------------------------------------------- 54 | # -------------------- Variables ------------------------------ 55 | # ---------- Variables that could be adjusted using 'with'----- 56 | Variable molecule; 57 | Variable charge = 0; 58 | Variable mult = 1; 59 | Variable Scale = 0.9854; # The scaling factor for the ZPE 60 | # ----------------- Rest of variables -------------------------- 61 | variable ZPE, ZPEScaled; # The ZPE correction 62 | variable EMP2_aDZ, EMP2_aTZ, EMP2_aQZ; # MP2 with small and big basis sets 63 | variable ERef; # The total Reference energy 64 | variable EMP2_TZ, EQCISDT_TZ, DE_QCI; # The total energies with QCISD(T) and MP2 for higher order correction 65 | variable EMP2Full, DECV; # Full MP2, MP2 with frozen core and DCV 66 | variable HartreeToKcal; 67 | variable FinalEnergy; 68 | variable isMolecule = true; 69 | Geometry myGeom; 70 | Variable nAtoms = 0; 71 | 72 | # ------------------------------------------------------------- 73 | # (Calculation 1) 74 | # Single point calculation using B3LYP/6-31G* 75 | # ------------------------------------------------------------- 76 | New_Step 77 | !B3LYP 6-31G* VeryTightSCF DefGrid3 78 | *xyzfile &{charge} &{mult} &{molecule} 79 | STEP_END 80 | myGeom.Read(); 81 | nAtoms = myGeom.GetNumOfAtoms(); 82 | if (nAtoms = 1) then 83 | print("We are working with an atom\n"); 84 | isMolecule = false; 85 | else 86 | print("We are working with a molecule\n"); 87 | endIf 88 | 89 | 90 | # ------------------------------------------------------------- 91 | # (Calculation 2) If we are working with a molecule then 92 | # optimize the geometry and get the ZPE 93 | # ------------------------------------------------------------- 94 | if (isMolecule) then 95 | New_Step 96 | !B3LYP 6-31G* VeryTightSCF Opt Freq DefGrid3 97 | STEP_END 98 | ZPE.readProperty(propertyName="THERMO_ZPE"); 99 | else 100 | ZPE = 0.0; 101 | endIf 102 | ZPEScaled = Scale*ZPE; 103 | 104 | # ------------------------------------------------------------- 105 | # (Calculation 3) 106 | # MP2 Energy with aug-cc-pVDZ (for CBS reference energy) 107 | # ------------------------------------------------------------- 108 | New_Step 109 | !MP2 aug-cc-pVDZ VeryTightSCF 110 | STEP_END 111 | EMP2_aDZ.readProperty(propertyName="MP2_TOTAL_ENERGY"); 112 | 113 | # ------------------------------------------------------------- 114 | # (Calculation 4) 115 | # MP2 Energy with aug-cc-pVTZ (for CBS reference energy) 116 | # ------------------------------------------------------------- 117 | New_Step 118 | !MP2 aug-cc-pVTZ VeryTightSCF 119 | STEP_END 120 | EMP2_aTZ.readProperty(propertyName="MP2_TOTAL_ENERGY"); 121 | 122 | # -------------------------------------------------------------- 123 | # (Calculation 5) 124 | # MP2 Energy with aug-cc-pVQZ (for CBS reference energy) 125 | # -------------------------------------------------------------- 126 | New_Step 127 | !MP2 aug-cc-pVQZ VeryTightSCF 128 | STEP_END 129 | EMP2_aQZ.readProperty(propertyName="MP2_TOTAL_ENERGY"); 130 | 131 | 132 | # -------------------------------------------------------------- 133 | # Calculate ERef= (E(aQZ)*(aDZ) - E(aTZ)^2)/(E(aQZ)+E(aDZ)-2*E(aTZ) 134 | # -------------------------------------------------------------- 135 | ERef = ((EMP2_aQZ*EMP2_aDZ) -(EMP2_aTZ*EMP2_aTZ))/((EMP2_aQZ+EMP2_aDZ)-(2*EMP2_aTZ)); 136 | 137 | # -------------------------------------------------------------- 138 | # (Calculation 6) 139 | # MP2 Energy with cc-pVTZ (for QCISD(T) correction) 140 | # -------------------------------------------------------------- 141 | New_Step 142 | !MP2 cc-pVTZ VeryTightSCF 143 | STEP_END 144 | EMP2_TZ.readProperty(propertyName="MP2_TOTAL_ENERGY"); 145 | 146 | # -------------------------------------------------------------- 147 | # (Calculation 7) 148 | # QCISD(T) Energy with cc-pVTZ (for QCISD(T) correction 149 | # -------------------------------------------------------------- 150 | New_Step 151 | !QCISD(T) cc-pVTZ VeryTightSCF 152 | STEP_END 153 | EQCISDT_TZ.readProperty(propertyName="MDCI_TOTAL_ENERGY"); 154 | 155 | # -------------------------------------------------------------- 156 | # Evaluate the QCISD(T) correction 157 | # DE_QCI = E(QCISD(T)/cc-pVTZ - E(MP2/cc-pVTZ) 158 | # -------------------------------------------------------------- 159 | DE_QCI = EQCISDT_TZ - EMP2_TZ; 160 | 161 | # -------------------------------------------------------------- 162 | # (Calculation 8) 163 | # MP2 Full 164 | # -------------------------------------------------------------- 165 | New_Step 166 | !MP2 NoFrozenCore aug-cc-pCVTZ VeryTightSCF 167 | STEP_END 168 | EMP2Full.readProperty(propertyName="MP2_TOTAL_ENERGY"); 169 | 170 | # -------------------------------------------------------------- 171 | # Evaluate core valence correction 172 | # DECV = EMP2Full - EMP2_aTZ; 173 | # -------------------------------------------------------------- 174 | DECV = EMP2Full - EMP2_aTZ; 175 | 176 | # -------------------------------------------------------------- 177 | # Sum up the terms to get the final energy 178 | # FinalEnergy = ERef + ZPEScaled + DE_QCI + DECV; 179 | # -------------------------------------------------------------- 180 | FinalEnergy = ERef + ZPEScaled + DE_QCI + DECV; 181 | 182 | 183 | print("\n\n-------------------------------------------------------\n"); 184 | print(" ccCA-CBS-1 composite scheme by: \n"); 185 | print(" N. J. DeYonker, T. R. Cundari, and A. K. Wilson\n"); 186 | print(" J. Chem. Phys. 124, 114104 (2006) \n"); 187 | print(" E = ERef + ZPEScaled + DE_QCI + DECV\n"); 188 | print(" (all energies in Hartrees) \n"); 189 | print(" Molecule : %s\n", molecule); 190 | print(" Charge : %18d\n", charge); 191 | print(" Mult : %18d\n", mult); 192 | print(" Scaling Factor : %18.3lf\n", Scale); 193 | print(" ZPE : %18.10lf\n", ZPE); 194 | print(" ZPEScaled : %18.10lf\n", ZPEScaled); 195 | print(" E(MP2/aug-cc-pVDZ) : %18.10lf\n", EMP2_aDZ); 196 | print(" E(MP2/aug-cc-pVTZ) : %18.10lf\n", EMP2_aTZ); 197 | print(" E(MP2/aug-cc-pVQZ) : %18.10lf\n", EMP2_aQZ); 198 | print(" ERef : %18.10lf\n", ERef); 199 | print(" E(MP2/cc-pVTZ) : %18.10lf\n", EMP2_TZ); 200 | print(" E(QCISD(T)/cc-pVTZ : %18.10lf\n", EQCISDT_TZ); 201 | print(" QCISD(T) correction : %18.10lf\n", DE_QCI); 202 | print(" E(MP2/No Frozen core) : %18.10lf\n", EMP2Full); 203 | print(" Core-Valence correction : %18.10lf\n", DECV); 204 | print(" Final Energy : %18.10lf\n", FinalEnergy); 205 | print(" ------------------------------------------------------------\n\n"); 206 | 207 | EndRun 208 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/ccCA_CBS_2.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos and Frank Neese 2 | # Revised: June of 2024 3 | # 4 | # 5 | # This is the ccCA-CBS-1 scheme by N. J. DeYonker, 6 | # T. R. Cundari, and A. K. Wilson based on: 7 | # J. Chem. Phys. 124, 114104 (2006) 8 | # 9 | # In the current implementation we perform the following steps: 10 | # 11 | # Step 1. A single point calculation with B3LYP/6-31G* 12 | # 13 | # Step 2. Based on the geometry decide if we are working with 14 | # an atom or a molecule 15 | # 16 | # Step 3. If it is a molecule do a geometry optimization and a 17 | # Frequency calculation. Get ZPEScaled 18 | # 19 | # Step 4. Perform a calculation using MP2/aug-cc-pVDZ (EMP2_aDZ) 20 | # 21 | # Step 5. Perform a calculation using MP2/aug-cc-pVTZ (EMP2_aTZ) 22 | # 23 | # Step 6. Perform a calculation using MP2/aug-cc-pVTZ (EMP2_aTZ) 24 | # 25 | # Step 7. Evaluate ERef= E(CBS)= [eE(TZ)-E(DZ)+D(-exp(-1)E(TZ)+E(QZ)) ]/[ exp(-1)-D(exp(-1)-1)] 26 | # 27 | # Step 8. Perform a calculation using MP2/cc-pVTZ (EMP2_TZ) 28 | # 29 | # Step 9. Perform a calculation using QCISD(T)/cc-pVTZ (EQCISDT_TZ) 30 | # 31 | # Step 10.Evaluate DE_QCI = E(QCISD(T)/cc-pVTZ - E(MP2/cc-pVTZ) 32 | # 33 | # Step 11.Perform a calculation using MP2/NoFrozenCore/aug-cc-pCVTZ (EMP2Full) 34 | # 35 | # Step 12.Evaluate core-valence correction DECV = EMP2Full - EMP2_aTZ 36 | # 37 | # Step 13.Sum all terms to get final energy: 38 | # FinalEnergy = ERef + ZPEScaled + DE_QCI + DECV; 39 | 40 | # 41 | # NOTE 1: For reference energy we use the mixed exponential/Gaussian 42 | # function for the total energy devised by Peterson et al.: 43 | # K. A. Peterson, D. E. Woon, and T. H. Dunning, Jr., 44 | # J. Chem. Phys. 100,7410,(1994) 45 | # 46 | # E(x) = A(CBS)+BExp[-(x-1)]+Cexp[-(x-1)^2] 47 | # 48 | # Resulting in the final equation: 49 | # 50 | # E(CBS)= [eE(TZ)-E(DZ)+D(-exp(-1)E(TZ)+E(QZ)) ]/[ exp(-1)-D(exp(-1)-1)] 51 | # 52 | # with D= [exp(-1)-exp(-5)]/[exp(-9)-exp(-3)] 53 | # 54 | # NOTE 2: For MP2 we use the RI version 55 | # 56 | # --------------------------------------------------------------- 57 | # -------------------- Variables ------------------------------ 58 | # ---------- Variables that could be adjusted using 'with'----- 59 | Variable molecule; 60 | Variable charge = 0; 61 | Variable mult = 1; 62 | Variable Scale = 0.9854; # The scaling factor for the ZPE 63 | # ----------------- Rest of variables -------------------------- 64 | variable ZPE, ZPEScaled; # The ZPE correction 65 | variable EMP2_aDZ, EMP2_aTZ, EMP2_aQZ; # MP2 with small and big basis sets 66 | variable D; # The D variable 67 | variable ERef; # The total Reference energy 68 | variable EMP2_TZ, EQCISDT_TZ, DE_QCI; # The total energies with QCISD(T) and MP2 for higher order correction 69 | variable EMP2Full, DECV; # Full MP2, MP2 with frozen core and DCV 70 | variable HartreeToKcal; 71 | variable FinalEnergy; 72 | variable isMolecule = true; 73 | Geometry myGeom; 74 | Variable nAtoms = 0; 75 | 76 | # ------------------------------------------------------------- 77 | # (Calculation 1) 78 | # Single point calculation using B3LYP/6-31G* 79 | # ------------------------------------------------------------- 80 | New_Step 81 | !B3LYP 6-31G* VeryTightSCF DefGrid3 82 | *xyzfile &{charge} &{mult} &{molecule} 83 | STEP_END 84 | myGeom.Read(); 85 | nAtoms = myGeom.GetNumOfAtoms(); 86 | if (nAtoms = 1) then 87 | print("We are working with an atom\n"); 88 | isMolecule = false; 89 | else 90 | print("We are working with a molecule\n"); 91 | endIf 92 | 93 | 94 | # ------------------------------------------------------------- 95 | # (Calculation 2) If we are working with a molecule then 96 | # optimize the geometry and get the ZPE 97 | # ------------------------------------------------------------- 98 | if (isMolecule) then 99 | New_Step 100 | !B3LYP 6-31G* VeryTightSCF Opt Freq DefGrid3 101 | STEP_END 102 | ZPE.readProperty(propertyName="THERMO_ZPE"); 103 | else 104 | ZPE = 0.0; 105 | endIf 106 | ZPEScaled = Scale*ZPE; 107 | 108 | # ------------------------------------------------------------- 109 | # (Calculation 3) 110 | # MP2 Energy with aug-cc-pVDZ (for CBS reference energy) 111 | # ------------------------------------------------------------- 112 | New_Step 113 | !MP2 aug-cc-pVDZ VeryTightSCF 114 | STEP_END 115 | EMP2_aDZ.readProperty(propertyName="MP2_TOTAL_ENERGY"); 116 | 117 | # ------------------------------------------------------------- 118 | # (Calculation 4) 119 | # MP2 Energy with aug-cc-pVTZ (for CBS reference energy) 120 | # ------------------------------------------------------------- 121 | New_Step 122 | !MP2 aug-cc-pVTZ VeryTightSCF 123 | STEP_END 124 | EMP2_aTZ.readProperty(propertyName="MP2_TOTAL_ENERGY"); 125 | 126 | # -------------------------------------------------------------- 127 | # (Calculation 5) 128 | # MP2 Energy with aug-cc-pVQZ (for CBS reference energy) 129 | # -------------------------------------------------------------- 130 | New_Step 131 | !MP2 aug-cc-pVQZ VeryTightSCF 132 | STEP_END 133 | EMP2_aQZ.readProperty(propertyName="MP2_TOTAL_ENERGY"); 134 | 135 | # -------------------------------------------------------------- 136 | # Calculate ERef= (E(aQZ)*(aDZ) - E(aTZ)^2)/(E(aQZ)+E(aDZ)-2*E(aTZ) 137 | # -------------------------------------------------------------- 138 | D = (exp(-1)-exp(-3))/(exp(-9)-exp(-5)); 139 | ERef = (e*EMP2_aTZ-EMP2_aDZ + D*(-exp(-1)*EMP2_aTZ+EMP2_aQZ))/((e-1)-D*(exp(-1)-1)); 140 | 141 | # -------------------------------------------------------------- 142 | # (Calculation 6) 143 | # MP2 Energy with cc-pVTZ (for QCISD(T) correction) 144 | # -------------------------------------------------------------- 145 | New_Step 146 | !MP2 cc-pVTZ VeryTightSCF 147 | STEP_END 148 | EMP2_TZ.readProperty(propertyName="MP2_TOTAL_ENERGY"); 149 | 150 | 151 | # -------------------------------------------------------------- 152 | # (Calculation 7) 153 | # QCISD(T) Energy with cc-pVTZ (for QCISD(T) correction 154 | # -------------------------------------------------------------- 155 | New_Step 156 | !QCISD(T) cc-pVTZ VeryTightSCF 157 | STEP_END 158 | EQCISDT_TZ.readProperty(propertyName="MDCI_TOTAL_ENERGY"); 159 | 160 | # -------------------------------------------------------------- 161 | # Evaluate the QCISD(T) correction 162 | # DE_QCI = E(QCISD(T)/cc-pVTZ - E(MP2/cc-pVTZ) 163 | # -------------------------------------------------------------- 164 | DE_QCI = EQCISDT_TZ - EMP2_TZ; 165 | 166 | # -------------------------------------------------------------- 167 | # (Calculation 8) 168 | # MP2 Full 169 | # -------------------------------------------------------------- 170 | New_Step 171 | !MP2 NoFrozenCore aug-cc-pCVTZ VeryTightSCF 172 | STEP_END 173 | EMP2Full.readProperty(propertyName="MP2_TOTAL_ENERGY"); 174 | 175 | # -------------------------------------------------------------- 176 | # Evaluate core valence correction 177 | # DECV = EMP2Full - EMP2_aTZ; 178 | # -------------------------------------------------------------- 179 | DECV = EMP2Full - EMP2_aTZ; 180 | 181 | # -------------------------------------------------------------- 182 | # Sum up the terms to get the final energy 183 | # FinalEnergy = ERef + ZPEScaled + DE_QCI + DECV; 184 | # -------------------------------------------------------------- 185 | FinalEnergy = ERef + ZPEScaled + DE_QCI + DECV; 186 | 187 | 188 | print("\n\n-------------------------------------------------------\n"); 189 | print(" ccCA-CBS-2 composite scheme by: \n"); 190 | print(" N. J. DeYonker, T. R. Cundari, and A. K. Wilson\n"); 191 | print(" J. Chem. Phys. 124, 114104 (2006) \n"); 192 | print(" E = ERef + ZPEScaled + DE_QCI + DECV\n"); 193 | print(" (all energies in Hartrees) \n"); 194 | print(" Molecule : %s\n", molecule); 195 | print(" Charge : %18d\n", charge); 196 | print(" Mult : %18d\n", mult); 197 | print(" Scaling Factor : %18.3lf\n", Scale); 198 | print(" ZPE : %18.10lf\n", ZPE); 199 | print(" ZPEScaled : %18.10lf\n", ZPEScaled); 200 | print(" E(MP2/aug-cc-pVDZ) : %18.10lf\n", EMP2_aDZ); 201 | print(" E(MP2/aug-cc-pVTZ) : %18.10lf\n", EMP2_aTZ); 202 | print(" E(MP2/aug-cc-pVQZ) : %18.10lf\n", EMP2_aQZ); 203 | print(" ERef : %18.10lf\n", ERef); 204 | print(" E(MP2/cc-pVTZ) : %18.10lf\n", EMP2_TZ); 205 | print(" E(QCISD(T)/cc-pVTZ : %18.10lf\n", EQCISDT_TZ); 206 | print(" QCISD(T) correction : %18.10lf\n", DE_QCI); 207 | print(" E(MP2/No Frozen core) : %18.10lf\n", EMP2Full); 208 | print(" Core-Valence correction : %18.10lf\n", DECV); 209 | print(" Final Energy : %18.10lf\n", FinalEnergy); 210 | print(" ------------------------------------------------------------\n\n"); 211 | 212 | EndRun 213 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/ccCA_DZ_QCISD_T.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos and Frank Neese 2 | # Revised: June of 2024 3 | # 4 | # 5 | # This is the ccCA-DZ-QCISD(T) scheme by N. J. DeYonker, 6 | # T. R. Cundari, and A. K. Wilson based on: 7 | # J. Chem. Phys. 124, 114104 (2006) 8 | # 9 | # In the current implementation we perform the following steps: 10 | # 11 | # Step 1. A single point calculation with B3LYP/6-31G* 12 | # 13 | # Step 2. Based on the geometry decide if we are working with 14 | # an atom or a molecule 15 | # 16 | # Step 3. If it is a molecule do a geometry optimization and a 17 | # Frequency calculation. Get ZPEScaled 18 | # 19 | # Step 4. Perform a calculation using QCISD(T)/cc-pVDZ (ERef) 20 | # 21 | # Step 5. Perform a calculation using QCISD(T)/aug-cc-pVDZ (EPlus) 22 | # 23 | # Step 6. Evaluate diffusion correction (DEPlus = EPlus - ERef) 24 | # 25 | # Step 7. Perform a calculation using QCISD(T)/cc-pVTZ (EPol) 26 | # 27 | # Step 8. Evaluate polarization correction (DEPol = EPol - ERef) 28 | # 29 | # Step 9. Perform a calculation using MP2/NoFrozenCore/aug-cc-pCVDZ (EMP2Full) 30 | # 31 | # Step 10.Perform a calculation using MP2/Frozen Core/aug-cc-pVDZ (EMP2FC) 32 | # 33 | # Step 11.Evaluate core-valence correction DECV = EMP2Full - EMP2FC (DECV) 34 | # 35 | # Step 12.Sum up all terms to get final energy: 36 | # FinalEnergy = ERef + ZPEScaled + DEPlus + DEPol + DECV; 37 | # 38 | # Step 13.Print the results 39 | # 40 | # 41 | # NOTE 1: For reference energy instead of MP4 we use QCISD(T). 42 | # In this case we do not add the DE(QCI) correction 43 | # 44 | # NOTE 2: For DECV correction we use aug-cc-pVDZ for the MP2 frozen 45 | # core calculation. (Maybe table 1 has a typo) 46 | # 47 | # ****************************************** METHOD ************************************************ 48 | # 49 | # 50 | # --------------------------------------------------------------- 51 | # -------------------- Variables ------------------------------ 52 | # ---------- Variables that could be adjusted using 'with'----- 53 | Variable molecule; 54 | Variable charge = 0; 55 | Variable mult = 1; 56 | Variable Scale = 0.9854; # The scaling factor for the ZPE# 57 | # ----------------- Rest of variables -------------------------- 58 | # Define some variables 59 | variable ZPE, ZPEScaled; # The ZPE correction 60 | variable ERef; # The total Reference energy 61 | variable EPlus, DEPlus; # The total 'diffuse energy' and the corresponding correction 62 | variable EPol, DEPol; # The total 'polarization energy' and the corresponding correction 63 | variable ECV, DECV; # The core valence energy and the corresponding correction 64 | variable EMP2Full, EMP2FC; # Full MP2, MP2 with frozen core and DCV 65 | variable HartreeToKcal; 66 | variable FinalEnergy; 67 | variable isMolecule = true; 68 | Geometry myGeom; 69 | Variable nAtoms = 0; 70 | 71 | # ------------------------------------------------------------- 72 | # (Calculation 1) 73 | # Single point calculation using B3LYP/6-31G* 74 | # ------------------------------------------------------------- 75 | New_Step 76 | !B3LYP 6-31G* VeryTightSCF DefGrid3 77 | *xyzfile &{charge} &{mult} &{molecule} 78 | STEP_END 79 | myGeom.Read(); 80 | nAtoms = myGeom.GetNumOfAtoms(); 81 | if (nAtoms = 1) then 82 | print("We are working with an atom\n"); 83 | isMolecule = false; 84 | else 85 | print("We are working with a molecule\n"); 86 | endIf 87 | 88 | 89 | # ------------------------------------------------------------- 90 | # (Calculation 2) If we are working with a molecule then 91 | # optimize the geometry and get the ZPE 92 | # ------------------------------------------------------------- 93 | if (isMolecule) then 94 | New_Step 95 | !B3LYP 6-31G* VeryTightSCF Opt Freq DefGrid3 96 | STEP_END 97 | ZPE.readProperty(propertyName="THERMO_ZPE"); 98 | else 99 | ZPE = 0.0; 100 | endIf 101 | ZPEScaled = Scale*ZPE; 102 | 103 | # ------------------------------------------------------------- 104 | # (Calculation 3) 105 | # QCISD(T)/cc-pVDZ Reference energy 106 | # ------------------------------------------------------------- 107 | New_Step 108 | !QCISD(T) cc-pVDZ VeryTightSCF 109 | STEP_END 110 | ERef.ReadProperty(propertyName="MDCI_TOTAL_ENERGY"); 111 | 112 | # ------------------------------------------------------------- 113 | # (Calculation 4) 114 | # QCISD(T)/aug-cc-pVDZ EPlus 115 | # ------------------------------------------------------------- 116 | New_Step 117 | !QCISD(T) aug-cc-pVDZ VeryTightSCF 118 | STEP_END 119 | EPlus.ReadProperty(propertyName="MDCI_TOTAL_ENERGY"); 120 | 121 | # ------------------------------------------------------------- 122 | # Evaluate Diffusion correction DEPlus 123 | # ------------------------------------------------------------- 124 | DEPlus = EPlus - ERef; 125 | 126 | # ------------------------------------------------------------- 127 | # (Calculation 5) 128 | # QCISD(T)/cc-pVTZ EPol 129 | # ------------------------------------------------------------- 130 | # DE polarization 131 | New_Step 132 | !QCISD(T) cc-pVTZ VeryTightSCF 133 | STEP_END 134 | EPol.ReadProperty(propertyName="MDCI_Total_Energy"); 135 | 136 | # ------------------------------------------------------------- 137 | # Evaluate Polarization correction DEPol 138 | # ------------------------------------------------------------- 139 | DEPol = EPol - ERef; 140 | 141 | # ------------------------------------------------------------- 142 | # (Calculation 6) 143 | # MP2/NoFrozenCore/aug-cc-pCVDZ 144 | # ------------------------------------------------------------- 145 | New_Step 146 | !MP2 NoFrozenCore aug-cc-pCVDZ VeryTightSCF 147 | STEP_END 148 | EMP2Full.readProperty(propertyName="MP2_TOTAL_ENERGY"); 149 | 150 | # ------------------------------------------------------------- 151 | # (Calculation 7) 152 | # MP2/Frozen Core/aug-cc-pVTZ 153 | # ------------------------------------------------------------- 154 | New_Step 155 | !MP2 aug-cc-pVDZ VeryTightSCF 156 | STEP_END 157 | EMP2FC.readProperty(propertyName="MP2_TOTAL_ENERGY"); 158 | 159 | 160 | # ------------------------------------------------------------- 161 | # Evaluate Core-Valence correction 162 | # ------------------------------------------------------------- 163 | DECV = EMP2Full - EMP2FC; 164 | 165 | # -------------------------------------------------------------- 166 | # Sum up the terms to get the final energy 167 | # FinalEnergy = ERef + ZPEScaled + DEPlus + DEPol + DECV; 168 | # -------------------------------------------------------------- 169 | FinalEnergy = ERef + ZPEScaled + DEPlus + DEPol + DECV; 170 | 171 | print("\n\n-------------------------------------------------------\n"); 172 | print(" ccCA-DZ-QCISD(T) composite scheme by: \n"); 173 | print(" N. J. DeYonker, T. R. Cundari, and A. K. Wilson\n"); 174 | print(" J. Chem. Phys. 124, 114104 (2006) \n"); 175 | print(" E = ERef + ZPEScaled + DEPlus + DEPol + DECV\n"); 176 | print(" (all energies in Hartrees) \n"); 177 | print(" Molecule : %s\n", molecule); 178 | print(" Charge : %18d\n", charge); 179 | print(" Mult : %18d\n", mult); 180 | print(" Scaling Factor : %18.3lf\n", Scale); 181 | print(" ZPE : %18.10lf\n", ZPE); 182 | print(" ZPEScaled : %18.10lf\n", ZPEScaled); 183 | print(" E(QCISD(T)/cc-pVDZ) (ERef) : %18.10lf\n", ERef); 184 | print(" E(QCISD(T)/aug-cc-pVDZ) (EPlus) : %18.10lf\n", EPlus); 185 | print(" Diffusion correction (DEPlus) : %18.10lf\n", DEPlus); 186 | print(" E(QCISD(T)/cc-pVTZ) (EPol) : %18.10lf\n", EPol); 187 | print(" Polarization correction (DEPol) : %18.10lf\n", DEPol); 188 | print(" E(MP2/aug-cc-pCVDZ) (EMP2Full) : %18.10lf\n", EMP2Full); 189 | print(" E(MP2/aug-cc-pVDZ (EMP2FC) : %18.10lf\n", EMP2FC); 190 | print(" Valence-Core correction (DECV) : %18.10lf\n", DECV); 191 | print(" Final Energy : %18.10lf\n", FinalEnergy); 192 | print(" ------------------------------------------------------------\n\n"); 193 | 194 | END 195 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/ccCA_TZ_QCISD_T.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos and Frank Neese 2 | # Revised: June of 2024 3 | # 4 | # 5 | # This is the ccCA-TZ-QCISD(T) scheme by N. J. DeYonker, 6 | # T. R. Cundari, and A. K. Wilson based on: 7 | # J. Chem. Phys. 124, 114104 (2006) 8 | # 9 | # 10 | # In the current implementation we perform the following steps: 11 | # 12 | # Step 1. A single point calculation with B3LYP/6-31G* 13 | # 14 | # Step 2. Based on the geometry decide if we are working with 15 | # an atom or a molecule 16 | # 17 | # Step 3. If it is a molecule do a geometry optimization and a 18 | # Frequency calculation. Get ZPEScaled 19 | # 20 | # Step 4. Perform a calculation using QCISD(T)/cc-pVTZ (ERef) 21 | # 22 | # Step 5. Perform a calculation using QCISD(T)/aug-cc-pVTZ (EPlus) 23 | # 24 | # Step 6. Evaluate diffusion correction (DEPlus = EPlus - ERef) 25 | # 26 | # Step 7. Perform a calculation using QCISD(T)/cc-pVQZ (EPol) 27 | # 28 | # Step 8. Evaluate polarization correction (DEPol = EPol - ERef) 29 | # 30 | # Step 9. Perform a calculation using MP2/NoFrozenCore/aug-cc-pCVTZ (EMP2Full) 31 | # 32 | # Step 10.Perform a calculation using MP2/Frozen Core/aug-cc-pVTZ (EMP2FC) 33 | # 34 | # Step 11.Evaluate core-valence correction DECV = EMP2Full - EMP2FC (DECV) 35 | # 36 | # Step 12.Sum up all terms to get final energy: 37 | # FinalEnergy = ERef + ZPEScaled + DEPlus + DEPol + DECV; 38 | # 39 | # Step 13.Print the results 40 | # 41 | # 42 | # 43 | # NOTE 1: For reference energy instead of MP4 we use QCISD(T). 44 | # In this case we do not add the DE(QCI) correction 45 | # 46 | # --------------------------------------------------------------- 47 | # -------------------- Variables ------------------------------ 48 | # ---------- Variables that could be adjusted using 'with'----- 49 | Variable molecule; 50 | Variable charge = 0; 51 | Variable mult = 1; 52 | Variable Scale = 0.9854; # The scaling factor for the ZPE# 53 | # ----------------- Rest of variables -------------------------- 54 | variable ZPE, ZPEScaled; # The ZPE correction 55 | variable ERef; # The total Reference energy 56 | variable EPlus, DEPlus; # The total 'diffuse energy' and the corresponding correction 57 | variable EPol, DEPol; # The total 'polarization energy' and the corresponding correction 58 | variable ECV, DECV; # The core valence energy and the corresponding correction 59 | variable EMP2Full, EMP2FC; # Full MP2, MP2 with frozen core and DCV 60 | variable HartreeToKcal; 61 | variable FinalEnergy; 62 | variable isMolecule = true; 63 | Geometry myGeom; 64 | Variable nAtoms = 0; 65 | 66 | 67 | # ------------------------------------------------------------- 68 | # (Calculation 1) 69 | # Single point calculation using B3LYP/6-31G* 70 | # ------------------------------------------------------------- 71 | New_Step 72 | !B3LYP 6-31G* VeryTightSCF DefGrid3 73 | *xyzfile &{charge} &{mult} &{molecule} 74 | STEP_END 75 | myGeom.Read(); 76 | nAtoms = myGeom.GetNumOfAtoms(); 77 | if (nAtoms = 1) then 78 | print("We are working with an atom\n"); 79 | isMolecule = false; 80 | else 81 | print("We are working with a molecule\n"); 82 | endIf 83 | 84 | 85 | # ------------------------------------------------------------- 86 | # (Calculation 2) If we are working with a molecule then 87 | # optimize the geometry and get the ZPE 88 | # ------------------------------------------------------------- 89 | if (isMolecule) then 90 | New_Step 91 | !B3LYP 6-31G* VeryTightSCF Opt Freq DefGrid3 92 | STEP_END 93 | ZPE.readProperty(propertyName="THERMO_ZPE"); 94 | else 95 | ZPE = 0.0; 96 | endIf 97 | ZPEScaled = Scale*ZPE; 98 | 99 | # ------------------------------------------------------------- 100 | # (Calculation 3) 101 | # QCISD(T)/cc-pVTZ Reference energy 102 | # ------------------------------------------------------------- 103 | New_Step 104 | !QCISD(T) cc-pVTZ VeryTightSCF 105 | STEP_END 106 | ERef.ReadProperty(propertyName="MDCI_TOTAL_ENERGY"); 107 | 108 | 109 | # ------------------------------------------------------------- 110 | # (Calculation 4) 111 | # QCISD(T)/aug-cc-pVTZ EPlus 112 | # ------------------------------------------------------------- 113 | New_Step 114 | !QCISD(T) aug-cc-pVTZ VeryTightSCF 115 | STEP_END 116 | EPlus.ReadProperty(propertyName="MDCI_TOTAL_ENERGY"); 117 | 118 | # ------------------------------------------------------------- 119 | # Evaluate Diffusion correction DEPlus 120 | # ------------------------------------------------------------- 121 | DEPlus = EPlus - ERef; 122 | 123 | # ------------------------------------------------------------- 124 | # (Calculation 5) 125 | # QCISD(T)/cc-pVQZ EPol 126 | # ------------------------------------------------------------- 127 | # DE polarization 128 | New_Step 129 | !QCISD(T) cc-pVQZ VeryTightSCF 130 | STEP_END 131 | EPol.ReadProperty(propertyName="MDCI_Total_Energy"); 132 | 133 | 134 | # ------------------------------------------------------------- 135 | # Evaluate Polarization correction DEPol 136 | # ------------------------------------------------------------- 137 | DEPol = EPol - ERef; 138 | 139 | # ------------------------------------------------------------- 140 | # (Calculation 6) 141 | # MP2/NoFrozenCore/aug-cc-pCVTZ 142 | # ------------------------------------------------------------- 143 | New_Step 144 | !MP2 NoFrozenCore aug-cc-pCVTZ VeryTightSCF 145 | STEP_END 146 | EMP2Full.readProperty(propertyName="MP2_TOTAL_ENERGY"); 147 | 148 | # ------------------------------------------------------------- 149 | # (Calculation 7) 150 | # MP2/Frozen Core/aug-cc-pVTZ 151 | # ------------------------------------------------------------- 152 | New_Step 153 | !MP2 aug-cc-pVTZ VeryTightSCF 154 | STEP_END 155 | EMP2FC.readProperty(propertyName="MP2_TOTAL_ENERGY"); 156 | 157 | # ------------------------------------------------------------- 158 | # Evaluate Core-Valence correction 159 | # ------------------------------------------------------------- 160 | DECV = EMP2Full - EMP2FC; 161 | 162 | # -------------------------------------------------------------- 163 | # Sum up the terms to get the final energy 164 | # FinalEnergy = ERef + ZPEScaled + DEPlus + DEPol + DECV; 165 | # -------------------------------------------------------------- 166 | FinalEnergy = ERef + ZPEScaled + DEPlus + DEPol + DECV; 167 | 168 | print("\n\n-------------------------------------------------------\n"); 169 | print(" ccCA-TZ-QCISD(T) composite scheme by: \n"); 170 | print(" N. J. DeYonker, T. R. Cundari, and A. K. Wilson\n"); 171 | print(" J. Chem. Phys. 124, 114104 (2006) \n"); 172 | print(" E = ERef + ZPEScaled + DEPlus + DEPol + DECV\n"); 173 | print(" (all energies in Hartrees) \n"); 174 | print(" Molecule : %s\n", molecule); 175 | print(" Charge : %18d\n", charge); 176 | print(" Mult : %18d\n", mult); 177 | print(" Scaling Factor : %18.3lf\n", Scale); 178 | print(" ZPE : %18.10lf\n", ZPE); 179 | print(" ZPEScaled : %18.10lf\n", ZPEScaled); 180 | print(" E(QCISD(T)/cc-pVTZ) (ERef) : %18.10lf\n", ERef); 181 | print(" E(QCISD(T)/aug-cc-pVTZ) (EPlus) : %18.10lf\n", EPlus); 182 | print(" Diffusion correction (DEPlus) : %18.10lf\n", DEPlus); 183 | print(" E(QCISD(T)/cc-pVQZ) (EPol) : %18.10lf\n", EPol); 184 | print(" Polarization correction (DEPol) : %18.10lf\n", DEPol); 185 | print(" E(MP2/aug-cc-pCVTZ) (EMP2Full) : %18.10lf\n", EMP2Full); 186 | print(" E(MP2/aug-cc-pVTZ (EMP2FC) : %18.10lf\n", EMP2FC); 187 | print(" Valence-Core correction (DECV) : %18.10lf\n", DECV); 188 | print(" Final Energy : %18.10lf\n", FinalEnergy); 189 | print(" ------------------------------------------------------------\n\n"); 190 | 191 | END 192 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/ccCA_aTZ_QCISD_T.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos and Frank Neese 2 | # Revised: June of 2024 3 | # 4 | # 5 | # This is the ccCA-aTZ-QCISD(T) scheme by N. J. DeYonker, 6 | # T. R. Cundari, and A. K. Wilson based on: 7 | # J. Chem. Phys. 124, 114104 (2006) 8 | # 9 | # 10 | # In the current implementation we perform the following steps: 11 | # 12 | # Step 1. A single point calculation with B3LYP/6-31G* 13 | # 14 | # Step 2. Based on the geometry decide if we are working with 15 | # an atom or a molecule 16 | # 17 | # Step 3. If it is a molecule do a geometry optimization and a 18 | # Frequency calculation. Get ZPEScaled 19 | # 20 | # Step 4. Perform a calculation using QCISD(T)/aug-cc-pVTZ (ERef) 21 | # 22 | # Step 7. Perform a calculation using MP2/aug-cc-pVTZ (EMP2Small) 23 | # 24 | # Step 8. Perform a calculation using MP2/aug-cc-pVQZ (EMP2Big) 25 | # 26 | # Step 9. Evaluate polarization correction (DEPol = EMP2Big - EMP2Small) 27 | # 28 | # Step 9. Perform a calculation using MP2/NoFrozenCore/aug-cc-pCVTZ (EMP2Full) 29 | # 30 | # Step 11.Evaluate core-valence correction DECV = EMP2Full - EMP2Small (DECV) 31 | # 32 | # Step 12.Sum up all terms to get final energy: 33 | # FinalEnergy = ERef + ZPEScaled + DEPol + DECV; 34 | # 35 | # Step 13.Print the results 36 | # 37 | # 38 | # 39 | # NOTE 1: For reference energy instead of MP4 we use QCISD(T). 40 | # In this case we do not add the DE(QCI) correction# 41 | # --------------------------------------------------------------- 42 | # -------------------- Variables ------------------------------ 43 | # ---------- Variables that could be adjusted using 'with'----- 44 | Variable molecule; 45 | Variable charge = 0; 46 | Variable mult = 1; 47 | Variable Scale = 0.9854; # The scaling factor for the ZPE# 48 | # ----------------- Rest of variables -------------------------- 49 | # Define some variables 50 | variable ZPE, ZPEScaled; # The ZPE correction 51 | variable ERef; # The total Reference energy 52 | variable EMP2Small, EMP2Big; # The MP2 energies with aug-cc-pVTZ and aug-cc-pVQZ 53 | variable EPol, DEPol; # The total 'polarization energy' and the corresponding correction 54 | variable ECV, DECV; # The core valence energy and the corresponding correction 55 | variable EMP2Full; # Full MP2, MP2 with frozen core and DCV 56 | variable HartreeToKcal; 57 | variable FinalEnergy; 58 | variable isMolecule = true; 59 | Geometry myGeom; 60 | Variable nAtoms = 0; 61 | 62 | # ------------------------------------------------------------- 63 | # (Calculation 1) 64 | # Single point calculation using B3LYP/6-31G* 65 | # ------------------------------------------------------------- 66 | New_Step 67 | !B3LYP 6-31G* VeryTightSCF DefGrid3 68 | *xyzfile &{charge} &{mult} &{molecule} 69 | STEP_END 70 | myGeom.Read(); 71 | nAtoms = myGeom.GetNumOfAtoms(); 72 | if (nAtoms = 1) then 73 | print("We are working with an atom\n"); 74 | isMolecule = false; 75 | else 76 | print("We are working with a molecule\n"); 77 | endIf 78 | 79 | 80 | # ------------------------------------------------------------- 81 | # (Calculation 2) If we are working with a molecule then 82 | # optimize the geometry and get the ZPE 83 | # ------------------------------------------------------------- 84 | if (isMolecule) then 85 | New_Step 86 | !B3LYP 6-31G* VeryTightSCF Opt Freq DefGrid3 87 | STEP_END 88 | ZPE.readProperty(propertyName="THERMO_ZPE"); 89 | else 90 | ZPE = 0.0; 91 | endIf 92 | ZPEScaled = Scale*ZPE; 93 | 94 | # ------------------------------------------------------------- 95 | # (Calculation 3) 96 | # QCISD(T)/aug-cc-pVTZ Reference energy 97 | # ------------------------------------------------------------- 98 | New_Step 99 | !QCISD(T) aug-cc-pVTZ VeryTightSCF 100 | STEP_END 101 | ERef.ReadProperty(propertyName="MDCI_Total_Energy"); 102 | 103 | # ------------------------------------------------------------- 104 | # (Calculation 4) 105 | # MP2/aug-cc-pVTZ EMP2Small 106 | # ------------------------------------------------------------- 107 | New_Step 108 | !MP2 aug-cc-pVTZ VeryTightSCF 109 | STEP_END 110 | EMP2Small.ReadProperty(propertyName="MP2_TOTAL_ENERGY"); 111 | 112 | # ------------------------------------------------------------- 113 | # (Calculation 5) 114 | # MP2/aug-cc-pVQZ EMP2Big 115 | # ------------------------------------------------------------- 116 | New_Step 117 | !MP2 aug-cc-pVQZ VeryTightSCF 118 | STEP_END 119 | EMP2Big.ReadProperty(propertyName="MP2_TOTAL_ENERGY"); 120 | 121 | # ------------------------------------------------------------- 122 | # Evaluate Polarization correction DEPol 123 | # ------------------------------------------------------------- 124 | DEPol = EMP2Big - EMP2Small; 125 | 126 | # ------------------------------------------------------------- 127 | # (Calculation 6) 128 | # MP2/NoFrozenCore/aug-cc-pCVTZ EMP2Full 129 | # ------------------------------------------------------------- 130 | New_Step 131 | !MP2 NoFrozenCore aug-cc-pCVTZ VeryTightSCF 132 | STEP_END 133 | EMP2Full.readProperty(propertyName="MP2_TOTAL_ENERGY"); 134 | 135 | # ------------------------------------------------------------- 136 | # Evaluate Core-Valence correction 137 | # ------------------------------------------------------------- 138 | DECV = EMP2Full - EMP2Small; 139 | 140 | # -------------------------------------------------------------- 141 | # Sum up the terms to get the final energy 142 | # FinalEnergy = ERef + ZPEScaled + DEPol + DECV; 143 | # -------------------------------------------------------------- 144 | FinalEnergy = ERef + ZPEScaled + DEPol + DECV; 145 | 146 | print("\n\n-------------------------------------------------------\n"); 147 | print(" ccCA-aTZ-QCISD(T) composite scheme by: \n"); 148 | print(" N. J. DeYonker, T. R. Cundari, and A. K. Wilson\n"); 149 | print(" J. Chem. Phys. 124, 114104 (2006) \n"); 150 | print(" E = ERef + ZPEScaled + DEPol + DECV\n"); 151 | print(" (all energies in Hartrees) \n"); 152 | print(" Molecule : %s\n", molecule); 153 | print(" Charge : %18d\n", charge); 154 | print(" Mult : %18d\n", mult); 155 | print(" Scaling Factor : %18.3lf\n", Scale); 156 | print(" ZPE : %18.10lf\n", ZPE); 157 | print(" ZPEScaled : %18.10lf\n", ZPEScaled); 158 | print(" E(QCISD(T)/aug-cc-pVTZ) (ERef) : %18.10lf\n", ERef); 159 | print(" E(MP2/aug-cc-pVTZ) (EMP2Small): %18.10lf\n", EMP2Small); 160 | print(" E(MP2/aug-cc-pVQZ) (EMP2Big) : %18.10lf\n", EMP2Big); 161 | print(" Polarization correction (DEPol) : %18.10lf\n", DEPol); 162 | print(" E(MP2/aug-cc-pCVTZ) (EMP2Full) : %18.10lf\n", EMP2Full); 163 | print(" Valence-Core correction (DECV) : %18.10lf\n", DECV); 164 | print(" Final Energy : %18.10lf\n", FinalEnergy); 165 | print(" ------------------------------------------------------------\n\n"); 166 | END 167 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/lw1x-jun.cmp: -------------------------------------------------------------------------------- 1 | variable hf_dz, ec_dz, cc_dz, t_dz; 2 | variable hf_tz, ec_tz, cc_tz, t_tz; 3 | variable hf_cbs, cc_cbs, t_cbs; 4 | variable mp_fc, mp_fu, mp_cv; 5 | variable lw1x; 6 | 7 | New_Step 8 | ! DefGrid3 RIJCOSX TightPNO DLPNO-CCSD(T1)-F12 MiniPrint NoPop 9 | %Basis 10 | Basis "maug-cc-pV(D+d)Z" 11 | AuxJ "AutoAux" 12 | AuxC "AutoAux" 13 | CABS "AutoAux" 14 | End 15 | Step_End 16 | read hf_dz = MDCI_REF_ENERGY[1]; 17 | read ec_dz = MDCI_CORR_ENERGY[1]; 18 | read t_dz = MDCI_TRIPLES_ENERGY[1]; 19 | cc_dz = ec_dz-t_dz; 20 | 21 | New_Step 22 | ! DefGrid3 RIJCOSX TightPNO DLPNO-CCSD(T1)-F12 MiniPrint NoPop 23 | %Basis 24 | Basis "jun-cc-pV(T+d)Z" 25 | AuxJ "AutoAux" 26 | AuxC "AutoAux" 27 | CABS "AutoAux" 28 | End 29 | Step_End 30 | read hf_tz = MDCI_REF_ENERGY[2]; 31 | read ec_tz = MDCI_CORR_ENERGY[2]; 32 | read t_tz = MDCI_TRIPLES_ENERGY[2]; 33 | cc_tz = ec_tz-t_tz; 34 | 35 | New_Step 36 | ! DefGrid3 RIJCOSX TightPNO DLPNO-MP2 MiniPrint NoPop 37 | %Basis 38 | Basis "cc-pWCVTZ" 39 | AuxJ "AutoAux" 40 | AuxC "AutoAux" 41 | CABS "AutoAux" 42 | End 43 | Step_End 44 | read mp_fc = MP2_TOTAL_ENERGY[3]; 45 | 46 | New_Step 47 | ! DKH DefGrid3 RIJCOSX TightPNO DLPNO-MP2 MiniPrint NoPop 48 | %Method 49 | NewNCore Li 0 End 50 | NewNCore Be 0 End 51 | NewNCore B 0 End 52 | NewNCore C 0 End 53 | NewNCore N 0 End 54 | NewNCore O 0 End 55 | NewNCore F 0 End 56 | NewNCore Ne 0 End 57 | NewNCore Na 2 End 58 | NewNCore Mg 2 End 59 | NewNCore Al 2 End 60 | NewNCore Si 2 End 61 | NewNCore P 2 End 62 | NewNCore S 2 End 63 | NewNCore Cl 2 End 64 | NewNCore Ar 2 End 65 | End 66 | %Basis 67 | Basis "cc-pWCVTZ" 68 | AuxJ "AutoAux" 69 | AuxC "AutoAux" 70 | CABS "AutoAux" 71 | End 72 | Step_End 73 | read mp_fu = MP2_TOTAL_ENERGY[4]; 74 | 75 | hf_cbs = hf_tz-(hf_tz-hf_dz)*3^-5/(3^-5-2^-5); 76 | cc_cbs = cc_tz-(cc_tz-cc_dz)*3^-4.7405/(3^-4.7405-2^-4.7405); 77 | t_cbs = t_tz-(t_tz-t_dz)*3^-2.0879/(3^-2.0879-2^-2.0879); 78 | mp_cv = mp_fu-mp_fc; 79 | lw1x = hf_cbs+cc_cbs+t_cbs+mp_cv; 80 | 81 | print("\n"); 82 | print("--------------------------------\n"); 83 | print("Summary of the L-W1X Computation\n"); 84 | print("--------------------------------\n"); 85 | print("Chan, B.; Karton, A.\n"); 86 | print("J. Comput. Chem. 2022, 43, 1394\n"); 87 | print("using the L-W1X protocol with the jun basis sets\n"); 88 | print("\n"); 89 | print(" E[HF / CBS] %20.12lf\n", hf_cbs); 90 | print("DE[CCSD / CBS] %20.12lf\n", cc_cbs); 91 | print("DE[(T) / CBS] %20.12lf\n", t_cbs); 92 | print("DE[CV] %20.12lf\n", mp_cv); 93 | print(" E[L-W1X] %20.12lf\n", lw1x); 94 | print("\n"); 95 | 96 | End 97 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/lw1x-no-diffuse-on-c.cmp: -------------------------------------------------------------------------------- 1 | variable hf_dz, ec_dz, cc_dz, t_dz; 2 | variable hf_tz, ec_tz, cc_tz, t_tz; 3 | variable hf_cbs, cc_cbs, t_cbs; 4 | variable mp_fc, mp_fu, mp_cv; 5 | variable lw1x; 6 | 7 | New_Step 8 | ! DefGrid3 RIJCOSX TightPNO DLPNO-CCSD(T1)-F12 MiniPrint NoPop 9 | %Basis 10 | Basis "maug-cc-pV(D+d)Z" 11 | AuxJ "AutoAux" 12 | AuxC "AutoAux" 13 | CABS "AutoAux" 14 | NewGTO C "cc-pVDZ" End 15 | NewAuxjGTO C "AutoAux" End 16 | NewAuxcGTO C "AutoAux" End 17 | NewCabsGTO C "AutoAux" End 18 | End 19 | Step_End 20 | read hf_dz = MDCI_REF_ENERGY[1]; 21 | read ec_dz = MDCI_CORR_ENERGY[1]; 22 | read t_dz = MDCI_TRIPLES_ENERGY[1]; 23 | cc_dz = ec_dz-t_dz; 24 | 25 | New_Step 26 | ! DefGrid3 RIJCOSX TightPNO DLPNO-CCSD(T1)-F12 MiniPrint NoPop 27 | %Basis 28 | Basis "maug-cc-pV(T+d)Z" 29 | AuxJ "AutoAux" 30 | AuxC "AutoAux" 31 | CABS "AutoAux" 32 | NewGTO C "cc-pVTZ" End 33 | NewAuxjGTO C "AutoAux" End 34 | NewAuxcGTO C "AutoAux" End 35 | NewCabsGTO C "AutoAux" End 36 | End 37 | Step_End 38 | read hf_tz = MDCI_REF_ENERGY[2]; 39 | read ec_tz = MDCI_CORR_ENERGY[2]; 40 | read t_tz = MDCI_TRIPLES_ENERGY[2]; 41 | cc_tz = ec_tz-t_tz; 42 | 43 | New_Step 44 | ! DefGrid3 RIJCOSX TightPNO DLPNO-MP2 MiniPrint NoPop 45 | %Basis 46 | Basis "cc-pWCVTZ" 47 | AuxJ "AutoAux" 48 | AuxC "AutoAux" 49 | CABS "AutoAux" 50 | End 51 | Step_End 52 | read mp_fc = MP2_TOTAL_ENERGY[3]; 53 | 54 | New_Step 55 | ! DKH DefGrid3 RIJCOSX TightPNO DLPNO-MP2 MiniPrint NoPop 56 | %Method 57 | NewNCore Li 0 End 58 | NewNCore Be 0 End 59 | NewNCore B 0 End 60 | NewNCore C 0 End 61 | NewNCore N 0 End 62 | NewNCore O 0 End 63 | NewNCore F 0 End 64 | NewNCore Ne 0 End 65 | NewNCore Na 2 End 66 | NewNCore Mg 2 End 67 | NewNCore Al 2 End 68 | NewNCore Si 2 End 69 | NewNCore P 2 End 70 | NewNCore S 2 End 71 | NewNCore Cl 2 End 72 | NewNCore Ar 2 End 73 | End 74 | %Basis 75 | Basis "cc-pWCVTZ" 76 | AuxJ "AutoAux" 77 | AuxC "AutoAux" 78 | CABS "AutoAux" 79 | End 80 | Step_End 81 | read mp_fu = MP2_TOTAL_ENERGY[4]; 82 | 83 | hf_cbs = hf_tz-(hf_tz-hf_dz)*3^-5/(3^-5-2^-5); 84 | cc_cbs = cc_tz-(cc_tz-cc_dz)*3^-4.7405/(3^-4.7405-2^-4.7405); 85 | t_cbs = t_tz-(t_tz-t_dz)*3^-2.0879/(3^-2.0879-2^-2.0879); 86 | mp_cv = mp_fu-mp_fc; 87 | lw1x = hf_cbs+cc_cbs+t_cbs+mp_cv; 88 | 89 | print("\n"); 90 | print("--------------------------------\n"); 91 | print("Summary of the L-W1X Computation\n"); 92 | print("--------------------------------\n"); 93 | print("Chan, B.; Karton, A.\n"); 94 | print("J. Comput. Chem. 2022, 43, 1394\n"); 95 | print("using the L-W1X protocol with no diffuse function on C\n"); 96 | print("\n"); 97 | print(" E[HF / CBS] %20.12lf\n", hf_cbs); 98 | print("DE[CCSD / CBS] %20.12lf\n", cc_cbs); 99 | print("DE[(T) / CBS] %20.12lf\n", t_cbs); 100 | print("DE[CV] %20.12lf\n", mp_cv); 101 | print(" E[L-W1X] %20.12lf\n", lw1x); 102 | print("\n"); 103 | 104 | End 105 | -------------------------------------------------------------------------------- /HighAccuracyThermochemistry/lw1x.cmp: -------------------------------------------------------------------------------- 1 | variable hf_dz, ec_dz, cc_dz, t_dz; 2 | variable hf_tz, ec_tz, cc_tz, t_tz; 3 | variable hf_cbs, cc_cbs, t_cbs; 4 | variable mp_fc, mp_fu, mp_cv; 5 | variable lw1x; 6 | 7 | New_Step 8 | ! DefGrid3 RIJCOSX TightPNO DLPNO-CCSD(T1)-F12 MiniPrint NoPop 9 | %Basis 10 | Basis "maug-cc-pV(D+d)Z" 11 | AuxJ "AutoAux" 12 | AuxC "AutoAux" 13 | CABS "AutoAux" 14 | End 15 | Step_End 16 | read hf_dz = MDCI_REF_ENERGY[1]; 17 | read ec_dz = MDCI_CORR_ENERGY[1]; 18 | read t_dz = MDCI_TRIPLES_ENERGY[1]; 19 | cc_dz = ec_dz-t_dz; 20 | 21 | New_Step 22 | ! DefGrid3 RIJCOSX TightPNO DLPNO-CCSD(T1)-F12 MiniPrint NoPop 23 | %Basis 24 | Basis "maug-cc-pV(T+d)Z" 25 | AuxJ "AutoAux" 26 | AuxC "AutoAux" 27 | CABS "AutoAux" 28 | End 29 | Step_End 30 | read hf_tz = MDCI_REF_ENERGY[2]; 31 | read ec_tz = MDCI_CORR_ENERGY[2]; 32 | read t_tz = MDCI_TRIPLES_ENERGY[2]; 33 | cc_tz = ec_tz-t_tz; 34 | 35 | New_Step 36 | ! DefGrid3 RIJCOSX TightPNO DLPNO-MP2 MiniPrint NoPop 37 | %Basis 38 | Basis "cc-pWCVTZ" 39 | AuxJ "AutoAux" 40 | AuxC "AutoAux" 41 | CABS "AutoAux" 42 | End 43 | Step_End 44 | read mp_fc = MP2_TOTAL_ENERGY[3]; 45 | 46 | New_Step 47 | ! DKH DefGrid3 RIJCOSX TightPNO DLPNO-MP2 MiniPrint NoPop 48 | %Method 49 | NewNCore Li 0 End 50 | NewNCore Be 0 End 51 | NewNCore B 0 End 52 | NewNCore C 0 End 53 | NewNCore N 0 End 54 | NewNCore O 0 End 55 | NewNCore F 0 End 56 | NewNCore Ne 0 End 57 | NewNCore Na 2 End 58 | NewNCore Mg 2 End 59 | NewNCore Al 2 End 60 | NewNCore Si 2 End 61 | NewNCore P 2 End 62 | NewNCore S 2 End 63 | NewNCore Cl 2 End 64 | NewNCore Ar 2 End 65 | End 66 | %Basis 67 | Basis "cc-pWCVTZ" 68 | AuxJ "AutoAux" 69 | AuxC "AutoAux" 70 | CABS "AutoAux" 71 | End 72 | Step_End 73 | read mp_fu = MP2_TOTAL_ENERGY[4]; 74 | 75 | hf_cbs = hf_tz-(hf_tz-hf_dz)*3^-5/(3^-5-2^-5); 76 | cc_cbs = cc_tz-(cc_tz-cc_dz)*3^-4.7405/(3^-4.7405-2^-4.7405); 77 | t_cbs = t_tz-(t_tz-t_dz)*3^-2.0879/(3^-2.0879-2^-2.0879); 78 | mp_cv = mp_fu-mp_fc; 79 | lw1x = hf_cbs+cc_cbs+t_cbs+mp_cv; 80 | 81 | print("\n"); 82 | print("--------------------------------\n"); 83 | print("Summary of the L-W1X Computation\n"); 84 | print("--------------------------------\n"); 85 | print("Chan, B.; Karton, A.\n"); 86 | print("J. Comput. Chem. 2022, 43, 1394\n"); 87 | print("using the standard L-W1X protocol\n"); 88 | print("\n"); 89 | print(" E[HF / CBS] %20.12lf\n", hf_cbs); 90 | print("DE[CCSD / CBS] %20.12lf\n", cc_cbs); 91 | print("DE[(T) / CBS] %20.12lf\n", t_cbs); 92 | print("DE[CV] %20.12lf\n", mp_cv); 93 | print(" E[L-W1X] %20.12lf\n", lw1x); 94 | print("\n"); 95 | 96 | End 97 | -------------------------------------------------------------------------------- /IntermolecularInteractions/DLPNO-CC-Energy.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Giovanni Bistoni, January 2022 2 | # Updated: Dimitrios G. Liakos and Frank Neese June of 2024 3 | # 4 | # 5 | # This is a composite scheme for accurate calculation of hydrogen 6 | # bond interactions. For details see "The first microsolvation 7 | # step for furans: New experiments and benchmarking strategies 8 | # scheme 9 | # J. Chem. Phys. 152, 164303 (2020) 10 | # 11 | # This scheme uses a DFT optimization at the B3LYP level, ZPE 12 | # correction at the same level of theory and finaly calculation 13 | # of the electronic energy using DLPNO-CCSD(T1)/aug-cc-pWCV5Z 14 | # 15 | # # In the current implementation we perform the following steps: 16 | # 17 | # Step 1. A Geometry optimization using B3LYP-D3(BJ)/def2-QZVPP. 18 | # Get the geometry 19 | # 20 | # Step 2. Calculate vibrational frequencies using the same method 21 | # with the previous calculation. Get Zero-Point Energy (ZPE) 22 | # 23 | # Step 3. Calculate electronic energy using DLPNO-CCSD(T1)/aug-cc-pwCV5Z 24 | # 25 | # 26 | # NOTE 1: Steps 1 and 2 could be combined in 1 but we will keep them 27 | # separate for easy of customization 28 | # 29 | # NOTE 2: In steps 1 and 2 the alternative with def2-TZVPP is also possible 30 | # 31 | # --------------------------------------------------------------- 32 | # -------------------- Variables ------------------------------ 33 | # ---------- Variables that could be adjusted using 'with'----- 34 | Variable molecule; 35 | Variable charge = 0; 36 | Variable mult = 1; 37 | variable DFT_basis_set = "def2-QZVPP"; 38 | variable functional = "B3LYP"; 39 | variable DLPNO_basis_set = "aug-cc-pwCV5Z"; 40 | variable DLPNO_RI_basis_set = "aug-cc-pwCV5Z/C"; 41 | # ----------------- Rest of variables -------------------------- 42 | variable ZPE; # The ZPE energy 43 | variable E_Elec; # The DLPNO Electronic energy 44 | variable E_Total; # The Total energy 45 | # 46 | # 47 | # ---------------------------------------------------------- 48 | # (Calculation 1) 49 | # Optimization of the geometry 50 | # ---------------------------------------------------------- 51 | New_Step 52 | ! &{functional} &{DFT_basis_set} Opt D3BJ TightSCF 53 | *xyzfile &{charge} &{mult} &{molecule} 54 | STEP_END 55 | # 56 | # ---------------------------------------------------------- 57 | # (Calculation 2) 58 | # Calculation of vibrational frequencies and ZPE 59 | # ---------------------------------------------------------- 60 | New_Step 61 | ! &{functional} &{DFT_basis_set} Freq D3BJ TightSCF 62 | Step_End 63 | ZPE.readProperty(propertyName="THERMO_ZPE"); 64 | # 65 | # 66 | # ---------------------------------------------------------- 67 | # (Calculation 3) 68 | # Accurate electronic energy using DLPNO-CCSD(T) 69 | # ---------------------------------------------------------- 70 | New_Step 71 | !DLPNO-CCSD(T1) &{DLPNO_basis_set} &{DLPNO_RI_basis_set} TightSCF 72 | STEP_END 73 | E_Elec.readProperty(propertyName="MDCI_TOTAL_ENERGY"); 74 | # 75 | # 76 | # -------------------------------------------------------------- 77 | # Sum up the terms to get the final energy 78 | # FinalEnergy = E_Elec + ZPE; 79 | # -------------------------------------------------------------- 80 | E_Total = E_Elec + ZPE; 81 | # 82 | # 83 | # ---------------------------------------------------------- 84 | # Printing of the results 85 | print("\n\n-------------------------------------------------------\n"); 86 | print(" DLPNO-CC-Energy composite scheme by: \n"); 87 | print(" Giovanni Bistoni et al. \n"); 88 | print(" J. Chem. Phys. 152, 164303 (2020)\n"); 89 | print(" E = E_Elec + ZPE\n"); 90 | print(" (all energies in Hartrees) \n"); 91 | print(" Molecule : %s\n", molecule); 92 | print(" Charge : %18d\n", charge); 93 | print(" Mult : %18d\n", mult); 94 | print(" DFT Functional used : %s\n", functional); 95 | print(" Basis Set for DFT : %s\n", DFT_basis_set); 96 | print(" Basis Set for DLPNO : %s\n", DLPNO_basis_set); 97 | print(" Electronic Energy (E_Elec) : %18.10lf\n", E_Elec); 98 | print(" Zero point energy (ZPE) : %18.8lf\n", ZPE); 99 | print(" Total energy (E_Total) : %18.8lf\n", E_Total); 100 | 101 | EndRun 102 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021 ORCA Development Team and Contributors 2 | 3 | In the following, "Software" solely refers to the scripts and associated 4 | documentation as provided in the CompoundScripts repository. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 10 | of the Software, and to permit persons to whom the Software is furnished to do 11 | so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /Polarizabilities/numerical/numericalPolarizability.cmp: -------------------------------------------------------------------------------- 1 | # Authors: Dimitrios G. Liakos / Frank Neese / Zikuan Wang 2 | # Date : May of 2024 3 | # 4 | # This is a compound script that calculates the 5 | # dipole-dipole polarizability tensor numerically 6 | # using the double derivative of energy. 7 | # 8 | # The idea is the following: 9 | # 10 | # 1 Perform a field free calculation 11 | # 12 | # 2 Loop over directions I=X,Y,Z 13 | # 14 | # 3 Loop over directions J=X,Y,Z 15 | # 16 | # - put a small Q-field in directions I and J 17 | # - Solve equations to get the energy for each combination 18 | # - Polarizability alpha(I,J) =- ( E(+I,+J) - E(+I,-J)-E(-I,+J)+ E(-i,-j)/(4*Field^2) 19 | # 4 Print polarisability 20 | # 21 | # ---------------------------------------------------------------------- 22 | # ---------------------- Variables ------------------------------- 23 | # --- Variables to be adjusted (e.g. using 'with' ---------------------- 24 | Variable molecule = "h2o.xyz"; 25 | Variable charge = 0; 26 | Variable mult = 1; 27 | Variable method = "HF"; 28 | Variable basis = " "; 29 | Variable restOfInput = "VeryTightSCF"; 30 | Variable blocksInput = " "; 31 | Variable E_Field = 0.0001; 32 | Variable enPropName = "JOB_Info_Total_En"; 33 | Variable removeFiles = true; 34 | # -------------- Rest of the variables -------------------------------- 35 | Variable FField[3]; 36 | Variable EFree, EPlusPlus, EPlusMinus, EMinusPlus, EMinusMinus, a[3][3]; 37 | Variable FFieldStringPlusPlus, FFieldStringPlusMinus; 38 | Variable FFieldStringMinusPlus, FFieldStringMinusMinus; 39 | Variable aEigenValues, aEigenVectors; 40 | 41 | # ----------------------------------------- 42 | # Calculation without field 43 | # ----------------------------------------- 44 | New_Step 45 | !&{method} &{basis} &{restOfInput} 46 | &{blocksInput} 47 | *xyzfile &{charge} &{mult} &{molecule} 48 | Step_End 49 | EFree.ReadProperty(propertyName=enPropName); 50 | 51 | # ------------------------------------------------------------ 52 | # Loop over the x, y, z directions 53 | # ------------------------------------------------------------ 54 | for i from 0 to 2 Do 55 | for j from 0 to 2 Do 56 | # ---------------------------------------------------------- 57 | # Create the appropriate direction oriented field string 58 | # ---------------------------------------------------------- 59 | # ---------------------- (++) ------------------------------ 60 | for k from 0 to 2 Do 61 | FField[k] = 0.0; 62 | EndFor 63 | FField[i] = FField[i] + E_Field; 64 | FField[j] = FField[j] + E_Field; 65 | write2String(FFieldStringPlusPlus, " %lf, %lf, %lf", 66 | FField[0], FField[1], FField[2]); 67 | # 68 | # --------------------- (+-) ------------------------------ 69 | for k from 0 to 2 Do 70 | FField[k] = 0.0; 71 | EndFor 72 | FField[i] = FField[i] + E_Field; 73 | FField[j] = FField[j] - E_Field; 74 | write2String(FFieldStringPlusMinus, " %lf, %lf, %lf", 75 | FField[0], FField[1], FField[2]); 76 | # 77 | # --------------------- (-+) ------------------------------ 78 | for k from 0 to 2 Do 79 | FField[k] = 0.0; 80 | EndFor 81 | FField[i] = FField[i] - E_Field; 82 | FField[j] = FField[j] + E_Field; 83 | write2String(FFieldStringMinusPlus, " %lf, %lf, %lf", 84 | FField[0], FField[1], FField[2]); 85 | # 86 | # --------------------- (--) ------------------------------ 87 | for k from 0 to 2 Do 88 | FField[k] = 0.0; 89 | EndFor 90 | FField[i] = FField[i] - E_Field; 91 | FField[j] = FField[j] - E_Field; 92 | write2String(FFieldStringMinusMinus, " %lf, %lf, %lf", 93 | FField[0], FField[1], FField[2]); 94 | 95 | # ---------------------------------------- 96 | # Perform the calculations. 97 | # The plus_plus (++) one 98 | # ---------------------------------------- 99 | ReadMOs(1); 100 | New_Step 101 | !&{method} &{basis} &{restOfInput} 102 | %SCF 103 | EField = &{FFieldStringPlusPlus} 104 | End 105 | &{blocksInput} 106 | Step_End 107 | EPlusPlus.readProperty(propertyName=enPropName); 108 | # ---------------------------------------- 109 | # The plus_minus (+-) one 110 | # ---------------------------------------- 111 | ReadMOs(1); 112 | New_Step 113 | !&{method} &{basis} &{restOfInput} 114 | %SCF 115 | EField = &{FFieldStringPlusMinus} 116 | End 117 | &{blocksInput} 118 | Step_End 119 | EPlusMinus.readProperty(propertyName=enPropName); 120 | # ---------------------------------------- 121 | # The minus_plus (-+) one 122 | # ---------------------------------------- 123 | ReadMOs(1); 124 | New_Step 125 | !&{method} &{basis} &{restOfInput} 126 | %SCF 127 | EField = &{FFieldStringMinusPlus} 128 | End 129 | &{blocksInput} 130 | Step_End 131 | EMinusPlus.readProperty(propertyName=enPropName); 132 | # ---------------------------------------- 133 | # And the minus_minus (--) one 134 | # ---------------------------------------- 135 | ReadMOs(1); 136 | New_Step 137 | !&{method} &{basis} &{restOfInput} 138 | %SCF 139 | EField = &{FFieldStringMinusMinus} 140 | End 141 | &{blocksInput} 142 | Step_End 143 | EMinusMinus.readProperty(propertyName=enPropName); 144 | 145 | a[i][j] = -(EPlusPlus-EPlusMinus-EMinusPlus+EMinusMinus)/(4*E_Field*E_Field); 146 | EndFor 147 | EndFor 148 | 149 | # ----------------------------------------- 150 | # Diagonalize 151 | # ----------------------------------------- 152 | a.Diagonalize(aEigenValues, aEigenVectors); 153 | 154 | # ----------------------------------------- 155 | # Do some printing 156 | # ----------------------------------------- 157 | print( "\n\n"); 158 | print( " -------------------------------------------------------\n"); 159 | print( " COMPOUND \n"); 160 | print( " Numerical calculation of dipole polarizability\n"); 161 | print( " -------------------------------------------------------\n"); 162 | print( " Molecule : %s\n", molecule); 163 | print( " charge : %d\n", charge); 164 | print( " Mult : %d\n", mult); 165 | print( " Method : %s\n", method); 166 | print( " Basis : %s\n", basis); 167 | print( " RestOfInput : %s\n", restOfInput); 168 | print( " BlocksInput : %s\n", blocksInput); 169 | print( " The electric field perturbation used was: %.5lf a.u.\n", E_Field); 170 | print( " \n\n"); 171 | 172 | print( " -------------------------------------------------------\n"); 173 | print( " Raw electric dipole polarizability tensor is:\n"); 174 | print( " -------------------------------------------------------\n"); 175 | For i from 0 to 2 Do 176 | print("%13.8lf %13.8lf %13.8lf\n", a[i][0], a[i][1], a[i][2]); 177 | EndFor 178 | print( " -------------------------------------------------------\n"); 179 | print("\n"); 180 | 181 | print( " -------------------------------------------------------\n"); 182 | print( " Raw electric dipole polarizability Eigenvalues\n"); 183 | print( " -------------------------------------------------------\n"); 184 | print("%13.8lf %13.8lf %13.8lf\n", aEigenValues[0], aEigenValues[1], aEigenValues[2]); 185 | print( " -------------------------------------------------------\n"); 186 | print("\n"); 187 | 188 | print( " -------------------------------------------------------\n"); 189 | print( " Raw electric dipole polarizability Eigenvectors\n"); 190 | print( " -------------------------------------------------------\n"); 191 | For i from 0 to 2 Do 192 | print("%13.8lf %13.8lf %13.8lf\n", aEigenVectors[i][0], aEigenVectors[i][1], aEigenVectors[i][2]); 193 | EndFor 194 | 195 | print( "\n a isotropic value : %.5lf\n", (aEigenValues[0]+aEigenValues[1]+aEigenValues[2])/3.0); 196 | print( " -------------------------------------------------------\n"); 197 | print("\n\n"); 198 | # 199 | # 200 | # --------------------------------------------------- 201 | # Maybe remove unneccesary files 202 | # --------------------------------------------------- 203 | if (removeFiles) then 204 | sys_cmd("rm *_Compound_* *.bas* "); 205 | EndIf 206 | # 207 | End 208 | 209 | -------------------------------------------------------------------------------- /Polarizabilities/quad_polarizabilities/numerical/numerical_quadquad_polarizability.cmp: -------------------------------------------------------------------------------- 1 | # Author: Zikuan Wang 2 | # Date : May of 2024 3 | # 4 | # This is a compound script that calculates the 5 | # quadrupole-quadrupole polarizability tensor -numerically 6 | # using the double derivative of energy. 7 | # 8 | # The idea is the following: 9 | # 10 | # 1 Perform a field free calculation 11 | # 12 | # 2 Loop over directions I=XX,YY,ZZ,XY,XZ,YZ 13 | # 14 | # 3 Loop over directions J=XX,YY,ZZ,XY,XZ,YZ 15 | # - put a small Q-field in directions I and J 16 | # - Solve equations to get the energy for each combination 17 | # - Polarizability alpha(I,J) =- ( E(+I,+J) - E(+I,-J)-E(-I,+J)+ E(-i,-j)/(4*Field^2) 18 | # 19 | # 4 Print polarisability 20 | # 21 | # ---------------------------------------------------------------------- 22 | # ---------------------- Variables ------------------------------- 23 | # --- Variables to be adjusted (e.g. using 'with' ---------------------- 24 | Variable molecule = "h2o.xyz"; 25 | Variable charge = 0; 26 | Variable mult = 1; 27 | Variable method = "HF"; 28 | Variable basis = " "; 29 | Variable restOfInput = "VeryTightSCF"; 30 | Variable blocksInput = " "; 31 | Variable E_Field = 0.0001; 32 | Variable enPropName = "JOB_Info_Total_En"; 33 | Variable removeFiles = true; 34 | # -------------- Rest of the variables -------------------------------- 35 | Variable FField[6]; 36 | Variable EFree, EPlusPlus, EPlusMinus, EMinusPlus, EMinusMinus, a[6][6]; 37 | Variable FFieldStringPlusPlus, FFieldStringPlusMinus; 38 | Variable FFieldStringMinusPlus, FFieldStringMinusMinus; 39 | Variable aEigenValues, aEigenVectors; 40 | 41 | # ----------------------------------------- 42 | # Calculation without field 43 | # ----------------------------------------- 44 | New_Step 45 | !&{method} &{basis} &{restOfInput} 46 | &{blocksInput} 47 | *xyzfile &{charge} &{mult} &{molecule} 48 | Step_End 49 | EFree.ReadProperty(propertyName=enPropName); 50 | 51 | # ------------------------------------------------------------ 52 | # Loop over the x, y, z directions 53 | # ------------------------------------------------------------ 54 | for i from 0 to 5 Do 55 | for j from 0 to 5 Do 56 | # ---------------------------------------------------------- 57 | # Create the appropriate direction oriented field string 58 | # ---------------------------------------------------------- 59 | # ---------------------- (++) ------------------------------ 60 | for k from 0 to 5 Do 61 | FField[k] = 0.0; 62 | EndFor 63 | FField[i] = FField[i] + E_Field; 64 | FField[j] = FField[j] + E_Field; 65 | write2String(FFieldStringPlusPlus, " %lf, %lf, %lf, %lf, %lf, %lf", 66 | FField[0], FField[1], FField[2], FField[3], FField[4], FField[5]); 67 | # 68 | # ---------------------- (+-) ------------------------------ 69 | for k from 0 to 5 Do 70 | FField[k] = 0.0; 71 | EndFor 72 | FField[i] = FField[i] + E_Field; 73 | FField[j] = FField[j] - E_Field; 74 | write2String(FFieldStringPlusMinus, " %lf, %lf, %lf, %lf, %lf, %lf", 75 | FField[0], FField[1], FField[2], FField[3], FField[4], FField[5]); 76 | # 77 | # ---------------------- (-+) ------------------------------ 78 | for k from 0 to 5 Do 79 | FField[k] = 0.0; 80 | EndFor 81 | FField[i] = FField[i] - E_Field; 82 | FField[j] = FField[j] + E_Field; 83 | write2String(FFieldStringMinusPlus, " %lf, %lf, %lf, %lf, %lf, %lf", 84 | FField[0], FField[1], FField[2], FField[3], FField[4], FField[5]); 85 | # 86 | # ---------------------- (--) ------------------------------ 87 | for k from 0 to 5 Do 88 | FField[k] = 0.0; 89 | EndFor 90 | FField[i] = FField[i] - E_Field; 91 | FField[j] = FField[j] - E_Field; 92 | write2String(FFieldStringMinusMinus, " %lf, %lf, %lf, %lf, %lf, %lf", 93 | FField[0], FField[1], FField[2], FField[3], FField[4], FField[5]); 94 | 95 | # ---------------------------------------- 96 | # Perform the calculations. 97 | # The plus_plus (++) one 98 | # ---------------------------------------- 99 | ReadMOs(1); 100 | New_Step 101 | !&{method} &{basis} &{restOfInput} 102 | %SCF 103 | QField = &{FFieldStringPlusPlus} 104 | End 105 | &{blocksInput} 106 | Step_End 107 | EPlusPlus.readProperty(propertyName=enPropName); 108 | # ---------------------------------------- 109 | # The plus_minus (+-) one 110 | # ---------------------------------------- 111 | ReadMOs(1); 112 | New_Step 113 | !&{method} &{basis} &{restOfInput} 114 | %SCF 115 | QField = &{FFieldStringPlusMinus} 116 | End 117 | &{blocksInput} 118 | Step_End 119 | EPlusMinus.readProperty(propertyName=enPropName); 120 | # ---------------------------------------- 121 | # The minus_plus (-+) one 122 | # ---------------------------------------- 123 | ReadMOs(1); 124 | New_Step 125 | !&{method} &{basis} &{restOfInput} 126 | %SCF 127 | QField = &{FFieldStringMinusPlus} 128 | End 129 | &{blocksInput} 130 | Step_End 131 | EMinusPlus.readProperty(propertyName=enPropName); 132 | # ---------------------------------------- 133 | # And the minus_minus (--) one 134 | # ---------------------------------------- 135 | ReadMOs(1); 136 | New_Step 137 | !&{method} &{basis} &{restOfInput} 138 | %SCF 139 | QField = &{FFieldStringMinusMinus} 140 | End 141 | &{blocksInput} 142 | Step_End 143 | EMinusMinus.readProperty(propertyName=enPropName); 144 | 145 | a[i][j] = -(EPlusPlus-EPlusMinus-EMinusPlus+EMinusMinus)/(4*E_Field*E_Field); 146 | EndFor 147 | EndFor 148 | 149 | 150 | # ----------------------------------------- 151 | # Diagonalize 152 | # ----------------------------------------- 153 | a.Diagonalize(aEigenValues, aEigenVectors); 154 | 155 | # ----------------------------------------- 156 | # Do some printing 157 | # ----------------------------------------- 158 | print( "\n\n"); 159 | print( " -------------------------------------------------------\n"); 160 | print( " COMPOUND \n"); 161 | print( " Numerical calculation of quad-quad polarizability\n"); 162 | print( " -------------------------------------------------------\n"); 163 | print( " Molecule : %s\n", molecule); 164 | print( " charge : %d\n", charge); 165 | print( " Mult : %d\n", mult); 166 | print( " Method : %s\n", method); 167 | print( " Basis : %s\n", basis); 168 | print( " RestOfInput : %s\n", restOfInput); 169 | print( " BlocksInput : %s\n", blocksInput); 170 | print( " The electric field perturbation used was: %.5lf a.u.\n", E_Field); 171 | print( " \n\n"); 172 | 173 | print( " -------------------------------------------------------\n"); 174 | print( " Raw electric quad-quad polarizability tensor is:\n"); 175 | print( " -------------------------------------------------------\n"); 176 | For i from 0 to 5 Do 177 | print("%13.8lf %13.8lf %13.8lf %13.8lf %13.8lf %13.8lf\n", a[i][0], a[i][1], a[i][2], a[i][3], a[i][4], a[i][5]); 178 | EndFor 179 | print( " -------------------------------------------------------\n"); 180 | print("\n"); 181 | 182 | print( " -------------------------------------------------------\n"); 183 | print( " Raw electric quad-quad polarizability Eigenvalues\n"); 184 | print( " -------------------------------------------------------\n"); 185 | print("%13.8lf %13.8lf %13.8lf %13.8lf %13.8lf %13.8lf\n", aEigenValues[0], aEigenValues[1], aEigenValues[2], 186 | aEigenValues[3], aEigenValues[4], aEigenValues[5]); 187 | print( " -------------------------------------------------------\n"); 188 | print("\n"); 189 | 190 | print( " -------------------------------------------------------\n"); 191 | print( " Raw electric quad-quad polarizability Eigenvectors\n"); 192 | print( " -------------------------------------------------------\n"); 193 | For i from 0 to 2 Do 194 | print("%13.8lf %13.8lf %13.8lf %13.8lf %13.8lf %13.8lf\n", aEigenVectors[i][0], aEigenVectors[i][1], aEigenVectors[i][2], 195 | aEigenVectors[i][3], aEigenVectors[i][4], aEigenVectors[i][5]); 196 | EndFor 197 | 198 | print( "\n a isotropic value : %.5lf\n", (aEigenValues[0]+aEigenValues[1]+aEigenValues[2]+aEigenValues[3]+aEigenValues[4]+aEigenValues[5])/6.0); 199 | print( " -------------------------------------------------------\n"); 200 | print("\n\n"); 201 | # 202 | # 203 | # --------------------------------------------------- 204 | # Maybe remove unneccesary files 205 | # --------------------------------------------------- 206 | if (removeFiles) then 207 | sys_cmd("rm *_Compound_* *.bas* "); 208 | EndIf 209 | # 210 | End 211 | 212 | -------------------------------------------------------------------------------- /Polarizabilities/semiNumerical/semiNumericalPolarizability.cmp: -------------------------------------------------------------------------------- 1 | # --------------------------------------------------------------------- 2 | # Authors: Dimitrios G. Liakos and Frank Neese 3 | # Date : March-May of 2024 4 | # 5 | # This is a compound script that calculates the 6 | # raw porarizability tensor semi-numerically 7 | # using the dipole moments. 8 | # 9 | # The idea is the following: 10 | # 11 | # 1. Calculate dipole moment in the field free case 12 | # 13 | # 2. Loop over directions I=X,Y,Z 14 | # - put a small E-field in direction I+Delta 15 | # - Solve equations to get the dipole moment D+ 16 | # - put s small E-field in direction I-Delta 17 | # - Solve equations to get the dipole moment D- 18 | # - Polarizability alpha(I,J). (D+(I)-D-(I))/(2Delta) 19 | # - Diagonalize to get eigenValues, eigenVectors, a_iso 20 | # 21 | # 3. Print polarisability 22 | # 23 | # NOTE: We use the last dipole_moment found in the file. If a specific 24 | # one is needed the 'myProperty' option should be accordingly 25 | # adjusted and remove the 'property_Base = true' option. 26 | # 27 | # ---------------------------------------------------------------------- 28 | # ---------------------------------------------------------------------- 29 | # ---------------------- Variables ------------------------------ 30 | # 31 | # --- Variables to be adjusted (e.g. using 'with' --------------------- 32 | Variable molecule = "h2o.xyz"; # xyz file with coordinates 33 | Variable charge = 0; 34 | Variable mult = 1; 35 | Variable method = "HF"; 36 | Variable basis = " " ; 37 | Variable restOfInput = "NoFrozenCore VeryTightSCF"; 38 | Variable blocksInput = "%Method z_tol 1e-8 End %MP2 Density Relaxed End"; 39 | Variable E_Field = 0.0001; # Size of Electric field 40 | Variable myProperty = "Dipole_moment_total"; 41 | Variable removeFiles = true; # Remove files in the end of the calculation 42 | # --------------------------------------------------------------------- 43 | # -------------- Rest of the variables -------------------------------- 44 | Variable D_Free, D_Minus, D_Plus, a[3][3]; #dipole moment and polarizability 45 | Variable aEigenValues[3], aEigenVectors[3][3], a_iso; 46 | Variable FFieldStringPlus, FFieldStringMinus; 47 | Variable res = -1; 48 | 49 | # ---------------------------------------------------------------------- 50 | # Field Free 51 | # ---------------------------------------------------------------------- 52 | New_Step 53 | !&{method} &{basis} &{restOfInput} 54 | &{blocksInput} 55 | *xyzFile &{charge} &{mult} &{molecule} 56 | Step_End 57 | D_Free.readProperty(propertyName=myProperty, property_Base=true); 58 | 59 | # ------------------------------------------------------------------ 60 | # Loop over the x, y, z directions and create the appropriate string 61 | # ------------------------------------------------------------------ 62 | for direction from 0 to 2 Do 63 | #Create the appropriate direction oriented field string 64 | if (direction = 0) then #( X direction) 65 | write2String(FFieldStringPlus, " %lf, 0.0, 0.0", E_Field); 66 | write2String(FFieldStringMinus, "-%lf, 0.0, 0.0", E_Field); 67 | else if (direction = 1) then #( Y direction) 68 | write2String(FFieldStringPlus, " 0.0, %lf, 0.0", E_Field); 69 | write2String(FFieldStringMinus, " 0.0, -%lf, 0.0", E_Field); 70 | else #( Z direction) 71 | write2String(FFieldStringPlus, " 0.0, 0.0, %lf", E_Field); 72 | write2String(FFieldStringMinus, " 0.0, 0.0, -%lf", E_Field); 73 | EndIf 74 | # ---------------------------------------- 75 | # Perform the calculations. 76 | # First the plus (+) one 77 | # ---------------------------------------- 78 | ReadMOs(1); 79 | New_Step 80 | !&{method} &{basis} &{restOfInput} 81 | %SCF 82 | EField = &{FFieldStringPlus} 83 | End 84 | &{blocksInput} 85 | Step_End 86 | D_Plus.readProperty(propertyName="Dipole_moment_total", property_Base=true); 87 | # ---------------------------------------- 88 | # And the minus (-) one 89 | # ---------------------------------------- 90 | ReadMOs(1); 91 | New_Step 92 | !&{method} &{basis} &{restOfInput} 93 | %SCF 94 | EField = &{FFieldStringMinus} 95 | End 96 | &{blocksInput} 97 | Step_End 98 | res = D_Minus.readProperty(propertyName=myProperty, property_Base=true); 99 | # ------------------------------------------ 100 | # Construct and store SCF polarizability 101 | # ------------------------------------------ 102 | a[direction][0] = (D_Plus[0]-D_Minus[0])/(2*E_Field); 103 | a[direction][1] = (D_Plus[1]-D_Minus[1])/(2*E_Field); 104 | a[direction][2] = (D_Plus[2]-D_Minus[2])/(2*E_Field); 105 | EndFor 106 | # ----------------------------------------- 107 | # Diagonalize 108 | # ----------------------------------------- 109 | a.Diagonalize(aEigenValues, aEigenVectors); 110 | # ----------------------------------------- 111 | # Do some printing 112 | # ----------------------------------------- 113 | print( "\n\n"); 114 | print( " -------------------------------------------------------\n"); 115 | print( " COMPOUND \n"); 116 | print( " Semi analytical calculation of polarizability\n"); 117 | print( " -------------------------------------------------------\n"); 118 | print( " Molecule : %s\n", molecule); 119 | print( " charge : %d\n", charge); 120 | print( " Mult : %d\n", mult); 121 | print( " Method : %s\n", method); 122 | print( " Basis : %s\n", basis); 123 | print( " RestOfInput : %s\n", restOfInput); 124 | print( " BlocksInput : %s\n", blocksInput); 125 | print( " The electric field perturbation used was: %.5lf a.u.\n", E_Field); 126 | print( " \n"); 127 | 128 | print( " -------------------------------------------------------\n"); 129 | print( " Raw electric semi-analytical polarizability tensor\n"); 130 | print( " -------------------------------------------------------\n"); 131 | For i from 0 to 2 Do 132 | print("%13.8lf %13.8lf %13.8lf\n", a[i][0], a[i][1], a[i][2]); 133 | EndFor 134 | print( " -------------------------------------------------------\n"); 135 | print("\n"); 136 | 137 | print( " -------------------------------------------------------\n"); 138 | print( " Semi-analytical electric polarizability Eigenvalues\n"); 139 | print( " -------------------------------------------------------\n"); 140 | print("%13.8lf %13.8lf %13.8lf\n", aEigenValues[0], aEigenValues[1], aEigenValues[2]); 141 | print( " -------------------------------------------------------\n"); 142 | print("\n"); 143 | 144 | print( " -------------------------------------------------------\n"); 145 | print( " Semi-analytical electric polarizability Eigenvectors\n"); 146 | print( " -------------------------------------------------------\n"); 147 | For i from 0 to 2 Do 148 | print("%13.8lf %13.8lf %13.8lf\n", aEigenVectors[i][0], aEigenVectors[i][1], aEigenVectors[i][2]); 149 | EndFor 150 | 151 | print( "\n a isotropic value : %.5lf\n", (aEigenValues[0]+aEigenValues[1]+aEigenValues[2])/3.0); 152 | # 153 | # 154 | # --------------------------------------------------- 155 | # Maybe remove unneccesary files 156 | # --------------------------------------------------- 157 | if (removeFiles) then 158 | sys_cmd("rm *_Compound_* *.bas* "); 159 | EndIf 160 | 161 | End 162 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ORCA Compound Scripts Exchange 2 | 3 | Welcome to the repository for ORCA compound scripts! 4 | 5 | The purpose of this repository is twofold: 6 | 7 | 1. Provide a curated set of compound scripts from the ORCA developers. 8 | 2. Provide a unique location where user-provided compound scripts can be shared. 9 | 10 | In particular, if you are publishing papers based on ORCA workflows using the compound script feature, this is a place to store your ‘supporting information.’ In such a case, please also reference the paper in the compound script. 11 | 12 | 13 | ## What are compound scripts? 14 | 15 | Compound scripts allow the user to automate complicated workflows directly within the ORCA quantum chemistry software package. It provides direct, easy access to internal results such as energies, frequencies, … No more parsing! 16 | 17 | Also, a complicated workflow can be run in a single computation---no need to wait for finished jobs and resubmissions. 18 | 19 | 20 | ## How do I contribute? 21 | 22 | If you want to share your work, please do so! Keep in mind that your script will be published under the [MIT license](LICENSE), and that you must have the rights to share. 23 | 24 | The actual sharing process is simple: Fork the repository and create a pull request. Or just head over to the [ORCA forum][1] and let us help you there! 25 | 26 | 27 | ## What is ORCA? 28 | 29 | ORCA is a software package for fast and efficient quantum chemical calculations, developed by Frank Neese and many more. Check it out at the [ORCA forum][1] (it’s free for academic use)! 30 | 31 | [1]: https://orcaforum.kofo.mpg.de 32 | -------------------------------------------------------------------------------- /Simple/helloWorld/helloWorld.inp: -------------------------------------------------------------------------------- 1 | %Compound 2 | print("Hellow World!\n"); 3 | EndRun 4 | -------------------------------------------------------------------------------- /Simple/replaceNewJob/replaceNewJob.inp: -------------------------------------------------------------------------------- 1 | # This is a small script thas shows how 2 | # 'Compound' can replace the previous 3 | # ORCA '$New_Job' feature 4 | %Compound 5 | # ------------------------------------ 6 | # First job 7 | # ------------------------------------ 8 | New_Step 9 | !BP86 10 | *xyz 0 1 11 | H 0.0 0.0 0.0 12 | H 0.0 0.0 0.8 13 | * 14 | Step_End 15 | # ------------------------------------ 16 | # Second job with same goemetry 17 | # but different functional 18 | # ------------------------------------ 19 | New_Step 20 | !B3LYP 21 | *xyz 0 1 22 | H 0.0 0.0 0.0 23 | H 0.0 0.0 0.8 24 | * 25 | Step_End 26 | EndRun 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Solvation/dft_dipole_moment_solvent_induction.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Miquel Garcia-Rates 2 | # Update : Dimitrios G. Liakos (June of 2024) 3 | # 4 | # The protocole calculates how the dipole moment changes when solvating a solute. 5 | # for this it calculates the ratio of the dipole moment in vacuum to the dipole 6 | # moment in a solvent 7 | # 8 | # For a reference to the methodology please refer to: 9 | # 10 | # Miquel Garcia-Rates Frank Neese, J Comput. Chem. 2020;41:922-939 11 | # Effect of the Solute Cavity on the Solvation Energy and its Derivatives within the 12 | # Framework of the Gaussian Charge Scheme 13 | # 14 | # This protocol needs two steps 15 | # In Step 1 The geometry is optimized in vacuum and it dipole moment is evaluated 16 | # 17 | # In Step 2 The geometry optimized in the previous step is now optimized in the solvent 18 | # and the dipole moment is evaluated in the solvent 19 | # 20 | # Then the ratio d(solvent)/d(vacuum) is evaluated 21 | # 22 | #****************************************** NOTES ****************************************** 23 | # NOTE 1: The details of the calculation (functional, basis set, ... etc) can be adjusted but they 24 | # should be the same in both calculations 25 | # 26 | # NOTE 2: For the case of solvation we use the Gaussian charge scheme with a vdW-type cavity for 27 | # the solute cavity (surfacetype vdw_gaussian in the %cpcm block) 28 | # 29 | # NOTE 3: For the second step here we guess charge and multiplicity 0 and 1. 30 | # 31 | # NOTE 4: For the first calculation we use the %base to change the name to vacuumGeometry so that 32 | # it is easy to know the name for the second one. This could of course change but it should 33 | # be consistent for both calculations 34 | # 35 | # NOTE 5: This scheme will work for DFT calculations because we read the total energy through the 36 | # it is easy to know the name for the second one. This could of course change but it should 37 | # be consistent for both calculations 38 | # 39 | # -------------------- Variables ------------------------------ 40 | # ---------- Variables that could be adjusted using 'with'----- 41 | variable molecule; 42 | variable charge = 0; 43 | variable mult = 1; 44 | Variable method = "RKS B3LYP RIJCOSX D3BJ"; 45 | Variable basis = "def2-TZVP def2/J"; 46 | Variable restOfInput = "VeryTightSCF VeryTightOpt"; 47 | Variable mySolvent = "water"; 48 | # ----------------- Rest of variables -------------------------- 49 | Variable d_vac, d_solv; # Dipole moments in vacuum and solvent 50 | Variable ratio; # ratio of dipole moments 51 | 52 | # ---------------------------------------------------------------- 53 | # Optimization in vacuum 54 | # ---------------------------------------------------------------- 55 | New_Step 56 | ! &{method} &{basis} &{restOfInput} 57 | *xyzfile &{charge} &{mult} &{molecule} 58 | %base "vacuumGeometry" 59 | Step_End 60 | d_vac.readProperty(propertyName="SCF_DIPOLE_MAGNITUDE_DEBYE"); 61 | # 62 | 63 | # ---------------------------------------------------------------- 64 | # Second step: Optimization in solvent 65 | # ---------------------------------------------------------------- 66 | New_Step 67 | !&{method} &{basis} &{restOfInput} CPCM(&{mySolvent}) 68 | * xyzfile &{charge} &{mult} vacuumGeometry.xyz 69 | %cpcm 70 | surfacetype vdw_gaussian 71 | End 72 | STEP_END 73 | d_solv.readProperty(propertyName="SCF_DIPOLE_MAGNITUDE_DEBYE"); 74 | 75 | # 76 | # ---------------------------------------------------------------- 77 | # Now evaluate the ratio 78 | # ---------------------------------------------------------------- 79 | ratio = d_solv/d_vac; 80 | 81 | # ---------------------------------------------------------------- 82 | # Print the results 83 | # ---------------------------------------------------------------- 84 | print("\n\n============================================================\n"); 85 | print("==================== SUMMARY OF RESULTS ====================\n"); 86 | print("============================================================\n\n"); 87 | print(" Molecule : %s\n", molecule); 88 | print(" Charge : %-18d\n", charge); 89 | print(" Mult : %-18d\n", mult); 90 | print(" Method : %s\n", method); 91 | print(" Basis set : %s\n", basis); 92 | print(" Rest of input : %s\n", restOfInput); 93 | print(" Solvent : %s\n", mySolvent); 94 | print(" Dipole moment in vacuum : %-18.6lf\n", d_vac); 95 | print(" Dipole moment in solvent: %-18.6lf\n", d_solv); 96 | print(" Ratio : %-10.5lf\n", ratio); 97 | 98 | EndRun 99 | -------------------------------------------------------------------------------- /Solvation/dft_solvation_energy.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Miquel Garcia-Rates 2 | # Update : Dimitrios G. Liakos (June of 2024) 3 | ## 4 | # This protocol computes the solvation energy in a solvent. 5 | # 6 | # For a reference to the methodology please refer to: 7 | # 8 | # Miquel Garcia-Rates Frank Neese, J Comput. Chem. 2020;41:922-939 9 | # Effect of the Solute Cavity on the Solvation Energy and its Derivatives within the 10 | # Framework of the Gaussian Charge Scheme 11 | # 12 | # This protocol needs two steps 13 | # In Step 1 The geometry is optimized in vacuum 14 | # 15 | # In Step 2 The geometry optimized in the previous step is now optimized in the solvent 16 | # 17 | # Then the free energy of solvation will simply be the final energy of the second calculation. 18 | # minus the final energy of the first calculation 19 | # 20 | #****************************************** NOTES ****************************************** 21 | # NOTE 1: The energies are given in Hartrees. Here just for convenience we also calculate the energy 22 | # in kcal/mol 23 | # 24 | # NOTE 2: The details of the calculation (functional, basis set, ... etc) can be adjusted but they 25 | # should be the same in both calculations 26 | # 27 | # NOTE 3: For the case of solvation we use the Gaussian charge scheme with a vdW-type cavity for 28 | # the solute cavity (surfacetype vdw_gaussian in the %cpcm block) 29 | # 30 | # NOTE 4: We choose "cds_cpcm 2" in the %cpcm block which includes a non-electrostatic solvation 31 | # component to the energy (this tag is just usable for organic solutes in certain solvents) 32 | # 33 | # NOTE 5: For the second step here we guess charge and multiplicity 0 and 1. 34 | # 35 | # NOTE 6: For the first calculation we use the %base to change the name to vacuumGeometry so that 36 | # it is easy to know the name for the second one. This could of course change but it should 37 | # be consistent for both calculations 38 | # 39 | # NOTE 6: This scheme will work for DFT calculations because we read the total energy through the 40 | # it is easy to know the name for the second one. This could of course change but it should 41 | # be consistent for both calculations 42 | # 43 | # NOTE 7: In this calculation we use the correction from S. Grimme and for this reason we also add 44 | # explicitly this correction both on vacuum and solvent. 45 | # 46 | # -------------------- Variables ------------------------------ 47 | # ---------- Variables that could be adjusted using 'with'----- 48 | variable molecule; 49 | variable charge = 0; 50 | variable mult = 1; 51 | Variable method = "RKS B3LYP RIJCOSX D3BJ"; 52 | Variable basis = "def2-TZVP def2/J"; 53 | Variable restOfInput = "defGrid3 VeryTightSCF VeryTightOpt"; 54 | Variable mySolvent = "water"; 55 | # ----------------- Rest of variables -------------------------- 56 | Variable E_vac, E_solv; # Total energies in vacuum and solvent 57 | Variable ZPE_vac, ZPE_solv; # Zero point energies 58 | Variable vdw_vac, vdw_solv; # van der Waals correction 59 | Variable HartToKcal = 627.5096080305927; # Conversion factor from Hartree to kcal/mol 60 | Variable DE_El_Hartree, DE_El_Kcal; # Solvation energies in Harrtee and kcal/mol 61 | # 62 | # ---------------------------------------------------------------- 63 | # Optimization in vacuum 64 | # ---------------------------------------------------------------- 65 | New_Step 66 | !&{method} &{basis} &{restOfInput} 67 | *xyzfile &{charge} &{mult} &{molecule} 68 | %base "vacuumGeometry" 69 | Step_End 70 | E_vac.readProperty(propertyName="SCF_ENERGY"); 71 | vdw_vac.readProperty(propertyName="VDW_CORRECTION"); 72 | # 73 | # 74 | # ---------------------------------------------------------------- 75 | # Optimization in solvent 76 | # ---------------------------------------------------------------- 77 | New_Step 78 | !&{method} &{basis} CPCM(&{mySolvent}) 79 | * xyzfile &{charge} &{mult} vacuumGeometry.xyz 80 | %cpcm 81 | surfacetype vdw_gaussian 82 | End 83 | STEP_END 84 | E_solv.readProperty(propertyName="SCF_ENERGY"); 85 | vdw_solv.readProperty(propertyName="VDW_CORRECTION"); 86 | # 87 | # 88 | # ---------------------------------------------------------------- 89 | # Now evaluate the difference 90 | # ---------------------------------------------------------------- 91 | DE_El_Hartree = E_solv +vdw_solv - E_vac - vdw_vac; 92 | DE_El_Kcal = HartToKcal*DE_El_Hartree ; 93 | # 94 | # ****************** ADD SOME NICE PRINTING *********************** 95 | print( " $$$$$$$$$$$$$$$$$$$$$$$$$$$$ COMPOUND JOB RESULTS $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n"); 96 | print(" Molecule : %s\n", molecule); 97 | print(" Charge : %-18d\n", charge); 98 | print(" Mult : %-18d\n", mult); 99 | print(" Method : %s\n", method); 100 | print(" Basis set : %s\n", basis); 101 | print(" Rest of input : %s\n", restOfInput); 102 | print(" Solvent : %s\n", mySolvent); 103 | print( " Free energy in vacuum:\n "); 104 | print( " ================== \n"); 105 | print( " Electronic Energy in Vacuum [Eh]: %18.10lf\n", E_vac); 106 | # 107 | print( " Free energy in solution:\n"); 108 | print( " ==================\n"); 109 | print( " Electronic Energy in Solution [Eh]: %18.10lf\n", E_solv); 110 | 111 | print( " Solvation Energy:\n"); 112 | print( " ==================\n"); 113 | print( " Electronic Energy contribution [kca/mol]: %18.10lf\n", DE_El_Kcal); 114 | # 115 | print( " -----------------------------------------------------------------------------------------------------\n"); 116 | print( " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ END $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ \n"); 117 | 118 | 119 | EndRun 120 | -------------------------------------------------------------------------------- /Spectroscopy/AILFT_1shell.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Dimitrios Manganas 2 | # Update : Dimitrios G. Liakos (June of 2024) 3 | # 4 | # 5 | # This protocol computes 1-shell Ab Initio Ligand Field Theory (AILFT) 6 | # parameters on transition metal complexes at the CASSCF/NEVPT2 level. 7 | # 8 | # for AILFT parameters one can check the following article 9 | # Atanasov, M.; Ganyushin, D.; Sivalingam, K.; Neese, F.: 10 | # 'A Modern First-Principles View on Ligand Field Theory Through the Eyes 11 | # of Correlated Multireference Wavefunctions. In Molecular Electronic Structures 12 | # of Transition Metal Complexes II' 13 | # in: 14 | # Mingos, D. M. P., Day, P., Dahl,J. P., Eds.; Springer Berlin Heidelberg: 15 | # Berlin, Heidelberg, 2012; pp 149-220. 16 | # 17 | # 18 | # In the current implementation we perform the following steps: 19 | # 20 | # Step 1. Computes the orbitals at the SA-CASSCF level 21 | # 22 | # Step 2. Orbitals are LFT purified and the 1-shell AILFT parameters 23 | # are computed at the CASSCF/NEVPT2 level 24 | # 25 | # Alternatively one may use the LFTCase keyword 26 | # for the 3d LFT case use 'LFTCase 3d' 27 | # for the 4f LFT case use 'LFTCase 4f' 28 | # 29 | # NOTE 1: for d-shell cases use 'ActOrbs DOrbs' 30 | # for f-shell cases use 'ActOrbs FOrbs' 31 | # 32 | # NOTE 2: In the case of lanthanide or actinide f elements it is recommended 33 | # to use the SARC relativistically recontracted basis sets 34 | # 35 | # --------------------------------------------------------------- 36 | # -------------------- Variables ------------------------------ 37 | # ---------- Variables that could be adjusted using 'with'----- 38 | Variable molecule; 39 | Variable charge = 0; 40 | Variable mult = 1; 41 | Variable basis = "DKH-def2-SVP"; 42 | Variable nel = 7; 43 | Variable norb = 5; 44 | Variable Mult1 = 4; 45 | Variable Mult2 = 2; 46 | Variable NRoots1 = 10; 47 | Variable NRoots2 = 40; 48 | Variable ActOrbs = "DOrbs"; 49 | Variable myBasename = "GuessWaveFunction" ; 50 | #Variable LFTCase = "3d4s"; 51 | 52 | 53 | # ------------------------------------------------- 54 | # Creation of orbitals (SA-CASSCF) 55 | # ------------------------------------------------- 56 | # (Calculation 1) 57 | New_Step 58 | !DKH &{basis} def2-SVP/C 59 | *xyzfile &{charge} &{mult} &{molecule} 60 | %base "&{myBasename}" 61 | % CASSCF 62 | NEl &{nel} 63 | NOrb &{norb} 64 | Mult &{Mult1}, &{Mult2} 65 | NRoots &{NRoots1}, &{NRoots2} 66 | End 67 | Step_End 68 | 69 | # ------------------------------------------------- 70 | # Second step: Actual calculation of AILFT parameters 71 | # ------------------------------------------------- 72 | New_Step 73 | !NoIter MOREAD DKH2 &{basis} def2-SVP/C NEVPT2 74 | %MOInp "&{myBasename}.gbw" 75 | %CASSCF 76 | NEl &{nel} 77 | NOrb &{norb} 78 | Mult &{Mult1}, &{Mult2} 79 | NRoots &{NRoots1}, &{NRoots2} 80 | ActOrbs &{ActOrbs} 81 | #LFTCase &{LFTCase} 82 | Rel 83 | DoSOC True 84 | End 85 | End 86 | Step_End 87 | End 88 | -------------------------------------------------------------------------------- /Spectroscopy/AILFT_2shell.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Dimitrios Manganas 2 | # Update : Dimitrios G. Liakos (June of 2024) 3 | # 4 | # 5 | # This protocol computes 2-shell Ab Initio Ligand Field Theory (AILFT) 6 | # parameters on transition metal complexes at the CASSCF/NEVPT2 level. 7 | # 8 | # For AILFT parameters one can check the following article: 9 | # Atanasov, M.; Ganyushin, D.; Sivalingam, K.; Neese, F.: 10 | # A Modern First-Principles View on Ligand Field Theory Through the Eyes 11 | # of Correlated Multireference Wavefunctions. In Molecular Electronic Structures 12 | # of Transition Metal Complexes II; Mingos, D. M. P., Day, P., Dahl, 13 | # J. P., Eds.; Springer Berlin Heidelberg: Berlin, Heidelberg, 2012; pp 149-220. 14 | # 15 | # 16 | # In the current implementation we perform the following steps: 17 | # 18 | # Step 1. Compute the first shell orbitals (in the example the 3d) 19 | # at the SA-CASSCF level 20 | # 21 | # Step 2. Add the second shell orbitals (in the example the 4s) in the active 22 | # space 23 | # 24 | # The 2 shell orbitals are LFT purified and the 2-shell AILFT 25 | # parameters are computed at the CASSCF/NEVPT2 level 26 | # 27 | # 28 | # NOTE 1: for sp-shell cases use 'ActOrbs SPOrbs' 29 | # for ps-shell cases use 'ActOrbs PSOrbs' 30 | # for sd-shell cases use 'ActOrbs SDOrbs' 31 | # for ds-shell cases use 'ActOrbs DSOrbs' 32 | # for sf-shell cases use 'ActOrbs SFOrbs' 33 | # for fs-shell cases use 'ActOrbs FSOrbs' 34 | # for pd-shell cases use 'ActOrbs PDOrbs' 35 | # for dp-shell cases use 'ActOrbs DPOrbs' 36 | # for pf-shell cases use 'ActOrbs PFOrbs' 37 | # for fp-shell cases use 'ActOrbs FPOrbs' 38 | # for df-shell cases use 'ActOrbs DFOrbs' 39 | # for fd-shell cases use 'ActOrbs FDOrbs' 40 | # 41 | # Alternatively one may use the LFTCase keyword 42 | # for the 3d4s LFT case use 'LFTCase 3d4s' 43 | # 44 | # NOTE 2: In the case of lanthanide or actinide f elements it is recommended 45 | # to use the SARC relativistically recontracted basis sets 46 | # 47 | # NOTE 3: Any shell orbitals can be rotated in the active space using the 48 | # rotation option within the %scf block. Please consult the manual 49 | # 50 | # NOTE 4: For NEVPT2 calculations the excitation space needs to be saturated. 51 | # Restricted Active Space calculations can be requested with the 52 | # AILFTDimension 1/2 keyword. Please consult the manual regarding this 53 | # 54 | # 55 | # --------------------------------------------------------------- 56 | # -------------------- Variables ------------------------------ 57 | # ---------- Variables that could be adjusted using 'with'----- 58 | Variable molecule; 59 | Variable charge = 0; 60 | Variable mult = 1; 61 | Variable basis = "DKH-def2-SVP"; 62 | Variable nel = 7; 63 | Variable norb1 = 5; 64 | Variable norb2 = 6; 65 | Variable Mult1 = 4; 66 | Variable Mult2 = 2; 67 | Variable NRoots1 = 10; 68 | Variable NRoots2 = 40; 69 | Variable NRoots3 = 84; 70 | Variable NRoots4 = 210; 71 | #Variable ActOrbs = "DOrbs"; 72 | Variable LFTCase = "3d4s"; 73 | 74 | # ------------------------------------------------- 75 | # Creation of orbitals (SA-CASSCF) 76 | # ------------------------------------------------- 77 | New_Step 78 | *xyzfile &{Charge} &{mult} &{molecule} 79 | !DKH &{basis} def2-SVP/C 80 | %base "GuessWavefunction" 81 | % CASSCF 82 | NEl &{nel} 83 | NOrb &{norb1} 84 | Mult &{Mult1}, &{Mult2} 85 | NRoots &{NRoots1}, &{NRoots2} 86 | End 87 | Step_End 88 | 89 | # ------------------------------------------------- 90 | # Second step: Actual calculation of AILFT parameters 91 | # ------------------------------------------------- 92 | New_Step 93 | !NoIter MOREAD DKH2 DKH-def2-SVP def2-SVP/C NEVPT2 94 | %MOInp "GuessWavefunction.gbw" 95 | %CASSCF 96 | NEl &{nel} 97 | NOrb &{norb2} 98 | Mult &{Mult1}, &{Mult2} 99 | NRoots &{NRoots3}, &{NRoots4} 100 | #ActOrbs &{ActOrbs} 101 | LFTCase &{LFTCase} 102 | Rel 103 | DoSOC True 104 | End 105 | End 106 | Step_end 107 | 108 | EndRun 109 | -------------------------------------------------------------------------------- /Spectroscopy/CASCI_nevpts_xas_xmcd.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Dimitrios Manganas 2 | # Update : Dimitrios G. Liakos (June of 2024) 3 | # 4 | # 5 | # This protocol computes X-ray Absorption and X-ray Magnetic Circular Dichroism 6 | # spectra at the CASCI/NEVPT2 level 7 | # 8 | # For CASCI/NEVPT2 X-ray protocols one can check the following articles 9 | # 10 | # A. Chantzis, J. K. Kowalska, D. Maganas, S. DeBeer, F. Neese J. Chem. Theory Comput. 2018, 14, 7, 11 | # Ab Initio Wave Function-Based Determination of Element Specific Shifts for the Efficient 12 | # Calculation of X-ray Absorption Spectra of Main Group Elements and First Row Transition Metals 13 | # 14 | # D. Maganas, J. K. Kowalska, C. V. Stappen, S. DeBeer and F. Neese: J. Chem. Phys. 152, 114107 (2020) 15 | # Mechanism of L2,3-edge x-ray magnetic circular dichroism intensity from quantum chemical 16 | # calculations and experiment-A case study on V(IV)/V(III) complexes 17 | # 18 | # 19 | # In the current implementation we perform the following steps: 20 | # 21 | # Step 1. Compute initial QRO orbitals at DFT level 22 | # 23 | # Step 2. Perform an SA-CASSCF calculation on the Valence space 24 | # 25 | # Step 3. Rotate Core orbitals in the active space. The active space is 26 | # saturated with all the single excitations from the core and 27 | # calculate various spectra at the CASCI/NEVPT2 level. 28 | # 29 | # Step 4. Call orca_mapspc and generate the XAS and XMCD *.dat and *.stk files 30 | # which can be used for plotting the spectra. (Please consult the ORCA Manual) 31 | # 32 | # 33 | # NOTE 1: The core orbitals are introduced in the active space through the rotate function. 34 | # In the example the rotated orbitals correspond to 2p core orbitals. 35 | # 36 | # NOTE 2: In the case of open shell calculations it is advantageous to turn off the magnetic 37 | # properties calculations. This is achieved by requesting 38 | # GTensor false and/or DTensor (DoDTensor) false 39 | # 40 | # NOTE 3: In spectra generation via the orca_mapspc if parallelisation has been requested (via PAL) 41 | # then one has to process the *.mpix.out where x is the requested number of cores 42 | # 43 | # NOTE 4: In orca_mapspc -x0700 -x1900 define the spectrum window range. Here we used the values 700 44 | # and 900 but they should be adjusted(Please consult the ORCA Manual for further details) 45 | # 46 | # NOTE 5: The active spaces should be adjusted for the problem at hand. Here we chose Ni2+ as an example 47 | # 48 | # NOTE 6: In the call to orca_mapspc name of the orca output should be used. In the example we use the 49 | # "test.out" name because this is the output file we created. 50 | # 51 | # --------------------------------------------------------------- 52 | # -------------------- Variables ------------------------------ 53 | # ---------- Variables that could be adjusted using 'with'----- 54 | Variable molecule; 55 | Variable charge = 0; 56 | Variable mult = 1; 57 | Variable nel1 = 8; 58 | Variable nel2 = 14; 59 | Variable norb1 = 5; 60 | Variable norb2 = 8; 61 | Variable Mult1 = 3; 62 | Variable Mult2 = 1; 63 | Variable NRoots1 = 10; 64 | Variable NRoots2 = 15; 65 | Variable NRoots3 = 21; 66 | Variable NRoots4 = 26; 67 | Variable RunBasename = "run"; # The name of the calling orca input 68 | Variable DFTBasename = "DFTWavefunction"; 69 | Variable CASBasename = "CASWavefunction"; 70 | 71 | # ------------------------------------------------------ 72 | # Creation of orbitals (DFT-MOs/QROs) 73 | # ------------------------------------------------------ 74 | New_Step 75 | !BP86 DKH2 DKH-def2-SVP def2/J UNO 76 | *xyzfile &{charge} &{mult} &{molecule} 77 | %base "&{DFTBasename}" 78 | Step_End 79 | 80 | # ------------------------------------------------------ 81 | # Creation of orbitals (SA-CASSCF) 82 | # ------------------------------------------------------ 83 | New_Step 84 | !MOREAD DKH2 DKH-def2-SVP def2-SVP/C 85 | % base "&{CASBasename}" 86 | %MOInp "&{DFTBasename}.qro" 87 | %CASSCF 88 | NEl &{nel1} 89 | NOrb &{norb1} 90 | Mult &{Mult1},&{Mult2} 91 | NRoots &{NRoots1}, &{NRoots2} 92 | Maxiter 200 93 | End 94 | Step_End 95 | 96 | # ------------------------------------------------------ 97 | # Actual calculation of CASCI/NEVPT2 XAS/XMCD spectra 98 | # ------------------------------------------------------ 99 | New_Step 100 | !MOREAD DKH2 DKH-def2-SVP def2-SVP/C NEVPT2 101 | %MOInp "&{CASBasename}.gbw" 102 | %rel 103 | FiniteNuc true 104 | End 105 | %Method 106 | FrozenCore FC_NONE 107 | End 108 | %SCF 109 | Rotate 110 | {2,6,90} 111 | {3,7,90} 112 | {4,8,90} 113 | End 114 | End 115 | %CASSCF 116 | NEl &{nel2} 117 | NOrb &{norb2} 118 | Mult &{Mult1}, &{Mult2} 119 | NRoots &{NRoots3}, &{NRoots4} 120 | MaxIter 1 121 | nevpt2 True 122 | Rel 123 | DoSOC True 124 | GTensor False 125 | DTensor False 126 | DoMCD True 127 | B=60000 128 | Temperature 4 129 | PrintLevel 3 130 | End 131 | End 132 | Step_End 133 | # 134 | # ------------------------------------------------------ 135 | # Use mapspc to calculate spectra 136 | # ------------------------------------------------------ 137 | SYS_CMD("orca_mapspc %s.out SOCABS -x0700 -x1900 -w0.5 -eV -n10000 ", RunBasename); 138 | SYS_CMD("orca_mapspc %s_Compound_3.NEVPT2-el.dipole-length.1.mcd MCD -x0700 -x1900 -w0.5 -eV -n10000 ", RunBasename); 139 | End 140 | -------------------------------------------------------------------------------- /Spectroscopy/mrci_xas.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Dimitrios Manganas 2 | # Update : Dimitrios G. Liakos (June of 2024) 3 | # 4 | # 5 | # This protocol computes X-ray Absorption spectra at the MRCI level 6 | # 7 | # for MRCI or MREOM X-ray protocols one can check the following article 8 | # 9 | # D Maganas, J. K. Kowalska, M Nooijen, S. DeBeer, and F. Neese, J. Chem. Phys. 150, 104106 (2019) 10 | # Comparison of multireference ab initio wavefunction methodologies for X-ray absorption edges: 11 | # A case study on [Fe(II/III)Cl4]2-/1- molecules. 12 | # 13 | # 14 | # In the current implementation we perform the following steps: 15 | # 16 | # Step 1. Compute initial QRO orbitals at DFT level 17 | # 18 | # Step 2. Perform an SA-CASSCF calculation on the Valence space 19 | # 20 | # Step 3. Rotate core orbitals in the active space. 21 | # 22 | # The active space is saturated with all the single excitations 23 | # (This can change replacing the "Excitations cis" with 24 | # "Excitation cisd" to include double excitations) 25 | # from the core. 26 | # 27 | # Compute the various spectra at the MRCI level. 28 | # 29 | # Step 4. If needed call orca_mapspc and generate the XAS *.dat and *.stk files 30 | # which can be used for plotting the spectra. (Please consult the ORCA Manual) 31 | # 32 | #****************************************** NOTES ****************************************** 33 | # NOTE 1: The core orbitals are introduced in the active space through the rotate function. 34 | # In the example the rotated orbitals correspond to 2p core orbitals. 35 | # 36 | # NOTE 2: In the case of open shell calculations it is advantageous to turn off the magnetic 37 | # properties calculations. This is achieved by requesting 38 | # GTensor false and/or DTensor (DoDTensor) false 39 | # 40 | # NOTE 3: In the MRCI block one can choose a desired excitation scheme to be performed on top 41 | # of the CAS configuration state functions (CSFs) 42 | # Here we chose "Excitations CIS". The options "None" and "CISD" are also available. 43 | # 44 | # NOTE 4: In spectra generation via the orca_mapspc if parallelisation has been requested (via PAL) 45 | # then one has to process the *.mpix.out where x is the requested number of cores 46 | # 47 | # NOTE 5: In orca_mapspc -x0700 -x1900 define the spectrum window range. Here we used the values 700 48 | # and 900 but they should be adjusted(Please consult the ORCA Manual for further details) 49 | # 50 | # NOTE 6: Thi protocol can also be used to compute XMCD, XES and RIXS spectra 51 | # (Please consult the ORCA Manual for further details) 52 | # 53 | # NOTE 7: The active spaces should be adjusted for the problem at hand. Here we chose Ni2+ as an example 54 | # 55 | # NOTE 8: In the call to orca_mapspc name of the orca output should be used. In the example we use the 56 | # "test.out" name because this is the output file we created.# 57 | 58 | # --------------------------------------------------------------- 59 | # -------------------- Variables ------------------------------ 60 | # ---------- Variables that could be adjusted using 'with'----- 61 | Variable molecule; 62 | Variable charge = 0; 63 | Variable mult = 1; 64 | Variable basis = "DKH-def2-SVP"; 65 | Variable nel1 = 8; 66 | Variable nel2 = 14; 67 | Variable norb1 = 5; 68 | Variable norb2 = 8; 69 | Variable Mult1 = 3; 70 | Variable Mult2 = 1; 71 | Variable NRoots1 = 10; 72 | Variable NRoots2 = 15; 73 | Variable NRoots3 = 21; 74 | Variable NRoots4 = 26; 75 | Variable RunBasename = "run"; # The name of the calling orca input 76 | Variable DFTBasename = "DFTWavefunction"; 77 | Variable CASBasename = "CASWavefunction"; 78 | 79 | # ------------------------------------------------------ 80 | # Creation of orbitals (DFT-MOs/QROs) 81 | # ------------------------------------------------------ 82 | New_Step 83 | !BP86 DKH2 &{basis} def2/J UNO 84 | *xyzfile &{charge} &{mult} &{molecule} 85 | %base "&{DFTBasename}" 86 | Step_End 87 | 88 | # ------------------------------------------------------ 89 | # Creation of orbitals (SA-CASSCF) 90 | # ------------------------------------------------------ 91 | New_Step 92 | !MORead DKH2 &{basis} def2-SVP/C 93 | %base "&{CASBasename}" 94 | %MOInp "&{DFTBasename}.qro" 95 | %CASSCF 96 | NEl &{nel1} 97 | NOrb &{norb1} 98 | Mult &{Mult1}, &{Mult2} 99 | NRoots &{NRoots1}, &{NRoots2} 100 | Maxiter 200 101 | Switchstep nr 102 | End 103 | Step_End 104 | 105 | # ------------------------------------------------------ 106 | # Third step: Actual calculation of MRCI-XAS spectra 107 | # ------------------------------------------------------ 108 | New_Step 109 | !MORead DKH2 &{basis} def2-SVP/C 110 | %MOInp "&{CASBasename}.gbw" 111 | %rel 112 | FiniteNuc true 113 | End 114 | %Method 115 | FrozenCore FC_NONE 116 | End 117 | %SCF 118 | rotate 119 | {2,6,90} 120 | {3,7,90} 121 | {4,8,90} 122 | End 123 | End 124 | %CASSCF 125 | NEl &{nel2} 126 | NOrb &{norb2} 127 | Mult &{Mult1}, &{Mult2} 128 | NRoots &{NRoots3}, &{NRoots4} 129 | MaxIter 200 130 | End 131 | %MRCI 132 | CIType MRCI 133 | Intmode FullTrafo 134 | Newblock 3 * 135 | Nroots &{NRoots3} 136 | Excitations cis 137 | Refs CAS(&{nel2},&{norb2}) End 138 | End 139 | Newblock 1 * 140 | Nroots &{NRoots4} 141 | Excitations cis 142 | Refs CAS(&{nel2},&{norb2}) End 143 | End 144 | Maxiter 100 145 | SOC 146 | Printlevel 3 147 | DoSOC true 148 | GTensor false 149 | DTensor false 150 | End 151 | End 152 | Step_End 153 | 154 | SYS_CMD("orca_mapspc %s.out SOCABS -x0700 -x1900 -w0.5 -eV -n10000", runBasename); 155 | 156 | EndRun 157 | -------------------------------------------------------------------------------- /Spectroscopy/mreom_xas.cmp: -------------------------------------------------------------------------------- 1 | # Creator: Dimitrios Manganas 2 | # Update : Dimitrios G. Liakos (June of 2024) 3 | # 4 | # 5 | # This protocol computes X-ray Absorption spectra at the MREOM level 6 | # 7 | # for MRCI or MREOM X-ray protocols one can check the following article 8 | # 9 | # D Maganas, J. K. Kowalska, M Nooijen, S. DeBeer, and F. Neese, J. Chem. Phys. 150, 104106 (2019) 10 | # Comparison of multireference ab initio wavefunction methodologies for X-ray absorption edges: 11 | # A case study on [Fe(II/III)Cl4]2-/1- molecules. 12 | # 13 | # In the current implementation we perform the following steps: 14 | # 15 | # 16 | # Step 1. Compute initial QRO orbitals at DFT level 17 | # 18 | # Step 2. Perform an SA-CASSCF calculation on the Valence space 19 | # 20 | # Step 3. Rotate core orbitals in the active space. 21 | # 22 | # The active space is saturated with all the single excitations 23 | # (This can change replacing the "Excitations cis" with 24 | # "Excitation cisd" to include double excitations) from the core. 25 | # 26 | # Compute the various spectra at the MREOM level. 27 | # 28 | # Step 4. If needed call orca_mapspc and generate the XAS *.dat and *.stk files 29 | # which can be used for plotting the spectra. (Please consult the ORCA Manual) 30 | # 31 | #****************************************** NOTES ****************************************** 32 | # NOTE 1: The core orbitals are introduced in the active space through the rotate function. 33 | # In the example the rotated orbitals correspond to 2p core orbitals. 34 | # 35 | # NOTE 2: In the case of open shell calculations it is advantageous to turn off the magnetic 36 | # properties calculations. This is achieved by requesting 37 | # GTensor false and/or DTensor (DoDTensor) false 38 | # 39 | # NOTE 3: In MR-EOM the excitation scheme to be performed of the CAS configuration state functions 40 | # (CSFs) in the MRCI block is chosen automatically. Here the initial CIS is scheme is 41 | # internally overwritten. (Please consult the ORCA Manual for further options). 42 | # 43 | # NOTE 4: In spectra generation via the orca_mapspc if parallelisation has been requested (via PAL) 44 | # then one has to process the *.mpix.out where x is the requested number of cores 45 | # 46 | # NOTE 5: In orca_mapspc -x0700 -x1900 define the spectrum window range. Here we used the values 700 47 | # and 900 but they should be adjusted(Please consult the ORCA Manual for further details) 48 | # 49 | # NOTE 6: Thi protocol can also be used to compute XMCD, XES and RIXS spectra 50 | # (Please consult the ORCA Manual for further details) 51 | # 52 | # NOTE 7: The active spaces should be adjusted for the problem at hand. Here we chose Ni2+ as an example 53 | # 54 | # NOTE 8: In the call to orca_mapspc name of the orca output should be used. In the example we use the 55 | # "test.out" name because this is the output file we created.# 56 | 57 | # --------------------------------------------------------------- 58 | # -------------------- Variables ------------------------------ 59 | # ---------- Variables that could be adjusted using 'with'----- 60 | Variable molecule; 61 | Variable charge = 0; 62 | Variable mult = 1; 63 | Variable basis = "DKH-def2-SVP"; 64 | Variable nel1 = 8; 65 | Variable nel2 = 14; 66 | Variable norb1 = 5; 67 | Variable norb2 = 8; 68 | Variable Mult1 = 3; 69 | Variable Mult2 = 1; 70 | Variable NRoots1 = 10; 71 | Variable NRoots2 = 15; 72 | Variable NRoots3 = 21; 73 | Variable NRoots4 = 26; 74 | Variable RunBasename = "run"; # The name of the calling orca input 75 | Variable DFTBasename = "DFTWavefunction"; 76 | Variable CASBasename = "CASWavefunction"; 77 | 78 | # ------------------------------------------------------ 79 | # Creation of orbitals (DFT-MOs/QROs) 80 | # ------------------------------------------------------ 81 | New_Step 82 | !BP86 DKH2 &{basis} def2/J UNO 83 | *xyzfile &{charge} &{mult} &{molecule} 84 | %base "&{DFTBasename}" 85 | Step_End 86 | 87 | # ------------------------------------------------------ 88 | # Creation of orbitals (SA-CASSCF) 89 | # ------------------------------------------------------ 90 | New_Step 91 | !MORead DKH2 &{basis} def2-SVP/C 92 | %base "&{CASBasename}" 93 | %MOInp "&{DFTBasename}.qro" 94 | %CASSCF 95 | NEl &{nel1} 96 | NOrb &{norb1} 97 | Mult &{Mult1}, &{Mult2} 98 | NRoots &{NRoots1}, &{NRoots2} 99 | Maxiter 200 100 | Switchstep nr 101 | End 102 | Step_End 103 | 104 | # ------------------------------------------------------ 105 | # Third step: Actual calculation of MREOM-XAS spectra 106 | # ------------------------------------------------------ 107 | New_Step 108 | !MR-EOM MORead DKH2 &{basis} def2-SVP/C NEVPT2 109 | %MOInp "&{CASBasename}.gbw" 110 | %rel 111 | FiniteNuc true 112 | End 113 | %Method 114 | FrozenCore FC_NONE 115 | End 116 | %SCF 117 | rotate 118 | {2,6,90} 119 | {3,7,90} 120 | {4,8,90} 121 | End 122 | End 123 | %CASSCF 124 | NEl &{nel2} 125 | NOrb &{norb2} 126 | Mult &{Mult1}, &{Mult2} 127 | NRoots &{NRoots3}, &{NRoots4} 128 | MaxIter 200 129 | End 130 | %MDCI 131 | STol 1e-7 132 | End 133 | %MRCI 134 | CIType MRCI 135 | Intmode FullTrafo 136 | Newblock &{Mult1} * 137 | Nroots &{NRoots3} 138 | Excitations cis 139 | Refs CAS(&{nel2},&{norb2}) End 140 | End 141 | Newblock &{Mult2} * 142 | Nroots &{NRoots4} 143 | Excitations cis 144 | Refs CAS(&{nel2},&{norb2}) End 145 | End 146 | Maxiter 100 147 | Soc 148 | Printlevel 3 149 | DoSOC true 150 | GTensor false 151 | DTensor false 152 | End 153 | End 154 | Step_End 155 | 156 | SYS_CMD("orca_mapspc %s.out SOCABS -x0700 -x1900 -w0.5 -eV -n10000", runBasename); 157 | 158 | EndRun 159 | -------------------------------------------------------------------------------- /UserContributed/XYG3TypeDoubleHybrids/test.inp: -------------------------------------------------------------------------------- 1 | 2 | *xyz 0 1 3 | N 0.0 0.0 0.108827 4 | H 0.0 0.947455 -0.253931 5 | H 0.820520 -0.473727 -0.253931 6 | H -0.820520 -0.473727 -0.253931 7 | * 8 | %pal nprocs 4 end 9 | %maxcore 1000 10 | 11 | %compound "xdh.cmp" 12 | with 13 | xc = "xyg3"; 14 | basis = "def2-svp"; 15 | auxbas = "def2-svp/c"; 16 | # optional params 17 | # dlpno = "true"; 18 | end 19 | 20 | # EDH: -56.459 21 | 22 | # for xygjos 23 | #%compound "xdh_scs.cmp" 24 | # with 25 | # xc = "xygjos"; 26 | # basis = "def2-svp"; 27 | # auxbas = "def2-svp/c"; 28 | #end 29 | -------------------------------------------------------------------------------- /UserContributed/XYG3TypeDoubleHybrids/xdh.cmp: -------------------------------------------------------------------------------- 1 | # 2 | # XYG3 with RI-MP2. 3 | # 4 | # Final energy : EDH 5 | # 6 | Variable xc = "xyg3"; 7 | Variable basis = "def2-svp"; 8 | Variable auxbas = "def2-svp/c"; 9 | Variable dlpno = "false"; 10 | 11 | Variable acm[3] ; 12 | Variable scalldac = 0.6789; 13 | Variable pt2_coeff = 0.3211; 14 | Variable Enscf; 15 | Variable Ept2; 16 | Variable Edh; 17 | 18 | if (xc = "xyg3") then 19 | pt2_coeff = 0.3211; 20 | acm[0] = 0.8033; 21 | acm[1] = 0.2107; 22 | acm[2] = 0.6789; 23 | scalldac = 0.6789; 24 | endif 25 | 26 | New_Step 27 | ! b3lyp_g &{basis} 28 | ! noautostart 29 | Step_End 30 | Alias scf 31 | 32 | Read_Geom scf 33 | Read_Mos scf 34 | New_Step 35 | ! b3lyp_g &{basis} 36 | ! nopop 37 | %scf 38 | maxiter 1 39 | ignoreconv true 40 | end 41 | %method 42 | Functional b3lyp_g 43 | ACM = &{acm[0]}, &{acm[1]},&{acm[2]} 44 | ScalLDAC = &{scalldac} 45 | end 46 | Step_End 47 | Alias nscf 48 | 49 | Read_Geom scf 50 | Read_Mos scf 51 | New_Step 52 | ! RI-MP2 &{basis} &{auxbas} 53 | ! noiter nopop 54 | ! nofrozencore 55 | %mp2 56 | dlpno &{dlpno} 57 | end 58 | Step_End 59 | Alias pt2 60 | 61 | read Enscf = SCF_ENERGY[nscf]; 62 | read Ept2 = MP2_CORR_ENERGY[pt2]; 63 | 64 | Edh = (Enscf + Ept2*pt2_coeff); 65 | 66 | End 67 | -------------------------------------------------------------------------------- /UserContributed/XYG3TypeDoubleHybrids/xdh_scs.cmp: -------------------------------------------------------------------------------- 1 | # 2 | # XYGJ-OS with RI-MP2 3 | # 4 | # Final energy : EDH 5 | # 6 | 7 | Variable xc = "xyg3"; 8 | Variable basis = "def2-svp"; 9 | Variable auxbas = "def2-svp/c"; 10 | Variable dlpno = "false"; 11 | 12 | Variable acm[3] ; 13 | Variable scalldac; 14 | Variable pt2_coeff; 15 | Variable ss = 1.0; 16 | Variable os = 1.0; 17 | Variable Enscf; 18 | Variable Ept2; 19 | Variable Edh; 20 | 21 | if (xc = "xygjos") then 22 | pt2_coeff = 0.4364; 23 | ss = 0.0; 24 | acm[0] = 0.7731; 25 | acm[1] = 0.0 ; 26 | acm[2] = 0.2754; 27 | scalldac = 0.5063; 28 | endif 29 | 30 | New_Step 31 | ! b3lyp_g &{basis} 32 | ! noautostart 33 | Step_End 34 | Alias scf 35 | 36 | Read_Geom scf 37 | Read_Mos scf 38 | New_Step 39 | ! b3lyp_g &{basis} 40 | ! nopop 41 | %scf 42 | maxiter 1 43 | ignoreconv true 44 | end 45 | %method 46 | Functional b3lyp_g 47 | ACM = &{acm[0]}, &{acm[1]},&{acm[2]} 48 | ScalLDAC = &{scalldac} 49 | end 50 | Step_End 51 | Alias nscf 52 | 53 | Read_Geom scf 54 | Read_Mos scf 55 | New_Step 56 | ! RI-MP2 &{basis} &{auxbas} 57 | ! noiter nopop 58 | ! nofrozencore 59 | %mp2 60 | dlpno &{dlpno} 61 | doscs true 62 | ps &{os} 63 | pt &{ss} 64 | end 65 | Step_End 66 | Alias pt2 67 | 68 | read Enscf = SCF_ENERGY[nscf]; 69 | read Ept2 = MP2_CORR_ENERGY[pt2]; 70 | 71 | Edh = (Enscf + Ept2*pt2_coeff); 72 | #print("%s Results", xc); 73 | #print("Total energy: %lf", Edh); 74 | 75 | End 76 | --------------------------------------------------------------------------------