|
39 | 39 | Label,
|
40 | 40 | Loading,
|
41 | 41 | cite_me,
|
42 |
| - get_data_list, |
| 42 | + get_table, |
43 | 43 | get_tooltip,
|
44 | 44 | )
|
45 | 45 |
|
@@ -786,10 +786,10 @@ def get_valences(struct):
|
786 | 786 | unknown_sites = []
|
787 | 787 |
|
788 | 788 | for index, wyckoff in zip(inequivalent_indices, wyckoffs):
|
789 |
| - datalist = { |
790 |
| - "Site": unicodeify_species(struct[index].species_string), |
791 |
| - "Wyckoff Label": wyckoff, |
792 |
| - } |
| 789 | + datalist = [ |
| 790 | + ["Site", unicodeify_species(struct[index].species_string)], |
| 791 | + ["Wyckoff Label", wyckoff], |
| 792 | + ] |
793 | 793 |
|
794 | 794 | if not lse.neighbors_sets[index]:
|
795 | 795 | unknown_sites.append(f"{struct[index].species_string} ({wyckoff})")
|
@@ -822,24 +822,27 @@ def get_valences(struct):
|
822 | 822 | if co.alternative_names:
|
823 | 823 | name += f" (also known as {', '.join(co.alternative_names)})"
|
824 | 824 |
|
825 |
| - datalist.update( |
826 |
| - { |
827 |
| - "Environment": name, |
828 |
| - "IUPAC Symbol": co.IUPAC_symbol_str, |
829 |
| - get_tooltip( |
830 |
| - "CSM", |
831 |
| - "The continuous symmetry measure (CSM) describes the similarity to an " |
832 |
| - "ideal coordination environment. It can be understood as a 'distance' to " |
833 |
| - "a shape and ranges from 0 to 100 in which 0 corresponds to a " |
834 |
| - "coordination environment that is exactly identical to the ideal one. A " |
835 |
| - "CSM larger than 5.0 already indicates a relatively strong distortion of " |
836 |
| - "the investigated coordination environment.", |
837 |
| - ): f"{env[0]['csm']:.2f}", |
838 |
| - "Interactive View": view, |
839 |
| - } |
| 825 | + datalist.extend( |
| 826 | + [ |
| 827 | + ["Environment", name], |
| 828 | + ["IUPAC Symbol", co.IUPAC_symbol_str], |
| 829 | + [ |
| 830 | + get_tooltip( |
| 831 | + "CSM", |
| 832 | + "The continuous symmetry measure (CSM) describes the similarity to an " |
| 833 | + "ideal coordination environment. It can be understood as a 'distance' to " |
| 834 | + "a shape and ranges from 0 to 100 in which 0 corresponds to a " |
| 835 | + "coordination environment that is exactly identical to the ideal one. A " |
| 836 | + "CSM larger than 5.0 already indicates a relatively strong distortion of " |
| 837 | + "the investigated coordination environment.", |
| 838 | + ), |
| 839 | + f"{env[0]['csm']:.2f}", |
| 840 | + ], |
| 841 | + ["Interactive View", view], |
| 842 | + ] |
840 | 843 | )
|
841 | 844 |
|
842 |
| - envs.append(get_data_list(datalist)) |
| 845 | + envs.append(get_table(rows=datalist)) |
843 | 846 |
|
844 | 847 | # TODO: switch to tiles?
|
845 | 848 | envs_grouped = [envs[i : i + 2] for i in range(0, len(envs), 2)]
|
|
0 commit comments