[gmx-users] Re:g_energy

lloyd riggs lloyd.riggs at gmx.ch
Fri Mar 9 23:45:09 CET 2012


Thanks for the reply,

My main problem a syntax error as all of em are similar, but I get the languages confussed sometimes.  This worked;

#!/bin/bash
i=1
for ((i=1;x<=1322;i+=1)); do
g_energy -f energy.edr -o ${i}.xvg << EOF
${i}

EOF
done

for everything in the energy file based on indexed components.

I had finally written b efore giving up

#!/bin/bash
i=1
for (i=1;x<=1322;i+=1); do
g_energy -f traj_5.edr -o $i.xvg << EOF
${i}

EOF
done

Which is just a python script.

Thanky again

Stephan Lloyd Watkins 

-------- Original-Nachricht --------
> Datum: Fri, 9 Mar 2012 11:47:09 -0700
> Von: Oliver Stueker <ostueker at gmail.com>
> An: Discussion list for GROMACS users <gmx-users at gromacs.org>
> Betreff: Re: [gmx-users] Re:g_energy

> Hi Stephan,
> 
> Have a look at:
> http://www.gromacs.org/Documentation/How-tos/Using_Commands_in_Scripts
> 
> something like this should work:
> ----------8><----------schnipp----------><8----------
> #!/bin/bash
> for i in Temperature Pressure ; do
> g_energy -f ener.edr -o ${i}.xvg << EOF
> ${i}
> 
> EOF
> done
> ----------8><----------schnapp----------><8----------
> 
> creating Temperature.xvg and Pressure.xvg assuming there are terms
> named like this in your ener.edr file.
> The braces around the i might not be necessary in this case, but don't
> hurt either.
> 
> Best,
> Oliver
> 
> On Fri, Mar 9, 2012 at 08:00, lloyd riggs <lloyd.riggs at gmx.ch> wrote:
> >
> > Dear All,
> >
> > Is there a way to either supress the interactive portion of g_energy and
> print out everything listed, or pass it to something more automated?  MY
> problem, I spent an hour or three trying to just write an automated four
> line shell or python script to extract all the terms listed based on index
> files.
> >
> > The error comes as I can not pass a variable i once the interactive
> portion of the g_energy is invoked (I get error $i, i '$i', "$i", etc.. does
> not match a pattern or whatever as an error each time).  Basically try
> getting a few dozen terms from an energy file, times 20 to 100 necessary runs...
> >
> > Sincerely,
> >
> > Stephan Lloyd Watkins
> -- 
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a



More information about the gromacs.org_gmx-users mailing list