<p>Hey Zach,</p>
<p>You may be best off starting from the free energy code. It can be used to perturb charges and other things during a simulation.</p>
<p>Hope it helps,</p>
<p>Tsjerk</p>
<p><blockquote type="cite">On Sep 13, 2011 2:55 AM, "Zach Levine" <<a href="mailto:zach.levine.gmx@gmail.com">zach.levine.gmx@gmail.com</a>> wrote:<br><br>Hi everyone,<br>
<br>
I'm trying to implement time-varying charges for various ions located<br>
in ions.itp in GROMACS 4.5.4, but I'm not sure where to begin.<br>
<br>
I've already had some luck implementing AC external electric fields by<br>
modifying /src/mdlib/sim_util.c, but this required minimal work from<br>
me and a few strategically placed cosines. I have a feeling though<br>
that time-varying individual atomic charges will be considerably more<br>
difficult since I imagine GROMACS only reads from topol.top (and thus<br>
from ions.itp) just once at the beginning without updating the value,<br>
so I would likely have to import the time variable and recalculate the<br>
charge at every successive step. Since time is explicitly mentioned in<br>
the calc_f_el routine of sim_util.c (when I was dealing with external<br>
fields) I had no problems making this work there, but is it possible<br>
(or practical) to do the same thing with my static atomic charges as<br>
well?<br>
<br>
I've found some references to reading topol.top in<br>
/src/kernel/topio.c, and in theory I'd like to import, update, and<br>
export certain charges as a function of time, perhaps also in<br>
sim_util.c? I just don't know which files or variables to start<br>
importing in, or where the best place to implement this would be.<br>
<br>
Any ideas on this would be greatly appreciated, even if it's just<br>
keywords or significant variables for me to grep.<br>
<br>
Thanks,<br>
Zach<br>
<font color="#888888">--<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" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/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/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
</font></blockquote></p>