PK added extern C for rmpbc and atomprop
[gromacs.git] / include / position.h
blob84540000a91277d1aef0c9b93393380c4af764c9
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 handling positions.
34 #ifndef POSITION_H
35 #define POSITION_H
37 #include <typedefs.h>
39 #include <indexutil.h>
41 #ifdef __cplusplus
42 extern "C"
44 #endif
46 /*! \brief
47 * Stores a set of positions together with their origins.
49 typedef struct gmx_ana_pos_t
51 /*! \brief
52 * Number of positions.
54 int nr;
55 /*! \brief
56 * Array of positions.
58 rvec *x;
59 /*! \brief
60 * Mapping of the current positions to the original group.
62 * \see gmx_ana_indexmap_t
64 gmx_ana_indexmap_t m;
65 /*! \brief
66 * Pointer to the current evaluation group.
68 gmx_ana_index_t *g;
69 } gmx_ana_pos_t;
71 //! Initializes an empty position structure.
72 extern void
73 gmx_ana_pos_clear(gmx_ana_pos_t *pos);
74 //! Ensures that enough memory has been allocated to store positions.
75 extern void
76 gmx_ana_pos_reserve(gmx_ana_pos_t *pos, int n, int isize);
77 //! Initializes a \c gmx_ana_pos_t to represent a constant position.
78 extern void
79 gmx_ana_pos_init_const(gmx_ana_pos_t *pos, rvec x);
80 //! Frees the memory allocated for position storage.
81 extern void
82 gmx_ana_pos_deinit(gmx_ana_pos_t *pos);
83 //! Frees the memory allocated for positions.
84 extern void
85 gmx_ana_pos_free(gmx_ana_pos_t *pos);
86 //! Copies the evaluated positions to a preallocated data structure.
87 extern void
88 gmx_ana_pos_copy(gmx_ana_pos_t *dest, gmx_ana_pos_t *src, bool bFirst);
90 #ifdef __cplusplus
92 #endif
94 #endif