Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
scoring
electron_density_atomwise
ElectronDensityAtomwise.hh
Go to the documentation of this file.
1
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2
// vi: set ts=2 noet:
3
//
4
// (c) Copyright Rosetta Commons Member Institutions.
5
// (c) This file is part of the Rosetta software suite and is made available under license.
6
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9
10
/// @file core/scoring/electron_density_atomwise/ElectronDensityAtomwise.hh
11
/// @brief Scoring a structure against an electron density map
12
/// @author Fang-Chieh Chou
13
14
#ifndef INCLUDED_core_scoring_electron_density_atomwise_ElectronDensityAtomwise_HH
15
#define INCLUDED_core_scoring_electron_density_atomwise_ElectronDensityAtomwise_HH
16
17
// Project headers
18
#include <
core/types.hh
>
19
#include <
core/pose/Pose.fwd.hh
>
20
#include <
core/conformation/Residue.fwd.hh
>
21
#include <
core/conformation/symmetry/SymmetryInfo.fwd.hh
>
22
23
// Utility headers
24
#include <numeric/xyzMatrix.fwd.hh>
25
#include <numeric/xyzVector.hh>
26
#include <utility/exit.hh>
27
28
// ObjexxFCL Headers
29
#include <ObjexxFCL/FArray3D.hh>
30
31
// C++ headers
32
#include <string>
33
#include <map>
34
35
//Auto Headers
36
#include <
core/kinematics/RT.hh
>
37
#include <utility/vector1_bool.hh>
38
#include <numeric/xyzMatrix.hh>
39
40
41
namespace
core {
42
namespace
scoring {
43
namespace
electron_density_atomwise {
44
45
const
core::Real
MAX_FLT
= 1e37;
46
47
class
ElectronDensityAtomwise
{
48
public
:
49
/// @brief constructor
50
ElectronDensityAtomwise
();
51
52
/// @brief Is a map loaded?
53
bool
isMapLoaded
() {
54
return
is_map_loaded
;
55
};
56
57
/// @brief Load an MRC (="new-CCP4") density map
58
void
readMRCandResize
();
59
60
//Compute Normalization factor given a pose
61
void
compute_normalization
(
pose::Pose
const
& pose );
62
63
//Pre-compute the unweighted score of atom in a gride
64
void
precompute_unweighted_score
();
65
66
//Return the score of a given residue
67
core::Real
68
residue_score
(
core::conformation::Residue
const
& rsd );
69
70
//Return the gradient of an atom
71
numeric::xyzVector< core::Real >
atom_gradient
(
core::pose::Pose
const
&
72
pose,
core::Size
const
& rsd_id,
core::Size
const
& atm_id );
73
74
private
:
75
76
numeric::xyzMatrix<core::Real>
f2c
,
c2f
,
i2c
,
c2i
;
77
78
bool
is_map_loaded
,
is_score_precomputed
;
79
80
core::Real
map_reso
,
cell_volume
,
r_cell_volume
,
max_del_grid
,
grid_spacing
,
gaussian_max_d
,
normalization
,
avg_rho_obs
;
81
82
//Stored 1d gaussian
83
utility::vector1< core::Real >
atom_gaussian_value
;
84
85
// the density data and precomputed score array
86
ObjexxFCL::FArray3D< float >
density
;
87
ObjexxFCL::FArray3D< double >
unweighted_score_coeff
;
88
//Stored atom weight
89
utility::vector1< utility::vector1 < core::Size >
>
atom_weight_stored
;
90
91
// map info
92
numeric::xyzVector< int >
grid
;
93
numeric::xyzVector< core::Real >
orig
;
94
numeric::xyzVector< float >
cell_angles
,
cell_dimensions
,
r_cell_angles
,
95
cos_r_cell_angles
,
r_cell_dimensions
;
96
//symmetry
97
utility::vector1< core::kinematics::RT >
symmOps
;
98
99
//helper function for symmetry
100
void
computeCrystParams
();
101
void
expandToUnitCell
();
102
void
initializeSymmOps
(
utility::vector1< std::string >
const
& symList );
103
104
//resize the map
105
void
resize
(
core::Real
approxGridSpacing );
106
107
//////////////////////////////////////////////////////////////////////
108
//compute index to cartesian transformation
109
void
calculate_index2cart
();
110
111
//generate 1d gaussian function and store it.
112
void
generate_gaussian_1d
(
core::Real
const
& sigma );
113
//Return the value of 1D gaussian given the distance using stored values
114
core::Real
gaussian_1d
(
core::Real
const
& dist );
115
116
//return the weight of atom given its element type
117
core::Size
get_atom_weight
(
std::string
const
& elt );
118
119
//Spline interpolation
120
core::Real
spline_interpolation
( ObjexxFCL::FArray3D < double >
121
& coeffs,
numeric::xyzVector< core::Real >
const
& idxX )
const
;
122
123
void
spline_coeffs
( ObjexxFCL::FArray3D< double > & data,
124
ObjexxFCL::FArray3D< double > & coeffs );
125
126
//Trilinear Interpolation
127
core::Real
trilinear_interpolation
( ObjexxFCL::FArray3D< double > & score,
128
numeric::xyzVector< core::Real >
const
& index );
129
130
numeric::xyzVector<core::Real>
trilinear_gradient
( ObjexxFCL::FArray3D
131
<
double
> & score,
numeric::xyzVector< core::Real >
const
& index );
132
133
//Convert a vector from xyz coordinate to index coordinate, shift w/ respect to the origin and fold into the unit cell
134
numeric::xyzVector< core::Real >
xyz2index_in_cell
(
numeric::xyzVector< core::Real >
const
& xyz_vector );
135
136
//Convert a vector from fractional coordinate to index coordinate
137
numeric::xyzVector< core::Real >
frac2index
(
numeric::xyzVector< core::Real >
const
&frac_vector );
138
139
//Convert a vector from index coordinate to fractional coordinate
140
numeric::xyzVector< core::Real >
index2frac
(
numeric::xyzVector< core::Real >
const
& frac_vector );
141
numeric::xyzVector< core::Real >
index2frac
(
numeric::xyzVector< int >
const
& frac_vector );
142
};
143
144
//@brief The EDM instance
145
ElectronDensityAtomwise
&
get_density_map
();
146
147
}
// electron_density_atomwise
148
}
// scoring
149
}
// core
150
151
152
#endif
Generated on Sat Jun 1 2013 11:36:44 for Rosetta 3.5 by
1.8.4