Skip to content

Commit

Permalink
xyz bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ekwan committed Jul 2, 2021
1 parent d4fa92a commit ffeb23a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cctk/xyz_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def read_file(cls, filename, charge=0, multiplicity=1, conformational=False):
lines = super().read_file(filename)
current_lines = list()
for line in lines:
if re.search(r"^\s*\d+$", line):
if re.search(r"^\s*\d+$", line) and len(current_lines) > 2:
if len(current_lines) > 0:
t, m = cls.mol_from_lines(current_lines, charge=charge, multiplicity=multiplicity)
ensemble.add_molecule(m)
Expand Down

0 comments on commit ffeb23a

Please sign in to comment.