Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Set mono as default for pymol. Pymol stereo can still be run with `pymol -S`

View pymol_disable_stereo.diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
diff --git a/modules/pymol/__init__.py b/modules/pymol/__init__.py
index 3b95856..a28970a 100644
--- a/modules/pymol/__init__.py
+++ b/modules/pymol/__init__.py
@@ -163,6 +163,12 @@ if pymol_launch != 3: # if this isn't a dry run
# or via execfile(".../pymol/__init__.py",...) from main
if not hasattr(__main__,"pymol_argv"):
+ try:
+ # check if explicitly stereo
+ idx_explicit_stereo = sys.argv.index("-S")
+ except ValueError:
+ # force mono
+ sys.argv += ["-M"]
__main__.pymol_argv = sys.argv
pymol_launch = -1 # non-threaded launch import flag
@@ -530,6 +536,12 @@ if pymol_launch != 3: # if this isn't a dry run
args = pymol_argv+["-K"] # keep PyMOL thread alive
else:
args = list(args)
+ try:
+ # check if explicitly stereo
+ idx_explicit_stereo = args.index("-S")
+ except ValueError:
+ # force mono
+ args += ["-M"]
if pymol_launch == 2: # spawn thread -- 'import pymol'
global glutThreadObject
cmd.reaper = threading.currentThread()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.