}
static void mk_vdw(t_atoms *a, real rvdw[], gmx_atomprop_t aps,
- real r_distance)
+ real r_distance,real r_scale)
{
int i;
{
rvdw[i] = r_distance;
}
+ else
+ {
+ rvdw[i] *= r_scale;
+ }
}
}
static char *insert_mols(const char *mol_insrt, int nmol_insrt, int ntry, int seed,
t_atoms *atoms, rvec **x, real **r, int ePBC, matrix box,
- gmx_atomprop_t aps, real r_distance, real rshell,
+ gmx_atomprop_t aps,
+ real r_distance, real r_scale, real rshell,
const output_env_t oenv,
const char* posfn, const rvec deltaR, int enum_rot,
gmx_bool bCheckAllPairDist)
srenew(atoms_insrt.resinfo, atoms_insrt.nres);
/* initialise van der waals arrays of insert molecules */
- mk_vdw(&atoms_insrt, r_insrt, aps, r_distance);
+ mk_vdw(&atoms_insrt, r_insrt, aps, r_distance, r_scale);
/* With -ip, take nmol_insrt from file posfn */
if (posfn != NULL)
static void add_solv(const char *fn, t_atoms *atoms, rvec **x, rvec **v, real **r,
int ePBC, matrix box,
- gmx_atomprop_t aps, real r_distance, int *atoms_added,
+ gmx_atomprop_t aps,
+ real r_distance, real r_scale, int *atoms_added,
int *residues_added, real rshell, int max_sol,
const output_env_t oenv)
{
rm_res_pbc(atoms_solvt, x_solvt, box_solvt);
/* initialise van der waals arrays of solvent configuration */
- mk_vdw(atoms_solvt, r_solvt, aps, r_distance);
+ mk_vdw(atoms_solvt, r_solvt, aps, r_distance, r_scale);
/* calculate the box multiplication factors n_box[0...DIM] */
nmol = 1;
static char *read_prot(const char *confin, t_atoms *atoms, rvec **x, rvec **v,
real **r, int *ePBC, matrix box, gmx_atomprop_t aps,
- real r_distance)
+ real r_distance, real r_scale)
{
char *title;
int natoms;
title, atoms->nr, atoms->nres);
/* initialise van der waals arrays of configuration 1 */
- mk_vdw(atoms, *r, aps, r_distance);
+ mk_vdw(atoms, *r, aps, r_distance, r_scale);
return title;
}
#define NFILE asize(fnm)
static int nmol_ins = 0, nmol_try = 10, seed = 1997, enum_rot;
- static real r_distance = 0.105, r_shell = 0;
+ static real r_distance = 0.105, r_shell = 0, r_scale = 0.57;
static rvec new_box = {0.0, 0.0, 0.0}, deltaR = {0.0, 0.0, 0.0};
static gmx_bool bReadV = FALSE, bCheckAllPairDist = FALSE;
static int max_sol = 0;
"Random generator seed"},
{ "-vdwd", FALSE, etREAL, {&r_distance},
"Default van der Waals distance"},
+ { "-vdwscale", FALSE, etREAL, {&r_scale},
+ "HIDDENScale factor to multiply Van der Waals radii from the database in share/gromacs/top/vdwradii.dat. The default value of 0.57 yields density close to 1000 g/l for proteins in water." },
{ "-shell", FALSE, etREAL, {&r_shell},
"Thickness of optional water layer around solute" },
{ "-maxsol", FALSE, etINT, {&max_sol},
/*generate a solute configuration */
conf_prot = opt2fn("-cp", NFILE, fnm);
title = read_prot(conf_prot, &atoms, &x, bReadV ? &v : NULL, &r, &ePBC, box,
- aps, r_distance);
+ aps, r_distance, r_scale);
if (bReadV && !v)
{
fprintf(stderr, "Note: no velocities found\n");
if (bInsert)
{
title_ins = insert_mols(opt2fn("-ci", NFILE, fnm), nmol_ins, nmol_try, seed,
- &atoms, &x, &r, ePBC, box, aps, r_distance, r_shell,
+ &atoms, &x, &r, ePBC, box, aps,
+ r_distance, r_scale, r_shell,
oenv, opt2fn_null("-ip", NFILE, fnm), deltaR, enum_rot,
bCheckAllPairDist);
}
if (bSol)
{
add_solv(opt2fn("-cs", NFILE, fnm), &atoms, &x, v ? &v : NULL, &r, ePBC, box,
- aps, r_distance, &atoms_added, &residues_added, r_shell, max_sol,
+ aps, r_distance, r_scale, &atoms_added, &residues_added, r_shell, max_sol,
oenv);
}