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

Jason de Joannis jdejoan at emory.edu
Thu Jun 16 18:07:27 CEST 2005

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).

A word of explanation for the constraint blocks would help if anyone
knows how they work...


Quoting Jason de Joannis <jdejoan at emory.edu>:

> Hi,
>  I have found an easy way to toggle various interactions on/off
> during a simulation. For example, to turn off RB-dihedral #i,
> set its "type" to 0 as follows:
> top->idef.il[F_RBDIHS].iatoms[5*i] = 0;
>  Then inside the rbdihs() routine make the RB evaluation conditional:
>   for(i=0; (i<nbonds); ) {
>     type = forceatoms[i++];
>     ai   = forceatoms[i++];
>     aj   = forceatoms[i++];
>     ak   = forceatoms[i++];
>     al   = forceatoms[i++];
>     if(type) {
>       [ evaluate this RB-dihedral... ]
>     }
>   }
>  Now I am trying to find a similar simple approach for toggling LINCS
> bond constraints, but this routine has a different structure than those
> of the other bonded interactions.
> /Jason
> --
> Jason de Joannis, Ph.D.
> Emory University
> 1515 Pierce Dr, Atlanta, GA 30329
> Phone: (404) 712-2983
> Email: jdejoan at emory.edu
> http://userwww.service.emory.edu/~jdejoan

More information about the gromacs.org_gmx-developers mailing list