コード例 #1
0
ファイル: TestExamples.cs プロジェクト: roddickchen/NCDK
 public void TestInchi2InchiHydrogen()
 {
     // START SNIPPET: inchi2inchi-hydrogen
     // Input InChI with fixed-hydrogen layer
     string inchiIn = "InChI=1/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)/"
                      + "t2-/m0/s1/f/h5H";
     //
     NInchiOutput output = NInchiWrapper.GetInchiFromInchi(
         new NInchiInputInchi(inchiIn));
     string inchiOut = output.InChI;
     // Output InChI:
     //   InChI=1/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)/t2-/m0/s1
     // END SNIPPET: inchi2inchi-hydrogen
 }
コード例 #2
0
ファイル: TestExamples.cs プロジェクト: roddickchen/NCDK
 public void TestInchi2InchiCompress()
 {
     // START SNIPPET: inchi2inchi-compress
     string inchi = "InChI=1/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)";
     //
     // Compress InChI
     NInchiOutput cout = NInchiWrapper.GetInchiFromInchi(
         new NInchiInputInchi(inchi, "-compress"));
     string compressedInchi = cout.InChI;
     // compressedInchi = InChI=1/C3H7NO2/cABBCC/hB1D2A3,1EF
     //
     // Uncompress InChI
     NInchiOutput ucout = NInchiWrapper.GetInchiFromInchi(
         new NInchiInputInchi(compressedInchi));
     string uncompressedInchi = ucout.InChI;
     // uncompressedInchi = InChI=1/C3H7NO2/c1-2(4)3(5)6/h2H,4H2,1H3,(H,5,6)
     // END SNIPPET: inchi2inchi-compress
 }