4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
11 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
12 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
13 * Copyright (c) 2001-2004, The GROMACS development team,
14 * check out http://www.gromacs.org for more information.
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 * For more info, check our website at http://www.gromacs.org
34 * Gallium Rubidium Oxygen Manganese Argon Carbon Silicon
58 /* This file contains XMDRUN datatypes and function prototypes, grouped
59 * neatly according to parts of the functionalisty
65 atom_id shell
; /* The shell id */
66 atom_id nucl1
,nucl2
,nucl3
; /* The nuclei connected to the shell */
67 real k
; /* force constant */
68 real k_1
; /* 1 over force constant */
71 /* Initialization function */
72 extern t_shell
*init_shells(FILE *log
,int start
,int homenr
,
73 t_idef
*idef
,t_mdatoms
*md
,int *nshell
);
75 /* Optimize shell positions */
76 extern int relax_shells(FILE *log
,t_commrec
*cr
,t_commrec
*mcr
,bool bVerbose
,
77 int mdstep
,t_parm
*parm
,bool bDoNS
,bool bStopCM
,
78 t_topology
*top
,real ener
[],t_fcdata
*fcd
,
79 t_state
*state
,rvec vold
[],rvec vt
[],rvec f
[],
80 rvec buf
[],t_mdatoms
*md
,t_nsborder
*nsb
,t_nrnb
*nrnb
,
81 t_graph
*graph
,t_groups
*grps
,tensor vir_part
,
82 tensor pme_vir_part
,bool bShell
,
83 int nshell
,t_shell shells
[],t_forcerec
*fr
,
84 char *traj
,real t
,rvec mu_tot
,
85 int natoms
,bool *bConverged
,
86 bool bDummies
,t_comm_dummies
*dummycomm
);
88 /* GENERAL COUPLING THEORY (GCT) STUFF */
89 enum { eoPres
, eoEpot
, eoVir
, eoDist
, eoMu
, eoForce
, eoFx
, eoFy
, eoFz
,
91 eoPolarizability
, eoDipole
, eoObsNR
,
92 eoMemory
=eoObsNR
, eoInter
, eoUseVirial
, eoNR
};
93 extern char *eoNames
[eoNR
];
96 int at_i
,at_j
; /* Atom type # for i and j */
97 int eObs
; /* Observable to couple to */
98 bool bPrint
; /* Does this struct have to be printed */
99 real c6
,c12
; /* Actual value of params */
100 real xi_6
,xi_12
; /* Constants for coupling C6 and C12 */
104 int at_i
,at_j
; /* Atom type # for i and j */
105 int eObs
; /* Observable to couple to */
106 bool bPrint
; /* Does this struct have to be printed */
107 real a
,b
,c
; /* Actual value of params */
108 real xi_a
,xi_b
,xi_c
; /* Constants for coupling A, B and C */
112 int at_i
; /* Atom type */
113 int eObs
; /* Observable to couple to */
114 bool bPrint
; /* Does this struct have to be printed */
115 real Q
; /* Actual value of charge */
116 real xi_Q
; /* Constant for coupling Q */
120 int type
; /* Type number in the iparams struct */
121 int eObs
; /* Observable to couple to */
122 t_iparams xi
; /* Parameters that need to be changed */
127 real act_value
[eoObsNR
];
128 real av_value
[eoObsNR
];
129 real ref_value
[eoObsNR
];
130 bool bObsUsed
[eoObsNR
];
135 t_coupl_iparams
*tIP
;
141 extern void write_gct(char *fn
,t_coupl_rec
*tcr
,t_idef
*idef
);
143 extern void read_gct(char *fn
,t_coupl_rec
*tcr
);
145 extern void comm_tcr(FILE *log
,t_commrec
*cr
,t_coupl_rec
**tcr
);
147 extern void copy_ff(t_coupl_rec
*tcr
,t_forcerec
*fr
,t_mdatoms
*md
,
150 extern t_coupl_rec
*init_coupling(FILE *log
,int nfile
,t_filenm fnm
[],
151 t_commrec
*cr
,t_forcerec
*fr
,t_mdatoms
*md
,
154 extern void calc_force(int natom
,rvec f
[],rvec fff
[]);
156 extern void calc_f_dev(int natoms
,real charge
[],rvec x
[],rvec f
[],
157 t_idef
*idef
,real
*xiH
,real
*xiS
);
159 extern void do_coupling(FILE *log
,int nfile
,t_filenm fnm
[],
160 t_coupl_rec
*tcr
,real t
,int step
,real ener
[],
161 t_forcerec
*fr
,t_inputrec
*ir
,bool bMaster
,
162 t_mdatoms
*md
,t_idef
*idef
,real mu_aver
,int nmols
,
163 t_commrec
*cr
,matrix box
,tensor virial
,
164 tensor pres
,rvec mu_tot
,
165 rvec x
[],rvec f
[],bool bDoIt
);
167 /* IONIZATION STUFF. */
168 extern void ionize(FILE *log
,t_mdatoms
*md
,char **atomname
[],
169 real t
,t_inputrec
*ir
,rvec x
[],rvec v
[],
170 int start
,int end
,matrix box
,t_commrec
*cr
);
172 /* CODE TO ADD SPECIAL 2-DIMENSIONAL LENNARD-JONES CORRECTION TO FORCES AND ENERGY */
173 extern void do_glas(FILE *log
,int start
,int homenr
,rvec x
[],rvec f
[],
174 t_forcerec
*fr
,t_mdatoms
*md
,int atnr
,t_inputrec
*ir
,
177 extern real
mol_dipole(int k0
,int k1
,atom_id ma
[],rvec x
[],real q
[]);
178 /* Calculate total dipole for group of atoms */
180 extern real
calc_mu_aver(t_commrec
*cr
,t_nsborder
*nsb
,rvec x
[],real q
[],rvec mu
,
181 t_topology
*top
,t_mdatoms
*md
,int gnx
,atom_id grpindex
[]);
182 /* Compute average dipole */
184 /********************************************************************/
185 /* Force field scanning stuff */
187 real tol
,fmax
,npow
,epot
,fac_epot
,fac_pres
,fac_msf
,pres
;
189 bool bComb
,bVerbose
,bLogEps
;
193 extern void update_forcefield(int nfile
,t_filenm fnm
[],t_forcerec
*fr
,
194 int natoms
,rvec x
[],matrix box
);
195 /* Modify the parameters */
197 extern void print_forcefield(FILE *fp
,real ener
[],int natoms
,rvec f
[],
198 rvec fshake
[],rvec x
[],t_block
*mols
,real mass
[],
202 extern void set_ffvars(t_ffscan
*ff
);
203 /* Set variables for force scanning */
205 #endif /* _xmdrun_h */