36 #include <basic/datacache/CacheableData.hh>
37 #include <basic/prof.hh>
40 #include <utility/vector1.hh>
50 methods::EnergyMethodOptions
const & options
52 return new FACTSEnergy( options );
55 ScoreTypes FACTSEnergyCreator::score_types_for_method()
const {
57 sts.push_back( facts_elec );
58 sts.push_back( facts_sasa );
64 potential_( src.potential_ ),
65 exclude_DNA_DNA_( src.exclude_DNA_DNA_ )
69 parent( new FACTSEnergyCreator ),
70 potential_(
ScoringManager::get_instance()->get_FACTSPotential() ),
71 exclude_DNA_DNA_( options.exclude_DNA_DNA() )
133 bool create_new_lre_container(
false );
135 if ( energies.long_range_container( lr_type ) == 0 ) {
136 create_new_lre_container =
true;
141 create_new_lre_container =
true;
145 if ( create_new_lre_container ) {
147 energies.set_long_range_container( lr_type, new_dec_elec );
149 energies.set_long_range_container( lr_type, new_dec_sasa );
173 ( static_cast< FACTSPoseInfo const & >( pose.
data().get( pose::datacache::CacheableDataType::FACTS_POSE_INFO ) ) );
191 using namespace conformation;
192 using namespace numeric;
193 using core::conformation::RotamerSetCacheableDataType::FACTS_ROTAMER_SET_INFO;
201 ( static_cast< FACTSPoseInfo const & >( pose.
data().get( pose::datacache::CacheableDataType::FACTS_POSE_INFO ) ) );
210 Real const polarE_noncorrect =
213 dBRi1, dBRi2, false );
215 Real const polarE_correct = 0.0;
221 Real const polarE = polarE_noncorrect + polarE_correct;
228 + sfxn[ facts_sasa ] * nonpolarE);
240 using namespace conformation;
241 using namespace numeric;
242 using core::conformation::RotamerSetCacheableDataType::FACTS_ROTAMER_SET_INFO;
265 (emaps[ ii ])[ facts_elec ] += polarE ;
266 (emaps[ ii ])[ facts_sasa ] += nonpolarE ;
276 ObjexxFCL::FArray2D< core::PackerEnergy > & energy_table
279 using namespace conformation;
280 using namespace numeric;
281 using core::conformation::RotamerSetCacheableDataType::FACTS_ROTAMER_SET_INFO;
286 PROF_START( basic::FACTS_ROTAMER_PAIR_ENERGIES );
303 Vector const & ii_coord( ii_example_rotamer.nbr_atom_xyz() );
304 Real const ii_radius( ii_example_rotamer.nbr_radius() );
310 if (
exclude_DNA_DNA_ && ii_example_rotamer.is_DNA() && jj_example_rotamer.is_DNA() )
continue;
312 Vector const & jj_coord( jj_example_rotamer.nbr_atom_xyz() );
313 Real const jj_radius( jj_example_rotamer.nbr_radius() );
317 Size const kk_rot_id = ii_offset + kk - 1;
319 Size const ll_rot_id = jj_offset + ll - 1;
337 *set2.
rotamer( ll_rot_id ) ) );
339 energy_table( ll_rot_id, kk_rot_id ) +=
static_cast< core::PackerEnergy >( weights[ facts_elec ] * polarE
340 + weights[ facts_sasa ] * nonpolarE );
348 PROF_START( basic::FACTS_ROTAMER_PAIR_ENERGIES );
455 PROF_START( basic::FACTS_ROTAMER_BACKGROUND_ENERGIES );
458 using core::conformation::RotamerSetCacheableDataType::FACTS_ROTAMER_SET_INFO;
461 ( pose.
data().get<
FACTSPoseInfo >( core::pose::datacache::CacheableDataType::FACTS_POSE_INFO ).residue_info(rsd.
seqpos()));
475 Vector const & ii_coord( ii_example_rotamer.nbr_atom_xyz() );
476 Real const ii_radius( ii_example_rotamer.nbr_radius() );
485 Size const kk_rot_id = ii_offset + kk - 1;
499 dBRi1, dBRi2, false ) );
503 energy_vector[ kk_rot_id ] +=
static_cast< core::PackerEnergy > (weights[ facts_elec ] * polarE
504 + weights[ facts_sasa ] * nonpolarE );
509 PROF_STOP( basic::FACTS_ROTAMER_BACKGROUND_ENERGIES );
522 using core::conformation::RotamerSetCacheableDataType::FACTS_ROTAMER_SET_INFO;
525 ( pose.
data().get<
FACTSPoseInfo >( core::pose::datacache::CacheableDataType::FACTS_POSE_INFO ).residue_info(rsd.
seqpos()));
539 Vector const & ii_coord( ii_example_rotamer.nbr_atom_xyz() );
540 Real const ii_radius( ii_example_rotamer.nbr_radius() );
549 Size const kk_rot_id = ii_offset + kk - 1;
554 dBRi1, dBRi2,
false) );
558 (emaps[ kk_rot_id ])[ facts_elec ] += polarE;
559 (emaps[ kk_rot_id ])[ facts_sasa ] += nonpolarE;
603 ( pose.
data().get<
FACTSPoseInfo >( core::pose::datacache::CacheableDataType::FACTS_POSE_INFO ).residue_info( rsd.
seqpos()));