Sort all includes in src/gromacs
[alexxy/gromacs.git] / src / gromacs / legacyheaders / vsite.h
index 173ce26ec8cf4215f2ae79f746e92814bf8179d6..6cbecbe391848c82ca8ece2979f755eff43458da 100644 (file)
@@ -1,62 +1,52 @@
 /*
+ * This file is part of the GROMACS molecular simulation package.
  *
- *                This source code is part of
- *
- *                 G   R   O   M   A   C   S
- *
- *          GROningen MAchine for Chemical Simulations
- *
- *                        VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
  * of the License, or (at your option) any later version.
  *
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
  *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
  *
- * For more info, check our website at http://www.gromacs.org
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
  *
- * And Hey:
- * Gromacs Runs On Most of All Computer Systems
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
  */
 
 #ifndef _vsite_h
 #define _vsite_h
 
 #include <stdio.h>
-#include "typedefs.h"
-#include "types/commrec.h"
+
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/pbcutil/ishift.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-typedef struct {
-    int *      left_import_construct;
-    int        left_import_nconstruct;
-    int *      left_export_construct;
-    int        left_export_nconstruct;
-    int *      right_import_construct;
-    int        right_import_nconstruct;
-    int *      right_export_construct;
-    int        right_export_nconstruct;
-    rvec *     send_buf;
-    rvec *     recv_buf;
-} t_comm_vsites;
-
 typedef struct {
     t_ilist ilist[F_NRE];     /* vsite ilists for this thread            */
     rvec    fshift[SHIFTS];   /* fshift accumulation buffer              */
@@ -70,19 +60,19 @@ typedef struct {
     int              ***vsite_pbc_molt;       /* The pbc atoms for intercg vsites        */
     int               **vsite_pbc_loc;        /* The local pbc atoms                     */
     int                *vsite_pbc_loc_nalloc; /* Sizes of vsite_pbc_loc                  */
-    gmx_bool            bPDvsitecomm;         /* Do we need vsite communication with PD? */
-    t_comm_vsites      *vsitecomm;            /* The PD vsite communication struct       */
     int                 nthreads;             /* Number of threads used for vsites       */
     gmx_vsite_thread_t *tdata;                /* Thread local vsites and work structs    */
     int                *th_ind;               /* Work array                              */
     int                 th_ind_nalloc;        /* Size of th_ind                          */
 } gmx_vsite_t;
 
-void construct_vsites(FILE *log, gmx_vsite_t *vsite,
-                      rvec x[], t_nrnb *nrnb,
+struct t_graph;
+
+void construct_vsites(gmx_vsite_t *vsite,
+                      rvec x[],
                       real dt, rvec v[],
                       t_iparams ip[], t_ilist ilist[],
-                      int ePBC, gmx_bool bMolPBC, t_graph *graph,
+                      int ePBC, gmx_bool bMolPBC,
                       t_commrec *cr, matrix box);
 /* Create positions of vsite atoms based on surrounding atoms
  * for the local system.
@@ -94,18 +84,18 @@ void construct_vsites(FILE *log, gmx_vsite_t *vsite,
  * for the integration, they are only useful for analysis.
  */
 
-void construct_vsites_mtop(FILE *log, gmx_vsite_t *vsite,
+void construct_vsites_mtop(gmx_vsite_t *vsite,
                            gmx_mtop_t *mtop, rvec x[]);
 /* Create positions of vsite atoms based on surrounding atoms
  * for the whole system.
  * This function assumes that all molecules are whole.
  */
 
-void spread_vsite_f(FILE *log, gmx_vsite_t *vsite,
+void spread_vsite_f(gmx_vsite_t *vsite,
                     rvec x[], rvec f[], rvec *fshift,
                     gmx_bool VirCorr, matrix vir,
                     t_nrnb *nrnb, t_idef *idef,
-                    int ePBC, gmx_bool bMolPBC, t_graph *g, matrix box,
+                    int ePBC, gmx_bool bMolPBC, struct t_graph *g, matrix box,
                     t_commrec *cr);
 /* Spread the force operating on the vsite atoms on the surrounding atoms.
  * If fshift!=NULL also update the shift forces.
@@ -125,6 +115,7 @@ gmx_vsite_t *init_vsite(gmx_mtop_t *mtop, t_commrec *cr,
  */
 
 void split_vsites_over_threads(const t_ilist   *ilist,
+                               const t_iparams *ip,
                                const t_mdatoms *mdatoms,
                                gmx_bool         bLimitRange,
                                gmx_vsite_t     *vsite);