VMD-L Mailing List
From: Justin Gullingsrud (justinrocks_at_gmail.com)
Date: Thu Feb 03 2005 - 12:41:25 CST
- Next message: John Stone: "Re: How to activate E2SUN emitter"
- Previous message: Harindar Keer: "Re: How to activate E2SUN emitter"
- In reply to: Lubos Vrbka: "Re: prefferential adsorption analysis"
- Next in thread: Lubos Vrbka: "Re: prefferential adsorption analysis"
- Reply: Lubos Vrbka: "Re: prefferential adsorption analysis"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Sure, what you'd have to do then is create a table where you log the
chloride ion resid and its distance in an entry corresponding to the
protein resid. Something like:
lappend contactTable($PROresid) [list $CLresid $dist]
in the inner loop of your script (I forget what the script actually
looked like now). Then, when you're all done, you can see which ions
interacted with which residues just by printing the contents of
$contactTable($PROresid), where $PROresid ranges over the resids of
your protein.
Another way to do it, if you don't want to see more than one contact
between a given pair of residues, would be to do use a two-level index:
lappend contactTable($PROresid,$CLresid) $dist
You can then see what all the pairs of contacts with the command
array names contactTable
and you can count how many contacts there were by getting the length of
the list of distances corresponding to each entry. That'd look
something like
foreach name [array names contactTable] {
foreach {pro cl} [split $name ,] break
puts "got protein residue $pro and CL residue $cl"
set count [llength $contactTable($name)]
puts "contact observed $count times"
}
Cheers,
Justin
On Feb 3, 2005, at 5:52 AM, Lubos Vrbka wrote:
> hi,
>
>> You'd want to use the "measure contacts" command, described in the VMD
>> User's guide. Given two selections, one for CL and one for protein,
>> and a cutoff distance, it will give you lists of corresponding to all
>> CL-protein pairs within that distance. You can then create another
>> set of selections to extract the resid information.
> thank you very much for your excellent hint, the script is great.
> however there is still one question left. this script prints out all
> atoms of the protein structure that are within the specified distance.
> is there any way to simplify the output so, that all atom pairs
> corresponding to the same pair of residues will be printed out only
> once? i.e. instead of printing out 3 contacts of one chloride with 3
> different atoms of 1 aminoacid, only 1 contact between resid of the
> chloride and resid of the aminoacid will be printed out.
>
> thanks for your help,
> lubos
>
> --
> Lubos
> _@_"
>
>
-- The universe is transformation: life is opinion. -- marcus aurelius
- Next message: John Stone: "Re: How to activate E2SUN emitter"
- Previous message: Harindar Keer: "Re: How to activate E2SUN emitter"
- In reply to: Lubos Vrbka: "Re: prefferential adsorption analysis"
- Next in thread: Lubos Vrbka: "Re: prefferential adsorption analysis"
- Reply: Lubos Vrbka: "Re: prefferential adsorption analysis"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]