Hello All,
I am attempting to write a script that take a single residue of interest in a protein and then creates a selection that is all residues within 4 Angstroms of that residue. Then I would like to find the polar contacts within that new expanded selection and print out the pair of residue names, residue numbers, the atom names involved in the contact and the distance to a text file.
#select interest, resi 463
cmd.select ("interest","(resi 463)")
#Action, modify, expand, by 4 A, residues
cmd.select("exp_interest","(byres (interest expand 4))",enable=1)
# show lines for all within 4 Ang
cmd.show("lines" ,"exp_interest")
#show sticks for residue of interest
cmd.show("sticks" ,"interest")
#Action, find, polar contact, within selection
#distance exp_interest_polar, exp_interest, exp_interest, 3.6, 2
cmd.dist("interest_polar_conts","exp_interest","exp_interest",quiet=1,mode=2,label=1,reset=1);cmd.enable("interest_polar_conts")
I am using the command:
cmd.dist("interest_polar_conts","exp_interest","exp_interest",quiet=1,mode=2,label=1,reset=1);cmd.enable("interest_polar_conts")
to find the polar contacts.
This command creates an object in the panel but I cannot figure out how to print the information I am seeing, like the distance and the atoms involved, in the viewer to a file.
Thanks for the help,
Amanda
