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