IMP  2.0.1
The Integrative Modeling Platform
estimates.h
Go to the documentation of this file.
1 /**
2  * \file IMP/atom/estimates.h
3  * \brief Estimates of various physical quantities.
4  *
5  * Copyright 2007-2013 IMP Inventors. All rights reserved.
6  */
7 
8 #ifndef IMPATOM_ESTIMATES_H
9 #define IMPATOM_ESTIMATES_H
10 
11 #include <IMP/atom/atom_config.h>
12 #include "Residue.h"
13 #include <IMP/base_types.h>
14 
15 IMPATOM_BEGIN_NAMESPACE
16 /** @name Estimator Functions
17 
18  These functions allow you to estimate physical quantities
19  relating to biomolecules.
20 */
21 //!@{
22 
23 
24 /*! Several protein density value references that have been proposed
25  * in the literature.
26  * - ALBER et al. (structure 2005) Estimated value 0.625 (1/1.60) Da/A3
27  * - HARPAZ et al. (1994) Computed value 0.826446=1/1.21 Da/A3
28  * - ANDERSSON and Hovmuller (1998) Computed value 1.22 g/cm3 ~ 0.7347 Da/A3
29  * - TSAI et al. (1999) Computed value 1.40 g/cm3 ~ 0.84309 Da/A3
30  * - QUILLIN and Matthews (2000) Computed value 1.43 g/cm3 ~ 0.86116 Da/A3
31  * - SQUIRE and Himmel (1979),
32  * Gekko and Noguchi (1979) Experimental value 1.37 g/cm3 ~ 0.82503 Da/A3
33  */
35  ALBER,
36  HARPAZ,
37  ANDERSSON,
38  TSAI,
39  QUILLIN,
40  SQUIRE
41  };
42 
43 //! returns the protein density value (in Da/A^3)
44 //! associated with a given reference
45 IMPATOMEXPORT double get_protein_density_from_reference(
46  ProteinDensityReference densityReference);
47 
48 //! Estimate the volume of a protein from its mass
49 /**
50  * \param[in] m the mass for which we want to output the corresponding volume
51  * \param[in] ref the protein density reference used in the computation.
52  * As a default ref is the estimate published in Alber et. al, Structure 2005.
53 */
54 IMPATOMEXPORT double get_volume_from_mass(
55  double m,
56  ProteinDensityReference ref=ALBER);
57 
58 //! Estimate the mass of a protein from its volume
59 /**
60  * \param[in] v the volume for which we want to output the corresponding mass
61  * \param[in] ref the protein density reference used in the computation.
62  * As a default ref is the estimate published in Alber et. al, Structure 2005.
63 */
64 IMPATOMEXPORT double get_mass_from_volume(
65  double v,
66  ProteinDensityReference ref=ALBER);
67 
68 //! Estimate the mass of a protein from the number of amino acids
69 /** We use an estimate of 110 Daltons per residue, following Chimera.
70 
71  The mass is in Daltons.
72  */
73 IMPATOMEXPORT double get_mass_from_number_of_residues(unsigned int num_aa);
74 
75 
76 //! Return an estimate for the volume of a given residue
77 /** The volume estimates are taken from
78  Pontius J, Richelle J, Wodak SJ.,
79  \external{http://www.ncbi.nlm.nih.gov/pubmed/8950272,
80  Deviations from standard atomic volumes as a quality measure for
81  protein crystal structures}, J Mol Biol. 1996 Nov 22;264(1):121-36.
82 
83 
84  \throw ValueException if a non-standard residue type is passed
85  */
86 IMPATOMEXPORT double get_volume_from_residue_type(ResidueType rt);
87 
88 //!@}
89 
90 
91 /** Compute the concentration in molarity from the passed values*/
92 inline double get_molarity(double n, double volume) {
93  double v= volume;
94  // n*10^27/(v *6.02e23)
95  return n*1e4/(v*6.02);
96 }
97 
98 /** Compute the concentration in molarity from the passed values*/
99 inline double get_kd(double na, double nb, double nab,
100  double volume) {
101  return get_molarity(na, volume)*get_molarity(nb, volume)
102  /get_molarity(nab, volume);
103 }
104 
105 
106 /** Return the prediction diffusion coefficient in Angstrom squared per
107  femtosecond given a radius in angstrom.
108  See \external{http://en.wikipedia.org/wiki/Einstein_relation_(kinetic_theory),
109  wikipedia} for a reference and
110  \external{http://en.wikipedia.org/wiki/Viscosity,Wikipedia on Viscosity}
111  for the values of the viscosity of water used.*/
112 IMPATOMEXPORT double get_einstein_diffusion_coefficient(double r);
113 
114 
115 /** Return the prediction diffusion coefficient in radians squared per
116  femtosecond given a radius in angstrom.*/
117 IMPATOMEXPORT double get_einstein_rotational_diffusion_coefficient(double r);
118 
119 /** Return the standard deviation for the Brownian step given the
120  diffusion coefficient D and the time step t.*/
121 IMPATOMEXPORT double get_diffusion_length(double D, double t);
122 
123 /** Return the scale for diffusion under the specified force,
124  the diffusion coefficient D and the time step t.
125 
126  @param D diffusion coefficient in Angstrom^2/femtosecond
127  @param force applied force
128  @param t time step in femtoseconds
129  @param temp temperature in Kalvin
130 */
131 IMPATOMEXPORT double get_diffusion_length(double D, double force, double t,
132  double temp = 273);
133 
134 /** Get the standard deviation of the diffusion angle change given
135  the rigid body diffusion coefficient and the time step dtfs.*/
136 IMPATOMEXPORT double get_diffusion_angle(double D, double dtfs);
137 
138 /** Estimate the diffusion coeffient of a particle from a list of
139  displacements each taken after the given time step dt.
140 */
141 IMPATOMEXPORT double
142 get_diffusion_coefficient(const algebra::Vector3Ds &displacements,
143  double dt);
144 
145 /** Estimate the rotational diffusion coeffient of a particle from a list of
146  displacements each taken after the given time step dt.
147 */
148 IMPATOMEXPORT double
150  double dt);
151 
152 IMPATOM_END_NAMESPACE
153 
154 #endif /* IMPATOM_ESTIMATES_H */