OE3DMolStyle hierarchy between molecule, conformers, and atoms

A program that shows how the style hierarchy in OE3DMolStyle is inherited between molecules, conformer, and atoms. The style applied to the main molecule will be the top level style. The style applied to each conformer will take priority over any overlapping style options between the two. The style applied to each atom will take priority over both the conformers and the molecule. The output file will have a molecule style of: Wireframe, blue, yellow molecular surface, and no hydrogens. The first conformer will have a style that indludes: CPK, blue, yellow molecular surface, and polar hydrogens. The second conformer will have the same style as the molecule. The first atom on the first conformer will have a style that includes: Stick, white, no surface, and polar hydrogens. The first atom on the second conformer will have a style that includes: Stick, white, no surface, and no hydrogens. The second atom on the first conformer will have a style that includes: CPK, pink, blue molecular surface, and polar H.

Example

prompt> styleHierarchy.py input.oeb output.oeb

Code

Download code

styleHierarchy.py

See also