RuleWorld / nfsim

A general-purpose, stochastic, biochemical reaction simulator for large reaction networks
http://michaelsneddon.net/nfsim/
MIT License
14 stars 9 forks source link

Error when reconnecting internal bonds #34

Open cvmbb opened 1 year ago

cvmbb commented 1 year ago

Hi,

first of all, thanks for maintaining this very nice code! When using internal bonds we experienced some issue when reconnecting those bonds.

"Error in Molecule::breadthFirstSearch, m is null. Likely an internal error where a MappingSet is on a list and is not actually mapped to any molecule!"

Looking into the code, the Molecule object seems to be a null pointer for some cases, which leads to crashes (e.g. when calling traverseBondedNeighborhood). However, the reason for that is unclear to me.

A minimal working example bng file is attached. Perhaps you have some ideas here? The issue may be related to this bug.

mwe.bngl.txt

Kind regards, Chris

ASinanSaglam commented 1 year ago

I will take a look at this very soon, sorry for the delay and thank you for reporting!