Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

What I need is a script that will: 1. Create input files 2. Run qchem jobs 3. Parse output 4. Plot the data The input files will consider Atom 1 and Atom 2. We will also consider the atomic radii r_min and r_max and need information on delta_r. Concerning the r values, the script should read in arguments, re-print arguments, and print a list of the r's.

I would start by asking questions about my needs and address them one by one. Your input files:

  • Where do they come from? Data input by the user in a form? Data selected by the user from a form? And what format is required by qchem as input?
  • What will be required to run the qchem job? A list of the input files? How might it get that list? How do I use Perl to start the job and give it the list of files? etc...
  • Where does this list of 'radii' come from? Read in from where...user input or already known values stored somewhere? etc....

Take each of the questions you have and find a way to do it in Perl. Write yourself a script that does just enough to prove you have the concept down, then move on to the next question/piece. By the time you get done, you will probably have a lot better idea of what scripting in general means and how it is approached in Perl. As you go along, you will probably have questions that you can ask here.

Some of the answers you get will refer to Perl Modules from CPAN which can in some cases make your work less cumbersome by leveraging other peoples work. I would not worry about that to start. Just take your first question and learn about how you might come up with an answer. That is how I learned to write Perl code. Once you get going, the concepts come faster and faster.

Hope that is encouraging, and maybe a bit helpful too.

...the majority is always wrong, and always the last to know about it...

A solution is nothing more than a clearly stated problem...


In reply to Re: Perl and qchem by wjw
in thread Perl and qchem by cjjennings3

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found