/// <summary> /// Author: Ryan Liang /// </summary> private void CreateInteractionList(PDB_Information PDB, double interaction_distance, bool protein_chain, bool protein_atoms, bool protein_residues, bool protein_residue_numbers, bool drug_atoms) { TableHeaderRow tableHeaderRow = new TableHeaderRow { TableSection = TableRowSection.TableHeader }; tableHeaderRow.Cells.Add(new TableHeaderCell { Text = "Distance (Å)" }); if (protein_chain) { tableHeaderRow.Cells.Add(new TableHeaderCell { Text = "Protein Chain" }); } if (protein_residue_numbers) { tableHeaderRow.Cells.Add(new TableHeaderCell { Text = "Protein Residue Number" }); } if (protein_residues) { tableHeaderRow.Cells.Add(new TableHeaderCell { Text = "Amino Acid Residue Type" }); } if (protein_atoms) { tableHeaderRow.Cells.Add(new TableHeaderCell { Text = "Amino Acid Residue Atom" }); } if (drug_atoms) { tableHeaderRow.Cells.Add(new TableHeaderCell { Text = "Drug Atom" }); } interaction_list.Rows.Add(tableHeaderRow); var DistanceAndUniprotResidueNumbers = EF_Data.GetDistanceAndUniprotResidueNumbers(PDB.PDB_File_ID, interaction_distance); Session["DistanceAndUniprotResidueNumbers"] = DistanceAndUniprotResidueNumbers; foreach (KeyValuePair <PDB_Distance, string> kvp in DistanceAndUniprotResidueNumbers) { TableRow tableRow = new TableRow(); tableRow.Cells.Add(new TableCell { Text = kvp.Key.Distance.ToString("0.00") }); if (protein_chain) { tableRow.Cells.Add(new TableCell { Text = kvp.Key.Protein_Chain }); } if (protein_residue_numbers) { tableRow.Cells.Add(new TableCell { Text = kvp.Value }); } if (protein_residues) { tableRow.Cells.Add(new TableCell { Text = kvp.Key.Protein_Residue }); } if (protein_atoms) { tableRow.Cells.Add(new TableCell { Text = kvp.Key.Protein_Atom }); } if (drug_atoms) { tableRow.Cells.Add(new TableCell { Text = kvp.Key.Compound_Atom }); } interaction_list.Rows.Add(tableRow); } }