public void TestGetAllAtomContainers_IChemModel_WithReactions() { var filename = "NCDK.Data.MDL.0024.stg02.rxn"; Trace.TraceInformation("Testing: " + filename); var ins = ResourceLoader.GetAsStream(filename); MDLRXNV2000Reader reader = new MDLRXNV2000Reader(ins, ChemObjectReaderMode.Strict); ChemModel chemFile = (ChemModel)reader.Read((ChemObject) new ChemModel()); Assert.IsNotNull(chemFile); var containersList = ChemModelManipulator.GetAllAtomContainers(chemFile); Assert.AreEqual(2, containersList.Count()); }
public void TestBug1851202() { string filename1 = "NCDK.Data.MDL.0002.stg01.rxn"; Trace.TraceInformation("Testing: " + filename1); var ins1 = ResourceLoader.GetAsStream(filename1); MDLRXNV2000Reader reader = new MDLRXNV2000Reader(ins1, ChemObjectReaderMode.Strict); IReaction reaction = (IReaction)reader.Read(builder.NewReaction()); Assert.IsNotNull(reaction); IAtomContainer reactant = reaction.Reactants[0]; IAtomContainer product = reaction.Products[0]; Fingerprinter fingerprinter = new Fingerprinter(64 * 26, 8); Assert.IsNotNull(fingerprinter.GetBitFingerprint(reactant)); Assert.IsNotNull(fingerprinter.GetBitFingerprint(product)); }