Skip to content

Commit

Permalink
formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davegrays committed Jan 6, 2025
1 parent 2035589 commit 26235a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/biotite/structure/info/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def residue(res_name, allow_missing_coord=False):
component = get_component(
get_ccd(),
res_name=res_name,
allow_missing_coords=allow_missing_coords,
allow_missing_coords=allow_missing_coord,
)
except KeyError:
raise KeyError(f"No atom information found for residue '{res_name}' in CCD")
Expand Down
12 changes: 6 additions & 6 deletions src/biotite/structure/io/pdbx/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ def get_component(
raise
array.coord = _parse_component_coordinates(
[atom_category[field] for field in alt_coord_fields],
allow_missing=allow_missing_coords,
allow_missing=allow_missing_coord,
)

try:
Expand Down Expand Up @@ -1346,15 +1346,15 @@ def _parse_component_coordinates(coord_columns, allow_missing=False):
coord = np.zeros((len(coord_columns[0]), 3), dtype=np.float32)
for i, column in enumerate(coord_columns):
if column.mask is not None and column.mask.array.any():
if not allow_missing:
raise ValueError(
"Missing coordinates for some atoms",
)
else:
if allow_missing:
warnings.warn(
"Missing coordinates for some atoms. Those will be set to nan",
UserWarning,
)
else:
raise ValueError(
"Missing coordinates for some atoms",
)
coord[:, i] = column.as_array(np.float32, masked_value=np.nan)
return coord

Expand Down

0 comments on commit 26235a3

Please sign in to comment.