Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Perl and qchem

by cjjennings3 (Initiate)
on Mar 10, 2017 at 15:36 UTC ( #1184175=perlquestion: print w/replies, xml ) Need Help??

cjjennings3 has asked for the wisdom of the Perl Monks concerning the following question:

Problem solved. Thanks.

Replies are listed 'Best First'.
Re: Perl and qchem
by wjw (Priest) on Mar 10, 2017 at 18:46 UTC

    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...

Re: In over my head
by stevieb (Canon) on Mar 10, 2017 at 15:41 UTC

    Welcome to the Monastery, cjjennings3!

    Please note that this is not a code writing service; we don't (very often) write full scripts for free without seeing any effort whatsoever.

    You will need to make some effort to write some code, then come back with what you have, and ask specific questions about parts that do not work.

    Besides, if someone else does all of your work for you, what are you learning?

    "and really need help!"

    "help" is not getting others to do all of the work for you ;)

      Thanks for your input. I do acknowledge that help isn't getting others to do the work for me, but I have no idea how to start this. I've looked into some Perl tutorials and nothing is making sense for some reason. I guess what I'm looking for is a good place to start. Thanks.

        Just looking at the tutorials is unlikely to help. As I'm sure you're aware you need to work at things to learn. Start with learn perl in about 2 hours 30 minutes. Look at the tutorials section of this site. also has references to look at. With regards the task at hand, write down a list of steps your program should take. Address these one at a time. Brake large problems down into a collection of smaller problems. If you get stuck with something specific please post a question (see How do I post a question effectively?). We can explain things to you, but we can understand them for you.

Re: Perl and qchem
by Cow1337killr (Monk) on Mar 10, 2017 at 16:25 UTC
      Kind of. I used iqmol to make this video: Basically we are looking to use a script to make everything more smooth and have more data values. I had to create each frame by hand and edit it all together.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1184175]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2023-06-05 06:43 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (22 votes). Check out past polls.