I'm a master's student and recently I started doing computational chemistry calculations using ORCA program.
This program works by command line and I saw that the majority of computational chemistry programs work in a similar way.
My question is: is it possible to make them work through a Python script?
I think it would be very convenient since it could be possible to create new files and organize them with Python.
I tried this code (very easy HF ( Hartree-Fock) calculation for Hydrogen molecule):
import os
folder_name = "D:\\prove_orca\\Orca_con_Python\\Hydrogen_molecule"
file_name = "H2"
os.chdir(folder_name)
os.system("D:\\ORCA\\orca" + " " + file_name + ".inp" + " " + ">" + " " + file_name + ".out")
Running the ORCA tool through Python gives me a memory error. However if I run the calculation directly from the command line everything is fine.
Here the code of the .inp file:
! HF def2-svp
%pal nprocs 16 # any number (positive integer)
end
* xyzfile 0 1 coord.xyz
The problem is not in the script, but in ORCA, that give me this error:
[file orca_tools/qcmem.cpp, line 1043, Process 5]: OUT OF MEMORY ERROR!
Do you have any advice or resources I can read?
os.system
) and it can also be adjusted and tuned at your will $\endgroup$