Ejemplo n.º 1
0
        private SybylAtomTypeMatcher()
        {
            var stream = ResourceLoader.GetAsStream(SYBYL_ATOM_TYPE_LIST);

            factory    = AtomTypeFactory.GetInstance(stream, "owl");
            cdkMatcher = CDK.AtomTypeMatcher;
            var mapStream = ResourceLoader.GetAsStream(CDK_TO_SYBYL_MAP);

            mapper = AtomTypeMapper.GetInstance(CDK_TO_SYBYL_MAP, mapStream);
        }
Ejemplo n.º 2
0
        public override void AssertAtomTypes(IDictionary <string, int> testedAtomTypes, string[] expectedTypes, IAtomContainer mol)
        {
            Assert.AreEqual(expectedTypes.Length, mol.Atoms.Count, "The number of expected atom types is unequal to the number of atoms");
            IAtomTypeMatcher atm = GetAtomTypeMatcher(mol.Builder);

            for (int i = 0; i < expectedTypes.Length; i++)
            {
                IAtom     testedAtom = mol.Atoms[i];
                IAtomType foundType  = atm.FindMatchingAtomType(mol, testedAtom);
                AssertAtomType(testedAtomTypes, "Incorrect perception for atom " + i, expectedTypes[i], foundType);
            }
        }
Ejemplo n.º 3
0
 static ResonanceStructuresTest()
 {
     builder = CDK.Builder;
     matcher = CDK.AtomTypeMatcher;
 }
Ejemplo n.º 4
0
 static ReactionStructuresTest()
 {
     builder = CDK.Builder;
     matcher = CDK.AtomTypeMatcher;
 }
Ejemplo n.º 5
0
 private bool TestAtom(IAtomTypeMatcher matcher, IAtomContainer mol, string expectedAtType, IAtom atom)
 {
     return(expectedAtType.Equals(matcher.FindMatchingAtomType(mol, atom).AtomTypeName));
 }