Skip to content

Commit

Permalink
cleaned up and moved wildcard fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ASinanSaglam committed Aug 5, 2022
1 parent e7953a7 commit 29c3499
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions bng2/Perl2/RxnRule.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2290,31 +2290,10 @@ sub findMap
#printf "Component %s changed state from %s to %s\n", $pR, $stateR, $stateP;
push @{$rr->CompStateChange}, [ ($pR, $stateR, $stateP) ];
}
}
}

## AS-2022
# Disallow wildcard breaking
foreach my $imR ( 0 .. $#{$rg->Molecules} )
{
my $imP = $map->MapF->{$imR};
next unless ( $imP >= 0 );

# grab components
my $componentsR = $rg->Molecules->[$imR]->Components;
my $componentsP = $pg->Molecules->[$imP]->Components;

my $wildcard_cntR = 0;
my $wildcard_cntP = 0;
# loop over components
foreach my $icR ( 0 .. $#{$componentsR} )
{
# get product component index
my ( $imP, $icP ) = split (/\./, $map->MapF->{"$imR.$icR"});

# Get reactant and product edge
# as above, we assume that the wildcard is the only
# possible edge for a component
# AS-2022
# Get reactant and product edge as stated above, we assume that the wildcard is the only
# possible edge for a component. This should be enforced somewhere else.
my $edgeR = $componentsR->[$icR]->Edges->[0];
my $edgeP = $componentsP->[$icP]->Edges->[0];

Expand All @@ -2329,10 +2308,9 @@ sub findMap
);
}
}

# AS-2022
}
}
## AS-2022

# Compartment changes:
#
Expand Down

0 comments on commit 29c3499

Please sign in to comment.