Skip to content

Commit

Permalink
Merge pull request #46 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Removed debug printing
  • Loading branch information
seamm authored Jul 28, 2023
2 parents 6a5d258 + bff25db commit 51197f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
History
=======

2023.7.27.1 -- Removed debug printing.

2023.7.27 -- Support for .gz and .bz2 files, and multi-structure .xyz files
* Handle .gz and .bz2 files for .sdf and .xyz extensions.
* Handle multi-structure XYZ files with a blank line between records.
Expand Down
10 changes: 1 addition & 9 deletions read_structure_step/formats/xyz/xyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ def load_xyz(
path = file_name
path = path.expanduser().resolve()

print(f"In xyz.py, path = {path}")

# Get the information for progress output, if requested.
n_structures = 0
last_line = 0
Expand Down Expand Up @@ -258,7 +256,6 @@ def load_xyz(
if path.suffix == ".bz2"
else open(path, "r")
) as fd:
print(f"{fd=}")
lines = []
line_no = 0
for line in fd:
Expand All @@ -270,7 +267,6 @@ def load_xyz(
# End of block, so examine the first lines and see which format
file_type = "unknown"
n_lines = len(lines)
print(f"Found block of {n_lines} lines")
line1 = lines[0].strip()
fields1 = line1.split()
n_fields1 = len(fields1)
Expand Down Expand Up @@ -349,10 +345,6 @@ def load_xyz(
# Reassemble an input file.
input_data = "".join(lines)

print("Input data")
print(input_data)
print("---------")

logger.info(f"Input data:\n\n{input_data}\n")

title = lines[1].strip()
Expand Down Expand Up @@ -470,7 +462,7 @@ def load_xyz(
t1 = time.time()
rate = structure_no / (t1 - t0)
printer(
f" Read {structure_no - n_errors - 1} structures in {t1 - t0:.1f} "
f" Read {structure_no - n_errors} structures in {t1 - t0:.1f} "
f"seconds = {rate:.2f} per second"
)
if n_errors > 0:
Expand Down

0 comments on commit 51197f3

Please sign in to comment.