exa-analytics / exatomic

A unified platform for theoretical and computational chemists
https://exa-analytics.github.io/exatomic
Apache License 2.0
19 stars 12 forks source link

deprecated DataFrame.ix in molecule.py (line 68) #283

Open adamphil opened 7 months ago

adamphil commented 7 months ago

Old .ix method needs to be replaced with .loc or .iloc

herbertludowieg commented 7 months ago

Hey, thank you for highlighting this!! I checked the logs for the unit test coverage and found no unit testing/coverage on that file. I'm not sure if this should use .loc or .iloc. This is the line in question

https://github.com/exa-analytics/exatomic/blob/2e87bae3e043e6958129fc823c83ab0b46add8b5/exatomic/core/molecule.py#L68

It seems to be using a boolean array for indexing the rows. If that's the case, I think we can replace it with .loc.

Do you have a minimal working example that I could look at to reproduce the issue?

Do you think you can make the necessary changes and set up some unit testing for that file?

adamphil commented 7 months ago

replacement with .loc eliminates the error. Unfortunately, I can't commit to further debugging or testing for this. To reproduce you can define a universe object that contains water molecules, and try u.molecule.classify(('H(2)O(1)','water',True))