As PyMOL is a quite complex software with a lot of its functionality written in C++, sometimes unexpected results or crashes may occur under certain circumstances. This page should provide help in such and similar cases.
Interactive PyMOL crashes when launched after usage of Matplotlib¶
Interactive PyMOL will crash, if it is launched after a Matplotlib figure is created. This does not happen in the object-oriented library mode of PyMOL. Presumably the reason is a conflict in the OpenGL contexts.
Example code that leads to crash:
import matplotlib.pyplot as plt import ammolite figure = plt.figure() ammolite.launch_interactive_pymol()
‘cmd.png()’ command crashes in pytest function¶
PyTest executes the test functions via
exec(), which might lead to the
Up to now the only way to prevent this, is not to test the
Launching PyMOL for the first time raises DuplicatePyMOLException¶
For example the code snippet
from ammolite import cmd, launch_pymol launch_pymol()
ammolite.DuplicatePyMOLException: A PyMOL instance is already running
from ammolite import pymol or
from ammolite import cmd
is called, PyMOL is already launched upon import in order to make
cmd attribute available.
Subsequent calls of
launch_interactive_pymol() would start a second PyMOL session,
which is forbidden.
To circumvent this problem do not import
ammolite, but access these attributes via
ammolite.cmd at the required places in your code.