Skip to content

Commit

Permalink
updating validation, removing a compare block
Browse files Browse the repository at this point in the history
  • Loading branch information
ASinanSaglam committed Jul 2, 2021
1 parent 23c62c5 commit 6ad158d
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 34 deletions.
64 changes: 32 additions & 32 deletions src/NFreactions/reactions/reaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ bool BasicRxnClass::tryToAdd(Molecule *m, unsigned int reactantPos)
}
}

//Here we get the standard update...
// Here we get the standard update...
// if(m->getRxnListMappingId(rxnIndex)>=0)
// {
// if(!reactantTemplates[reactantPos]->compare(m)) {
Expand All @@ -343,37 +343,37 @@ bool BasicRxnClass::tryToAdd(Molecule *m, unsigned int reactantPos)
// not change its position if the molecule still matches with the template.
// This will prevent the simulation trajectory being dependent on whether
// reaction-molecules pairs with unchanged membership are checked or not.
if (connectivityFlag) {
if(m->getRxnListMappingId(rxnIndex)>=0)
{
// Insted of removing the mappingSet
// and then getting a different clean one from the reactant list,
// get the mapping set corresponding to the molecule
ms = rl->getWriteableMappingSet(m->getRxnListMappingId(rxnIndex));
// and clear it before use.
ms->clear();
// If the molecule matches again,
// the mappingSet gets updated during the compare routine.
// If the molecule does not match anymore, remove the mapping set
// and remove the rxn form the molecule's reaction membership.
if(!reactantTemplates[reactantPos]->compare(m,rl,ms)) {
rl->removeMappingSet(ms->getId());
m->setRxnListMappingId(rxnIndex,Molecule::NOT_IN_RXN);
}
// case when the molecule is not in the reaction
} else {
// Get a clean mappingSet from the reactantList
// typically from the end: see the code for pusNextAvailableMappingSet()
ms = rl->pushNextAvailableMappingSet();
if(!reactantTemplates[reactantPos]->compare(m,rl,ms)) {
//we must remove, if we did not match. This will also remove
//everything that was cloned off of the mapping set
rl->removeMappingSet(ms->getId());
} else {
m->setRxnListMappingId(rxnIndex,ms->getId());
}
}
}
// if (connectivityFlag) {
// if(m->getRxnListMappingId(rxnIndex)>=0)
// {
// // Insted of removing the mappingSet
// // and then getting a different clean one from the reactant list,
// // get the mapping set corresponding to the molecule
// ms = rl->getWriteableMappingSet(m->getRxnListMappingId(rxnIndex));
// // and clear it before use.
// ms->clear();
// // If the molecule matches again,
// // the mappingSet gets updated during the compare routine.
// // If the molecule does not match anymore, remove the mapping set
// // and remove the rxn form the molecule's reaction membership.
// if(!reactantTemplates[reactantPos]->compare(m,rl,ms)) {
// rl->removeMappingSet(ms->getId());
// m->setRxnListMappingId(rxnIndex,Molecule::NOT_IN_RXN);
// }
// // case when the molecule is not in the reaction
// } else {
// // Get a clean mappingSet from the reactantList
// // typically from the end: see the code for pusNextAvailableMappingSet()
// ms = rl->pushNextAvailableMappingSet();
// if(!reactantTemplates[reactantPos]->compare(m,rl,ms)) {
// //we must remove, if we did not match. This will also remove
// //everything that was cloned off of the mapping set
// rl->removeMappingSet(ms->getId());
// } else {
// m->setRxnListMappingId(rxnIndex,ms->getId());
// }
// }
// }

//Here we get the standard update...
while(m->getRxnListMappingId(rxnIndex)>=0) {
Expand Down
2 changes: 1 addition & 1 deletion validate/basicModels/r20.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
connectivity testing, simple binding, unbinding, and phosphorylation system
-sim 100 -oSteps 100 -connect -rxnlog v20_rxns.tsv -trackconnected -printconnected -printmoltypes -printrxncounts
-sim 100 -oSteps 100 -connect -rxnlog basicModels/v20_rxns.tsv -trackconnected -printconnected -printmoltypes -printrxncounts
2 changes: 1 addition & 1 deletion validate/basicModels/r21.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
connectivity testing, mRNA monomer model
-sim 100 -oSteps 100 -connect -rxnlog v20_rxns.tsv -utl 3 -gml 1000000 -trackconnected -printconnected -printmoltypes -printrxncounts
-sim 10 -oSteps 100 -connect -rxnlog basicModels/v21_rxns.tsv -utl 3 -gml 1000000 -trackconnected -printconnected -printmoltypes -printrxncounts
Binary file removed validate/bionetgen-2.2.6.tar.bz2
Binary file not shown.

0 comments on commit 6ad158d

Please sign in to comment.