3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
33 * Gromacs Runs On Most of All Computer Systems
51 int * left_import_construct
;
52 int left_import_nconstruct
;
53 int * left_export_construct
;
54 int left_export_nconstruct
;
55 int * right_import_construct
;
56 int right_import_nconstruct
;
57 int * right_export_construct
;
58 int right_export_nconstruct
;
64 int n_intercg_vsite
; /* The number of inter charge group vsites */
65 int nvsite_pbc_molt
; /* The array size of vsite_pbc_molt */
66 int ***vsite_pbc_molt
; /* The pbc atoms for intercg vsites */
67 int **vsite_pbc_loc
; /* The local pbc atoms */
68 int *vsite_pbc_loc_nalloc
;
69 bool bPDvsitecomm
; /* Do we need vsite communication with PD? */
70 t_comm_vsites
*vsitecomm
; /* The PD vsite communication struct */
73 extern void construct_vsites(FILE *log
,gmx_vsite_t
*vsite
,
74 rvec x
[],t_nrnb
*nrnb
,
76 t_iparams ip
[],t_ilist ilist
[],
77 int ePBC
,bool bMolPBC
,t_graph
*graph
,
78 t_commrec
*cr
,matrix box
);
79 /* Create positions of vsite atoms based on surrounding atoms
80 * for the local system.
81 * If v is passed, the velocities of the vsites will be calculated
82 * as the new positions minus the old positions divided by dt,
83 * thus v should only be passed when the coordinates have been
84 * updated with a full time step.
85 * Note that velocitis of vsites are completely irrelevant
86 * for the integration, they are only useful for analysis.
89 void construct_vsites_mtop(FILE *log
,gmx_vsite_t
*vsite
,
90 gmx_mtop_t
*mtop
,rvec x
[]);
91 /* Create positions of vsite atoms based on surrounding atoms
92 * for the whole system.
93 * This function assumes that all molecules are whole.
96 extern void spread_vsite_f(FILE *log
,gmx_vsite_t
*vsite
,
97 rvec x
[],rvec f
[],rvec
*fshift
,
98 t_nrnb
*nrnb
,t_idef
*idef
,
99 int ePBC
,bool bMolPBC
,t_graph
*g
,matrix box
,
101 /* Spread the force operating on the vsite atoms on the surrounding atoms.
102 * If fshift!=NULL also update the shift forces.
105 extern gmx_vsite_t
*init_vsite(gmx_mtop_t
*mtop
,t_commrec
*cr
);
106 /* Initialize the virtual site struct,
107 * returns NULL when there are no virtual sites.
110 extern void set_vsite_top(gmx_vsite_t
*vsite
,gmx_localtop_t
*top
,t_mdatoms
*md
,
112 /* Set some vsite data for runs without domain decomposition.
113 * Should be called once after init_vsite, before calling other routines.