void CrfLoader::loadReaction (Reaction &reaction) { int i; int nreactants = _scanner.readPackedUInt(); int nproducts = _scanner.readPackedUInt(); byte flags = _scanner.readByte(); int ncatalyst = 0; if (flags & CrfFeatureFlags::CRF_CATALYST) ncatalyst = _scanner.readPackedUInt(); reaction.clear(); _bond_rc_flags = 0; _atom_stereo_flags = 0; _aam = 0; bool have_aam = (flags != 0); for (i = 0; i < nreactants; i++) { int index = reaction.addReactant(); _loadReactionMolecule(reaction, index, have_aam); } for (i = 0; i < nproducts; i++) { int index = reaction.addProduct(); _loadReactionMolecule(reaction, index, have_aam); } for (i = 0; i < ncatalyst; i++) { int index = reaction.addCatalyst(); _loadReactionMolecule(reaction, index, have_aam); } }