Residue Distribution 1.3 ------------------------ REQUIREMENTS: VMD Version 1.1 or greater (?) CHANGELOG: 1.1 fixed some wrong variable names 1.2 added parentheses around $sel1 to ensure correct function 1.3 added parameter for output filenames prefix and changed output name DESCRIPTION: Script for extracting distribution of residues of givent type around selection (e.g. distribution of given type of ions around protein). HOW IT WORKS: Script goes through the defined range of distances and counts number of residues of specified type located within the distance of selection. Residues are defined by means of their name (rname) and the name of atom that is part of this residue and is unique in it (aname). Script selects all atoms of residues of given type within the distance of selection and then counts number of aname atoms. This gives the number of residues. Please make sure that your structure is imaged and centered. VMD doesn't support handling PBC in "within" and similar commands yet. See the script itself for more information. PROCEDURES: getResDistrib - main procedure EXAMPLE USAGE AND OUTPUT: usage: getResDistrib "sel1" "aname" "rname" min_distance max_distance step output_prefix > Optional startframe/endframe parameters define range of frames from the trajectory, that should be analyzed. If omitted, whole trajectory is parsed example: getResDistrib "protein" "N1" "CHL" 1.0 50. 0.5 1 100 "chl" This analyzes average distribution of CHL residues (represented by atom N1) around the protein. Range of distances from 1.0 to 50.0 A will be used, with step 0.5 A. Only frames 1 to 100 will be parsed. Output goes to file output_prefix-distrib.dat (i.e. chl-distrib.dat in our case) and has following format distance number of residues within this distance of selection i.e. 1.0 0.0 1.5 0.011 2.0 1.492 2.5 4.9035 ... 49.0 35.0 49.5 35.0 50.0 35.0 for system with 35 CHL residues in simulation box. DOWNLOAD FILE: _res_distrib.tcl AUTHOR: Lubos Vrbka (lubos (dot) vrbka (at) gmail (dot) com)