Hi all.<br><br>First: ok, lets stop the C X Fortran issue here: this kind of subject always look like a &quot;ready to become flamme war&quot; one.&nbsp; ;) Sorry for rising the subject a bit in the previous email.<br><br>The point is: when this project started, almost 4 years ago, I already knew very well frotran90, and gromacs was not still in the sight for us, but fortran codes like mdynamix still were. So, at that point it was pointless to learn C.
<br><br>Three years later, at the end of the project, gromacs becomes all-day tool, and thousands of lines of code already written and optimized for fortran90 also are standard here.&nbsp; ;)&nbsp; That&#39;s the reason why it would be crazzyness to try to translate everything to C. So, the aim here is to just change the reading procedures, to read the information needed from gromacs. One way would be to rewrite everything on fortran, and that will be painfull. The other is to link to the objects and libraries in the proper way.
<br><br>If everything goes smoothly here, the next project I get in will include two years of implementing a few extra features inside gromacs code. Then, of course, learning C will be a must, and the first thing to be done.&nbsp; :)
<br><br>I can already do that for .xtc files. Seems that, unfortunatelly, the least odd way is to find a way to get the last pieces of information needed (atomic charges and masses) from the .tpr files. Other ways would include lots of file translations, or adaptions in the codes themselves which would lead to &quot;non-generality&quot; of it.
<br><br>Sorry for not noticing the box shape in the .xtc file. I passed over that integer in the reading, dismissing it as only some kind of old feature useless now. Really sorry for that point.<br><br>Which files should I look for in order to get the proper way of reading masses and atomic charges from a .tpr file? And which objects will need to be included in the linking stage? Is there any &quot;outsider&quot; program (fortran would be perfect, but I don&#39;t think it will be too common too) that works directly with the .tpr files?
<br><br>Thanks a lot everybody for all the help, and sorry for taking so much of your time,<br><br>Sincerally yours,<br><br>Jones<br><br><div><span class="gmail_quote">On 9/30/07, <b class="gmail_sendername">David van der Spoel
</b> &lt;<a href="mailto:spoel@xray.bmc.uu.se">spoel@xray.bmc.uu.se</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Jones de Andrade wrote:
<br>&gt; Hi Mark.<br>&gt;<br>&gt; Wait a second, you mean that editconf would allow me to have both<br>&gt; charges and masses on a .pdb file directly from command line (having<br>&gt; other matters asking for my presence absolutelly now, so please forgive
<br>&gt; me if this message becomes somehow strange)<br>&gt;<br>&gt; So, I would have atom names, number of molecules types, number of<br>&gt; molecules of each type, number of atoms of each molecule type,<br>&gt; coordinates, charges and masses on a .pdb file, correct?
<br>no just atoms and charges.<br><br><br><br>&gt;<br>&gt; But, still, where could I then easilly get the box type and sizes, as<br>&gt; well as simulation times?<br>box is in xtc file.<br><br>You could make your life easier by learning some C, unless you hae to
<br>link the trajectories to a big fortran library. By the way you can also<br>trjconv -f k.xtc -o l.g87 which you can read using 10f8.3<br><br>&gt;<br>&gt; Thanks a lot for all the help, and sorry for this punctual hurry here.
<br>&gt;<br>&gt; Sincerally yours,<br>&gt;<br>&gt; Jones<br>&gt;<br>&gt; On 9/30/07, *Mark Abraham* &lt; <a href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a><br>&gt; &lt;mailto:<a href="mailto:Mark.Abraham@anu.edu.au">
Mark.Abraham@anu.edu.au</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; David van der Spoel wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; the box is in the xtc file, if you need the atom names a<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; corresponding<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; pdb or gro file should do the trick. don&#39;t try to read tpr files or
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; gmxdumps of it, that&#39;s a complete waste of time. you can e.g. use<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; editconf to dump a pdb file with charges in the b-factor fields.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Yes, I now see that editconf has that ability, and Jones can fill in the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; masses himself, so he doesn&#39;t need to parse the .tpr at all.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; And indeed, using fortran will make your life quite miserable for<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; these<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; kind of things.
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; :-)<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Mark<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; _______________________________________________<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; gmx-users mailing list&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailto:
<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.gromacs.org/mailman/listinfo/gmx-users">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Please search the archive at 
<a href="http://www.gromacs.org/search">http://www.gromacs.org/search</a> before<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; posting!<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Please don&#39;t post (un)subscribe requests to the list. Use the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">
gmx-users-request@gromacs.org</a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailto:<a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>&gt;.<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; 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>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a href="http://www.gromacs.org/mailing_lists/users.php">http://www.gromacs.org/mailing_lists/users.php</a>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------
<br>&gt;<br>&gt; _______________________________________________<br>&gt; gmx-users mailing list&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>&gt; <a href="http://www.gromacs.org/mailman/listinfo/gmx-users">
http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>&gt; Please search the archive at <a href="http://www.gromacs.org/search">http://www.gromacs.org/search</a> before posting!<br>&gt; Please don&#39;t post (un)subscribe requests to the list. Use the
<br>&gt; www interface or send it to <a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>&gt; 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><br><br>--<br>David van der Spoel, Ph.D.<br>Molec. Biophys. group, Dept. of Cell &amp; Molec. Biol., Uppsala University.<br>Box 596, 75124 Uppsala, Sweden. Phone:&nbsp;&nbsp;+46184714205. Fax: +4618511755.<br><a href="mailto:spoel@xray.bmc.uu.se">
spoel@xray.bmc.uu.se</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:spoel@gromacs.org">spoel@gromacs.org</a>&nbsp;&nbsp; <a href="http://folding.bmc.uu.se">http://folding.bmc.uu.se</a><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>