Using Distance Cutoff in Crystal NN

Hi,

I am trying to calculate the neighbor of a site in crystal. When I try to change the distance cutoff, there is no change in the neighbors the algorithm calculates.

nnalgo = CrystalNN()
info = nnalgo.get_nn_info(transformed_structure, 6)

I passed an argument as distance_cutoffs = [0.5, 3] in CrystalNN, but it did not change the neighbor information of a site. To see the effect, I also changed the cutoff values multiple times but there is no effect of it.

Can anyone help me with this, what is the reasoning?

It seems that in order to get all neighbors with distances up to (sum of covalent radii) + distance_cutoffs[1] (after which the weights will be zero), you also need to pass weighted_cn=True when you initialize CrystalNN. This correctly finds all neighbors with proper weights in my simple test. When you don’t pass this, get_nn_info() just returns the nearest neighbors.