openmopac / mopac

Molecular Orbital PACkage
http://openmopac.net
GNU Lesser General Public License v3.0
111 stars 31 forks source link

BZ Keyword #168

Closed kamischi closed 11 months ago

kamischi commented 12 months ago

Describe the bug The documentation is wrong about the keyword "BZ". It is not a valid keyword. Instead of "BZ", "BRZ" works

To Reproduce Any example file with BZ as keyword is rejected, whereas with BRZ it works.

Expected behavior Besides the wrong keyword, with BRZ mopac works as expected.

Operating system macOS 13 arm, but this should not matter.

Additional context I found the correct keyword by searching the keywords in the source code.

P.S. Is it possible to attach a text file, like an mopac input file? I could not find such a possibility. P.P.S In my initial report, I falsely stated "BZR" instead of "BRZ". Sorry.

flatstik commented 11 months ago

I don't know whether that is actual bug unless you are doing electronic or phononic band structure calculations.. See https://openmopac.github.io/keywords/BZ.html

kamischi commented 11 months ago

Sorry, my fault. The keyword needs to be "BRZ" and not "BZR". I'll correct the bug report. But it definitely is a bug. Whereas the program is called BZ, the keyword for mopac needs to be "BRZ". Obvious source lines are in bz/bz.F90, src/input/wrtkey.F90 and output/writmo.F90: bz/bz.F90, line 81: is_brz = (keywrd(:3) == "BRZ") output/writmo.F90, line 735: if (mers(1) /= 0 .and. .not. mozyme .and. index(keywrd, " BRZ") /= 0) then src/input/wrtkey.F90, line 880: if (myword(allkey, " BRZ")) write (iw, '(" * BRZ - Write file .brz for use by program BZ")')

It took me ages to find it out and is at least a severe bug in the documentation.

godotalgorithm commented 11 months ago

Older versions of MOPAC did indeed use the "BZ" keyword rather than "BRZ" in MOPAC to request that a ".brz" file be written, and I don't know when or why it was changed. I brought this up with Jimmy Stewart at our most recent meeting, and he doesn't remember it and is ambivalent about how to resolve this issue. I think the simplest thing to do is to switch the keyword back from "BRZ" to "BZ". Just be mindful of this change if you are using the development version of MOPAC.

Also, you can attach files by dragging & dropping them in the box that you type these messages into.