For an upcoming Molecular Visualization Principle, I decided to include a small molecule, which is something new for the series.
Small molecules typically use CPK space-filling or ball and stick representations, because surface meshes aren’t very informative. It’s more interesting to see structures like benzene rings when present. In order to bring the associated small molecule in with the protein structure I was importing using Molecular Maya, it was necessary to ensure that the HETATMs option was checked in the import options.
For the protein component, I kept the established simplified surface mesh used in the series so far. I decided on a modified ball and stick representation with pinched bonds, which Molecular Maya is capable of generating. The requirements of the animation and rendering process were such that I really needed regular geometry for the atoms and bonds, respectively balls and sticks. However, in the version of the software I was using, these structures were built with spherical particles and geometry instanced to particles. Maya unfortunately doesn’t have a particle instance to regular geometry conversion tool, so I was left to find my own workaround for this task. I’m confident that in the future, either or both of Autodesk Maya and Molecular Maya will have the capability of automatically performing the following, but at the time, this process was not implemented in the software.
First, I needed access to the underlying nodes in the mMaya hierarchy. I did this by selecting the mMaya node prefixed with pdbMolStruc_ and running the below code.
Note: this webpage has likely converted the regular quote marks to “smart quotes”, which will need to be replaced in your script editor with “straight quotes”.