pymol-open-source
pymol-open-source copied to clipboard
Pymol can not import python scripts when called in perl
Hi, I tried to call pymol in perl for calculations with the following command:
perl -e 'system("/Applications/PyMOL.app/Contents/bin/pymol -c pymol.pml >test.txt")'
the pymol.pml script is below:
load 2nx5_DE_changepos.pdb
import elbow_angle
elbow_angle 2nx5_DE_changepos
The output is:
PyMOL(TM) 2.3.1 - Incentive Product
Copyright (C) Schrodinger, LLC
This Executable Build integrates and extends Open-Source PyMOL.
CmdLoad: PDB-string loaded into object "2nx5_DE_changepos", state 1.
Thus, pymol can only load the pdb but does not import the python elbow_angle
script and do the calculation. In contrast, if running the same command in zsh shell, everything output well. It is unclear why this happens.
I am using Mac with the macOS Catalina system.
I can't reproduce this (macOS 10.14). Running from shell (bash) or from perl gives the same result for me.