我想打開一個GML格式文件,但無法工作。基本上,我使用名爲ChemTraYzer的代碼來生成一些與GML相關的文件,即.gml文件和一些包含所需圖片的文件夾。這裏是.gml文件:打開GML(圖形建模語言)格式文件的問題
graph [
hierarchic 1
label ""
directed 1
node [
id "C"
graphics
[
image "reac.pic/spec_0.png"
]
]
node [
id "[CH3]"
graphics
[
image "reac.pic/spec_2.png"
]
]
node [
id "O"
graphics
[
image "reac.pic/spec_1.png"
]
]
node [
id "[OH]"
graphics
[
image "reac.pic/spec_5.png"
]
]
edge [
source "C"
target "[CH3]"
weight 1
LabelGraphics
[
text "[0]"
fontSize 32
]
]
edge [
source "C"
target "O"
weight 1
LabelGraphics
[
text "[0]"
fontSize 32
]
]
edge [
source "[OH]"
target "[CH3]"
weight 1
LabelGraphics
[
text "[0]"
fontSize 32
]
]
edge [
source "[OH]"
target "O"
weight 1
LabelGraphics
[
text "[0]"
fontSize 32
]
]
]
和被叫reac.pic其中包含與此相關的GML文件中的一些圖片文件夾。
預計導出圖片類似如下:
我知道一些Python包一樣Networkx或Java程序,如Gephi也許能夠打開文件GML的要求。但是,我嘗試了很多次,但都無法成功。如果有人能幫助我,我將非常感激。非常感謝!