Пример #1
0
 static IAtomContainer ParseInChI(string inchi)
 {
     try
     {
         var structure = InChIToStructure.FromInChI(inchi);
         if (structure.ReturnStatus == InChIReturnCode.Ok)
         {
             return(structure.AtomContainer);
         }
     }
     catch (Exception)
     {
     }
     return(null);
 }
Пример #2
0
 public static IAtomContainer MolFromInChI(string inchi)
 {
     try
     {
         var mol = InChIToStructure.FromInChI(inchi);
         if (mol.ReturnStatus > InChIReturnCode.Warning)
         {
             throw new Exception(mol.Message);
         }
         return(mol.AtomContainer);
     }
     catch (Exception)
     {
     }
     return(null);
 }