Skip to content

Flex residues JSON Nonetype error fixed#69

Merged
maylinnp merged 7 commits intodevelopfrom
dhg_flexres
Mar 10, 2025
Merged

Flex residues JSON Nonetype error fixed#69
maylinnp merged 7 commits intodevelopfrom
dhg_flexres

Conversation

@DaniDelHoyo
Copy link
Copy Markdown
Contributor

Catches the None, None returned by

flexible_residues, flexres_atomnames = self.storageman.fetch_flexres_info()

and adapts " flexible_residues, flexres_atomnames " to the expected "[], []"

Would fix #68

@DaniDelHoyo DaniDelHoyo requested a review from maylinnp February 19, 2025 10:52
@DaniDelHoyo
Copy link
Copy Markdown
Contributor Author

The "[Output histogram (--plot) fixed]" commit should fix a couple of problems when trying to plot the histogram:

  1. Histogram is not displayed when saved, because function save_scatterplot() closes the figure after saving it, so closing line is commented
  2. Even though it doe snot happen often, if the DB contains 4 ligands or less, the plot will crash because the defined number fo bins will be 0 ( round(datalength / 10) ). I suggest using 1 as the minimum number of bins so it does not crash.

@maylinnp
Copy link
Copy Markdown
Contributor

maylinnp commented Mar 8, 2025

Hi Daniel and thank you for your code suggestions. Everything looks OK to me except the "Histogram is not displayed when saved, because function save_scatterplot() closes the figure after saving it, so closing line is commented". As fas as I understand the intended behavior, if you for example have a script that produces multiple plots you might just want to save them all without keeping them open. The user is still able to manually save the figure when it is open. Therefore, the plot.close() should be kept when the "save" option is used. I will clarify in the documentation the intended usage here.

Could you also change the PR so it attempts to merge with Develop, and not Release?

@DaniDelHoyo DaniDelHoyo changed the base branch from release to develop March 10, 2025 11:28
@DaniDelHoyo
Copy link
Copy Markdown
Contributor Author

perfect then, I hve already switched the base branch to develop. Thank you for looking into it

@maylinnp
Copy link
Copy Markdown
Contributor

PR approved

@maylinnp maylinnp merged commit ab8955b into develop Mar 10, 2025
@maylinnp maylinnp deleted the dhg_flexres branch March 14, 2025 20:07
maylinnp added a commit that referenced this pull request Dec 12, 2025
Flex residues JSON Nonetype error fixed plus bug fix for histogram binning
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.

Error generating sdf files with --export_sdf_path

2 participants