Exemple #1
0
 public CompositeCompound(string type, string sumCompTemplate, string molCompTemplate, string toDeleteInMolComp, string compositionTemplate, string r1Name, string r2Name, string r3Name, string r4Name, int x, int y, int z)
 {
     Type        = type;
     SumComp     = ExtractInfo.getName(sumCompTemplate, x, y, z);
     MolComp     = getMolComp(molCompTemplate, toDeleteInMolComp, r1Name, r2Name, r3Name, r4Name);
     Composition = ExtractInfo.getElemCompFA(compositionTemplate, x, y, z);
 }
Exemple #2
0
 public BuildingBlock(string type, string nameTemplate, string compositionTemplate, int x, int y, int z)
 {
     Type        = type;
     Name        = ExtractInfo.getName(nameTemplate, x, y, z);               // make the name (nameTemplate, x, y, z)
     Composition = ExtractInfo.getElemCompFA(compositionTemplate, x, y, z);; // make the composition (compositionTemplate, x, y, z)
     X           = x;
     Y           = y;
     Z           = z;
     // Mass = ExtractInfo.computeMass(Composition, x, y, z);
 }
Exemple #3
0
        public BuildingBlockList(string tableCompType, string tableCompName, string tableElemComp, string tableX, string tableY, string tableZ)
        {
            List <int> xRanges = ExtractInfo.findIndex(tableX, 0, 0);

            foreach (int x in xRanges)
            {
                List <int> yRanges = ExtractInfo.findIndex(tableY, x, 0);
                foreach (int y in yRanges)
                {
                    List <int> zRanges = ExtractInfo.findIndex(tableZ, x, y);
                    foreach (int z in zRanges)
                    {
                        this.Add(new BuildingBlock(tableCompType, tableCompName, tableElemComp, x, y, z));
                    }
                }
            }
        }
Exemple #4
0
        public string getMolComp(string molCompTemplate, string toDeleteInMolComp, string r1Name, string r2Name, string r3Name, string r4Name)
        {
            string tempMolComp = ExtractInfo.getMolComp(molCompTemplate, r1Name, r2Name, r3Name, r4Name);

            return(tempMolComp = tempMolComp.Replace(toDeleteInMolComp, ""));
        }