2. PyMol and ChimeraX
There are several ways to import protein structures into Blender and other 3D programs for animation and rendering, they all have their advantages and disadvantages. In this section we will cover how to export a 3D model from PyMol or ChimeraX (the principle remains the same for other Molecular Graphics Software) and to then import it into Blender.
Exporting the Model
PyMol
4ozs fetch
If we run the following command inside of PyMol, we get some information on the save command and the formats that we can save in:
help save
DESCRIPTION
"save" writes content to a file.
USAGE
format ]]]
save filename [, selection [, state [,
ARGUMENTS
= string: file path to be written
filename
= string: atoms to save {default: (all)}
selection
= integer: state to save {default: -1 (current state)}
state
PYMOL API
file, string selection, int state, string format)
cmd.save(string
NOTES
file format is automatically chosen if the extesion is one of
The
the supported output formats: pdb, pqr, mol, sdf, pkl, pkla, mmd, out,
dat, mmod, cif, pov, png, pse, psw, aln, fasta, obj, mtl, wrl, dae, idtf,or mol2.
file format is not recognized, then a PDB file is written
If the
by default.
and where applicable and supported:
For molecular files
* if state = -1 (default), then only the current state is written.
* if state = 0, then a multi-state output file is written.
SEE ALSO
load, get_model
Inside of the nodes, we see the supported output formats are: pdb, pqr, mol, sdf, pkl, pkla, mmd, out, dat, mmod, cif, pov, png, pse, psw, aln, fasta, obj, mtl, wrl, dae, idtf, or mol2.
Some of these are relevant to the work that you are likely already familiar with such as the .mol
and the .pdb
, but a lot of them may seem strange. .obj
, .dae
, .wrl
are all generic 3D model formats that are not specific to proteins at all. You can save your 3D model you have displayed inside of your viewport with the following command:
save protein.wrl
Different 3D model formats have pros and cons. I have found .wrl
to be the best when exporting from PyMol.
You should now have a 3D model save in your working directory, which is ready to be imported into Blender.