[gmx-developers] issues in calling python with subprocess in git master code
mark.j.abraham at gmail.com
Fri Nov 28 10:04:35 CET 2014
Can you use the generated .mdp files if you issue gmx grompp directly? Does
subprocess.call(['cat', newmdp]) work as expected?
On Fri, Nov 28, 2014 at 5:59 AM, Shirts, Michael R. (mrs5pt) <
mrs5pt at eservices.virginia.edu> wrote:
> Hi, all-
> I'm trying to write a python script using subprocess to call grompp. It
> works perfectly fine when called from the command line or when debugging;
> this only occurs with python (Anaconda, Python 2.7).
> For example, my code looks like:
> It produces to stdout:
> GROMACS: gmx grompp, VERSION 5.1-dev-20141126-f367cf6 (double precision)
> Executable: grompp
> Library dir:
> Command line:
> grompp -f r0000.noiter.mdp -c trpo.gro -p trpo.top -o r0000.noiter.tpr
> -maxwarn 5
> However, the errors that it then gives and mdout.mdp indicate that the mdp
> is not actually being read in, and the default values are being used
> instead. It even reports that the errors are in the mdp file I fed in,
> even though the mdp does not contain those commands.
> All files work perfectly well when called from the command line.
> The problems also occur the same way when calling as:
> So that's not the issue. Same thing happened with os.system.
> I've tried a bunch of different ways of calling it in python, and all fail
> to have the mdp read in. All other files are read in, and it doesn't
> matter what order they are in.
> I'm just wondering if other people have experienced this sort of problem
> calling gromacs with Python, or if there is something weird I'm doing.
> Michael Shirts
> Associate Professor
> Department of Chemical Engineering
> University of Virginia
> michael.shirts at virginia.edu
> (434) 243-1821
> Gromacs Developers mailing list
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> * For (un)subscribe requests visit
> or send a mail to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gromacs.org_gmx-developers