6 Nargs =
len(sys.argv)-1
9 print 'Usage: contacts.py <pdb> parse=<parserule> mode=<mode> output=<output> <file>'
10 print "Any order of arguments is acceptable and most arguments are optional\n"
11 print 'pdb is mandatory\n'
12 print "parserule has several options (optional; default = 'all')"
13 print "'all': whole protein; all chains and all heteroatoms"
14 print "'A', 'AB', etc. - any chain(s) from the protein including heteroatoms of that chainID"
15 print "'A-B', 'AB-C': interface between chains separated by '-' "
16 print "'A-ligand', 'all-ligand' - a subset or the whole protein against ligand (binding sites)\n"
17 print "mode has several options (optional; default = 'fullatom')"
18 print "fullatom - all atom-atom contacts"
19 print "calpha - all CA-CA pairs within 7.0A"
20 print "sccentroid - all sidechain centroid-centroid pairs within 6.0A\n"
21 print "output can be either 'list' or 'profile' (optional; default = 'list')"
22 print "'list' is a list of individual contacts"
23 print "'profile' is table of total number of contacts for each residue"
24 print "'both' will output both forms; you should use this only if you turn on 'file'\n"
25 print "'file', if added to the arglist, will output a file for the type of output you specified"
26 print "'pdb.contactmap' for 'list' or 'pdb.contactprofile' for 'profile'"
35 arglist = sys.argv[1:Nargs+1]
40 if arg[0:5] ==
'parse':
41 parserule = string.split(arg,
'=')[1]
43 if arg[0:4] ==
'mode':
44 mode = string.split(arg,
'=')[1]
46 if arg[0:6] ==
'output':
47 output = string.split(arg,
'=')[1]
53 contactObject.initializePDB(pdb)
54 contactObject.find_contacts(parserule)
56 if output
in [
'list',
'both']:
57 contactObject.outputMap(dest, pdb)
58 if output
in [
'profile',
'both']:
59 contactObject.initContactProfile()
60 contactObject.outputProfile(dest, pdb)
Fstring::size_type len(Fstring const &s)
Length.