Esempio n. 1
0
        public void TestReadAtomTypes_CDK()
        {
            OWLAtomTypeReader reader = new OWLAtomTypeReader(new StringReader(OWL_CONTENT));

            Assert.IsNotNull(reader);
            var types = reader.ReadAtomTypes();

            Assert.IsNotNull(types);
            Assert.AreEqual(1, types.Count);

            object obj = types[0];

            Assert.IsNotNull(obj);
            Assert.IsTrue(obj is IAtomType);
            IAtomType atomType = (IAtomType)obj;

            Assert.AreEqual("C", atomType.Symbol);
            Assert.AreEqual("C.sp3.0", atomType.AtomTypeName);
            Assert.AreEqual(0, atomType.FormalCharge.Value);
            Assert.AreEqual(Hybridization.SP3, atomType.Hybridization);
            Assert.AreEqual(4, atomType.FormalNeighbourCount.Value);
            Assert.AreEqual(0, atomType.GetProperty <int>(CDKPropertyName.LonePairCount));
            Assert.AreEqual(0, atomType.GetProperty <int>(CDKPropertyName.PiBondCount));
            Assert.AreEqual(0, atomType.GetProperty <int>(CDKPropertyName.SingleElectronCount));
        }
Esempio n. 2
0
        public void TestReadAtomTypes_IChemObjectBuilder()
        {
            OWLAtomTypeReader reader = new OWLAtomTypeReader(new StringReader(OWL_CONTENT));

            Assert.IsNotNull(reader);
            var types = reader.ReadAtomTypes();

            Assert.IsNotNull(types);
            Assert.AreEqual(1, types.Count);
        }
Esempio n. 3
0
        public void TestAtomTypeReader_Reader()
        {
            OWLAtomTypeReader reader = new OWLAtomTypeReader(new StringReader(""));

            Assert.IsNotNull(reader);
        }