Generate ORCA Inputs

For these examples we are going to assume that we have a folder named 'sdf_files' that contains a single file 'ethane.sdf' with a single conformer in .sdf format whose ORCA input file we want to generate. As you might have guessed in this specific example we will be working with Ethane.

mol_3d

The sdf file contents are as follows:


 OpenBabel12082212193D

  8  7  0  0  0  0  0  0  0  0999 V2000
    0.9537   -0.0505   -0.0702 C   0  0  0  0  0  0  0  0  0  0  0  0
    2.4658   -0.0505   -0.0702 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.5694   -1.0113   -0.4254 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.5694    0.7375   -0.7247 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.5694    0.1223    0.9395 H   0  0  0  0  0  0  0  0  0  0  0  0
    2.8501   -0.2233   -1.0799 H   0  0  0  0  0  0  0  0  0  0  0  0
    2.8501   -0.8385    0.5843 H   0  0  0  0  0  0  0  0  0  0  0  0
    2.8501    0.9103    0.2850 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  1  3  1  0  0  0  0
  1  4  1  0  0  0  0
  1  5  1  0  0  0  0
  2  6  1  0  0  0  0
  2  7  1  0  0  0  0
  2  8  1  0  0  0  0
M  END
$$$$

Note

The following code will also work for multiple conformers and/or molecules.

Note

AQME supports various formats for providing the geometries of the conformers. If we want to use a format to specify the molecule that does not contain 3D coordinates we will need to generate them beforehand, please see the Conformer Search section.

As we will be generating qm inputs we will use the --qprep module.

We include the suffix that we want to append to the base name of the generated files --suffix m06-basic

We specify the files whose ORCA input we want --files "sdf_files/*.sdf"

We include the number of processors --nprocs 8 and memory --mem 16GB for the calculations

And we specify the command line of the ORCA calculation:

--qm_input "m06 def2qzvpp
 %cpcm
 smd true
 SMDsolvent \"CH2Cl2\"
 end"

Note

the "CH2Cl2" in this case will ensure that the generated file contains "CH2Cl2"

Our final command line will look like:

python -m aqme --qprep --program orca --suffix "m06-basic" --files "sdf_files/*.sdf" --nprocs 8 --mem 16GB --qm_input "m06 def2qzvpp
%cpcm
smd true
SMDsolvent \"CH2Cl2\"
end"

With this we have generated a new folder named QCALC that contains the file 'ethane_conf_1_m06-basic.inp' with the following contents:

# ethane_conf_1_m06-basic
%maxcore 16000
%pal nprocs 8 end
! m06 def2qzvpp
%cpcm
smd true
SMDsolvent "CH2Cl2"
end
* xyz 0 1
 C   0.95370000  -0.05050000  -0.07020000
 C   2.46580000  -0.05050000  -0.07020000
 H   0.56940000  -1.01130000  -0.42540000
 H   0.56940000   0.73750000  -0.72470000
 H   0.56940000   0.12230000   0.93950000
 H   2.85010000  -0.22330000  -1.07990000
 H   2.85010000  -0.83850000   0.58430000
 H   2.85010000   0.91030000   0.28500000
*

Enforce Charge and Multiplicity

If we had wanted to specify the charge and multiplicity we just need to add the appropriate keywords.

python -m aqme --qprep --program orca --charge 0 --mult 3 --suffix "m06-triplet" --files "sdf_files/*.sdf" --nprocs 8 --mem 16GB --qm_input "m06 def2qzvpp
%cpcm
smd true
SMDsolvent \"CH2Cl2\"
end"

Will lead to the creation of the file 'ethane_conf_1_wb97xd-triplet.com' with the following contents:

# ethane_conf_1_m06-triplet
%maxcore 16000
%pal nprocs 8 end
! m06 def2qzvpp
%cpcm
smd true
SMDsolvent "CH2Cl2"
end
* xyz 0 3
 C   0.95370000  -0.05050000  -0.07020000
 C   2.46580000  -0.05050000  -0.07020000
 H   0.56940000  -1.01130000  -0.42540000
 H   0.56940000   0.73750000  -0.72470000
 H   0.56940000   0.12230000   0.93950000
 H   2.85010000  -0.22330000  -1.07990000
 H   2.85010000  -0.83850000   0.58430000
 H   2.85010000   0.91030000   0.28500000
*