User:Ring0/3D images of molecules creation methodology

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Usually I'm using data from PubChem database to create 3D images of molecules in DS Visualizer (PubChem's own 3D viewer doesn't show bond types and produce not so nice images). The objective is to produce images equivalent to those from the PubChem 3D viewer (in terms of spatial structure).

Data from Frog were used when explicitly noted (as opposed to PubChem data). It should produces spatial structure similar to those obtained from crystallographic data.[1]

As written on the PubChem's FTP, the structure presented their is not an energy minimum, but represents some relevant low energy conformer.[2][3][4] So feel free to replace my images with those that are more scientifically correct.

The exact procedure that I use:

  • Download SDF file with 3D model from PubChem (it contains only data such as atom coordinates and as such isn't protected by copyright).
  • Ensure that the model displayed in DS Visualizer is the same as the PubChem 3D Viewer (not mirrored). Sometimes, but not always, DS Visualizer interprets the SDF file in such a way that the picture is the mirror of that from PubChem viewer. In this case it is necessary to change handedness in order to make the pictures in these programs similar. To do so, one might reverse one of the axes. I use the following awk script:

{
if(NF!=16) {
print $0;
next;
}
for(i=1;i<=2;i++) printf(" %s ",$i);
printf(" %s ",-$3);
for(i=4;i<=NF;i++) printf(" %s ",$i);
printf("\n");
}

  • Open the SDF file in DS Visualizer, render a 3D molecule structure and save it as a *.mol file. Then, reopen this *.mol file (this step is needed to infer aromatic bonds, the corresponding setting must be turned on in Edit->Preferences->3D Window->Import).
  • Manually insert partial double bonds (if there are any).
  • Set up lighting and export the image is *.png with big resolution (quality in Edit->Preferences->3D Window must be set to Ultra-High).
  • Process the image in en:GIMP or Photoshop (make the background white, perform crop and resize).

References[edit]