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.

In reply to Re^4: How to vectorize a subroutine--perhapse using PDL piddles or threads by Feynman
in thread How to vectorize a subroutine--perhapse using PDL piddles or threads by Feynman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.