---
name: "g_bond"
section: "1"
platform: "linux"
package: "gromacs-data"
version: "4.5.5-2"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/g_bond"
---

# g\_bond(1)

calculates distances between atoms VERSION 4.5.4-dev-20110404-bc5695c

## NAME

g\_bond - calculates distances between atoms

**VERSION 4.5.4-dev-20110404-bc5695c**

## SYNOPSIS

**g\_bond** **-f** *traj.xtc*  **-n** *index.ndx*  **-s** *topol.tpr*  **-o** *bonds.xvg*  **-l** *bonds.log*  **-d** *distance.xvg*  **-\[no\]h** **-\[no\]version** **-nice** *int*  **-b** *time*  **-e** *time*  **-dt** *time*  **-\[no\]w** **-xvg** *enum*  **-blen** *real*  **-tol** *real*  **-\[no\]aver** **-\[no\]averdist**

## DESCRIPTION

 **g\_bond** makes a distribution of bond lengths. If all is well a Gaussian distribution should be made when using a harmonic potential. Bonds are read from a single group in the index file in order i1-j1 i2-j2 through in-jn.

 **-tol** gives the half-width of the distribution as a fraction of the bondlength ( **-blen**). That means, for a bond of 0.2 a tol of 0.1 gives a distribution from 0.18 to 0.22.

Option  **-d** plots all the distances as a function of time. This requires a structure file for the atom and residue names in the output. If however the option  **-averdist** is given (as well or separately) the average bond length is plotted instead.

## FILES

**-f** *traj.xtc* **Input**\
  Trajectory: xtc trr trj gro g96 pdb cpt

**-n** *index.ndx* **Input**\
  Index file

**-s** *topol.tpr* **Input, Opt.**\
  Structure+mass(db): tpr tpb tpa gro g96 pdb

**-o** *bonds.xvg* **Output**\
  xvgr/xmgr file

**-l** *bonds.log* **Output, Opt.**\
  Log file

**-d** *distance.xvg* **Output, Opt.**\
  xvgr/xmgr file

## OTHER OPTIONS

**-\[no\]h***no*    \
  Print help info and quit

**-\[no\]version***no*    \
  Print version info and quit

**-nice** *int* **19**\
  Set the nicelevel

**-b** *time* **0**     \
  First frame (ps) to read from trajectory

**-e** *time* **0**     \
  Last frame (ps) to read from trajectory

**-dt** *time* **0**     \
  Only use frame when t MOD dt = first time (ps)

**-\[no\]w***no*    \
  View output  **.xvg**,  **.xpm**,  **.eps** and  **.pdb** files

**-xvg** *enum* **xmgrace**\
  xvg plot formatting:  **xmgrace**,  **xmgr** or  **none**

**-blen** *real* **-1**    \
  Bond length. By default length of first bond

**-tol** *real* **0.1**   \
  Half width of distribution as fraction of blen

**-\[no\]aver***yes*   \
  Average bond length distributions

**-\[no\]averdist***yes*   \
  Average distances (turns on  **-d**)

## KNOWN PROBLEMS

\- It should be possible to get bond information from the topology.

## SEE ALSO

**[gromacs(7)](/gromacs/7.md)**

More information about **GROMACS** is available at \<*http://www.gromacs.org/*\>.
