| 1 | /* src/rotamer-tables.cc |
| 2 | * |
| 3 | * Copyright 2008 The University of Oxford |
| 4 | * Author: Paul Emsley |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or (at |
| 9 | * your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 19 | * 02110-1301, USA |
| 20 | */ |
| 21 | |
| 22 | #include <fstream> |
| 23 | #include <stdexcept> |
| 24 | #include <string.h> |
| 25 | |
| 26 | #include "ccp4mg-utils/mgtree.h"cxx . . $ `<file>/ccp4mg-utils/mgtree.h`/ |
| 27 | |
| 28 | #include "primitive-chi-angles.hh"cxx . . $ `<file>/ligand/primitive-chi-angles.hh`/ |
| 29 | #include "rotamer.hh"cxx . . $ `<file>/ligand/rotamer.hh`/ |
| 30 | |
| 31 | #include "utils/coot-utils.hh"cxx . . $ `<file>/utils/coot-utils.hh`/ |
| 32 | |
| 33 | #include "utils/logging.hh"cxx . . $ `<file>/utils/logging.hh`/ |
| 34 | extern loggingcxx . . $ logging# loggercxx . . $ logger.; |
| 35 | |
| 36 | cootcxx . . $ coot/::a_rotamer_tablecxx . . $ coot/a_rotamer_table#::a_rotamer_tablecxx . . $ coot/a_rotamer_table#a_rotamer_table(c3ca1c130ce09c52).(const stdcxx . . $ std/::stringcxx . . $ std/string# &residue_name_in, |
| 37 | const stdcxx . . $ std/::stringcxx . . $ std/string# &file_name) { |
| 38 | |
| 39 | residue_namecxx . . $ coot/a_rotamer_table#residue_name. =cxx . . $ std/__cxx11/basic_string#`operator=`(c0b47be1fddc0e75). residue_name_in; |
| 40 | // std::cout << "DEBUG:: reading file for " << residue_name << "\n"; |
| 41 | n_chiscxx . . $ coot/a_rotamer_table#n_chis. = -1; // unset |
| 42 | if (residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "SER" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "VAL" || |
| 43 | residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "THR" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "CYS" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "PRO") { |
| 44 | fill_chi_1cxx . . $ coot/a_rotamer_table#fill_chi_1(9c546c94e5fcce4e).(file_name); |
| 45 | n_chiscxx . . $ coot/a_rotamer_table#n_chis. = 1; |
| 46 | } |
| 47 | if (residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ASN" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ASP" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "PHE" || |
| 48 | residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "TYR" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "TRP" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "HIS" || |
| 49 | residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ILE" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "LEU") { |
| 50 | fill_chi_1_2cxx . . $ coot/a_rotamer_table#fill_chi_1_2(9c546c94e5fcce4e).(file_name); |
| 51 | n_chiscxx . . $ coot/a_rotamer_table#n_chis. = 2; |
| 52 | } |
| 53 | if (residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "MET" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "MSE" || |
| 54 | residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLU" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLN") { |
| 55 | fill_chi_1_2_3cxx . . $ coot/a_rotamer_table#fill_chi_1_2_3(9c546c94e5fcce4e).(file_name); |
| 56 | n_chiscxx . . $ coot/a_rotamer_table#n_chis. = 3; |
| 57 | } |
| 58 | if (residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "LYS" || residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ARG") { |
| 59 | fill_chi_1_2_3_4cxx . . $ coot/a_rotamer_table#fill_chi_1_2_3_4(9c546c94e5fcce4e).(file_name); |
| 60 | n_chiscxx . . $ coot/a_rotamer_table#n_chis. = 4; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // Throw a runtime_error on failure to read file. |
| 65 | void |
| 66 | cootcxx . . $ coot/::a_rotamer_tablecxx . . $ coot/a_rotamer_table#::fill_chi_1cxx . . $ coot/a_rotamer_table#fill_chi_1(9c546c94e5fcce4e).(const stdcxx . . $ std/::stringcxx . . $ std/string#& file_name) { |
| 67 | |
| 68 | stdcxx . . $ std/::ifstreamcxx . . $ std/ifstream# fcxx . . $ std/basic_ifstream#basic_ifstream(b8cd37071ce335df).(file_name.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 69 | char chars[1024]; |
| 70 | |
| 71 | bool in_table = 0; |
| 72 | float chi; |
| 73 | float prob; |
| 74 | float very_small = 0.000001; |
| 75 | // pr_chi_1 = std::vector<float> (360, very_small); |
| 76 | int chi_count = 0; |
| 77 | long int n_x1_obj_count = -1; |
| 78 | if (!cxx . . $ std/basic_ios#`operator!`(50ce9a9e25b4a850).f) { |
| 79 | stdcxx . . $ std/::stringcxx . . $ std/string# mess = "Failed to open " +cxx . . $ std/operator+(42c652dfebe55ad7). file_name; |
| 80 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(mess); |
| 81 | } else { |
| 82 | while (!f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).()) { |
| 83 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 84 | if (! (f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).())) { |
| 85 | // std::cout << chars << std::endl; |
| 86 | if (in_table) { |
| 87 | chi = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 88 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 89 | prob = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 90 | int chi_val = lrint(chi-0.4); |
| 91 | pr_chi_1cxx . . $ coot/a_rotamer_table#pr_chi_1.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val] = prob; |
| 92 | // std::cout << ":" << chars << ": |" << chi << "| (" << chi_val << ") " |
| 93 | // << float(chi_val + 0.5) << " " << pr_chi_1[chi_val] |
| 94 | // << std::endl; |
| 95 | } |
| 96 | if (! in_table) { |
| 97 | // mark the start of the table |
| 98 | if (!strncmp("line.)", chars, 6)) { |
| 99 | // std::cout << "DEBUG:: Table starts now..." << std::endl; |
| 100 | in_table = 1; |
| 101 | } |
| 102 | // Let's get the block size of the sampling. This |
| 103 | // gives us the vector index to chi conversion. |
| 104 | if (n_x1_obj_count == 0) { |
| 105 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 106 | n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 107 | // std::cout << "DEBUG:: n_chi1_samples_per_360: " << n_chi1_samples_per_360 |
| 108 | // << std::endl; |
| 109 | n_x1_obj_count = -1; // done |
| 110 | pr_chi_1cxx . . $ coot/a_rotamer_table#pr_chi_1. =cxx . . $ std/vector#`operator=`(1104576815caab1a). stdcxx . . $ std/vector#vector(229e4d6bd205de31).::vectorcxx . . $ std/vector#<float> (n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360., very_small); |
| 111 | } |
| 112 | if (n_x1_obj_count) |
| 113 | n_x1_obj_count--; |
| 114 | if (!strncmp("x1:", chars, 3)) { |
| 115 | n_x1_obj_count = 2; |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | void |
| 124 | cootcxx . . $ coot/::a_rotamer_tablecxx . . $ coot/a_rotamer_table#::fill_chi_1_2cxx . . $ coot/a_rotamer_table#fill_chi_1_2(9c546c94e5fcce4e).(const stdcxx . . $ std/::stringcxx . . $ std/string#& file_name) { |
| 125 | |
| 126 | stdcxx . . $ std/::ifstreamcxx . . $ std/ifstream# fcxx . . $ std/basic_ifstream#basic_ifstream(b8cd37071ce335df).(file_name.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 127 | char chars[1024]; |
| 128 | |
| 129 | bool in_table = 0; |
| 130 | float chi_1; |
| 131 | float chi_2; |
| 132 | float prob; |
| 133 | float very_small = 0.000001; |
| 134 | int chi_count = 0; |
| 135 | long int n_x1_obj_count = -1; |
| 136 | long int n_x2_obj_count = -1; |
| 137 | long int n_x3_obj_count = -1; |
| 138 | long int n_x4_obj_count = -1; |
| 139 | int samples_scale = 1; |
| 140 | if (!cxx . . $ std/basic_ios#`operator!`(50ce9a9e25b4a850).f) { |
| 141 | stdcxx . . $ std/::stringcxx . . $ std/string# mess = "Failed to open " +cxx . . $ std/operator+(42c652dfebe55ad7). file_name; |
| 142 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(mess); |
| 143 | } else { |
| 144 | while (!f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).()) { |
| 145 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 146 | if (! (f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).())) { |
| 147 | // std::cout << chars << std::endl; |
| 148 | if (in_table) { |
| 149 | chi_1 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 150 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 151 | chi_2 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 152 | if (chi_1 < 0.0) chi_1 += 360.0; |
| 153 | if (chi_2 < 0.0) chi_2 += 360.0; |
| 154 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 155 | prob = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 156 | int chi_val_1 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_1, n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360.); |
| 157 | int chi_val_2 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_2, n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360.); |
| 158 | // std::cout << " wrapped chis " << chi_1 << " " << chi_2 << std::endl; |
| 159 | // std::cout << " n_chi1 n_chi2 samples_per_360 " << n_chi1_samples_per_360 << " " |
| 160 | // << n_chi2_samples_per_360 << std::endl; |
| 161 | // std::cout << " chi_val_1 and _2: " << chi_val_1 << " " << chi_val_2 << std::endl; |
| 162 | // std::cout << " setting bin " << chi_val_1 << " (of " |
| 163 | // << pr_chi_1_2[chi_val_1].size() << ") " |
| 164 | // << chi_val_2 << " (of " << pr_chi_1_2[chi_val_1].size() |
| 165 | // << ") to " << prob << std::endl; |
| 166 | pr_chi_1_2cxx . . $ coot/a_rotamer_table#pr_chi_1_2.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_1][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_2] = prob; |
| 167 | // std::cout << ":" << chars << ": |" << "| (" |
| 168 | // << chi_val_1 << ") " << float(chi_val_1 + 0.5) << " " |
| 169 | // << chi_val_2 << ") " << float(chi_val_2 + 0.5) << " " |
| 170 | // << pr_chi_1_2[chi_val_1][chi_val_2] |
| 171 | // << std::endl; |
| 172 | } |
| 173 | if (! in_table) { |
| 174 | // mark the start of the table |
| 175 | if (!strncmp("line.)", chars, 6)) { |
| 176 | // std::cout << "Table starts now..." << std::endl; |
| 177 | in_table = 1; |
| 178 | } |
| 179 | // Let's get the block size of the sampling. This |
| 180 | // gives us the vector index to chi conversion. |
| 181 | if (n_x1_obj_count == 0) { |
| 182 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 183 | n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 184 | // std::cout << "n_chi1_samples_per_360: " << n_chi1_samples_per_360 |
| 185 | // << std::endl; |
| 186 | n_x1_obj_count = -1; // done |
| 187 | } |
| 188 | if (n_x2_obj_count == 1) { |
| 189 | stdcxx . . $ std/::stringcxx . . $ std/string# max_degrees_strcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 190 | if (max_degrees_str ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "180.0") { |
| 191 | samples_scale = 2; |
| 192 | } |
| 193 | } |
| 194 | if (n_x2_obj_count == 0) { |
| 195 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 196 | n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()) * samples_scale; |
| 197 | // std::cout << "n_chi2_samples_per_360: " << n_chi2_samples_per_360 |
| 198 | // << std::endl; |
| 199 | n_x2_obj_count = -1; // done |
| 200 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> pr_chi_1cxx . . $ std/vector#vector(229e4d6bd205de31). (n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360., very_small); |
| 201 | pr_chi_1_2cxx . . $ coot/a_rotamer_table#pr_chi_1_2. =cxx . . $ std/vector#`operator=`(1104576815caab1a). stdcxx . . $ std/vector#vector(229e4d6bd205de31).::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> > (n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360., pr_chi_1); |
| 202 | } |
| 203 | if (n_x1_obj_count) |
| 204 | n_x1_obj_count--; |
| 205 | if (n_x2_obj_count) |
| 206 | n_x2_obj_count--; |
| 207 | if (!strncmp("x1:", chars, 3)) { |
| 208 | n_x1_obj_count = 2; |
| 209 | } |
| 210 | if (!strncmp("x2:", chars, 3)) { |
| 211 | n_x2_obj_count = 2; |
| 212 | } |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | void |
| 220 | cootcxx . . $ coot/::a_rotamer_tablecxx . . $ coot/a_rotamer_table#::fill_chi_1_2_3cxx . . $ coot/a_rotamer_table#fill_chi_1_2_3(9c546c94e5fcce4e).(const stdcxx . . $ std/::stringcxx . . $ std/string#& file_name) { |
| 221 | |
| 222 | stdcxx . . $ std/::ifstreamcxx . . $ std/ifstream# fcxx . . $ std/basic_ifstream#basic_ifstream(b8cd37071ce335df).(file_name.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 223 | char chars[1024]; |
| 224 | |
| 225 | bool in_table = 0; |
| 226 | float chi_1; |
| 227 | float chi_2; |
| 228 | float chi_3; |
| 229 | float prob; |
| 230 | float very_small = 0.000001; |
| 231 | int chi_count = 0; |
| 232 | long int n_x1_obj_count = -1; |
| 233 | long int n_x2_obj_count = -1; |
| 234 | long int n_x3_obj_count = -1; |
| 235 | int samples_scale = 1; |
| 236 | if (!cxx . . $ std/basic_ios#`operator!`(50ce9a9e25b4a850).f) { |
| 237 | stdcxx . . $ std/::stringcxx . . $ std/string# mess = "Failed to open " +cxx . . $ std/operator+(42c652dfebe55ad7). file_name; |
| 238 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(mess); |
| 239 | } else { |
| 240 | while (!f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).()) { |
| 241 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 242 | if (! (f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).())) { |
| 243 | if (in_table) { |
| 244 | chi_1 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 245 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 246 | chi_2 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 247 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 248 | chi_3 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 249 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 250 | prob = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 251 | |
| 252 | int chi_val_1 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_1, n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360.); |
| 253 | int chi_val_2 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_2, n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360.); |
| 254 | int chi_val_3 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_3, n_chi3_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi3_samples_per_360.); |
| 255 | |
| 256 | // std::cout << " wrapped chis " << chi_1 << " " << chi_2 << std::endl; |
| 257 | // std::cout << " setting bin " << chi_val_1 << " (of " |
| 258 | // << pr_chi_1_2[chi_val_1].size() << ") " |
| 259 | // << chi_val_2 << " (of " << pr_chi_1_2[chi_val_1].size() |
| 260 | // << ") to " << prob << std::endl; |
| 261 | pr_chi_1_2_3cxx . . $ coot/a_rotamer_table#pr_chi_1_2_3.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_1][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_2][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_3] = prob; |
| 262 | // std::cout << ":" << chars << ": |" << "| (" |
| 263 | // << chi_val_1 << ") " << float(chi_val_1 + 0.5) << " " |
| 264 | // << chi_val_2 << ") " << float(chi_val_2 + 0.5) << " " |
| 265 | // << pr_chi_1_2[chi_val_1][chi_val_2] |
| 266 | // << std::endl; |
| 267 | } |
| 268 | if (! in_table) { |
| 269 | // mark the start of the table |
| 270 | if (!strncmp("line.)", chars, 6)) { |
| 271 | // std::cout << "DEBUG:: Table starts now..." << std::endl; |
| 272 | in_table = 1; |
| 273 | } |
| 274 | // Let's get the block size of the sampling. This |
| 275 | // gives us the vector index to chi conversion. |
| 276 | if (n_x1_obj_count == 0) { |
| 277 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 278 | n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 279 | // std::cout << "n_chi1_samples_per_360: " << n_chi1_samples_per_360 |
| 280 | // << std::endl; |
| 281 | n_x1_obj_count = -1; // done |
| 282 | } |
| 283 | if (n_x2_obj_count == 0) { |
| 284 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 285 | n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 286 | // std::cout << "n_chi2_samples_per_360: " << n_chi2_samples_per_360 |
| 287 | // << std::endl; |
| 288 | n_x2_obj_count = -1; // done |
| 289 | } |
| 290 | if (n_x3_obj_count == 1) { |
| 291 | stdcxx . . $ std/::stringcxx . . $ std/string# max_degrees_strcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 292 | if (max_degrees_str ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "180.0") { |
| 293 | samples_scale = 2; |
| 294 | } |
| 295 | } |
| 296 | if (n_x3_obj_count == 0) { |
| 297 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 298 | n_chi3_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi3_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()) * samples_scale; |
| 299 | // std::cout << "n_chi3_samples_per_360: " << n_chi3_samples_per_360 |
| 300 | // << std::endl; |
| 301 | n_x3_obj_count = -1; // done |
| 302 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> pr_chi_1cxx . . $ std/vector#vector(229e4d6bd205de31). (n_chi3_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi3_samples_per_360., very_small); |
| 303 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> > pr_chi_1_2cxx . . $ std/vector#vector(229e4d6bd205de31).(n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360., pr_chi_1); |
| 304 | pr_chi_1_2_3cxx . . $ coot/a_rotamer_table#pr_chi_1_2_3. =cxx . . $ std/vector#`operator=`(1104576815caab1a). stdcxx . . $ std/vector#vector(229e4d6bd205de31).::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> > > (n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360., pr_chi_1_2); |
| 305 | } |
| 306 | if (n_x1_obj_count) |
| 307 | n_x1_obj_count--; |
| 308 | if (n_x2_obj_count) |
| 309 | n_x2_obj_count--; |
| 310 | if (n_x3_obj_count) |
| 311 | n_x3_obj_count--; |
| 312 | if (!strncmp("x1:", chars, 3)) { |
| 313 | n_x1_obj_count = 2; |
| 314 | } |
| 315 | if (!strncmp("x2:", chars, 3)) { |
| 316 | n_x2_obj_count = 2; |
| 317 | } |
| 318 | if (!strncmp("x3:", chars, 3)) { |
| 319 | n_x3_obj_count = 2; |
| 320 | } |
| 321 | } |
| 322 | } |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | void |
| 328 | cootcxx . . $ coot/::a_rotamer_tablecxx . . $ coot/a_rotamer_table#::fill_chi_1_2_3_4cxx . . $ coot/a_rotamer_table#fill_chi_1_2_3_4(9c546c94e5fcce4e).(const stdcxx . . $ std/::stringcxx . . $ std/string#& file_name) { |
| 329 | |
| 330 | stdcxx . . $ std/::ifstreamcxx . . $ std/ifstream# fcxx . . $ std/basic_ifstream#basic_ifstream(b8cd37071ce335df).(file_name.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 331 | char chars[1024]; |
| 332 | |
| 333 | bool in_table = 0; |
| 334 | float chi_1; |
| 335 | float chi_2; |
| 336 | float chi_3; |
| 337 | float chi_4; |
| 338 | float prob; |
| 339 | float very_small = 0.000001; |
| 340 | int chi_count = 0; |
| 341 | long int n_x1_obj_count = -1; |
| 342 | long int n_x2_obj_count = -1; |
| 343 | long int n_x3_obj_count = -1; |
| 344 | long int n_x4_obj_count = -1; |
| 345 | if (!cxx . . $ std/basic_ios#`operator!`(50ce9a9e25b4a850).f) { |
| 346 | stdcxx . . $ std/::stringcxx . . $ std/string# mess = "Failed to open " +cxx . . $ std/operator+(42c652dfebe55ad7). file_name; |
| 347 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(mess); |
| 348 | } else { |
| 349 | while (!f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).()) { |
| 350 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 351 | if (! (f.eofcxx . . $ std/basic_ios#eof(50ce9a9e25b4a850).())) { |
| 352 | // std::cout << chars << std::endl; |
| 353 | if (in_table) { |
| 354 | chi_1 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 355 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 356 | chi_2 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 357 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 358 | chi_3 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 359 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 360 | chi_4 = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 361 | f >>cxx . . $ std/`operator>>`(ce9f2015b95b5d5c). chars; |
| 362 | prob = atofcxx . . $ atof(9b0361fcbc284e4f).(chars); |
| 363 | |
| 364 | int chi_val_1 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_1, n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360.); |
| 365 | int chi_val_2 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_2, n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360.); |
| 366 | int chi_val_3 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_3, n_chi3_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi3_samples_per_360.); |
| 367 | int chi_val_4 = chi_angle_to_bincxx . . $ coot/a_rotamer_table#chi_angle_to_bin(5d2f6a4a6d281c75).(chi_4, n_chi4_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi4_samples_per_360.); |
| 368 | pr_chi_1_2_3_4cxx . . $ coot/a_rotamer_table#pr_chi_1_2_3_4.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_1][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_2][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_3][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).chi_val_4] = prob; |
| 369 | |
| 370 | } |
| 371 | if (! in_table) { |
| 372 | // mark the start of the table |
| 373 | if (!strncmp("line.)", chars, 6)) { |
| 374 | // std::cout << "DEBUG:: Table starts now..." << std::endl; |
| 375 | in_table = 1; |
| 376 | } |
| 377 | // Let's get the block size of the sampling. This |
| 378 | // gives us the vector index to chi conversion. |
| 379 | if (n_x1_obj_count == 0) { |
| 380 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 381 | n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 382 | // std::cout << "n_chi1_samples_per_360: " << n_chi1_samples_per_360 |
| 383 | // << std::endl; |
| 384 | n_x1_obj_count = -1; // done |
| 385 | } |
| 386 | if (n_x2_obj_count == 0) { |
| 387 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 388 | n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 389 | // std::cout << "n_chi2_samples_per_360: " << n_chi2_samples_per_360 |
| 390 | // << std::endl; |
| 391 | n_x2_obj_count = -1; // done |
| 392 | } |
| 393 | if (n_x3_obj_count == 0) { |
| 394 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 395 | n_chi3_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi3_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 396 | // std::cout << "n_chi3_samples_per_360: " << n_chi3_samples_per_360 |
| 397 | // << std::endl; |
| 398 | n_x3_obj_count = -1; // done |
| 399 | } |
| 400 | if (n_x4_obj_count == 0) { |
| 401 | stdcxx . . $ std/::stringcxx . . $ std/string# lcxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).(chars); |
| 402 | n_chi4_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi4_samples_per_360. = atoicxx . . $ atoi(f5ecf3191ed0cd93).(l.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).()); |
| 403 | // std::cout << "n_chi4_samples_per_360: " << n_chi4_samples_per_360 |
| 404 | // << std::endl; |
| 405 | n_x4_obj_count = -1; // done |
| 406 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> pr_chi_1cxx . . $ std/vector#vector(229e4d6bd205de31). (n_chi4_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi4_samples_per_360., very_small); |
| 407 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> > pr_chi_1_2cxx . . $ std/vector#vector(229e4d6bd205de31).(n_chi3_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi3_samples_per_360., pr_chi_1); |
| 408 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> > > pr_chi_1_2_3cxx . . $ std/vector#vector(229e4d6bd205de31).(n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360., pr_chi_1_2); |
| 409 | |
| 410 | pr_chi_1_2_3_4cxx . . $ coot/a_rotamer_table#pr_chi_1_2_3_4. =cxx . . $ std/vector#`operator=`(1104576815caab1a). stdcxx . . $ std/vector#vector(229e4d6bd205de31).::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::vectorcxx . . $ std/vector#<float> > > > (n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360., pr_chi_1_2_3); |
| 411 | |
| 412 | } |
| 413 | if (n_x1_obj_count) |
| 414 | n_x1_obj_count--; |
| 415 | if (n_x2_obj_count) |
| 416 | n_x2_obj_count--; |
| 417 | if (n_x3_obj_count) |
| 418 | n_x3_obj_count--; |
| 419 | if (n_x4_obj_count) |
| 420 | n_x4_obj_count--; |
| 421 | if (!strncmp("x1:", chars, 3)) { |
| 422 | n_x1_obj_count = 2; |
| 423 | } |
| 424 | if (!strncmp("x2:", chars, 3)) { |
| 425 | n_x2_obj_count = 2; |
| 426 | } |
| 427 | if (!strncmp("x3:", chars, 3)) { |
| 428 | n_x3_obj_count = 2; |
| 429 | } |
| 430 | if (!strncmp("x4:", chars, 3)) { |
| 431 | n_x4_obj_count = 2; |
| 432 | } |
| 433 | } |
| 434 | } |
| 435 | } |
| 436 | } |
| 437 | } |
| 438 | |
| 439 | // ignore_lys_and_arg_flag is a default arg (false, don't ignore) |
| 440 | void |
| 441 | cootcxx . . $ coot/::rotamer_probability_tablescxx . . $ coot/rotamer_probability_tables#::fill_tablescxx . . $ coot/rotamer_probability_tables#fill_tables(a3b17e0268c60856).(const stdcxx . . $ std/::stringcxx . . $ std/string# &dir, bool ignore_lys_and_arg_flag) { |
| 442 | |
| 443 | // 20250802-PE the logic at the end of this function means that when this function is executed |
| 444 | // a secondd time, either is_well_formatted_ is true or tried_and_failed_ is true. |
| 445 | // Which means that this function can only the usefully run once. |
| 446 | // That will need to obe reviewed when late-loading the LYS and ARG tables in Moorhen. |
| 447 | |
| 448 | if (is_well_formatted_cxx . . $ coot/rotamer_probability_tables#is_well_formatted_.) |
| 449 | return; // filled already. |
| 450 | if (tried_and_failed_cxx . . $ coot/rotamer_probability_tables#tried_and_failed_.) |
| 451 | return; // tried before and failed. |
| 452 | |
| 453 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> > rescxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 454 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("SER", "rota500-ser.data")); |
| 455 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("VAL", "rota500-val.data")); |
| 456 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("THR", "rota500-thr.data")); |
| 457 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("CYS", "rota500-cys.data")); |
| 458 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("PRO", "rota500-pro.data")); |
| 459 | |
| 460 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("ASN", "rota500-asn.data")); |
| 461 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("ASP", "rota500-asp.data")); |
| 462 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("PHE", "rota500-phetyr.data")); |
| 463 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("TYR", "rota500-phetyr.data")); |
| 464 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("TRP", "rota500-trp.data")); |
| 465 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("HIS", "rota500-his.data")); |
| 466 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("ILE", "rota500-ile.data")); |
| 467 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("LEU", "rota500-leu.data")); |
| 468 | |
| 469 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("MET", "rota500-met.data")); |
| 470 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("MSE", "rota500-met.data")); |
| 471 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("GLU", "rota500-glu.data")); |
| 472 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("GLN", "rota500-gln.data")); |
| 473 | |
| 474 | if (! ignore_lys_and_arg_flag) { |
| 475 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("ARG", "rota500-arg.data")); |
| 476 | res.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::stringcxx . . $ std/string#> ("LYS", "rota500-lys.data")); |
| 477 | } |
| 478 | |
| 479 | // xxx/share/coot/rama-data |
| 480 | stdcxx . . $ std/::stringcxx . . $ std/string# file_name_stub = dircxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).; |
| 481 | bool bad_read = false; |
| 482 | |
| 483 | // std::cout << "INFO:: Reading rotamer probability tables..."; |
| 484 | loggercxx . . $ logger..logcxx . . $ logging#log(aa04b0d416afa0e1).(log_tcxx . . $ log_t#::INFOcxx . . $ log_t#INFO., "Reading rotamer probability tables..."cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).); |
| 485 | stdcxx . . $ std/::coutcxx . . $ std/cout..flushcxx . . $ std/basic_ostream#flush(e66e05a7745427d2).(); |
| 486 | for (unsigned int i=0; i<res.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i++) { |
| 487 | stdcxx . . $ std/::stringcxx . . $ std/string# file_name = file_name_stub +cxx . . $ std/operator+(40fc1db9226233c6). "/" +cxx . . $ std/operator+(db5dc2ea912c6495). res[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i].secondcxx . . $ std/pair#second.; |
| 488 | try { |
| 489 | const stdcxx . . $ std/::stringcxx . . $ std/string# &res_name = res[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i].firstcxx . . $ std/pair#first.; |
| 490 | cootcxx . . $ coot/::a_rotamer_tablecxx . . $ coot/a_rotamer_table# t = cootcxx . . $ coot/a_rotamer_table#a_rotamer_table(c3ca1c130ce09c52).::a_rotamer_tablecxx . . $ coot/a_rotamer_table#(res_name, file_name); |
| 491 | bool already_exists = false; |
| 492 | |
| 493 | for (const auto &t : tablescxx . . $ coot/rotamer_probability_tables#tables.) { |
| 494 | if (t.residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(5ea818b58063a774). res_name) { |
| 495 | already_exists = true; |
| 496 | break; |
| 497 | } |
| 498 | } |
| 499 | if (already_exists) { |
| 500 | // skip the new read |
| 501 | } else { |
| 502 | tablescxx . . $ coot/rotamer_probability_tables#tables..push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(t); |
| 503 | } |
| 504 | } |
| 505 | catch (const stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error# &mess) { |
| 506 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Failed to read rotamer probability table for " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). res[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i].firstcxx . . $ std/pair#first. |
| 507 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "\n" <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). mess.whatcxx . . $ std/runtime_error#what(ba32b354807b2b81).() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 508 | bad_read = 1; |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | if (false) |
| 513 | if (bad_read == false) |
| 514 | bad_read = test_yourselfcxx . . $ coot/rotamer_probability_tables#test_yourself(c9857a73d68e59ba).(); |
| 515 | |
| 516 | if (bad_read == false) |
| 517 | is_well_formatted_cxx . . $ coot/rotamer_probability_tables#is_well_formatted_. = true; |
| 518 | else |
| 519 | tried_and_failed_cxx . . $ coot/rotamer_probability_tables#tried_and_failed_. = true; |
| 520 | } |
| 521 | |
| 522 | // can throw an exception |
| 523 | const cootcxx . . $ coot/::a_rotamer_tablecxx . . $ coot/a_rotamer_table# & |
| 524 | cootcxx . . $ coot/::rotamer_probability_tablescxx . . $ coot/rotamer_probability_tables#::operatorcxx . . $ coot/rotamer_probability_tables#`operator[]`(bdff157ecf17c50b).[](unsigned int idx) const { |
| 525 | |
| 526 | if (idx < tablescxx . . $ coot/rotamer_probability_tables#tables..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).()) { |
| 527 | return tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).idx]; |
| 528 | } else { |
| 529 | stdcxx . . $ std/::stringcxx . . $ std/string# scxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).("out-of-range rotamer (table)"); |
| 530 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(s); |
| 531 | } |
| 532 | } |
| 533 | |
| 534 | |
| 535 | // float, a state and a name: |
| 536 | cootcxx . . $ coot/::rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t# |
| 537 | cootcxx . . $ coot/::rotamer_probability_tablescxx . . $ coot/rotamer_probability_tables#::probability_this_rotamercxx . . $ coot/rotamer_probability_tables#probability_this_rotamer(e77f33c5b29a5cd1).(unsigned int i_table, |
| 538 | const stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> > &chi_angles) const { |
| 539 | |
| 540 | if (false) |
| 541 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "rotamer_probability_tables::probability_this_rotamer()" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 542 | |
| 543 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<int> bins = chi_angles_to_binscxx . . $ coot/rotamer_probability_tables#chi_angles_to_bins(eba394d0eb5dcb76).(i_table, chi_anglescxx . . $ std/vector#vector(a1201200cf0efa42).); |
| 544 | if (bins.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).() != chi_angles.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).()) { |
| 545 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#("ERROR:: bin size and chi_angles size do not match"); |
| 546 | } |
| 547 | unsigned int n = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).i_table].n_chiscxx . . $ coot/a_rotamer_table#n_chis.; |
| 548 | if (bins.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).() != n) { |
| 549 | stdcxx . . $ std/::stringcxx . . $ std/string# mess = "ERROR:: not enough chi angles found. bin.size() ("cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).; |
| 550 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). cootcxx . . $ coot/::utilcxx . . $ coot/util/::int_to_stringcxx . . $ coot/util/int_to_string(7eb93f795f0defb3).(bins.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).()); |
| 551 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). ") and n chis do not match "; |
| 552 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). " (should be "; |
| 553 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). cootcxx . . $ coot/::utilcxx . . $ coot/util/::int_to_stringcxx . . $ coot/util/int_to_string(7eb93f795f0defb3).(n); |
| 554 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). ") for "; |
| 555 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).i_table].residue_namecxx . . $ coot/a_rotamer_table#residue_name.; |
| 556 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(mess); |
| 557 | } |
| 558 | |
| 559 | if (false) { // debugging |
| 560 | if (n == 1) stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " bin: " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0] <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 561 | if (n == 2) stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "angles " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).0].secondcxx . . $ std/pair#second. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).1].secondcxx . . $ std/pair#second. |
| 562 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " bins: " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0] <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1] <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 563 | if (n == 3) stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "angles " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).0].secondcxx . . $ std/pair#second. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).1].secondcxx . . $ std/pair#second. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " |
| 564 | <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).2].secondcxx . . $ std/pair#second. |
| 565 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " bins: " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0] <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1] <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2] <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 566 | if (n == 4) stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "angles " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).0].secondcxx . . $ std/pair#second. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).1].secondcxx . . $ std/pair#second. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " |
| 567 | <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).2].secondcxx . . $ std/pair#second. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_angles[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).3].secondcxx . . $ std/pair#second. |
| 568 | <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " bins: " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0] <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1] <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2] <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).3] |
| 569 | <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 570 | } |
| 571 | |
| 572 | float pr = 0.0; |
| 573 | if (n == 1) pr = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).i_table].pr_chi_1cxx . . $ coot/a_rotamer_table#pr_chi_1.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0]]; |
| 574 | if (n == 2) pr = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).i_table].pr_chi_1_2cxx . . $ coot/a_rotamer_table#pr_chi_1_2.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0]][cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1]]; |
| 575 | if (n == 3) pr = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).i_table].pr_chi_1_2_3cxx . . $ coot/a_rotamer_table#pr_chi_1_2_3.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0]][cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1]][cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2]]; |
| 576 | if (n == 4) pr = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).i_table].pr_chi_1_2_3_4cxx . . $ coot/a_rotamer_table#pr_chi_1_2_3_4.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0]][cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1]][cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2]][cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).bins[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).3]]; |
| 577 | |
| 578 | // std::cout << "raw pr: " << pr << std::endl; |
| 579 | |
| 580 | if (n<1 || n>4) { |
| 581 | stdcxx . . $ std/::stringcxx . . $ std/string# mess = "ERROR: bad nbins chis " +cxx . . $ std/operator+(39ed2c165380f78e). cootcxx . . $ coot/::utilcxx . . $ coot/util/::int_to_stringcxx . . $ coot/util/int_to_string(7eb93f795f0defb3).(n); |
| 582 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). " for i_table "; |
| 583 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). cootcxx . . $ coot/::utilcxx . . $ coot/util/::int_to_stringcxx . . $ coot/util/int_to_string(7eb93f795f0defb3).(i_table); |
| 584 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(mess); |
| 585 | } |
| 586 | |
| 587 | return rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t#rotamer_probability_info_t(5d8cb6b018cb2cf1).(rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t#::OKcxx . . $ coot/rotamer_probability_info_t#OK., pr*100.0, tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).i_table].residue_namecxx . . $ coot/a_rotamer_table#residue_name.); |
| 588 | |
| 589 | } |
| 590 | |
| 591 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<cootcxx . . $ coot/::rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t#> |
| 592 | cootcxx . . $ coot/::rotamer_probability_tablescxx . . $ coot/rotamer_probability_tables#::probability_this_rotamercxx . . $ coot/rotamer_probability_tables#probability_this_rotamer(403818c69aafebd5).(mmdbcxx . . $ mmdb/::Residuecxx . . $ mmdb/Residue# *residue) const { |
| 593 | |
| 594 | if (false) { // debugging |
| 595 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "probability_this_rotamer(): getting probability_this_rotamer for " |
| 596 | <<cxx . . $ coot/`operator<<`(864abc555d23019c). cootcxx . . $ coot/::residue_spec_tcxx . . $ coot/residue_spec_t#(residue) <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). residue->GetResNamecxx . . $ mmdb/Residue#GetResName(41208ce6ca65dd58).() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 597 | } |
| 598 | |
| 599 | stdcxx . . $ std/::stringcxx . . $ std/string# resnamecxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d). (residue->GetResNamecxx . . $ mmdb/Residue#GetResName(41208ce6ca65dd58).()); |
| 600 | if (resname ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLY" || resname ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ALA") { |
| 601 | cootcxx . . $ coot/::rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t# prcxx . . $ coot/rotamer_probability_info_t#rotamer_probability_info_t(5d8cb6b018cb2cf1).(cootcxx . . $ coot/::rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t#::RESIDUE_IS_GLY_OR_ALAcxx . . $ coot/rotamer_probability_info_t#RESIDUE_IS_GLY_OR_ALA., |
| 602 | 1, resname); |
| 603 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<cootcxx . . $ coot/::rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t#> vcxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 604 | v.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(pr); |
| 605 | return vcxx . . $ std/vector#vector(6f559d22b039ccdb).; |
| 606 | } |
| 607 | |
| 608 | cootcxx . . $ coot/::primitive_chi_anglescxx . . $ coot/primitive_chi_angles# pchiscxx . . $ coot/primitive_chi_angles#primitive_chi_angles(199c331f07f0c901).(residue); |
| 609 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<cootcxx . . $ coot/::alt_confed_chi_anglescxx . . $ coot/alt_confed_chi_angles#> chis = pchis.get_chi_anglescxx . . $ coot/primitive_chi_angles#get_chi_angles(83f6a45ad1f82611).(); |
| 610 | |
| 611 | // Note that primitive_chi_angles has only 1 chi angle for PRO |
| 612 | // |
| 613 | // PRO only have one chi angle, (traditional/dunbrack |
| 614 | // says that it has 2. Molprobity probability tables say 1). |
| 615 | |
| 616 | int i_table = -1; |
| 617 | |
| 618 | if (false) { // debug |
| 619 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "probability_this_rotamer() tables.size() " <<cxx . . $ std/basic_ostream#`operator<<`(b09cd8ec4365c7ed). tablescxx . . $ coot/rotamer_probability_tables#tables..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 620 | for (unsigned int itab=0; itab<tablescxx . . $ coot/rotamer_probability_tables#tables..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); itab++) { |
| 621 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).itab].residue_namecxx . . $ coot/a_rotamer_table#residue_name. <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 622 | } |
| 623 | } |
| 624 | |
| 625 | for (unsigned int itab=0; itab<tablescxx . . $ coot/rotamer_probability_tables#tables..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); itab++) { |
| 626 | if (tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).itab].residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(5ea818b58063a774). resname) { |
| 627 | i_table = itab; |
| 628 | break; |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | if (i_table == -1) { |
| 633 | stdcxx . . $ std/::stringcxx . . $ std/string# mess = "Fail to find rotamer table for residue type " +cxx . . $ std/operator+(42c652dfebe55ad7). resname; |
| 634 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(mess); |
| 635 | } |
| 636 | |
| 637 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<cootcxx . . $ coot/::rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t#> vcxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 638 | for (unsigned int i_chi=0; i_chi<chis.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i_chi++) { |
| 639 | // std::cout << "DEBUG:: passing internal probability_this_rotamer chi_angles of size " |
| 640 | // << chis[i_chi].chi_angles.size() << std::endl; |
| 641 | cootcxx . . $ coot/::rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t# pr = probability_this_rotamercxx . . $ coot/rotamer_probability_tables#probability_this_rotamer(e77f33c5b29a5cd1).(i_table, chis[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i_chi].chi_anglescxx . . $ coot/alt_confed_chi_angles#chi_angles.); |
| 642 | v.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(pr); |
| 643 | } |
| 644 | return vcxx . . $ std/vector#vector(6f559d22b039ccdb).; |
| 645 | } |
| 646 | |
| 647 | // throw an exception on failure to get a bin for the residue_type. |
| 648 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<int> |
| 649 | cootcxx . . $ coot/::rotamer_probability_tablescxx . . $ coot/rotamer_probability_tables#::chi_angles_to_binscxx . . $ coot/rotamer_probability_tables#chi_angles_to_bins(eba394d0eb5dcb76).(unsigned int table_index, |
| 650 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> > chi_angles) const { |
| 651 | |
| 652 | // Note that for ASP, GLU, PHE and TYR we have a nomenclature |
| 653 | // issue. IUPAC rules say that chi2 (chi3 for GLU) should be -90<=chi2<=90. |
| 654 | // However the tables go from (basically) 0->180. |
| 655 | // |
| 656 | // So, where we have ASP, GLU, PHE or TYR and chi2 (chi3 for GLU) < |
| 657 | // 0, we should add 180 degrees to the value from the table. |
| 658 | // |
| 659 | float max_degrees = 360.0; |
| 660 | if (tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).table_index].residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ASP" || |
| 661 | tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).table_index].residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "TYR" || |
| 662 | tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).table_index].residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "PHE") { |
| 663 | if (chi_angles.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).() > 1) { |
| 664 | if (chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1].secondcxx . . $ std/pair#second. < 0.0) |
| 665 | chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1].secondcxx . . $ std/pair#second. += 180.0; |
| 666 | if (chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1].secondcxx . . $ std/pair#second. > 180.0) |
| 667 | chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1].secondcxx . . $ std/pair#second. -= 180.0; |
| 668 | } |
| 669 | } |
| 670 | if (tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).table_index].residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLU") { |
| 671 | if (chi_angles.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).() > 2) { |
| 672 | if (chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2].secondcxx . . $ std/pair#second. < 0.0) |
| 673 | chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2].secondcxx . . $ std/pair#second. += 180.0; |
| 674 | if (chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2].secondcxx . . $ std/pair#second. > 180.0) |
| 675 | chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2].secondcxx . . $ std/pair#second. -= 180.0; |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<int> rcxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 680 | for (unsigned int i=0; i<chi_angles.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i++) { |
| 681 | float chi = chi_angles[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i].secondcxx . . $ std/pair#second.; |
| 682 | if (chi < 0.0) |
| 683 | chi += 360.0; |
| 684 | int n_chi_samples = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).table_index].n_chi1_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi1_samples_per_360.; |
| 685 | if (i==1) n_chi_samples = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).table_index].n_chi2_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi2_samples_per_360.; |
| 686 | if (i==2) n_chi_samples = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).table_index].n_chi3_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi3_samples_per_360.; |
| 687 | if (i==3) n_chi_samples = tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(c8255e0fa326ac32).table_index].n_chi4_samples_per_360cxx . . $ coot/a_rotamer_table#n_chi4_samples_per_360.; |
| 688 | |
| 689 | float fbin = float (n_chi_samples) * chi/max_degrees; |
| 690 | if ((fbin >= float(n_chi_samples)) || (fbin < 0)) { |
| 691 | stdcxx . . $ std/::stringcxx . . $ std/string# mess = "ERROR:: Bin failure! fbin is "cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).; |
| 692 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). cootcxx . . $ coot/::utilcxx . . $ coot/util/::float_to_stringcxx . . $ coot/util/float_to_string(14a4da2464e078e0).(fbin); |
| 693 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). " for chi="; |
| 694 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). cootcxx . . $ coot/::utilcxx . . $ coot/util/::float_to_stringcxx . . $ coot/util/float_to_string(14a4da2464e078e0).(chi); |
| 695 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). " and n_chi_samples: "; |
| 696 | mess +=cxx . . $ std/__cxx11/basic_string#`operator+=`(c0b47be1fddc0e75). cootcxx . . $ coot/::utilcxx . . $ coot/util/::int_to_stringcxx . . $ coot/util/int_to_string(7eb93f795f0defb3).(n_chi_samples); |
| 697 | throw stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error#(mess); |
| 698 | } |
| 699 | int bin = lrintf(fbin-0.5); |
| 700 | r.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(bin); |
| 701 | } |
| 702 | return rcxx . . $ std/vector#vector(6f559d22b039ccdb).; |
| 703 | } |
| 704 | |
| 705 | |
| 706 | // Note: return 0 on 'OK' state |
| 707 | bool |
| 708 | cootcxx . . $ coot/::rotamer_probability_tablescxx . . $ coot/rotamer_probability_tables#::test_yourselfcxx . . $ coot/rotamer_probability_tables#test_yourself(c9857a73d68e59ba).() { |
| 709 | |
| 710 | |
| 711 | // Write only? :-) |
| 712 | |
| 713 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > > test_resultscxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 714 | |
| 715 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > resultscxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 716 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> > chi_localcxx . . $ std/vector#vector(49f6e7a06ebc5aa8).; |
| 717 | float very_small = 0.000001; |
| 718 | |
| 719 | // VAL |
| 720 | results.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 721 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 0.0)); |
| 722 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.00733626784)); |
| 723 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 724 | |
| 725 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 180.0)); |
| 726 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.572362)); |
| 727 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 728 | |
| 729 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 62.3)); |
| 730 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.12698412698412698)); |
| 731 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 732 | |
| 733 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 359.93)); |
| 734 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.0082699)); |
| 735 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 736 | |
| 737 | stdcxx . . $ std/::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > residuecxx . . $ std/pair#pair(62e1774a2dc03c82).("VAL", results); |
| 738 | test_results.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(residue); |
| 739 | |
| 740 | |
| 741 | // HIS |
| 742 | results.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 743 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 0.0)); |
| 744 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 180.0)); |
| 745 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, very_small)); |
| 746 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 747 | |
| 748 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 60.0)); |
| 749 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 82.0)); |
| 750 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.360434)); |
| 751 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 752 | |
| 753 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 60.0)); |
| 754 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 282.0)); |
| 755 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.565652)); |
| 756 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 757 | |
| 758 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 317.0)); |
| 759 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 282.0)); |
| 760 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.33)); |
| 761 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 762 | |
| 763 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 359.9)); |
| 764 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 359.9)); |
| 765 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, very_small)); |
| 766 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 767 | |
| 768 | residue =cxx . . $ std/pair#`operator=`(ab9ebd0b824095ec). stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > ("HIS", results); |
| 769 | test_results.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(residue); |
| 770 | |
| 771 | // ASN |
| 772 | results.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 773 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 0.0)); |
| 774 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 180.0)); |
| 775 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, very_small)); |
| 776 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 777 | |
| 778 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 60.0)); |
| 779 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 82.0)); |
| 780 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.117189)); |
| 781 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 782 | |
| 783 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 60.0)); |
| 784 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 282.0)); |
| 785 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.0826276)); |
| 786 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 787 | |
| 788 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 317.0)); |
| 789 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 282.0)); |
| 790 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.074387)); |
| 791 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 792 | |
| 793 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 359.9)); |
| 794 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 359.9)); |
| 795 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, very_small)); |
| 796 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 797 | |
| 798 | residue =cxx . . $ std/pair#`operator=`(ab9ebd0b824095ec). stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > ("ASN", results); |
| 799 | test_results.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(residue); |
| 800 | |
| 801 | // ASP |
| 802 | results.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 803 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 184.69)); // B 93 ASP rnase |
| 804 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 160.04)); |
| 805 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.5956072351)); |
| 806 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 807 | |
| 808 | residue =cxx . . $ std/pair#`operator=`(ab9ebd0b824095ec). stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > ("ASP", results); |
| 809 | test_results.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(residue); |
| 810 | |
| 811 | // TYR |
| 812 | results.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 813 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 0.0)); |
| 814 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 180.0)); |
| 815 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, very_small)); |
| 816 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 817 | |
| 818 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 60.1)); |
| 819 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 82.0)); |
| 820 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.413169)); |
| 821 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 822 | |
| 823 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 60.0)); |
| 824 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 282.0)); |
| 825 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.29954499)); |
| 826 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 827 | |
| 828 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 317.0)); |
| 829 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 282.0)); |
| 830 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.1205763397)); |
| 831 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 832 | |
| 833 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 359.9)); |
| 834 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 359.9)); |
| 835 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, very_small)); |
| 836 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 837 | |
| 838 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, -65.0)); |
| 839 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, -87.0)); |
| 840 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.964358)); |
| 841 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 842 | |
| 843 | residue =cxx . . $ std/pair#`operator=`(ab9ebd0b824095ec). stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > ("TYR", results); |
| 844 | test_results.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(residue); |
| 845 | |
| 846 | // GLN |
| 847 | results.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 848 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 4.0)); |
| 849 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 180.0)); |
| 850 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 4.0)); |
| 851 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.0054330457)); |
| 852 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 853 | |
| 854 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 359.99)); |
| 855 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 359.99)); |
| 856 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 183.00)); |
| 857 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 9.5877277085e-4)); |
| 858 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 859 | |
| 860 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 51.99)); |
| 861 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 170.99)); |
| 862 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 313.00)); |
| 863 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.2144455097)); |
| 864 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 865 | |
| 866 | residue =cxx . . $ std/pair#`operator=`(ab9ebd0b824095ec). stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > ("GLN", results); |
| 867 | test_results.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(residue); |
| 868 | |
| 869 | // GLU |
| 870 | results.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 871 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 348.0)); |
| 872 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 172.0)); |
| 873 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 3.90)); |
| 874 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.0043528064146)); |
| 875 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 876 | |
| 877 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 356.0)); |
| 878 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 300.0)); |
| 879 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 293.0)); |
| 880 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.00389461626)); |
| 881 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 882 | |
| 883 | residue =cxx . . $ std/pair#`operator=`(ab9ebd0b824095ec). stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > ("GLU", results); |
| 884 | test_results.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(residue); |
| 885 | |
| 886 | |
| 887 | // LYS |
| 888 | results.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 889 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 359.99)); |
| 890 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 359.99)); |
| 891 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 359.99)); |
| 892 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(4, 359.99)); |
| 893 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, very_small)); |
| 894 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 895 | |
| 896 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 351.0)); |
| 897 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 291.99)); |
| 898 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 203.99)); |
| 899 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(4, 299.99)); |
| 900 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 9.96512207274539E-4)); |
| 901 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 902 | |
| 903 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 35.99)); |
| 904 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 152.99)); |
| 905 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 63.99)); |
| 906 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(4, 173.99)); |
| 907 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.10313901)); |
| 908 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 909 | |
| 910 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(1, 43.99)); |
| 911 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(2, 163.99)); |
| 912 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(3, 173.99)); |
| 913 | chi_local.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<int,float>(4, 168.99)); |
| 914 | results.push_backcxx . . $ std/vector#push_back(fe7a8a4d1eddb70).(stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float>(chi_local, 0.3266068759342)); |
| 915 | chi_local.clearcxx . . $ std/vector#clear(ced63f7c635d850d).(); |
| 916 | |
| 917 | residue =cxx . . $ std/pair#`operator=`(ab9ebd0b824095ec). stdcxx . . $ std/pair#pair(62e1774a2dc03c82).::paircxx . . $ std/pair#<stdcxx . . $ std/::stringcxx . . $ std/string#, stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#< stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::paircxx . . $ std/pair#<int,float> >, float> > > ("LYS", results); |
| 918 | test_results.push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(residue); |
| 919 | |
| 920 | |
| 921 | |
| 922 | // ------------------------------------------------------------------------------ |
| 923 | |
| 924 | |
| 925 | // Now compare vs actual results: |
| 926 | // |
| 927 | bool fail = 0; |
| 928 | for(unsigned int itres=0; itres<test_results.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); itres++) { |
| 929 | stdcxx . . $ std/::stringcxx . . $ std/string# residue_name = test_resultscxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).itres].firstcxx . . $ std/pair#first.; |
| 930 | for (unsigned int itab=0; itab<tablescxx . . $ coot/rotamer_probability_tables#tables..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); itab++) { |
| 931 | if (tablescxx . . $ coot/rotamer_probability_tables#tables.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).itab].residue_namecxx . . $ coot/a_rotamer_table#residue_name. ==cxx . . $ std/`operator==`(5ea818b58063a774). residue_name) { |
| 932 | for (unsigned int i_res_test=0; i_res_test<test_results[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).itres].secondcxx . . $ std/pair#second..sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i_res_test++) { |
| 933 | chi_local =cxx . . $ std/vector#`operator=`(e6b68e61becad66f). test_results[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).itres].secondcxx . . $ std/pair#second.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i_res_test].firstcxx . . $ std/pair#first.; |
| 934 | float correct_result = test_results[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).itres].secondcxx . . $ std/pair#second.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i_res_test].secondcxx . . $ std/pair#second.; |
| 935 | try { |
| 936 | cootcxx . . $ coot/::rotamer_probability_info_tcxx . . $ coot/rotamer_probability_info_t# actual_result = probability_this_rotamercxx . . $ coot/rotamer_probability_tables#probability_this_rotamer(e77f33c5b29a5cd1).(itab, chi_local); |
| 937 | if (fabsf(actual_result.probabilitycxx . . $ coot/rotamer_probability_info_t#probability. - correct_result*100) > 0.001) { |
| 938 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Test chi " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). residue_name <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " ; |
| 939 | for (unsigned int i_chi = 0; i_chi<chi_local.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i_chi++) |
| 940 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "[" <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). chi_local[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i_chi].firstcxx . . $ std/pair#first. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_local[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i_chi].secondcxx . . $ std/pair#second. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "] "; |
| 941 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "======= fail match: " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). actual_result.probabilitycxx . . $ coot/rotamer_probability_info_t#probability. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " should be " |
| 942 | <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). correct_result*100 <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 943 | fail = 1; |
| 944 | } |
| 945 | } |
| 946 | catch (const stdcxx . . $ std/::runtime_errorcxx . . $ std/runtime_error# &mess) { |
| 947 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Oooops: " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). mess.whatcxx . . $ std/runtime_error#what(ba32b354807b2b81).() <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " on testing " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). residue_name <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " "; |
| 948 | for (unsigned int i_chi = 0; i_chi<chi_local.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).(); i_chi++) |
| 949 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "[" <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). chi_local[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i_chi].firstcxx . . $ std/pair#first. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " " <<cxx . . $ std/basic_ostream#`operator<<`(2b73cd0f0517cf77). chi_local[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i_chi].secondcxx . . $ std/pair#second. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "] "; |
| 950 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 951 | fail = 1; |
| 952 | } |
| 953 | } |
| 954 | } |
| 955 | } |
| 956 | } |
| 957 | if (fail == 0) |
| 958 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "DEBUG:: rotamer_probability_tables self test passed" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 959 | else |
| 960 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "DEBUG:: rotamer_probability_tables self test failed" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 961 | |
| 962 | return fail; |
| 963 | } |
| 964 |