[gmx-developers] external potential ?

David spoel at xray.bmc.uu.se
Thu Feb 12 17:50:36 CET 2004

On Thu, 2004-02-12 at 17:07, Pim Schravendijk wrote:
> Now the easiest way to implement a wall would be by conserving perdiodic 
> boundaries, adding 2 layers of frozen atoms and leaving an empty space the 
> size of the cutoff:
> http://www.gromacs.org/pipermail/gmx-users/2003-January/030522.html
> Point is, I really want to have implicit walls, say at z=0 and z=L. One
> way to do this would be to remove periodic boundary conditions in the z
> direction by removing all interactions between atoms and their minimum
> images at the other side of z=0 or L.
If it is that simple you might want to implement it in the update code:

if (x[i][ZZ] > L) {
  x[i][ZZ] = 2*L-x[i][ZZ];
  v[i][ZZ] *= -1;
and similar for zero.

> I figure the most logical place to do this is at the point where the
> neigbour list is made. Now do_force calls a function ns in force.c, which
> on its turn calls search_neigbours in ns.c. There I'd expect an algorithm
> testing if any charge group or atom falls within a cutoff value and then
> add that to the list. However the code there is a bit too cryptic for me,
> I can't find anything which resembles something like that. I would be glad 
> to get any hints on this..
> Greetings, Pim
> --
> Pim Schravendijk - PhD Student
> Max Planck Institute for Polymer Research
> http://www.mpip-mainz.mpg.de/~schraven/
> _______________________________________________
> 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 van der Spoel, PhD, Assist. 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://xray.bmc.uu.se/~spoel

More information about the gromacs.org_gmx-developers mailing list