Skip to content
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

Make sure the user provides a resolution value if the input map is in MRC/CCP4 or MAP formats #180

Merged
merged 2 commits into from
Apr 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/qfit/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ def fromfile(cls, fname, fmt=None, resolution=None, label="FWT,PHWT"):
if fmt is None:
fmt = os.path.splitext(fname)[1]
if fmt in ('.ccp4', '.mrc', '.map'):
if resolution is None:
raise ValueError(f"{fname} is a CCP4/MRC/MAP file. Please provide a resolution (use the '-r'/'--resolution' flag).")
parser = parse_volume(fname, fmt=fmt)
a, b, c = parser.abc
alpha, beta, gamma = parser.angles
Expand Down