Import Molecules

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.

Sticks Both Ways

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.

Import Molecule Script

See TurboSquid for this script. Please contact me if you have any problems obtaining the script.

Installation and Use

Copy the script to 3dsmax4\scripts\startup and copy the importMolColorTable.txt file to 3dsmax4\scripts.

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 Effects

Max will render very complicated molecules with high quality and interesting lighting effects. Here a spotlight highlights the center of a hemoglobin molecule.

Rendering Effectss

In this picture a myoglobin moledule is rendered with depth of field and volume lighting effects.

Programs and images Copyright (c) 2002-2005, Darrell Duffy.
21 May 2005