static int gen_vsites_6ring(t_atoms *at, int *vsite_type[], t_params plist[],
int nrfound, int *ats, real bond_cc, real bond_ch,
- real xcom, real ycom, gmx_bool bDoZ)
+ real xcom, gmx_bool bDoZ)
{
/* these MUST correspond to the atnms array in do_vsite_aromatics! */
enum {
int nrfound, int *ats, t_vsitetop *vsitetop, int nvsitetop)
{
real bond_cc, bond_ch;
- real xcom, ycom, mtot;
+ real xcom, mtot;
int i;
/* these MUST correspond to the atnms array in do_vsite_aromatics! */
enum {
x[atHZ] = x[atCZ]+bond_ch;
y[atHZ] = 0;
- xcom = ycom = mtot = 0;
+ xcom = mtot = 0;
for (i = 0; i < atNR; i++)
{
xcom += x[i]*at->atom[ats[i]].m;
- ycom += y[i]*at->atom[ats[i]].m;
mtot += at->atom[ats[i]].m;
}
xcom /= mtot;
- ycom /= mtot;
- return gen_vsites_6ring(at, vsite_type, plist, nrfound, ats, bond_cc, bond_ch, xcom, ycom, TRUE);
+ return gen_vsites_6ring(at, vsite_type, plist, nrfound, ats, bond_cc, bond_ch, xcom, TRUE);
}
static void calc_vsite3_param(real xd, real yd, real xi, real yi, real xj, real yj,
int nvsite, i, i0, j, atM, tpM;
real dCGCE, dCEOH, dCGM, tmp1, a, b;
real bond_cc, bond_ch, bond_co, bond_oh, angle_coh;
- real xcom, ycom, mtot;
+ real xcom, mtot;
real vmass, vdist, mM;
rvec r1;
char name[10];
xi[atOH] = xi[atCZ]+bond_co;
yi[atOH] = 0;
- xcom = ycom = mtot = 0;
+ xcom = mtot = 0;
for (i = 0; i < atOH; i++)
{
xcom += xi[i]*at->atom[ats[i]].m;
- ycom += yi[i]*at->atom[ats[i]].m;
mtot += at->atom[ats[i]].m;
}
xcom /= mtot;
- ycom /= mtot;
/* first do 6 ring as default,
except CZ (we'll do that different) and HZ (we don't have that): */
- nvsite = gen_vsites_6ring(at, vsite_type, plist, nrfound, ats, bond_cc, bond_ch, xcom, ycom, FALSE);
+ nvsite = gen_vsites_6ring(at, vsite_type, plist, nrfound, ats, bond_cc, bond_ch, xcom, FALSE);
/* then construct CZ from the 2nd triangle */
/* vsite3 construction: r_d = r_i + a r_ij + b r_ik */
static void at2bonds(t_params *psb, t_hackblock *hb,
t_atoms *atoms,
rvec x[],
- real long_bond_dist, real short_bond_dist,
- gmx_bool bAllowMissing)
+ real long_bond_dist, real short_bond_dist)
{
int resind, i, j, k;
atom_id ai, aj;
}
}
-void add_atom_to_restp(t_restp *restp, int resnr, int at_start, const t_hack *hack)
+void add_atom_to_restp(t_restp *restp, int at_start, const t_hack *hack)
{
char buf[STRLEN];
int k;
if ( (*hb)[i].hack[j].oname == NULL)
{
/* we're adding: */
- add_atom_to_restp(&(*restp)[i], resinfo[i].nr, l,
- &(*hb)[i].hack[j]);
+ add_atom_to_restp(&(*restp)[i], l, &(*hb)[i].hack[j]);
}
else
{
start_at, rptr->resname, newnm);
}
/* We can add the atom after atom start_nr */
- add_atom_to_restp(rptr, resnr, start_nr,
- &hbr->hack[j]);
+ add_atom_to_restp(rptr, start_nr, &hbr->hack[j]);
bFoundInAdd = TRUE;
}
t_atoms *atoms, rvec **x, gpp_atomtype_t atype, t_symtab *tab,
int nrtp, t_restp rtp[],
t_restp *restp, t_hackblock *hb,
- int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb,
gmx_bool bAllowMissing,
gmx_bool bVsites, gmx_bool bVsiteAromatics,
- const char *ff, const char *ffdir,
+ const char *ffdir,
real mHmult,
int nssbonds, t_ssbond *ssbonds,
real long_bond_dist, real short_bond_dist,
/* Make bonds */
at2bonds(&(plist[F_BONDS]), hb,
atoms, *x,
- long_bond_dist, short_bond_dist, bAllowMissing);
+ long_bond_dist, short_bond_dist);
/* specbonds: disulphide bonds & heme-his */
do_ssbonds(&(plist[F_BONDS]),
sfree(na_vcm);
}
-static void decode_cos(char *s, t_cosines *cosine, gmx_bool bTime)
+static void decode_cos(char *s, t_cosines *cosine)
{
char *t;
char format[STRLEN], f1[STRLEN];
gmx_fatal(FARGS, "Can only have energy group pair tables in combination with user tables for VdW and/or Coulomb");
}
- decode_cos(efield_x, &(ir->ex[XX]), FALSE);
- decode_cos(efield_xt, &(ir->et[XX]), TRUE);
- decode_cos(efield_y, &(ir->ex[YY]), FALSE);
- decode_cos(efield_yt, &(ir->et[YY]), TRUE);
- decode_cos(efield_z, &(ir->ex[ZZ]), FALSE);
- decode_cos(efield_zt, &(ir->et[ZZ]), TRUE);
+ decode_cos(efield_x, &(ir->ex[XX]));
+ decode_cos(efield_xt, &(ir->et[XX]));
+ decode_cos(efield_y, &(ir->ex[YY]));
+ decode_cos(efield_yt, &(ir->et[YY]));
+ decode_cos(efield_z, &(ir->ex[ZZ]));
+ decode_cos(efield_zt, &(ir->et[ZZ]));
if (ir->bAdress)
{
t_blocka *grps, char **gnames);
/* Process the rotation parameters after reading the index groups */
-extern void set_reference_positions(t_rot *rot, gmx_mtop_t *mtop, rvec *x, matrix box,
+extern void set_reference_positions(t_rot *rot, rvec *x, matrix box,
const char *fn, gmx_bool bSet, warninp_t wi);
#endif /* _readir_h */
/* Extract the reference positions for the rotation group(s) */
extern void set_reference_positions(
- t_rot *rot, gmx_mtop_t *mtop, rvec *x, matrix box,
+ t_rot *rot, rvec *x, matrix box,
const char *fn, gmx_bool bSet, warninp_t wi)
{
int g, i, ii;
}
}
-static void print_atom(FILE *out, t_atom *a, gpp_atomtype_t atype, char *newnm)
+static void print_atom(FILE *out, t_atom *a, gpp_atomtype_t atype)
{
fprintf(out, "\t%s\t%g\t%g\n",
get_atomtype_name(a->type, atype), a->m, a->q);
if (tb[i].hack[j].oname != NULL && tb[i].hack[j].nname != NULL)
{
fprintf(out, "%s\t", tb[i].hack[j].oname);
- print_atom(out, tb[i].hack[j].atom, atype, tb[i].hack[j].nname);
+ print_atom(out, tb[i].hack[j].atom, atype);
}
}
}
if (tb[i].hack[j].oname == NULL && tb[i].hack[j].nname != NULL)
{
print_ab(out, &(tb[i].hack[j]), tb[i].hack[j].nname);
- print_atom(out, tb[i].hack[j].atom, atype, tb[i].hack[j].nname);
+ print_atom(out, tb[i].hack[j].atom, atype);
}
}
}
return ncopy;
}
-static void gen_pairs(t_params *nbs, t_params *pairs, real fudge, int comb, gmx_bool bVerbose)
+static void gen_pairs(t_params *nbs, t_params *pairs, real fudge, int comb)
{
int i, j, ntp, nrfp, nrfpA, nrfpB, nnn;
real scaling;
}
static char ** cpp_opts(const char *define, const char *include,
- const char *infile,
warninp_t wi)
{
int n, len;
gmx_bool bFEP,
gmx_bool bGenborn,
gmx_bool bZero,
- gmx_bool bVerbose,
warninp_t wi)
{
FILE *out;
}
/* open input file */
- status = cpp_open_file(infile, &handle, cpp_opts(define, include, infile, wi));
+ status = cpp_open_file(infile, &handle, cpp_opts(define, include, wi));
if (status != 0)
{
gmx_fatal(FARGS, cpp_error(&handle, status));
free_nbparam(nbparam, ntype);
if (bGenPairs)
{
- gen_pairs(&(plist[nb_funct]), &(plist[F_LJ14]), fudgeLJ, comb, bVerbose);
+ gen_pairs(&(plist[nb_funct]), &(plist[F_LJ14]), fudgeLJ, comb);
ncopy = copy_nbparams(pair, nb_funct, &(plist[F_LJ14]),
ntype);
fprintf(stderr, "Generated %d of the %d 1-4 parameter combinations\n", ncombs-ncopy, ncombs);
bGenPairs, *fudgeQQ, bZero, &bWarn_copy_A_B, wi);
break;
case d_cmap:
- push_cmap(d, plist, mi0->plist, &(mi0->atoms), atype, pline,
- &bWarn_copy_A_B, wi);
+ push_cmap(d, plist, mi0->plist, &(mi0->atoms), atype, pline,wi);
break;
case d_vsitesn:
- push_vsitesn(d, plist, mi0->plist, &(mi0->atoms), atype, pline, wi);
+ push_vsitesn(d, plist, &(mi0->atoms), pline, wi);
break;
case d_exclusions:
assert(block2);
&(mi0->excls));
merge_excl(&(mi0->excls), &(block2[whichmol]));
done_block2(&(block2[whichmol]));
- make_shake(mi0->plist, &mi0->atoms, atype, opts->nshake);
+ make_shake(mi0->plist, &mi0->atoms, opts->nshake);
symtab, atype, nrmols, molinfo,
plist, combination_rule, repulsion_power,
opts, fudgeQQ, nmolblock, molblock,
- ir->efep != efepNO, bGenborn, bZero, bVerbose,
- wi);
+ ir->efep != efepNO, bGenborn, bZero, wi);
if ((*combination_rule != eCOMB_GEOMETRIC) &&
(ir->vdwtype == evdwUSER))
{
static void push_atom_now(t_symtab *symtab, t_atoms *at, int atomnr,
int atomicnumber,
int type, char *ctype, int ptype,
- char *resnumberic, int cgnumber,
+ char *resnumberic,
char *resname, char *name, real m0, real q0,
int typeB, char *ctypeB, real mB, real qB)
{
push_cg(cgs, lastcg, cgnumber, nr);
push_atom_now(symtab, at, atomnr, get_atomtype_atomnumber(type, atype),
- type, ctype, ptype, resnumberic, cgnumber,
+ type, ctype, ptype, resnumberic,
resname, name, m0, q0, typeB,
typeB == type ? ctype : ctypeB, mB, qB);
}
return bFound;
}
-static gmx_bool default_cmap_params(int ftype, t_params bondtype[],
+static gmx_bool default_cmap_params(t_params bondtype[],
t_atoms *at, gpp_atomtype_t atype,
t_param *p, gmx_bool bB,
int *cmap_type, int *nparam_def)
void push_cmap(directive d, t_params bondtype[], t_params bond[],
t_atoms *at, gpp_atomtype_t atype, char *line,
- gmx_bool *bWarn_copy_A_B,
warninp_t wi)
{
const char *aaformat[MAXATOMLIST+1] =
}
/* Get the cmap type for this cmap angle */
- bFound = default_cmap_params(ftype, bondtype, at, atype, ¶m, FALSE, &cmap_type, &ncmap_params);
+ bFound = default_cmap_params(bondtype, at, atype, ¶m, FALSE, &cmap_type, &ncmap_params);
/* We want exactly one parameter (the cmap type in state A (currently no state B) back */
if (bFound && ncmap_params == 1)
-void push_vsitesn(directive d, t_params bondtype[], t_params bond[],
- t_atoms *at, gpp_atomtype_t atype, char *line,
+void push_vsitesn(directive d, t_params bond[],
+ t_atoms *at, char *line,
warninp_t wi)
{
char *ptr;
extern void push_cmap(directive d, t_params bondtype[], t_params bond[],
t_atoms *at, gpp_atomtype_t atype, char *line,
- gmx_bool *bWarn_copy_A_B,
warninp_t wi);
-extern void push_vsitesn(directive d, t_params bondtype[], t_params bond[],
- t_atoms *at, gpp_atomtype_t atype, char *line,
+extern void push_vsitesn(directive d, t_params bond[],
+ t_atoms *at, char *line,
warninp_t wi);
extern void push_mol(int nrmols, t_molinfo mols[], char *pline,
return nh;
}
-void make_shake (t_params plist[], t_atoms *atoms, gpp_atomtype_t at, int nshake)
+void make_shake (t_params plist[], t_atoms *atoms, int nshake)
{
char ***info = atoms->atomname;
t_params *pr;
#include "topio.h"
-void make_shake (t_params plist[], t_atoms *atoms, gpp_atomtype_t at, int nshake);
+void make_shake (t_params plist[], t_atoms *atoms, int nshake);
#endif /* _topshake_h */
}
static void get_bondeds(int nrat, t_iatom atoms[],
- at2vsitebond_t *at2vb, t_params plist[],
+ at2vsitebond_t *at2vb,
int *nrbond, t_mybonded **bonds,
int *nrang, t_mybonded **angles,
int *nridih, t_mybonded **idihs )
idihs = NULL;
nrset++;
/* now set the vsite parameters: */
- get_bondeds(NRAL(ftype), plist[ftype].param[i].a, at2vb, plist,
+ get_bondeds(NRAL(ftype), plist[ftype].param[i].a, at2vb,
&nrbond, &bonds, &nrang, &angles, &nridih, &idihs);
if (debug)
{
gpp_atomtype_t atype, t_symtab *tab,
int nrtp, t_restp rtp[],
t_restp *restp, t_hackblock *hb,
- int nterpairs, t_hackblock **ntdb, t_hackblock **ctdb,
gmx_bool bAllowMissing,
gmx_bool bVsites, gmx_bool bVsiteAromatics,
- const char *ff, const char *ffdir,
+ const char *ffdir,
real mHmult,
int nssbonds, t_ssbond ssbonds[],
real long_bond_dist, real short_bond_dist,
}
void mk_bonds(int nnm, t_nm2type nmt[],
- t_atoms *atoms, rvec x[], t_params *bond, int nbond[], char *ff,
- gmx_bool bPBC, matrix box, gmx_atomprop_t aps)
+ t_atoms *atoms, rvec x[], t_params *bond, int nbond[],
+ gmx_bool bPBC, matrix box)
{
t_param b;
int i, j;
}
static void print_rtp(const char *filenm, const char *title, t_atoms *atoms,
- t_params plist[], gpp_atomtype_t atype, int cgnr[],
- int nbts, int bts[])
+ t_params plist[], gpp_atomtype_t atype, int cgnr[])
{
FILE *fp;
int i, tp;
t_nextnb nnb;
t_nm2type *nm2t;
t_mols mymol;
- gmx_atomprop_t aps;
int nnm;
char title[STRLEN], forcefield[32], ffdir[STRLEN];
rvec *x; /* coordinates? */
gmx_fatal(FARGS, "Specify at least one output file");
}
- aps = gmx_atomprop_init();
-
/* Force field selection, interactive or direct */
choose_ff(strcmp(ff, "select") == 0 ? NULL : ff,
forcefield, sizeof(forcefield),
}
printf("Generating bonds from distances...\n");
snew(nbonds, atoms->nr);
- mk_bonds(nnm, nm2t, atoms, x, &(plist[F_BONDS]), nbonds, forcefield,
- bPBC, box, aps);
+ mk_bonds(nnm, nm2t, atoms, x, &(plist[F_BONDS]), nbonds, bPBC, box);
open_symtab(&symtab);
atype = set_atom_type(&symtab, atoms, &(plist[F_BONDS]), nbonds, nnm, nm2t);
if (bRTP)
{
print_rtp(ftp2fn(efRTP, NFILE, fnm), "Generated by x2top",
- atoms, plist, atype, cgnr, asize(bts), bts);
+ atoms, plist, atype, cgnr);
}
if (debug)
if (ir->bRot)
{
- set_reference_positions(ir->rot, sys, state.x, state.box,
+ set_reference_positions(ir->rot, state.x, state.box,
opt2fn("-ref", NFILE, fnm), opt2bSet("-ref", NFILE, fnm),
wi);
}
pdb2top(top_file2, posre_fn, molname, pdba, &x, atype, &symtab,
nrtp, restp,
restp_chain, hb_chain,
- cc->nterpairs, cc->ntdb, cc->ctdb, bAllowMissing,
- bVsites, bVsiteAromatics, forcefield, ffdir,
+ bAllowMissing,
+ bVsites, bVsiteAromatics, ffdir,
mHmult, nssbonds, ssbonds,
long_bond_dist, short_bond_dist, bDeuterate, bChargeGroups, bCmap,
bRenumRes, bRTPresname);