From: Adupa Vasista (adupavasista_at_gmail.com)
Date: Thu Apr 16 2020 - 09:44:21 CDT

It will not calculate the minimum distance, but you need to give a minimum
distance, in your case 5 A of the entire protein. But this script will not
give you for each frame, rather it gives as a whole.

Let's say you need to calculate the Number of Contacts between a chain of
the protein and your ligand at distance criteria of 5 A for the entire
simulation, then the command will be after sourcing the file: *fResPair
"protein and chain A" "ligand_resname" 5 $Firstframe $Lastframe*.

 If you *run a for loop for the frames*, I guess you will get what you need.

Thank you.

On Thu, Apr 16, 2020 at 7:51 PM Akash Pandya <akashpandya93_at_gmail.com>
wrote:

> Thank you for your response/suggestion. I'm not interested in calculating
> minimum distance. I just simply want to obtain the number of ligand
> molecules within 5 A of each residue. Currently, I have an output file with
> frame number and number of molecules. I want the output to have number of
> molecules for each of the 442 residues for each time frame, if that makes
> sense. So from my script, do you have any suggestions on how I can achieve
> this?
>
> Many thanks,
> Akash
>
> On Thu, Apr 16, 2020 at 2:24 PM Adupa Vasista <adupavasista_at_gmail.com>
> wrote:
>
>> Dear Akash, It is similar to finding contacts of a ligand with a protein.
>> Then, I suggest you use this script
>>
>> https://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/att-5681/newcontacts.tcl
>>
>> Thank you.
>>
>> On Thu, Apr 16, 2020 at 6:18 PM Akash Pandya <akashpandya93_at_gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am new to the VMD mailing list. I want to count the number of ligand
>>> molecules within 5 A around my protein. So I wrote a tcl script for this
>>> (shown below):
>>>
>>> set frames [molinfo top get numframes]
>>> set fp [open "LIG.txt" w]
>>> set protein "resid 1 to 442"
>>> for {set i 0} {$i < $frames} {incr i} {
>>> puts "Frame: $i"
>>> set a [atomselect top "(index 6616 to 8155 and same
>>> index as within 5 of ($protein))" frame $i]
>>> set num [$a num]
>>> puts $fp "$i $num"
>>> $a delete
>>> }
>>> close $fp
>>>
>>> index 6616 to 8155 is my ligand. This script gives the number of ligand
>>> molecules at each time frame. So my question is what command can I enter to
>>> also get the number of ligand molecules around EACH RESIDUE (resid 1 to
>>> 442)?
>>>
>>> Cheers,
>>> Akash
>>>
>>>
>>
>> --
>>
>> *A.VasistaM.Tech,Department Of Chemical Engineering,*
>> *IIT Guwahati.*
>>
>

-- 
*A.VasistaM.Tech,Department Of Chemical Engineering,*
*IIT Guwahati.*