[gmx-developers] Re: Re:Re:Re:Re:Re: Energy Minimization

Berk Hess hess at cbr.su.se
Fri Jun 26 10:52:45 CEST 2009


Igor Leontyev wrote:
>> I just noticed that settle for the coordinates (the forces were correct)
>> does not support partially frozen water molecules.
>> Try replacing in src/mdlib/mdatom.c:
>>      if (opts->nFreeze[g][XX] && opts->nFreeze[g][YY] &&
>> opts->nFreeze[g][ZZ])
>>    /* Set the mass of completely frozen particles to ALMOST_ZERO iso 0
>>     * to avoid div by zero in lincs or shake.
>>     * Note that constraints can still move a partially frozen particle.
>>     */
>>    md->invmass[i]    = ALMOST_ZERO;
>>      else
>> by
>>      if (opts->nFreeze[g][XX] && opts->nFreeze[g][YY] &&
>> opts->nFreeze[g][ZZ]) {
>>    /* Set the mass of completely frozen particles to ALMOST_ZERO iso 0
>>     * to avoid div by zero in lincs or shake.
>>     * Note that constraints can still move a partially frozen particle.
>>     */
>>    md->massT[i] = 1/ALMOST_ZERO;
>>    md->invmass[i]    = ALMOST_ZERO;
>>      } else
>>
>> Berk
>>
>
> Minimization with the code replacement produced exactly! the same output.
>
Ah, there might be another problem as well.
You have some completely frozen waters and some partially frozen waters,
right?
The current SETTLE code assumes the masses of all waters are identical
and does not check for this.

If you use constraints=all-bonds, you can use the mdp option:
define = -DFLEXIBLE
which will make the water model flexible, but constraints=all-bonds will
replace
the bonds by constraints, which will then use LINCS iso SETTLE.

Berk




More information about the gromacs.org_gmx-developers mailing list