Skip to content

Commit

Permalink
dealing with the warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ale94mleon committed Aug 22, 2022
1 parent 2f5f4ab commit 1142d7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions moldrug/fitness.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def Cost(
'boxsize': boxsize,
}
utils.compressed_pickle(f'{Individual.idx}_error', error)
warnings.warn(f"Dear {os.getlogin()}, as you know MolDrug is still in development and need your help to improve."\
warnings.warn(f"Dear user, as you know MolDrug is still in development and need your help to improve."\
f"For some reason vina fails and prompts the following error: {e}. In the directory {os.getcwd()} there is file called {Individual.idx}_error.pbz2"\
"Please, if you don't figure it out what could be the problem, please open an issue in https://github.com/ale94mleon/MolDrug/issues. We will try to help you"\
"Have at hand the file error.pbz2, we will needed to try to understand the error. The file has the following info: the exception, the current Individual, the receptor pdbqt string as well the definition of the box.")
Expand Down Expand Up @@ -277,7 +277,7 @@ def CostOnlyVina(
'boxsize': boxsize,
}
utils.compressed_pickle(f'{Individual.idx}_error', error)
warnings.warn(f"Dear {os.getlogin()}, as you know MolDrug is still in development and need your help to improve."\
warnings.warn(f"Dear user, as you know MolDrug is still in development and need your help to improve."\
f"For some reason vina fails and prompts the following error: {e}. In the directory {os.getcwd()} there is file called {Individual.idx}_error.pbz2"\
"Please, if you don't figure it out what could be the problem, please open an issue in https://github.com/ale94mleon/MolDrug/issues. We will try to help you"\
"Have at hand the file error.pbz2, we will needed to try to understand the error. The file has the following info: the exception, the current Individual, the receptor pdbqt string as well the definition of the box.")
Expand Down Expand Up @@ -443,7 +443,7 @@ def CostMultiReceptors(
'boxsize': boxsizes[i],
}
utils.compressed_pickle(f'{Individual.idx}_error', error)
warnings.warn(f"Dear {os.getlogin()}, as you know MolDrug is still in development and need your help to improve."\
warnings.warn(f"Dear user, as you know MolDrug is still in development and need your help to improve."\
f"For some reason vina fails and prompts the following error: {e}. In the directory {os.getcwd()} there is file called {Individual.idx}_error.pbz2"\
"Please, if you don't figure it out what could be the problem, please open an issue in https://github.com/ale94mleon/MolDrug/issues. We will try to help you"\
f"Have at hand the file error.pbz2, we will needed to try to understand the error. The file has the following info: the exception, the current Individual, the receptor pdbqt string as well the definition of the box for the receptor with index: {i}.")
Expand Down Expand Up @@ -631,7 +631,7 @@ def CostMultiReceptorsOnlyVina(
'boxsize': boxsizes[i],
}
utils.compressed_pickle(f'{Individual.idx}_error', error)
warnings.warn(f"Dear {os.getlogin()}, as you know MolDrug is still in development and need your help to improve."\
warnings.warn(f"Dear user, as you know MolDrug is still in development and need your help to improve."\
f"For some reason vina fails and prompts the following error: {e}. In the directory {os.getcwd()} there is file called {Individual.idx}_error.pbz2"\
"Please, if you don't figure it out what could be the problem, please open an issue in https://github.com/ale94mleon/MolDrug/issues. We will try to help you"\
f"Have at hand the file error.pbz2, we will needed to try to understand the error. The file has the following info: the exception, the current Individual, the receptor pdbqt string as well the definition of the box for the receptor with index: {i}.")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_moldrug.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,4 @@ def test_miscellanea():


if __name__ == '__main__':
test_multi_receptor()
test_fitness_module()

0 comments on commit 1142d7a

Please sign in to comment.