-
Notifications
You must be signed in to change notification settings - Fork 35
make fragment compatible for rms #216
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
Merged
mjohnson541
merged 8 commits into
ReactionMechanismGenerator:main
from
lily90502:frag_draw
Oct 17, 2023
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
17c09e1
Import fragment module
hwpang 194ef9b
Add type to avoid error when summarizing over an empty list
hwpang 288be53
Should be adjlist, not smiles. Fix indentation.
hwpang d844ee8
Generalize fluxdiagram to handle both mol and fragment adjlist
hwpang 76bd4a8
Generalize fluxdiagram to handle both mol and fragment smiles
hwpang 4e8274c
Generalize parser to get atom dict. Assign representative mol to give…
hwpang cd89bcd
Add fragment module for rmstest
hwpang 5459c28
Show error trace in the wild try catch block
hwpang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,11 +42,20 @@ function drawspc(spc::Species,path::String=".") | |
end | ||
end | ||
if spc.adjlist != "" | ||
mol = molecule.Molecule().from_adjacency_list(spc.adjlist) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we do this one with Species the same way you do later? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep! Done. |
||
_ , cutting_label_list = fragment.Fragment().detect_cutting_label(spc.adjlist) | ||
if isempty(cutting_label_list) | ||
mol = molecule.Molecule().from_adjacency_list(spc.adjlist) | ||
else | ||
mol = fragment.Fragment().from_adjacency_list(spc.adjlist) | ||
end | ||
elseif spc.inchi != "" | ||
mol = molecule.Molecule().from_inchi(spc.inchi) | ||
elseif spc.smiles != "" | ||
mol = molecule.Molecule().from_smiles(spc.smiles) | ||
if occursin(r"R", spc.smiles) || occursin(r"L", spc.smiles) | ||
mol = fragment.Fragment().from_smiles_like_string(spc.smiles) | ||
else | ||
mol = molecule.Molecule().from_smiles(spc.smiles) | ||
end | ||
else | ||
throw(error("no smiles or inchi for molecule $name")) | ||
end | ||
|
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.