Skip to main content
Tweeted twitter.com/StackMma/status/948717227829858304
Can't reproduce, tried again.
Source Link
Aster
  • 3.9k
  • 1
  • 22
  • 45
del=DeleteDuplicates@raw(*del=DeleteDuplicates@raw*)
del={{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"O",1}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"C",1}<->{"C",2},{"O",1}<->{"C",1},{"H",4}<->{"O",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"O",1}<->{"C",1},{"O",1}<->{"C",1},{"H",4}<->{"C",2}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"O",1},{"H",3}<->{"C",2},{"C",2}<->{"C",1},{"H",4}<->{"C",2}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"C",1}<->{"O",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",2},{"H",4}<->{"C",2}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",2}},{{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",2},{"C",1}<->{"C",2},{"O",1}<->{"C",1},{"H",4}<->{"O",1}},{{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",1}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"H",3}<->{"C",2},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"O",1}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",2}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"H",3}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"C",2}<->{"O",1},{"H",4}<->{"C",2}}}
show=Graph[#, GraphLayout->"SpringEmbedding",
  VertexStyle->{{"C",_}->Lighter[Black],{"O",_}->Lighter[Red],{"H",_}->LightBlue,{"N",_}-> Lighter[Blue]},
  EdgeStyle-> Darker@Green,VertexSize->{{"C",_}->0.7,{"O",_}->0.5,{"H",_}->0.4,{"N",_}->0.6}, 
  ImageSize->{210,200}]&;
Multicolumn@DeleteDuplicates[show/@raw]@del]

Edit:

I don't know why you can't reproduce this.

I restarted my Kernels and got the same results.

enter image description here

$Version
show=Graph[#,GraphLayout->"SpringEmbedding",
    VertexStyle->{{"C",_}->Lighter[Black],{"O",_}->Lighter[Red],{"H",_}->LightBlue,{"N",_}->Lighter[Blue]},
    EdgeStyle->Darker@Green,VertexSize->{{"C",_}->0.7,{"O",_}->0.5,{"H",_}->0.4,{"N",_}->0.6},
    ImageSize->{210,200}]&;
del={
    {{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},
    {{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},
    {{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}}
};
Quiet@DeleteDuplicatesBy[show/@del,CanonicalGraph]
DeleteDuplicatesBy[show/@del,IsomorphicGraphQ]

These are {1,2,5} of last del.

If still have problems I may need to reinstall my Mathematica :).

del=DeleteDuplicates@raw
del={{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"O",1}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"C",1}<->{"C",2},{"O",1}<->{"C",1},{"H",4}<->{"O",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"O",1}<->{"C",1},{"O",1}<->{"C",1},{"H",4}<->{"C",2}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"O",1},{"H",3}<->{"C",2},{"C",2}<->{"C",1},{"H",4}<->{"C",2}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"C",1}<->{"O",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",2},{"H",4}<->{"C",2}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",2}},{{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",2},{"C",1}<->{"C",2},{"O",1}<->{"C",1},{"H",4}<->{"O",1}},{{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",1}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"H",3}<->{"C",2},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"O",1}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",2}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"H",3}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"C",2}<->{"O",1},{"H",4}<->{"C",2}}}
show=Graph[#, GraphLayout->"SpringEmbedding",
  VertexStyle->{{"C",_}->Lighter[Black],{"O",_}->Lighter[Red],{"H",_}->LightBlue,{"N",_}-> Lighter[Blue]},
  EdgeStyle-> Darker@Green,VertexSize->{{"C",_}->0.7,{"O",_}->0.5,{"H",_}->0.4,{"N",_}->0.6}, 
  ImageSize->{210,200}]&;
