pylipid.api.LipidInteraction.save_pymol_script

LipidInteraction.save_pymol_script(pdb_file, save_dir=None)[source]

Save a pymol script that maps interactions onto protein structure in PyMol.

This method will save a python script, named show_binding_site_info.py, which opens a PyMol session and maps the binding site information to the receptor coordinates in that session. The receptor coordinate is provided through the parameter pdb_file. As PyMol only recognize atomistic structures, it needs a receptor atomistic structure before coarse-graining for those coarse-grained simulations. For the MARTINI simulations, the receptor atomistic coordinate can be the one used by martinize.py, which is a python script that converts atomistic structures to MARTINI corase-grained models. Regardless of the simulation models, the provided receptor atomistic coordinates should have the same topology as in the simulations.

In the PyMol session, residues from the same binding sites are shown in the same color and shown in spheres with scales corresponding to their lipid residence times. This PyMol session can provide a quick overview of the binding sites and provide a better understanding of the structural details.

By default, this script is saved under the directory Dataset_{lipid}, together with the file Dataset.csv, from which the script reads the interaction data. The directory for storing the script can be changed by providing a path to save_dir.

Parameters
  • pdb_file (str) – The file of receptor atomistic coordinates.

  • save_dir (str, optional, default=None) – The directory for saving the python script. By default, the script is saved at the directory of Dataset_{lipid}, together with the file Dataset.csv, from which it reads the interaction data.

See also

pylipid.util.write_pymol_script

Write Python script that opens a PyMol session with binding site information.