-
Notifications
You must be signed in to change notification settings - Fork 4
NICS_zz procedure doesn't work #3
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
Comments
I apologize for the delayed response. Could you please send me the output file? The results of NICS_zz seems to be working well for my outputs. |
Apologies for the delay — I’ve been meaning to follow up for a while. I ran some test calculations with benzene rotated at different angles relative to the The procedure for calculating
I propose the following change:
For my test cases, this resulted in
I've been using this implementation in my own work and haven't run into issues, though I haven't done exhaustive tests. The The following code, adapted from the implementation in my fork, might work if dropped into def computeNICSPerp(self):
ringNo_zz = int(ringCombo_2.currentText())
bqNo_zz = int(bqCombo.currentText())
ringNormal = np.array(geomAnalyzer.normal_vector(ringList[ringNo_zz], geomList))
rotationMatrix = mathUtilities.align_matrix(ringNormal,np.array([0,0,1]))
if not 1 - np.dot(rotationMatrix @ np.array([0,0,1]), ringNormal) < 0.001:
raise RuntimeError('Bad change of basis')
i = bqNo_zz
currentTensor = np.array(
[[xxTen[i], xyTen[i], xzTen[i]],
[yxTen[i], yyTen[i], yzTen[i]],
[zxTen[i], zyTen[i], zzTen[i]]]
)
#the change of basis formula for a matrix
rotatedTensor = np.linalg.inv(rotationMatrix) @ currentTensor @ rotationMatrix
#the new NICS_zz with change of basis applied
new_nics = rotatedTensor[2,2]
nicszzOutText.setText(f'{new_nics:.4f}') Let me know if you’d like help integrating this or want to discuss further. Best, |
Dear Gage, Thank you so much for your comments and for providing the code. All the best, |
Yes, I would absolutely be okay with this. I'll try and conduct some more thorough testing on this code as well. |
The feature for obtaining corrected NICS_zz for out-of-plane rings doesn't seem to work - when using this feature on a planar benzene ring, it yields a different value than the normal NICS_zz. Looking at the source code, it seems like the math isn't right. Could you take another look at this? Thanks
The text was updated successfully, but these errors were encountered: