Changes between Version 14 and Version 15 of ChimeraAnimationState


Ignore:
Timestamp:
Jan 6, 2011, 12:36:20 PM (15 years ago)
Author:
Darren Weber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChimeraAnimationState

    v14 v15  
    9999        print a.color
    100100
     101# example session:
     102>>> import chimera
     103>>> mc1 = chimera.MaterialColor
     104>>> mc1 = chimera.MaterialColor( 1.0, 1.0, 0.0, 0.0)
     105>>> mc2 = chimera.MaterialColor( 1.0, 1.0, 0.0, 0.0)
     106>>> mc1 == mc2
     107True
     108>>> mc2 = chimera.MaterialColor( 1.0, 0.0, 0.0, 0.0)
     109>>> mc1 == mc2
     110False
     111>>>
    101112>>> a = chimera.openModels.list(modelTypes=[chimera.Molecule])[0].atoms[0]
    102113>>> a.color
    103114<_chimera.MaterialColor object at 0x3f36490>
    104 >>> MC = chimera.MaterialColor
    105 >>> help(MC)  # see various contructors
    106 >>> MC = chimera.MaterialColor(0.0, 0.0, 0.0, 1.0)
    107 >>> MC.rgba()
    108 (0.0, 0.0, 0.0, 1.0)
    109 >>> r,g,b,a = a.color.rgba()
    110 >>> MC = chimera.MaterialColor( r,g,b,a )
     115>>> a.color.rgba()
     116(0.18823529411764706, 0.3137254901960784, 0.9725490196078431, 1.0)
     117>>> R,G,B,A = a.color.rgba()
     118>>> mc = chimera.MaterialColor( R,G,B,A )
     119>>> mc == a.color
     120True
     121>>> mc != a.color
     122False
     123>>> mc < a.color
     124False
     125>>> mc <= a.color
     126True
     127>>> mc > a.color
     128False
     129>>> mc >= a.color
     130True
    111131}}}
    112132