Closed David-Zagaceta closed 6 years ago
found and fixed issue
the issue was empty lists in the distances dictionary, this occurs when the cutoff distance isnt large enough. We now have a condition that doesn't allow computation of the RDF's when the lists are empty.
@qzhu2017 I updated the code to enable the test run. However, I think you code has some bugs in a loop.
qiangzhu@Qiangs-MacBook-Pro:~/Desktop/github/PyXtal_ml/pyxtal_ml/descriptors$ python prdf.py -c POSCARs/POSCAR-NaCl
Traceback (most recent call last):
File "prdf.py", line 224, in <module>
f2 = PRDF(test, symmetrize=False, R_max=options.Rmax, R_bin=options.delta).PRDF
File "prdf.py", line 55, in __init__
self.compute_PRDF()
File "prdf.py", line 151, in compute_PRDF
ele_2 = neighbors[i][j][0].species_string
IndexError: list index out of range
@qzhu2017 The loop should have been for j, neighbor in enumerate(neighbors[i])
what I had initially was for j, neighbor in enumerate(neighbors)
david@DESKTOP-I6PJBIV MINGW64 ~/Users/david/Desktop/CMS_Work/PyXtal-ml/pyxtal_ml/descriptors (master)
$ python prdf.py -c POSCARs/POSCAR-NaCl
4560
[]
@qzhu2017
Should we increase the default R_max?
I think the default value is very reasonable.
@qzhu2017
This is troublesome during learning, this is causing main to crash. I need to find these structures in order to determine the reasoning for this issue.