<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Chuan,<div><br></div><div>you might want to take a look at gmx_ga2la.h. The function</div><div>ga2la_home provides the local atom number for a given global</div><div>atom number (or returns FALSE if the atom is not found on the local</div><div>processor).</div><div><br></div><div>Carsten</div><div><br></div><div><br></div><div><div><div>On Apr 21, 2010, at 4:40 PM, ÄôÑ©´¨ wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div bgcolor="#ffffff"><div><font size="3">Hi,gmx-users,</font></div><div><font size="2"> </font><font size="3">Now I want to control the motion of a certain atom (due to special needs).So I added some codes like <em>"<font color="#ff0000">if(n==my_atom)xprime[n][d] = x[n][d]+...;"</font></em> in the functionstatic<span class="Apple-converted-space"> </span><em>"void do_update_md()"</em><span class="Apple-converted-space"> </span>of the file<em><span class="Apple-converted-space"> </span>"gromacs-4.0.7\src\mdlib\update.c".</em>But when mpi run,The gromacs performs a domain decomposition algorithm ,which assign a certain amount of atoms to each CPU(The atoms called local atoms).But the serial number "n" of local atoms always start from 0.So the code<span class="Apple-converted-space"> </span><em>"<font color="#ff0000">if(n==my_atom)"</font></em><span class="Apple-converted-space"> </span>is futile.</font></div><div><font size="2"> <span class="Apple-converted-space"> </span><font size="3">Now I</font><span class="Apple-converted-space"> </span></font><font size="3">come into consideration to differentiate "my_atom" by its name.But I am not sure about whether there exist the atom name at the the process of mdrun.Or Is there a more simple way to achieve it.</font></div><div> </div><div><font size="2">{The functions be involved with<span class="Apple-converted-space"> </span><font size="3">domain decomposition algorithm<span class="Apple-converted-space"> </span></font></font><font size="2">are:</font></div><div><font size="2"><font size="3"> </font><div class="O" v:shape="_x0000_s1026"><div><span lang="EN-US"> <div class="O" v:shape="_x0000_s1026"><div><span lang="EN-US">/src/mdlib/domdec.c(7458)<span class="Apple-converted-space"> </span></span><span lang="EN-US">void dd_partition_system() (called by do_md())</span></div><div><span lang="EN-US"> <div class="O" v:shape="_x0000_s1026"><div><span lang="EN-US">/src/mdlib/domdec.c(3365)<span class="Apple-converted-space"> </span></span><span lang="EN-US">static void get_cg_distribution()</span></div><div><span lang="EN-US"> <div class="O" v:shape="_x0000_s1026"><div><span lang="EN-US">/src/mdlib/domdec_network.c(187)</span><span lang="EN-US">void dd_scatter()</span></div></div></span></div></div></span></div><div><span lang="EN-US"></span> </div></div></span></div><div></div></div>}</font></div><div> Thank your.</div><div> chuan</div>--<span class="Apple-converted-space"> </span><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">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>Please search the archive at<span class="Apple-converted-space"> </span><a href="http://www.gromacs.org/search">http://www.gromacs.org/search</a><span class="Apple-converted-space"> </span>before posting!<br>Please don't post (un)subscribe requests to the list. Use the<span class="Apple-converted-space"> </span><br>www interface or send it to<span class="Apple-converted-space"> </span><a href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>Can't post? Read<span class="Apple-converted-space"> </span><a href="http://www.gromacs.org/mailing_lists/users.php">http://www.gromacs.org/mailing_lists/users.php</a></div></span></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">--</div><div>Dr. Carsten Kutzner</div><div>Max Planck Institute for Biophysical Chemistry</div><div>Theoretical and Computational Biophysics</div><div>Am Fassberg 11, 37077 Goettingen, Germany</div><div>Tel. +49-551-2012313, Fax: +49-551-2012302</div><div><a href="http://www.mpibpc.mpg.de/home/grubmueller/ihp/ckutzne">http://www.mpibpc.mpg.de/home/grubmueller/ihp/ckutzne</a></div><div><br></div></div><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"></span>
</div>
<br></div></body></html>