<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>Apparently me not noticing that at some point in the editing I deleted the line closing the file where I wrote the new mdp. &nbsp;Sorry for the false alarm all .. .&nbsp;</div>
<div>
<div><br>
</div>
<div>Best,</div>
~~~~~~~~~~~~<br>
Michael Shirts<br>
Associate Professor<br>
Department of Chemical Engineering<br>
University of Virginia<br>
<a href="michael.shirts@virginia.edu">michael.shirts@virginia.edu</a><br>
(434) 243-1821</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:14pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Mark Abraham &lt;<a href="mailto:mark.j.abraham@gmail.com">mark.j.abraham@gmail.com</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Friday, November 28, 2014 at 4:04 AM<br>
<span style="font-weight:bold">To: </span>Discussion list for GROMACS development &lt;<a href="mailto:gmx-developers@gromacs.org">gmx-developers@gromacs.org</a>&gt;, &quot;<a href="mailto:michael.shirts@virginia.edu">michael.shirts@virginia.edu</a>&quot; &lt;<a href="mailto:michael.shirts@virginia.edu">michael.shirts@virginia.edu</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [gmx-developers] issues in calling python with subprocess in git master code<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>Can you use the generated .mdp files if you issue gmx grompp directly? Does subprocess.call(['cat', 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'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(['gmx_d','grompp','-f',newmdp,'-c',gro,'-p',top,'-o',tpr,'-<br>
maxwarn','5'])<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(['grompp','-f',newmdp,'-c',gro,'-p',top,'-o',tpr,'-maxwarn'<br>
,'5'])<br>
<br>
So that's not the issue. Same thing happened with os.system.<br>
<br>
<br>
<br>
I've tried a bunch of different ways of calling it in python, and all fail<br>
to have the mdp read in.&nbsp; All other files are read in, and it doesn't<br>
matter what order they are in.<br>
<br>
I'm just wondering if other people have experienced this sort of problem<br>
calling gromacs with Python, or if there is something weird I'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'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>
</div>
</div>
</span>
</body>
</html>