Пример #1
0
        /// <summary>
        /// Execute CDK ECFP4 search
        /// </summary>
        /// <param name="eqp"></param>

        void ExecuteECFP4Search(
            ExecuteQueryParms eqp)
        {
            CdkSimSearchMx dao = Ecfp4Dao;

            if (!CdkSimSearchMx.IsSearchingAvailable())
            {
                throw new UserQueryException("ECFP4 searching is not currently available.");
            }

            Query      q  = eqp.QueryTable.Query;
            QueryTable qt = eqp.QueryTable;
            MetaTable  mt = qt.MetaTable;

            if (dao == null)             // if Dao not allocated then allocate Dao & execute the search
            {
                dao = Ecfp4Dao = new CdkSimSearchMx();
                dao.KeysToExclude = q.KeysToExclude;

                if (eqp.SearchKeySubset != null)
                {
                    dao.SearchKeySubset = new HashSet <string>(eqp.SearchKeySubset);
                }

                string databases = mt.Name + "," + mt.Label;                  // quick/dirty DB Id

                List <StructSearchMatch> hits = dao.ExecuteSearch(Pssc.Molecule.GetMolfileString(), databases, FingerprintType.Circular, Pssc.MinimumSimilarity, Pssc.MaxSimHits);
                VoLength = 1;
                if (qt.GetSelectedMolsimQueryColumn() != null)
                {
                    VoLength = 2;
                }
            }

            BuildECFP4QueryEngineRows(eqp);             // build the QE row set (filtered)

            return;
        }