channotation / chap

CHAP is a tool for the functional annotation of ion channel structures:
http://www.channotation.org
Other
18 stars 10 forks source link

pymol visualization issue #45

Closed zruan closed 2 years ago

zruan commented 2 years ago

I'm trying to visualize the tunnel by using the visualise_pathway.py script that comes with chap. However, I encounter the following error message:

(work) zruan@zruan:~/software/chap/chap/examples/example-03$ pymol
 PyMOL(TM) 2.3.4 - Incentive Product
 Copyright (C) Schrodinger, LLC

 This Executable Build integrates and extends Open-Source PyMOL.
 Detected OpenGL version 4.6. Shaders available.
 Detected GLSL version 4.60.
 OpenGL graphics engine:
  GL_VENDOR:   NVIDIA Corporation
  GL_RENDERER: NVIDIA GeForce GTX 1660 Ti/PCIe/SSE2
  GL_VERSION:  4.6.0 NVIDIA 510.73.05
 License Expiry date: 19-jul-2023
 Detected 24 CPU cores.  Enabled multithreaded rendering.
 parser: no matching files.
PyMOL>run visualise_pathway.py
Traceback (most recent call last):
  File "/home/zruan/software/pymol/lib/python3.7/site-packages/pymol/parsing.py", line 483, in run
    run_(path, ns_pymol, ns_pymol)
  File "/home/zruan/software/pymol/lib/python3.7/site-packages/pymol/parsing.py", line 532, in run_file
    execfile(file,global_ns,local_ns)
  File "/home/zruan/software/pymol/lib/python3.7/site-packages/pymol/parsing.py", line 527, in execfile
    exec(co, global_ns, local_ns)
  File "visualise_pathway.py", line 89, in <module>
    obj = wobj.import_wobj(args.surface)
  File "/home/zruan/software/chap/chap/examples/example-03/wobj.py", line 396, in import_wobj
    return obj_importer.read(filename)
  File "/home/zruan/software/chap/chap/examples/example-03/wobj.py", line 182, in read
    cgo[key] = self.__create_cgo_object(key)
  File "/home/zruan/software/chap/chap/examples/example-03/wobj.py", line 348, in __create_cgo_object
    vertex_a = self.__vertices[face["vert_idx"][0] - 1]
TypeError: 'map' object is not subscriptable
DSeiferth commented 2 years ago

Hi zruan,

use the "visualise_pathway.py" script with the wobj_python3.py library instead of the wobj.py library. There are some changes from python2 to python3. I have updated the wobj_python3.py to make it compatible with python3. Alternatively, you can use python2 with the old script. Best regards, David