-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More molecule fixes and helper reactions for checking molecules / reactions #75
Merged
Conversation
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
Added a few more examples from analyzing the QuantumPioneer data
update property cache is necessary if sanitize=False
1. also make the warning message for saturate mol silent
HasSameConnectivity is a helper function to compare two molecule's adjacency matrix. Rename the one comparing conformer connectivity to HasSameConnectivityConformer; GetClosedShellMol is a helper function to get the closed shell form of a radical
This provides extra benefits in terms of implementation. E.g., one only wants to swap the index of two atoms can now do mol.RenumberAtoms({0:2, 2:0}) instead of provide the full list.
The current Chem.MolFromSmiles will silently generate a None object if the smiles is not valid (e.g., handwritten), and the None object will raise Attribute Error in the following steps. It is more insightful to raise a valueError instead to indicate the SMILES is not valid.
This method uses the default substructure match and create a recipe. The recipe is used to transform the provided mol to the current mol
Previously use "GetSubStruct..." which is different from the convention of the existing ones.. Change it to "GetSubstruct..."
add bond analysis
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
+ Coverage 36.15% 38.24% +2.09%
==========================================
Files 34 34
Lines 3684 3812 +128
Branches 942 975 +33
==========================================
+ Hits 1332 1458 +126
+ Misses 2278 2275 -3
- Partials 74 79 +5
☔ View full report in Codecov by Sentry. |
There are cases ResonanceMolSupplier returns None, causing error in downstream. This commit makes sure, if nothing meaningful is created, at least the mol created previously will be returned.
Openbabel and Jensen XYZ perception algorithms do not perceive oxonium oxygen correctly. This commit try to fix it by adding the missing bonds and correcting the charge
1. Add an optional argument to control the threshold of missing bond perception 2. Add an optional argument to allow not sanitization for debugging and testing 3. Add an unit test for fix_oxonium_bonds
1. Add the `bothway` argument to avoid mistakenly changing the geometry sequence. 2. Allow passing additional arguments to the viewer
For unknown reason, it may yield None object unexpectedly. The commit add a filter for its output.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This again is inspired by the data cleaning work of reaction datasets. This PR covers:
RDKitMol.GetClosedShellMol
HasSameConnectivity
to check the connectivities of molecules with the same atom mappingRenumberAtoms
to allowdict
as a "shorter" input.