Hi all.<br><br>First of all, I would really want want to apologize if I somehow missunderstood any previous message from anyone, and made myself a bit annoying because of this fact.<br><br>Second, I would like to say thanks again to eferybody for all help in these matters.
<br><br><div><span class="gmail_quote">On 10/1/07, <b class="gmail_sendername">Tsjerk Wassenaar</b> &lt;<a href="mailto:tsjerkw@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tsjerkw@gmail.com
</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;">I&#39;d say the easiest is to get into gmx_editconf and look at the option
<br>&quot;-grasp&quot; or &quot;-mead&quot; which put the atomic charge and vdw radius in the<br>b-factor and occupancy field of a .pdb file when given a .tpr file.<br>It&#39;s trivial to make it write charges and masses instead. Would also
<br>be a good first exercise for C/Gromacs :p</blockquote><div><br>Good idea! Even I don&#39;t choose to sitck with many file type conversions for the sake of the disk space, that specific program now seems to be a good start to learn explicitly how all the topology data is passed from one place to the other. And that would help me to learn how to read the topology files (since it seems to be only a matter now of reading atomic charges and masses).
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I&#39;m not sure what you mean with &quot;shape&quot; and &quot;that integer&quot;. There&#39;s
<br>nothing much redundant in the .xtc file and there are no integers<br>having to do with box shape. In fact, there is no &quot;shape&quot;...</blockquote><div><br>Well, by &quot;shape&quot; I meant &quot;cubic&quot; and &quot;truncated octahedral&quot;, for example. But the integer was my mistake (old dlpoly adaptions that just came to my mind, together with the first integer in the header of all xdrf files and that I could not find a proper meaning at time), thought for a moment that the first integer in the .xtc header mean the &quot;shape of the box&quot;. Just played a bit later with the manual and recorded that it&#39;s only the 9 box parameters that are important to define that within gromacs. Sorry for that mistake.
<br></div></div><br><div>&gt; &gt; So, I would have atom names,<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Yes</blockquote><div><br>
>From .gro or .pdb file in the standard way. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; number of molecules types,<br>
No<br>&gt; number of molecules of each type,
<br>No<br>&gt; number of atoms of each molecule type,<br>No</blockquote><div><br>I think those three can become yes in a really easy way: some kind of &quot;state machine&quot; would easily do the trick and &quot;count&quot; them properly. 
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; coordinates,<br>Yes</blockquote><div><br>From .xtc or .pdb file. <br></div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">charges<br>Yes, if you use the right editconf option<br>and masses on a .pdb file, correct?
<br>No.</blockquote><div><br>Only modifying editconf to print those in a adapted .pdb file, throw a file conversion and much disk space &quot;wasted&quot;. Or I can learn exactly from editconf how to read it from .tpr or .top (I guess it takes from these files the atomic charges when needed) and adapt into my codes.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; But, still, where could I then easilly get the box type and sizes, as<br>
&gt; well as simulation times?<br>The .xtc file, the .edr file...</blockquote><div><br>So .xtc, since its already under control.&nbsp; ;) <br></div><br></div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Fine :-) That&#39;s the sort of reason that you&#39;d want to have to keep<br>Fortran for the present problem.</blockquote><div><br>So we agree here. Three ways so: converting the trajectories to another format (ugly for my taste, and too much disk space needed), linking to a library (like done in reading .xtc files) or linking to an object. ;)
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Like I said, the masses are easy to infer from the atom names. You don&#39;t<br>
need to read them... you know anything starting with N has mass 14.011<br>
(or whatever it is). Or you can read share/gromacs/top/atommass.dat to<br>do the lookups.</blockquote><div><br>That is the kind of stuff I really don&#39;t like. For instance, all codes I written for all this time long aimed at being abolutelly general. So, if anything starting by N means nitrogen, how to deal when someone using the same program (even in the group) chooses to say that Nb is a &quot;different type of nitrogen&quot; while another says it is &quot;niobium&quot;? The program must be able to deal with such problems that arise (and believe, I&#39;ve already got locked at this one once, and that&#39;s why I don&#39;t go such a way anymore), and the only way I see it doing so is directly reading the topologies, instead of &quot;knowing&quot; it in advance.&nbsp; ;)
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; Sorry for not noticing the box shape in the .xtc file. I passed over<br>&gt; that integer in the reading, dismissing it as only some kind of old
<br>&gt; feature useless now. Really sorry for that point.<br>&gt;<br>&gt; Which files should I look for in order to get the proper way of reading<br>&gt; masses and atomic charges from a .tpr file? And which objects will need
<br>&gt; to be included in the linking stage? Is there any &quot;outsider&quot; program<br>&gt; (fortran would be perfect, but I don&#39;t think it will be too common too)<br>&gt; that works directly with the .tpr files?
<br>
<br>tpxio.c will have relevant functions. Or, follow the execution of mdrun<br>until it reads the .tpr file and see how it handles these things.</blockquote><div><br>Thanks a lot! That final information will be really usefull for me to sort out how to properly link those routines in my codes.&nbsp; :)
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If you use the editconf suggestion to get charges, you don&#39;t need to
<br>read a .tpr file.</blockquote><div><br>But then or I get locked into the problem of generality of having too much disk usage. But that idea will be also usefull to learn how to read the masses and charges from .tpr files.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; Thanks a lot everybody for all the help, and sorry for taking so much of<br>
&gt; your time,<br><br>Help is fine, but repeating myself is tiresome :-)<br></blockquote><div>&nbsp;<br><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&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>No, nobody said that. Please read free advice carefully, since there&#39;s
<br>no better way to annoy the giver than to not be understood when they&#39;ve<br>expressed an idea clearly.</blockquote><div><br>I&#39;m absolutelly really sorry for that. I can only apologize myself that I commited such a reading mistake on your email message. Please forgive me for being so boring at that moment.
<br><br>Thanks a lot to everybody for all help with this matter, and really sorry for taking so much of your time with these matters.<br><br>If and when everything goes smoothly here, I&#39;ll probably post something related, in order to help others that come with the same question. Possibly a small test program to read those from .tpr files and print them on screen.
<br></div></div>
<br></div>
Again, thanks a lot for all help.<br><br>Sincerally yours,<br><br>Jones<br>