38 #include <utility/vector1.hh>
106 { 0.86, 3.30, 3.30, 2.79, 1.75, 0.99, 0.91, 0.60, 0.46, 0.33, 0.19, 0.25, 0.20, 0.22, 0.18, 0.18, 0.12, 0.08,-0.03,-0.07,-0.18,-0.23,-0.26,-0.25,-0.29,-0.29,-0.28,-0.28,-0.29,-0.32,-0.35,-0.45,-0.59,-0.59,-0.74,-1.05,-0.71,-0.79,-0.71,-1.00},
107 {-0.28, 2.17, 2.17, 2.42, 2.20, 2.35, 1.99, 2.21, 2.12, 1.68, 1.48, 1.39, 1.26, 0.96, 0.84, 0.60, 0.40, 0.17,-0.00,-0.22,-0.37,-0.46,-0.53,-0.57,-0.61,-0.69,-0.69,-0.73,-0.72,-0.84,-0.68,-0.74,-0.67,-0.88,-0.93,-0.41,-1.15,-1.28,-1.28,-1.28},
108 {-0.50, 2.55, 2.55, 1.09,-0.12,-0.35,-0.42,-0.54,-0.48,-0.54,-0.52,-0.51,-0.42,-0.41,-0.31,-0.22,-0.11,-0.03, 0.12, 0.28, 0.39, 0.59, 0.65, 0.75, 0.93, 1.08, 1.20, 1.15, 1.18, 1.16, 1.07, 1.23, 1.26, 1.41, 1.85, 1.88, 1.02, 1.02, 1.02, 1.02},
109 {-0.17,-0.03,-0.03,-0.79,-0.83,-0.72,-0.87,-0.82,-0.81,-0.69,-0.65,-0.54,-0.45,-0.35,-0.25,-0.12, 0.07, 0.25, 0.40, 0.54, 0.77, 0.90, 1.10, 1.17, 1.35, 1.43, 1.50, 1.66, 1.72, 1.71, 1.68, 1.80, 1.86, 1.79, 1.53, 2.29, 2.06, 2.06, 1.01, 0.39},
110 { 0.83, 0.33, 0.01, 0.05, 0.34, 0.49, 0.77, 0.88, 1.07, 1.10, 1.07, 0.99, 0.89, 0.76, 0.58, 0.45, 0.28, 0.19, 0.10,-0.03,-0.16,-0.27,-0.32,-0.44,-0.53,-0.58,-0.65,-0.74,-0.80,-0.78,-0.74,-0.68,-0.58,-0.32,-0.41,-0.25,-0.39, 0.73, 0.51, 0.51},
111 { 0.36, 2.30, 2.30, 3.06, 2.20, 1.23, 0.75, 0.41, 0.19, 0.09, 0.00,-0.11,-0.11,-0.15,-0.16,-0.12,-0.11,-0.11,-0.12,-0.05,-0.07,-0.01, 0.02, 0.04, 0.12, 0.11, 0.09, 0.05, 0.03,-0.09,-0.13,-0.26,-0.33,-0.55,-0.62,-0.80,-0.83,-1.30,-0.94,-1.68},
112 {-0.42,-0.22,-0.38,-0.72,-0.47,-0.38,-0.18,-0.17,-0.07,-0.03,-0.04,-0.06,-0.15,-0.10,-0.15,-0.19,-0.20,-0.12,-0.01,-0.09, 0.02, 0.07, 0.20, 0.27, 0.34, 0.33, 0.37, 0.36, 0.31, 0.34, 0.23, 0.38, 0.38, 0.37, 0.17, 0.03, 0.60, 0.18, 0.18, 0.18},
113 {-0.63, 2.00, 2.00, 1.03, 0.94, 1.32, 1.35, 1.50, 1.30, 1.27, 1.06, 1.05, 1.02, 0.87, 0.74, 0.60, 0.48, 0.39, 0.18, 0.09,-0.09,-0.19,-0.28,-0.42,-0.55,-0.65,-0.78,-0.86,-0.97,-1.01,-1.07,-1.05,-1.03,-0.97,-1.02,-0.90,-0.84,-0.72,-0.76,-0.47},
114 { 0.09,-0.92,-1.60,-1.63,-1.51,-1.35,-1.24,-1.07,-0.87,-0.70,-0.59,-0.50,-0.41,-0.29,-0.17, 0.01, 0.21, 0.44, 0.63, 0.87, 1.18, 1.31, 1.51, 1.75, 1.89, 2.04, 2.20, 2.14, 2.20, 2.22, 2.24, 1.96, 2.04, 2.29, 2.42, 2.14, 2.61, 2.61, 2.61, 2.61},
115 { 0.38, 3.38, 3.38, 2.13, 1.48, 1.56, 1.44, 1.52, 1.28, 1.13, 1.10, 1.05, 0.85, 0.69, 0.50, 0.30, 0.15,-0.04,-0.12,-0.26,-0.30,-0.40,-0.51,-0.57,-0.61,-0.62,-0.60,-0.54,-0.43,-0.38,-0.26,-0.18,-0.09, 0.06, 0.41, 0.60, 0.01, 0.84, 0.62, 0.62},
116 { 0.04, 0.24, 0.69, 0.58, 0.65, 0.52, 0.75, 0.75, 0.73, 0.80, 0.84, 0.80, 0.88, 0.61, 0.52, 0.40, 0.30, 0.18, 0.12, 0.03,-0.11,-0.14,-0.22,-0.34,-0.42,-0.52,-0.62,-0.68,-0.80,-0.85,-0.96,-0.90,-0.91,-0.89,-0.70,-0.79,-0.33,-0.46,-0.28,-0.28},
117 { 0.48, 1.95, 1.95, 1.05,-0.21,-0.34,-0.35,-0.33,-0.33,-0.40,-0.34,-0.30,-0.31,-0.27,-0.21,-0.17,-0.14,-0.12, 0.00, 0.08, 0.16, 0.25, 0.38, 0.53, 0.60, 0.61, 0.75, 0.79, 0.78, 0.71, 0.71, 0.72, 0.85, 0.96, 1.09, 0.65, 0.93, 0.93, 0.57, 0.57},
118 { 0.96, 2.02, 2.02, 1.58, 0.24,-0.18,-0.37,-0.46,-0.36,-0.33,-0.26,-0.20,-0.18,-0.13,-0.10,-0.11,-0.07,-0.04,-0.00,-0.00, 0.08, 0.14, 0.23, 0.27, 0.42, 0.45, 0.43, 0.48, 0.55, 0.63, 0.62, 0.55, 0.56, 0.73, 0.44, 0.54, 0.78, 0.87, 0.64, 0.64},
119 {-0.19, 0.46, 0.46,-0.20,-0.30,-0.25,-0.49,-0.45,-0.51,-0.50,-0.41,-0.36,-0.36,-0.33,-0.27,-0.21,-0.18,-0.09, 0.04, 0.16, 0.32, 0.51, 0.58, 0.73, 0.89, 0.86, 0.98, 1.06, 0.97, 1.06, 1.02, 0.86, 0.80, 0.65, 0.93, 1.40, 2.15, 0.63, 0.41, 0.41},
120 {-0.67,-2.65,-2.20,-1.66,-1.17,-0.94,-0.63,-0.49,-0.44,-0.42,-0.34,-0.37,-0.41,-0.39,-0.31,-0.25,-0.19,-0.01, 0.07, 0.25, 0.40, 0.59, 0.76, 0.90, 1.16, 1.34, 1.54, 1.70, 1.84, 1.75, 1.82, 2.14, 2.21, 2.24, 2.09, 2.41, 1.77, 1.77, 1.77, 1.77},
121 {-0.06, 1.39, 2.54, 2.80, 1.26, 0.45, 0.39, 0.11,-0.08,-0.12,-0.19,-0.22,-0.21,-0.17,-0.17,-0.15,-0.14,-0.12,-0.11,-0.03, 0.02, 0.04, 0.11, 0.21, 0.17, 0.26, 0.31, 0.30, 0.29, 0.33, 0.21, 0.28, 0.18, 0.06,-0.07, 0.31,-0.02,-0.40,-0.92, 0.25},
122 {-0.47, 2.89, 2.89, 2.86, 1.39, 0.90, 0.82, 0.57, 0.28, 0.11, 0.01,-0.14,-0.19,-0.19,-0.24,-0.27,-0.28,-0.25,-0.18,-0.13,-0.08,-0.03, 0.09, 0.10, 0.17, 0.22, 0.20, 0.21, 0.29, 0.24, 0.25, 0.23, 0.18, 0.10, 0.43, 0.36,-0.07,-0.05,-0.28, 0.20},
123 {-0.09, 3.86, 3.86, 4.12, 2.10, 1.67, 1.69, 1.62, 1.44, 1.20, 1.05, 0.85, 0.73, 0.54, 0.40, 0.22, 0.05,-0.06,-0.17,-0.32,-0.38,-0.47,-0.52,-0.52,-0.54,-0.50,-0.47,-0.42,-0.36,-0.28,-0.25,-0.26,-0.17,-0.33,-0.18, 0.11, 0.01,-0.06,-0.00,-0.62},
124 {-0.00,-0.00, 1.55, 0.42, 0.76, 0.85, 0.96, 0.97, 1.05, 1.05, 0.95, 0.87, 0.65, 0.47, 0.19, 0.05,-0.09,-0.19,-0.32,-0.41,-0.47,-0.41,-0.41,-0.46,-0.34,-0.36,-0.29,-0.22,-0.25,-0.10, 0.10, 0.28, 0.39, 0.66, 0.34, 1.86, 1.86, 1.86, 1.86, 1.86},
125 { 1.40,-0.20, 0.01,-0.29, 0.24, 0.38, 0.55, 0.63, 0.70, 0.65, 0.58, 0.44, 0.30, 0.12,-0.01,-0.15,-0.18,-0.31,-0.33,-0.31,-0.28,-0.28,-0.26,-0.16,-0.14,-0.11,-0.05, 0.02,-0.02, 0.11, 0.16, 0.12, 0.17, 0.38, 0.45, 0.12, 0.74, 0.74, 0.38, 0.38} };
129 { 3.46, 3.33, 3.05, 2.54, 1.89, 1.30, 0.90, 0.65, 0.48, 0.35, 0.27, 0.23, 0.21, 0.21, 0.18, 0.16, 0.11, 0.06,-0.01,-0.09,-0.16,-0.21,-0.25,-0.26,-0.28,-0.28,-0.28,-0.29,-0.30,-0.33,-0.39,-0.46,-0.55,-0.63,-0.70,-0.74,-0.76,-0.81,-0.89,-1.00 },
130 { 2.60, 2.54, 2.47, 2.39, 2.29, 2.22, 2.18, 2.11, 1.97, 1.76, 1.55, 1.37, 1.20, 1.01, 0.81, 0.60, 0.40, 0.19,-0.01,-0.19,-0.33,-0.44,-0.51,-0.57,-0.62,-0.66,-0.69,-0.73,-0.74,-0.75,-0.73,-0.74,-0.76,-0.84,-0.93,-1.04,-1.14,-1.22,-1.27,-1.28 },
131 {-0.50,-0.47,-0.45,-0.43,-0.43,-0.43,-0.45,-0.48,-0.50,-0.52,-0.51,-0.48,-0.44,-0.38,-0.30,-0.22,-0.11, 0.00, 0.13, 0.27, 0.41, 0.54, 0.66, 0.79, 0.91, 1.02, 1.09, 1.13, 1.16, 1.18, 1.20, 1.24, 1.29, 1.35, 1.41, 1.46, 1.49, 1.50, 1.47, 1.43 },
132 {-0.81,-0.82,-0.82,-0.80,-0.80,-0.80,-0.81,-0.80,-0.77,-0.71,-0.63,-0.54,-0.45,-0.35,-0.23,-0.09, 0.07, 0.23, 0.40, 0.57, 0.74, 0.91, 1.06, 1.19, 1.32, 1.42, 1.53, 1.62, 1.68, 1.71, 1.74, 1.78, 1.82, 1.85, 1.88, 1.89, 1.88, 1.87, 1.86, 1.88 },
133 { 0.37, 0.36, 0.36, 0.38, 0.45, 0.56, 0.72, 0.88, 1.00, 1.05, 1.04, 0.97, 0.87, 0.74, 0.59, 0.45, 0.31, 0.19, 0.08,-0.03,-0.14,-0.25,-0.34,-0.43,-0.51,-0.59,-0.66,-0.72,-0.76,-0.76,-0.72,-0.64,-0.54,-0.43,-0.37,-0.32,-0.30,-0.26,-0.25,-0.24 },
134 { 2.37, 2.32, 2.26, 2.10, 1.78, 1.32, 0.86, 0.49, 0.26, 0.11, 0.00,-0.07,-0.11,-0.14,-0.14,-0.13,-0.12,-0.11,-0.10,-0.07,-0.05,-0.02, 0.02, 0.06, 0.09, 0.09, 0.08, 0.05, 0.00,-0.08,-0.15,-0.26,-0.37,-0.51,-0.64,-0.76,-0.84,-0.92,-0.99,-1.06 },
135 {-0.42,-0.35,-0.32,-0.32,-0.31,-0.28,-0.21,-0.15,-0.09,-0.06,-0.06,-0.08,-0.11,-0.13,-0.15,-0.17,-0.16,-0.14,-0.10,-0.05, 0.01, 0.09, 0.18, 0.25, 0.31, 0.34, 0.35, 0.35, 0.34, 0.34, 0.35, 0.36, 0.37, 0.36, 0.34, 0.33, 0.30, 0.26, 0.22, 0.18 },
136 { 1.39, 1.37, 1.35, 1.33, 1.32, 1.32, 1.32, 1.31, 1.28, 1.23, 1.15, 1.07, 0.97, 0.86, 0.74, 0.61, 0.48, 0.35, 0.21, 0.07,-0.06,-0.18,-0.30,-0.42,-0.54,-0.65,-0.76,-0.86,-0.94,-1.00,-1.04,-1.04,-1.03,-1.00,-0.95,-0.90,-0.85,-0.79,-0.73,-0.64 },
137 {-1.55,-1.60,-1.61,-1.57,-1.49,-1.36,-1.22,-1.05,-0.89,-0.73,-0.61,-0.50,-0.40,-0.28,-0.14, 0.03, 0.22, 0.43, 0.66, 0.89, 1.12, 1.33, 1.52, 1.71, 1.87, 2.00, 2.08, 2.14, 2.18, 2.21, 2.22, 2.23, 2.27, 2.32, 2.41, 2.49, 2.56, 2.60, 2.61, 2.61 },
138 { 2.77, 2.62, 2.40, 2.11, 1.83, 1.62, 1.48, 1.38, 1.29, 1.19, 1.10, 0.99, 0.85, 0.68, 0.50, 0.32, 0.15, 0.00,-0.12,-0.23,-0.32,-0.41,-0.49,-0.55,-0.59,-0.60,-0.57,-0.52,-0.44,-0.36,-0.27,-0.17,-0.05, 0.08, 0.23, 0.36, 0.47, 0.55, 0.60, 0.62 },
139 { 0.99, 0.98, 0.96, 0.95, 0.94, 0.92, 0.91, 0.89, 0.87, 0.85, 0.82, 0.77, 0.70, 0.61, 0.51, 0.40, 0.30, 0.20, 0.11, 0.02,-0.07,-0.15,-0.24,-0.33,-0.42,-0.52,-0.61,-0.69,-0.78,-0.85,-0.90,-0.91,-0.90,-0.87,-0.81,-0.72,-0.60,-0.49,-0.40,-0.33 },
140 {-0.17,-0.21,-0.22,-0.24,-0.26,-0.30,-0.33,-0.34,-0.35,-0.35,-0.34,-0.32,-0.29,-0.26,-0.22,-0.18,-0.13,-0.08,-0.01, 0.08, 0.17, 0.27, 0.38, 0.49, 0.58, 0.65, 0.71, 0.75, 0.76, 0.74, 0.74, 0.75, 0.79, 0.81, 0.84, 0.86, 0.89, 0.89, 0.86, 0.83 },
141 { 0.06, 0.04, 0.02,-0.02,-0.09,-0.20,-0.31,-0.37,-0.37,-0.32,-0.26,-0.22,-0.17,-0.14,-0.11,-0.09,-0.07,-0.04,-0.01, 0.03, 0.08, 0.15, 0.22, 0.30, 0.37, 0.42, 0.46, 0.50, 0.55, 0.59, 0.61, 0.61, 0.61, 0.61, 0.62, 0.63, 0.63, 0.64, 0.64, 0.64 },
142 {-0.19,-0.14,-0.15,-0.19,-0.27,-0.33,-0.41,-0.46,-0.48,-0.46,-0.42,-0.38,-0.35,-0.31,-0.27,-0.22,-0.15,-0.07, 0.04, 0.18, 0.32, 0.47, 0.60, 0.72, 0.82, 0.90, 0.96, 1.00, 1.02, 1.01, 0.96, 0.88, 0.79, 0.71, 0.66, 0.63, 0.60, 0.55, 0.48, 0.41 },
143 {-2.73,-2.48,-2.12,-1.70,-1.28,-0.95,-0.71,-0.55,-0.46,-0.41,-0.38,-0.38,-0.38,-0.36,-0.31,-0.24,-0.15,-0.03, 0.10, 0.25, 0.41, 0.58, 0.76, 0.94, 1.14, 1.34, 1.52, 1.66, 1.75, 1.82, 1.92, 2.05, 2.14, 2.21, 2.17, 2.11, 1.95, 1.84, 1.77, 1.77 },
144 { 1.44, 1.28, 1.08, 0.86, 0.66, 0.48, 0.32, 0.14,-0.01,-0.11,-0.17,-0.19,-0.20,-0.18,-0.17,-0.15,-0.14,-0.12,-0.08,-0.04, 0.01, 0.06, 0.11, 0.17, 0.21, 0.25, 0.28, 0.30, 0.29, 0.29, 0.26, 0.22, 0.16, 0.09, 0.03,-0.01,-0.03,-0.05,-0.04,-0.02 },
145 { 1.36, 1.32, 1.26, 1.18, 1.06, 0.92, 0.75, 0.55, 0.34, 0.15, 0.01,-0.10,-0.16,-0.20,-0.23,-0.25,-0.26,-0.23,-0.18,-0.13,-0.07,-0.01, 0.06, 0.11, 0.16, 0.19, 0.21, 0.23, 0.25, 0.25, 0.24, 0.21, 0.17, 0.13, 0.08, 0.03,-0.03,-0.07,-0.11,-0.14 },
146 { 2.92, 2.80, 2.64, 2.39, 2.11, 1.85, 1.69, 1.55, 1.41, 1.23, 1.05, 0.87, 0.71, 0.55, 0.39, 0.23, 0.08,-0.06,-0.18,-0.29,-0.38,-0.45,-0.50,-0.52,-0.52,-0.50,-0.46,-0.41,-0.36,-0.30,-0.26,-0.25,-0.24,-0.22,-0.16,-0.10,-0.04,-0.03,-0.03,-0.05 },
147 { 0.67, 0.69, 0.71, 0.73, 0.78, 0.85, 0.93, 0.98, 1.01, 1.00, 0.93, 0.81, 0.64, 0.45, 0.24, 0.07,-0.08,-0.19,-0.30,-0.38,-0.42,-0.43,-0.42,-0.41,-0.37,-0.34,-0.29,-0.24,-0.18,-0.06, 0.08, 0.22, 0.30, 0.34, 0.36, 0.37, 0.39, 0.41, 0.42, 0.43 },
148 { 0.01, 0.01, 0.04, 0.11, 0.23, 0.38, 0.51, 0.60, 0.64, 0.62, 0.55, 0.43, 0.29, 0.14, 0.00,-0.11,-0.20,-0.27,-0.30,-0.30,-0.29,-0.27,-0.23,-0.19,-0.14,-0.09,-0.05,-0.01, 0.03, 0.08, 0.12, 0.17, 0.24, 0.32, 0.39, 0.42, 0.41, 0.40, 0.39, 0.38 } };
195 for (
Size i = 1; i <= nres; ++i ) {
216 ir = graph.get_node(i)->const_edge_list_begin(),
219 Size const j( (*ir)->get_other_ind( i ) );
221 Size atomindex_j( rsd_j.type().nbr_atom() );
225 Real sqdist = atom_i.
xyz().distance_squared(atom_j.xyz());
281 ir = graph.get_node( rsd.
seqpos() )->const_edge_list_begin(),
282 ire = graph.get_node( rsd.
seqpos() )->const_edge_list_end();
284 Size const j( (*ir)->get_other_ind( rsd.
seqpos() ) );
290 Size atomindex_j( rsd_j.nbr_atom() );
294 Real sqdist = atom_i.
xyz().distance_squared( atom_j.xyz() );
342 bool const input_atom_is_nbr( i_nbr_atom ==
Size (atom_id.
atomno()) );
343 bool const input_atom_is_rep( i_rep_atom ==
Size ( atom_id.
atomno() ));
348 ir = graph.get_node(i)->const_edge_list_begin(),
351 Size const j( (*ir)->get_other_ind( i ) );
359 Size const resj_nbr_atom = rsd_j.nbr_atom();
360 if ( resj_rep_atom == resj_nbr_atom ) {
363 atom_i, rsd_j.atom( resj_rep_atom ),
368 atom_i, rsd_j.atom( resj_rep_atom ),
373 atom_i, rsd_j.atom( resj_nbr_atom ),
381 atom_i, rsd_j.atom( resj_rep_atom ),
386 Size const resj_nbr_atom = rsd_j.nbr_atom();
388 atom_i, rsd_j.atom( resj_nbr_atom ),
439 utility_exit_with_message(
"ERROR: Failed to find amino acid " +
chemical::name_from_aa( aa ) +
" in EnvSmooth::representative_atom_name" );
444 return calpha_string;
466 Real & dscore_dneighbor_count
469 Size low_bin =
static_cast< Size > ( floor(neighbor_count));
470 Size high_bin =
static_cast< Size > ( ceil(neighbor_count));
471 Real inter = neighbor_count - low_bin;
473 int const aa_as_int =
static_cast< int > (aa);
476 score =
envdata[ aa_as_int - 1 ][ low_bin ] * (1.0-inter) +
477 envdata[ aa_as_int - 1 ][ high_bin ] * (inter);
478 dscore_dneighbor_count =
envdata[ aa_as_int - 1 ][ high_bin ] -
479 envdata[ aa_as_int - 1 ][ low_bin ];
481 score =
envdata[ aa_as_int - 1 ][ 39 ];
482 dscore_dneighbor_count = 0;
485 dscore_dneighbor_count *= 2.019;
496 Real dist = sqrt( sqdist );
506 Real weighted_dScore_dN,
520 dist = sqrt( dist2 );
525 Real dscoredd = ( weighted_dScore_dN ) * dNdd;
526 if ( dscoredd != 0 ) {
554 core::Real dNdd_numerical=0;
555 core::Real dx = 0.001;
557 core::Real dist1 = dist;
559 if( dist1 > end_sig ) weight1 = 0;
560 else if( dist1 < start_sig ) weight1 = 1.0;
561 else weight1 = sqr(1.0 - sqr( (dist1 - start_sig) / (end_sig - start_sig) ) );
563 core::Real dist2 = dist+dx;
565 if( dist2 > end_sig ) weight2 = 0;
566 else if( dist2 < start_sig ) weight2 = 1.0;
567 else weight2 = sqr(1.0 - sqr( (dist2 - start_sig) / (end_sig - start_sig) ) );
569 std::cout << "I: " << dNdd << " " << (weight2-weight1)/dx << std::endl;