Using The Credo Application Programming Interface with PyMOL
The Credo API provides functions to interact with PyMOL for visualisation purposes, Structural Interaction Fingerprints (SIFts) in particular. This is done by sending commands from the Python interactive shell to PyMOL through an xml-rpc server. Therefore, PyMOL has be be started with the server running:
$ pymol -RCredoPyMolServer.py imports all functions from the standard Credo API, connects to the server and extends the API with PyMOL specific functions. The PyMOLViewer class is a wrapper around the xml-rpc server to provide a simplified syntax for sending command to PyMOL. Upon import of the CredoPyMoLServer class an instance called pymol is initiated from which commands can be launched. Important is to change the location of directories for PDB and ligand structures in the CredoPyMolServer.py script to reflect the local environment.
Loading a structure into PyMOL
A PDB structure can be simply be loaded into PyMOL through the Credo API with the following code snippet:
from credopymol import * s = StructureAdaptor().fetchByPDB('1OPJ') s.load('noW') # Load structure into PyMOL and delete water molecules
Visualising Structural interaction fingerprints
A PDB structure is read and the interactions visualised for a ligand with the following code:
from credopymol import * s = StructureAdaptor().fetchByPDB('1OPJ') s.load('noW') # Load structure into PyMOL and delete water molecules s.Ligands[1].showContacts()

Displaying Chemical components
The following code loads all chemical components having ATC cross references starting with L01XE (Protein kinase inhibitors) and loads them into PyMOL:
for chemComp in ChemCompAdaptor().fetchAllByXRef('ATC','L01XE'): chemComp.load('noH','surface',transparency=0.3) pymol.set('grid_mode',1)
