lorenzo-rovigatti / oxDNA

A new version of the code to simulate the oxDNA/oxRNA models, now equipped with Python bindings
https://dna.physics.ox.ac.uk/
GNU General Public License v3.0
43 stars 28 forks source link

[BUG] ERROR: Cannot convert '0.' to a number #32

Closed RodenLuo closed 2 years ago

RodenLuo commented 2 years ago

Describe the bug

When using tacoxdna CanDo → oxDNAbeta, at the input MC relax, I met the following error.

ERROR: Cannot convert '0.' to a number

To Reproduce

Feed this cndo file to tacoxdna CanDo → oxDNAbeta, and try to relax the generated result.

Expected behavior

Run through relax

Desktop (please complete the following information):

Additional context

This can be easily fixed using two sed commands on the conf file for this example.

sed -i 's/0\. /0 /g' tetrahedron.cndo.dat
sed -i 's/0\.$/0/g' tetrahedron.cndo.dat

This can also be fixed in tacoxdna CanDo → oxDNAbeta.

But the cause is deep in the fast_double_parser. It's not treating 0. as a number, see https://github.com/lemire/fast_double_parser/pull/65. My proposed solution there should have almost no side effects (at least in the case of oxDNA) except fixing this error. Because from the next time step onwards, that block is never reached.

RodenLuo commented 2 years ago

So, 0. is considered an invalid number, see https://github.com/lemire/fast_double_parser/issues/40. This might involve some fixing from the converter's side.

lorenzo-rovigatti commented 2 years ago

Hey Roden, thanks for the report. I'll add the wonfix label here, since this is a "feature" of one of the lib oxDNA includes. However, I have committed a change to tacoxDNA so that the cando tool uses 0.0 in place of 0.. I'll try to update the webserver as well, but that may take more time.