31 #ifndef INCLUDED_core_scoring_etable_atom_pair_energy_inline_hh
32 #define INCLUDED_core_scoring_etable_atom_pair_energy_inline_hh
44 #include <numeric/xyzVector.hh>
47 #include <utility/vector1.hh>
60 template<
class T,
class T_Etable >
73 T_Etable
const & etable_energy,
81 Atom const & atom1( res1.
atom( atomno1 ) );
82 Atom const & atom2( res2.
atom( atomno2 ) );
86 for (
Size i = at2hbegin; i<= at2hend; ++i )
91 if ( count_pair( atomno1, i, weight, path_dist ) ) {
92 etable_energy.pair_energy_H( atom1, H2, weight, emap );
98 for (
Size i = at1hbegin; i<= at1hend; ++i )
104 if ( count_pair( i, atomno2, weight, path_dist ) ) {
105 etable_energy.pair_energy_H( H1, atom2, weight, emap );
109 for (
Size j = at2hbegin; j<= at2hend; ++j ) {
113 if ( count_pair( i, j, weight, path_dist ) ) {
114 etable_energy.pair_energy_H( H1, H2, weight, emap );
141 template <
class T,
class T_Etable >
147 T_Etable
const & etable_energy,
148 T const & count_pair,
166 Real const Hydrogen_interaction_cutoff2
167 ( etable_energy.hydrogen_interaction_cutoff2() );
177 for (
int i = res1_start, i_end = res1_end; i <= i_end; ++i ) {
181 for (
int j=res2_start, j_end = res2_end; j <= j_end; ++j ) {
187 if(atom1_virtual || atom2_virtual){
190 if ( count_pair( i, j, weight, path_dist ) ) {
192 etable_energy.atom_pair_energy( atom1, atom2, weight, emap, dsq );
199 dsq = atom1.xyz().distance_squared( atom2.xyz() );
201 if ( dsq < Hydrogen_interaction_cutoff2 ) {
204 r1hbegin[ i ], r1hend[ i ],
205 r2hbegin[ j ], r2hend[ j ],
206 count_pair, etable_energy , emap);
219 template <
class T,
class T_Etable >
224 T_Etable
const & etable_energy,
225 T const & count_pair,
239 Real const Hydrogen_interaction_cutoff2
240 ( etable_energy.hydrogen_interaction_cutoff2() );
250 for (
int i=1; i <= resnheavyatoms; ++i ) {
253 for (
int j=i+1; j <= resnheavyatoms; ++j ) {
258 if(atom1_virtual || atom2_virtual){
262 if ( count_pair( i, j, weight, path_dist ) ) {
264 etable_energy.atom_pair_energy( atom1, atom2, weight, emap, dsq );
270 dsq = atom1.xyz().distance_squared( atom2.xyz() );
273 if ( dsq < Hydrogen_interaction_cutoff2 ) {
276 rhbegin[ i ], rhend[ i ],
277 rhbegin[ j ], rhend[ j ],
278 count_pair, etable_energy, emap);
290 template <
class T,
class T_Etable >
296 T_Etable
const & etable_energy,
297 T const & count_pair,
302 res1, res2, etable_energy, count_pair, emap,
306 template <
class T,
class T_Etable>
312 T_Etable
const & etable_energy,
313 T const & count_pair,
318 res1, res2, etable_energy, count_pair, emap,
322 template <
class T,
class T_Etable >
328 T_Etable
const & etable_energy,
329 T const & count_pair,
334 res1, res2, etable_energy, count_pair, emap,
338 template <
class T,
class T_Etable>
344 T_Etable
const & etable_energy,
345 T const & count_pair,
350 res1, res2, etable_energy, count_pair, emap,
354 template <
class T,
class T_Etable>
360 T_Etable
const & etable_energy,
361 T const & count_pair,
366 res1, res2, etable_energy, count_pair, emap,