Skip to content

Commit

Permalink
Change 'print' by 'return' in main (#104)
Browse files Browse the repository at this point in the history
* change print by return so it can be used in scripts
  • Loading branch information
iribirii authored Jan 31, 2024
1 parent f47b9b5 commit 69f9239
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions rmsd/calculate_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ def parse_arguments(arguments: Optional[Union[str, List[str]]] = None) -> argpar
return args


def main(args: Optional[List[str]] = None) -> None:
def main(args: Optional[List[str]] = None):

# Parse arguments
settings = parse_arguments(args)
Expand Down Expand Up @@ -2051,15 +2051,16 @@ def main(args: Optional[List[str]] = None) -> None:

# done and done
xyz = set_coordinates(q_all_atoms, q_coord, title=f"{settings.structure_b} - modified")
print(xyz)
return xyz

else:

if not result_rmsd:
result_rmsd = rmsd_method(p_coord, q_coord)

print("{0}".format(result_rmsd))
return result_rmsd


if __name__ == "__main__":
main() # pragma: no cover
result = main() # pragma: no cover
print(result)

0 comments on commit 69f9239

Please sign in to comment.