pymolPy3
?
What's The package enables the use of PyMOL commands directly in Python 3 scripts. NO APIs are requierd.
The length of source code is only 32 lines, but the example has a size of 29MB.
What can it do?
pymolPy3
Install pip install pymolPy3 --user
or pip install git+https://github.com/carbonscott/pymolPy3 --upgrade --user
Basic usage
Initializ pymol
import pymolPy3
# Launch pymol with GUI
pm = pymolPy3.pymolPy3()
OR
import pymolPy3
# Launch pymol without GUI
pm = pymolPy3.pymolPy3(0)
Load a PDB structure
pdb = '1f88'
pm(f"load {pdb}.pdb")
pm()
-- it's a wrapper
Run PyMOL command in pm(f"...")
# ~~~
# |
# |_______ A string representing PyMOL command.
Examples
The sample script align.view.py
under the examples
directory would produces
the figure below.