예제 #1
0
        public void TestExampleFile_SupportColumns()
        {
            var filename            = "NCDK.Data.MoSS.TKO.mossoutput";
            var ins                 = ResourceLoader.GetAsStream(filename);
            MoSSOutputReader reader = new MoSSOutputReader(ins);
            var moleculeSet         = new ChemObjectSet <IAtomContainer>();

            moleculeSet = reader.Read(moleculeSet);
            Assert.AreEqual(5.06, double.Parse(moleculeSet[0].GetProperty <string>("focusSupport").ToString()), 0.01);
            Assert.AreEqual(1.74, double.Parse(moleculeSet[0].GetProperty <string>("complementSupport").ToString()), 0.01);
        }
예제 #2
0
        public void TestExampleFile_MolReading()
        {
            var filename            = "NCDK.Data.MoSS.TKO.mossoutput";
            var ins                 = ResourceLoader.GetAsStream(filename);
            MoSSOutputReader reader = new MoSSOutputReader(ins);
            var moleculeSet         = new ChemObjectSet <IAtomContainer>();

            moleculeSet = reader.Read(moleculeSet);
            Assert.AreEqual(19, moleculeSet.Count);
            foreach (var mol in moleculeSet)
            {
                Assert.AreEqual(int.Parse(mol.GetProperty <string>("atomCount").ToString()), mol.Atoms.Count);
                Assert.AreEqual(int.Parse(mol.GetProperty <string>("bondCount").ToString()), mol.Bonds.Count);
            }
        }