dkoes / show_contacts

PyMOL Plugin for displaying polar contacts
MIT License
15 stars 10 forks source link

Scripting show_contacts.py - what is the syntax? #1

Open buzuddha opened 2 years ago

buzuddha commented 2 years ago

I can't seem to script this command. I can get the GUI interface to show contacts, but simply cannot get the syntax right! :(

PyMOL>show_contacts /3IXT/C/P,  /3IXT/C/H,result="contacts", cutoff=3.6, bigcutoff=4.0
  File "toplevel", line 1
    show_contacts /3IXT/C/P,  /3IXT/C/H,result="contacts", cutoff=3.6, bigcutoff=4.0
                    ^

I've tried scripting this chain names, chain names set to variables, nothing seems to work! What am I missing?! Sorry, clearly I've been banging my head against this wall for too long now.

Many thanks for your help!

dkoes commented 2 years ago

The confusion here is that the function name in python is show_contacts, but the command that is registered is contacts: cmd.extend('contacts', show_contacts) #contacts to avoid clashing with cluster_mols version

contacts /3IXT/C/P, /3IXT/C/H,result="contacts", cutoff=3.6, bigcutoff=4.0 should work

marksev1 commented 1 month ago

Reusing this issue for another question, why doesn't it select a "list" of residues - or make a selection by residue. It just draws the dashes and distances....So there is missing information about the residues involved? Or am I missing something?

dkoes commented 1 month ago

I don't understand your question. You provide the selections so you can select whatever you want however you want.

marksev1 commented 1 month ago

I was not implying to the input - yes I select the two selections, I was talking about the output of the script. I thought the the output of the script would be a new selection of "interfacing" residues. Yet the script provides just "lines"/"dashes" between the residues, visually indicating where the contact points would be, without actually making a selection of those "interfacing residues".

dkoes commented 1 month ago

Correct, that is the intended behavior. Pull requests with improvements always appreciated.