[gmx-users] Combining two Non-bonded potentials

Mehmet Suezen suzen at theochem.tu-muenchen.de
Tue Jan 15 19:17:52 CET 2002


David van der Spoel wrote:
> There is no straightforward way to implement this in gromacs. One would
> have to modify the inner loops, and pass an extra parameter to them (which
> needs to be read in grompp etc.)

Hi again,

I have been tring  to add a new non-bonded force field to source. Form
is as follows;


 V(r_ij) = q_i*q_j/ r_ij^2 + A_ij * exp(-B_ij * r_ij) - C_ij/r_ij^6 +
 
           4*e_ij*[(s_ij/r_ij)^n -(s_ij/r_ij)^m]
 
  7 Parameters To Be Pass: A_ij, B_ij, C_ij, e_ij, s_ij, n, and m

I've found following routines to be modified: I've call new potential
 F_BHAM.
-------------------------------------------------------------------
Routine                                 Short Description 
-------------------------------------------------------------------
include/types/idef.h                       Definition of F_BHAM
include/types/nrnb.h                       Loop number
include/types/enums.h          match names-array with src/nrnb.c
include/types/forcerec.h                   Non-bonded parameter list ??
include/mdebin.h                      t_idef  bool ??
include/mdrun.h                       set_pot_bools ??
 
 
src/kernel/convparm.c             switch for non-bond params:
assign_param
src/kernel/do_gct.c               Update the nonbonded force parameters
??
src/kernel/toppush.c              In function generate_nbparams  ??
src/kernel/gctio.c                            in function  copy_ff
src/kernel/topdirs.c                          see CASE d_nonbond_params
src/kernel/grompp.c                           Renumber nlist
 
 
src/gmxlib/mkinl.h                  define DO_BHAM
src/gmxlib/mkinl.c                  in function set_loop_options
src/gmxlib/mkinl_declarations.c     in function function_info
                                         func_localvars
src/gmxlib/mkinl_interactions.c     in function calc_interactions
                                                do_bham
                                               do_softcore (my not be
needed)
 
 
src/gmxlib/ifunc.c                  in function t_interaction_function
def_nb
                                   (F_BHAM) corresponds to
include/types/idef.h
src/gmxlib/names.c             corresponds to include/types/enums.h
                               (names appeared in mdp file)
src/gmxlib/tpxio.c                  in function do_iparams (passin
params)
src/gmxlib/txtdump.c                in function pr_iparams  (for dumping
info)
src/gmxlib/nrnb.c              inner loop keynumbers  for non-bonded
===============================================================================

But my difficulty arrises on how to pass force field parameter arguments
to 
explicit potential calculation phase. Because I found structure
constructions a bit
complicated. And I guess crucial thing is adding new function in 
innerloop generation :mkinl_interactions.c. I do not need any water
solvent.

these are  my findings that one needs to be modify 
======================================================
* include/types/idef.h
  - New enumaration F_BHAMLJ
  - New Number of MAXFORCEPARAM 7
  - New structure bhamlj (7 params)  in typedef union
* include/types/nrnb.h
  - New Inner Loop  id added eNR_INL1500 means normal coulomb plus
BHAMLJ
* include/types/enums.h
  - New enumaration for NBF selection eNBF_BHAMLJ
 
* src/gmxlib/ifunc.c
  - New  def_np  BHAMLJ BuckingHamLj 3 7  (def,name,id,number of params)
* src/gmxlib/names.c
  - New enbf_names "Buckinghamlj"
 
 
* src/kernel/convparm.c
   - in function assign_param new case added F_BHAMLJ
* src/kernel/toppush.c  In function generate_nbparams new case F_BHAMLJ
========================================================================

I'd be glad for tips and important points one should be careful. At
least are there any other
routine should one modify except then those I mensioned above?.

On the other hand I found  Justin's documentation not sufficient by
really helpful
http://moose.bio.ucalgary.ca/~justin/devel/devel-doc/index.html
If there were more description on subprograms, I beleive it 'd be easy
to
add some more feature for people who doesn't know a lot about GROMACS
source.

Cheerz,

Mehmet



More information about the gromacs.org_gmx-users mailing list