Dan Kulp wrote:
I looked into this a little. I think the apbs script (its apbs.py or something -- if you can't find it search for it on google) calls a function called cmd.ramp_new() with a bunch of arguements. Apparently this 'ramp' is a built in c-level object. You maybe able to mimic the code in apbs. What part of the color ramp are you trying to use in your app ?

~Dan

Hi Dan,
I saw this function in "apbs_tools.py":
        ramp_name = 'e_lvl'
        map_name = self.map.getvalue()
        molecule_name = self.molecule.getvalue()
        low = float(self.mol_surf_low.getvalue())
        mid = float(self.mol_surf_middle.getvalue())
        high = float(self.mol_surf_high.getvalue())
        range = [low,mid,high]
        print "range is",range
        pymol.cmd.delete(ramp_name)
        pymol.cmd.ramp_new(ramp_name,map_name,range)
        pymol.cmd.set('surface_color',ramp_name,molecule_name)
        pymol.cmd.show('surface',molecule_name)
        pymol.cmd.sort()

My range will be always the same, and the ramp_name too.
But, how to set map_name and molecule_name ?
With coordinates, or something else ?

Thanks

Hello,
I try to make a legend box as apbs plugin does with colors it uses (the
box is set at the bottom of the visualization screen).

Does someone know if a kind of tutorial exists for ?

Thanks

--
Sébastien Moretti
http://igs.cnrs-mrs.fr/
CNRS - IGS
31 chemin Joseph Aiguier
13402 Marseille cedex

Reply via email to