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 */
62 enum { eoPres, eoEpot, eoVir, eoDist, eoMu, eoForce, eoFx, eoFy, eoFz,
64 eoPolarizability, eoDipole, eoObsNR,
65 eoMemory=eoObsNR, eoInter, eoUseVirial, eoCombRule, eoNR };
66 extern const char *eoNames[eoNR];
69 int at_i,at_j; /* Atom type # for i and j */
70 int eObs; /* Observable to couple to */
71 bool bPrint; /* Does this struct have to be printed */
72 real c6,c12; /* Actual value of params */
73 real xi_6,xi_12; /* Constants for coupling C6 and C12 */
77 int at_i,at_j; /* Atom type # for i and j */
78 int eObs; /* Observable to couple to */
79 bool bPrint; /* Does this struct have to be printed */
80 real a,b,c; /* Actual value of params */
81 real xi_a,xi_b,xi_c; /* Constants for coupling A, B and C */
85 int at_i; /* Atom type */
86 int eObs; /* Observable to couple to */
87 bool bPrint; /* Does this struct have to be printed */
88 real Q; /* Actual value of charge */
89 real xi_Q; /* Constant for coupling Q */
93 int type; /* Type number in the iparams struct */
94 int eObs; /* Observable to couple to */
95 t_iparams xi; /* Parameters that need to be changed */
100 real act_value[eoObsNR];
101 real av_value [eoObsNR];
102 real ref_value[eoObsNR];
103 bool bObsUsed[eoObsNR];
108 t_coupl_iparams *tIP;
115 extern void write_gct(const char *fn,t_coupl_rec *tcr,t_idef *idef);
117 extern void read_gct(const char *fn,t_coupl_rec *tcr);
119 extern void comm_tcr(FILE *log,t_commrec *cr,t_coupl_rec **tcr);
121 extern void copy_ff(t_coupl_rec *tcr,t_forcerec *fr,t_mdatoms *md,
124 extern t_coupl_rec *init_coupling(FILE *log,int nfile, const t_filenm fnm[],
125 t_commrec *cr,t_forcerec *fr,t_mdatoms *md,
128 extern void calc_force(int natom,rvec f[],rvec fff[]);
130 extern void calc_f_dev(int natoms,real charge[],rvec x[],rvec f[],
131 t_idef *idef,real *xiH,real *xiS);
133 extern void do_coupling(FILE *log,const output_env_t oenv,int nfile,
134 const t_filenm fnm[],
135 t_coupl_rec *tcr,real t,int step,real ener[],
136 t_forcerec *fr,t_inputrec *ir,bool bMaster,
137 t_mdatoms *md,t_idef *idef,real mu_aver,int nmols,
138 t_commrec *cr,matrix box,tensor virial,
139 tensor pres,rvec mu_tot,
140 rvec x[],rvec f[],bool bDoIt);
142 /* CODE TO ADD SPECIAL 2-DIMENSIONAL LENNARD-JONES CORRECTION TO FORCES AND ENERGY */
143 extern void do_glas(FILE *log,int start,int homenr,rvec x[],rvec f[],
144 t_forcerec *fr,t_mdatoms *md,int atnr,t_inputrec *ir,
147 extern real mol_dipole(int k0,int k1,rvec x[],real q[]);
148 /* Calculate total dipole for group of atoms */
150 extern real calc_mu_aver(t_commrec *cr,rvec x[],real q[],rvec mu,
151 t_block *mols,t_mdatoms *md,int gnx,atom_id grpindex[]);
152 /* Compute average dipole */
154 /********************************************************************/
155 /* Force field scanning stuff */
157 real tol,f_max,npow,epot,fac_epot,fac_pres,fac_msf,pres;
159 bool bComb,bVerbose,bLogEps;
163 extern bool update_forcefield(FILE *fplog,
164 int nfile,const t_filenm fnm[],t_forcerec *fr,
165 int natoms,rvec x[],matrix box);
166 /* Modify the parameters. Return TRUE when the scan is finished. */
168 extern bool print_forcefield(FILE *fp,real ener[],int natoms,rvec f[],
169 rvec fshake[],rvec x[],t_block *mols,real mass[],
171 /* Print results. Return TRUE when the scan is finished. */
173 extern void set_ffvars(t_ffscan *ff);
174 /* Set variables for force scanning */
176 #endif /* _xmdrun_h */