Import molecule files for Chemistry or just for fun. Both PDB [Protein Database] and MOL format files are supported. This script works in both max and gmax.
The MDL Chime browser plug-in displays molecule files in the browser.
The VMD program displays molecules and supports a large number of rendering options.
However, while these programs incorporate a knowledge of chemistry, neither of these programs provides fine control over rendering and animation. The Import Molecule max script imports the molecule files and creates max geometry that can be rendered and animated at will.
Materials are created for each atom type. The atoms and bonds are grouped for each molecule and the name of the group is based on the name of the molecule. A material is created for each type of atom and the color is set according to the CPK standard. The materials can be changed in any way desired later on.
Unlike other rendering options, max allows far more options for rendering. Note the shadows and bump texture in the above picture and the lighting and rendering effects below. Of course all the animation capabilities of max are also available.
Rendering Options
Balls, Balls and sticks and sticks alone are supported.
Some molecule files don’t contain the right number of bonds. Note the molecule in the background above that the bonds don’t connect the atoms. This can be corrected by choosing the option for Sticks Both Ways as in the foreground.
Installation and Use
Copy the script to 3dsmax4scriptsstartup and copy the importMolColorTable.txt file to 3dsmax4scripts.
In the Utilities panel click MaxScript and then choose Import Molecule from the pulldown.
Choose the display type.
Choose the size and complexity of the parts. Careful about choosing too many segments or too many sides if there are a large number of atoms.
Set the scale of the atom. Atoms are by default only 1.0 unit in radius. 100 is a good scale for typical max work, but the choice will depend on the size of the molecule in the scene you are designing.
Click on Import molecule and choose either a MOL or PDB file.
Lighting and Rendering Effects
All the power of max can be used to render your molecules once you import them into max.
You can find this and other scripts at TurboSquid