[gmx-users] Number of simulated annealing points

Tim Moore tcmoore3 at gmail.com
Fri Apr 1 01:50:14 CEST 2016

I went back and tried to change MAXPTR to a larger value - I then get a
different error saying input lines can only contain 4095 characters. After
digging around the source code a bit more, I found this came from a defined
constant STRLEN in src/gromacs/utility/cstringutil.h
*I updated this to a larger value to accommodate my long lines in the mdp
file. After re-installing, I can successfully grompp my input file, and it
seems to be running fine.

I'm assuming since make check passed without errors, I should not be
concerned about any hidden, funky behavior. Is this a safe assumption? And
is there any reason why setting STRLEN to a much larger number is a bad

On Wed, Mar 30, 2016 at 1:34 PM, Tim Moore <tcmoore3 at gmail.com> wrote:

> Hi,
> I'm currently simulating bilayer systems, where our equilibration scheme
> involves randomly adjusting the temperature to values within a given range.
> The temperatures can be predetermined, so the we can use the simulated
> annealing module within GROMACS. However, the maximum number of allowed
> temperatures in simulated annealing is 254 points, meaning we can only use
> 254 points before the cycle starts over (using periodic annealing). I need
> many more set points than that, so this is a problem. I see in the source
> code there is a parameter MAXPTR = 254 that defines the maximum number of
> elements allowed. This brings me to my question: is there any reason to NOT
> change this to a larger number to accommodate the larger number of
> temperature points I need? I see two easy workarounds, the first being to
> increase MAXPTR; the second being make a new parameter MAXPTR2 and use that
> only for the str_nelem() calls associated with the annealing. Is either of
> these preferred over the other, or is there a better solution? Also, what
> is the motivation for setting MAXPTR = 254 - is it some sort of
> optimization? Will setting MAXPTR to a higher value hurt performance?
> Thanks,
> --
> Tim Moore

Tim Moore

More information about the gromacs.org_gmx-users mailing list