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
PoissonBoltzmannPotential.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/PoissonBoltzmannPotential.hh
11
/// @brief Poisson Boltzmann potential class delcaration
12
/// @author Yifan Song (yfsong@uw.edu)
13
14
#ifndef INCLUDED_core_scoring_PoissonBoltzmannPotential_HH
15
#define INCLUDED_core_scoring_PoissonBoltzmannPotential_HH
16
17
// Unit Headers
18
#include <
core/scoring/PoissonBoltzmannPotential.fwd.hh
>
19
#include <utility/pointer/ReferenceCount.hh>
20
21
#include <ObjexxFCL/FArray3D.hh>
22
#include <numeric/xyzMatrix.hh>
23
#include <numeric/xyzVector.hh>
24
25
#include <
core/types.hh
>
26
#include <
core/conformation/Residue.fwd.hh
>
27
#include <
core/pose/Pose.fwd.hh
>
28
#include <utility/vector1.hh>
29
#include <utility/file/PathName.hh>
30
31
#include <map>
32
#include <vector>
33
34
namespace
core {
35
namespace
scoring {
36
37
class
PoissonBoltzmannPotential
:
public
utility::pointer::ReferenceCount
38
{
39
public
:
40
static
const
std::string
APBS_CONFIG_EXT
;
41
static
const
std::string
APBS_PQR_EXT
;
42
static
const
std::string
APBS_DX_EXT
;
43
static
const
std::string
DEFAULT_APBS_PATH
;
44
45
46
PoissonBoltzmannPotential
();
47
48
virtual
~PoissonBoltzmannPotential
();
// auto-removing definition from header{}
49
50
core::Real
get_potential
(ObjexxFCL::FArray3D< core::Real >
const
& potential,
51
numeric::xyzVector<core::Real>
const
& cartX)
const
;
52
void
53
eval_PB_energy_residue
(
54
core::conformation::Residue
const
& rsd,
55
Real
& PB_energy_residue,
56
Real
& PB_energy_backbone,
57
Real
& PB_energy_sidechain,
58
Real
const
& PB_burial_weight
59
)
const
;
60
61
//////////////////////////////////
62
//////////////////////////////////
63
// functions to convert between indices and cartesian coords
64
inline
void
cart2idx
(
numeric::xyzVector<core::Real>
const
& cartX,
numeric::xyzVector<core::Real>
& idxX )
const
{
65
idxX =
c2i_
*(cartX-
lower_bound_
) +
numeric::xyzVector<core::Real>
(1,1,1);
66
}
67
68
template
<
class
Q>
69
inline
void
idx2cart
(
numeric::xyzVector<Q>
const
& idxX ,
numeric::xyzVector<core::Real>
&cartX )
const
{
70
cartX =
i2c_
*
numeric::xyzVector<core::Real>
(idxX -
numeric::xyzVector<Q>
(1,1,1)) +
lower_bound_
;
71
}
72
numeric::xyzVector< core::Real >
lower_bound
()
const
{
73
return
lower_bound_
;
74
}
75
numeric::xyzVector< core::Real >
upper_bound
()
const
{
76
return
upper_bound_
;
77
}
78
79
bool
out_of_bounds
(
numeric::xyzVector< core::Real >
const
cartX)
const
{
80
for
(
core::Size
i=0;i<3;++i) {
81
if
(cartX[i] <
lower_bound
()[i])
return
true
;
82
if
(cartX[i] >
upper_bound
()[i])
return
true
;
83
}
84
return
false
;
85
}
86
87
/// Execute ABPS to freshly compute the electrotatic field.
88
/// @param pose The pose
89
/// @param state_tag Arbitrary string for generating APBS files. e.g. The current energy state.
90
/// @param is_residue_charged_by_name Which residues are charged? The key is the residue name.
91
void
solve_pb
(
core::pose::Pose
const
& pose,
92
std::string
const
& state_tag,
93
std::map<std::string, bool>
const
& is_residue_charged_by_name );
94
private
:
95
numeric::xyzMatrix< core::Real >
i2c_
,
c2i_
;
96
numeric::xyzVector< core::Real >
lower_bound_
;
97
numeric::xyzVector< core::Real >
upper_bound_
;
98
numeric::xyzVector< core::Real >
grid_spacing_
;
99
numeric::xyzVector< core::Size >
n_grid_
;
100
ObjexxFCL::FArray3D< core::Real >
potential_
;
101
102
std::string
config_filename_
;
103
std::string
pqr_filename_
;
104
std::string
dx_filename_
;
105
std::string
apbs_path_
;
// full path name to the APBS executable: e.g. /usr/bin/apbs.exe
106
bool
calcenergy_
;
107
108
/// Prepare ABPS - generate .in and .pqr
109
void
write_config
(
110
core::pose::Pose
const
& pose)
const
;
111
112
/// Read & load the APBS results
113
#ifdef LINK_APBS_LIB
114
void
load_potential(
const
double
grid_meta[],
115
const
double
pot[] );
116
#else
117
void
load_APBS_potential
();
118
#endif
119
120
/// Write out .pqr
121
void
write_pqr
(
core::pose::Pose
const
& pose,
122
std::map<std::string, bool>
const
& is_residue_charged_by_name)
const
;
123
124
};
125
126
}
127
}
128
129
#endif
Generated on Sat Jun 1 2013 11:39:42 for Rosetta 3.5 by
1.8.4