38 #include <utility/vector1.hh>
83 atom_vdw_( src.atom_vdw_ )
119 using namespace etable::count_pair;
145 for (
Size i = 1, i_end = rsd1.
natoms(); i <= i_end; ++i ) {
149 for (
Size j = 1, j_end = rsd2.
natoms(); j <= j_end; ++j ) {
151 Real const clash( bump_dsq - i_xyz.distance_squared( rsd2.
xyz(j) ) );
153 score += ( clash * clash ) / bump_dsq;
177 using namespace etable::count_pair;
180 Size const pos1( atom_id.
rsd() );
184 int const pos1_map( domain_map( pos1 ) );
185 bool const pos1_fixed( pos1_map != 0 );
187 Vector const & i_xyz( rsd1.xyz(i) );
188 Size const i_type( rsd1.atom_type_index(i) );
196 EnergyGraph const & energy_graph( energies.energy_graph() );
200 iru = energy_graph.get_node( pos1 )->const_edge_list_begin(),
202 iru != irue; ++iru ) {
205 Size const pos2( (*iru)->get_other_ind( pos1 ) );
207 if ( pos1_fixed && pos1_map == domain_map( pos2 ) )
continue;
211 if ( ! ( ( rsd1.is_protein() && ! rsd2.is_protein() ) ||
212 ( rsd2.is_protein() && ! rsd1.is_protein() ) ) )
continue;
213 assert( pos2 != pos1 );
214 assert( ! rsd1.is_bonded( rsd2 ) );
216 for (
Size j=1, j_end = rsd2.natoms(); j<= j_end; ++j ) {
218 Vector const & j_xyz( rsd2.xyz(j) );
219 Vector const f2( i_xyz - j_xyz );
220 Real const dis2( f2.length_squared() );
225 if ( dis2 < bump_dsq ) {
228 Vector const f1( i_xyz.cross( j_xyz ) );
229 F1 += dE_dr_over_r * f1;
230 F2 += dE_dr_over_r * f2;