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 <[email protected]> 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 [email protected]
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 [email protected].
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists