-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In search experiments, it can be observed that MEGAN sometimes produces odd molecules containing `C+` atoms, which violate valence despite being accepted as valid by `rdkit`. These molecules fail sanitization through MEGAN's `fix_explicit_hs` utility, and so far our wrapper has been ignoring this and passing the molecule through to the model to propose reactions (likely pushing the problematic `C+` atom to reactants). In this PR, the underlying model is not called on inputs which fail `fix_explicit_hs`, and rather an empty list of reactions is returned in this case. Relatedly, I also silenced some of the other internal warnings produced by the MEGAN model by applying a (now improved) `suppress_outputs` context manager.
- Loading branch information
Showing
3 changed files
with
41 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters