Skip to content

Commit

Permalink
Work for now with stable python-ihm
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Oct 4, 2024
1 parent db1962f commit a7d81b6
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions modelcif/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,9 +982,17 @@ def read(fh, model_class=modelcif.model.Model, format='mmCIF', handlers=[],
:return: A list of :class:`modelcif.System` objects.
"""
return ihm.reader.read(
fh, model_class=model_class, format=format, handlers=handlers,
warn_unknown_category=warn_unknown_category,
warn_unknown_keyword=warn_unknown_keyword,
reject_old_file=reject_old_file, variant=variant,
add_to_system=add_to_system)
if add_to_system is None:
# Work for now with stable python-ihm release
return ihm.reader.read(
fh, model_class=model_class, format=format, handlers=handlers,
warn_unknown_category=warn_unknown_category,
warn_unknown_keyword=warn_unknown_keyword,
reject_old_file=reject_old_file, variant=variant)
else:
return ihm.reader.read(
fh, model_class=model_class, format=format, handlers=handlers,
warn_unknown_category=warn_unknown_category,
warn_unknown_keyword=warn_unknown_keyword,
reject_old_file=reject_old_file, variant=variant,
add_to_system=add_to_system)

0 comments on commit a7d81b6

Please sign in to comment.