<div dir="ltr">Hi,<div><br></div><div>Can you use the generated .mdp files if you issue gmx grompp directly? Does subprocess.call([&#39;cat&#39;, newmdp]) work as expected?</div><div><br></div><div>Mark</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 28, 2014 at 5:59 AM, Shirts, Michael R. (mrs5pt) <span dir="ltr">&lt;<a href="mailto:mrs5pt@eservices.virginia.edu" target="_blank">mrs5pt@eservices.virginia.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, all-<br>
<br>
I&#39;m trying to write a python script using subprocess to call grompp. It<br>
works perfectly fine when called from the command line or when debugging;<br>
this only occurs with python (Anaconda, Python 2.7).<br>
<br>
For example, my code looks like:<br>
<br>
subprocess.call([&#39;gmx_d&#39;,&#39;grompp&#39;,&#39;-f&#39;,newmdp,&#39;-c&#39;,gro,&#39;-p&#39;,top,&#39;-o&#39;,tpr,&#39;-<br>
maxwarn&#39;,&#39;5&#39;])<br>
<br>
<br>
<br>
It produces to stdout:<br>
<br>
GROMACS: gmx grompp, VERSION 5.1-dev-20141126-f367cf6 (double precision)<br>
Executable: grompp<br>
Library dir:<br>
/Users/mrshirts/work/gromacs_allv/git/gromacs_official/install_gromacs_noit<br>
er/share/gromacs/top<br>
Command line:<br>
grompp -f r0000.noiter.mdp -c trpo.gro -p trpo.top -o r0000.noiter.tpr<br>
-maxwarn 5<br>
<br>
<br>
However, the errors that it then gives and mdout.mdp indicate that the mdp<br>
is not actually being read in, and the default values are being used<br>
instead. It even reports that the errors are in the mdp file I fed in,<br>
even though the mdp does not contain those commands.<br>
<br>
All files work perfectly well when called from the command line.<br>
<br>
The problems also occur the same way when calling as:<br>
<br>
subprocess.call([&#39;grompp&#39;,&#39;-f&#39;,newmdp,&#39;-c&#39;,gro,&#39;-p&#39;,top,&#39;-o&#39;,tpr,&#39;-maxwarn&#39;<br>
,&#39;5&#39;])<br>
<br>
So that&#39;s not the issue. Same thing happened with os.system.<br>
<br>
<br>
<br>
I&#39;ve tried a bunch of different ways of calling it in python, and all fail<br>
to have the mdp read in.  All other files are read in, and it doesn&#39;t<br>
matter what order they are in.<br>
<br>
I&#39;m just wondering if other people have experienced this sort of problem<br>
calling gromacs with Python, or if there is something weird I&#39;m doing.<br>
<br>
<br>
Best,<br>
~~~~~~~~~~~~<br>
Michael Shirts<br>
Associate Professor<br>
Department of Chemical Engineering<br>
University of Virginia<br>
<a href="mailto:michael.shirts@virginia.edu">michael.shirts@virginia.edu</a><br>
(434) 243-1821<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@gromacs.org</a>.<br>
</font></span></blockquote></div><br></div>