# [gmx-users] Occupancy for a distance cut off

Justin Lemkul jalemkul at vt.edu
Tue Feb 12 03:29:49 CET 2013

```
On 2/11/13 9:16 PM, ram bio wrote:
> Hi Justin,
>
> Thanks for the suggestion.
>
> I executed the following command:
>
> g_dist -f n101c2naclprod2-12nsvrpr.trr -s
> n101c2naclpose2prod2nsvrpr.tpr -n index.ndx -dist 0.35  -o
> N101Cbest2NACL606S336HG1.xvg
>
> and the output was distance calculated for every 10 frames in nm as under:
>
> t: 11870  336 SER 4166 HG1  0.239086 (nm)
> t: 11880  336 SER 4166 HG1  0.248868 (nm)
> t: 11890  336 SER 4166 HG1  0.231819 (nm)
> t: 11900  336 SER 4166 HG1  0.218495 (nm)
> t: 11910  336 SER 4166 HG1  0.233166 (nm)
> t: 11920  336 SER 4166 HG1  0.283512 (nm)
> t: 11930  336 SER 4166 HG1  0.239512 (nm)
> t: 11940  336 SER 4166 HG1  0.216938 (nm)
> t: 11950  336 SER 4166 HG1  0.220066 (nm)
> t: 11960  336 SER 4166 HG1  0.227595 (nm)
> t: 11970  336 SER 4166 HG1  0.247895 (nm)
> t: 11980  336 SER 4166 HG1  0.259074 (nm)
> t: 11990  336 SER 4166 HG1  0.228319 (nm)
> t: 12000  336 SER 4166 HG1  0.264722 (nm)
>
> So, my question is that now  do maths and find percent frames that
> were above the 3.5 Å and expresses it relation to unity for occupancy.
> That is if i have 30 frames above 3.5Å out of 100, then the occupancy
> would be 0.7.
>
> Please advice if there is any other ways to do it..
>

Redirect the output into a file, count the number of lines in the file with wc
-l and you have the answer.

-Justin

--
========================================

Justin A. Lemkul, Ph.D.
Research Scientist
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

========================================

```