fixed gmxGenerateVersionInfo.cmake to produce 8 digit date when the day is only 1...
[gromacs/qmmm-gamess-us.git] / include / displacement.h
blob282dbb9c087e51255a592fd197cced39dbea21a5
1 /*
3 * This source code is part of
5 * G R O M A C S
7 * GROningen MAchine for Chemical Simulations
9 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
10 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
11 * Copyright (c) 2001-2009, The GROMACS development team,
12 * check out http://www.gromacs.org for more information.
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * If you want to redistribute modifications, please consider that
20 * scientific software is very special. Version control is crucial -
21 * bugs must be traceable. We will be happy to consider code for
22 * inclusion in the official distribution, but derived work must not
23 * be called official GROMACS. Details are found in the README & COPYING
24 * files - if they are missing, get the official version at www.gromacs.org.
26 * To help us fund GROMACS development, we humbly ask that you cite
27 * the papers on the package - you can find them in the top README file.
29 * For more info, check our website at http://www.gromacs.org
31 /*! \file
32 * \brief API for on-line calculation of displacements.
34 * The API is documented in more detail on a separate page:
35 * \ref displacements
37 * The functions within this file can be used and developed independently of
38 * the other parts of the library.
39 * Other parts of the library do not reference these functions.
41 #ifndef DISPLACEMENT_H
42 #define DISPLACEMENT_H
44 #include <typedefs.h>
46 #ifdef __cplusplus
47 extern "C"
49 #endif
51 /** Data structure for displacement calculation. */
52 typedef struct gmx_ana_displ_t gmx_ana_displ_t;
54 struct gmx_ana_pos_t;
56 /** Allocates memory for displacement calculation. */
57 extern int
58 gmx_ana_displ_create(gmx_ana_displ_t **d, int nmax, real tmax);
59 /** Initializes displacement calculation for a frame. */
60 extern int
61 gmx_ana_displ_start_frame(gmx_ana_displ_t *d, real t);
62 /** Returns the number of steps corresponding to a given time interval. */
63 extern int
64 gmx_ana_displ_time_to_steps(gmx_ana_displ_t *d, real time, int *nsteps);
65 /** Stores the position of a particle for displacement calculation. */
66 extern int
67 gmx_ana_displ_store(gmx_ana_displ_t *d, atom_id id, rvec x, bool bPres);
68 /** Convenience function for storing an array of particle positions for displacement calculation. */
69 extern int
70 gmx_ana_displ_store_array(gmx_ana_displ_t *d, int n, atom_id id[], rvec x[]);
71 /** Stores an array of particle positions for displacement calculation, including unselected particles. */
72 extern int
73 gmx_ana_displ_store_all(gmx_ana_displ_t *d, atom_id id[], rvec x[]);
74 /** Convenience function for storing a set of positions from \c gmx_ana_pos_t. */
75 extern int
76 gmx_ana_displ_store_pos(gmx_ana_displ_t *d, struct gmx_ana_pos_t *p);
77 /** Calculates the displacement vector for a particle. */
78 extern int
79 gmx_ana_displ_vector(gmx_ana_displ_t *d, int step, t_pbc *pbc,
80 atom_id id, rvec x, rvec xout, bool *pout);
81 /** Calculates the displacement vectors for a list of particles. */
82 extern int
83 gmx_ana_displ_vectors(gmx_ana_displ_t *d, int step, t_pbc *pbc,
84 int n, atom_id id[], rvec x[],
85 rvec xout[], bool *pout);
86 /** Calculates the displacement vectors for all particles, including unselected. */
87 extern int
88 gmx_ana_displ_vectors_all(gmx_ana_displ_t *d, int step, t_pbc *pbc,
89 rvec x[], rvec xout[], bool *pout);
90 /** Frees the memory allocated for displacement calculation. */
91 extern void
92 gmx_ana_displ_free(gmx_ana_displ_t *d);
94 #ifdef __cplusplus
96 #endif
98 #endif