[gmx-developers] Bond-angle coupling
MURAT OZTURK
murozturk at ku.edu.tr
Fri Oct 5 23:37:16 CEST 2012
I have made it.
Dear Dr. Costescu, your comments have been most helpful, especially about
iprod() and gmx_invsqrt(). I did not want to get deep into the code, and
these parts were most crucial. Apparently bond_angle() also returns the
bond vectors r_ij and r_jk, so I was able to calculate the length of r_ij
easily using these functions. It is enough to only check r_ij because I
will pay attention to the atom order in my topology. After all, this is a
hack for a very limited scenario. I also followed your advice and included
rest of the for loop in my if clause, it looks safe as far as I understand.
The whole thing took 3 lines and works like a charm. I think it is even
fairly efficient. I have not yet tried it with domain decomposition, but
according to Dr. Hess, it should be fine using -noddcheck.
Instead of using a fancy IDE, I found this website (
http://fossies.org/unix/privat/gromacs-4.5.5.tar.gz/dox/bondfree_8c_source.html<http://fossies.org/unix/privat/gromacs-4.5.5.tar.gz/dox/bondfree_8c_source.html#l02440>
) that provides a fancy code explorer. This made things much easier.
My plan B was to port the whole thing to LAMMPS even before Dr. Jewett
proposed it, but I was trying to avoid that as I am used to GROMACS and
wouldn't want to give up any of the performance. I was overwhelmed by the
code at first, but thanks to your support, this has been a very
rewarding/educative process. Thanks to you all.
Cheers
Murat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20121006/80b06fbe/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list