Skip to content

Commit

Permalink
Merge pull request #25 from haddocking/logging
Browse files Browse the repository at this point in the history
Fixing the logging issue reported by Richard
  • Loading branch information
amjjbonvin authored Dec 8, 2023
2 parents deb981d + cd9fecb commit f3b46a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 5 additions & 4 deletions disvis/disvis.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,11 @@ def _print_progress(n, total, time0):
m = n + 1
pdone = m/total
t = _time() - time0
_stdout.write('\r{:d}/{:d} ({:.2%}, ETA: {:d}s) '\
.format(m, total, pdone,
int(t/pdone - t)))
_stdout.flush()
if _stdout.isatty():
_stdout.write('\r{:d}/{:d} ({:.2%}, ETA: {:d}s\n) '\
.format(m, total, pdone,
int(t/pdone - t)))
_stdout.flush()

def _gpu_init(self):

Expand Down
3 changes: 1 addition & 2 deletions disvis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ def run_disvis(queue, receptor, ligand, rotmat, weights, distance_restraints,


def write(line):
if stdout.isatty():
print(line)
print(line)
logging.info(line)


Expand Down

0 comments on commit f3b46a2

Please sign in to comment.