| | 90 | |
| | 91 | Get a PDB molecule to play with: |
| | 92 | {{{ |
| | 93 | chimera.runCommand('open 2por') |
| | 94 | om = chimera.openModels.list(all=True) |
| | 95 | por2 = om[1] |
| | 96 | }}} |
| | 97 | |
| | 98 | Exploring color properties: |
| | 99 | {{{ |
| | 100 | >>> por2.color |
| | 101 | <_chimera.MaterialColor object at 0x3d50dc8> |
| | 102 | >>> por2.color.name() |
| | 103 | u'_openColor00' |
| | 104 | >>> por2.color.rgba() |
| | 105 | (1.0, 1.0, 1.0, 1.0) |
| | 106 | >>> por2.color.ambientDiffuse |
| | 107 | (1.0, 1.0, 1.0) |
| | 108 | >>> por2.color.isTranslucent() |
| | 109 | False |
| | 110 | >>> por2.color.opacity |
| | 111 | 1.0 |
| | 112 | }}} |
| | 113 | |
| | 114 | Chimera material attributes are collected with color attributes. |
| | 115 | {{{ |
| | 116 | # chimera.Material object |
| | 117 | >>> por2.color.material |
| | 118 | <_chimera.Material object at 0x2fd7c60> |
| | 119 | >>> por2.color.material.name() # material name (unicode str) |
| | 120 | u'default' |
| | 121 | >>> por2.color.material.shininess |
| | 122 | 30.0 |
| | 123 | >>> por2.color.material.specular |
| | 124 | (0.85, 0.85, 0.85) |
| | 125 | >>> por2.color.material.opacity |
| | 126 | 1.0 |
| | 127 | >>> por2.color.material.ambientDiffuse |
| | 128 | (1.0, 1.0, 1.0) |
| | 129 | >>> por2.color.material.isTexture() |
| | 130 | False |
| | 131 | >>> por2.color.material.isTranslucent() |
| | 132 | False |
| | 133 | }}} |