Debian Codegraph @

ideal/zo-rama.cc

raw symbols SCIP
1 /*
2 * ideal/zo-rama.cc
3 *
4 * Copyright 2017 by Medical Research Council
5 * Author: Paul Emsley
6 *
7 * This file is part of Coot
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published
11 * by the Free Software Foundation; either version 3 of the License, or (at
12 * your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copies of the GNU General Public License and
20 * the GNU Lesser General Public License along with this program; if not,
21 * write to the Free Software Foundation, Inc., 51 Franklin Street,
22 * Fifth Floor, Boston, MA, 02110-1301, USA.
23 * See http://www.gnu.org/licenses/
24 */
25
26
27 #define _USE_MATH_DEFINEScxx . . $ `ideal/zo-rama.cc:27:9`!
28 #include <iostream>
29 #include "zo-rama.hh"cxx . . $ `<file>/ideal/zo-rama.hh`/
30
31 // this can throw a runtime_error.
32 //
33 void
34 zocxx . . $ zo/::rama_tablecxx . . $ zo/rama_table#::readcxx . . $ zo/rama_table#read(9c546c94e5fcce4e).(const std::stringcxx . . $ std/string# &file_name) {
35 std::ifstreamcxx . . $ std/ifstream# fcxx . . $ std/basic_ifstream#basic_ifstream(b8cd37071ce335df).(file_name.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
36 std::stringcxx . . $ std/string# linecxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).;
37 // std::cout << "INFO:: reading file " << file_name << std::endl;
38
39 if (f) {
40 while(std::getlinecxx . . $ std/getline(4ec722ed0b69c2ab).(f, line)) {
41 std::vectorcxx . . $ std/vector#<std::stringcxx . . $ std/string#> bits = cootcxx . . $ coot/::utilcxx . . $ coot/util/::split_string_no_blankscxx . . $ coot/util/split_string_no_blanks(c47e161d59f8b6e7).(line);
42 if (bits.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).() == 7) {
43 std::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "line: " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). line <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). std::endlcxx . . $ std/endl(345bf97a19cc83a9).;
44 int idx_1 = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_intcxx . . $ coot/util/string_to_int(7787e0c995c81e02).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0]);
45 int idx_2 = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_intcxx . . $ coot/util/string_to_int(7787e0c995c81e02).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1]);
46 double A_cc = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_doublecxx . . $ coot/util/string_to_double(610a939d150cc19e).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).3]);
47 double A_cs = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_doublecxx . . $ coot/util/string_to_double(610a939d150cc19e).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).4]);
48 double A_sc = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_doublecxx . . $ coot/util/string_to_double(610a939d150cc19e).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).5]);
49 double A_ss = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_doublecxx . . $ coot/util/string_to_double(610a939d150cc19e).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).6]);
50 zocxx . . $ zo/::rama_coeffscxx . . $ zo/rama_coeffs# vcxx . . $ zo/rama_coeffs#rama_coeffs(343e06826365af61).(idx_1, idx_2, A_cc, A_cs, A_sc, A_ss);
51 rama_veccxx . . $ zo/rama_table#rama_vec..push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(v);
52 }
53 }
54 } else {
55 std::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Warning:: file not found: " <<cxx . . $ std/`operator<<`(88df5bef833f7f83). file_name <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). std::endlcxx . . $ std/endl(345bf97a19cc83a9).;
56 throw stdcxx . . $ std/runtime_error#runtime_error(85c52e162fed56f9).::runtime_errorcxx . . $ std/runtime_error#("Can't init zo-rama");
57 }
58 }
59
60
61 void
62 zocxx . . $ zo/::rama_tablecxx . . $ zo/rama_table#::test_analytical_derivscxx . . $ zo/rama_table#test_analytical_derivs(83f5f38750778ac8).() const {
63
64 int width = 10;
65 int height = 10;
66 for (int j=0; j<width; j++) {
67 for (int i=0; i<height; i++) {
68 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# phi = M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 2.0 * zocxx . . $ zo/::realtypecxx . . $ zo/realtype#(i-0.5*height)/zocxx . . $ zo/::realtypecxx . . $ zo/realtype#(height); // -pi to +pi
69 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# psi = M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * -2.0 * zocxx . . $ zo/::realtypecxx . . $ zo/realtype#(j-0.5*width )/zocxx . . $ zo/::realtypecxx . . $ zo/realtype#(width);
70 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# sum = 0;
71 std::paircxx . . $ std/pair#<zocxx . . $ zo/::realtypecxx . . $ zo/realtype#, zocxx . . $ zo/::realtypecxx . . $ zo/realtype#> df_n = df_numericalcxx . . $ zo/rama_table#df_numerical(d877fb70c988af79).(phi, psi);
72 std::paircxx . . $ std/pair#<zocxx . . $ zo/::realtypecxx . . $ zo/realtype#, zocxx . . $ zo/::realtypecxx . . $ zo/realtype#> df_a = dfcxx . . $ zo/rama_table#df(d877fb70c988af79). (phi, psi);
73 }
74 }
75 }
76
77 void
78 zocxx . . $ zo/::rama_tablecxx . . $ zo/rama_table#::make_a_pngcxx . . $ zo/rama_table#make_a_png(8afd1a062aafdef8).(int width, const std::stringcxx . . $ std/string# &file_name) const {
79
80
81 int height = width; // this is so for a ramachandran plot
82
83 png_bytepcxx . . $ png_bytep# *row_pointers = static_cast<png_bytepcxx . . $ png_bytep# *>(malloccxx . . $ malloc(9f008b2a9698428b).(sizeof(png_bytepcxx . . $ png_bytep#) * height));
84 for (int i=0; i<height; i++)
85 row_pointers[i] = static_cast<png_bytecxx . . $ png_byte#*>(malloccxx . . $ malloc(9f008b2a9698428b).(width));
86 std::vectorcxx . . $ std/vector#<std::vectorcxx . . $ std/vector#<zocxx . . $ zo/::realtypecxx . . $ zo/realtype#> > vcxx . . $ std/vector#vector(83fdeebbe0501a83).(height);
87 for (int i=0; i<height; i++)
88 v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i] =cxx . . $ std/vector#`operator=`(1104576815caab1a). stdcxx . . $ std/vector#vector(229e4d6bd205de31).::vectorcxx . . $ std/vector#<zocxx . . $ zo/::realtypecxx . . $ zo/realtype#>(width, 0);
89
90 for (int j=0; j<width; j++) {
91 for (int i=0; i<height; i++) {
92 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# phi = M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 2.0 * double(i-0.5*height)/double(height);
93 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# psi = M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * -2.0 * double(j-0.5*width )/double(width); // -pi to +pi
94 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# sum = valuecxx . . $ zo/rama_table#value(99c14de11d83fb75).(phi,psi);
95 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# d = expf(sum);
96 v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).j][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i] = d;
97 }
98 }
99
100 // replace by gradient for testing
101 if (false) {
102 for (int j=0; j<width; j++) {
103 for (int i=0; i<height; i++) {
104 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# phi = M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * 2.0 * double(i-0.5*height)/double(height);
105 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# psi = M_PIcxx . . $ `<external>/11263917310783833665/math.h:1121:10`! * -2.0 * double(j-0.5*width )/double(width); // -pi to +pi
106 std::paircxx . . $ std/pair#<zocxx . . $ zo/::realtypecxx . . $ zo/realtype#, zocxx . . $ zo/::realtypecxx . . $ zo/realtype#> grads = df_numericalcxx . . $ zo/rama_table#df_numerical(d877fb70c988af79).(phi,psi);
107 // zo::realtype d = expf(sqrt(grads.first*grads.first + grads.second*grads.second));
108 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# d = sqrt(grads.firstcxx . . $ std/pair#first.*grads.firstcxx . . $ std/pair#first. + grads.secondcxx . . $ std/pair#second.*grads.secondcxx . . $ std/pair#second.);
109 v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).j][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i] = d;
110 }
111 }
112 }
113
114 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# min_v = 9.99e12;
115 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# max_v = 0.0;
116 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# sum = 0;
117 int n = 0;
118 for (int j=0; j<width; j++) {
119 for (int i=0; i<height; i++) {
120 sum += v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).j][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i];
121 n++;
122 if (v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).j][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i] < min_v) min_v = v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).j][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i];
123 if (v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).j][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i] > max_v) max_v = v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).j][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i];
124 }
125 }
126 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# mean = sum/zocxx . . $ zo/::realtypecxx . . $ zo/realtype#(n);
127 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# sf = 0.1 / mean;
128
129 for (int j=0; j<width; j++) {
130 for (int i=0; i<height; i++) {
131 zocxx . . $ zo/::realtypecxx . . $ zo/realtype# vv = v[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).j][cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).i] * sf;
132 vv = 255 * (1 - vv);
133 if (vv < 0) vv = 0;
134 // int pixel_value = std::lround(vv);
135 int pixel_value = int(vv+0.5);
136 row_pointers[j][i] = pixel_value;
137 }
138 }
139
140 write_png_filecxx . . $ zo/write_png_file(716104b43162c446).(width, height, row_pointers, file_namecxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d)..c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
141
142 // now clean up
143 for (int y=0; y<height; y++)
144 freecxx . . $ free(bd21765a0afc8e3c).(row_pointers[y]);
145 freecxx . . $ free(bd21765a0afc8e3c).(row_pointers);
146
147 }
148
149
150 // fill the table_map with tables
151 //
152 void
153 zocxx . . $ zo/::rama_table_setcxx . . $ zo/rama_table_set#::initcxx . . $ zo/rama_table_set#init(49f6e7a06ebc5aa8).() {
154
155 // Old style - only one table in a file
156 // try {
157 // table_map[ALL_NON_PRE_PRO] = rama_table("all-non-pre-pro.tab");
158 // }
159 // catch (const std::runtime_error &rte) {
160 // std::cout << "ERROR:: " << rte.what() << std::endl;
161 // }
162
163 // read interleaved coeffsolution.dat
164
165 std::stringcxx . . $ std/string# dir1 = cootcxx . . $ coot/::package_data_dircxx . . $ coot/package_data_dir(efd28698952f529a).();
166 std::stringcxx . . $ std/string# dir2 = cootcxx . . $ coot/::utilcxx . . $ coot/util/::append_dir_dircxx . . $ coot/util/append_dir_dir(203b42cd324c6c40).(dir1, "data"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
167 std::stringcxx . . $ std/string# dir3 = cootcxx . . $ coot/::utilcxx . . $ coot/util/::append_dir_dircxx . . $ coot/util/append_dir_dir(203b42cd324c6c40).(dir2, "rama"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
168 std::stringcxx . . $ std/string# dir4 = cootcxx . . $ coot/::utilcxx . . $ coot/util/::append_dir_dircxx . . $ coot/util/append_dir_dir(203b42cd324c6c40).(dir3, "zo-tables"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
169
170 std::stringcxx . . $ std/string# full = cootcxx . . $ coot/::utilcxx . . $ coot/util/::append_dir_filecxx . . $ coot/util/append_dir_file(203b42cd324c6c40).(dir4, "coeffsolution.dat"cxx . . $ std/__cxx11/basic_string#basic_string(e36662616dba894d).);
171
172 std::ifstreamcxx . . $ std/ifstream# fcxx . . $ std/basic_ifstream#basic_ifstream(b8cd37071ce335df).(full.c_strcxx . . $ std/__cxx11/basic_string#c_str(8e614c7de0b1573e).());
173 std::stringcxx . . $ std/string# linecxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).;
174
175 // std::cout << "INFO:: reading file " << full << std::endl;
176
177 std::vectorcxx . . $ std/vector#<std::stringcxx . . $ std/string#> table_typecxx . . $ std/vector#vector(83fdeebbe0501a83).(16);
178 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 0] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "ALL!P"; // all not next Pro
179 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 1] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "ALLP"; // all with next is Pro
180 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 2] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "GLY!P";
181 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 3] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "GLYP";
182 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 4] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "PRO!P";
183 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 5] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "PROP";
184 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 6] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "VI!P";
185 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 7] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "VIP";
186 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 8] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "DN!P";
187 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce). 9] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "DNP";
188 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).10] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "ST!P";
189 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).11] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "STP";
190 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).12] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "EQ!P";
191 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).13] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "EQP";
192 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).14] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "LA!P";
193 table_type[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).15] =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "LAP";
194
195 if (f) {
196 while(std::getlinecxx . . $ std/getline(4ec722ed0b69c2ab).(f, line)) {
197 std::vectorcxx . . $ std/vector#<std::stringcxx . . $ std/string#> bits = cootcxx . . $ coot/::utilcxx . . $ coot/util/::split_string_no_blankscxx . . $ coot/util/split_string_no_blanks(c47e161d59f8b6e7).(line);
198 if (bits.sizecxx . . $ std/vector#size(c9b1e749b64d5edc).() == 7) {
199
200 if (bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0] != "HEADER") {
201
202 // std::cout << "line: " << line << std::endl;
203 int idx_1 = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_intcxx . . $ coot/util/string_to_int(7787e0c995c81e02).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0]);
204 int idx_2 = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_intcxx . . $ coot/util/string_to_int(7787e0c995c81e02).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).1]);
205 int idx_res_type = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_intcxx . . $ coot/util/string_to_int(7787e0c995c81e02).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).2]);
206 double A_cc = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_doublecxx . . $ coot/util/string_to_double(610a939d150cc19e).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).3]);
207 double A_cs = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_doublecxx . . $ coot/util/string_to_double(610a939d150cc19e).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).4]);
208 double A_sc = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_doublecxx . . $ coot/util/string_to_double(610a939d150cc19e).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).5]);
209 double A_ss = cootcxx . . $ coot/::utilcxx . . $ coot/util/::string_to_doublecxx . . $ coot/util/string_to_double(610a939d150cc19e).(bits[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).6]);
210 zocxx . . $ zo/::rama_coeffscxx . . $ zo/rama_coeffs# vcxx . . $ zo/rama_coeffs#rama_coeffs(343e06826365af61).(idx_1, idx_2, A_cc, A_cs, A_sc, A_ss);
211 if (idx_res_type >=0 && idx_res_type <= 15) {
212 std::stringcxx . . $ std/string# tt = table_typecxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).idx_res_type];
213 table_mapcxx . . $ zo/rama_table_set#table_map.[cxx . . $ std/map#`operator[]`(bbd415b616967878).tt].rama_veccxx . . $ zo/rama_table#rama_vec..push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(v);
214 }
215 }
216 }
217 }
218 }
219 }
220
221 std::paircxx . . $ std/pair#<zocxx . . $ zo/::realtypecxx . . $ zo/realtype#, zocxx . . $ zo/::realtypecxx . . $ zo/realtype#>
222 zocxx . . $ zo/::rama_table_setcxx . . $ zo/rama_table_set#::dfcxx . . $ zo/rama_table_set#df(9634d3235c93ae68).(const std::stringcxx . . $ std/string# &residue_type,
223 const zocxx . . $ zo/::realtypecxx . . $ zo/realtype# &phi, const zocxx . . $ zo/::realtypecxx . . $ zo/realtype# &psi) const {
224 // residue type is e.g. "ALL!nP"
225 std::mapcxx . . $ std/map#<std::string, rama_table>::const_iteratorcxx . . $ std/map#const_iterator# it = table_mapcxx . . $ zo/rama_table_set#table_map..findcxx . . $ std/map#find(7b3585bb5da8f7d).(residue_type);
226 return it->cxx . . $ std/_Rb_tree_const_iterator#`operator->`(8e614c7de0b1573e).secondcxx . . $ std/pair#second..dfcxx . . $ zo/rama_table#df(d877fb70c988af79).(phi,psi);
227 }
228
229
230 zocxx . . $ zo/::realtypecxx . . $ zo/realtype#
231 zocxx . . $ zo/::rama_table_setcxx . . $ zo/rama_table_set#::valuecxx . . $ zo/rama_table_set#value(d728f85a2b862bb5).(const std::stringcxx . . $ std/string# &residue_type,
232 const zocxx . . $ zo/::realtypecxx . . $ zo/realtype# &phi, const zocxx . . $ zo/::realtypecxx . . $ zo/realtype# &psi) const {
233
234 // residue type is e.g. "ALL!nP"
235
236 // std::cout << "debug:: in rama_table_set::value residue_type was " << residue_type << std::endl;
237 std::mapcxx . . $ std/map#<std::string, rama_table>::const_iteratorcxx . . $ std/map#const_iterator# it = table_mapcxx . . $ zo/rama_table_set#table_map..findcxx . . $ std/map#find(7b3585bb5da8f7d).(residue_type);
238 if (it != table_mapcxx . . $ zo/rama_table_set#table_map..endcxx . . $ std/map#end(b953fec338ad1a3b).()) {
239 return it->cxx . . $ std/_Rb_tree_const_iterator#`operator->`(8e614c7de0b1573e).secondcxx . . $ std/pair#second..valuecxx . . $ zo/rama_table#value(99c14de11d83fb75).(phi,psi);
240 } else {
241 std::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "ERROR:: unknown residue/table type \"" <<cxx . . $ std/`operator<<`(88df5bef833f7f83). residue_type <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "\"" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). std::endlcxx . . $ std/endl(345bf97a19cc83a9).;
242 return 0.0;
243 }
244 }
245
246 std::stringcxx . . $ std/string#
247 zocxx . . $ zo/::rama_table_setcxx . . $ zo/rama_table_set#::get_residue_typecxx . . $ zo/rama_table_set#get_residue_type(ee8c6c2661a93592).(const std::stringcxx . . $ std/string# &this_residue_type,
248 const std::stringcxx . . $ std/string# &next_residue_type) const {
249
250 std::stringcxx . . $ std/string# rcxx . . $ std/__cxx11/basic_string#basic_string(925dcc5e17f50391).;
251 if (next_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "PRO") {
252 r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "ALLP";
253 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLY") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "GLYP";
254 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "PRO") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "PROP";
255 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "VAL") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "VIP";
256 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ILE") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "VIP";
257 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ASP") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "DNP";
258 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ASN") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "DNP";
259 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "SER") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "STP";
260 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "THR") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "STP";
261 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLU") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "EQP";
262 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLN") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "EQP";
263 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "LEU") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "LAP";
264 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ALA") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "LAP";
265 } else {
266 r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "ALL!P";
267 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLY") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "GLY!P";
268 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "PRO") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "PRO!P";
269 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "VAL") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "VI!P";
270 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ILE") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "VI!P";
271 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ASP") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "DN!P";
272 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ASN") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "DN!P";
273 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "SER") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "ST!P";
274 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "THR") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "ST!P";
275 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLU") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "EQ!P";
276 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "GLN") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "EQ!P";
277 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "LEU") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "LA!P";
278 if (this_residue_type ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "ALA") r =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). "LA!P";
279 }
280 return rcxx . . $ std/__cxx11/basic_string#basic_string(8f3aaafa33d05d0b).;
281 }