Skip to content

Change 'print' by 'return' in main#104

Merged
charnley merged 3 commits intocharnley:masterfrom
iribirii:master
Jan 31, 2024
Merged

Change 'print' by 'return' in main#104
charnley merged 3 commits intocharnley:masterfrom
iribirii:master

Conversation

@iribirii
Copy link
Contributor

Maybe this was unnecessary or there is a better way of doing it, but I use this module inside my scripts to calculate the rmsd between hundreds of pairs of molecules and I need to collected the rmsd values in a matrix.

So I changed the last two print in the main function by return so the results can be collected and used in those scripts when the main function is called as 'rmsd.main(file1,file2,--options...)' from the module.

e.g.

for i in range(n_files):
    for j in range(i+1,n_files):
        results[i,j] = rmsd.main([str(files[i]),str(files[j]),'-e'])

@charnley charnley merged commit 69f9239 into charnley:master Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants