I would like to calculate the presence of water molecules number as a function of time, around a ligand during binding to its pocket from a trj.xtc file.
You can import the trj. into VMD and write such a tcl script to calculate the number of water molecules around a ligand inside the active site...here the resname of the ligand is MRV
mol new *.psf
mol addfile *.dcd
set frames [molinfo top get numframes]
set fp [open "waters.txt" w]
set ligand "resname MRV"
for {set i 0} {$i < $frames} {incr i} {
puts "Frame: $i"
set a [atomselect top "(water within 3 of ($ligand) and oxygen)" frame $i]
Hi.. How can I calculate the same as mentioned by Hassan Aryapour ..For example 5Ang volume around a certain group of residues (from different chains Asp263 (chain B) Asp366 (chain C ) that make your binding site --- Within this selection I want count number of waters molecules along the trajectory (its a membrane trajectory with water and lipid POPC).
if you want to calculate the internal volume of a given protein embedded in a membrane, there are better tools to do that. Or I am not interpreting your question right?
However, the above command also works because one of the outputs is an index file containing the list of the atoms that fulfil that particular condition. If you select 'name OW', this will correspond to a single water molecule and the number of entries in each time frame should correspond to the number of water molecules.
My aim to compute number of water molecules within 5 angstrom of two residues belonging two different chains and the compute the number of water molecules around a number of residues along the trajectory (lipid bi-layer trajectory).
Hi..could you please let me know what was there in the index in your case..Like my case I have two residues that are part of catalytic pocket..I want compute the number of water molecules with 5 angstrom of two residues belonging two different chain.
Now you have to add to the select keyword ‘name OW and within xx of ri yyy zzz’. Probably the best eay is to create an group within a index only containing those two residues, so the command will be: -select ‘name OW and within 5 of group Ww’