Currently, there is no way to programmatically capture missing ids via Python interface. The missing ids are printed into non-capturable stderr .This would be a useful feature, as it will allow to troubleshoot problems.
As error might indeed not be the best solution, I think it will be great if missing id's were still returned, but with an empty structure string.
ids = ["valid", "invalid"]
with foldcomp.open(database_path, ids=ids) as db:
print("Here!")
for idx, pdb in db:
print(idx, pdb)
Skipping entry invalid which is not in the database.
Here!
valid {pdb_string}
Proposed behaviour
ids = ["invalid"]
with foldcomp.open(database_path, ids=ids) as db:
print("Here!")
for idx, pdb in db:
print(idx, pdb)
https://github.com/steineggerlab/foldcomp/blob/b97c193e3029d861b6ca6b7c2970b562b779a4de/foldcomp/foldcomp.cxx#L333-L434
Current behaviour
Currently, there is no way to programmatically capture missing ids via Python interface. The missing ids are printed into non-capturable
stderr
.This would be a useful feature, as it will allow to troubleshoot problems. As error might indeed not be the best solution, I think it will be great if missing id's were still returned, but with an empty structure string.Proposed behaviour