Skip to content

Commit

Permalink
fix(md): status message building for restraints
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Sep 2, 2018
1 parent bd914ee commit b0c6de9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ommprotocol/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,14 +289,14 @@ def run(self):
if self.total_stages is not None:
status += '/{}'.format(self.total_stages)
status += ': {}'.format(self.name)
if any([self.restrained_atoms, self.constrained_atoms, self.distance_restrained_atoms]):
pieces = []
if self.restrained_atoms:
pieces.append('restrained {}'.format(self.restrained_atoms))
if self.constrained_atoms:
pieces.append('constrained {}'.format(self.constrained_atoms))
if self.distance_restrained_atoms is not None:
pieces.append('distance restrained for {} atom pairs'.format(len(self.distance_restrained_atoms)))
pieces = []
if self.restrained_atoms is not None:
pieces.append('restrained {}'.format(self.restrained_atoms))
if self.constrained_atoms is not None:
pieces.append('constrained {}'.format(self.constrained_atoms))
if self.distance_restrained_atoms is not None:
pieces.append('distance restrained for {} atom pairs'.format(len(self.distance_restrained_atoms)))
if pieces:
status += ' [{}]'.format(', '.join(pieces))
logger.info(status)

Expand Down

0 comments on commit b0c6de9

Please sign in to comment.