How to solve AUTO-FOX Divide by Zero Error?

Hello everyone!
I am trying to get the Radial and Angular Distribution Functions (RDF, ADF) from the AUTO-FOX package.

from FOX import MultiMolecule, example_xyz

sys = MultiMolecule.from_xyz(r'C:\Users\bnzmi\OneDrive - Northeastern University\Lustig Lab\RDF Attempts\hybrid7-pos-1.xyz')

rdf = sys.init_rdf(atom_subset=('Al', 'C', 'O'))
adf = sys.init_adf(r_max=13, weight=None, atom_subset=('O',))
adf_weighted = sys.init_adf(r_max=13, atom_subset=('O',))

rdf.plot(title='RDF')
adf.plot(title='ADF')
adf_weighted.plot(title='Distance-weighted ADF')

When I run this script, I get this error message:

[rest of the directory path]\LocalCache\local-packages\Python312\site-packages\FOX\functions\rdf.py:103: RuntimeWarning: divide by zero encountered in divide
  dens_mean = dist_shape[2] / ((4/3) * np.pi * (0.5 * dist.max(axis=(1, 2)))**3)

What I tried to do:

  1. I consulted the documentation (Radial & Angular Distribution Function — Auto-FOX 1.0.0b2.dev85+ga7fd4e5 documentation), but could not really understand what the issue is. I have a script checking the positions of all my atoms in the system, and none of them are close to zero (the shortest distance is around 1.5 A).

I even checked the source code for RDF (auto-FOX/FOX/functions/rdf.py at master · nlesc-nano/auto-FOX · GitHub), but I am not sure what dist.max is, as it is not defined.

  1. I am also wondering if my issue is not using floats. How does that apply to my code?

I tried to print my “sys”, and all of the elements in it seem to be floats? See below:

[[[ 7.25600514  8.72794805 12.02820221]
      [14.95928393  7.84438621 11.64682185]
      [10.96354716 11.067581    8.55290687]
      [13.90091624 15.56398689  8.76734726]
      [16.80418492 13.57377941  9.60267977]
      [ 6.33053393 15.84933413  2.60828572]
      [ 8.21413187 13.2309031   2.91318796]
      [ 8.93575675 16.15589859  2.44320707]
      [12.40698335  7.84374698  2.77464373]
      [11.92339275 11.34323094 11.80519698]
      [ 7.52861562  7.56520827  9.78788325]
      [13.10538581  6.73522015 13.76295514]
      [10.82989723 12.10437062 10.06084028]
      [12.87908469  5.32888489  8.22080132]
      [ 1.07778236  3.09234291  7.15402912]
      [11.63654902  5.60199583  5.58738808]
      [-0.53486586 -2.17915618  2.59191956]
      [10.4356729   6.42491477 -4.42810484]
      [ 6.95128157  3.39314284  3.37684836]
      [16.97975178  6.60982909 10.6174393 ]
      [10.95329605  1.27074336  4.52390992]
      [12.78397904  3.05412743  7.09692838]
      [12.33656654 -0.65409041  3.08627917]
      [13.65578941 -2.15069691 -0.16165908]
      [-3.27092597 11.92237014  1.83463317]
      [-0.70312332 10.78231393 16.58499829]
      [ 6.72650307  6.72909033  5.89401978]
      [ 6.77745953 17.59925813  5.79215546]
      [ 8.18637451 15.31592535  6.88374314]
      [10.62893379  5.7730726   1.53417611]
      [ 8.09091963  8.34391673  3.42659414]
      [ 9.28725088 10.65364402  2.57004451]
      [ 9.68928304  8.9113796  -2.40555176]
      [ 0.12624191 10.68564384 -5.81805456]
      [ 6.95518149  9.61098255 14.58827988]
      [ 1.34611275  6.57618174 14.35029969]
      [ 7.43603734  4.32365274  7.0977121 ]
      [ 5.64086131  8.31555877  7.7967102 ]
      [ 6.49595398  7.75162723  4.2642536 ]
      [ 2.99617441  2.12574957  9.26036517]
      [ 9.89495245  3.3401569   4.96679085]
      [ 5.32812313  7.77853996  3.58329398]
      [ 8.90244357  5.55354152  3.44017076]
      [ 3.98327179  8.70742134  2.4366657 ]
      [ 7.99312455  5.80399956 12.53134304]
      [ 4.80430815  3.6943093   6.22870122]
      [ 3.79232246 -0.26922842  7.11844103]
      [ 0.2173818  -0.18838547  4.90822017]
      [ 6.72185774  2.32004651  0.57268472]
      [ 5.34912678 15.38046439  8.50277079]
      [-1.66035381 10.66112395  9.72699782]
      [ 1.38628949 12.2795194   2.9465908 ]
      [ 1.79612442  9.38067778  4.49232811]
      [ 3.45818308 13.71276208  1.42855228]
      [-2.95126372  8.42249247 10.882055  ]
      [ 3.37256262  9.23874181  9.09710981]
      [ 1.42387917  7.15022174  5.21559012]
      [-0.3821581   2.22427304  5.02820014]
      [ 2.92760917  5.93451299  3.44801565]
      [ 3.35133044  0.67449708 12.96943685]
      [ 2.80663569  3.07975794 12.07405559]
      [ 2.73693849  5.37196875  6.55851118]
      [ 6.48900074 19.04488274 11.43837073]
      [ 4.61299704 15.57958535 10.99807735]
      [-0.42402647 16.55842749 11.79872831]
      [13.69741641  6.05368799 16.70948865]
      [10.59075766  1.04084036  7.31630451]
      [ 5.78341624  2.39498415  9.49620596]]]

I would love some input! Thank you kindly!

I just thought I would give an update.

I tried out the Cd/Se example offered on the Git page of the package (so, one which I knew was correct without doubt), and it only worked once I added plt.show() at the end. I am still getting the error I reported in the post (divide by zero) as I have zero diagonal elements in my matrix, but the RDF/ADF plots are finally showing and are plausible.