Tsjerk, your good reference helped me to understand the set_pbc and pbc_dx functions from g_dist... I changed few lines of it and my problem was solved. Thank you.<br><br>Cheers. Fernando.<br><br><br><br><div class="gmail_quote">
2009/4/14 Tsjerk Wassenaar <span dir="ltr"><<a href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Fernando,<br>
<br>
Just bear in mind that these lattice vectors are just translation<br>
vectors. You can add them to or subtract them from the positional<br>
vectors of the com. That way you'll get a number of points which you<br>
can use to calculate the distances the regular way. To see where you<br>
went wrong, consider that a vector of the triclinic unit cell may have<br>
more than one non-zero component. You considered only one non-zero<br>
component, based upon the rectangular brick representation. But from<br>
Pythagoras theorem it follows that doing so will make you miss part of<br>
the true distance and come to an underestimate of it.<br>
There is a niftier solution to the smallest distance, which will work<br>
regardless of the separation between particles/coms in the infinite<br>
system. It's in my thesis (Chapter 3, Appendix C, page 68):<br>
<a href="http://dissertations.ub.rug.nl/faculties/science/2006/t.a.wassenaar/?FullItemRecord=ON" target="_blank">http://dissertations.ub.rug.nl/faculties/science/2006/t.a.wassenaar/?FullItemRecord=ON</a><br>
<br>
Hope it helps,<br>
<font color="#888888"><br>
Tsjerk<br>
</font><div><div></div><div class="h5"><br>
On 4/14/09, Fernando C <<a href="mailto:fernando.cesar.lf@gmail.com">fernando.cesar.lf@gmail.com</a>> wrote:<br>
> Hi Tsjerk and all list!<br>
><br>
> > You have to use the three vectors from the tricilinic representation<br>
> > to obtain the correct distance in the periodic system. Check PBC in<br>
> > Chapter 3 of the manual.<br>
><br>
><br>
> I used the length values from rectangular box because I'd want believe that<br>
> my problem would be solved easily; I wouldn't want to fall in question of<br>
> calculate positions and distances in triclinic cells. But here I am: could<br>
> anybody explain to me the algorithm of how such things are calculated?<br>
><br>
> Thanks again!<br>
><br>
> Fernando.<br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> And Noel Gallagher said: Gromacs is gonna live forever!<br>
><br>
> 2009/4/13 Tsjerk Wassenaar <<a href="mailto:tsjerkw@gmail.com">tsjerkw@gmail.com</a>><br>
> ><br>
> > Hi Fernando,<br>
> ><br>
> ><br>
> > > I've obtained the vectors for the rectangular box in g_energy,<br>
> > > using Box_XX, Box_YY and Box_ZZ options; I didn't use the vectors of the<br>
> > > skewed box.)<br>
> ><br>
> > You have to use the three vectors from the tricilinic representation<br>
> > to obtain the correct distance in the periodic system. Check PBC in<br>
> > Chapter 3 of the manual.<br>
> ><br>
> > Cheers,<br>
> ><br>
> > Tsjerk<br>
> ><br>
> > --<br>
> > Tsjerk A. Wassenaar, Ph.D.<br>
> > Junior UD (post-doc)<br>
> > Biomolecular NMR, Bijvoet Center<br>
> > Utrecht University<br>
> > Padualaan 8<br>
> > 3584 CH Utrecht<br>
> > The Netherlands<br>
> > P: +31-30-2539931<br>
> > F: +31-30-2537623<br>
> > _______________________________________________<br>
> > gmx-users mailing list <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
> > <a href="http://www.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>
> > Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
> > Please don'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't post? Read<br>
> <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
> ><br>
><br>
><br>
> _______________________________________________<br>
> gmx-users mailing list <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
> <a href="http://www.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>
> Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
> Please don'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't post? Read<br>
> <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
><br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Tsjerk A. Wassenaar, Ph.D.<br>
Junior UD (post-doc)<br>
Biomolecular NMR, Bijvoet Center<br>
Utrecht University<br>
Padualaan 8<br>
3584 CH Utrecht<br>
The Netherlands<br>
P: +31-30-2539931<br>
F: +31-30-2537623<br>
_______________________________________________<br>
gmx-users mailing list <a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a href="http://www.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/search" target="_blank">http://www.gromacs.org/search</a> before posting!<br>
Please don'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't post? Read <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
</div></div></blockquote></div><br>