<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thanks, Tom. Very useful indeed. <br>
    <br>
    I will go through these.<br>
    <br>
    Kind regards,<br>
    <br>
    Paul<br>
    <br>
    <div class="moz-cite-prefix">On 17/02/2016 18:50, Tom Goddard wrote:<br>
    </div>
    <blockquote
      cite="mid:D1EABEE8-B416-42E9-B955-A9BE5662E241@sonic.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      Hi Paul,
      <div class=""><br class="">
      </div>
      <div class="">Hi Paul,</div>
      <div class=""><br class="">
      </div>
      <div class="">  I suggested adding the path to sys.path in your
        Chimera start-up so that you wouldn’t have to modify the system
        Python.</div>
      <div class=""><br class="">
      </div>
      <div class="">  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)</div>
      <div class=""><br class="">
      </div>
      <div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>Clipped
        icosahedron, clip plane has 10 triangles</div>
      <div class=""><br class="">
      </div>
      <div class="">More Python code examples are on the Chimera Python
        scripts web page:</div>
      <div class=""><br class="">
      </div>
      <div class=""><span class="Apple-tab-span" style="white-space:pre">     </span><a
          moz-do-not-send="true"
          href="http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts"
          class=""><a class="moz-txt-link-freetext" href="http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts">http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts</a></a></div>
      <div class=""><br class="">
      </div>
      <div class="">  The Chimera programming documentation is scant.
         To figure out how to write the attached example code I looked
        at my Chimera distribution at file</div>
      <div class=""><br class="">
      </div>
      <div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>Chimera.app/Contents/Resources/share/SurfaceCap/surfcaps.py</div>
      <div class=""><br class="">
      </div>
      <div class="">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.</div>
      <div class=""><br class="">
      </div>
      <div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>Tom</div>
      <div class=""><br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On Feb 17, 2016, at 1:28 AM, Paul Kibet Korir
              <<a moz-do-not-send="true"
                href="mailto:pkorir@ebi.ac.uk" class="">pkorir@ebi.ac.uk</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta content="text/html; charset=utf-8"
                http-equiv="Content-Type" class="">
              <div bgcolor="#FFFFFF" text="#000000" class=""> Thank you
                very much, Tom.<br class="">
                <br class="">
                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.<br
                  class="">
                <br class="">
                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?<br
                  class="">
                <br class="">
                My input will be <b class="">vertices and polygons</b>
                together with a slicing plane and my expected output is
                the <b class="">contents of the plane as an 'image'</b><b
                  class=""> or set or polygons</b>.<br class="">
                <br class="">
                Many thanks.<br class="">
                <br class="">
                Paul<br class="">
                <br class="">
                <br class="">
                <br class="">
                <br class="">
                <div class="moz-cite-prefix">On 16/02/2016 23:52, Tom
                  Goddard wrote:<br class="">
                </div>
                <blockquote
                  cite="mid:D0F9770D-8C37-4CFE-BBB6-37C2AD4D505F@sonic.net"
                  type="cite" class="">
                  <meta http-equiv="Content-Type" content="text/html;
                    charset=utf-8" class="">
                  Hi Paul,
                  <div class=""><br class="">
                  </div>
                  <div class="">  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</div>
                  <div class=""><br class="">
                  </div>
                  <div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages/colorbrewer.py</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">But I’m guessing you have the following
                    colorbrewer module which is completely different
                    from the Chimera one installed with your system
                    Python</div>
                  <div class=""><br class="">
                  </div>
                  <div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext"
                      href="https://pypi.python.org/pypi/colorbrewer/"><a class="moz-txt-link-freetext" href="https://pypi.python.org/pypi/colorbrewer/">https://pypi.python.org/pypi/colorbrewer/</a></a></div>
                  <div class=""><br class="">
                  </div>
                  <div class="">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</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">import sys</div>
                  <div class="">sys.path.insert(0,
'/Applications/Chimera.app/Contents/Resources/lib/python2.7/site-packages’)</div>
                  <div class=""><br class="">
                  </div>
                  <div class=""><br class="">
                  </div>
                  <div class="">  Tom</div>
                  <div class=""><br class="">
                    <div class="">
                      <blockquote type="cite" class="">
                        <div class="">On Feb 16, 2016, at 4:08 AM, Paul
                          Kibet Korir  wrote:</div>
                        <br class="Apple-interchange-newline">
                        <div class="">
                          <meta http-equiv="content-type"
                            content="text/html; charset=utf-8" class="">
                          <div bgcolor="#FFFFFF" text="#000000" class="">
                            Hi,<br class="">
                            <br class="">
                            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. <br class="">
                            <br class="">
                            >>> import chimera<br class="">
                            Traceback (most recent call last):<br
                              class="">
                              File "<stdin>", line 1, in
                            <module><br class="">
                              File
                            "/Applications/Chimera.app/Contents/Resources/share/chimera/__init__.py",


                            line 73, in <module><br class="">
                                import palettes<br class="">
                              File
                            "/Applications/Chimera.app/Contents/Resources/share/chimera/palettes.py",


                            line 103, in <module><br class="">
                                _initPresets()<br class="">
                              File
                            "/Applications/Chimera.app/Contents/Resources/share/chimera/palettes.py",


                            line 95, in _initPresets<br class="">
                                from colorbrewer import ColorBrewer<br
                              class="">
                            ImportError: cannot import name ColorBrewer<br
                              class="">
                            <br class="">
                            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).<br
                              class="">
                            <br class="">
                            <div class="moz-signature">-- <br class="">
                              With kind regards,<br class="">
                              <br class="">
                              <strong class="">Paul K Korir, PhD</strong><br
                                class="">
                              <i class="">Scientific Programmer</i><br
                                class="">
                              EMBL-EBI<br class="">
                              Main Building, A2-35,<br class="">
                              WTGC, Hinxton, Cambridge CB10 1SD<br
                                class="">
                              P: +44 1223 49 44 22<br class="">
                              F: +44 1223 49 44 68</div>
                          </div>
_______________________________________________<br class="">
                          Chimera-users mailing list: <a
                            moz-do-not-send="true"
                            href="mailto:Chimera-users@cgl.ucsf.edu"
                            class=""><a class="moz-txt-link-abbreviated" href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a></a><br
                            class="">
                          Manage subscription: <a
                            moz-do-not-send="true"
                            href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users"
                            class=""><a class="moz-txt-link-freetext" href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a></a><br
                            class="">
                        </div>
                      </blockquote>
                    </div>
                    <br class="">
                  </div>
                </blockquote>
                <br class="">
                <div class="moz-signature">-- <br class="">
                  With kind regards,<br class="">
                  <br class="">
                  <strong class="">Paul K Korir, PhD</strong><br
                    class="">
                  <i class="">Scientific Programmer</i><br class="">
                  EMBL-EBI<br class="">
                  Main Building, A2-35,<br class="">
                  WTGC, Hinxton, Cambridge CB10 1SD<br class="">
                  P: +44 1223 49 44 22<br class="">
                  F: +44 1223 49 44 68</div>
              </div>
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      With kind regards,<br>
      <br>
      <strong>Paul K Korir, PhD</strong><br>
      <i>Scientific Programmer</i><br>
      EMBL-EBI<br>
      Main Building, A2-35,<br>
      WTGC, Hinxton, Cambridge CB10 1SD<br>
      P: +44 1223 49 44 22<br>
      F: +44 1223 49 44 68</div>
  </body>
</html>