28 #include <core/chemical/VariantType.hh>
36 #include <numeric/conversions.hh>
37 #include <numeric/angle.functions.hh>
40 #include <basic/Tracer.hh>
44 static THREAD_LOCAL basic::Tracer
TR(
"core.scoring.methods.carbohydrates.SugarBackboneEnergy" );
50 namespace carbohydrates {
77 using namespace utility;
78 using namespace chemical::rings;
79 using namespace chemical::carbohydrates;
80 using namespace scoring::carbohydrates;
100 if ( info->is_L_sugar() ) {
107 if ( info->is_alpha_sugar() ) {
109 }
else if ( info->is_beta_sugar() ) {
119 if ( prev_rsd.is_carbohydrate() ) {
122 if ( prev_info->is_pyranose() ) {
124 uint const connect_atom( prev_rsd.connect_atom( rsd ) );
127 psi = numeric::nonnegative_principal_angle_degrees( psi );
129 if ( prev_info->is_L_sugar() ) {
136 vector1< uint >
const ring_atoms( prev_rsd.type().ring_atoms( 1 ) );
140 vector1< uint >
const bonded_heavy_atoms( prev_rsd.get_adjacent_heavy_atoms( connect_atom ) );
141 Size const n_bonded_heavy_atoms( bonded_heavy_atoms.size() );
142 Size const n_ring_atoms( ring_atoms.size() );
143 for (
uint i( 1 ); i <= n_bonded_heavy_atoms; ++i ) {
144 for (
uint j( 1 ); j <= n_ring_atoms; ++ j ) {
145 if ( ring_atoms[ j ] == bonded_heavy_atoms[ i ] ) {
151 if ( position != 0 ) {
159 if ( position % 2 == 0 ) {
166 if ( position % 2 == 0 ) {
192 using namespace numeric;
194 using namespace chemical::rings;
195 using namespace chemical::carbohydrates;
196 using namespace pose::carbohydrates;
197 using namespace scoring::carbohydrates;
199 if (
TR.Debug.visible() ) {
200 TR.Debug <<
"Evaluating torsion: " << torsion_id << endl;
209 if ( ! torsion_id.
valid() ) {
210 if (
TR.Debug.visible() ) {
211 TR.Debug <<
"Torsion not valid: " << torsion_id << endl;
223 if ( torsion_id.
type() ==
BB ) {
225 next_rsd = torsion_id.
rsd() + 1;
230 TR.Error <<
"Torsion " << torsion_id <<
" cannot be a phi torsion!" << endl;
237 if (
TR.Debug.visible() ) {
238 TR.Debug <<
"Phi: " << phi << endl;
240 if ( info->is_L_sugar() ) {
246 if ( info->is_alpha_sugar() ) {
248 }
else if ( info->is_beta_sugar() ) {
251 if ( info->is_L_sugar() ) {
266 if ( ! info->is_pyranose() ) {
272 if ( torsion_id.
type() ==
BB ) {
275 }
else if ( torsion_id.
type() ==
CHI ) {
279 TR.Error <<
"Torsion " << torsion_id <<
" cannot be a psi torsion!" << endl;
287 Angle psi( nonnegative_principal_angle_degrees( pose.
torsion( torsion_id ) ) );
288 if (
TR.Debug.visible() ) {
289 TR.Debug <<
"Psi: " << psi << endl;
291 if ( info->is_L_sugar() ) {
297 utility::vector1< core::uint >
const ring_atoms( rsd.
type().
ring_atoms( 1 ) );
302 if ( torsion_id.
torsion() % 2 == 0 ) {
309 if ( torsion_id.
torsion() % 2 == 0 ) {
318 if ( info->is_L_sugar() ) {
This object defines a ScoreFunction, it contains methods for calculating the various scoring componen...
virtual EnergyMethodOP clone() const
virtual core::Real eval_residue_dof_derivative(conformation::Residue const &rsd, ResSingleMinimizationData const &min_data, id::DOF_ID const &dof_id, id::TorsionID const &torsion_id, pose::Pose const &pose, ScoreFunction const &sf, EnergyMap const &weights) const
Evaluate the DoF derivative for a particular residue.
A molecular system including residues, kinematics, and energies.
Declarations and simple accessor/mutator definitions for CarbohydrateInfo.
Enumerator definition for LinkageType.
std::vector< std::vector< double > > score
bool valid() const
Is this id valid?
Real evaluate_derivative(LinkageType type, Angle x) const
core::uint find_seqpos_of_saccharides_parent_residue(conformation::Residue const &residue)
Use a saccharide residue's connections to find the residue from which it follows or branches...
bool is_glycosidic_phi_torsion(Pose const &pose, id::TorsionID const &torsion_id)
Is this is the phi torsion angle of a glycosidic linkage?
utility::pointer::shared_ptr< EnergyMethod > EnergyMethodOP
SugarBackboneEnergy()
Default constructor.
Utility function declarations for carbohydrate-containing poses.
static THREAD_LOCAL basic::Tracer TR("core.scoring.CartesianBondedEnergy")
Real phi(Size const seqpos) const
Returns the phi torsion angle of residue
utility::vector1< ScoreType > ScoreTypes
Torsion identifier class.
virtual ScoreTypes score_types_for_method() const
Return the set of ScoreTypes for which this EnergyMethod is responsible.
utility::pointer::shared_ptr< CarbohydrateInfo const > CarbohydrateInfoCOP
uint torsion() const
Return the torsion number of the given type within the residue OR the rigid-body identifier for a JUM...
Method declarations for SugarBackboneEnergyCreator.
Real psi(Size const seqpos) const
Returns the psi torsion angle of residue Note: assumes the residue is an amino acid or monos...
static THREAD_LOCAL basic::Tracer TR("core.scoring.methods.carbohydrates.SugarBackboneEnergy")
Method declarations for CHIEnergyFunction.
Kinematics DOF identifier class.
virtual void residue_energy(conformation::Residue const &rsd, pose::Pose const &pose, EnergyMap &emap) const
Evaluate the one-body carbohydrate backbone energies for a particular residue, in the context of the ...
EnergyMethodCreator allowing the ScoringManager to create a SugarBackboneEnergy method class...
Method declarations and simple accessor definitions for the Residue class.
bool is_glycosidic_psi_torsion(Pose const &pose, id::TorsionID const &torsion_id)
Is this is the psi torsion angle of a glycosidic linkage?
Method definitions for SugarBackboneEnergy and SugarBackboneEnergyCreator.
AxEqDesignation is_atom_axial_or_equatorial_to_ring(Coords const &query_atom, Coords const &attachment_atom, utility::vector1< Coords > const &ring_atoms)
Are the query atom coordinates axial or equatorial to the given ring or neither?
TorsionType type() const
Return the type (BB, CHI,NU, BRANCH, JUMP) of this torsion.
utility::pointer::shared_ptr< EnergyMethodCreator > EnergyMethodCreatorOP
Scoring manager class header.
Vector of scores declaration.
A vector for storing energy data, initially all values are 0.
Residue const & residue(Size const seqpos) const
Returns the Residue at position (read access) Note: this method will trigger a refold if eit...
AtomIndices const & ring_atoms(uint const ring_num) const
Return list of indices of the atoms within this residue's nth cycle, not counting virtual atoms...
Real torsion(TorsionID const &id) const
Returns the Conformation torsion angle identified by
virtual EnergyMethodOP create_energy_method(EnergyMethodOptions const &) const
Return an up-casted owning pointer (EnergyMethodOP) to the energy method.
Size rsd() const
For this TorsionID, return the Residue number within the complex OR the Jump number for the Pose...
scoring::carbohydrates::CHIEnergyFunction const & E_