How to 3D Print a Molecular Model
by gratefulfrog in Workshop > Science
3661 Views, 17 Favorites, 0 Comments
How to 3D Print a Molecular Model
In this instructable, we will show how to take a molecular model file (PDB) and use PyMol to transform into a 3D Printable format (WRL or STL file).
It is assumed that you will be doing this on a Linux platform. I have no idea how to do it on Windows or Mac.
Requirements :
- relatively recent (writing this in 2018) Linux distro, up and running.
- a recent version of Pymol installed. I am using the open source version 1.8.6. It is also possible to buy a license for the commercial version of Pymol. Your Linux distro should have PyMol in the package manager; if not Google is your friend, or pm me for help. a molecular model file in a format that PyMol can load.
Start PyMol
When you start PyMol, 2 separate windows appear:
- The command line processor
- The viewer
We will interact in both of these.
Open a Molecular Model
In the command window, click the File/Open menu, navigate to your molecular Model and open it.
It will appear in the viewer, probably not in the surface view.
The Model Appears
Once loaded, the model will appear in the viewer.
Most likely, it will not be displayed in a printable form.
Clear the Viewer
Since the model is probably displayed as lines or something that is not printable, we need to clear the viewer.
Hide everything:
- to the right of the model view, on the line for "All" click the "H" which means hide, and select "everything."
- the model view will be cleared
The Viewer Is Cleared
The viewer window should appear blank.
Don't worry, the model is still open, just not displayed for the moment!
Display the Surface View
Now we want to display the model as surfaces, i.e. in a 3D printable form.
- on the same "All" line click "S" for show, then select "surface".
- The model will appear in the printable surface view!
The Surface View
Now we have a 3D printable view.
We could stop here and export the model file directly, but let's first select the color scheme.
Select the Color Scheme
At this point we need to decide on a color scheme for the model. This is done in the command window's "Display/Color Space" menu, and on the command line itself.
First, since we are interested in publishing, i.e. printing, our model, will will use the standard color space called "CMYK". From the main menu Display / Color Space / CMYK (For Publications)
Set Spectrum
Then, if desired, we can set the "spectrum" display. This is probably
a good thing. Simply type spectrum at the command line and hit the return key.
This will give a nice version of the colors....
Set Rendering to Use Maximum Memory
From the main menu Setting / Rendering / Memory / Use Most
Set Display to Maximum Quality
From the main menu Display / Quality / Maximum Quality
Export the Model As WRL
Now we are ready to save the model to disk in a format that can be 3D printed!
The format we will use is Virtual Reality Modeling Language, VRML. This format incorporates the color information so that 3D printing services can print in full color.
From the command window, use the menu
File / Save Image As / VRML 2
And give it a name. It will be saved with the extension ".wrl"
Print Your Molecule !
That's right, we're done!
Now all that is left is to print your model on any 3D printer, or via any 3D printing service you like!
I personally suggest printing in full color sandstone on Shapeways. In my opinion, and at the time of writing, this is the best deal available. I am not sponsored by or in any way affiliated with Shapeways.
I hope it works out for you wherever you print!