$ file -m cmd.magic.mime -i your_test_file.ext
The file cmd.magic.mime was created via XSLT conversion of the original chemical-mime-data database and can be used for KDE and file(1). One of the following package releases (probably 0.1.95) will provide it.
Unfortunately this magic.mime file cannot be used for KDE. As pointed out by David Faure, KDE uses an older syntax that doesn't know e.g. the search type. So I have to find another solution for KDE or wait for better days.