
Hi gang, In trying to finish up my plugin port to the daily/Aqua version of Chimera, I'm confused over the replacement method for what used to be: _surface.Surface_Model.add_group I see that dir(_surface) now has SurfaceModel (without the underscore), but what's the replacement for add_group?
dir(_surface.SurfaceModel) ['__class__', '__delattr__', '__destroyed__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'addAssociatedModel', 'addGeometryChangedCallback', 'addPiece', 'associatedModels', 'bbox', 'bsphere', 'callGeometryChangedCallbacks', 'clipPlane', 'clipThickness', 'computeBounds', 'count', 'destroy', 'display', 'frontPoint', 'id', 'intersects', 'material', 'name', 'newPiece', 'openState', 'oslChildren', 'oslIdent', 'oslLevel', 'oslParents', 'oslTestAbbr', 'piecesAreSelectable', 'removeAssociatedModel', 'removeGeometryChangedCallback', 'removePiece', 'selLevel', 'subid', 'surfacePieces', 'useClipPlane', 'useClipThickness']
-Randy

Hi Randy, Surface groups have been renamed as pieces and underscores have been removed. So you want SurfaceModel.addPiece() Sorry for the trouble caused by the renaming. Tom Randy Heiland wrote:
Hi gang,
In trying to finish up my plugin port to the daily/Aqua version of Chimera, I'm confused over the replacement method for what used to be:
_surface.Surface_Model.add_group
I see that dir(_surface) now has SurfaceModel (without the underscore), but what's the replacement for add_group?
dir(_surface.SurfaceModel) ['__class__', '__delattr__', '__destroyed__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'addAssociatedModel', 'addGeometryChangedCallback', 'addPiece', 'associatedModels', 'bbox', 'bsphere', 'callGeometryChangedCallbacks', 'clipPlane', 'clipThickness', 'computeBounds', 'count', 'destroy', 'display', 'frontPoint', 'id', 'intersects', 'material', 'name', 'newPiece', 'openState', 'oslChildren', 'oslIdent', 'oslLevel', 'oslParents', 'oslTestAbbr', 'piecesAreSelectable', 'removeAssociatedModel', 'removeGeometryChangedCallback', 'removePiece', 'selLevel', 'subid', 'surfacePieces', 'useClipPlane', 'useClipThickness']
-Randy _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev

And further... how do I then set: set_vertex_colors(colors) set_two_sided_lighting(False) Better yet, how do I find out what the new methods are & how to use them? :) I tried, for example, the following, in vain: twoSidedLighting(False) -Randy On Feb 11, 2009, at 4:24 PM, Tom Goddard wrote:
Hi Randy,
Surface groups have been renamed as pieces and underscores have been removed. So you want
SurfaceModel.addPiece()
Sorry for the trouble caused by the renaming.
Tom
Randy Heiland wrote:
Hi gang,
In trying to finish up my plugin port to the daily/Aqua version of Chimera, I'm confused over the replacement method for what used to be:
_surface.Surface_Model.add_group
I see that dir(_surface) now has SurfaceModel (without the underscore), but what's the replacement for add_group?
dir(_surface.SurfaceModel) ['__class__', '__delattr__', '__destroyed__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'addAssociatedModel', 'addGeometryChangedCallback', 'addPiece', 'associatedModels', 'bbox', 'bsphere', 'callGeometryChangedCallbacks', 'clipPlane', 'clipThickness', 'computeBounds', 'count', 'destroy', 'display', 'frontPoint', 'id', 'intersects', 'material', 'name', 'newPiece', 'openState', 'oslChildren', 'oslIdent', 'oslLevel', 'oslParents', 'oslTestAbbr', 'piecesAreSelectable', 'removeAssociatedModel', 'removeGeometryChangedCallback', 'removePiece', 'selLevel', 'subid', 'surfacePieces', 'useClipPlane', 'useClipThickness']
-Randy _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Hi Randy, Yep one more change to SurfaceModel -- methods m.set_bloop_bleep(value) became m.bloopBleep = value and m.bloop_bleep() to get a value became m.bloopBleep. These changes were to adhere to the conventions use in other types of Chimera models. We recently started a Chimera development wiki http://socrates2.cgl.ucsf.edu/trac/chimera/wiki and under Browse Source you can get to the SurfaceModel C++ header which defines all the methods here: http://socrates2.cgl.ucsf.edu/trac/chimera/browser/trunk/contrib/_surface/su... You additionally need to know that our Python interface generator WrapPy changes method()/setMethod() pairs into object attributes (as shown above for bloopBleep). It is a pain to find the attributes of Chimera Python objects coded in C++ since they don't show up with dir(). We look at the C++ headers for that. We have not had the time to better document our programming interfaces. Tom Randy Heiland wrote:
And further... how do I then set: set_vertex_colors(colors) set_two_sided_lighting(False)
Better yet, how do I find out what the new methods are & how to use them? :)
I tried, for example, the following, in vain: twoSidedLighting(False)
-Randy
On Feb 11, 2009, at 4:24 PM, Tom Goddard wrote:
Hi Randy,
Surface groups have been renamed as pieces and underscores have been removed. So you want
SurfaceModel.addPiece()
Sorry for the trouble caused by the renaming.
Tom
Randy Heiland wrote:
Hi gang,
In trying to finish up my plugin port to the daily/Aqua version of Chimera, I'm confused over the replacement method for what used to be:
_surface.Surface_Model.add_group
I see that dir(_surface) now has SurfaceModel (without the underscore), but what's the replacement for add_group?
dir(_surface.SurfaceModel) ['__class__', '__delattr__', '__destroyed__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'addAssociatedModel', 'addGeometryChangedCallback', 'addPiece', 'associatedModels', 'bbox', 'bsphere', 'callGeometryChangedCallbacks', 'clipPlane', 'clipThickness', 'computeBounds', 'count', 'destroy', 'display', 'frontPoint', 'id', 'intersects', 'material', 'name', 'newPiece', 'openState', 'oslChildren', 'oslIdent', 'oslLevel', 'oslParents', 'oslTestAbbr', 'piecesAreSelectable', 'removeAssociatedModel', 'removeGeometryChangedCallback', 'removePiece', 'selLevel', 'subid', 'surfacePieces', 'useClipPlane', 'useClipThickness']
-Randy _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
------------------------------------------------------------------------
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev

On Feb 11, 2009, at 1:57 PM, Tom Goddard wrote:
It is a pain to find the attributes of Chimera Python objects coded in C++ since they don't show up with dir(). We look at the C++ headers for that. We have not had the time to better document our programming interfaces.
In the IDLE window, help(object) will show that object's C++ attributes and methods, along with method arg names/types and return values. --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu

On Wed, 11 Feb 2009, Tom Goddard wrote:
It is a pain to find the attributes of Chimera Python objects coded in C++ since they don't show up with dir(). We look at the C++ headers for that. We have not had the time to better document our programming interfaces.
The attributes *do* show up with dir(). And in the IDLE window, you can use the help(), ie., help(_surface.SurfaceModel), to find about a chimera class and all of its methods and the types of its attributes. The trick with SurfaceModel is to know which module it comes from, but if you create a surface and find the instance using chimera.openModels.list(), you can use help() on the instance to see what you can do with it. The C++ headers are still useful for any comments they contain, but this mailing list is the best resource for filling in any missing information. And I'll agree that we need to document the programming interfaces better. - Greg P.S. help() works in a Python script given to chimera --nogui too.
participants (4)
-
Eric Pettersen
-
Greg Couch
-
Randy Heiland
-
Tom Goddard