% identify which candidateH is shared with other, only them are considered later for cross product indentifySharedHs(PosEIs,CandidateSharedHs):- tell('candidateH.pl'), %tell('grammar_candidateH.pl'), genAll(PosEIs,AllTs,TotalNum),%genAll_EIsigned(PosEIs,AllTs,TotalNum), write('%Total is '), write(TotalNum),nl, %print_list(AllTs),nl, told, consult('candidateH2.pl'), %consult('grammar_candidateH.pl'), %tell('tomatoCountedResult.pl'), rb_new(Tree0), reverse(PosEIs,PosEIsReversedOrder), insertTheories(PosEIsReversedOrder,Tree0,Tree), % insertTheories(AllTs,Tree0,Tree) *** be careful about the function you are using %scoreAll(AllTs,Tree,ScoredEIsTs). rb_visit(Tree,T_EITIs),%print_list(T_EITIs), maplist(identifySharedControlRections,T_EITIs). %indentifySharedControlRections([met-Record]-EITIs):-!. % do nothing %indentifySharedControlRections([rs-{RID,substrateLimiting,Change,Time}]-EITIs):-!. identifySharedControlRections([rs-{RID,enzymeLimiting,Change,Time}]-EITIs):- ti_GroupedByEI(EITIs,EIs), length(EIs,EINum),EINum>1,!, asserta(). identifySharedControlRections(ClaID-EITIs). % do nothing % ti_GroupedByEI([],[]). ti_GroupedByEI([EI-TI|Record],EIs):- ti_GroupedByEI(Record,PreEIs), (PreEIs=[EI-TIs|Rest] -> EIs=[EI-[TI|TIs]|Rest]; EIs=[EI-[TI]|PreEIs] ). score for substrate limiting -- preference on non-reversible direction. -- preference on noChange? otherwise, I can simply count the length