Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get a molecule plot with atoms or bonds colored according to property values
ResourceFunction["MoleculeValuePlot"][mol,property] returns a molecule plot highlighted with colors corrsponding to property. |
| ColorFunction | Automatic | how to determine the coloring of atoms and bonds |
| ColorFunctionScaling | True | whether to scale numeric arguments to ColorFunction |
| "ExclusionFunction" | (False &) | function to determine which property values to exclude from the resulting plot |
Color each atom according to its partial charge:
| In[1]:= |
| Out[1]= | ![]() |
Exclude hydrogen atoms from the plot:
| In[2]:= |
| Out[2]= | ![]() |
Color atoms according to their hybridization:
| In[3]:= |
| Out[3]= | ![]() |
Color bonds according to their bond type:
| In[4]:= |
| Out[4]= | ![]() |
The atom and bond properties can be accessed via MoleculeValue and EntityProperties:
| In[5]:= |
| Out[5]= | ![]() |
| In[6]:= |
| Out[6]= | ![]() |
Label atoms by their phase at standard temperature and pressure:
| In[7]:= |
| Out[3]= | ![]() |
Specify an alternate color function for numeric data:
| In[8]:= | ![]() |
| Out[8]= | ![]() |
Specify an alternate color function for discrete data:
| In[9]:= | ![]() |
| Out[9]= | ![]() |
When some values are missing, the data is treated as discrete rather than numeric:
| In[10]:= | ![]() |
| Out[10]= | ![]() |
Use MissingQ to exclude missing values:
| In[11]:= | ![]() |
| Out[11]= | ![]() |
Disable plotting explicit hydrogen atoms:
| In[12]:= |
| Out[12]= | ![]() |
Pass options directly to the legend:
| In[13]:= | ![]() |
| Out[13]= | ![]() |
Label atoms by their chirality, using the "ExclusionFunction" option to make sure achiral atoms are not labeled:
| In[15]:= | ![]() |
| Out[15]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License