[Chimera-users] Installing colorbrewer for Chimera Python
Paul Kibet Korir
pkorir at ebi.ac.uk
Thu Feb 18 01:16:07 PST 2016
Thanks, Tom. Very useful indeed.
I will go through these.
On 17/02/2016 18:50, Tom Goddard wrote:
> Hi Paul,
> Hi Paul,
> I suggested adding the path to sys.path in your Chimera start-up so
> that you wouldn’t have to modify the system Python.
> Here is a Python example of computing a triangulation for the part
> of a plane inside a closed surface, using as an example an icosahedron
> for the closed surface. You can just use File / Open… in Chimera to
> run it and it will report in the Reply Log (menu Favorites)
> Clipped icosahedron, clip plane has 10 triangles
> More Python code examples are on the Chimera Python scripts web page:
> The Chimera programming documentation is scant. To figure out how
> to write the attached example code I looked at my Chimera distribution
> at file
> at the calculate_cap() routine. All of the Chimera Python modules are
> in the above “share” directory — it is useful to poke around in there
> to figure out how things work, although it can be hard to find what
> you want.
>> On Feb 17, 2016, at 1:28 AM, Paul Kibet Korir <pkorir at ebi.ac.uk
>> <mailto:pkorir at ebi.ac.uk>> wrote:
>> Thank you very much, Tom.
>> I found the folder and added a file 'chimera.pth' to system Python
>> site-packages with the path to Chimera's site-packages, which also
>> did the same thing.
>> The whole point for me doing this was to try and take advantage of
>> Chimera's functionality. I would like to slice closed 3D volumes.
>> I've looked through the online documentation but have not had
>> success. Could you please point me in the right direction on how to
>> achieve this?
>> My input will be *vertices and polygons* together with a slicing
>> plane and my expected output is the *contents of the plane as an
>> 'image'**or set or polygons*.
>> Many thanks.
>> On 16/02/2016 23:52, Tom Goddard wrote:
>>> Hi Paul,
>>> The error means that you have two different colorbrewer Python
>>> modules and Chimera is getting the one that didn’t come with
>>> Chimera. I see the Chimera colorbrewer.py file in
>>> But I’m guessing you have the following colorbrewer module which is
>>> completely different from the Chimera one installed with your system
>>> In order for Chimera modules to work from the system Python it will
>>> be necessary that Chimera finds its own Python modules. So you
>>> should put the above Chimera site-packages directory in front of
>>> Python system locations in the Python search path sys.path. I would
>>> put this in your script that starts Chimera using the system Python,
>>> something like
>>> import sys
>>>> On Feb 16, 2016, at 4:08 AM, Paul Kibet Korir wrote:
>>>> I want to use the chimera API and I've managed to configure a
>>>> successful import of chimera except that I get that colorbrewer is
>>>> not installed.
>>>> >>> import chimera
>>>> Traceback (most recent call last):
>>>> File "<stdin>", line 1, in <module>
>>>> line 73, in <module>
>>>> import palettes
>>>> line 103, in <module>
>>>> line 95, in _initPresets
>>>> from colorbrewer import ColorBrewer
>>>> ImportError: cannot import name ColorBrewer
>>>> What is the right way to go about this? (I could create a symbolic
>>>> link to my system colorbrewer, but that doesn't seem clean).
>>>> With kind regards,
>>>> *Paul K Korir, PhD*
>>>> /Scientific Programmer/
>>>> Main Building, A2-35,
>>>> WTGC, Hinxton, Cambridge CB10 1SD
>>>> P: +44 1223 49 44 22
>>>> F: +44 1223 49 44 68
>>>> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
>>>> <mailto:Chimera-users at cgl.ucsf.edu>
>>>> Manage subscription:
>> With kind regards,
>> *Paul K Korir, PhD*
>> /Scientific Programmer/
>> Main Building, A2-35,
>> WTGC, Hinxton, Cambridge CB10 1SD
>> P: +44 1223 49 44 22
>> F: +44 1223 49 44 68
With kind regards,
*Paul K Korir, PhD*
Main Building, A2-35,
WTGC, Hinxton, Cambridge CB10 1SD
P: +44 1223 49 44 22
F: +44 1223 49 44 68
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users