[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IMP-dev] Data files in IMP



Dina has run into the need to add data files to IMP (specifically for bond topology). There are a number of options that I see for this, but none of them are idea. The important properties that I see are:
- users (and their scripts/config files) should only every have to specify paths to files that are theirs (no paths to things that are part of IMP)
- it should be possible to debug IMP without installing it so that you don't have to worry about which copy of the header file you are editing

The two choices that I see which satisfy these criteria are:
- embed all data into the data section of the libraries. This presents the simplest view to users: standard data that are part of IMP just work. Most data files can be embedded as a string variable (perhaps with some escaping,which could be done by a script) and then read using a string stream. The disadvantage is that the data files are not accessible to the users so they can't easily create patched versions. While this is generally not a problem, the API design would have to take this into account (and allow the user to specify multiple data sources at once or apply the operation successively with different data sources).

- IMP is built with the path to the data stored internally and it must be installed before use. The build dir could be a special install target which then doesn't copy the headers or libs since the links are already there. imppy.sh could go away on most platforms as we could safetly embed the paths to the build/lib dir as the library will be rebuild before being installed