You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it is worthwhile to consider a python API for rs-booster analogous to its command-line functionalities. I know that this would be useful and preferable for me, and I have discussed this with Doeke as well. Given that the spirit of reciprocalspaceship is essentially "you can do crystallography in python!" it feels entirely natural for rs-booster to work this way as well. I just wanted to open an issue to gauge thoughts on this and get folks' opinions.
I am happy to take this on. I don't think it would require the writing of much new code, just some refactoring of existing code. The end result can and certainly should be entirely reverse compatible with existing rs-booster usage.
The text was updated successfully, but these errors were encountered:
My plan is to restructure things (as part of #24) to provide a bit more of a python interface. Right now, many of the tools are written as simple Python scripts, so although it is possible to import things they are not structured in a useful way.
My plan though is to have a limited scope for the task -- for example, I plan to write a DifferenceMap class to back many of the CLI implementations.
Do you have any specific things in mind? My hesitation with going to broad in terms of this library, is that I don't want it to be confusing where rs ends and rsbooster begins -- I still very much see rsbooster as providing useful implementations of certain tasks.
I'm going to make a PR soon with regards to this, because I'm building a larger python-based thing that uses rs.scaleit and I would like to be able to access scaleit from within python. My goal will be basically to have the main() function do only the following:
defmain():
args=parse_arguments()
mtz1=rs.read_mtz(args.mtz1) # etc. for other input filesscaled=do_the_stuff(mtz1, ..., *args, etc.)
scaled.write_mtz(args.mtzout)
return
Such that everything except the io is accessible from inside python.
Does this make sense as a general structure? I like it, and I like the idea of keeping the python and command-line APIs as similar as possible. I would also be happy to go through and reorganize other functions in this manner.
I think it is worthwhile to consider a python API for
rs-booster
analogous to its command-line functionalities. I know that this would be useful and preferable for me, and I have discussed this with Doeke as well. Given that the spirit ofreciprocalspaceship
is essentially "you can do crystallography in python!" it feels entirely natural forrs-booster
to work this way as well. I just wanted to open an issue to gauge thoughts on this and get folks' opinions.I am happy to take this on. I don't think it would require the writing of much new code, just some refactoring of existing code. The end result can and certainly should be entirely reverse compatible with existing
rs-booster
usage.The text was updated successfully, but these errors were encountered: