Example #1
0
        /// <summary>
        /// SimplifyMolfileForInChIGeneration
        /// </summary>
        /// <param name="molfile"></param>
        /// <returns></returns>

        //static string SimplifyMolfileForInChIGeneration(string molfile)
        //{
        //	string smiles = CdkMol.StructureConverter.MolfileStringToSmilesString(molfile); // convert to smiles
        //	string molfile2 = CdkMol.StructureConverter.SmilesStringToMolfileString(smiles); // and back to V2000 molfile without Sgroups
        //	return molfile2;
        //}

        /// <summary>
        /// IsAcceptableInchiStatus
        /// </summary>
        /// <param name="ig"></param>
        /// <returns></returns>

        static bool IsAcceptableInchiStatus(InChIGenerator ig)
        {
            INCHI_RET inchiStatus = ig.getReturnStatus();

            if (inchiStatus == INCHI_RET.OKAY)
            {
                return(true);
            }

            string msg     = ig.getMessage();
            string log     = ig.getLog();
            string auxInfo = ig.getAuxInfo();

            if (inchiStatus == INCHI_RET.WARNING)
            {
                return(true);
            }

            else
            {
                return(false);
            }
        }