Ok, you convinced me. You will probably find my code primitive--and to my defense I am still new to perl. I should also confess I am new to parallel computing. I am learning as I go along. I have yet to find a program that can bridge programs that take input files and create output files to other programs. I chose perl after considerable research because it was well designed for parsing quickly.
That being said, hacking together this program has been a tremendous effort for me--and I must admit, I had plenty of help from other forums. I figured that should anyone else want to perform similar task as I (in this case, graphing the potential energy of a water molecule as a function of bond length and bonding angle) would go through similar struggles, so I wanted to publish my work to get some recognition (and something to put on a resume) and make my final product freely available to others who want to perform similar tasks.
Since I do not know how to attach files, I will copy and past my subroutines as if they were part of the same program.
code removed
These subroutines are actually organized into a couple of files and modules, but this code (I changed a few things in the first subroutine so this would be true) should actually run if you have psi3 installed and a template file in the correct directory called "psi3water".
The most computational time is by far spent executing psi3--but there is not much I can do about that. It is doing some very complex calculations that are inevitably going to take considerable cpu time. When I read about threading and vectorization, I essentially thought they provided a way of executing as many independent tasks as the cpu could handle at once--thus providing a more efficient alternative to looping through these independent tasks.
I apologize for my ignorance.
Also,
Versatility has been a goal for this project. I wanted to keep my program versatile enough to be able to fill in a wide variety of input files for a wide variety of programs and extract a wide variety of data from the output file.