GMX-TCAF(1)
โจ gmx-tcaf โ calculate viscosities of liquids โจ
okay bestie, welcome to the GROMACS corner of the manual ๐ this one lives in the gmx-tcaf(1) page and it is literally about figuring out how thick and syrupy your liquid is. let's get into it ๐ซถ
๐ธ NAME ๐ธ
gmx-tcaf โ Calculate viscosities of liquids
๐ SYNOPSIS ๐
gmx tcaf [-f [<.trr/.cpt/...>]] [-s [<.tpr/.gro/...>]] [-n [<.ndx>]]
[-ot [<.xvg>]] [-oa [<.xvg>]] [-o [<.xvg>]] [-of [<.xvg>]]
[-oc [<.xvg>]] [-ov [<.xvg>]] [-b <time>] [-e <time>]
[-dt <time>] [-[no]w] [-xvg <enum>] [-[no]mol] [-[no]k34]
[-wt <real>] [-acflen <int>] [-[no]normalize] [-P <enum>]
[-fitfn <enum>] [-beginfit <real>] [-endfit <real>]
๐ DESCRIPTION ๐
so gmx tcaf computes tranverse current autocorrelations (yes that's how it's spelled in the source, we're keeping it fr fr ๐). what are those for? estimating the shear viscosity, eta. for the full lore see: Palmer, Phys. Rev. E 49 (1994) pp 359-366. ๐
k so here's how the k-vectors shake out, and bestie this part is very specific:
(1,0,0)and(2,0,0), each also in the y- and z-direction(1,1,0)and(1,-1,0), each also in the 2 other planes (heads up, these vectors are not independent)(1,1,1)and the 3 other box diagonals (also not independent)
for every single k-vector it uses the sine and cosine, combined with the velocity in 2 perpendicular directions. do the math and you get a total of 16*2*2=64 transverse currents. ๐งฎ one autocorrelation is calculated fitted for each k-vector, which gives 16 TCAFs. each of these TCAFs gets fitted to:
f(t) = exp(-v)(cosh(Wv) + 1/W sinh(Wv)), v = -t/(2 tau), W = sqrt(1 - 4 tau eta/rho k^2)
which hands you 16 values of tau and eta. the fit weights decay exponentially with time constant w (that's the one you set with -wt) as exp(-t/w), and the TCAF plus its fit are calculated up to time 5*w. then those eta values should be fitted to 1 - a eta(k) k^2, and from that you can estimate the shear viscosity at k=0. iconic behavior honestly ๐
if the box is cubic, you can use the option -oc, which averages the TCAFs over all k-vectors with the same length. this results in more accurate TCAFs. both the cubic TCAFs and fits are written to -oc. the cubic eta estimates are also written to -ov. ๐ฆ
with option -mol, the transverse current is determined of molecules instead of atoms. in this case, the index group should consist of molecule numbers instead of atom numbers. don't mix those up bestie ๐ญ
the k-dependent viscosities in the -ov file should be fitted to:
eta(k) = eta_0 (1 - a k^2)
to obtain the viscosity at infinite wavelength. infinite. wavelength. slay. โจ
Note: make sure you write coordinates and velocities often enough. the initial, non-exponential, part of the autocorrelation function is very important for obtaining a good fit. like, do not skip this. the fit will be giving nothing if you skimp on frames ๐
๐ OPTIONS ๐
๐ Options to specify input files
-f [<.trr/.cpt/...>](traj.trr) โ Full precision trajectory:trrcpttngh5md-s [<.tpr/.gro/...>](topol.tpr) (Optional) โ Structure+mass(db):tprgrog96pdbbrkent-n [<.ndx>](index.ndx) (Optional) โ Index file
๐ง Options to specify output files
-ot [<.xvg>](transcur.xvg) (Optional) โ xvgr/xmgr file-oa [<.xvg>](tcaf_all.xvg) โ xvgr/xmgr file-o [<.xvg>](tcaf.xvg) โ xvgr/xmgr file-of [<.xvg>](tcaf_fit.xvg) โ xvgr/xmgr file-oc [<.xvg>](tcaf_cub.xvg) (Optional) โ xvgr/xmgr file-ov [<.xvg>](visc_k.xvg) โ xvgr/xmgr file
๐ Other options
-b <time>(0) โ Time of first frame to read from trajectory (default unit ps)-e <time>(0) โ Time of last frame to read from trajectory (default unit ps)-dt <time>(0) โ Only use frame whent MOD dt = first time(default unit ps)-[no]w(no) โ View output.xvg,.xpm,.epsand.pdbfiles-xvg <enum>(xmgrace) โ xvg plot formatting:xmgrace,xmgr,none-[no]mol(no) โ Calculate TCAF of molecules-[no]k34(no) โ Also usek=(3,0,0)andk=(4,0,0)-wt <real>(5) โ Exponential decay time for the TCAF fit weights-acflen <int>(-1) โ Length of the ACF, default is half the number of frames-[no]normalize(yes) โ Normalize ACF-P <enum>(0) โ Order of Legendre polynomial for ACF (0 indicates none):0,1,2,3-fitfn <enum>(none) โ Fit function:none,exp,aexp,exp_exp,exp5,exp7,exp9-beginfit <real>(0) โ Time where to begin the exponential fit of the correlation function-endfit <real>(-1) โ Time where to end the exponential fit of the correlation function,-1is until the end
๐ฆ SEE ALSO ๐ฆ
More information about GROMACS is available at <http://www.gromacs.org/>.
๐ COPYRIGHT ๐
2026, GROMACS development team
and that's the whole page bestie, no cap ๐ซถ this was GROMACS version 2026.4, dated Oct 02, 2026, and it's the GMX-TCAF(1) manual page. go get those viscosity numbers, you're the main character of this simulation ๐โจ๐
๐ฆ where this page comes from
- nixpkgs unstable: gromacs 2026.4
- ubuntu stonking: gromacs-data 2026.4-1ubuntu1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms