[gmx-developers] Free Format gro File
Mark.Abraham at anu.edu.au
Tue Oct 2 00:42:54 CEST 2012
On 2/10/2012 8:24 AM, Mirco Wahab wrote:
> Am 02.10.2012 00:11, schrieb Mark Abraham:
>> On 2/10/2012 8:06 AM, Jicun Li wrote:
>>> How can I modify the source code to support the free format gro file?
>>> Thank you very much.
>> You could do that, but what's the advantage?
> Probably because in C/C++, you have to copy each data field
> to a separate buffer in order to handle this data item correctly
> and efficiently for yourself. This might even be a hard task
> for a newbie, I'd think (and remember ...).
> If you can trust the data to be white-space separated, this task
> will become trivial (sscanf, istreams and friends).
scanf using formats with fixed widths is more trivial still. Designing
and understanding the format strings is not easy, however. You can find
useful forms in the GROMACS source, of course.
More information about the gromacs.org_gmx-developers