Implemented new Van der Waals radii in atomprop. This may
have an effect on results from gmx sas or editconf and therefore
a message is printed to notify the users of this.
The genbox program is adapted to have an extra option to scale
the Van der Waals radii, in case it is difficult to add extra
atoms. The default value for this option is 0.57 which gives approximately
the same density as old genbox.
Change-Id: Ib5d86a920ae7732ee8a29505449e6d34e3d3980c
; longest matches are used
; '???' or '*' matches any residue name
; 'AAA' matches any protein residue name
; longest matches are used
; '???' or '*' matches any residue name
; 'AAA' matches any protein residue name
-??? C 0.15
-??? F 0.12
-??? H 0.04
-??? N 0.110
-??? O 0.105
-??? S 0.16
+; Source: http://en.wikipedia.org/wiki/Van_der_Waals_radius
+; These come from A. Bondi, "van der Waals Volumes and Radii",
+; J. Phys. Chem. 68 (1964) 441-451
+??? H 0.12
+??? C 0.17
+??? N 0.155
+??? O 0.152
+??? F 0.147
+??? P 0.18
+??? S 0.18
+??? Cl 0.175
; Water charge sites
SOL MW 0
SOL LP 0
; Water charge sites
SOL MW 0
SOL LP 0
}
static void mk_vdw(t_atoms *a, real rvdw[], gmx_atomprop_t aps,
}
static void mk_vdw(t_atoms *a, real rvdw[], gmx_atomprop_t aps,
+ real r_distance,real r_scale)
{
rvdw[i] = r_distance;
}
{
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,
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)
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 */
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)
/* 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,
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)
{
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 */
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;
/* 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,
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_scale)
{
char *title;
int natoms;
{
char *title;
int natoms;
title, atoms->nr, atoms->nres);
/* initialise van der waals arrays of configuration 1 */
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);
#define NFILE asize(fnm)
static int nmol_ins = 0, nmol_try = 10, seed = 1997, enum_rot;
#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;
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"},
"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},
{ "-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,
/*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, r_scale);
if (bReadV && !v)
{
fprintf(stderr, "Note: no velocities found\n");
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,
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);
}
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,
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,
#include "index.h"
#include "strdb.h"
#include "copyrite.h"
#include "index.h"
#include "strdb.h"
#include "copyrite.h"
typedef struct {
gmx_bool bSet;
typedef struct {
gmx_bool bSet;
} aprop_t;
typedef struct gmx_atomprop {
} aprop_t;
typedef struct gmx_atomprop {
+ gmx_bool bWarned,bWarnVDW;
aprop_t prop[epropNR];
gmx_residuetype_t restype;
} gmx_atomprop;
aprop_t prop[epropNR];
gmx_residuetype_t restype;
} gmx_atomprop;
gmx_residuetype_init(&aps->restype);
aps->bWarned = FALSE;
gmx_residuetype_init(&aps->restype);
aps->bWarned = FALSE;
+ aps->bWarnVDW = FALSE;
+
return (gmx_atomprop_t)aps;
}
return (gmx_atomprop_t)aps;
}
+static void vdw_warning(FILE *fp)
+{
+ if (NULL != fp)
+ {
+ fprintf(fp,"NOTE: From version 5.0 %s uses the Van der Waals radii\n",
+ ShortProgram());
+ fprintf(fp,"from the source below. This means the results may be different\n");
+ fprintf(fp,"compared to previous GROMACS versions.\n");
+ please_cite(fp,"Bondi1964a");
+ }
+}
+
gmx_bool gmx_atomprop_query(gmx_atomprop_t aps,
int eprop, const char *resnm, const char *atomnm,
real *value)
gmx_bool gmx_atomprop_query(gmx_atomprop_t aps,
int eprop, const char *resnm, const char *atomnm,
real *value)
j = get_prop_index(&(ap->prop[eprop]), ap->restype, resname,
atomname, &bExact);
j = get_prop_index(&(ap->prop[eprop]), ap->restype, resname,
atomname, &bExact);
+ if (!ap->bWarnVDW)
+ {
+ vdw_warning(stdout);
+ ap->bWarnVDW = TRUE;
+ }
if (j >= 0)
{
*value = ap->prop[eprop].value[j];
if (j >= 0)
{
*value = ap->prop[eprop].value[j];
"Solvation energy in protein folding and binding",
"Nature",
319, 1986, "199-203" },
"Solvation energy in protein folding and binding",
"Nature",
319, 1986, "199-203" },
+ { "Bondi1964a",
+ "A. Bondi",
+ "van der Waals Volumes and Radii",
+ "J. Phys. Chem.",
+ 68, 1964,"441-451" },
{ "Eisenhaber95",
"Frank Eisenhaber and Philip Lijnzaad and Patrick Argos and Chris Sander and Michael Scharf",
"The Double Cube Lattice Method: Efficient Approaches to Numerical Integration of Surface Area and Volume and to Dot Surface Contouring of Molecular Assemblies",
{ "Eisenhaber95",
"Frank Eisenhaber and Philip Lijnzaad and Patrick Argos and Chris Sander and Michael Scharf",
"The Double Cube Lattice Method: Efficient Approaches to Numerical Integration of Surface Area and Volume and to Dot Surface Contouring of Molecular Assemblies",