schrodinger.livedesign.pymol_convert module¶
PyMOL conversion utilities for LiveDesign.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.livedesign.pymol_convert.run_pymol_script(pml_script: str) None¶
Run a PyMOL script command using subprocess.
- Parameters:
pml_script – PyMOL script to execute
- Raises:
RuntimeError – if PyMOL cannot be located
subprocess.CalledProcessError – if PyMOL execution fails
- schrodinger.livedesign.pymol_convert.pse_to_mols(pse_block: str) List[Mol]¶
Convert a PyMOL session file (.pse) to RDKit molecules via Maestro format.
A single PSE file can contain multiple molecules/objects. This function extracts all of them.
- Parameters:
pse_block – PSE file contents as string (binary data encoded as string)
- Returns:
List of RDKit molecules
- schrodinger.livedesign.pymol_convert.mols_to_pse(mols: List[Mol]) str¶
Convert RDKit molecules to a PyMOL session file (.pse) via Maestro format.
All molecules are stored in a single PSE file, which can contain multiple objects.
- Parameters:
mols – List of RDKit molecules
- Returns:
PSE file contents as string (binary data encoded as string)