Fixed a bug when getMoleculeB is invalid in SNRP