/// <summary> /// Display the related counts /// </summary> /// <param name="rss"></param> /// public void DisplayRelatedCidCounts( RelatedStructureSearchResults rss) { int altCnt, mmpCnt, swCnt, simCnt, allMatchCnt; //MoleculeGridPageControl.Width = this.Width - 3; //MoleculeGridPageControl.Height = this.Height - MoleculeGridPageControl.Top - 3; MoleculeGridPageControl mgpc = MoleculeGridPageControl; if (mgpc.EditQueryButton.Visible) // adjust tool panel for proper display { mgpc.EditQueryButton.Visible = false; //mgpc.MarkDataButton.Visible = false; mgpc.FormattingButton.Visible = false; mgpc.AdjustToolPanelButtonSpacing(); } if (rss == null) { DisplayEmptyCidCountsGrid(); return; } altCnt = SetRelatedCidCount(AltForms, SumByDb(rss.AltCorpDbCnt, rss.AltChemblCnt)); // alternate forms mmpCnt = SetRelatedCidCount(MatchedPairs, SumByDb(rss.MmpCorpDbCnt, rss.MmpChemblCnt)); // matched pairs, no ChEMBL for now if (SmallWorldAvailable) { swCnt = SetRelatedCidCount(SmallWorld, SumByDb(rss.SwCorpDbCnt, rss.SwChemblCnt)); // SmallWorld } else { SmallWorld.Checked = false; if (MatchCountsPanel.RowCount == 5) // remove SmallWorld from the MatchCountsPanel { MatchCountsPanel.SetRow(labelControl3, 2); MatchCountsPanel.SetRow(SimilarStructure, 2); MatchCountsPanel.SetRow(labelControl6, 3); MatchCountsPanel.SetRow(AllMatches, 3); MatchCountsPanel.SetRow(SmallWorldLabel, 4); MatchCountsPanel.SetRow(SmallWorld, 4); SmallWorldLabel.Visible = SmallWorld.Visible = false; SmallWorld.Checked = false; MatchCountsPanel.RowCount = 4; } swCnt = 0; } simCnt = SetRelatedCidCount(SimilarStructure, SumByDb(rss.SimCorpDbCnt, rss.SimChemblCnt)); // similar allMatchCnt = SetRelatedCidCount(AllMatches, altCnt + mmpCnt + swCnt + simCnt); // total SetRelatedCidCount(CorpDB, rss.CorpDbCnt); // these values don't change during life of search results SetRelatedCidCount(ChemblDB, rss.ChemblCnt); return; }