Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the Xu index of an undirected graph or a molecule
ResourceFunction["XuIndex"][g] computes the Xu index of the graph g. | |
ResourceFunction["XuIndex"][mol] computes the Xu index of the molecule mol. |
The Xu index of a Petersen graph:
In[1]:= | ![]() |
Out[1]= | ![]() |
Compute the Xu index of a molecule:
In[2]:= | ![]() |
Out[2]= | ![]() |
Compute the Xu index of a named entity:
In[3]:= | ![]() |
Out[3]= | ![]() |
By default, hydrogens are ignored in the computation of a molecule Xu index:
In[4]:= | ![]() |
Out[4]= | ![]() |
Use IncludeHydrogens→All to account for hydrogens:
In[5]:= | ![]() |
Out[5]= | ![]() |
A list of alkanes:
In[6]:= | ![]() |
Out[6]= | ![]() |
Compute their Xu indices:
In[7]:= | ![]() |
Get their boiling points:
In[8]:= | ![]() |
The Xu indices show a strong correlation with the boiling points of alkanes. Visualize the trend:
In[9]:= | ![]() |
Out[10]= | ![]() |
Compute the correlation coefficient:
In[11]:= | ![]() |
Out[11]= | ![]() |
Generate all alkanes with 7 carbon atoms (heptanes) using the resource function AlkaneIsomers:
In[12]:= | ![]() |
Out[12]= | ![]() |
Sort the heptane isomers by their Xu index. This effectively sorts them from "most branched" to "least branched":
In[13]:= | ![]() |
Out[13]= | ![]() |
Wolfram Language 12.3 (May 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License