[gmx-developers] Re: MCMD, dynamic topology, constraints

Berk Hess hessb at mpip-mainz.mpg.de
Fri Jun 17 08:54:45 CEST 2005

Jason de Joannis wrote:

>Here is what I have done for turning off Lincs constraints.
>In update() after the call to constrain(), for those constraints
>with type set to zero, I replace the new coords "xprime" with the
>unconstrained ones "x_unc". This seems to work because the simulation
>does not crash any more. Of course it does generate a lot of
>Lincs warnings but that is okay.
>I think this approach also gets the constraint forces and virial right.
>Are there any caveats/problems with this approach?
>Another idea I had was to use
>bllen[b] = bllen0[b];
>inside constrain_lincs(). The idea is to trick mdrun into thinking
>that the current constraint length "bllen" is equal to the
>set-point "bllen0". I don't know why this didn't work (i.e. crash).
All this is quite tricky.
Constraints are in general coupled to each other.
One can not remove one constraint when it is coupled to another
without changing the whole constraint structers/coupling matrix.

So without changing the data structures one can only remove
isolated constraints or groups of constraints which are not
attached to other constraints.
In 3.2.1 you can reset xprime to x_unc without affecting the virial.
In the CVS code this will no longer work.

Maybe it is easier to modify the Shake code.

>A word of explanation for the constraint blocks would help if anyone
>knows how they work...
I have developed and implemented the LINCS algorithm.
I should apologize for the not so readable code.
The data is not very structured as the originally also was a fortran
version of lincs.
Most of the arrays are described in the LINCS article.
I'll see if I have time to add some comment in the code.


More information about the gromacs.org_gmx-developers mailing list