-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move from Henkelman Bader to PyBader #711
Comments
You might want to consider a couple of things:
Even a super tiny change to a single dep will cause problems. It would mean you're now pinned to an old pandas/numpy/numba version forever unless you fork the repo or get ahold of the maintainer to fix it. There is also a high chance of a future python version breaking a feature. You can see in the pybade repo they've only tested up to Python 3.8, which has already hit its end of life. So if you do decide to go with it, I won't be adding While simmate does have a ton of dependencies already, I've slowly been cutting these down. In fact I just removed In extreme cases like yours, you can fork
please don't do this! Adding support for pybader does not mean you should remove support for the Henkelman code. Leave those features in place and build a config/setting that lets you choose the backend -- or just make a new app entirely if they don't mesh well. I'm good example of someone that's used to the Henkelman code and would like to use those workflows, even if your badelf + new bader workflows go another route
Sounds good to me. Also Pybader is one option, but you can do this with simmate/src/simmate/apps/bader/workflows/combine_chgcars.py Lines 6 to 9 in f330103
Considering everything else above, it'll only make it to the toolkit if its based on |
Even with all those points above! badelf is still your app -- so you can go full steam ahead on this. I'll only push back on things if you start removing features from the |
Some good points here! I didn't realize just how outdated pybader was. Unfortunately for me, it's practically essential for the BadELF app because I need the voxel assignments from the bader method to be stored in an array that I use for other stuff down the line. As far as I've been able to figure out, the Henkelman code can't print this information or I would've stuck with it 😢. If pybader ever does break, I might just write my own version of the code that's trimmed down since a lot of what they do isn't necessary for what I need.
This is on me for not mentioning this, but I actually moved the
Based on this thread, I won't bother moving anything over to pybader. I will probably still replace the |
Describe the desired feature
Rather than using the henkelman group's bader program which requires either docker or local install, it might be useful to switch to pybader.
Additional context
Currently, the bader workflows we have rely on the Henkelman groups fortran implementation. This means users need to use either docker or a local install. The pybader package uses essentially the same implementation as the Henkelman group, but exclusively using python packages (numpy, numba, tqdm, and pandas). This also means that results can be easily read from the resulting python object rather than needing to read results from output files.
I've already implemented pybader in the Grid class I made for BadELF:
simmate/src/simmate/apps/badelf/core/grid.py
Lines 388 to 419 in f330103
The Grid class would also make it very easy to create a python only implementation of the combine_chgars workflow so that we can remove the extra workflow.
The main issues I foresee are that pybader is not longer actively maintained and does not by default use a reference file like the henkelman group's implementation. I think the first of these is likely to be ok unless one of the four required packages changes drastically. The second is relatively easy to manage because the voxel assignments are stored in a pybader object (bader.atom_volumes). This would make it easy to run the algorithm on one Grid object and then sum the voxels in another Grid object.
@jacksund let me know if you have any issues with this. Otherwise I can work on it when I have some free time.
To-do items
As I see it, to implement this we would need to:
The text was updated successfully, but these errors were encountered: