Exemplo n.º 1
0
        /// <inheritdoc/>
        /// <param name="targetMolecule">targetMolecule graph</param>
        public bool HasMap(TargetProperties targetMolecule)
        {
            IState state = new VFState(query, targetMolecule);

            maps.Clear();
            return(MapFirst(state));
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        /// <param name="targetMolecule">targetMolecule graph</param>
        public bool HasMap(IAtomContainer targetMolecule)
        {
            IState state = new VFState(query, new TargetProperties(targetMolecule));

            maps.Clear();
            return(MapFirst(state));
        }
Exemplo n.º 3
0
        public int CountMaps(TargetProperties targetMolecule)
        {
            IState state = new VFState(query, targetMolecule);

            maps.Clear();
            MapAll(state);
            return(maps.Count);
        }
Exemplo n.º 4
0
        public IReadOnlyDictionary <INode, IAtom> GetFirstMap(TargetProperties targetMolecule)
        {
            IState state = new VFState(query, targetMolecule);

            maps.Clear();
            MapFirst(state);
            return(maps.Count == 0 ? new Dictionary <INode, IAtom>() : maps[0]);
        }
Exemplo n.º 5
0
        public IReadOnlyList <IReadOnlyDictionary <INode, IAtom> > GetMaps(TargetProperties targetMolecule)
        {
            IState state = new VFState(query, targetMolecule);

            maps.Clear();
            MapAll(state);
            return(new List <IReadOnlyDictionary <INode, IAtom> >(maps));
        }
Exemplo n.º 6
0
        public int CountMaps(IAtomContainer target)
        {
            IState state = new VFState(query, new TargetProperties(target));

            maps.Clear();
            MapAll(state);
            return(maps.Count);
        }
Exemplo n.º 7
0
        public IReadOnlyDictionary <INode, IAtom> GetFirstMap(IAtomContainer target)
        {
            IState state = new VFState(query, new TargetProperties(target));

            maps.Clear();
            MapFirst(state);
            return(maps.Count == 0 ? new Dictionary <INode, IAtom>() : maps[0]);
        }
Exemplo n.º 8
0
        public IReadOnlyList <IReadOnlyDictionary <INode, IAtom> > GetMaps(IAtomContainer target)
        {
            IState state = new VFState(query, new TargetProperties(target));

            maps.Clear();
            MapAll(state);
            return(new List <IReadOnlyDictionary <INode, IAtom> >(maps));
        }
Exemplo n.º 9
0
        private VFState(VFState state, Match match)
        {
            this.candidates = new List <Match>();
            this.queryPath  = new List <INode>(state.queryPath);
            this.targetPath = new List <IAtom>(state.targetPath);

            this.map    = state.map;
            this.query  = state.query;
            this.target = state.target;

            map[match.QueryNode] = match.TargetAtom;
            queryPath.Add(match.QueryNode);

            targetPath.Add(match.TargetAtom);
            LoadCandidates(match);
        }