<div>Thank you, Mark, for your suggestion (even added it to my &quot;favourites&quot;).</div>
<div>But in this problem I&#39;d prefer to stick to C, despite the grater difficulty.</div>
<div>&nbsp;</div>
<div>Regards,</div>
<div>&nbsp;</div>
<div>Pedro.<br><br>&nbsp;</div>
<div><span class="gmail_quote">2007/7/4, Mark Abraham &lt;<a href="mailto:mark.abraham@anu.edu.au">mark.abraham@anu.edu.au</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">&gt; Hi,<br>&gt;<br>&gt; I want to automate the process of getting the index groups in an analysis<br>&gt; program I&#39;m working on.
<br>&gt; This is justified because of the large number of groups I work with (more<br>&gt; than 100).<br>&gt;<br>&gt; The program asks for user input (&quot;Select a group:&quot;) by the function:<br>&gt;<br>&gt; void get_index(t_atoms *atoms, char *fnm, int ngrps,
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int isize[], atom_id *index[],char *grpnames[])<br>&gt;<br>&gt; which, I think, is defined in /src/gmxlib/index.c.<br>&gt;<br>&gt; Do you have any idea on how to solve this problem?<br><br>Rather than hack the C code, you can automate human-program interaction
<br>well with &quot;Expect&quot; (Google for link) which gives you a programmatic<br>interface that you could tweak to make a wrapper for make_ndx that suits<br>your needs.<br><br>Mark<br><br>_______________________________________________
<br>gmx-users mailing list&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br><a href="http://www.gromacs.org/mailman/listinfo/gmx-users">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>Please search the archive at 
<a href="http://www.gromacs.org/search">http://www.gromacs.org/search</a> before posting!<br>Please don&#39;t post (un)subscribe requests to the list. Use the<br>www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">
gmx-users-request@gromacs.org</a>.<br>Can&#39;t post? Read <a href="http://www.gromacs.org/mailing_lists/users.php">http://www.gromacs.org/mailing_lists/users.php</a><br></blockquote></div><br>