Esempio n. 1
0
        public static string getElemComp(string tableElemComp, int indexX, int indexY, int indexZ)
        {
            string ElemCompOut;

            ElemCompOut = tableElemComp.Replace("x", indexX.ToString());
            ElemCompOut = ElemCompOut.Replace("y", indexY.ToString());
            return(ElemCompOut);
        }
Esempio n. 2
0
        public static string getElemCompFA(string tableElemComp, int indexX, int indexY, int indexZ)
        {
            string ElemCompOut;
            int    faHydrogens = (indexX - indexY) * 2;

            ElemCompOut = tableElemComp.Replace("(x-y)*2", faHydrogens.ToString());
            ElemCompOut = ElemCompOut.Replace("x", indexX.ToString());
            ElemCompOut = ElemCompOut.Replace("y", indexY.ToString());
            ElemCompOut = ElemCompOut.Replace("z", indexZ.ToString());
            ElemCompOut = ElemCompOut.Replace(" + ", "");
            ElemCompOut = ElemCompOut.Replace("*", "");
            return(ElemCompOut.ToUpper());
        }