Fit the bug in writing sql files in the minitherm and remd inp files.