0

I want to perform calculations on a large number of files using gaussian software. It takes the name of input file & the name of the output file in which it will write the results of the calculations. One of the files is as follows:

h2plus_d2.0.in

On the terminal, the following code is executing successfully:

g16 /home/prathvisingh526/Documents/h2plus_d2.0.in h2plus_d2.0.out

However, when I am doing the same thing on python using the following code:

import subprocess
subprocess.run("g16 /home/prathvisingh526/Documents/h2plus_d2.0.in h2plus_d2.0.out",shell=True)

I am getting the following error

/bin/sh: 1: g16: not found

Kindly help!

NoDataDumpNoContribution
  • 10,591
  • 9
  • 64
  • 104
  • Welcome to SO, please share what code you have written so far so that people here can help you. – Maddy Jan 30 '20 at 14:32
  • I've never used this software, but that seems to relatively well documented on their [website](https://gaussian.com/interfacing/) – user8408080 Jan 30 '20 at 14:33
  • Maybe see [File not found error when launching a subprocess containing piped commands](https://stackoverflow.com/questions/24306205/file-not-found-error-when-launching-a-subprocess-containing-piped-commands). – NoDataDumpNoContribution Jan 31 '20 at 10:15
  • 2
    Type `which g16`, use the full path to binary in your code. – favoretti Jan 31 '20 at 10:17

0 Answers0