Hi Chuan, you might want to take a look at gmx_ga2la.h. The function ga2la_home provides the local atom number for a given global atom number (or returns FALSE if the atom is not found on the local processor).
Carsten On Apr 21, 2010, at 4:40 PM, 聂雪川 wrote: > Hi,gmx-users, > Now I want to control the motion of a certain atom (due to special > needs).So I added some codes like "if(n==my_atom)xprime[n][d] = > x[n][d]+...;" in the functionstatic "void do_update_md()" of the file > "gromacs-4.0.7\src\mdlib\update.c".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 "if(n==my_atom)" is futile. > Now I 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. > > {The functions be involved with domain decomposition algorithm are: > > > /src/mdlib/domdec.c(7458) void dd_partition_system() (called by do_md()) > > /src/mdlib/domdec.c(3365) static void get_cg_distribution() > > /src/mdlib/domdec_network.c(187)void dd_scatter() > > } > Thank your. > chuan > -- > gmx-users mailing list gmx-users@gromacs.org > http://lists.gromacs.org/mailman/listinfo/gmx-users > Please search the archive at http://www.gromacs.org/search before posting! > Please don't post (un)subscribe requests to the list. Use the > www interface or send it to gmx-users-requ...@gromacs.org. > Can't post? Read http://www.gromacs.org/mailing_lists/users.php -- Dr. Carsten Kutzner Max Planck Institute for Biophysical Chemistry Theoretical and Computational Biophysics Am Fassberg 11, 37077 Goettingen, Germany Tel. +49-551-2012313, Fax: +49-551-2012302 http://www.mpibpc.mpg.de/home/grubmueller/ihp/ckutzne
-- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/mailing_lists/users.php