[gmx-developers] PME error with implementation of new bonded interaction function

Maarten Wolf maarten_wolf at yahoo.co.uk
Mon Jun 12 15:01:18 CEST 2006


--- David van der Spoel <spoel at xray.bmc.uu.se> wrote:

> Maarten Wolf wrote:
> > Dear all,
> > 
> > I sent this message again because I noticed it ended up in the
> wrong
> > thread. What I forget to mention in the first message is that I
> will
> > already be helped when anyone can direct me to a manual of some
> sort on
> > implementing a new bonded interaction function.
> In that case I can point you to the 3.3 pdf manual, because it tells
> you 

Thanks

> which routines to alter.
> > 
> > I recently implemented an extra bonded function into gromacs 3.3.1,
> and
> > everything worked correctly (at least that is what I thought) when
> I
> > used Cut-off or Reaction Field.
> > 
> > But when I switched to PME it all went wrong. I initially got a
> > segmentation fault after the first step. This was caused by the pme
> > routine that changed one of the static pointers in the lincs
> algorithm.
> This is impossible, so I suspect another indirect effect, typical 
> unitialized parameters on the stack, or e.g., you declare an array on
> 
> the stack and write outside its border.
> 
>   int bla[12];
>   bla[14] = -1;
> 
> 

This is something I suspected as well, but if I am not mistaken all the
array ranges are defined by the final number in the *.h enums, which
makes it hard to write outside boundaries. 
I do not introduce any new variables, apart from the ones necessary for
the new bonded function, but the new bonded function is not called at
all (in fact it is still empty) so although I may have uninitialized
parameters in my code it cannot create an error, because I do not use
them.

> > switching from fftw2 to fftw3 seemed to do the trick, but after
> some
> > simulations I noticed that although I do not get a segmentation
> fault
> > anymore I can not reproduce my results. This is still linked to the
> pme
> > routine, since the usage of other coulombtype gives reproducable
> > results.
> > 
> > Maybe I made some error in the implementation therefor here the
> list
> > what I did:
> > add  t_ifunc in bondf.h
> > add  F_FUNCT in F_NRE enum in idef.h
> > add  t_iparams struct in idef.h
> > add  eNR_FUNCT in eNRNB in nrnb.h
> > add  def_bonded definition in t_interaction_function in ifunc.c
> > add  my own function in bondfree.c
> > add  estimated flop in t_nrnb_data in nrnb.c
> > add  parameter io in tpxio.c
> > 
> > If I am missing some point that has its influence on the PME
> routine,
> > please let me know. Or any other suggestions.
> > 
> see manual, there are a couple more places where stuff needs to be
> added...

I know, but the rest I thought was only necessary for the grompp
routine, when you are reading the input parameters from the .itp files.
I do not want to use the parameters from .itp files, but instead I want
to add and change the parameters in t_iparams during the simulation, so
converting them during grompp is not necessary.

I also wanted to implement the extra bonded function step by step, in
order to know where things go wrong if they do, and I already get this
inconsistency in trajectories if I make 
an empty function my_function in src/gmxlib/bondfree.c and put
extern t_ifunc my_function;       in include/bondf.h
I think this should not do anything to the simulation results. Can
anybody tell me where I go wrong?

> 
> 
> > Thanks in Advance,
> > Sincerely,
> > Maarten Wolf
> > 
> > 
> > 
> > Send instant messages to your online friends
> http://uk.messenger.yahoo.com 
> > _______________________________________________
> > 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
>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> _______________________________________________
> 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.
> 



Send instant messages to your online friends http://uk.messenger.yahoo.com 



More information about the gromacs.org_gmx-developers mailing list