<p>Hi  Anna,</p>
<p>You can also renumber the xvg file:</p>
<p>awk &#39;BEGIN{N=1}/^[^@#]/{print N++, $2}&#39; file.xvg &gt; renum.xvg</p>
<p>Hope it helps,</p>
<p>Tsjerk</p>
<p><blockquote type="cite">On May 13, 2011 3:51 PM, &quot;Anna Marabotti&quot; &lt;<a href="mailto:anna.marabotti@isa.cnr.it">anna.marabotti@isa.cnr.it</a>&gt; wrote:<br><br>Dear Mark,<br>
thank you also for your suggestion, indeed using the nvt.gro file with the<br>
sequential numbering I was able to distinguish the contributions from both<br>
chains, instead of seeing them superimposed.<br>
Now I have another question. I used pdb2gmx to prepare another file for<br>
simulation (it is the same protein as above, with a mutation). The pdb file<br>
contains two identical chains numbered starting from 21 to 379, marked with<br>
chain ID A and B.<br>
Using the command line:<br>
pdb2gmx -f my_protein.pdb -o my_protein.gro -p my_protein.top<br>
I obtained a .gro file in which the numbering correctly starts from 21 to<br>
379 in both chains, but no chain ID is present. I also tried to use<br>
-chainsep, but nothing changed. So my (last) question is: is there any way<br>
to avoid renumbering the file, but without obtaining a superposition of<br>
residue numbers in both subunits? In other workds: is there a possibility to<br>
leave some form of &quot;chain identifier&quot; in the .gro file? Or the only way to<br>
obtain unambiguous identification of each residue is to renumber the file?<br>
Thank you very much<br>
Anna<br>
<br>
<br>
Date: Fri, 13 May 2011 22:34:17 +1000<br>
From: Mark Abraham &lt;<a href="mailto:mark.abraham@anu.edu.au">mark.abraham@anu.edu.au</a>&gt;<br>
Subject: Re: [gmx-users] numbering of .gro file<br>
To: Discussion list for GROMACS users &lt;<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:7690ae4b5380.4dcdb1e9@anu.edu.au">7690ae4b5380.4dcdb1e9@anu.edu.au</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
<br>
<br>
On 13/05/11, Anna Marabotti  &lt;<a href="mailto:anna.marabotti@isa.cnr.it">anna.marabotti@isa.cnr.it</a>&gt; wrote:<br>
&gt;<br>
&gt; Dear<br>
&gt; gmx-users,<br>
&gt;<br>
&gt; I&#39;m simulating a<br>
&gt; homodimeric protein obtained by homology modelling. In the .pdb file, I<br>
have 2<br>
&gt; chain identifiers (A and B). I used Gromacs 4.0.7 to prepare the .gro<br>
files for<br>
&gt; simulation (up to nvt); then I was forced to switch to Gromacs 4.5.4 on<br>
another<br>
&gt; machine to continue with npt and full MD. I used the files from Gromacs<br>
4.0.7 to<br>
&gt; continue, and it seems to me that all went OK. Now I have the files from<br>
the<br>
&gt; full MD, and I started to analyze them.<br>
&gt;<br>
&gt; I used g_rmsf to<br>
&gt; analyze the fluctuations of the residues, and I found that the results for<br>
the<br>
&gt; two subunits of the protein are superimposed. In the file .gro that comes<br>
from<br>
&gt; the MD as well as in the file .gro that comes from the npt MD made with<br>
Gromacs<br>
&gt; 4.5.4, the number of residues of the second subunit does not continue<br>
after the<br>
&gt; first subunit (i.e. after the last 359th residue of the first subunit, I<br>
see<br>
&gt; that the first residue of the second subunit is numbered 1 instead of<br>
360), but<br>
&gt; in the nvt file produced by Gromacs 4.0.7 that I provided to Gromacs<br>
&gt; 4.5.4, the numbering of the two subunits is<br>
&gt; sequential.<br>
&gt;<br>
&gt; My questions<br>
&gt; are:<br>
&gt;<br>
&gt; 1) why Gromacs 4.5.4<br>
&gt; changed the numbering of the residues in the two subunits, even if it<br>
started<br>
&gt; from a .gro file?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
The trajectory files do not number the atoms, so the only way you can<br>
generate such numbering is by matching them with a structure file that also<br>
has such numbering. It&#39;s hard to be any more specific in the absence of<br>
command lines. If you just match the trajectory file with a more suitably<br>
numbered structure file (with atom ordering preserved) then everything is<br>
fine.<br>
<br>
<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2) Does this affect<br>
&gt; the result of the MD?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
I highly doubt it.<br>
<br>
<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 3) how can I<br>
&gt; separate, or renumber, the resulting .gro files in order to have a graph<br>
in<br>
&gt; which the fluctuations are not superimposed?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
I rather expect that the input file to your NPT grompp had this &quot;feature&quot;.<br>
In any case, you need to identify where it first arose in your workflow in<br>
order to work out why it happened and what to do about it.<br>
<br>
Mark<br>
<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL:<br>
<a href="http://lists.gromacs.org/pipermail/gmx-users/attachments/20110513/56f2e681/a
ttachment-0001.html" target="_blank">http://lists.gromacs.org/pipermail/gmx-users/attachments/20110513/56f2e681/a<br>
ttachment-0001.html</a><br>
<font color="#888888"><br>
<br>
--<br>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/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/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
</font></blockquote></p>