File: callback.py

package info (click to toggle)
pymol 2.5.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 42,288 kB
  • sloc: cpp: 476,472; python: 76,538; ansic: 29,510; javascript: 6,792; sh: 47; makefile: 24
file content (19 lines) | stat: -rw-r--r-- 614 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

# NOTE that in general, PyMOL API calls should not be made during the
# __call__ method of a callback object.  The PYMOL API is not designed
# to be re-entrant, and the callback object's __call__ method may in
# fact be called as far of an API fuction (refresh, ray, etc.).

# There are a few exceptions, which you may call from a __call__ method
# in order to get useful information:
#
#    cmd.get_frame()
#    cmd.get_state()

class Callback(object):
    def __call__(self):
        pass

    def get_extent(self):
        # should return [ [min_x, min_y, min_z], [ max_x, max_y, max_z ] ]
        return None