15 #include <utility/vector1.hh>
25 #include <basic/database/open.hh>
28 #include <numeric/conversions.hh>
29 #include <numeric/constants.hh>
36 using namespace core::pose;
37 using namespace core::scoring::rna;
43 RNA_IdealCoord::RNA_IdealCoord():
44 path_( basic::database::full_name(
"chemical/rna/ideal_geometry/") )
53 using namespace core::id;
54 Size res_index = torsion_id.
rsd();
55 if ( res_index < 1 || res_index > pose.
total_residue() )
return false;
65 pdb_file_list.push_back(
path_ +
"/A_n_std.pdb" );
66 pdb_file_list.push_back(
path_ +
"/A_s_std.pdb" );
67 pdb_file_list.push_back(
path_ +
"/G_n_std.pdb" );
68 pdb_file_list.push_back(
path_ +
"/G_s_std.pdb" );
69 pdb_file_list.push_back(
path_ +
"/C_n_std.pdb" );
70 pdb_file_list.push_back(
path_ +
"/C_s_std.pdb" );
71 pdb_file_list.push_back(
path_ +
"/U_n_std.pdb" );
72 pdb_file_list.push_back(
path_ +
"/U_s_std.pdb" );
77 for (
Size i = 1; i <= pdb_file_list.size(); ++i) {
86 using namespace core::id;
87 using namespace core::chemical;
88 using namespace core::conformation;
91 if ( !res.is_RNA() )
return;
95 if ( res.aa() ==
na_rad ) {
97 }
else if ( res.aa() ==
na_rgu ) {
99 }
else if ( res.aa() ==
na_rcy ) {
101 }
else if ( res.aa() ==
na_ura ) {
104 if (! is_north) ++res_class;
109 if (keep_backbone_torsion) {
119 for (
Size i = 1; i <= saved_torsion_id.size(); ++i) {
122 saved_torsions.push_back( pose.
torsion( saved_torsion_id[i] ) );
124 saved_torsions.push_back( -9999 );
130 std::map <Size, Size> res_map;
131 res_map.insert( std::pair <Size, Size> (seqpos, 2) );
136 if (keep_backbone_torsion) {
137 for (
Size i = 1; i <= saved_torsion_id.size(); ++i) {
138 if (saved_torsions[i] > -1000) {
139 pose.
set_torsion( saved_torsion_id[i], saved_torsions[i] );
149 utility_exit_with_message(
"RNA_IdealCoord::apply--pose.total_resdiue() != pucker_conformations.size() !!!!");
152 switch ( pucker_conformations[i] ) {
156 apply(pose, i,
true, keep_backbone_torsion);
159 apply(pose, i,
false, keep_backbone_torsion);
162 utility_exit_with_message(
"RNA_IdealCoord::apply--Invalid value for pucker_conformations!!!!");