![]() ![]() In the end I want to run the script in the following way: python3 script.py H2_0_1. Output_file = xyzfile.split(".") + ".out"Īnd is created within the script via templating. The input file is derived from the *xyz file via xyzfile = str(sys.argv) ![]() I used () for my tool that runs commands in parallel. The script reads and splits the filename by the point and creates an input file name H2.inp and the output should be written into the file H2.out. Best Rasmus tjreedy Have you considered using multiprocessing and its pool and queue mechanisms barry-scott (Barry Scott) 3 If you want to do this yourself then I would be using n () not Popen. How do I "emulate" the command given at the top with the subprocess module? I tried that with n(, stdout=output_file)īut so far it did not work. At the end the script should start the calculation in a way that I could log out of the server without stopping orca. Now I wanted to use a python script (with some templating) to write the input file automatically. Normally you start your quantum chemical programm (in my case it's called orca) with your input file (*.inp) on a remote server as a background process and pipe the output into an outputfile (*.out) via nohup orca H2.inp >& H2.out & I want to automate some quantum chemical calculations and ran into a small problem. How to Start Background Process in Python We will be using subprocess python module for this purpose. In this article, we will learn how to start background process in Python. ![]() Here python’s ability to interact with Linux shell is very useful. I'm looking for a solution for a probably quite easy problem. Sometimes you may need to run background process from your python script. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |