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.
58 #include "gmx_wallcycle.h"
60 /* This file contains XMDRUN datatypes and function prototypes, grouped
61 * neatly according to parts of the functionalisty
64 /* GENERAL COUPLING THEORY (GCT) STUFF */
65 enum { eoPres, eoEpot, eoVir, eoDist, eoMu, eoForce, eoFx, eoFy, eoFz,
67 eoPolarizability, eoDipole, eoObsNR,
68 eoMemory=eoObsNR, eoInter, eoUseVirial, eoCombRule, eoNR };
69 extern const char *eoNames[eoNR];
72 int at_i,at_j; /* Atom type # for i and j */
73 int eObs; /* Observable to couple to */
74 gmx_bool bPrint; /* Does this struct have to be printed */
75 real c6,c12; /* Actual value of params */
76 real xi_6,xi_12; /* Constants for coupling C6 and C12 */
80 int at_i,at_j; /* Atom type # for i and j */
81 int eObs; /* Observable to couple to */
82 gmx_bool bPrint; /* Does this struct have to be printed */
83 real a,b,c; /* Actual value of params */
84 real xi_a,xi_b,xi_c; /* Constants for coupling A, B and C */
88 int at_i; /* Atom type */
89 int eObs; /* Observable to couple to */
90 gmx_bool bPrint; /* Does this struct have to be printed */
91 real Q; /* Actual value of charge */
92 real xi_Q; /* Constant for coupling Q */
96 int type; /* Type number in the iparams struct */
97 int eObs; /* Observable to couple to */
98 t_iparams xi; /* Parameters that need to be changed */
103 real act_value[eoObsNR];
104 real av_value [eoObsNR];
105 real ref_value[eoObsNR];
106 gmx_bool bObsUsed[eoObsNR];
111 t_coupl_iparams *tIP;
118 extern void write_gct(const char *fn,t_coupl_rec *tcr,t_idef *idef);
120 extern void read_gct(const char *fn,t_coupl_rec *tcr);
122 extern void comm_tcr(FILE *log,t_commrec *cr,t_coupl_rec **tcr);
124 extern void copy_ff(t_coupl_rec *tcr,t_forcerec *fr,t_mdatoms *md,
127 extern t_coupl_rec *init_coupling(FILE *log,int nfile, const t_filenm fnm[],
128 t_commrec *cr,t_forcerec *fr,t_mdatoms *md,
131 extern void calc_force(int natom,rvec f[],rvec fff[]);
133 extern void calc_f_dev(int natoms,real charge[],rvec x[],rvec f[],
134 t_idef *idef,real *xiH,real *xiS);
136 extern void do_coupling(FILE *log,const output_env_t oenv,int nfile,
137 const t_filenm fnm[],
138 t_coupl_rec *tcr,real t,int step,real ener[],
139 t_forcerec *fr,t_inputrec *ir,gmx_bool bMaster,
140 t_mdatoms *md,t_idef *idef,real mu_aver,int nmols,
141 t_commrec *cr,matrix box,tensor virial,
142 tensor pres,rvec mu_tot,
143 rvec x[],rvec f[],gmx_bool bDoIt);
145 /* CODE TO ADD SPECIAL 2-DIMENSIONAL LENNARD-JONES CORRECTION TO FORCES AND ENERGY */
146 extern void do_glas(FILE *log,int start,int homenr,rvec x[],rvec f[],
147 t_forcerec *fr,t_mdatoms *md,int atnr,t_inputrec *ir,
150 extern real mol_dipole(int k0,int k1,rvec x[],real q[]);
151 /* Calculate total dipole for group of atoms */
153 extern real calc_mu_aver(t_commrec *cr,rvec x[],real q[],rvec mu,
154 t_block *mols,t_mdatoms *md,int gnx,atom_id grpindex[]);
155 /* Compute average dipole */
157 /********************************************************************/
158 /* Force field scanning stuff */
160 real tol,f_max,npow,epot,fac_epot,fac_pres,fac_msf,pres;
162 gmx_bool bComb,bVerbose,bLogEps;
166 extern gmx_bool update_forcefield(FILE *fplog,
167 int nfile,const t_filenm fnm[],t_forcerec *fr,
168 int natoms,rvec x[],matrix box);
169 /* Modify the parameters. Return TRUE when the scan is finished. */
171 extern gmx_bool print_forcefield(FILE *fp,real ener[],int natoms,rvec f[],
172 rvec fshake[],rvec x[],t_block *mols,real mass[],
174 /* Print results. Return TRUE when the scan is finished. */
176 extern void set_ffvars(t_ffscan *ff);
177 /* Set variables for force scanning */
179 #endif /* _xmdrun_h */