PYMOL: Output Polar Contacts Between Chains to Text File
Entering edit mode
2.6 years ago

I am new to PyMOL but have a very specific task that I need to do.

I have a PDB structure file of protein homo-oligomer, and I want to use PyMol to determine polar contacts between chain A and all other chains.

However, I not only want to visualize these polar contacts (which is easy to do via PyMOL GUI), but I also want to be able to store/save pairs of interacting residues in a dictionary or whatever may be the most convenient data structure to do this. The end goal to create a sort of "interaction map" in a csv or text file where each interacting pair of residues has its own line.

I would ideally like to do this via a Python script where I call the PyMOL API or through a PYMOL script - whichever is easier.

I have reviewed a similar question on Stack Overflow ( but found it unhelpful because I not only want to select and visualize these polar contacts but also want to save/record them in a list or dictionary (and then to a text or csv file), which the above question does not address.

PyMol Python • 1.9k views
Entering edit mode

Cross-posted and answered on bioinfo SE:


Please do not create the same post on multiple forums - it is bad etiquette and is frowned upon. See this discussion:


Login before adding your answer.

Traffic: 2780 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6