Liez le graphe de connectivité d'une molécule
Des graphes et des réseaux prêts à l'emploi provenant de collections référencées, incluant ChemicalData.
La structure basique pour la caféine.
In[1]:=
![Click for copyable input](assets.fr/bond-connectivity-graph-of-a-molecule/In_27.png)
ChemicalData["Caffeine", "StructureGraph"]
Out[1]=
![](assets.fr/bond-connectivity-graph-of-a-molecule/O_22.png)
Affichez deux structures de molécules d'acide.
In[2]:=
![Click for copyable input](assets.fr/bond-connectivity-graph-of-a-molecule/In_28.png)
ChemicalData[#, "StructureGraph"] & /@ {"NEthylmethylamine",
"Propylamine"}
Out[2]=
![](assets.fr/bond-connectivity-graph-of-a-molecule/O_23.png)
Testez si deux graphes sont isomorphes.
In[3]:=
![Click for copyable input](assets.fr/bond-connectivity-graph-of-a-molecule/In_29.png)
ChemicalData[#, "StructureGraph"] & /@ {"NEthylmethylamine",
"Propylamine"};
IsomorphicGraphQ @@ %
Out[3]=
![](assets.fr/bond-connectivity-graph-of-a-molecule/O_24.png)