Contact Residues 1.2 -------------------- REQUIREMENTS: VMD Version 1.1 or greater (?) CHANGELOG: 1.1 fixed some wrong variable names 1.2 added parameter for output filenames prefix DESCRIPTION: Script analyzing contacts between 2 groups of residues, e.g. contacts between residues of a protein and ions. HOW IT WORKS: Script uses VMD measure contacts command to find all contacts between residues from 2 different selections fulfilling the distance criterion. All atom contacts between 1 pair of residues in 1 frame are tken as a single residue contact. Please make sure that your structure is imaged and centered. VMD doesn't support handling PBC in "measure" and similar commands yet. See the script itself for more information. PROCEDURES: fResContactSingle - analyzes contacts for single (active) frame, prints output to vmd console fResContact - analyzes the whole trajectory, prints output to files EXAMPLE USAGE AND OUTPUT: usage: fResContactSingle "sel1" "sel2" cutoff fResContact "sel1" "sel2" cutoff output_name_prefix > Optional startframe/endframe parameters define range of frames from the trajectory, that should be analyzed. If omitted, whole trajectory is parsed example: fResContactSingle "protein" "resname CL" 3.5 finds all contacts between protein and CL residues (distance <=3.5A) output: 38 ARG - 81 CL - 2.393458 7 PRO - 113 CL - 3.178880 16 ARG - 110 CL - 2.513435 0 ARG - 105 CL - 2.424728 40 LYS - 86 CL - 3.424543 6 GLU - 113 CL - 3.340827 i.e. sel1 residue + name - sel2 residue + name - smallest contact distance between these 2 residues one pair per line example 2: fResContact "protein" "resname CL" 3.5 1 100 "cl" performs the same analysis for frames 1 to 100, prints output to 4 files: 1) cl-contact_all.dat 1 line per contact and frame frame number, contacting residues, minimal distance 2) cl-contactAB.dat 1 line per residue pair contacting residues, number of frames when these residues were in contact and percentage of the analyzed trajectory 3),4) cl-contactA.dat, cl-contactB.dat 1 line per residue total number of contacts for each residue + percentage percentage values: 1 residue is expected to have max. 1 contact in 1 frame; i.e. percentage = contacts/frames these values can be misleading, since 1 res from sel1 can interact with 2 residues from sel2 - depending on size and character of the residues example 3: protein residues 1 (ARG), 5 (LYS) are in contact with 10 (CL) cl-contact_all.dat: (frame, res1, res2, distance) 1 1 ARG - 10 CL 3.50000 1 5 LYS - 10 CL 2.90000 cl-contact_AB.dat: (res1, res2, contact percentage, contact length) 1 ARG - 10 CL 100% (1 frame(s)) 5 LYS - 10 CL 100% (1 frame(s)) cl-contactA.dat: (res1, total contact percentage, total contact length) 1 ARG - 100% (1 contact(s)) 5 LYS - 100% (1 contact(s)) cl-contactB.dat: (res2, total contact percentage, total contact length) 10 CL - 200% (2 contact(s)) DOWNLOAD FILE: _contact.tcl AUTHOR: Lubos Vrbka (lubos (dot) vrbka (at) gmail (dot) com)