[gmx-developers] reading velocity in gmx_msd.c
David van der Spoel
spoel at xray.bmc.uu.se
Tue May 18 23:16:04 CEST 2010
On 2010-05-18 23.10, Gaurav Goel wrote:
> I am modifying the 'g_msd' utility to be able to calculate viscosities
> using the corresponding Einstein relationship according to equation
> 3.14 in Helfand E., Physical Review, 119, 1, 1960. The equation is
> similar to the mean-square displacement equation for self-diffusion
> coefficient with the position vector 'r_i ' replaced by 'r_ix p_iy'
> where p_iy is the particle momenta in y-direction.
>
> So basically I need to be able to read both position and velocities
> from the trajectory. Presently, gmx_msd.c uses 'read_first_x' and
> 'read_next_x' to read the coordinates. Can you please comment on how I
> can modify this code to read the corresponding velocities?
>
> Any help is greatly appreciated.
>
> thanks,
> Gaurav
From include/statutil.h:
extern bool read_next_frame(const output_env_t oenv,int
status,t_trxframe *fr);
/* Reads the next frame which is in accordance with fr->flags.
* Returns TRUE when succeeded, FALSE otherwise.
*/
Do also checkout
g_tcaf -h
--
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone: +46184714205.
spoel at xray.bmc.uu.se http://folding.bmc.uu.se
More information about the gromacs.org_gmx-developers
mailing list