crystvis-js icon indicating copy to clipboard operation
crystvis-js copied to clipboard

MagresView 2 fails to read MAGRES files generated by MagresView 1.6.2

Open vadimzorin opened this issue 3 years ago • 1 comments

The attached file alanine.zip was created by MagresView 1.6.2. It seems MagresView 2.0 fails to load it with the error message "Error parsing file alanine: Invalid Magres file format: no version line". It seems MagresView 1.6.2 generates an incomplete version line:

#$magres-abinitio instead of #$magres-abinitio-v1.0

vadimzorin avatar Jun 14 '22 11:06 vadimzorin

Thanks a lot for raising this issue! It seems, also, that MagresView2 also doesn't like the added labels at the end of each 'atom' line. Manually deleting these and fixing the version line as you suggest allows MGV2 to load the file correctly.

I'm not sure how tolerant we want the parser to be to strangely-formatted .magres files.

I can adapt this line to avoid the problem with parsing atom positions. After all, the specification should allow a # symbol to indicate that characters after that point should be ignored.

The version number should really be there, however; that's something that should be fixed in MGV1.

jkshenton avatar Sep 07 '22 10:09 jkshenton