Skip to content
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

forwarding variable smiles to get_expanded_groups to avoid "variable not found error" #15

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

thomvet
Copy link
Contributor

@thomvet thomvet commented Aug 29, 2024

Running:
f = get_groups_from_smiles("C1OCOCO1", UNIFACGroups) #1,3,5-trioxane

Results in:

ERROR: UndefVarError: `smiles` not defined
Stacktrace:
 [1] get_expanded_groups(mol::MolecularGraph.SMILESMolGraph, groups::Vector{GCPair}, atoms::UnitRange{Int64}, __bonds::Vector{Tuple{Int64, Int64}}, check::Bool)
   @ GCIdentifier C:\Users\thvt\.julia\packages\GCIdentifier\zQuz2\src\group_search.jl:258
 [2] _get_groups_from_smiles(smiles::String, groups::Vector{GCPair}, connectivity::Bool, check::Bool)
   @ GCIdentifier C:\Users\thvt\.julia\packages\GCIdentifier\zQuz2\src\group_search.jl:146
 [3] get_groups_from_smiles(smiles::String, groups::Vector{GCPair}; connectivity::Bool, check::Bool)
   @ GCIdentifier C:\Users\thvt\.julia\packages\GCIdentifier\zQuz2\src\group_search.jl:112
 [4] get_groups_from_smiles(smiles::String, groups::Vector{GCPair})
   @ GCIdentifier C:\Users\thvt\.julia\packages\GCIdentifier\zQuz2\src\group_search.jl:110
 [5] top-level scope
   @ REPL[163]:1

Because the variable smiles is not passed on to get_expanded_groups(), but the function tries to raise an error that accesses this variable.

This small PR fixes the issue in the simplest possible way, i.e., by adding the variable smiles as an argument to the get_expanded_groups() function.

@longemen3000
Copy link
Member

Great!

@longemen3000 longemen3000 merged commit 74285dd into ClapeyronThermo:main Aug 29, 2024
10 checks passed
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.

2 participants