Skip to content

Commit

Permalink
documentation for composite xyz files
Browse files Browse the repository at this point in the history
  • Loading branch information
ekwan committed Jul 2, 2021
1 parent 5fb7c1d commit dfd030f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/recipe_07.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ XYZ Files
# convenient accessor
molecule = file.get_molecule()

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

# write xyz
assert isinstance(molecule2, Molecule)
XYZFile.write_molecule_to_file(filename, molecule2, title="title"):
Expand Down

0 comments on commit dfd030f

Please sign in to comment.