-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix imaginary frequencies #1210
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
This looks good to me, I played around with a few systems and the results are good.
I am unsure, however, if this could have further impacts that I am possibly unaware of, @thfroitzheim?
Signed-off-by: Igor S. Gerasimov <[email protected]>
Signed-off-by: Igor S. Gerasimov <[email protected]>
Signed-off-by: Igor S. Gerasimov <[email protected]>
Signed-off-by: Igor S. Gerasimov <[email protected]>
Signed-off-by: Igor S. Gerasimov <[email protected]>
Signed-off-by: Igor S. Gerasimov <[email protected]>
Signed-off-by: Igor S. Gerasimov <[email protected]>
I see the problem for linear water, where you want to have two large imaginary modes ( -1840.78 cm-1) and the smaller modes as the rotation (935.71 cm-1). Here, xtb assigns them the wrong way around. But I don't think that not assigning translation/rotation is better here. For example, the relaxed CO2 geometry
yields the following frequencies:
However, the first five frequencies really should be zero, since they are translation and rotation where the Hessian calculation applies a (wrong) harmonic approximation to the degree of freedom. The same holds for the linear water molecule, where five frequencies must again be zero. For the user, it is highly unintuitive if xtb provides the wrong number of non-zero vibrational frequencies. Therefore, we must assign linear and bent molecules to find how many frequencies should be zero. How we decide, which frequencies are translations/rotations is a different question. Maybe, we should always take the five/six frequencies with the lowest magnitude, but I am unsure whether this is always correct (not sure how other programs do this). As a side note, I think we should retain the ordering of the frequencies, where the imaginary modes come first followed by the translation/rotation and the positive frequencies. There are likely many scripts based on this ordering, which would immediately break :D |
I think I can use detrotra8 procedure to set rot/tra freqs properly. |
Fix #693
Instead of trying to detect how many frequencies should be rot/trans, this patch counts number of low freqs and sort them.
For linear H2O molecule:
the diff between old behaviour and new (
--hess
):CO.xyz:
The diff (running with
--ohess
):For bigger system: