[gmx-users] How to add an user-defined external potential
mark.abraham at anu.edu.au
Tue May 18 03:37:30 CEST 2010
----- Original Message -----
From: Sanku M <msanku65 at yahoo.com>
Date: Tuesday, May 18, 2010 4:10
Subject: [gmx-users] How to add an user-defined external potential
To: gmx-users at gromacs.org
> Hi,> I am planning to add an external harmonic potential along z direction of a system : i.e U(z)= 0.5*K*z(**2)> I was wondering if I can get an help on how to add an user-defined external potential like this in gromacs ? > Thanks> Sanku
People may have constructive feedback, but you'll be largely on your own. My standard advice is to get out a debugger and step through the code on a small model system similar to your target system.
In your case, you probably want to add code after/in do_force_lowlevel(). If you need the code to work in parallel, then you have some extra work interacting with the DD or PD algorithms, as each processor has only a subset of the atoms.
If you want pressure coupling, you'll need to consider how your external potential should contribute to the virial.
If you want PBC then you will get weird boundary effects.
More information about the gromacs.org_gmx-users