Page 1 of 1

Errors in Dos format

Posted: Wed Oct 26, 2016 7:15 am
by Nguyen_Oanh
Dear users!
When I run CASINO program to calculate for C2HF with correlation.data.
I have a problem with DOS format when I optimise the trial wave function
File '/home/oanhnguyen/Desktop/C2HF/input' appears to be in DOS format.
DOS2UNIX cannot be found. Please convert this file by hand, or use the
-f option to runqmc to bypass error checking.

I used optimise for Jastrow and backflow factor or only Jastrow, this error were appeared.
So, How can I fix it ?

Re: Errors in Dos format

Posted: Wed Oct 26, 2016 9:18 am
by Mike Towler
Hi Nguyen,

This means (probably) that your file 'input' was created on a Windows machine and you're trying to use it on a Unix/Linux machine or a modern Mac. To quote the dos2unix man page:

Code: Select all

The Dos2unix package includes utilities "dos2unix" and "unix2dos" to convert plain text files in DOS or Mac format to Unix format and vice versa. In DOS/Windows text files a line break, also known as newline, is a combination of two characters: a Carriage Return (CR) followed by a Line Feed (LF). In Unix text files a line break is a single character: the Line Feed (LF). In Mac text files, prior to Mac OS X, a line break was single Carriage Return (CR) character. Nowadays Mac OS uses Unix style (LF) line breaks.
The runqmc script is aware that this can happen, and if it finds you're using a DOS input file it will automatically run the standard utility 'dos2unix' to convert it before CASINO tries to read it and crashes.. However, it's telling you that it can't find dos2unix and that's probably because you don't have it installed. Thus - install it.. ('sudo apt-get install dos2unix' or whatever, depending on what Linux distribution you're running.)

Cheers,
Mike