Skip to content

Commit

Permalink
fixed bug where multiple titles were improperly checked
Browse files Browse the repository at this point in the history
  • Loading branch information
ekwan committed Nov 12, 2022
1 parent 3742529 commit 97dc6a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cctk/gaussian_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def write_ensemble_to_file(cls, filename, ensemble, route_card, link0={"mem": "3
assert len(title) == n_geometries, f"expected {n_geometries} route cards but got {len(title)}"
for card in title:
assert isinstance(card, str), "expected title to be a str"
assert len(title.strip()) > 0, "zero-length titles are not allowed"
assert len(card.strip()) > 0, "zero-length titles are not allowed"
else:
raise ValueError(f"unexpected type for title: {str(type(title))}")

Expand Down
2 changes: 1 addition & 1 deletion docs/recipe_07.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ XYZ Files
molecule = file.get_molecule()

# if the file contains multiple molecules
for title, molecule in zip(ensemble.molecule_list(), file.titles):
for molecule, title in zip(ensemble.molecule_list(), file.titles):
print(title)
print(molecule)
break
Expand Down

0 comments on commit 97dc6a2

Please sign in to comment.