Cluster Molecules Based on Their Properties
Load acids from ChemicalData and extract their formulas and some properties.
In[1]:=
![Click for copyable input](assets.en/cluster-molecules-based-on-their-properties/In_27.png)
acids = Take[ChemicalData["Acids"], {3, 18}]
Out[1]=
![](assets.en/cluster-molecules-based-on-their-properties/O_20.png)
In[2]:=
![Click for copyable input](assets.en/cluster-molecules-based-on-their-properties/In_28.png)
properties =
Outer[ChemicalData, acids, {"MolarMass", "MeltingPoint"}, 1]
Out[2]=
![](assets.en/cluster-molecules-based-on-their-properties/O_21.png)
In[3]:=
![Click for copyable input](assets.en/cluster-molecules-based-on-their-properties/In_29.png)
formulas = ChemicalData[#, "Formula"] & /@ acids
Out[3]=
![](assets.en/cluster-molecules-based-on-their-properties/O_22.png)
Visualize the hierarchical cluster of the acids based on their properties.
In[4]:=
![Click for copyable input](assets.en/cluster-molecules-based-on-their-properties/In_30.png)
ClusteringTree[properties -> formulas]
Out[4]=
![](assets.en/cluster-molecules-based-on-their-properties/O_23.png)