[gmx-developers] Fwd: User defined potential

Erik Lindahl lindahl at stanford.edu
Mon Apr 15 22:52:11 CEST 2002


>>> I would like to add an extra repulsive potential to non bonded terms 
>>> in Gromacs. In booklet there are two choices for non bonded 
>>> potetials; LJ and Buckingham. My potential will be a half harmonic 
>>> function such as,
>>>  V(r) = 1/2 k (r - ro)^2
>>> where k= 1000 kJ mol-1 nm-1
>>> and ro = 0.4 nm.
I'm not sure you really need to add an extra type - it depends on what 
you want to do.
This is just a normal position restraint, so if that's what you want you 
can simply add it with Gromacs.

>>> how can I add this function to the non bonded force fiald? There are 
>>> coulombtype and vdwtype options in the mdp file but the vdwype 
>>> consists of LJ and Bkh. But my function is of harmonic type
>>> so I can not use 'user' option here for vdwtype. In previous 
>>> discussions, it seems this needs source code edition. I will be glad 
>>> if you show a way for doing this.
You can always select 'user' for the nonbonded interactions and give the 
interactions as tables. This will be significantly faster than writing 
your own code since the table inner loops are implemented in assembly. 
You can search the mailing lists from the Gromacs homepage to find more 
info about it.



More information about the gromacs.org_gmx-developers mailing list