Menu

#922 Bug in conversion to CONFIG DL_POLY

2.3.x
open
nobody
None
1
2014-04-28
2014-04-28
No

Open Babel converts to CONFIG (DL_POLY) format, but the generated file is not
usable by the DL_POLY program, who gives this error message:
At line 1160 of file setup_module.f (unit = 10, file = 'CONFIG')
Fortran runtime error: Bad value during floating point read

I think the problem is that DL_POLY uses a fixed format for the atom coordinates,
requiring 3 floating numbers with 20 spaces for each of them (f20.0). But the
output file generated by Open Babel writes x in columns 1-20 (OK), y in columns 21-41 (instead of 21-40) and z in columns 42-62 (instead of 41-60).

Searching for advice in the web I found the code dlpolyformat.cpp in the Github
and I saw that in line 369 you use the format "%20.15f %20.15f %20.15f\n" to
write the CONFIG output. I guess that using "%20.15f%20.15f%20.15f\n" will
remove the extra space that makes the file unusable by DL_POLY.

PS: I found this using Open Babel 2.3.0 in a Ubuntu virtual machine. I converted the file attached using obabel -i pdb argon_864_v2.pdb -o CONFIG -O CONFIG.
The conversion works, but the CONFIG file will not work.

1 Attachments

Discussion