X-posted from the Main Stack Overflow because folks here are possibly more familiar with PyMol(?)

I have been trying to assess the strength of an interface I want to mutate using Pymol. What I am interested in is a list of contacts withing a specified interface (which I have calculated using the InterfaceResidues.py script from the PyMol wiki script library). My aim is to produce a bunch of mutants using the mutagenesis wizard and assess how the HBond network changes.

Actions>Find>Polar Contacts does the trick in visualising them, but doesn't output a file with numbers which I can then crunch to assess which mutations weaken my interface most. I have been trying the scripts list_contacts.py and list_hb.py from Prof. Robert Campbell of Queen's University at Kingston, but with limited success (nothing gets printed or written to the file). The scripts can be found here http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/

I am going to contact Prof. Campbell directly re: scripts but, in the meantime, and in case he's too busy to deal with a Pymol noob, does anyone have any ideas of what else I could try?

I am using Pymol 2.3.1 and Python 3.7.1

  • $\begingroup$ Use Biopython pdb, cross check manually in Pymol a subset of the output $\endgroup$
    – M__
    Commented May 15, 2020 at 22:21
  • $\begingroup$ @Michael it's not clear to me that Biopython.PDB would be better here than PyMOL. $\endgroup$
    – marcin
    Commented May 18, 2020 at 15:33
  • $\begingroup$ How do you use these script? I had only a quick look at them: running these scripts defines a new command in PyMOL. Then you need to run that command. $\endgroup$
    – marcin
    Commented May 18, 2020 at 15:35
  • $\begingroup$ Covered here: bioinformatics.stackexchange.com/questions/12862/… $\endgroup$ Commented May 19, 2020 at 21:33
  • $\begingroup$ @marcin I need to get the list of contacts and their distances for further analysis, not just visualise them. $\endgroup$
    – LauraCZD
    Commented May 22, 2020 at 14:08

1 Answer 1


Thanks a lot to all who commented/replied, the author of the scripts provided a response. It was down to a syntax change in PyMol of which I wasn't aware that caused my selection to come up empty.

  • $\begingroup$ Can you expound upon the syntax change, ideally giving the exact line or two of code in question? That may help others running into the same problem. $\endgroup$
    – Devon Ryan
    Commented May 22, 2020 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.