[gmx-users] The problems of controling one atom through modify gromacs sourse code

聂雪川 niexuechuan at 163.com
Wed Apr 21 16:40:15 CEST 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20100421/49c5152a/attachment.html>


More information about the gromacs.org_gmx-users mailing list