limited length of dynamic selection arguments
The argument used for dynamic selection (in the -select option of several analysis commands of gmx) has a very limited maximum length. I run across this problem while trying to calculate many different distances with 'gmx distance' without prior preparation of the index file. Since the trajectories that I have are rather big (hundreds of milions of frames), I wanted to calculate what I needed with only one pass, and collect the results in one big xvg file. Please see the files attached for reproduction of the error. At first the error manifested itself by the message like:
- Error in `gmx': realloc(): invalid next size: 0x0000000000fa57e0 ***
With files that I've attached here, I just get a segfault. However, if I remove only one from among the segments connected with 'plus' in the command line, it works flawlessly. I wonder, if the command will work for anybody. If it works, it is probably enough to add few other distances into the command line to see the error. I know that the selection can be done more sparsely (without 'resname SOL') in this example, but its just illustration of the limitation of argument length...
Remove some hardcoded selection string buffers
This removes some arbitrary limitations on the length of the input
string. The error handling would still be in the need of a bigger
overhaul (all of these were in the error handling parts).