Replies: 1 comment 1 reply
-
Hello @izxle, The weights you are plotted aren't exactly the Becke-weight, but the molecular grid weights. The molecular grid weights are a multiplication of the Becke-weights of the atom and the radial grid and the angular (spherical) grid weight. I'll recommend the published Grid paper if you want the mathematical details. You can see the code where it calculates the weights here, specifically Line 103: Lines 88 to 103 in 8bf58af What you want is to plot Line 83 to get the Becke-Weights around an atom. Here is a quick example script that shows you get all ones if you only use Becke-Weights near the nucleus import numpy as np
from grid.becke import BeckeWeights
# Define atomic information
atnums = np.array([10, 10])
atcoords = np.array([[0, 0, 0], [0, 0, 10]])
becke = BeckeWeights()
pts = np.array([
# Points on Atom A
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.05],
[0.0, 0.05, 0.0],
[0.05, 0.0, 0.0],
# Points on Atom B
[0.0, 0.0, 10.0],
[0.05, 0.0, 10.0],
[0.0, 0.05, 10.0]]
)
# Index 0 to 3 corresponds to Atom A in pts
# Index 3 to 6 corresponds to Atom B in pts
indices = np.array([0, 4, 7])
aim_weights = becke(pts, atcoords, atnums, indices=indices)
print(aim_weights)
# Output: [1. 1. 1. 1. 1. 1. 1.] |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi QC-devs Team,
We’ve been working with the grid repository as part of a project where we're constructing the promolecular density for a diatomic molecule and integrating various terms using the molecular grids.
While using the Becke weights function, we noticed that the weights near the nucleus are not close to 1, which I had expected based on my understanding. Is this behavior intentional, or might it indicate an issue? If it’s intentional, could you provide some insight into the reasoning behind it or point me toward relevant references?
I thought I’d ask here first to understand the design of the weights better.
Thank you in advance for your help and for providing such valuable resources to the community.
Here below I include an example.
Beta Was this translation helpful? Give feedback.
All reactions