Run regressiontests from build
[gromacs.git] / include / pull.h
blobfd5eb320c866fda4257c5ffe0384cb898b48905d
1 /*
2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team,
6 * check out http://www.gromacs.org for more information.
7 * Copyright (c) 2012, by the GROMACS development team, led by
8 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9 * others, as listed in the AUTHORS file in the top-level source
10 * directory and at http://www.gromacs.org.
12 * GROMACS is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 2.1
15 * of the License, or (at your option) any later version.
17 * GROMACS is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with GROMACS; if not, see
24 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * If you want to redistribute modifications to GROMACS, please
28 * consider that scientific software is very special. Version
29 * control is crucial - bugs must be traceable. We will be happy to
30 * consider code for inclusion in the official distribution, but
31 * derived work must not be called official GROMACS. Details are found
32 * in the README & COPYING files - if they are missing, get the
33 * official version at http://www.gromacs.org.
35 * To help us fund GROMACS development, we humbly ask that you cite
36 * the research papers on the package. Check out http://www.gromacs.org.
39 #ifndef _pull_h
40 #define _pull_h
41 #include "visibility.h"
42 #include "vec.h"
43 #include "typedefs.h"
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
50 /* This file contains datatypes and function declarations necessary
51 for mdrun to interface with the pull code */
53 /* Get the distance to the reference and deviation for pull group g */
54 GMX_LIBMD_EXPORT
55 void get_pullgrp_distance(t_pull *pull,t_pbc *pbc,int g,double t,
56 dvec dr,dvec dev);
58 /* Set the all the pull forces to zero */
59 void clear_pull_forces(t_pull *pull);
61 /* Determine the COM pull forces and add them to f, return the potential */
62 real pull_potential(int ePull,t_pull *pull, t_mdatoms *md, t_pbc *pbc,
63 t_commrec *cr, double t, real lambda,
64 rvec *x, rvec *f, tensor vir, real *dvdlambda);
66 /* Constrain the coordinates xp in the directions in x
67 * and also constrain v when v!=NULL.
69 void pull_constraint(t_pull *pull, t_mdatoms *md, t_pbc *pbc,
70 t_commrec *cr, double dt, double t,
71 rvec *x, rvec *xp, rvec *v, tensor vir);
73 /* Make a selection of the home atoms for all pull groups.
74 * Should be called at every domain decomposition.
76 GMX_LIBMD_EXPORT
77 void dd_make_local_pull_groups(gmx_domdec_t *dd,
78 t_pull *pull,t_mdatoms *md);
80 /* get memory and initialize the fields of pull that still need it, and
81 do runtype specific initialization */
82 GMX_LIBMD_EXPORT
83 void init_pull(FILE *fplog,
84 t_inputrec *ir, /* the inputrec */
85 int nfile,
86 const t_filenm fnm[], /* standard filename struct */
87 gmx_mtop_t *mtop, /* the topology of the whole system */
88 t_commrec * cr, /* struct for communication info */
89 const output_env_t oenv, /* output options */
90 real lambda, /* FEP lambda */
91 gmx_bool bOutFile, /* open output files */
92 unsigned long Flags);
94 /* Close the pull output files */
95 GMX_LIBMD_EXPORT
96 void finish_pull(FILE *fplog,t_pull *pull);
98 /* Print the pull output (x and/or f) */
99 GMX_LIBMD_EXPORT
100 void pull_print_output(t_pull *pull, gmx_large_int_t step, double time);
102 /* In pullutil.c */
104 /* Calculates centers of mass all pull groups */
105 GMX_LIBMD_EXPORT
106 void pull_calc_coms(t_commrec *cr,
107 t_pull *pull, /* the pull group */
108 t_mdatoms *md, /* all atoms */
109 t_pbc *pbc,
110 double t, /* only used for cylinder ref. */
111 rvec x[], /* local coordinates */
112 rvec *xp /* updated x, can be NULL */
115 #ifdef __cplusplus
117 #endif
119 #endif