The error is correct. After inspecting the code, the extra coordinate (coordinate of the cavity) is taken from the last atom of the trajectory (rerun_fr.x) and not from the .tpr file (mdatoms). This is weird, but allows different cavities for different frames I guess...<div>

<br></div><div>I am guessing you can add the extra coordinate (cavity coordinate) to each frame. You just need to convert from a binary version (.xtc, .trr) to a ascii version (.gro, .g96), add the coordinate, convert back to binary (optional, but saves space), and make the rerun over this. Be _careful_ with the conversions not to screw the original trajectory.</div>

<div><br></div><div>Plus, with this, there is no need for topology mambo-jambos (calling CL- to the cavity location, etc).</div><div><br></div><div>I did not remember this because I hacked the code and I bypass that part, giving the extra coordinate (cavity) through a variable.</div>

<div><br></div><div>I hope this solves your problem.</div><div><br></div><div>Best,</div><div>Joćo<br><br><div class="gmail_quote">On Sun, Mar 4, 2012 at 11:54 PM, MPID <span dir="ltr">&lt;<a href="mailto:mpmcgovern@wisc.edu">mpmcgovern@wisc.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks a lot for the reply! I did as you said. I had a coordinate file where<br>
I wanted to add insert a water molecule withing a cavity. I added these<br>
lines to the .gro file:<br>
  340SOL     OW 1274   2.925   0.061   2.677  0.2533 -0.1222  0.1294<br>
  340SOL    HW1 1275   2.893   0.000   2.605 -0.1856  0.5697 -0.2686<br>
  340SOL    HW2 1276   2.849   0.082   2.739  0.5491 -0.4502  0.6106<br>
  341INS       X 2036   0.000   0.000   1.000  0.0000  0.0000  0.0000<br>
I realize I still neeed to center the water molecule, but I am testing now.<br>
To make grompp work, I added a line in the .top file and called the last<br>
coordinate a CL- atom. I then can do grompp. But when I do mdrun -rerun, I<br>
get this error:<br>
Fatal error:<br>
Number of atoms in trajectory (2032) minus one is not equal the number in<br>
the run input file (2036) minus the number of atoms to insert (1)<br>
The math here seems to imply that the extra atom belongs in the trajectory<br>
rather than the tpr file, and also, it now thinks I&#39;m inserting a CL- atom<br>
instead of water.<br>
<br>
--<br>
View this message in context: <a href="http://gromacs.5086.n6.nabble.com/Test-particle-insertion-extra-coordinate-tp4536816p4546192.html" target="_blank">http://gromacs.5086.n6.nabble.com/Test-particle-insertion-extra-coordinate-tp4536816p4546192.html</a><br>


<div class="HOEnZb"><div class="h5">Sent from the GROMACS Users Forum mailing list archive at Nabble.com.<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Joćo M. Damas<br>PhD Student<br>Protein Modelling Group<br>ITQB-UNL, Oeiras, Portugal<br>Tel:+351-214469613<br>
</div>