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); }
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); } }
static ResonanceStructuresTest() { builder = CDK.Builder; matcher = CDK.AtomTypeMatcher; }
static ReactionStructuresTest() { builder = CDK.Builder; matcher = CDK.AtomTypeMatcher; }
private bool TestAtom(IAtomTypeMatcher matcher, IAtomContainer mol, string expectedAtType, IAtom atom) { return(expectedAtType.Equals(matcher.FindMatchingAtomType(mol, atom).AtomTypeName)); }