Multicolumn@DeleteDuplicates[show/@raw]
(*del=DeleteDuplicates@raw*)
del={{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"O",1}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"C",1}<->{"C",2},{"O",1}<->{"C",1},{"H",4}<->{"O",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"O",1}<->{"C",1},{"O",1}<->{"C",1},{"H",4}<->{"C",2}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"O",1},{"H",3}<->{"C",2},{"C",2}<->{"C",1},{"H",4}<->{"C",2}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"C",1}<->{"O",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",2},{"H",4}<->{"C",2}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",2}},{{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",2},{"C",1}<->{"C",2},{"O",1}<->{"C",1},{"H",4}<->{"O",1}},{{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",1}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"H",3}<->{"C",2},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"O",1}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",2}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"H",3}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"C",2}<->{"O",1},{"H",4}<->{"C",2}}}
show=Graph[#, GraphLayout->"SpringEmbedding",
  VertexStyle->{{"C",_}->Lighter[Black],{"O",_}->Lighter[Red],{"H",_}->LightBlue,{"N",_}-> Lighter[Blue]},
  EdgeStyle-> Darker@Green,VertexSize->{{"C",_}->0.7,{"O",_}->0.5,{"H",_}->0.4,{"N",_}->0.6}, 
  ImageSize->{210,200}]&;
Multicolumn@DeleteDuplicates[show/@del]

Edit:

I don't know why you can't reproduce this.

I restarted my Kernels and got the same results.

enter image description here

$Version
show=Graph[#,GraphLayout->"SpringEmbedding",
    VertexStyle->{{"C",_}->Lighter[Black],{"O",_}->Lighter[Red],{"H",_}->LightBlue,{"N",_}->Lighter[Blue]},
    EdgeStyle->Darker@Green,VertexSize->{{"C",_}->0.7,{"O",_}->0.5,{"H",_}->0.4,{"N",_}->0.6},
    ImageSize->{210,200}]&;
del={
    {{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},
    {{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},
    {{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}}
};
Quiet@DeleteDuplicatesBy[show/@del,CanonicalGraph]
DeleteDuplicatesBy[show/@del,IsomorphicGraphQ]

These are {1,2,5} of last del.

If still have problems I may need to reinstall my Mathematica :).

Source Link
Aster
  • 3.9k
  • 1
  • 22
  • 45

Delete duplicates of isomerism

I written some code to generate all partens of $\ \mathrm{C_2H_5O}$, but theres some isomerisms need to be deleted.

Here's the raw output after DeleteDuplicates.

del=DeleteDuplicates@raw
del={{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"H",2}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"O",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"O",1}<->{"C",2},{"C",1}<->{"O",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"C",1}<->{"C",2},{"O",1}<->{"C",1},{"H",4}<->{"O",1}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"O",1}<->{"C",1},{"O",1}<->{"C",1},{"H",4}<->{"C",2}},{{"C",2}<->{"C",1},{"H",1}<->{"C",2},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",1}},{{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"O",1}<->{"C",2},{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"H",3}<->{"C",2},{"H",4}<->{"C",1}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"O",1},{"H",3}<->{"C",2},{"C",2}<->{"C",1},{"H",4}<->{"C",2}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"C",1}<->{"O",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",2},{"H",4}<->{"C",2}},{{"O",1}<->{"C",1},{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",2}},{{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"H",3}<->{"C",2},{"C",1}<->{"C",2},{"O",1}<->{"C",1},{"H",4}<->{"O",1}},{{"H",1}<->{"C",1},{"C",2}<->{"C",1},{"H",2}<->{"C",2},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",1}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"H",3}<->{"C",2},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",4}<->{"O",1}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"C",2}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"H",3}<->{"O",1},{"H",4}<->{"C",2}},{{"H",1}<->{"C",1},{"H",2}<->{"C",1},{"H",3}<->{"C",1},{"C",2}<->{"C",1},{"O",1}<->{"C",2},{"C",2}<->{"O",1},{"H",4}<->{"C",2}}}
show=Graph[#, GraphLayout->"SpringEmbedding",
  VertexStyle->{{"C",_}->Lighter[Black],{"O",_}->Lighter[Red],{"H",_}->LightBlue,{"N",_}-> Lighter[Blue]},
  EdgeStyle-> Darker@Green,VertexSize->{{"C",_}->0.7,{"O",_}->0.5,{"H",_}->0.4,{"N",_}->0.6}, 
  ImageSize->{210,200}]&;
Multicolumn@DeleteDuplicates[show/@raw]

enter image description here

The last one is the same as blue ones (not the red one) in 2D. And IsomorphicGraphQ would delete all but first one.

How can I delete these duplicates one?

Just consider planar isomerism, and I also glad to see if anyone solved the stereo isomerism.