[gmx-developers] Modifying sim_util.c
David van der Spoel
spoel at xray.bmc.uu.se
Wed May 2 21:10:06 CEST 2007
gleb solomentsev wrote:
> Hi,
>
> Im working on modifying the calc_f_el subroutine to include a time
> varying electromagnetic field. The magnetic field component requires me
> to pass velocity values to this routine. As I understand this requires
> me to modify the main do_force routine call to also require velocity
> values to be passed to it. I have tried to do this but am finding that I
> have to modify a lot of other source files and calls to certain
> commands, for instance in the minimize.c routine.
>
> It has been suggested to me by my coworker to make a separate header
> file to contain a copy of the particle velocities (ie global velocity
> copies) and to pass these copied velocities to the calc_f_el routine
> instead. He suggested that this would be a bit more simple and would
> limit the number of modifications I would have to make with a future
> release of gromacs.
No don't introduce any global variables! Your code won't work in
parallel anymore for instance. Since the velocities are there in calling
routines just add them to your header and let the compiler tell you
which other functions to call. It's won't take you more than an hour to
make this work.
>
> I am wondering if you can make a suggestion as to how best to proceed at
> this point.
>
> Thanks in advance,
> Gleb
>
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the www
> interface or send it to gmx-developers-request at gromacs.org.
--
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596, 75124 Uppsala, Sweden
phone: 46 18 471 4205 fax: 46 18 511 755
spoel at xray.bmc.uu.se spoel at gromacs.org http://folding.bmc.uu.se
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the gromacs.org_gmx-developers
mailing list