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
packstat
CavityBall.cc
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/packstat/CavityBall.cc
11
///
12
/// @brief
13
/// @author will sheffler
14
15
16
// Unit header or inline function header
17
#include <
core/scoring/packstat/CavityBall.hh
>
18
19
// AUTO-REMOVED #include <ObjexxFCL/string.functions.hh>
20
21
#include <iostream>
22
#include <sstream>
23
24
#include <ObjexxFCL/format.hh>
25
26
27
28
29
30
namespace
core {
31
namespace
scoring {
32
namespace
packstat {
33
34
35
using namespace
std;
36
using namespace
utility;
37
using namespace
numeric;
38
using namespace
ObjexxFCL;
39
using namespace
ObjexxFCL::fmt;
40
41
CavityBall::CavityBall
(
int
const
id
,
int
const
sphere,
42
numeric::xyzVector<PackstatReal>
const
xyz
,
PackstatReal
const
r ) :
43
id_(id),
44
sphere_(sphere),
45
cluster_(id),
46
xyz_(xyz),
47
radius_(r),
48
area(0.0),
49
vol(0.0),
50
exposed_radius(0.0f),
51
anb(-12345)
52
// sasa_(-1234.0f)//,
53
// surrounding_sasa_(N_CAVBALL_DISBINS,30,0.0f),
54
//surrounding_sasa_5A_(30,0.0f),
55
// heavyatom_(false),
56
// num_other_balls_overlap_(-1234),
57
// num_buried_other_balls_overlap_(-1234),
58
// num_big_other_balls_overlap_(-1234),
59
// num_big_buried_other_balls_overlap_(-1234),
60
// cluster_id_(-1234),
61
// cluster_(NULL)
62
{
63
64
// hole_sasa_ .clear();
65
// hole_sasa_ .resize(N_PR_BIN,0);
66
// neighbor_count_.clear();
67
// avg_bfactor_ .clear();
68
// avg_occupancy_ .clear();
69
// absolute_shell_rms_.clear();
70
// relative_shell_rms_.clear();
71
// neighbor_count_.resize(N_CAVBALL_DISBINS,-1234);
72
// avg_bfactor_ .resize(N_CAVBALL_DISBINS,-1234);
73
// avg_occupancy_ .resize(N_CAVBALL_DISBINS,-1234);
74
// absolute_shell_rms_.resize(N_CAVBALL_DISBINS,-1234);
75
// relative_shell_rms_.resize(N_CAVBALL_DISBINS,-1234);
76
77
}
78
79
// bool CavityBall::cmp( CavityBall * a, CavityBall * b ) {
80
// return a->radius() > b->radius();
81
// }
82
//
83
// bool CavityBall::overlaps( CavityBall const *b ) const {
84
// return distto(b) < -0.5;
85
// }
86
87
string
const
CavityBall::str
()
const
{
88
ostringstream oss;
89
oss <<
"CavityBall "
90
<<
id_
<<
" "
91
<<
sphere_
<<
" "
92
<<
radius_
<<
" "
93
// << sasa_ << " "
94
// << I(5, num_other_balls_overlap_ )
95
// << I(5, num_buried_other_balls_overlap_ )
96
// << I(5, num_big_other_balls_overlap_ )
97
// << I(5, num_big_buried_other_balls_overlap_ )
98
<<
' '
<<
xyz_
.x() <<
','
<<
xyz_
.y() <<
','
<<
xyz_
.z()
99
<<
' '
;
100
// for (int ii=1; ii <= (int)big_buried_neighboring_cavity_balls_.size(); ii++) {
101
// oss<< big_buried_neighboring_cavity_balls_[ii]->id_ << ' ';
102
// }
103
return
oss.str();
104
}
105
106
// new convention is to use rosetta atom# for atom# line
107
// and 500 + rosetta res# for res number
108
// before, atom# was 10 x radius and res# was
109
// hole index in proteinSasa's cavity_balls_ array
110
string
const
CavityBall::hetero_atom_line
(
int
const
hetresnum,
int
const
/*chain*/
,
core::Real
radsub )
const
111
{
112
// string CAV = ObjexxFCL::string_of(cluster_);
113
// if( CAV.size() == 1 ) {
114
// CAV = "C0"+CAV;
115
// } else if( CAV.size() == 2 ) {
116
// CAV = "C"+CAV;
117
// } else {
118
// CAV = CAV.substr(0,3);
119
// }
120
std::string
alpha =
"ZYXWVUTSRQPONMLKJIHGFEDCBA"
;
121
for
(
int
i = 1; i <= 6; ++i) alpha += alpha;
// 64 x
122
return
"HETATM"
+ I( 5, ( min( 9999,
id_
) ) ) +
" V CAV "
+alpha[
cluster_
-1]
123
+ I( 4, hetresnum ) +
" "
124
+ F( 8, 3,
xyz_
.x() ) + F( 8, 3,
xyz_
.y() ) + F( 8, 3,
xyz_
.z() )
125
+ F( 6, 2,
exposed_radius
) +
' '
+ F( 5, 2, max(0.1,
radius_
-radsub) );
126
//+ F( 6, 2, evdw ) + ' ' + F( 5, 2, max(0.1,radius_-radsub) );
127
}
128
129
130
// int CavityBall::recursive_mark_hole_neighbors( vector1<CavityBall> & holes, int const cluster ) {
131
// if ( cluster_id_ != -1234 ) {
132
// return 0;
133
// }
134
// cluster_id_ = cluster;
135
// int count = 1;
136
// for ( int ii=1; ii<=(int)big_buried_neighboring_cavity_balls_.size(); ii++) {
137
// /*cerr << "PACKING: add hole "
138
// << big_buried_neighboring_cavity_balls_[ii]->id_
139
// << " to cluster "
140
// << cluster
141
// << " base atom "
142
// << id_
143
// << endl; */
144
// count += big_buried_neighboring_cavity_balls_[ii]->recursive_mark_hole_neighbors( holes, cluster );
145
// }
146
// return count;
147
// }
148
149
150
151
}
// namespace packstat
152
}
// namespace scoring
153
}
// namespace core
Generated on Sat Jun 1 2013 11:39:34 for Rosetta 3.5 by
1.8.4