Talk:InterfaceResidues
Would you say that this is the same thing as a contact map?
Sean
As I understand it a contact map measures distnaces between atoms. This script measures the differences between surface areas for the complex together and then the chains separately. There will be some correlated information, but I believe not exact.
Tree 21:02, 29 June 2009 (UTC)
I was trying to use InterfaceResidues script, but always get:
Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0interfaceResidues(cmpx, cA=\cf4 'c. A'\cf0 , cB=\cf4 'c. B'\cf0 , cutoff=\cf5 1.0\cf0 , selName=\cf4 "interface"\cf0 ): ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>oldDS = \cf7 cmd\cf0 .get(\cf4 "dot_solvent"\cf0 )\ PyMOL>\cf7 cmd\cf0 .\cf8 set\cf0 (\cf4 "dot_solvent"\cf0 , \cf5 1\cf0 )\ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # set some string names for temporary objects/selections Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>tempC, selName1 = \cf4 "tempComplex"\cf0 , selName+\cf4 "1"\cf0 \ PyMOL>chA, chB = \cf4 "chA"\cf0 , \cf4 "chB"\cf0 \ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # operate on a new object & turn off the original Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .create(tempC, cmpx)\ PyMOL>\cf7 cmd\cf0 .disable(cmpx)\ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # remove cruft and inrrelevant chains Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .remove(tempC + \cf4 " and not (polymer and (%s or\'a0%s))"\cf0\cf9 %\cf0(cA, cB))\ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # get the area of the complete complex Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .get_area(tempC, load_b=\cf5 1\cf0 )\ PyMOL>\f2\i \cf6 # copy the areas from the loaded b to the q, field. Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .alter(tempC, \cf4 'q=b'\cf0 )\ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # extract the two chains and calc. the new area Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\f2\i \cf6 # note: the q fields are copied to the new objects Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\f2\i \cf6 # chA and chB Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .extract(chA, tempC + \cf4 " and ("\cf0+ cA + \cf4 ")"\cf0 )\ PyMOL>\cf7 cmd\cf0 .extract(chB, tempC + \cf4 " and ("\cf0+ cB + \cf4 ")"\cf0 )\ PyMOL>\cf7 cmd\cf0 .get_area(chA, load_b=\cf5 1\cf0 )\ PyMOL>\cf7 cmd\cf0 .get_area(chB, load_b=\cf5 1\cf0 )\ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # update the chain-only objects w/the difference Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .alter( \cf4 "%s or\'a0%s"\cf0\cf9 %\cf0(chA,chB), \cf4 "b=b-q"\cf0)\ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # The calculations are done.Now, all we need to Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\f2\i \cf6 # do is to determine which residues are over the cutoff Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\f2\i \cf6 # and save them. Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>stored.r, rVal, seen = [], [], []\ PyMOL>\cf7 cmd\cf0 .iterate(\cf4 '%s or\'a0%s'\cf0\cf9 %\cf0(chA, chB), \cf4 'stored.r.append((model,resi,b))'\cf0 )\ PyMOL>\'a0\ PyMOL>\cf7 cmd\cf0 .enable(cmpx)\ PyMOL>\cf7 cmd\cf0 .\cf7 select\cf0 (selName1, \cf8 None\cf0 )\ PyMOL>\f0\b \cf2 for Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\b0 \cf0(model,resi,diff) Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0(model,resi,diff) ^ SyntaxError: invalid token
PyMOL>\f0\b \cf2 in Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f0\b \cf2 in
^
SyntaxError: invalid token
PyMOL>\f1\b0 \cf0stored.r:\ PyMOL>key=resi+\cf4 "-"\cf0 +model\ PyMOL>\f0\b \cf2 if Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0stored.r: ^ SyntaxError: invalid token
PyMOL>\f1\b0 \cf0\cf8 abs\cf0 (diff)\cf9 >\cf0 =\cf8 float\cf0 (cutoff):\ PyMOL>\f0\b \cf2 if Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0\cf8 abs\cf0 (diff)\cf9 >\cf0 =\cf8 float\cf0 (cutoff): ^ SyntaxError: invalid token
PyMOL>\f1\b0 \cf0key Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0key ^ SyntaxError: invalid token
PyMOL>\f0\b \cf2 in Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f0\b \cf2 in
^
SyntaxError: invalid token
PyMOL>\f1\b0 \cf0seen: Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0seen: ^ SyntaxError: invalid token
PyMOL>\f0\b \cf2 continue Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f0\b \cf2 continue
^
SyntaxError: invalid token
PyMOL>\f1\b0 \cf0 \ PyMOL>\f0\b \cf2 else Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\b0 \cf0 : seen.append(key)\ PyMOL>rVal.append( (model,resi,diff) )\ PyMOL>\f2\i \cf6 # expand the selection here; I chose to iterate over stored.r instead of Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0 : seen.append(key) ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\f2\i \cf6 # creating one large selection b/c if there are too many residues PyMOL Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\f2\i \cf6 # might crash on a very large selection.This is pretty much guaranteed Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\f2\i \cf6 # not to kill PyMOL; but, it might take a little longer to run. Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .\cf7 select\cf0 ( selName1, selName1 + \cf4 " or (%s and i.\'a0%s)"\cf0\cf9 %\cf0(model,resi))\ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # this is how you transfer a selection to another object. Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .\cf7 select\cf0 (selName, cmpx + \cf4 " in "\cf0+ selName1)\ PyMOL>\f2\i \cf6 # clean up after ourselves Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .delete(selName1)\ PyMOL>\cf7 cmd\cf0 .delete(chA)\ PyMOL>\cf7 cmd\cf0 .delete(chB)\ PyMOL>\cf7 cmd\cf0 .delete(tempC)\ PyMOL>\f2\i \cf6 # show the selection Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .enable(selName)\ PyMOL>\'a0\ PyMOL>\f2\i \cf6 # reset users settings Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\i0 \cf0 \ PyMOL>\cf7 cmd\cf0 .\cf8 set\cf0 (\cf4 "dot_solvent"\cf0 , oldDS)\ PyMOL>\'a0\ PyMOL>\f0\b \cf2 return Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\i0 \cf0 ^ SyntaxError: invalid token
PyMOL>\f1\b0 \cf0rVal\ PyMOL>\'a0\ PyMOL>\cf7 cmd\cf0 .extend(\cf4 "interfaceResidues"\cf0 , interfaceResidues)} Traceback (most recent call last): File "/Users/delwarl/MacPyMOL080511/build/Deployment/MacPyMOL.app/pymol/modules/pymol/parser.py", line 455, in parse File "<string>", line 1
\f1\b0 \cf0rVal
^
SyntaxError: invalid token
Can you tell me what I'm doing wrong? Thanks.
Does it help if you put this
- -*- coding: utf-8 -*-
as the first line of the script?
Tree 03:19, 5 February 2010 (UTC)
No, it does not.