4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-2001
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * If you want to redistribute modifications, please consider that
22 * scientific software is very special. Version control is crucial -
23 * bugs must be traceable. We will be happy to consider code for
24 * inclusion in the official distribution, but derived work must not
25 * be called official GROMACS. Details are found in the README & COPYING
26 * files - if they are missing, get the official version at www.gromacs.org.
28 * To help us fund GROMACS development, we humbly ask that you cite
29 * the papers on the package - you can find them in the top README file.
31 * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
34 * Gromacs Runs On Most of All Computer Systems
40 static char *SRCID_do_gct_h = "$Id$";
46 enum { eoPres, eoEpot, eoVir, eoDist, eoMu, eoForce, eoFx, eoFy, eoFz,
48 eoPolarizability, eoDipole, eoObsNR,
49 eoMemory=eoObsNR, eoInter, eoUseVirial, eoNR };
50 extern char *eoNames[eoNR];
53 int at_i,at_j; /* Atom type # for i and j */
54 int eObs; /* Observable to couple to */
55 bool bPrint; /* Does this struct have to be printed */
56 real c6,c12; /* Actual value of params */
57 real xi_6,xi_12; /* Constants for coupling C6 and C12 */
61 int at_i,at_j; /* Atom type # for i and j */
62 int eObs; /* Observable to couple to */
63 bool bPrint; /* Does this struct have to be printed */
64 real a,b,c; /* Actual value of params */
65 real xi_a,xi_b,xi_c; /* Constants for coupling A, B and C */
69 int at_i; /* Atom type */
70 int eObs; /* Observable to couple to */
71 bool bPrint; /* Does this struct have to be printed */
72 real Q; /* Actual value of charge */
73 real xi_Q; /* Constant for coupling Q */
77 int type; /* Type number in the iparams struct */
78 int eObs; /* Observable to couple to */
79 t_iparams xi; /* Parameters that need to be changed */
84 real act_value[eoObsNR];
85 real av_value [eoObsNR];
86 real ref_value[eoObsNR];
87 bool bObsUsed[eoObsNR];
98 extern void write_gct(char *fn,t_coupl_rec *tcr,t_idef *idef);
100 extern void read_gct(char *fn,t_coupl_rec *tcr);
102 extern void comm_tcr(FILE *log,t_commrec *cr,t_coupl_rec **tcr);
104 extern void copy_ff(t_coupl_rec *tcr,t_forcerec *fr,t_mdatoms *md,
107 extern t_coupl_rec *init_coupling(FILE *log,int nfile,t_filenm fnm[],
108 t_commrec *cr,t_forcerec *fr,t_mdatoms *md,
111 extern void calc_force(int natom,rvec f[],rvec fff[]);
113 extern void calc_f_dev(int natoms,real charge[],rvec x[],rvec f[],
114 t_idef *idef,real *xiH,real *xiS);
116 extern void do_coupling(FILE *log,int nfile,t_filenm fnm[],
117 t_coupl_rec *tcr,real t,int step,real ener[],
118 t_forcerec *fr,t_inputrec *ir,bool bMaster,
119 t_mdatoms *md,t_idef *idef,real mu_aver,int nmols,
120 t_commrec *cr,matrix box,tensor virial,
121 tensor pres,rvec mu_tot,
122 rvec x[],rvec f[],bool bDoIt);