diff --git a/unidock/CMakeLists.txt b/unidock/CMakeLists.txt index 726320a..72577be 100644 --- a/unidock/CMakeLists.txt +++ b/unidock/CMakeLists.txt @@ -41,10 +41,18 @@ find_package(OpenMP REQUIRED) # OpenMP only required in main.cpp find_package(Boost 1.72 REQUIRED COMPONENTS system thread serialization filesystem program_options timer) include_directories(${Boost_INCLUDE_DIRS}) -include_directories(src/lib src/cuda) +include_directories(src/lib src/cuda ) add_executable(${VINA_BIN_NAME} src/main/main.cpp) add_executable(split src/split/split.cpp) +# add_executable(unitest unitest/test.cpp unitest/catch_amalgamated.cpp) +# target_include_directories(unitest PUBLIC unitest) +include_directories(${CMAKE_SOURCE_DIR}/unitest) +file(GLOB_RECURSE TEST_SOURCES "${CMAKE_SOURCE_DIR}/unitest/*.cpp") +add_executable(unit_tests ${TEST_SOURCES}) + + + target_link_libraries(${VINA_BIN_NAME} Boost::system Boost::thread Boost::serialization Boost::filesystem Boost::program_options Boost::timer) target_link_libraries(split Boost::system Boost::thread Boost::serialization Boost::filesystem Boost::program_options Boost::timer) target_link_libraries(${VINA_BIN_NAME} OpenMP::OpenMP_CXX) @@ -52,6 +60,10 @@ target_link_libraries(${VINA_BIN_NAME} OpenMP::OpenMP_CXX) # set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/lib) add_library(lib OBJECT src/lib/ad4cache.cpp src/lib/cache.cpp src/lib/non_cache.cpp src/lib/conf_independent.cpp src/lib/coords.cpp src/lib/grid.cpp src/lib/szv_grid.cpp src/lib/model.cpp src/lib/mutate.cpp src/lib/parallel_mc.cpp src/lib/parse_pdbqt.cpp src/lib/quasi_newton.cpp src/lib/quaternion.cpp src/lib/random.cpp src/lib/utils.cpp src/lib/vina.cpp src/lib/precalculate.h) + +target_link_libraries(unit_tests Boost::system Boost::thread Boost::serialization Boost::filesystem Boost::program_options Boost::timer) +target_link_libraries(unit_tests OpenMP::OpenMP_CXX) +target_link_libraries(unit_tests lib) # src/lib/monte_carlo # set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/cuda) add_library(cuda OBJECT src/cuda/monte_carlo.cu src/cuda/precalculate.cu) diff --git a/unidock/src/lib/parse_pdbqt.cpp b/unidock/src/lib/parse_pdbqt.cpp index b31dff5..afef220 100644 --- a/unidock/src/lib/parse_pdbqt.cpp +++ b/unidock/src/lib/parse_pdbqt.cpp @@ -157,9 +157,9 @@ struct movable_atom : public atom { } }; -struct rigid { - atomv atoms; -}; +// struct rigid { +// atomv atoms; +// }; typedef std::vector mav; diff --git a/unidock/src/lib/parse_pdbqt.h b/unidock/src/lib/parse_pdbqt.h index 7272ae5..0a16e6b 100644 --- a/unidock/src/lib/parse_pdbqt.h +++ b/unidock/src/lib/parse_pdbqt.h @@ -47,4 +47,8 @@ model parse_ligand_pdbqt_from_string(const std::string &string_name, atom_type::t atype); // can exit with code EXIT_FAILURE model parse_ligand_pdbqt_from_string_no_failure( const std::string &string_name, atom_type::t atype); // can return empty model as failure +struct rigid { + atomv atoms; +}; +void parse_pdbqt_rigid(const path& name, rigid& r); #endif diff --git a/unidock/unitest/ParseTests/def.pdbqt b/unidock/unitest/ParseTests/def.pdbqt new file mode 100644 index 0000000..b02f4af --- /dev/null +++ b/unidock/unitest/ParseTests/def.pdbqt @@ -0,0 +1,1614 @@ +ATOM 1 N SER 1 -24.102 41.977 73.078 0.00 0.00 -0.064 N +ATOM 2 HN1 SER 1 -24.590 41.366 73.732 1.00 0.00 0.275 HD +ATOM 3 HN2 SER 1 -23.447 42.598 73.553 1.00 0.00 0.275 HD +ATOM 4 HN3 SER 1 -23.433 41.464 72.503 1.00 0.00 0.275 HD +ATOM 5 CA SER 1 -25.081 42.730 72.252 0.00 0.00 0.297 C +ATOM 6 C SER 1 -25.984 41.779 71.491 0.00 0.00 0.251 C +ATOM 7 O SER 1 -25.679 40.596 71.347 0.00 0.00 -0.271 OA +ATOM 8 CB SER 1 -24.344 43.653 71.264 0.00 0.00 0.206 C +ATOM 9 OG SER 1 -22.931 43.477 71.322 0.00 0.00 -0.398 OA +ATOM 10 HOG SER 1 -22.520 44.064 70.698 0.00 0.00 0.209 HD +ATOM 11 N VAL 2 -27.131 42.299 71.074 0.00 0.00 -0.346 N +ATOM 12 HN VAL 2 -27.343 43.271 71.298 1.00 0.00 0.163 HD +ATOM 13 CA VAL 2 -28.098 41.525 70.306 0.00 0.00 0.180 C +ATOM 14 C VAL 2 -27.695 41.709 68.848 0.00 0.00 0.241 C +ATOM 15 O VAL 2 -27.508 42.843 68.378 0.00 0.00 -0.271 OA +ATOM 16 CB VAL 2 -29.539 42.012 70.547 0.00 0.00 0.009 C +ATOM 17 CG1 VAL 2 -30.527 41.270 69.644 0.00 0.00 0.012 C +ATOM 18 CG2 VAL 2 -29.927 41.869 72.019 0.00 0.00 0.012 C +ATOM 19 N LEU 3 -27.504 40.592 68.159 0.00 0.00 -0.346 N +ATOM 20 HN LEU 3 -27.655 39.691 68.612 1.00 0.00 0.163 HD +ATOM 21 CA LEU 3 -27.085 40.631 66.776 0.00 0.00 0.177 C +ATOM 22 C LEU 3 -28.257 40.349 65.838 0.00 0.00 0.241 C +ATOM 23 O LEU 3 -29.180 39.623 66.204 0.00 0.00 -0.271 OA +ATOM 24 CB LEU 3 -25.938 39.624 66.571 0.00 0.00 0.038 C +ATOM 25 CG LEU 3 -24.811 39.672 67.605 0.00 0.00 -0.020 C +ATOM 26 CD1 LEU 3 -23.918 38.434 67.499 0.00 0.00 0.009 C +ATOM 27 CD2 LEU 3 -24.009 40.969 67.483 0.00 0.00 0.009 C +ATOM 28 N GLN 4 -28.208 40.926 64.635 0.00 0.00 -0.346 N +ATOM 29 HN GLN 4 -27.401 41.507 64.408 1.00 0.00 0.163 HD +ATOM 30 CA GLN 4 -29.258 40.765 63.625 0.00 0.00 0.177 C +ATOM 31 C GLN 4 -29.280 39.412 62.913 0.00 0.00 0.241 C +ATOM 32 O GLN 4 -28.348 39.041 62.201 0.00 0.00 -0.271 OA +ATOM 33 CB GLN 4 -29.162 41.881 62.568 0.00 0.00 0.044 C +ATOM 34 CG GLN 4 -30.197 41.677 61.460 0.00 0.00 0.105 C +ATOM 35 CD GLN 4 -29.815 42.462 60.203 0.00 0.00 0.215 C +ATOM 36 OE1 GLN 4 -29.135 43.474 60.254 0.00 0.00 -0.274 OA +ATOM 37 NE2 GLN 4 -30.289 41.940 59.075 0.00 0.00 -0.370 N +ATOM 38 1HE2 GLN 4 -30.857 41.094 59.032 1.00 0.00 0.159 HD +ATOM 39 2HE2 GLN 4 -30.034 42.463 58.237 1.00 0.00 0.159 HD +ATOM 40 N VAL 5 -30.392 38.710 63.065 0.00 0.00 -0.346 N +ATOM 41 HN VAL 5 -31.145 39.096 63.634 1.00 0.00 0.163 HD +ATOM 42 CA VAL 5 -30.574 37.408 62.447 0.00 0.00 0.180 C +ATOM 43 C VAL 5 -30.984 37.608 60.992 0.00 0.00 0.241 C +ATOM 44 O VAL 5 -31.885 38.399 60.691 0.00 0.00 -0.271 OA +ATOM 45 CB VAL 5 -31.635 36.605 63.223 0.00 0.00 0.009 C +ATOM 46 CG1 VAL 5 -31.823 35.214 62.614 0.00 0.00 0.012 C +ATOM 47 CG2 VAL 5 -31.274 36.511 64.707 0.00 0.00 0.012 C +ATOM 48 N LEU 6 -30.280 36.934 60.089 0.00 0.00 -0.346 N +ATOM 49 HN LEU 6 -29.521 36.330 60.406 1.00 0.00 0.163 HD +ATOM 50 CA LEU 6 -30.557 37.029 58.651 0.00 0.00 0.177 C +ATOM 51 C LEU 6 -31.753 36.153 58.304 0.00 0.00 0.241 C +ATOM 52 O LEU 6 -31.943 35.094 58.897 0.00 0.00 -0.271 OA +ATOM 53 CB LEU 6 -29.330 36.589 57.831 0.00 0.00 0.038 C +ATOM 54 CG LEU 6 -28.010 37.281 58.174 0.00 0.00 -0.020 C +ATOM 55 CD1 LEU 6 -26.825 36.543 57.549 0.00 0.00 0.009 C +ATOM 56 CD2 LEU 6 -28.043 38.757 57.771 0.00 0.00 0.009 C +ATOM 57 N HIS 7 -32.563 36.594 57.352 0.00 0.00 -0.346 N +ATOM 58 HN HIS 7 -32.360 37.480 56.889 1.00 0.00 0.163 HD +ATOM 59 CA HIS 7 -33.742 35.830 56.956 0.00 0.00 0.182 C +ATOM 60 C HIS 7 -33.720 35.554 55.461 0.00 0.00 0.241 C +ATOM 61 O HIS 7 -33.075 36.282 54.693 0.00 0.00 -0.271 OA +ATOM 62 CB HIS 7 -35.031 36.607 57.283 0.00 0.00 0.093 C +ATOM 63 CG HIS 7 -35.126 37.063 58.719 0.00 0.00 0.028 A +ATOM 64 ND1 HIS 7 -35.950 38.098 59.125 0.00 0.00 -0.354 N +ATOM 65 HD1 HIS 7 -36.561 38.646 58.520 1.00 0.00 0.166 HD +ATOM 66 CD2 HIS 7 -34.493 36.613 59.841 0.00 0.00 0.114 A +ATOM 67 CE1 HIS 7 -35.811 38.256 60.433 0.00 0.00 0.180 A +ATOM 68 NE2 HIS 7 -34.906 37.335 60.874 0.00 0.00 -0.360 N +ATOM 69 HE2 HIS 7 -34.598 37.221 61.840 1.00 0.00 0.166 HD +ATOM 70 N ILE 8 -34.416 34.502 55.043 0.00 0.00 -0.346 N +ATOM 71 HN ILE 8 -34.902 33.912 55.718 1.00 0.00 0.163 HD +ATOM 72 CA ILE 8 -34.486 34.190 53.623 0.00 0.00 0.180 C +ATOM 73 C ILE 8 -35.065 35.425 52.913 0.00 0.00 0.243 C +ATOM 74 O ILE 8 -35.855 36.169 53.508 0.00 0.00 -0.271 OA +ATOM 75 CB ILE 8 -35.333 32.933 53.350 0.00 0.00 0.013 C +ATOM 76 CG1 ILE 8 -36.801 33.173 53.710 0.00 0.00 0.002 C +ATOM 77 CG2 ILE 8 -34.756 31.715 54.075 0.00 0.00 0.012 C +ATOM 78 CD1 ILE 8 -37.688 32.049 53.170 0.00 0.00 0.005 C +ATOM 79 N PRO 9 -34.646 35.685 51.661 0.00 0.00 -0.337 N +ATOM 80 CA PRO 9 -33.714 34.907 50.848 0.00 0.00 0.179 C +ATOM 81 C PRO 9 -32.258 35.444 50.895 0.00 0.00 0.241 C +ATOM 82 O PRO 9 -31.530 35.354 49.904 0.00 0.00 -0.271 OA +ATOM 83 CB PRO 9 -33.966 35.181 49.462 0.00 0.00 0.037 C +ATOM 84 CG PRO 9 -34.712 36.506 49.458 0.00 0.00 0.022 C +ATOM 85 CD PRO 9 -35.190 36.775 50.875 0.00 0.00 0.127 C +ATOM 86 N ASP 10 -31.857 35.994 52.042 0.00 0.00 -0.346 N +ATOM 87 HN ASP 10 -32.519 36.043 52.817 1.00 0.00 0.163 HD +ATOM 88 CA ASP 10 -30.508 36.531 52.239 0.00 0.00 0.186 C +ATOM 89 C ASP 10 -29.472 35.483 51.851 0.00 0.00 0.241 C +ATOM 90 O ASP 10 -29.290 34.486 52.566 0.00 0.00 -0.271 OA +ATOM 91 CB ASP 10 -30.307 36.923 53.715 0.00 0.00 0.147 C +ATOM 92 CG ASP 10 -29.041 37.732 54.002 0.00 0.00 0.175 C +ATOM 93 OD1 ASP 10 -29.045 38.649 54.837 0.00 0.00 -0.648 OA +ATOM 94 OD2 ASP 10 -28.004 37.384 53.318 0.00 0.00 -0.648 OA +ATOM 95 N GLU 11 -28.739 35.763 50.769 0.00 0.00 -0.346 N +ATOM 96 HN GLU 11 -28.894 36.647 50.284 1.00 0.00 0.163 HD +ATOM 97 CA GLU 11 -27.720 34.843 50.256 0.00 0.00 0.177 C +ATOM 98 C GLU 11 -26.624 34.528 51.261 0.00 0.00 0.241 C +ATOM 99 O GLU 11 -26.019 33.472 51.179 0.00 0.00 -0.271 OA +ATOM 100 CB GLU 11 -27.139 35.316 48.910 0.00 0.00 0.045 C +ATOM 101 CG GLU 11 -28.177 35.195 47.793 0.00 0.00 0.116 C +ATOM 102 CD GLU 11 -27.563 35.542 46.435 0.00 0.00 0.172 C +ATOM 103 OE1 GLU 11 -26.456 36.096 46.378 0.00 0.00 -0.648 OA +ATOM 104 OE2 GLU 11 -28.279 35.215 45.413 0.00 0.00 -0.648 OA +ATOM 105 N ARG 12 -26.426 35.392 52.252 0.00 0.00 -0.346 N +ATOM 106 HN ARG 12 -26.991 36.240 52.303 1.00 0.00 0.163 HD +ATOM 107 CA ARG 12 -25.404 35.138 53.272 0.00 0.00 0.176 C +ATOM 108 C ARG 12 -25.693 33.921 54.148 0.00 0.00 0.241 C +ATOM 109 O ARG 12 -24.784 33.395 54.808 0.00 0.00 -0.271 OA +ATOM 110 CB ARG 12 -25.170 36.368 54.169 0.00 0.00 0.036 C +ATOM 111 CG ARG 12 -24.369 37.441 53.430 0.00 0.00 0.023 C +ATOM 112 CD ARG 12 -24.289 38.729 54.252 0.00 0.00 0.138 C +ATOM 113 NE ARG 12 -25.649 39.253 54.507 0.00 0.00 -0.227 N +ATOM 114 HE ARG 12 -26.441 38.641 54.310 1.00 0.00 0.177 HD +ATOM 115 CZ ARG 12 -25.908 40.489 54.984 0.00 0.00 0.665 C +ATOM 116 NH1 ARG 12 -24.883 41.309 55.251 0.00 0.00 -0.235 N +ATOM 117 1HH1 ARG 12 -23.922 41.004 55.096 1.00 0.00 0.174 HD +ATOM 118 2HH1 ARG 12 -25.079 42.243 55.611 1.00 0.00 0.174 HD +ATOM 119 NH2 ARG 12 -27.170 40.889 55.188 0.00 0.00 -0.235 N +ATOM 120 1HH2 ARG 12 -27.951 40.265 54.985 1.00 0.00 0.174 HD +ATOM 121 2HH2 ARG 12 -27.366 41.823 55.548 1.00 0.00 0.174 HD +ATOM 122 N LEU 13 -26.957 33.495 54.182 0.00 0.00 -0.346 N +ATOM 123 HN LEU 13 -27.666 33.999 53.649 1.00 0.00 0.163 HD +ATOM 124 CA LEU 13 -27.353 32.322 54.966 0.00 0.00 0.177 C +ATOM 125 C LEU 13 -26.893 31.067 54.237 0.00 0.00 0.241 C +ATOM 126 O LEU 13 -26.939 29.963 54.777 0.00 0.00 -0.271 OA +ATOM 127 CB LEU 13 -28.882 32.269 55.144 0.00 0.00 0.038 C +ATOM 128 CG LEU 13 -29.476 33.264 56.143 0.00 0.00 -0.020 C +ATOM 129 CD1 LEU 13 -30.973 33.459 55.899 0.00 0.00 0.009 C +ATOM 130 CD2 LEU 13 -29.181 32.837 57.583 0.00 0.00 0.009 C +ATOM 131 N ARG 14 -26.475 31.231 52.994 0.00 0.00 -0.346 N +ATOM 132 HN ARG 14 -26.482 32.163 52.580 1.00 0.00 0.163 HD +ATOM 133 CA ARG 14 -26.003 30.097 52.205 0.00 0.00 0.176 C +ATOM 134 C ARG 14 -24.455 29.969 52.200 0.00 0.00 0.241 C +ATOM 135 O ARG 14 -23.887 29.124 51.496 0.00 0.00 -0.271 OA +ATOM 136 CB ARG 14 -26.564 30.215 50.776 0.00 0.00 0.036 C +ATOM 137 CG ARG 14 -28.031 30.650 50.797 0.00 0.00 0.023 C +ATOM 138 CD ARG 14 -28.958 29.466 50.516 0.00 0.00 0.138 C +ATOM 139 NE ARG 14 -28.875 28.485 51.621 0.00 0.00 -0.227 N +ATOM 140 HE ARG 14 -28.007 28.438 52.154 1.00 0.00 0.177 HD +ATOM 141 CZ ARG 14 -29.877 27.649 51.967 0.00 0.00 0.665 C +ATOM 142 NH1 ARG 14 -31.027 27.693 51.280 0.00 0.00 -0.235 N +ATOM 143 1HH1 ARG 14 -31.143 28.349 50.507 1.00 0.00 0.174 HD +ATOM 144 2HH1 ARG 14 -31.784 27.061 51.541 1.00 0.00 0.174 HD +ATOM 145 NH2 ARG 14 -29.724 26.788 52.982 0.00 0.00 -0.235 N +ATOM 146 1HH2 ARG 14 -28.849 26.755 53.505 1.00 0.00 0.174 HD +ATOM 147 2HH2 ARG 14 -30.481 26.156 53.243 1.00 0.00 0.174 HD +ATOM 148 N LYS 15 -23.803 30.754 53.054 0.00 0.00 -0.346 N +ATOM 149 HN LYS 15 -24.337 31.380 53.657 1.00 0.00 0.163 HD +ATOM 150 CA LYS 15 -22.352 30.747 53.154 0.00 0.00 0.176 C +ATOM 151 C LYS 15 -21.798 29.695 54.099 0.00 0.00 0.241 C +ATOM 152 O LYS 15 -22.258 29.578 55.239 0.00 0.00 -0.271 OA +ATOM 153 CB LYS 15 -21.861 32.149 53.560 0.00 0.00 0.035 C +ATOM 154 CG LYS 15 -22.056 33.150 52.420 0.00 0.00 0.004 C +ATOM 155 CD LYS 15 -21.521 34.531 52.806 0.00 0.00 0.027 C +ATOM 156 CE LYS 15 -20.049 34.455 53.215 0.00 0.00 0.229 C +ATOM 157 NZ LYS 15 -19.624 35.714 53.848 0.00 0.00 -0.079 N +ATOM 158 HZ1 LYS 15 -18.642 35.663 54.121 1.00 0.00 0.274 HD +ATOM 159 HZ2 LYS 15 -20.224 35.964 54.634 1.00 0.00 0.274 HD +ATOM 160 HZ3 LYS 15 -19.811 36.520 53.252 1.00 0.00 0.274 HD +ATOM 161 N VAL 16 -20.851 28.892 53.603 0.00 0.00 -0.346 N +ATOM 162 HN VAL 16 -20.557 29.023 52.635 1.00 0.00 0.163 HD +ATOM 163 CA VAL 16 -20.216 27.829 54.394 0.00 0.00 0.180 C +ATOM 164 C VAL 16 -19.156 28.427 55.310 0.00 0.00 0.241 C +ATOM 165 O VAL 16 -18.300 29.206 54.871 0.00 0.00 -0.271 OA +ATOM 166 CB VAL 16 -19.586 26.739 53.506 0.00 0.00 0.009 C +ATOM 167 CG1 VAL 16 -19.077 25.570 54.352 0.00 0.00 0.012 C +ATOM 168 CG2 VAL 16 -20.576 26.258 52.444 0.00 0.00 0.012 C +ATOM 169 N ALA 17 -19.241 28.075 56.590 0.00 0.00 -0.346 N +ATOM 170 HN ALA 17 -19.975 27.423 56.867 1.00 0.00 0.163 HD +ATOM 171 CA ALA 17 -18.333 28.577 57.618 0.00 0.00 0.172 C +ATOM 172 C ALA 17 -16.979 27.848 57.725 0.00 0.00 0.240 C +ATOM 173 O ALA 17 -16.875 26.636 57.523 0.00 0.00 -0.271 OA +ATOM 174 CB ALA 17 -19.051 28.577 58.980 0.00 0.00 0.042 C +ATOM 175 N LYS 18 -15.936 28.612 58.039 0.00 0.00 -0.346 N +ATOM 176 HN LYS 18 -16.075 29.612 58.186 1.00 0.00 0.163 HD +ATOM 177 CA LYS 18 -14.602 28.050 58.177 0.00 0.00 0.176 C +ATOM 178 C LYS 18 -14.355 27.744 59.643 0.00 0.00 0.243 C +ATOM 179 O LYS 18 -14.963 28.353 60.517 0.00 0.00 -0.271 OA +ATOM 180 CB LYS 18 -13.552 29.017 57.599 0.00 0.00 0.035 C +ATOM 181 CG LYS 18 -13.658 30.396 58.252 0.00 0.00 0.004 C +ATOM 182 CD LYS 18 -12.834 30.459 59.540 0.00 0.00 0.027 C +ATOM 183 CE LYS 18 -12.810 31.879 60.107 0.00 0.00 0.229 C +ATOM 184 NZ LYS 18 -12.057 31.917 61.371 0.00 0.00 -0.079 N +ATOM 185 HZ1 LYS 18 -12.041 32.864 61.749 1.00 0.00 0.274 HD +ATOM 186 HZ2 LYS 18 -11.117 31.536 61.264 1.00 0.00 0.274 HD +ATOM 187 HZ3 LYS 18 -12.418 31.245 62.048 1.00 0.00 0.274 HD +ATOM 188 N PRO 19 -13.493 26.763 59.937 0.00 0.00 -0.337 N +ATOM 189 CA PRO 19 -13.184 26.395 61.317 0.00 0.00 0.179 C +ATOM 190 C PRO 19 -12.671 27.583 62.124 0.00 0.00 0.241 C +ATOM 191 O PRO 19 -12.174 28.552 61.561 0.00 0.00 -0.271 OA +ATOM 192 CB PRO 19 -12.560 25.090 61.309 0.00 0.00 0.037 C +ATOM 193 CG PRO 19 -12.050 24.906 59.889 0.00 0.00 0.022 C +ATOM 194 CD PRO 19 -12.713 25.959 59.016 0.00 0.00 0.127 C +ATOM 195 N VAL 20 -12.833 27.512 63.443 0.00 0.00 -0.346 N +ATOM 196 HN VAL 20 -13.325 26.707 63.831 1.00 0.00 0.163 HD +ATOM 197 CA VAL 20 -12.338 28.535 64.359 0.00 0.00 0.180 C +ATOM 198 C VAL 20 -10.879 28.110 64.541 0.00 0.00 0.241 C +ATOM 199 O VAL 20 -10.606 26.917 64.732 0.00 0.00 -0.271 OA +ATOM 200 CB VAL 20 -13.061 28.465 65.717 0.00 0.00 0.009 C +ATOM 201 CG1 VAL 20 -12.251 29.169 66.807 0.00 0.00 0.012 C +ATOM 202 CG2 VAL 20 -14.471 29.051 65.617 0.00 0.00 0.012 C +ATOM 203 N GLU 21 -9.940 29.046 64.409 0.00 0.00 -0.346 N +ATOM 204 HN GLU 21 -10.205 30.009 64.201 1.00 0.00 0.163 HD +ATOM 205 CA GLU 21 -8.532 28.692 64.563 0.00 0.00 0.177 C +ATOM 206 C GLU 21 -8.175 28.274 65.967 0.00 0.00 0.241 C +ATOM 207 O GLU 21 -7.717 27.152 66.176 0.00 0.00 -0.271 OA +ATOM 208 CB GLU 21 -7.612 29.811 64.040 0.00 0.00 0.045 C +ATOM 209 CG GLU 21 -7.490 29.752 62.516 0.00 0.00 0.116 C +ATOM 210 CD GLU 21 -7.103 28.347 62.050 0.00 0.00 0.172 C +ATOM 211 OE1 GLU 21 -6.207 27.723 62.639 0.00 0.00 -0.648 OA +ATOM 212 OE2 GLU 21 -7.770 27.904 61.039 0.00 0.00 -0.648 OA +ATOM 213 N GLU 22 -8.407 29.156 66.927 0.00 0.00 -0.346 N +ATOM 214 HN GLU 22 -8.791 30.069 66.681 1.00 0.00 0.163 HD +ATOM 215 CA GLU 22 -8.129 28.857 68.323 0.00 0.00 0.177 C +ATOM 216 C GLU 22 -9.146 29.642 69.129 0.00 0.00 0.241 C +ATOM 217 O GLU 22 -9.444 30.788 68.798 0.00 0.00 -0.271 OA +ATOM 218 CB GLU 22 -6.700 29.271 68.721 0.00 0.00 0.045 C +ATOM 219 CG GLU 22 -5.666 28.312 68.127 0.00 0.00 0.116 C +ATOM 220 CD GLU 22 -5.861 26.893 68.666 0.00 0.00 0.172 C +ATOM 221 OE1 GLU 22 -6.218 25.983 67.903 0.00 0.00 -0.648 OA +ATOM 222 OE2 GLU 22 -5.626 26.752 69.926 0.00 0.00 -0.648 OA +ATOM 223 N VAL 23 -9.707 29.009 70.157 0.00 0.00 -0.346 N +ATOM 224 HN VAL 23 -9.428 28.049 70.358 1.00 0.00 0.163 HD +ATOM 225 CA VAL 23 -10.709 29.648 71.005 0.00 0.00 0.180 C +ATOM 226 C VAL 23 -10.077 30.718 71.889 0.00 0.00 0.241 C +ATOM 227 O VAL 23 -9.470 30.418 72.915 0.00 0.00 -0.271 OA +ATOM 228 CB VAL 23 -11.458 28.629 71.883 0.00 0.00 0.009 C +ATOM 229 CG1 VAL 23 -12.601 29.299 72.648 0.00 0.00 0.012 C +ATOM 230 CG2 VAL 23 -11.972 27.456 71.045 0.00 0.00 0.012 C +ATOM 231 N ASN 24 -10.246 31.968 71.485 0.00 0.00 -0.346 N +ATOM 232 HN ASN 24 -10.788 32.143 70.639 1.00 0.00 0.163 HD +ATOM 233 CA ASN 24 -9.686 33.098 72.206 0.00 0.00 0.185 C +ATOM 234 C ASN 24 -10.787 34.022 72.722 0.00 0.00 0.241 C +ATOM 235 O ASN 24 -11.975 33.741 72.546 0.00 0.00 -0.271 OA +ATOM 236 CB ASN 24 -8.721 33.860 71.278 0.00 0.00 0.137 C +ATOM 237 CG ASN 24 -9.398 34.209 69.951 0.00 0.00 0.217 C +ATOM 238 OD1 ASN 24 -10.510 34.709 69.905 0.00 0.00 -0.274 OA +ATOM 239 ND2 ASN 24 -8.667 33.919 68.879 0.00 0.00 -0.370 N +ATOM 240 1HD2 ASN 24 -9.118 34.152 67.994 1.00 0.00 0.159 HD +ATOM 241 2HD2 ASN 24 -7.737 33.501 68.917 1.00 0.00 0.159 HD +ATOM 242 N ALA 25 -10.384 35.137 73.327 0.00 0.00 -0.346 N +ATOM 243 HN ALA 25 -9.382 35.316 73.399 1.00 0.00 0.163 HD +ATOM 244 CA ALA 25 -11.309 36.116 73.892 0.00 0.00 0.172 C +ATOM 245 C ALA 25 -12.304 36.710 72.906 0.00 0.00 0.240 C +ATOM 246 O ALA 25 -13.375 37.171 73.313 0.00 0.00 -0.271 OA +ATOM 247 CB ALA 25 -10.525 37.248 74.581 0.00 0.00 0.042 C +ATOM 248 N GLU 26 -11.933 36.754 71.631 0.00 0.00 -0.346 N +ATOM 249 HN GLU 26 -11.009 36.410 71.369 1.00 0.00 0.163 HD +ATOM 250 CA GLU 26 -12.816 37.283 70.595 0.00 0.00 0.177 C +ATOM 251 C GLU 26 -13.887 36.229 70.264 0.00 0.00 0.241 C +ATOM 252 O GLU 26 -15.060 36.557 70.096 0.00 0.00 -0.271 OA +ATOM 253 CB GLU 26 -11.993 37.647 69.346 0.00 0.00 0.045 C +ATOM 254 CG GLU 26 -12.616 38.832 68.604 0.00 0.00 0.116 C +ATOM 255 CD GLU 26 -13.543 38.352 67.486 0.00 0.00 0.172 C +ATOM 256 OE1 GLU 26 -13.095 37.646 66.570 0.00 0.00 -0.648 OA +ATOM 257 OE2 GLU 26 -14.769 38.738 67.590 0.00 0.00 -0.648 OA +ATOM 258 N ILE 27 -13.474 34.962 70.211 0.00 0.00 -0.346 N +ATOM 259 HN ILE 27 -12.487 34.763 70.374 1.00 0.00 0.163 HD +ATOM 260 CA ILE 27 -14.378 33.843 69.929 0.00 0.00 0.180 C +ATOM 261 C ILE 27 -15.395 33.759 71.069 0.00 0.00 0.241 C +ATOM 262 O ILE 27 -16.601 33.641 70.845 0.00 0.00 -0.271 OA +ATOM 263 CB ILE 27 -13.602 32.517 69.821 0.00 0.00 0.013 C +ATOM 264 CG1 ILE 27 -12.597 32.563 68.668 0.00 0.00 0.002 C +ATOM 265 CG2 ILE 27 -14.560 31.330 69.700 0.00 0.00 0.012 C +ATOM 266 CD1 ILE 27 -13.279 32.977 67.362 0.00 0.00 0.005 C +ATOM 267 N GLN 28 -14.892 33.890 72.291 0.00 0.00 -0.346 N +ATOM 268 HN GLN 28 -13.887 34.025 72.398 1.00 0.00 0.163 HD +ATOM 269 CA GLN 28 -15.722 33.848 73.477 0.00 0.00 0.177 C +ATOM 270 C GLN 28 -16.700 35.022 73.536 0.00 0.00 0.241 C +ATOM 271 O GLN 28 -17.781 34.888 74.100 0.00 0.00 -0.271 OA +ATOM 272 CB GLN 28 -14.845 33.745 74.739 0.00 0.00 0.044 C +ATOM 273 CG GLN 28 -14.011 32.462 74.724 0.00 0.00 0.105 C +ATOM 274 CD GLN 28 -13.232 32.300 76.030 0.00 0.00 0.215 C +ATOM 275 OE1 GLN 28 -13.620 32.787 77.080 0.00 0.00 -0.274 OA +ATOM 276 NE2 GLN 28 -12.113 31.591 75.908 0.00 0.00 -0.370 N +ATOM 277 1HE2 GLN 28 -11.593 31.483 76.779 1.00 0.00 0.159 HD +ATOM 278 2HE2 GLN 28 -11.789 31.184 75.031 1.00 0.00 0.159 HD +ATOM 279 N ARG 29 -16.364 36.139 72.894 0.00 0.00 -0.346 N +ATOM 280 HN ARG 29 -15.467 36.190 72.412 1.00 0.00 0.163 HD +ATOM 281 CA ARG 29 -17.263 37.295 72.869 0.00 0.00 0.176 C +ATOM 282 C ARG 29 -18.379 37.041 71.847 0.00 0.00 0.241 C +ATOM 283 O ARG 29 -19.509 37.517 72.007 0.00 0.00 -0.271 OA +ATOM 284 CB ARG 29 -16.500 38.586 72.518 0.00 0.00 0.036 C +ATOM 285 CG ARG 29 -15.383 38.855 73.528 0.00 0.00 0.023 C +ATOM 286 CD ARG 29 -14.625 40.137 73.180 0.00 0.00 0.138 C +ATOM 287 NE ARG 29 -13.551 40.376 74.170 0.00 0.00 -0.227 N +ATOM 288 HE ARG 29 -13.441 39.702 74.928 1.00 0.00 0.177 HD +ATOM 289 CZ ARG 29 -12.708 41.429 74.133 0.00 0.00 0.665 C +ATOM 290 NH1 ARG 29 -12.834 42.328 73.147 0.00 0.00 -0.235 N +ATOM 291 1HH1 ARG 29 -13.556 42.218 72.435 1.00 0.00 0.174 HD +ATOM 292 2HH1 ARG 29 -12.197 43.124 73.119 1.00 0.00 0.174 HD +ATOM 293 NH2 ARG 29 -11.759 41.574 75.068 0.00 0.00 -0.235 N +ATOM 294 1HH2 ARG 29 -11.663 40.890 75.818 1.00 0.00 0.174 HD +ATOM 295 2HH2 ARG 29 -11.122 42.370 75.040 1.00 0.00 0.174 HD +ATOM 296 N ILE 30 -18.049 36.303 70.787 0.00 0.00 -0.346 N +ATOM 297 HN ILE 30 -17.091 35.964 70.697 1.00 0.00 0.163 HD +ATOM 298 CA ILE 30 -19.021 35.967 69.752 0.00 0.00 0.180 C +ATOM 299 C ILE 30 -20.023 34.977 70.359 0.00 0.00 0.241 C +ATOM 300 O ILE 30 -21.234 35.048 70.088 0.00 0.00 -0.271 OA +ATOM 301 CB ILE 30 -18.337 35.382 68.503 0.00 0.00 0.013 C +ATOM 302 CG1 ILE 30 -17.384 36.400 67.872 0.00 0.00 0.002 C +ATOM 303 CG2 ILE 30 -19.372 34.869 67.500 0.00 0.00 0.012 C +ATOM 304 CD1 ILE 30 -16.741 35.836 66.603 0.00 0.00 0.005 C +ATOM 305 N VAL 31 -19.529 34.110 71.239 0.00 0.00 -0.346 N +ATOM 306 HN VAL 31 -18.533 34.139 71.459 1.00 0.00 0.163 HD +ATOM 307 CA VAL 31 -20.371 33.122 71.896 0.00 0.00 0.180 C +ATOM 308 C VAL 31 -21.436 33.779 72.788 0.00 0.00 0.241 C +ATOM 309 O VAL 31 -22.590 33.340 72.823 0.00 0.00 -0.271 OA +ATOM 310 CB VAL 31 -19.511 32.079 72.634 0.00 0.00 0.009 C +ATOM 311 CG1 VAL 31 -20.337 31.331 73.683 0.00 0.00 0.012 C +ATOM 312 CG2 VAL 31 -18.866 31.104 71.647 0.00 0.00 0.012 C +ATOM 313 N ASP 32 -21.075 34.886 73.430 0.00 0.00 -0.345 N +ATOM 314 HN ASP 32 -20.124 35.236 73.318 1.00 0.00 0.163 HD +ATOM 315 CA ASP 32 -22.005 35.616 74.293 0.00 0.00 0.186 C +ATOM 316 C ASP 32 -23.082 36.367 73.516 0.00 0.00 0.241 C +ATOM 317 O ASP 32 -24.257 36.323 73.880 0.00 0.00 -0.271 OA +ATOM 318 CB ASP 32 -21.247 36.612 75.190 0.00 0.00 0.147 C +ATOM 319 CG ASP 32 -20.376 35.973 76.273 0.00 0.00 0.175 C +ATOM 320 OD1 ASP 32 -20.338 34.742 76.419 0.00 0.00 -0.648 OA +ATOM 321 OD2 ASP 32 -19.707 36.806 76.997 0.00 0.00 -0.648 OA +ATOM 322 N ASP 33 -22.676 37.102 72.487 0.00 0.00 -0.345 N +ATOM 323 HN ASP 33 -21.681 37.147 72.266 1.00 0.00 0.163 HD +ATOM 324 CA ASP 33 -23.626 37.846 71.666 0.00 0.00 0.186 C +ATOM 325 C ASP 33 -24.648 36.880 71.058 0.00 0.00 0.241 C +ATOM 326 O ASP 33 -25.841 37.196 70.933 0.00 0.00 -0.271 OA +ATOM 327 CB ASP 33 -22.877 38.574 70.534 0.00 0.00 0.147 C +ATOM 328 CG ASP 33 -21.910 39.666 70.997 0.00 0.00 0.175 C +ATOM 329 OD1 ASP 33 -21.638 39.811 72.198 0.00 0.00 -0.648 OA +ATOM 330 OD2 ASP 33 -21.421 40.397 70.053 0.00 0.00 -0.648 OA +ATOM 331 N MET 34 -24.146 35.709 70.666 0.00 0.00 -0.346 N +ATOM 332 HN MET 34 -23.147 35.545 70.787 1.00 0.00 0.163 HD +ATOM 333 CA MET 34 -24.955 34.653 70.074 0.00 0.00 0.177 C +ATOM 334 C MET 34 -25.992 34.140 71.075 0.00 0.00 0.241 C +ATOM 335 O MET 34 -27.160 34.008 70.735 0.00 0.00 -0.271 OA +ATOM 336 CB MET 34 -24.057 33.504 69.579 0.00 0.00 0.045 C +ATOM 337 CG MET 34 -23.537 33.784 68.167 0.00 0.00 0.076 C +ATOM 338 SD MET 34 -22.504 32.401 67.600 0.00 0.00 -0.173 SA +ATOM 339 CE MET 34 -23.765 31.101 67.459 0.00 0.00 0.089 C +ATOM 340 N PHE 35 -25.560 33.839 72.295 0.00 0.00 -0.346 N +ATOM 341 HN PHE 35 -24.566 33.932 72.503 1.00 0.00 0.163 HD +ATOM 342 CA PHE 35 -26.464 33.378 73.350 0.00 0.00 0.180 C +ATOM 343 C PHE 35 -27.525 34.445 73.657 0.00 0.00 0.241 C +ATOM 344 O PHE 35 -28.720 34.150 73.749 0.00 0.00 -0.271 OA +ATOM 345 CB PHE 35 -25.662 33.099 74.635 0.00 0.00 0.073 C +ATOM 346 CG PHE 35 -25.254 31.644 74.825 0.00 0.00 -0.056 A +ATOM 347 CD1 PHE 35 -23.917 31.313 75.147 0.00 0.00 0.007 A +ATOM 348 CD2 PHE 35 -26.211 30.614 74.673 0.00 0.00 0.007 A +ATOM 349 CE1 PHE 35 -23.542 29.963 75.317 0.00 0.00 0.001 A +ATOM 350 CE2 PHE 35 -25.835 29.265 74.844 0.00 0.00 0.001 A +ATOM 351 CZ PHE 35 -24.500 28.939 75.167 0.00 0.00 0.000 A +ATOM 352 N GLU 36 -27.062 35.688 73.778 0.00 0.00 -0.346 N +ATOM 353 HN GLU 36 -26.058 35.827 73.666 1.00 0.00 0.163 HD +ATOM 354 CA GLU 36 -27.874 36.866 74.057 0.00 0.00 0.177 C +ATOM 355 C GLU 36 -28.947 37.091 72.982 0.00 0.00 0.241 C +ATOM 356 O GLU 36 -30.068 37.528 73.272 0.00 0.00 -0.271 OA +ATOM 357 CB GLU 36 -26.914 38.068 74.129 0.00 0.00 0.045 C +ATOM 358 CG GLU 36 -27.676 39.361 74.428 0.00 0.00 0.116 C +ATOM 359 CD GLU 36 -26.711 40.512 74.720 0.00 0.00 0.172 C +ATOM 360 OE1 GLU 36 -25.496 40.289 74.825 0.00 0.00 -0.648 OA +ATOM 361 OE2 GLU 36 -27.264 41.671 74.837 0.00 0.00 -0.648 OA +ATOM 362 N THR 37 -28.578 36.825 71.734 0.00 0.00 -0.344 N +ATOM 363 HN THR 37 -27.622 36.514 71.560 1.00 0.00 0.163 HD +ATOM 364 CA THR 37 -29.487 36.960 70.604 0.00 0.00 0.205 C +ATOM 365 C THR 37 -30.464 35.767 70.616 0.00 0.00 0.243 C +ATOM 366 O THR 37 -31.647 35.920 70.318 0.00 0.00 -0.271 OA +ATOM 367 CB THR 37 -28.694 36.993 69.284 0.00 0.00 0.146 C +ATOM 368 OG1 THR 37 -27.807 38.097 69.439 0.00 0.00 -0.393 OA +ATOM 369 CG2 THR 37 -29.566 37.380 68.087 0.00 0.00 0.042 C +ATOM 370 HOG THR 37 -27.279 38.182 68.654 0.00 0.00 0.210 HD +ATOM 371 N MET 38 -29.957 34.593 70.989 0.00 0.00 -0.346 N +ATOM 372 HN MET 38 -28.968 34.548 71.234 1.00 0.00 0.163 HD +ATOM 373 CA MET 38 -30.749 33.364 71.065 0.00 0.00 0.177 C +ATOM 374 C MET 38 -31.869 33.506 72.100 0.00 0.00 0.241 C +ATOM 375 O MET 38 -33.039 33.210 71.826 0.00 0.00 -0.271 OA +ATOM 376 CB MET 38 -29.853 32.167 71.436 0.00 0.00 0.045 C +ATOM 377 CG MET 38 -30.663 30.871 71.485 0.00 0.00 0.076 C +ATOM 378 SD MET 38 -29.655 29.534 72.189 0.00 0.00 -0.173 SA +ATOM 379 CE MET 38 -30.081 29.708 73.947 0.00 0.00 0.089 C +ATOM 380 N TYR 39 -31.492 33.952 73.291 0.00 0.00 -0.346 N +ATOM 381 HN TYR 39 -30.506 34.159 73.454 1.00 0.00 0.163 HD +ATOM 382 CA TYR 39 -32.441 34.154 74.367 0.00 0.00 0.180 C +ATOM 383 C TYR 39 -33.429 35.280 74.019 0.00 0.00 0.241 C +ATOM 384 O TYR 39 -34.623 35.160 74.267 0.00 0.00 -0.271 OA +ATOM 385 CB TYR 39 -31.683 34.472 75.670 0.00 0.00 0.073 C +ATOM 386 CG TYR 39 -30.871 33.311 76.227 0.00 0.00 -0.056 A +ATOM 387 CD1 TYR 39 -29.607 33.540 76.817 0.00 0.00 0.010 A +ATOM 388 CD2 TYR 39 -31.377 31.993 76.150 0.00 0.00 0.010 A +ATOM 389 CE1 TYR 39 -28.856 32.461 77.329 0.00 0.00 0.037 A +ATOM 390 CE2 TYR 39 -30.627 30.913 76.662 0.00 0.00 0.037 A +ATOM 391 CZ TYR 39 -29.366 31.146 77.253 0.00 0.00 0.065 A +ATOM 392 OH TYR 39 -28.643 30.098 77.748 0.00 0.00 -0.361 OA +ATOM 393 HOH TYR 39 -27.827 30.427 78.107 0.00 0.00 0.217 HD +ATOM 394 N ALA 40 -32.941 36.336 73.380 0.00 0.00 -0.346 N +ATOM 395 HN ALA 40 -31.948 36.366 73.149 1.00 0.00 0.163 HD +ATOM 396 CA ALA 40 -33.796 37.453 73.002 0.00 0.00 0.172 C +ATOM 397 C ALA 40 -34.875 37.053 72.008 0.00 0.00 0.240 C +ATOM 398 O ALA 40 -36.012 37.534 72.084 0.00 0.00 -0.271 OA +ATOM 399 CB ALA 40 -32.956 38.598 72.406 0.00 0.00 0.042 C +ATOM 400 N GLU 41 -34.512 36.199 71.057 0.00 0.00 -0.346 N +ATOM 401 HN GLU 41 -33.558 35.839 71.047 1.00 0.00 0.163 HD +ATOM 402 CA GLU 41 -35.449 35.766 70.027 0.00 0.00 0.177 C +ATOM 403 C GLU 41 -36.228 34.525 70.410 0.00 0.00 0.241 C +ATOM 404 O GLU 41 -36.950 33.965 69.591 0.00 0.00 -0.271 OA +ATOM 405 CB GLU 41 -34.721 35.541 68.689 0.00 0.00 0.045 C +ATOM 406 CG GLU 41 -33.878 36.760 68.311 0.00 0.00 0.116 C +ATOM 407 CD GLU 41 -34.742 38.020 68.229 0.00 0.00 0.172 C +ATOM 408 OE1 GLU 41 -35.741 38.040 67.494 0.00 0.00 -0.648 OA +ATOM 409 OE2 GLU 41 -34.345 39.003 68.964 0.00 0.00 -0.648 OA +ATOM 410 N GLU 42 -36.089 34.104 71.658 0.00 0.00 -0.346 N +ATOM 411 HN GLU 42 -35.469 34.612 72.289 1.00 0.00 0.163 HD +ATOM 412 CA GLU 42 -36.801 32.932 72.151 0.00 0.00 0.177 C +ATOM 413 C GLU 42 -36.454 31.654 71.369 0.00 0.00 0.240 C +ATOM 414 O GLU 42 -37.308 30.801 71.120 0.00 0.00 -0.271 OA +ATOM 415 CB GLU 42 -38.319 33.193 72.155 0.00 0.00 0.045 C +ATOM 416 CG GLU 42 -38.676 34.336 73.107 0.00 0.00 0.116 C +ATOM 417 CD GLU 42 -40.157 34.705 72.989 0.00 0.00 0.172 C +ATOM 418 OE1 GLU 42 -41.022 33.819 73.044 0.00 0.00 -0.648 OA +ATOM 419 OE2 GLU 42 -40.395 35.963 72.837 0.00 0.00 -0.648 OA +ATOM 420 N GLY 43 -35.186 31.544 70.984 0.00 0.00 -0.351 N +ATOM 421 HN GLY 43 -34.531 32.298 71.193 1.00 0.00 0.163 HD +ATOM 422 CA GLY 43 -34.720 30.374 70.274 0.00 0.00 0.225 C +ATOM 423 C GLY 43 -34.045 29.437 71.257 0.00 0.00 0.236 C +ATOM 424 O GLY 43 -33.557 29.864 72.304 0.00 0.00 -0.272 OA +ATOM 425 N ILE 44 -34.028 28.153 70.936 0.00 0.00 -0.346 N +ATOM 426 HN ILE 44 -34.462 27.850 70.064 1.00 0.00 0.163 HD +ATOM 427 CA ILE 44 -33.403 27.164 71.802 0.00 0.00 0.180 C +ATOM 428 C ILE 44 -31.950 26.857 71.335 0.00 0.00 0.241 C +ATOM 429 O ILE 44 -31.142 26.261 72.070 0.00 0.00 -0.271 OA +ATOM 430 CB ILE 44 -34.326 25.936 71.912 0.00 0.00 0.013 C +ATOM 431 CG1 ILE 44 -34.949 25.842 73.307 0.00 0.00 0.002 C +ATOM 432 CG2 ILE 44 -33.582 24.655 71.529 0.00 0.00 0.012 C +ATOM 433 CD1 ILE 44 -35.799 27.077 73.612 0.00 0.00 0.005 C +ATOM 434 N GLY 45 -31.610 27.337 70.139 0.00 0.00 -0.351 N +ATOM 435 HN GLY 45 -32.296 27.857 69.591 1.00 0.00 0.163 HD +ATOM 436 CA GLY 45 -30.277 27.129 69.607 0.00 0.00 0.225 C +ATOM 437 C GLY 45 -29.934 28.234 68.628 0.00 0.00 0.236 C +ATOM 438 O GLY 45 -30.840 28.974 68.199 0.00 0.00 -0.272 OA +ATOM 439 N LEU 46 -28.643 28.350 68.279 0.00 0.00 -0.346 N +ATOM 440 HN LEU 46 -27.965 27.710 68.693 1.00 0.00 0.163 HD +ATOM 441 CA LEU 46 -28.167 29.361 67.326 0.00 0.00 0.177 C +ATOM 442 C LEU 46 -26.792 29.000 66.718 0.00 0.00 0.241 C +ATOM 443 O LEU 46 -25.935 28.425 67.387 0.00 0.00 -0.271 OA +ATOM 444 CB LEU 46 -28.095 30.742 68.004 0.00 0.00 0.038 C +ATOM 445 CG LEU 46 -28.070 31.950 67.064 0.00 0.00 -0.020 C +ATOM 446 CD1 LEU 46 -29.465 32.238 66.505 0.00 0.00 0.009 C +ATOM 447 CD2 LEU 46 -27.467 33.172 67.759 0.00 0.00 0.009 C +ATOM 448 N ALA 47 -26.636 29.284 65.426 0.00 0.00 -0.346 N +ATOM 449 HN ALA 47 -27.424 29.691 64.922 1.00 0.00 0.163 HD +ATOM 450 CA ALA 47 -25.396 29.043 64.692 0.00 0.00 0.172 C +ATOM 451 C ALA 47 -24.879 30.410 64.203 0.00 0.00 0.240 C +ATOM 452 O ALA 47 -25.667 31.248 63.739 0.00 0.00 -0.271 OA +ATOM 453 CB ALA 47 -25.654 28.096 63.505 0.00 0.00 0.042 C +ATOM 454 N ALA 48 -23.568 30.645 64.309 0.00 0.00 -0.346 N +ATOM 455 HN ALA 48 -22.964 29.910 64.678 1.00 0.00 0.163 HD +ATOM 456 CA ALA 48 -22.964 31.930 63.911 0.00 0.00 0.172 C +ATOM 457 C ALA 48 -23.393 32.471 62.554 0.00 0.00 0.240 C +ATOM 458 O ALA 48 -23.594 33.673 62.394 0.00 0.00 -0.271 OA +ATOM 459 CB ALA 48 -21.428 31.849 63.981 0.00 0.00 0.042 C +ATOM 460 N THR 49 -23.563 31.583 61.587 0.00 0.00 -0.344 N +ATOM 461 HN THR 49 -23.399 30.597 61.792 1.00 0.00 0.163 HD +ATOM 462 CA THR 49 -23.976 31.960 60.239 0.00 0.00 0.205 C +ATOM 463 C THR 49 -25.218 32.877 60.133 0.00 0.00 0.243 C +ATOM 464 O THR 49 -25.285 33.763 59.261 0.00 0.00 -0.271 OA +ATOM 465 CB THR 49 -24.243 30.687 59.415 0.00 0.00 0.146 C +ATOM 466 OG1 THR 49 -23.053 29.918 59.568 0.00 0.00 -0.393 OA +ATOM 467 CG2 THR 49 -24.315 30.966 57.912 0.00 0.00 0.042 C +ATOM 468 HOG THR 49 -23.144 29.107 59.082 0.00 0.00 0.210 HD +ATOM 469 N GLN 50 -26.193 32.654 61.016 0.00 0.00 -0.346 N +ATOM 470 HN GLN 50 -26.059 31.923 61.715 1.00 0.00 0.163 HD +ATOM 471 CA GLN 50 -27.454 33.416 61.026 0.00 0.00 0.177 C +ATOM 472 C GLN 50 -27.231 34.853 61.420 0.00 0.00 0.241 C +ATOM 473 O GLN 50 -28.061 35.716 61.158 0.00 0.00 -0.271 OA +ATOM 474 CB GLN 50 -28.429 32.802 62.048 0.00 0.00 0.044 C +ATOM 475 CG GLN 50 -28.602 31.301 61.808 0.00 0.00 0.105 C +ATOM 476 CD GLN 50 -29.636 30.708 62.767 0.00 0.00 0.215 C +ATOM 477 OE1 GLN 50 -29.328 29.909 63.636 0.00 0.00 -0.274 OA +ATOM 478 NE2 GLN 50 -30.876 31.143 62.562 0.00 0.00 -0.370 N +ATOM 479 1HE2 GLN 50 -31.134 31.811 61.835 1.00 0.00 0.159 HD +ATOM 480 2HE2 GLN 50 -31.565 30.748 63.201 1.00 0.00 0.159 HD +ATOM 481 N VAL 51 -26.126 35.083 62.115 0.00 0.00 -0.346 N +ATOM 482 HN VAL 51 -25.510 34.300 62.332 1.00 0.00 0.163 HD +ATOM 483 CA VAL 51 -25.761 36.409 62.578 0.00 0.00 0.180 C +ATOM 484 C VAL 51 -24.754 37.106 61.640 0.00 0.00 0.241 C +ATOM 485 O VAL 51 -24.409 38.268 61.840 0.00 0.00 -0.271 OA +ATOM 486 CB VAL 51 -25.267 36.297 64.032 0.00 0.00 0.009 C +ATOM 487 CG1 VAL 51 -24.294 37.429 64.369 0.00 0.00 0.012 C +ATOM 488 CG2 VAL 51 -26.443 36.276 65.011 0.00 0.00 0.012 C +ATOM 489 N ASP 52 -24.370 36.419 60.566 0.00 0.00 -0.345 N +ATOM 490 HN ASP 52 -24.754 35.485 60.424 1.00 0.00 0.163 HD +ATOM 491 CA ASP 52 -23.421 36.941 59.578 0.00 0.00 0.186 C +ATOM 492 C ASP 52 -21.968 36.743 60.041 0.00 0.00 0.241 C +ATOM 493 O ASP 52 -21.073 37.482 59.635 0.00 0.00 -0.271 OA +ATOM 494 CB ASP 52 -23.723 38.417 59.260 0.00 0.00 0.147 C +ATOM 495 CG ASP 52 -23.149 38.924 57.935 0.00 0.00 0.175 C +ATOM 496 OD1 ASP 52 -22.859 38.136 57.022 0.00 0.00 -0.648 OA +ATOM 497 OD2 ASP 52 -23.000 40.203 57.859 0.00 0.00 -0.648 OA +ATOM 498 N ILE 53 -21.752 35.747 60.899 0.00 0.00 -0.346 N +ATOM 499 HN ILE 53 -22.546 35.195 61.223 1.00 0.00 0.163 HD +ATOM 500 CA ILE 53 -20.413 35.417 61.393 0.00 0.00 0.180 C +ATOM 501 C ILE 53 -20.102 34.016 60.875 0.00 0.00 0.241 C +ATOM 502 O ILE 53 -20.590 33.008 61.398 0.00 0.00 -0.271 OA +ATOM 503 CB ILE 53 -20.316 35.482 62.929 0.00 0.00 0.013 C +ATOM 504 CG1 ILE 53 -20.385 36.929 63.422 0.00 0.00 0.002 C +ATOM 505 CG2 ILE 53 -19.062 34.764 63.430 0.00 0.00 0.012 C +ATOM 506 CD1 ILE 53 -20.416 36.986 64.950 0.00 0.00 0.005 C +ATOM 507 N HIS 54 -19.258 33.956 59.856 0.00 0.00 -0.346 N +ATOM 508 HN HIS 54 -18.824 34.812 59.511 1.00 0.00 0.163 HD +ATOM 509 CA HIS 54 -18.945 32.695 59.228 0.00 0.00 0.182 C +ATOM 510 C HIS 54 -17.816 31.819 59.774 0.00 0.00 0.241 C +ATOM 511 O HIS 54 -16.825 31.534 59.078 0.00 0.00 -0.271 OA +ATOM 512 CB HIS 54 -18.877 32.907 57.704 0.00 0.00 0.093 C +ATOM 513 CG HIS 54 -20.110 33.552 57.118 0.00 0.00 0.028 A +ATOM 514 ND1 HIS 54 -20.218 34.916 56.914 0.00 0.00 -0.354 N +ATOM 515 HD1 HIS 54 -19.502 35.610 57.130 1.00 0.00 0.166 HD +ATOM 516 CD2 HIS 54 -21.285 33.005 56.694 0.00 0.00 0.114 A +ATOM 517 CE1 HIS 54 -21.409 35.168 56.391 0.00 0.00 0.180 A +ATOM 518 NE2 HIS 54 -22.069 33.982 56.256 0.00 0.00 -0.360 N +ATOM 519 HE2 HIS 54 -23.010 33.865 55.880 1.00 0.00 0.166 HD +ATOM 520 N GLN 55 -18.043 31.315 60.988 0.00 0.00 -0.346 N +ATOM 521 HN GLN 55 -18.911 31.575 61.456 1.00 0.00 0.163 HD +ATOM 522 CA GLN 55 -17.130 30.414 61.693 0.00 0.00 0.177 C +ATOM 523 C GLN 55 -17.979 29.314 62.332 0.00 0.00 0.241 C +ATOM 524 O GLN 55 -19.146 29.538 62.632 0.00 0.00 -0.271 OA +ATOM 525 CB GLN 55 -16.341 31.155 62.788 0.00 0.00 0.044 C +ATOM 526 CG GLN 55 -15.387 32.183 62.177 0.00 0.00 0.105 C +ATOM 527 CD GLN 55 -14.393 32.697 63.220 0.00 0.00 0.215 C +ATOM 528 OE1 GLN 55 -14.452 33.831 63.666 0.00 0.00 -0.274 OA +ATOM 529 NE2 GLN 55 -13.478 31.802 63.582 0.00 0.00 -0.370 N +ATOM 530 1HE2 GLN 55 -13.429 30.854 63.209 1.00 0.00 0.159 HD +ATOM 531 2HE2 GLN 55 -12.815 32.145 64.277 1.00 0.00 0.159 HD +ATOM 532 N ARG 56 -17.395 28.140 62.560 0.00 0.00 -0.346 N +ATOM 533 HN ARG 56 -16.407 28.025 62.332 1.00 0.00 0.163 HD +ATOM 534 CA ARG 56 -18.128 27.013 63.127 0.00 0.00 0.176 C +ATOM 535 C ARG 56 -18.429 27.085 64.600 0.00 0.00 0.241 C +ATOM 536 O ARG 56 -17.891 26.309 65.395 0.00 0.00 -0.271 OA +ATOM 537 CB ARG 56 -17.407 25.683 62.841 0.00 0.00 0.036 C +ATOM 538 CG ARG 56 -17.107 25.531 61.349 0.00 0.00 0.023 C +ATOM 539 CD ARG 56 -16.628 24.114 61.027 0.00 0.00 0.138 C +ATOM 540 NE ARG 56 -17.587 23.451 60.115 0.00 0.00 -0.227 N +ATOM 541 HE ARG 56 -17.715 23.849 59.184 1.00 0.00 0.177 HD +ATOM 542 CZ ARG 56 -18.303 22.353 60.438 0.00 0.00 0.665 C +ATOM 543 NH1 ARG 56 -18.152 21.813 61.655 0.00 0.00 -0.235 N +ATOM 544 1HH1 ARG 56 -17.506 22.226 62.328 1.00 0.00 0.174 HD +ATOM 545 2HH1 ARG 56 -18.693 20.983 61.899 1.00 0.00 0.174 HD +ATOM 546 NH2 ARG 56 -19.152 21.811 59.554 0.00 0.00 -0.235 N +ATOM 547 1HH2 ARG 56 -19.267 22.222 58.628 1.00 0.00 0.174 HD +ATOM 548 2HH2 ARG 56 -19.693 20.981 59.798 1.00 0.00 0.174 HD +ATOM 549 N ILE 57 -19.322 27.996 64.959 0.00 0.00 -0.346 N +ATOM 550 HN ILE 57 -19.737 28.597 64.247 1.00 0.00 0.163 HD +ATOM 551 CA ILE 57 -19.720 28.156 66.343 0.00 0.00 0.180 C +ATOM 552 C ILE 57 -21.233 27.945 66.444 0.00 0.00 0.241 C +ATOM 553 O ILE 57 -22.004 28.459 65.622 0.00 0.00 -0.271 OA +ATOM 554 CB ILE 57 -19.384 29.559 66.883 0.00 0.00 0.013 C +ATOM 555 CG1 ILE 57 -17.924 29.919 66.602 0.00 0.00 0.002 C +ATOM 556 CG2 ILE 57 -19.727 29.671 68.369 0.00 0.00 0.012 C +ATOM 557 CD1 ILE 57 -17.693 31.425 66.748 0.00 0.00 0.005 C +ATOM 558 N ILE 58 -21.638 27.185 67.455 0.00 0.00 -0.346 N +ATOM 559 HN ILE 58 -20.934 26.786 68.076 1.00 0.00 0.163 HD +ATOM 560 CA ILE 58 -23.050 26.893 67.720 0.00 0.00 0.180 C +ATOM 561 C ILE 58 -23.299 26.953 69.226 0.00 0.00 0.241 C +ATOM 562 O ILE 58 -22.511 26.426 70.010 0.00 0.00 -0.271 OA +ATOM 563 CB ILE 58 -23.411 25.467 67.265 0.00 0.00 0.013 C +ATOM 564 CG1 ILE 58 -23.482 25.380 65.739 0.00 0.00 0.002 C +ATOM 565 CG2 ILE 58 -24.706 24.991 67.927 0.00 0.00 0.012 C +ATOM 566 CD1 ILE 58 -23.338 23.933 65.264 0.00 0.00 0.005 C +ATOM 567 N VAL 59 -24.371 27.632 69.623 0.00 0.00 -0.346 N +ATOM 568 HN VAL 59 -24.935 28.118 68.925 1.00 0.00 0.163 HD +ATOM 569 CA VAL 59 -24.768 27.704 71.034 0.00 0.00 0.180 C +ATOM 570 C VAL 59 -26.176 27.072 71.120 0.00 0.00 0.241 C +ATOM 571 O VAL 59 -26.996 27.230 70.215 0.00 0.00 -0.271 OA +ATOM 572 CB VAL 59 -24.738 29.142 71.585 0.00 0.00 0.009 C +ATOM 573 CG1 VAL 59 -23.345 29.757 71.437 0.00 0.00 0.012 C +ATOM 574 CG2 VAL 59 -25.797 30.012 70.905 0.00 0.00 0.012 C +ATOM 575 N ILE 60 -26.409 26.306 72.172 0.00 0.00 -0.346 N +ATOM 576 HN ILE 60 -25.672 26.201 72.870 1.00 0.00 0.163 HD +ATOM 577 CA ILE 60 -27.667 25.605 72.382 0.00 0.00 0.180 C +ATOM 578 C ILE 60 -28.020 25.650 73.870 0.00 0.00 0.241 C +ATOM 579 O ILE 60 -27.162 25.404 74.724 0.00 0.00 -0.271 OA +ATOM 580 CB ILE 60 -27.523 24.119 72.006 0.00 0.00 0.013 C +ATOM 581 CG1 ILE 60 -27.531 23.935 70.487 0.00 0.00 0.002 C +ATOM 582 CG2 ILE 60 -28.596 23.272 72.692 0.00 0.00 0.012 C +ATOM 583 CD1 ILE 60 -27.204 22.489 70.108 0.00 0.00 0.005 C +ATOM 584 N ASP 61 -29.275 25.976 74.179 0.00 0.00 -0.345 N +ATOM 585 HN ASP 61 -29.918 26.235 73.431 1.00 0.00 0.163 HD +ATOM 586 CA ASP 61 -29.754 25.972 75.558 0.00 0.00 0.186 C +ATOM 587 C ASP 61 -31.226 25.582 75.548 0.00 0.00 0.241 C +ATOM 588 O ASP 61 -32.097 26.333 75.078 0.00 0.00 -0.271 OA +ATOM 589 CB ASP 61 -29.566 27.317 76.284 0.00 0.00 0.147 C +ATOM 590 CG ASP 61 -29.884 27.294 77.780 0.00 0.00 0.175 C +ATOM 591 OD1 ASP 61 -30.090 26.224 78.373 0.00 0.00 -0.648 OA +ATOM 592 OD2 ASP 61 -29.918 28.452 78.349 0.00 0.00 -0.648 OA +ATOM 593 N VAL 62 -31.471 24.399 76.097 0.00 0.00 -0.346 N +ATOM 594 HN VAL 62 -30.689 23.886 76.503 1.00 0.00 0.163 HD +ATOM 595 CA VAL 62 -32.789 23.795 76.152 0.00 0.00 0.180 C +ATOM 596 C VAL 62 -33.504 23.907 77.512 0.00 0.00 0.241 C +ATOM 597 O VAL 62 -34.710 23.684 77.605 0.00 0.00 -0.271 OA +ATOM 598 CB VAL 62 -32.664 22.319 75.732 0.00 0.00 0.009 C +ATOM 599 CG1 VAL 62 -34.043 21.689 75.525 0.00 0.00 0.012 C +ATOM 600 CG2 VAL 62 -31.803 22.178 74.475 0.00 0.00 0.012 C +ATOM 601 N SER 63 -32.767 24.294 78.548 0.00 0.00 -0.344 N +ATOM 602 HN SER 63 -31.782 24.512 78.399 1.00 0.00 0.163 HD +ATOM 603 CA SER 63 -33.322 24.418 79.895 0.00 0.00 0.200 C +ATOM 604 C SER 63 -34.392 25.503 80.034 0.00 0.00 0.243 C +ATOM 605 O SER 63 -34.217 26.612 79.554 0.00 0.00 -0.271 OA +ATOM 606 CB SER 63 -32.190 24.693 80.903 0.00 0.00 0.199 C +ATOM 607 OG SER 63 -31.607 25.979 80.712 0.00 0.00 -0.398 OA +ATOM 608 HOG SER 63 -30.917 26.104 81.353 0.00 0.00 0.209 HD +ATOM 609 N GLU 64 -35.471 25.182 80.739 0.00 0.00 -0.346 N +ATOM 610 HN GLU 64 -35.533 24.242 81.130 1.00 0.00 0.163 HD +ATOM 611 CA GLU 64 -36.576 26.113 80.983 0.00 0.00 0.177 C +ATOM 612 C GLU 64 -36.076 27.378 81.672 0.00 0.00 0.241 C +ATOM 613 O GLU 64 -36.529 28.498 81.416 0.00 0.00 -0.271 OA +ATOM 614 CB GLU 64 -37.602 25.437 81.911 0.00 0.00 0.045 C +ATOM 615 CG GLU 64 -38.481 26.478 82.608 0.00 0.00 0.116 C +ATOM 616 CD GLU 64 -39.277 25.846 83.751 0.00 0.00 0.172 C +ATOM 617 OE1 GLU 64 -38.741 25.008 84.492 0.00 0.00 -0.648 OA +ATOM 618 OE2 GLU 64 -40.496 26.255 83.858 0.00 0.00 -0.648 OA +ATOM 619 N ASN 65 -35.151 27.150 82.584 0.00 0.00 -0.346 N +ATOM 620 HN ASN 65 -34.840 26.188 82.721 1.00 0.00 0.163 HD +ATOM 621 CA ASN 65 -34.551 28.182 83.402 0.00 0.00 0.185 C +ATOM 622 C ASN 65 -33.387 28.946 82.752 0.00 0.00 0.241 C +ATOM 623 O ASN 65 -32.827 29.858 83.368 0.00 0.00 -0.271 OA +ATOM 624 CB ASN 65 -34.115 27.534 84.729 0.00 0.00 0.137 C +ATOM 625 CG ASN 65 -33.869 26.034 84.552 0.00 0.00 0.217 C +ATOM 626 OD1 ASN 65 -34.670 25.198 84.937 0.00 0.00 -0.274 OA +ATOM 627 ND2 ASN 65 -32.720 25.742 83.951 0.00 0.00 -0.370 N +ATOM 628 1HD2 ASN 65 -32.556 24.742 83.833 1.00 0.00 0.159 HD +ATOM 629 2HD2 ASN 65 -32.050 26.441 83.629 1.00 0.00 0.159 HD +ATOM 630 N ARG 66 -33.074 28.619 81.496 0.00 0.00 -0.346 N +ATOM 631 HN ARG 66 -33.628 27.902 81.027 1.00 0.00 0.163 HD +ATOM 632 CA ARG 66 -31.967 29.244 80.757 0.00 0.00 0.176 C +ATOM 633 C ARG 66 -30.624 29.179 81.507 0.00 0.00 0.241 C +ATOM 634 O ARG 66 -29.906 30.168 81.588 0.00 0.00 -0.271 OA +ATOM 635 CB ARG 66 -32.285 30.708 80.399 0.00 0.00 0.036 C +ATOM 636 CG ARG 66 -33.422 30.788 79.378 0.00 0.00 0.023 C +ATOM 637 CD ARG 66 -33.649 32.231 78.923 0.00 0.00 0.138 C +ATOM 638 NE ARG 66 -34.921 32.331 78.174 0.00 0.00 -0.227 N +ATOM 639 HE ARG 66 -35.371 31.465 77.877 1.00 0.00 0.177 HD +ATOM 640 CZ ARG 66 -35.524 33.498 77.859 0.00 0.00 0.665 C +ATOM 641 NH1 ARG 66 -34.952 34.648 78.238 0.00 0.00 -0.235 N +ATOM 642 1HH1 ARG 66 -34.074 34.643 78.757 1.00 0.00 0.174 HD +ATOM 643 2HH1 ARG 66 -35.407 35.529 78.000 1.00 0.00 0.174 HD +ATOM 644 NH2 ARG 66 -36.677 33.504 77.177 0.00 0.00 -0.235 N +ATOM 645 1HH2 ARG 66 -37.113 32.628 76.888 1.00 0.00 0.174 HD +ATOM 646 2HH2 ARG 66 -37.132 34.385 76.939 1.00 0.00 0.174 HD +ATOM 647 N ASP 67 -30.270 28.006 82.023 0.00 0.00 -0.346 N +ATOM 648 HN ASP 67 -30.883 27.200 81.902 1.00 0.00 0.163 HD +ATOM 649 CA ASP 67 -29.017 27.852 82.762 0.00 0.00 0.186 C +ATOM 650 C ASP 67 -28.300 26.528 82.530 0.00 0.00 0.241 C +ATOM 651 O ASP 67 -27.741 25.936 83.457 0.00 0.00 -0.271 OA +ATOM 652 CB ASP 67 -29.240 28.061 84.271 0.00 0.00 0.147 C +ATOM 653 CG ASP 67 -30.355 27.211 84.884 0.00 0.00 0.175 C +ATOM 654 OD1 ASP 67 -30.300 25.972 84.860 0.00 0.00 -0.648 OA +ATOM 655 OD2 ASP 67 -31.324 27.880 85.410 0.00 0.00 -0.648 OA +ATOM 656 N GLU 68 -28.350 26.052 81.294 0.00 0.00 -0.346 N +ATOM 657 HN GLU 68 -28.868 26.575 80.587 1.00 0.00 0.163 HD +ATOM 658 CA GLU 68 -27.694 24.812 80.907 0.00 0.00 0.177 C +ATOM 659 C GLU 68 -27.190 25.084 79.499 0.00 0.00 0.241 C +ATOM 660 O GLU 68 -27.811 24.686 78.512 0.00 0.00 -0.271 OA +ATOM 661 CB GLU 68 -28.690 23.638 80.924 0.00 0.00 0.045 C +ATOM 662 CG GLU 68 -29.195 23.368 82.343 0.00 0.00 0.116 C +ATOM 663 CD GLU 68 -30.185 22.201 82.360 0.00 0.00 0.172 C +ATOM 664 OE1 GLU 68 -30.473 21.617 81.305 0.00 0.00 -0.648 OA +ATOM 665 OE2 GLU 68 -30.660 21.906 83.522 0.00 0.00 -0.648 OA +ATOM 666 N ARG 69 -26.115 25.864 79.426 0.00 0.00 -0.346 N +ATOM 667 HN ARG 69 -25.702 26.206 80.294 1.00 0.00 0.163 HD +ATOM 668 CA ARG 69 -25.500 26.252 78.163 0.00 0.00 0.176 C +ATOM 669 C ARG 69 -24.633 25.149 77.536 0.00 0.00 0.241 C +ATOM 670 O ARG 69 -23.955 24.388 78.233 0.00 0.00 -0.271 OA +ATOM 671 CB ARG 69 -24.692 27.548 78.361 0.00 0.00 0.036 C +ATOM 672 CG ARG 69 -25.610 28.715 78.730 0.00 0.00 0.023 C +ATOM 673 CD ARG 69 -24.806 30.002 78.931 0.00 0.00 0.138 C +ATOM 674 NE ARG 69 -25.632 31.176 78.572 0.00 0.00 -0.227 N +ATOM 675 HE ARG 69 -26.646 31.082 78.627 1.00 0.00 0.177 HD +ATOM 676 CZ ARG 69 -25.128 32.364 78.176 0.00 0.00 0.665 C +ATOM 677 NH1 ARG 69 -23.798 32.510 78.095 0.00 0.00 -0.235 N +ATOM 678 1HH1 ARG 69 -23.177 31.736 78.330 1.00 0.00 0.174 HD +ATOM 679 2HH1 ARG 69 -23.417 33.408 77.796 1.00 0.00 0.174 HD +ATOM 680 NH2 ARG 69 -25.944 33.381 77.867 0.00 0.00 -0.235 N +ATOM 681 1HH2 ARG 69 -26.956 33.270 77.929 1.00 0.00 0.174 HD +ATOM 682 2HH2 ARG 69 -25.563 34.279 77.568 1.00 0.00 0.174 HD +ATOM 683 N LEU 70 -24.734 25.022 76.219 0.00 0.00 -0.346 N +ATOM 684 HN LEU 70 -25.371 25.639 75.715 1.00 0.00 0.163 HD +ATOM 685 CA LEU 70 -23.970 24.035 75.462 0.00 0.00 0.177 C +ATOM 686 C LEU 70 -23.327 24.803 74.315 0.00 0.00 0.241 C +ATOM 687 O LEU 70 -24.016 25.513 73.571 0.00 0.00 -0.271 OA +ATOM 688 CB LEU 70 -24.898 22.938 74.906 0.00 0.00 0.038 C +ATOM 689 CG LEU 70 -24.216 21.820 74.115 0.00 0.00 -0.020 C +ATOM 690 CD1 LEU 70 -23.362 20.943 75.033 0.00 0.00 0.009 C +ATOM 691 CD2 LEU 70 -25.241 21.001 73.330 0.00 0.00 0.009 C +ATOM 692 N VAL 71 -22.002 24.709 74.226 0.00 0.00 -0.346 N +ATOM 693 HN VAL 71 -21.504 24.143 74.912 1.00 0.00 0.163 HD +ATOM 694 CA VAL 71 -21.234 25.386 73.183 0.00 0.00 0.180 C +ATOM 695 C VAL 71 -20.555 24.345 72.289 0.00 0.00 0.241 C +ATOM 696 O VAL 71 -19.862 23.448 72.778 0.00 0.00 -0.271 OA +ATOM 697 CB VAL 71 -20.175 26.324 73.791 0.00 0.00 0.009 C +ATOM 698 CG1 VAL 71 -19.304 26.949 72.699 0.00 0.00 0.012 C +ATOM 699 CG2 VAL 71 -20.830 27.404 74.655 0.00 0.00 0.012 C +ATOM 700 N LEU 72 -20.797 24.443 70.988 0.00 0.00 -0.346 N +ATOM 701 HN LEU 72 -21.407 25.189 70.653 1.00 0.00 0.163 HD +ATOM 702 CA LEU 72 -20.219 23.519 70.024 0.00 0.00 0.177 C +ATOM 703 C LEU 72 -19.393 24.288 69.002 0.00 0.00 0.241 C +ATOM 704 O LEU 72 -19.945 24.942 68.097 0.00 0.00 -0.271 OA +ATOM 705 CB LEU 72 -21.305 22.727 69.272 0.00 0.00 0.038 C +ATOM 706 CG LEU 72 -22.192 21.824 70.131 0.00 0.00 -0.020 C +ATOM 707 CD1 LEU 72 -23.054 20.911 69.257 0.00 0.00 0.009 C +ATOM 708 CD2 LEU 72 -21.357 21.032 71.138 0.00 0.00 0.009 C +ATOM 709 N ILE 73 -18.074 24.239 69.191 0.00 0.00 -0.346 N +ATOM 710 HN ILE 73 -17.718 23.724 69.996 1.00 0.00 0.163 HD +ATOM 711 CA ILE 73 -17.115 24.887 68.301 0.00 0.00 0.180 C +ATOM 712 C ILE 73 -16.440 23.758 67.523 0.00 0.00 0.241 C +ATOM 713 O ILE 73 -16.048 22.734 68.085 0.00 0.00 -0.271 OA +ATOM 714 CB ILE 73 -16.117 25.757 69.087 0.00 0.00 0.013 C +ATOM 715 CG1 ILE 73 -16.754 27.084 69.504 0.00 0.00 0.002 C +ATOM 716 CG2 ILE 73 -14.826 25.965 68.292 0.00 0.00 0.012 C +ATOM 717 CD1 ILE 73 -15.766 27.942 70.296 0.00 0.00 0.005 C +ATOM 718 N ASN 74 -16.363 23.924 66.217 0.00 0.00 -0.346 N +ATOM 719 HN ASN 74 -16.710 24.790 65.804 1.00 0.00 0.163 HD +ATOM 720 CA ASN 74 -15.794 22.900 65.351 0.00 0.00 0.185 C +ATOM 721 C ASN 74 -16.402 21.535 65.657 0.00 0.00 0.243 C +ATOM 722 O ASN 74 -15.694 20.622 66.100 0.00 0.00 -0.271 OA +ATOM 723 CB ASN 74 -14.263 22.819 65.494 0.00 0.00 0.137 C +ATOM 724 CG ASN 74 -13.596 24.100 64.988 0.00 0.00 0.217 C +ATOM 725 OD1 ASN 74 -14.182 24.892 64.269 0.00 0.00 -0.274 OA +ATOM 726 ND2 ASN 74 -12.342 24.256 65.402 0.00 0.00 -0.370 N +ATOM 727 1HD2 ASN 74 -11.897 25.110 65.065 1.00 0.00 0.159 HD +ATOM 728 2HD2 ASN 74 -11.852 23.594 66.003 1.00 0.00 0.159 HD +ATOM 729 N PRO 75 -17.743 21.405 65.529 0.00 0.00 -0.337 N +ATOM 730 CA PRO 75 -18.369 20.103 65.801 0.00 0.00 0.179 C +ATOM 731 C PRO 75 -18.171 19.143 64.622 0.00 0.00 0.241 C +ATOM 732 O PRO 75 -18.089 19.548 63.475 0.00 0.00 -0.271 OA +ATOM 733 CB PRO 75 -19.771 20.383 66.160 0.00 0.00 0.037 C +ATOM 734 CG PRO 75 -20.064 21.776 65.626 0.00 0.00 0.022 C +ATOM 735 CD PRO 75 -18.736 22.432 65.283 0.00 0.00 0.127 C +ATOM 736 N GLU 76 -18.149 17.862 64.918 0.00 0.00 -0.346 N +ATOM 737 HN GLU 76 -18.283 17.581 65.889 1.00 0.00 0.163 HD +ATOM 738 CA GLU 76 -17.943 16.839 63.923 0.00 0.00 0.177 C +ATOM 739 C GLU 76 -18.879 15.709 64.287 0.00 0.00 0.241 C +ATOM 740 O GLU 76 -18.950 15.317 65.448 0.00 0.00 -0.271 OA +ATOM 741 CB GLU 76 -16.496 16.323 64.027 0.00 0.00 0.045 C +ATOM 742 CG GLU 76 -16.166 15.376 62.871 0.00 0.00 0.116 C +ATOM 743 CD GLU 76 -14.923 14.541 63.184 0.00 0.00 0.172 C +ATOM 744 OE1 GLU 76 -14.089 14.954 64.004 0.00 0.00 -0.648 OA +ATOM 745 OE2 GLU 76 -14.840 13.426 62.542 0.00 0.00 -0.648 OA +ATOM 746 N LEU 77 -19.622 15.205 63.309 0.00 0.00 -0.346 N +ATOM 747 HN LEU 77 -19.546 15.596 62.370 1.00 0.00 0.163 HD +ATOM 748 CA LEU 77 -20.547 14.099 63.553 0.00 0.00 0.177 C +ATOM 749 C LEU 77 -19.771 12.794 63.491 0.00 0.00 0.241 C +ATOM 750 O LEU 77 -19.162 12.492 62.475 0.00 0.00 -0.271 OA +ATOM 751 CB LEU 77 -21.663 14.076 62.492 0.00 0.00 0.038 C +ATOM 752 CG LEU 77 -22.646 12.907 62.578 0.00 0.00 -0.020 C +ATOM 753 CD1 LEU 77 -23.457 12.966 63.874 0.00 0.00 0.009 C +ATOM 754 CD2 LEU 77 -23.546 12.855 61.342 0.00 0.00 0.009 C +ATOM 755 N LEU 78 -19.771 12.028 64.575 0.00 0.00 -0.346 N +ATOM 756 HN LEU 78 -20.271 12.328 65.412 1.00 0.00 0.163 HD +ATOM 757 CA LEU 78 -19.056 10.759 64.569 0.00 0.00 0.177 C +ATOM 758 C LEU 78 -19.949 9.623 64.071 0.00 0.00 0.241 C +ATOM 759 O LEU 78 -19.504 8.776 63.304 0.00 0.00 -0.271 OA +ATOM 760 CB LEU 78 -18.489 10.434 65.964 0.00 0.00 0.038 C +ATOM 761 CG LEU 78 -17.677 11.545 66.633 0.00 0.00 -0.020 C +ATOM 762 CD1 LEU 78 -17.123 11.082 67.982 0.00 0.00 0.009 C +ATOM 763 CD2 LEU 78 -16.572 12.052 65.703 0.00 0.00 0.009 C +ATOM 764 N GLU 79 -21.207 9.608 64.512 0.00 0.00 -0.346 N +ATOM 765 HN GLU 79 -21.513 10.339 65.154 1.00 0.00 0.163 HD +ATOM 766 CA GLU 79 -22.164 8.579 64.107 0.00 0.00 0.177 C +ATOM 767 C GLU 79 -23.598 9.074 64.262 0.00 0.00 0.241 C +ATOM 768 O GLU 79 -23.833 10.086 64.915 0.00 0.00 -0.271 OA +ATOM 769 CB GLU 79 -21.956 7.293 64.928 0.00 0.00 0.045 C +ATOM 770 CG GLU 79 -21.633 7.620 66.387 0.00 0.00 0.116 C +ATOM 771 CD GLU 79 -21.078 6.393 67.114 0.00 0.00 0.172 C +ATOM 772 OE1 GLU 79 -21.666 5.943 68.108 0.00 0.00 -0.648 OA +ATOM 773 OE2 GLU 79 -19.996 5.904 66.610 0.00 0.00 -0.648 OA +ATOM 774 N LYS 80 -24.536 8.382 63.621 0.00 0.00 -0.346 N +ATOM 775 HN LYS 80 -24.252 7.572 63.070 1.00 0.00 0.163 HD +ATOM 776 CA LYS 80 -25.958 8.729 63.670 0.00 0.00 0.176 C +ATOM 777 C LYS 80 -26.799 7.479 63.437 0.00 0.00 0.241 C +ATOM 778 O LYS 80 -26.318 6.516 62.842 0.00 0.00 -0.271 OA +ATOM 779 CB LYS 80 -26.311 9.791 62.612 0.00 0.00 0.035 C +ATOM 780 CG LYS 80 -26.094 9.249 61.198 0.00 0.00 0.004 C +ATOM 781 CD LYS 80 -26.362 10.331 60.149 0.00 0.00 0.027 C +ATOM 782 CE LYS 80 -26.673 9.708 58.787 0.00 0.00 0.229 C +ATOM 783 NZ LYS 80 -27.052 10.750 57.818 0.00 0.00 -0.079 N +ATOM 784 HZ1 LYS 80 -27.259 10.335 56.910 1.00 0.00 0.274 HD +ATOM 785 HZ2 LYS 80 -26.342 11.479 57.748 1.00 0.00 0.274 HD +ATOM 786 HZ3 LYS 80 -27.825 11.322 58.159 1.00 0.00 0.274 HD +ATOM 787 N SER 81 -28.043 7.484 63.920 0.00 0.00 -0.344 N +ATOM 788 HN SER 81 -28.379 8.302 64.428 1.00 0.00 0.163 HD +ATOM 789 CA SER 81 -28.935 6.336 63.734 0.00 0.00 0.200 C +ATOM 790 C SER 81 -30.416 6.700 63.833 0.00 0.00 0.242 C +ATOM 791 O SER 81 -30.784 7.646 64.537 0.00 0.00 -0.271 OA +ATOM 792 CB SER 81 -28.602 5.209 64.729 0.00 0.00 0.199 C +ATOM 793 OG SER 81 -28.818 5.608 66.080 0.00 0.00 -0.398 OA +ATOM 794 HOG SER 81 -28.601 4.883 66.655 0.00 0.00 0.209 HD +ATOM 795 N GLY 82 -31.244 5.936 63.119 0.00 0.00 -0.350 N +ATOM 796 HN GLY 82 -30.849 5.178 62.562 1.00 0.00 0.163 HD +ATOM 797 CA GLY 82 -32.697 6.136 63.098 0.00 0.00 0.225 C +ATOM 798 C GLY 82 -33.269 7.383 62.423 0.00 0.00 0.236 C +ATOM 799 O GLY 82 -32.528 8.223 61.892 0.00 0.00 -0.272 OA +ATOM 800 N GLU 83 -34.603 7.469 62.365 0.00 0.00 -0.346 N +ATOM 801 HN GLU 83 -35.167 6.699 62.726 1.00 0.00 0.163 HD +ATOM 802 CA GLU 83 -35.280 8.649 61.792 0.00 0.00 0.177 C +ATOM 803 C GLU 83 -36.300 9.160 62.806 0.00 0.00 0.241 C +ATOM 804 O GLU 83 -36.808 8.397 63.635 0.00 0.00 -0.271 OA +ATOM 805 CB GLU 83 -36.014 8.376 60.466 0.00 0.00 0.045 C +ATOM 806 CG GLU 83 -35.522 7.077 59.824 0.00 0.00 0.116 C +ATOM 807 CD GLU 83 -35.955 5.862 60.646 0.00 0.00 0.172 C +ATOM 808 OE1 GLU 83 -37.142 5.731 60.982 0.00 0.00 -0.648 OA +ATOM 809 OE2 GLU 83 -35.010 5.033 60.935 0.00 0.00 -0.648 OA +ATOM 810 N THR 84 -36.634 10.436 62.699 0.00 0.00 -0.344 N +ATOM 811 HN THR 84 -36.229 10.993 61.947 1.00 0.00 0.163 HD +ATOM 812 CA THR 84 -37.554 11.061 63.616 0.00 0.00 0.205 C +ATOM 813 C THR 84 -37.892 12.387 62.992 0.00 0.00 0.243 C +ATOM 814 O THR 84 -37.460 12.660 61.871 0.00 0.00 -0.271 OA +ATOM 815 CB THR 84 -36.910 11.254 65.001 0.00 0.00 0.146 C +ATOM 816 OG1 THR 84 -37.998 11.631 65.841 0.00 0.00 -0.393 OA +ATOM 817 CG2 THR 84 -35.970 12.461 65.047 0.00 0.00 0.042 C +ATOM 818 HOG THR 84 -37.674 11.769 66.723 0.00 0.00 0.210 HD +ATOM 819 N GLY 85 -38.661 13.203 63.704 0.00 0.00 -0.350 N +ATOM 820 HN GLY 85 -38.975 12.922 64.633 1.00 0.00 0.163 HD +ATOM 821 CA GLY 85 -39.055 14.486 63.171 0.00 0.00 0.225 C +ATOM 822 C GLY 85 -40.122 15.183 63.989 0.00 0.00 0.236 C +ATOM 823 O GLY 85 -41.127 14.572 64.410 0.00 0.00 -0.272 OA +ATOM 824 N ILE 86 -39.883 16.462 64.250 0.00 0.00 -0.346 N +ATOM 825 HN ILE 86 -39.008 16.877 63.929 1.00 0.00 0.163 HD +ATOM 826 CA ILE 86 -40.832 17.292 64.982 0.00 0.00 0.180 C +ATOM 827 C ILE 86 -41.052 18.502 64.094 0.00 0.00 0.241 C +ATOM 828 O ILE 86 -40.422 18.608 63.024 0.00 0.00 -0.271 OA +ATOM 829 CB ILE 86 -40.311 17.728 66.364 0.00 0.00 0.013 C +ATOM 830 CG1 ILE 86 -39.010 18.523 66.234 0.00 0.00 0.002 C +ATOM 831 CG2 ILE 86 -40.158 16.525 67.297 0.00 0.00 0.012 C +ATOM 832 CD1 ILE 86 -38.500 18.967 67.607 0.00 0.00 0.005 C +ATOM 833 N GLU 87 -41.997 19.362 64.463 0.00 0.00 -0.346 N +ATOM 834 HN GLU 87 -42.543 19.183 65.306 1.00 0.00 0.163 HD +ATOM 835 CA GLU 87 -42.259 20.563 63.669 0.00 0.00 0.177 C +ATOM 836 C GLU 87 -41.224 21.557 64.144 0.00 0.00 0.241 C +ATOM 837 O GLU 87 -41.158 21.846 65.332 0.00 0.00 -0.271 OA +ATOM 838 CB GLU 87 -43.685 21.105 63.880 0.00 0.00 0.045 C +ATOM 839 CG GLU 87 -44.725 20.168 63.260 0.00 0.00 0.116 C +ATOM 840 CD GLU 87 -46.103 20.831 63.217 0.00 0.00 0.172 C +ATOM 841 OE1 GLU 87 -46.206 22.058 63.365 0.00 0.00 -0.648 OA +ATOM 842 OE2 GLU 87 -47.090 20.024 63.021 0.00 0.00 -0.648 OA +ATOM 843 N GLU 88 -40.358 21.990 63.232 0.00 0.00 -0.346 N +ATOM 844 HN GLU 88 -40.457 21.668 62.269 1.00 0.00 0.163 HD +ATOM 845 CA GLU 88 -39.270 22.909 63.557 0.00 0.00 0.177 C +ATOM 846 C GLU 88 -39.521 24.262 62.975 0.00 0.00 0.240 C +ATOM 847 O GLU 88 -40.094 24.395 61.898 0.00 0.00 -0.271 OA +ATOM 848 CB GLU 88 -37.934 22.424 62.964 0.00 0.00 0.045 C +ATOM 849 CG GLU 88 -37.593 21.017 63.458 0.00 0.00 0.116 C +ATOM 850 CD GLU 88 -36.268 20.534 62.865 0.00 0.00 0.172 C +ATOM 851 OE1 GLU 88 -35.450 21.354 62.424 0.00 0.00 -0.648 OA +ATOM 852 OE2 GLU 88 -36.102 19.254 62.873 0.00 0.00 -0.648 OA +ATOM 853 N GLY 89 -39.110 25.271 63.713 0.00 0.00 -0.351 N +ATOM 854 HN GLY 89 -38.707 25.098 64.634 1.00 0.00 0.163 HD +ATOM 855 CA GLY 89 -39.229 26.621 63.222 0.00 0.00 0.225 C +ATOM 856 C GLY 89 -37.794 27.111 63.214 0.00 0.00 0.236 C +ATOM 857 O GLY 89 -36.928 26.541 63.898 0.00 0.00 -0.272 OA +ATOM 858 N CYM 90 -37.526 28.158 62.455 0.00 0.00 -0.346 N +ATOM 859 HN CYM 90 -38.273 28.590 61.910 1.00 0.00 0.163 HD +ATOM 860 CA CYM 90 -36.179 28.703 62.386 0.00 0.00 0.186 C +ATOM 861 C CYM 90 -36.254 30.222 62.482 0.00 0.00 0.241 C +ATOM 862 O CYM 90 -37.153 30.835 61.900 0.00 0.00 -0.271 OA +ATOM 863 CB CYM 90 -35.505 28.265 61.073 0.00 0.00 0.120 C +ATOM 864 SG CYM 90 -33.933 29.100 60.707 0.00 0.00 -0.095 SA +ATOM 865 N LEU 91 -35.341 30.826 63.242 0.00 0.00 -0.346 N +ATOM 866 HN LEU 91 -34.648 30.264 63.736 1.00 0.00 0.163 HD +ATOM 867 CA LEU 91 -35.317 32.287 63.380 0.00 0.00 0.177 C +ATOM 868 C LEU 91 -35.084 32.953 62.006 0.00 0.00 0.241 C +ATOM 869 O LEU 91 -35.606 34.032 61.728 0.00 0.00 -0.271 OA +ATOM 870 CB LEU 91 -34.261 32.719 64.414 0.00 0.00 0.038 C +ATOM 871 CG LEU 91 -34.478 32.220 65.844 0.00 0.00 -0.020 C +ATOM 872 CD1 LEU 91 -33.250 32.495 66.713 0.00 0.00 0.009 C +ATOM 873 CD2 LEU 91 -35.752 32.816 66.446 0.00 0.00 0.009 C +ATOM 874 N SER 92 -34.364 32.270 61.119 0.00 0.00 -0.344 N +ATOM 875 HN SER 92 -33.995 31.355 61.377 1.00 0.00 0.163 HD +ATOM 876 CA SER 92 -34.087 32.801 59.779 0.00 0.00 0.200 C +ATOM 877 C SER 92 -35.284 32.674 58.816 0.00 0.00 0.243 C +ATOM 878 O SER 92 -35.308 33.292 57.746 0.00 0.00 -0.271 OA +ATOM 879 CB SER 92 -32.826 32.130 59.205 0.00 0.00 0.199 C +ATOM 880 OG SER 92 -31.686 32.336 60.035 0.00 0.00 -0.398 OA +ATOM 881 HOG SER 92 -30.935 31.906 59.643 0.00 0.00 0.209 HD +ATOM 882 N ILE 93 -36.274 31.867 59.195 0.00 0.00 -0.346 N +ATOM 883 HN ILE 93 -36.181 31.355 60.072 1.00 0.00 0.163 HD +ATOM 884 CA ILE 93 -37.492 31.686 58.400 0.00 0.00 0.181 C +ATOM 885 C ILE 93 -38.566 32.129 59.418 0.00 0.00 0.247 C +ATOM 886 O ILE 93 -39.492 31.370 59.746 0.00 0.00 -0.271 OA +ATOM 887 CB ILE 93 -37.635 30.217 57.960 0.00 0.00 0.013 C +ATOM 888 CG1 ILE 93 -36.395 29.752 57.193 0.00 0.00 0.002 C +ATOM 889 CG2 ILE 93 -38.919 30.008 57.155 0.00 0.00 0.012 C +ATOM 890 CD1 ILE 93 -36.475 28.256 56.878 0.00 0.00 0.005 C +ATOM 891 N PRO 94 -38.499 33.422 59.821 0.00 0.00 -0.311 N +ATOM 892 CA PRO 94 -39.276 34.225 60.766 0.00 0.00 0.101 C +ATOM 893 C PRO 94 -40.304 33.549 61.670 0.00 0.00 0.268 C +ATOM 894 O PRO 94 -40.077 33.409 62.875 0.00 0.00 -0.266 OA +ATOM 895 CB PRO 94 -39.058 35.585 60.572 0.00 0.00 0.010 C +ATOM 896 CG PRO 94 -38.540 35.674 59.145 0.00 0.00 0.050 C +ATOM 897 CD PRO 94 -38.132 34.277 58.709 0.00 0.00 0.136 C +ATOM 898 N GLU 95 -41.425 33.126 61.092 0.00 0.00 -0.342 N +ATOM 899 HN GLU 95 -41.526 33.233 60.083 1.00 0.00 0.163 HD +ATOM 900 CA GLU 95 -42.517 32.515 61.844 0.00 0.00 0.177 C +ATOM 901 C GLU 95 -43.183 31.362 61.091 0.00 0.00 0.241 C +ATOM 902 O GLU 95 -44.405 31.346 60.909 0.00 0.00 -0.271 OA +ATOM 903 CB GLU 95 -43.570 33.595 62.152 0.00 0.00 0.045 C +ATOM 904 CG GLU 95 -42.946 34.770 62.908 0.00 0.00 0.116 C +ATOM 905 CD GLU 95 -43.884 35.979 62.914 0.00 0.00 0.172 C +ATOM 906 OE1 GLU 95 -44.156 36.558 61.852 0.00 0.00 -0.648 OA +ATOM 907 OE2 GLU 95 -44.338 36.311 64.074 0.00 0.00 -0.648 OA +ATOM 908 N GLN 96 -42.396 30.375 60.691 0.00 0.00 -0.346 N +ATOM 909 HN GLN 96 -41.398 30.410 60.901 1.00 0.00 0.163 HD +ATOM 910 CA GLN 96 -42.934 29.244 59.958 0.00 0.00 0.177 C +ATOM 911 C GLN 96 -42.446 27.975 60.640 0.00 0.00 0.241 C +ATOM 912 O GLN 96 -41.394 27.982 61.280 0.00 0.00 -0.271 OA +ATOM 913 CB GLN 96 -42.470 29.306 58.491 0.00 0.00 0.044 C +ATOM 914 CG GLN 96 -43.659 29.500 57.548 0.00 0.00 0.105 C +ATOM 915 CD GLN 96 -44.346 30.844 57.801 0.00 0.00 0.215 C +ATOM 916 OE1 GLN 96 -43.720 31.889 57.864 0.00 0.00 -0.274 OA +ATOM 917 NE2 GLN 96 -45.666 30.758 57.943 0.00 0.00 -0.370 N +ATOM 918 1HE2 GLN 96 -46.189 29.884 57.890 1.00 0.00 0.159 HD +ATOM 919 2HE2 GLN 96 -46.124 31.654 58.112 1.00 0.00 0.159 HD +ATOM 920 N ARG 97 -43.231 26.906 60.542 0.00 0.00 -0.346 N +ATOM 921 HN ARG 97 -44.107 26.984 60.026 1.00 0.00 0.163 HD +ATOM 922 CA ARG 97 -42.881 25.625 61.148 0.00 0.00 0.176 C +ATOM 923 C ARG 97 -43.214 24.483 60.227 0.00 0.00 0.241 C +ATOM 924 O ARG 97 -44.212 24.536 59.497 0.00 0.00 -0.271 OA +ATOM 925 CB ARG 97 -43.607 25.410 62.489 0.00 0.00 0.036 C +ATOM 926 CG ARG 97 -43.169 26.450 63.522 0.00 0.00 0.023 C +ATOM 927 CD ARG 97 -43.399 25.939 64.946 0.00 0.00 0.138 C +ATOM 928 NE ARG 97 -43.079 27.003 65.924 0.00 0.00 -0.227 N +ATOM 929 HE ARG 97 -42.498 27.781 65.611 1.00 0.00 0.177 HD +ATOM 930 CZ ARG 97 -43.508 27.009 67.204 0.00 0.00 0.665 C +ATOM 931 NH1 ARG 97 -44.273 25.998 67.637 0.00 0.00 -0.235 N +ATOM 932 1HH1 ARG 97 -44.527 25.235 67.010 1.00 0.00 0.174 HD +ATOM 933 2HH1 ARG 97 -44.597 26.003 68.604 1.00 0.00 0.174 HD +ATOM 934 NH2 ARG 97 -43.174 28.011 68.028 0.00 0.00 -0.235 N +ATOM 935 1HH2 ARG 97 -42.592 28.781 67.698 1.00 0.00 0.174 HD +ATOM 936 2HH2 ARG 97 -43.498 28.016 68.995 1.00 0.00 0.174 HD +ATOM 937 N ALA 98 -42.402 23.435 60.272 0.00 0.00 -0.346 N +ATOM 938 HN ALA 98 -41.603 23.446 60.907 1.00 0.00 0.163 HD +ATOM 939 CA ALA 98 -42.630 22.278 59.437 0.00 0.00 0.172 C +ATOM 940 C ALA 98 -41.893 21.067 59.982 0.00 0.00 0.240 C +ATOM 941 O ALA 98 -40.886 21.207 60.689 0.00 0.00 -0.271 OA +ATOM 942 CB ALA 98 -42.188 22.575 57.992 0.00 0.00 0.042 C +ATOM 943 N LEU 99 -42.435 19.885 59.697 0.00 0.00 -0.346 N +ATOM 944 HN LEU 99 -43.294 19.873 59.147 1.00 0.00 0.163 HD +ATOM 945 CA LEU 99 -41.878 18.610 60.121 0.00 0.00 0.177 C +ATOM 946 C LEU 99 -40.717 18.344 59.175 0.00 0.00 0.241 C +ATOM 947 O LEU 99 -40.891 18.395 57.963 0.00 0.00 -0.271 OA +ATOM 948 CB LEU 99 -42.926 17.497 59.931 0.00 0.00 0.038 C +ATOM 949 CG LEU 99 -42.862 16.339 60.928 0.00 0.00 -0.020 C +ATOM 950 CD1 LEU 99 -43.147 15.004 60.236 0.00 0.00 0.009 C +ATOM 951 CD2 LEU 99 -41.525 16.326 61.670 0.00 0.00 0.009 C +ATOM 952 N VAL 100 -39.549 18.026 59.736 0.00 0.00 -0.346 N +ATOM 953 HN VAL 100 -39.490 17.970 60.753 1.00 0.00 0.163 HD +ATOM 954 CA VAL 100 -38.353 17.755 58.944 0.00 0.00 0.180 C +ATOM 955 C VAL 100 -37.760 16.428 59.371 0.00 0.00 0.243 C +ATOM 956 O VAL 100 -37.695 16.142 60.560 0.00 0.00 -0.271 OA +ATOM 957 CB VAL 100 -37.312 18.872 59.145 0.00 0.00 0.009 C +ATOM 958 CG1 VAL 100 -36.043 18.590 58.338 0.00 0.00 0.012 C +ATOM 959 CG2 VAL 100 -37.898 20.239 58.785 0.00 0.00 0.012 C +ATOM 960 N PRO 101 -37.434 15.547 58.409 0.00 0.00 -0.337 N +ATOM 961 CA PRO 101 -36.844 14.260 58.780 0.00 0.00 0.179 C +ATOM 962 C PRO 101 -35.403 14.461 59.303 0.00 0.00 0.241 C +ATOM 963 O PRO 101 -34.619 15.237 58.723 0.00 0.00 -0.271 OA +ATOM 964 CB PRO 101 -37.083 13.338 57.667 0.00 0.00 0.037 C +ATOM 965 CG PRO 101 -37.374 14.223 56.466 0.00 0.00 0.022 C +ATOM 966 CD PRO 101 -37.655 15.626 56.978 0.00 0.00 0.127 C +ATOM 967 N ARG 102 -35.100 13.823 60.435 0.00 0.00 -0.346 N +ATOM 968 HN ARG 102 -35.807 13.229 60.867 1.00 0.00 0.163 HD +ATOM 969 CA ARG 102 -33.802 13.942 61.076 0.00 0.00 0.176 C +ATOM 970 C ARG 102 -33.393 12.604 61.629 0.00 0.00 0.241 C +ATOM 971 O ARG 102 -34.229 11.717 61.796 0.00 0.00 -0.271 OA +ATOM 972 CB ARG 102 -33.856 14.962 62.228 0.00 0.00 0.036 C +ATOM 973 CG ARG 102 -34.668 16.196 61.830 0.00 0.00 0.023 C +ATOM 974 CD ARG 102 -33.841 17.473 61.992 0.00 0.00 0.138 C +ATOM 975 NE ARG 102 -32.844 17.572 60.902 0.00 0.00 -0.227 N +ATOM 976 HE ARG 102 -32.429 16.708 60.554 1.00 0.00 0.177 HD +ATOM 977 CZ ARG 102 -32.450 18.735 60.340 0.00 0.00 0.665 C +ATOM 978 NH1 ARG 102 -32.981 19.883 60.782 0.00 0.00 -0.235 N +ATOM 979 1HH1 ARG 102 -33.673 19.879 61.531 1.00 0.00 0.174 HD +ATOM 980 2HH1 ARG 102 -32.683 20.761 60.358 1.00 0.00 0.174 HD +ATOM 981 NH2 ARG 102 -31.541 18.740 59.356 0.00 0.00 -0.235 N +ATOM 982 1HH2 ARG 102 -31.137 17.866 59.020 1.00 0.00 0.174 HD +ATOM 983 2HH2 ARG 102 -31.243 19.618 58.932 1.00 0.00 0.174 HD +ATOM 984 N ALA 103 -32.092 12.426 61.855 0.00 0.00 -0.346 N +ATOM 985 HN ALA 103 -31.434 13.168 61.616 1.00 0.00 0.163 HD +ATOM 986 CA ALA 103 -31.597 11.185 62.439 0.00 0.00 0.172 C +ATOM 987 C ALA 103 -32.077 11.258 63.881 0.00 0.00 0.240 C +ATOM 988 O ALA 103 -32.113 12.352 64.478 0.00 0.00 -0.271 OA +ATOM 989 CB ALA 103 -30.060 11.121 62.377 0.00 0.00 0.042 C +ATOM 990 N GLU 104 -32.451 10.110 64.437 0.00 0.00 -0.346 N +ATOM 991 HN GLU 104 -32.391 9.251 63.891 1.00 0.00 0.163 HD +ATOM 992 CA GLU 104 -32.948 10.046 65.816 0.00 0.00 0.177 C +ATOM 993 C GLU 104 -31.855 10.229 66.870 0.00 0.00 0.241 C +ATOM 994 O GLU 104 -32.040 10.956 67.856 0.00 0.00 -0.271 OA +ATOM 995 CB GLU 104 -33.707 8.730 66.069 0.00 0.00 0.045 C +ATOM 996 CG GLU 104 -34.356 8.729 67.455 0.00 0.00 0.116 C +ATOM 997 CD GLU 104 -34.766 7.314 67.867 0.00 0.00 0.172 C +ATOM 998 OE1 GLU 104 -34.536 6.357 67.113 0.00 0.00 -0.648 OA +ATOM 999 OE2 GLU 104 -35.342 7.227 69.018 0.00 0.00 -0.648 OA +ATOM 1000 N LYS 105 -30.720 9.569 66.656 0.00 0.00 -0.346 N +ATOM 1001 HN LYS 105 -30.642 8.984 65.824 1.00 0.00 0.163 HD +ATOM 1002 CA LYS 105 -29.574 9.651 67.573 0.00 0.00 0.176 C +ATOM 1003 C LYS 105 -28.291 10.106 66.872 0.00 0.00 0.241 C +ATOM 1004 O LYS 105 -28.041 9.719 65.735 0.00 0.00 -0.271 OA +ATOM 1005 CB LYS 105 -29.302 8.278 68.214 0.00 0.00 0.035 C +ATOM 1006 CG LYS 105 -30.468 7.848 69.107 0.00 0.00 0.004 C +ATOM 1007 CD LYS 105 -30.161 6.525 69.810 0.00 0.00 0.027 C +ATOM 1008 CE LYS 105 -31.329 6.094 70.700 0.00 0.00 0.229 C +ATOM 1009 NZ LYS 105 -31.152 4.702 71.145 0.00 0.00 -0.079 N +ATOM 1010 HZ1 LYS 105 -31.930 4.415 71.738 1.00 0.00 0.274 HD +ATOM 1011 HZ2 LYS 105 -30.253 4.563 71.606 1.00 0.00 0.274 HD +ATOM 1012 HZ3 LYS 105 -31.020 4.066 70.358 1.00 0.00 0.274 HD +ATOM 1013 N VAL 106 -27.497 10.930 67.555 0.00 0.00 -0.346 N +ATOM 1014 HN VAL 106 -27.793 11.249 68.477 1.00 0.00 0.163 HD +ATOM 1015 CA VAL 106 -26.203 11.395 67.019 0.00 0.00 0.180 C +ATOM 1016 C VAL 106 -25.087 11.444 68.068 0.00 0.00 0.241 C +ATOM 1017 O VAL 106 -25.337 11.718 69.246 0.00 0.00 -0.271 OA +ATOM 1018 CB VAL 106 -26.268 12.789 66.368 0.00 0.00 0.009 C +ATOM 1019 CG1 VAL 106 -27.124 12.763 65.100 0.00 0.00 0.012 C +ATOM 1020 CG2 VAL 106 -26.787 13.833 67.359 0.00 0.00 0.012 C +ATOM 1021 N LYS 107 -23.867 11.126 67.631 0.00 0.00 -0.346 N +ATOM 1022 HN LYS 107 -23.753 10.818 66.665 1.00 0.00 0.163 HD +ATOM 1023 CA LYS 107 -22.682 11.206 68.498 0.00 0.00 0.176 C +ATOM 1024 C LYS 107 -21.741 12.213 67.856 0.00 0.00 0.241 C +ATOM 1025 O LYS 107 -21.385 12.064 66.694 0.00 0.00 -0.271 OA +ATOM 1026 CB LYS 107 -21.941 9.862 68.629 0.00 0.00 0.035 C +ATOM 1027 CG LYS 107 -20.771 9.974 69.607 0.00 0.00 0.004 C +ATOM 1028 CD LYS 107 -19.937 8.691 69.615 0.00 0.00 0.027 C +ATOM 1029 CE LYS 107 -18.729 8.828 70.543 0.00 0.00 0.229 C +ATOM 1030 NZ LYS 107 -17.878 7.629 70.462 0.00 0.00 -0.079 N +ATOM 1031 HZ1 LYS 107 -17.072 7.720 71.081 1.00 0.00 0.274 HD +ATOM 1032 HZ2 LYS 107 -17.598 7.427 69.502 1.00 0.00 0.274 HD +ATOM 1033 HZ3 LYS 107 -18.405 6.776 70.649 1.00 0.00 0.274 HD +ATOM 1034 N ILE 108 -21.415 13.283 68.564 0.00 0.00 -0.346 N +ATOM 1035 HN ILE 108 -21.803 13.415 69.498 1.00 0.00 0.163 HD +ATOM 1036 CA ILE 108 -20.503 14.269 68.007 0.00 0.00 0.180 C +ATOM 1037 C ILE 108 -19.263 14.490 68.892 0.00 0.00 0.241 C +ATOM 1038 O ILE 108 -19.168 14.014 70.020 0.00 0.00 -0.271 OA +ATOM 1039 CB ILE 108 -21.170 15.632 67.747 0.00 0.00 0.013 C +ATOM 1040 CG1 ILE 108 -21.575 16.304 69.061 0.00 0.00 0.002 C +ATOM 1041 CG2 ILE 108 -22.354 15.490 66.788 0.00 0.00 0.012 C +ATOM 1042 CD1 ILE 108 -21.693 17.820 68.889 0.00 0.00 0.005 C +ATOM 1043 N ARG 109 -18.328 15.242 68.350 0.00 0.00 -0.346 N +ATOM 1044 HN ARG 109 -18.472 15.591 67.402 1.00 0.00 0.163 HD +ATOM 1045 CA ARG 109 -17.108 15.595 69.036 0.00 0.00 0.176 C +ATOM 1046 C ARG 109 -17.050 17.092 68.786 0.00 0.00 0.241 C +ATOM 1047 O ARG 109 -17.470 17.544 67.718 0.00 0.00 -0.271 OA +ATOM 1048 CB ARG 109 -15.928 14.894 68.337 0.00 0.00 0.036 C +ATOM 1049 CG ARG 109 -14.590 15.428 68.852 0.00 0.00 0.023 C +ATOM 1050 CD ARG 109 -13.449 15.058 67.902 0.00 0.00 0.138 C +ATOM 1051 NE ARG 109 -13.306 13.587 67.833 0.00 0.00 -0.227 N +ATOM 1052 HE ARG 109 -13.808 13.025 68.521 1.00 0.00 0.177 HD +ATOM 1053 CZ ARG 109 -12.553 12.942 66.917 0.00 0.00 0.665 C +ATOM 1054 NH1 ARG 109 -11.884 13.660 66.004 0.00 0.00 -0.235 N +ATOM 1055 1HH1 ARG 109 -11.943 14.678 66.002 1.00 0.00 0.174 HD +ATOM 1056 2HH1 ARG 109 -11.315 13.173 65.312 1.00 0.00 0.174 HD +ATOM 1057 NH2 ARG 109 -12.475 11.604 66.920 0.00 0.00 -0.235 N +ATOM 1058 1HH2 ARG 109 -12.984 11.058 67.615 1.00 0.00 0.174 HD +ATOM 1059 2HH2 ARG 109 -11.906 11.117 66.228 1.00 0.00 0.174 HD +ATOM 1060 N ALA 110 -16.618 17.866 69.779 0.00 0.00 -0.346 N +ATOM 1061 HN ALA 110 -16.366 17.443 70.672 1.00 0.00 0.163 HD +ATOM 1062 CA ALA 110 -16.499 19.312 69.609 0.00 0.00 0.172 C +ATOM 1063 C ALA 110 -15.543 19.946 70.631 0.00 0.00 0.240 C +ATOM 1064 O ALA 110 -14.977 19.257 71.477 0.00 0.00 -0.271 OA +ATOM 1065 CB ALA 110 -17.887 19.973 69.697 0.00 0.00 0.042 C +ATOM 1066 N LEU 111 -15.323 21.249 70.509 0.00 0.00 -0.346 N +ATOM 1067 HN LEU 111 -15.753 21.753 69.734 1.00 0.00 0.163 HD +ATOM 1068 CA LEU 111 -14.483 21.983 71.452 0.00 0.00 0.177 C +ATOM 1069 C LEU 111 -15.455 22.842 72.253 0.00 0.00 0.241 C +ATOM 1070 O LEU 111 -16.381 23.408 71.673 0.00 0.00 -0.271 OA +ATOM 1071 CB LEU 111 -13.497 22.905 70.710 0.00 0.00 0.038 C +ATOM 1072 CG LEU 111 -12.668 22.249 69.604 0.00 0.00 -0.020 C +ATOM 1073 CD1 LEU 111 -11.675 23.244 69.001 0.00 0.00 0.009 C +ATOM 1074 CD2 LEU 111 -11.975 20.985 70.115 0.00 0.00 0.009 C +ATOM 1075 N ASP 112 -15.276 22.933 73.570 0.00 0.00 -0.346 N +ATOM 1076 HN ASP 112 -14.507 22.434 74.017 1.00 0.00 0.163 HD +ATOM 1077 CA ASP 112 -16.183 23.748 74.372 0.00 0.00 0.186 C +ATOM 1078 C ASP 112 -15.778 25.219 74.360 0.00 0.00 0.241 C +ATOM 1079 O ASP 112 -14.918 25.625 73.580 0.00 0.00 -0.271 OA +ATOM 1080 CB ASP 112 -16.357 23.195 75.799 0.00 0.00 0.147 C +ATOM 1081 CG ASP 112 -15.073 23.124 76.626 0.00 0.00 0.175 C +ATOM 1082 OD1 ASP 112 -14.187 23.984 76.506 0.00 0.00 -0.648 OA +ATOM 1083 OD2 ASP 112 -14.998 22.120 77.432 0.00 0.00 -0.648 OA +ATOM 1084 N ARG 113 -16.382 26.011 75.235 0.00 0.00 -0.346 N +ATOM 1085 HN ARG 113 -17.061 25.612 75.883 1.00 0.00 0.163 HD +ATOM 1086 CA ARG 113 -16.098 27.439 75.292 0.00 0.00 0.176 C +ATOM 1087 C ARG 113 -14.640 27.746 75.608 0.00 0.00 0.241 C +ATOM 1088 O ARG 113 -14.133 28.800 75.231 0.00 0.00 -0.271 OA +ATOM 1089 CB ARG 113 -17.015 28.132 76.317 0.00 0.00 0.036 C +ATOM 1090 CG ARG 113 -16.929 29.654 76.187 0.00 0.00 0.023 C +ATOM 1091 CD ARG 113 -17.954 30.340 77.094 0.00 0.00 0.138 C +ATOM 1092 NE ARG 113 -18.026 31.783 76.775 0.00 0.00 -0.227 N +ATOM 1093 HE ARG 113 -18.763 32.097 76.143 1.00 0.00 0.177 HD +ATOM 1094 CZ ARG 113 -17.178 32.711 77.268 0.00 0.00 0.665 C +ATOM 1095 NH1 ARG 113 -16.202 32.323 78.100 0.00 0.00 -0.235 N +ATOM 1096 1HH1 ARG 113 -15.561 33.024 78.472 1.00 0.00 0.174 HD +ATOM 1097 2HH1 ARG 113 -16.102 31.341 78.357 1.00 0.00 0.174 HD +ATOM 1098 NH2 ARG 113 -17.310 34.001 76.930 0.00 0.00 -0.235 N +ATOM 1099 1HH2 ARG 113 -16.669 34.702 77.302 1.00 0.00 0.174 HD +ATOM 1100 2HH2 ARG 113 -18.053 34.296 76.297 1.00 0.00 0.174 HD +ATOM 1101 N ASP 114 -13.979 26.831 76.308 0.00 0.00 -0.346 N +ATOM 1102 HN ASP 114 -14.465 25.981 76.594 1.00 0.00 0.163 HD +ATOM 1103 CA ASP 114 -12.579 27.004 76.680 0.00 0.00 0.186 C +ATOM 1104 C ASP 114 -11.655 26.310 75.684 0.00 0.00 0.241 C +ATOM 1105 O ASP 114 -10.478 26.109 75.968 0.00 0.00 -0.271 OA +ATOM 1106 CB ASP 114 -12.320 26.408 78.076 0.00 0.00 0.147 C +ATOM 1107 CG ASP 114 -13.236 26.933 79.183 0.00 0.00 0.175 C +ATOM 1108 OD1 ASP 114 -13.608 28.116 79.197 0.00 0.00 -0.648 OA +ATOM 1109 OD2 ASP 114 -13.575 26.061 80.071 0.00 0.00 -0.648 OA +ATOM 1110 N GLY 115 -12.197 25.906 74.539 0.00 0.00 -0.351 N +ATOM 1111 HN GLY 115 -13.185 26.081 74.357 1.00 0.00 0.163 HD +ATOM 1112 CA GLY 115 -11.394 25.219 73.548 0.00 0.00 0.225 C +ATOM 1113 C GLY 115 -11.142 23.756 73.863 0.00 0.00 0.236 C +ATOM 1114 O GLY 115 -10.520 23.055 73.069 0.00 0.00 -0.272 OA +ATOM 1115 N LYS 116 -11.625 23.278 75.003 0.00 0.00 -0.346 N +ATOM 1116 HN LYS 116 -12.141 23.895 75.631 1.00 0.00 0.163 HD +ATOM 1117 CA LYS 116 -11.425 21.878 75.368 0.00 0.00 0.177 C +ATOM 1118 C LYS 116 -12.361 20.929 74.606 0.00 0.00 0.247 C +ATOM 1119 O LYS 116 -13.577 21.125 74.577 0.00 0.00 -0.271 OA +ATOM 1120 CB LYS 116 -11.632 21.661 76.879 0.00 0.00 0.035 C +ATOM 1121 CG LYS 116 -10.883 22.718 77.692 0.00 0.00 0.004 C +ATOM 1122 CD LYS 116 -10.789 22.313 79.164 0.00 0.00 0.027 C +ATOM 1123 CE LYS 116 -10.089 23.396 79.988 0.00 0.00 0.229 C +ATOM 1124 NZ LYS 116 -10.963 24.570 80.145 0.00 0.00 -0.079 N +ATOM 1125 HZ1 LYS 116 -10.496 25.292 80.694 1.00 0.00 0.274 HD +ATOM 1126 HZ2 LYS 116 -11.869 24.318 80.541 1.00 0.00 0.274 HD +ATOM 1127 HZ3 LYS 116 -11.284 24.927 79.245 1.00 0.00 0.274 HD +ATOM 1128 N PRO 117 -11.795 19.918 73.938 0.00 0.00 -0.315 N +ATOM 1129 CA PRO 117 -12.572 18.934 73.179 0.00 0.00 0.082 C +ATOM 1130 C PRO 117 -13.430 18.055 74.091 0.00 0.00 0.265 C +ATOM 1131 O PRO 117 -13.031 17.735 75.214 0.00 0.00 -0.266 OA +ATOM 1132 CB PRO 117 -11.761 18.504 72.053 0.00 0.00 0.065 C +ATOM 1133 CG PRO 117 -10.332 18.861 72.430 0.00 0.00 0.026 C +ATOM 1134 CD PRO 117 -10.386 19.820 73.608 0.00 0.00 0.132 C +ATOM 1135 N PHE 118 -14.595 17.652 73.591 0.00 0.00 -0.342 N +ATOM 1136 HN PHE 118 -14.858 17.964 72.656 1.00 0.00 0.163 HD +ATOM 1137 CA PHE 118 -15.512 16.785 74.320 0.00 0.00 0.181 C +ATOM 1138 C PHE 118 -16.402 16.051 73.323 0.00 0.00 0.241 C +ATOM 1139 O PHE 118 -16.611 16.525 72.207 0.00 0.00 -0.271 OA +ATOM 1140 CB PHE 118 -16.368 17.583 75.321 0.00 0.00 0.073 C +ATOM 1141 CG PHE 118 -17.419 18.482 74.682 0.00 0.00 -0.056 A +ATOM 1142 CD1 PHE 118 -18.758 18.043 74.564 0.00 0.00 0.007 A +ATOM 1143 CD2 PHE 118 -17.057 19.760 74.197 0.00 0.00 0.007 A +ATOM 1144 CE1 PHE 118 -19.728 18.877 73.968 0.00 0.00 0.001 A +ATOM 1145 CE2 PHE 118 -18.028 20.593 73.601 0.00 0.00 0.001 A +ATOM 1146 CZ PHE 118 -19.363 20.152 73.487 0.00 0.00 0.000 A +ATOM 1147 N GLU 119 -16.842 14.858 73.705 0.00 0.00 -0.346 N +ATOM 1148 HN GLU 119 -16.542 14.495 74.610 1.00 0.00 0.163 HD +ATOM 1149 CA GLU 119 -17.732 14.045 72.892 0.00 0.00 0.177 C +ATOM 1150 C GLU 119 -19.113 14.048 73.556 0.00 0.00 0.241 C +ATOM 1151 O GLU 119 -19.223 14.057 74.791 0.00 0.00 -0.271 OA +ATOM 1152 CB GLU 119 -17.215 12.601 72.755 0.00 0.00 0.045 C +ATOM 1153 CG GLU 119 -16.004 12.538 71.822 0.00 0.00 0.116 C +ATOM 1154 CD GLU 119 -15.640 11.089 71.492 0.00 0.00 0.172 C +ATOM 1155 OE1 GLU 119 -16.039 10.169 72.220 0.00 0.00 -0.648 OA +ATOM 1156 OE2 GLU 119 -14.917 10.936 70.434 0.00 0.00 -0.648 OA +ATOM 1157 N LEU 120 -20.154 13.974 72.732 0.00 0.00 -0.346 N +ATOM 1158 HN LEU 120 -19.979 13.891 71.731 1.00 0.00 0.163 HD +ATOM 1159 CA LEU 120 -21.543 14.006 73.201 0.00 0.00 0.177 C +ATOM 1160 C LEU 120 -22.477 13.071 72.423 0.00 0.00 0.241 C +ATOM 1161 O LEU 120 -22.394 12.990 71.199 0.00 0.00 -0.271 OA +ATOM 1162 CB LEU 120 -22.068 15.449 73.081 0.00 0.00 0.038 C +ATOM 1163 CG LEU 120 -23.515 15.675 73.523 0.00 0.00 -0.020 C +ATOM 1164 CD1 LEU 120 -23.730 15.200 74.961 0.00 0.00 0.009 C +ATOM 1165 CD2 LEU 120 -23.924 17.137 73.335 0.00 0.00 0.009 C +ATOM 1166 N GLU 121 -23.333 12.348 73.149 0.00 0.00 -0.346 N +ATOM 1167 HN GLU 121 -23.298 12.422 74.166 1.00 0.00 0.163 HD +ATOM 1168 CA GLU 121 -24.320 11.452 72.542 0.00 0.00 0.177 C +ATOM 1169 C GLU 121 -25.658 12.120 72.796 0.00 0.00 0.241 C +ATOM 1170 O GLU 121 -25.976 12.472 73.926 0.00 0.00 -0.271 OA +ATOM 1171 CB GLU 121 -24.262 10.036 73.144 0.00 0.00 0.045 C +ATOM 1172 CG GLU 121 -22.994 9.303 72.701 0.00 0.00 0.116 C +ATOM 1173 CD GLU 121 -23.112 7.799 72.956 0.00 0.00 0.172 C +ATOM 1174 OE1 GLU 121 -23.526 7.049 72.059 0.00 0.00 -0.648 OA +ATOM 1175 OE2 GLU 121 -22.755 7.416 74.134 0.00 0.00 -0.648 OA +ATOM 1176 N ALA 122 -26.378 12.433 71.732 0.00 0.00 -0.346 N +ATOM 1177 HN ALA 122 -26.037 12.192 70.801 1.00 0.00 0.163 HD +ATOM 1178 CA ALA 122 -27.647 13.116 71.879 0.00 0.00 0.172 C +ATOM 1179 C ALA 122 -28.780 12.280 71.309 0.00 0.00 0.240 C +ATOM 1180 O ALA 122 -28.570 11.456 70.417 0.00 0.00 -0.271 OA +ATOM 1181 CB ALA 122 -27.585 14.506 71.219 0.00 0.00 0.042 C +ATOM 1182 N ASP 123 -29.967 12.483 71.875 0.00 0.00 -0.346 N +ATOM 1183 HN ASP 123 -30.026 13.178 72.620 1.00 0.00 0.163 HD +ATOM 1184 CA ASP 123 -31.197 11.776 71.501 0.00 0.00 0.186 C +ATOM 1185 C ASP 123 -32.301 12.821 71.639 0.00 0.00 0.241 C +ATOM 1186 O ASP 123 -32.051 13.908 72.168 0.00 0.00 -0.271 OA +ATOM 1187 CB ASP 123 -31.431 10.644 72.518 0.00 0.00 0.147 C +ATOM 1188 CG ASP 123 -32.594 9.706 72.186 0.00 0.00 0.175 C +ATOM 1189 OD1 ASP 123 -33.265 9.861 71.154 0.00 0.00 -0.648 OA +ATOM 1190 OD2 ASP 123 -32.804 8.771 73.049 0.00 0.00 -0.648 OA +ATOM 1191 N GLY 124 -33.501 12.519 71.147 0.00 0.00 -0.351 N +ATOM 1192 HN GLY 124 -33.643 11.629 70.670 1.00 0.00 0.163 HD +ATOM 1193 CA GLY 124 -34.611 13.448 71.285 0.00 0.00 0.225 C +ATOM 1194 C GLY 124 -34.424 14.818 70.656 0.00 0.00 0.236 C +ATOM 1195 O GLY 124 -33.866 14.942 69.548 0.00 0.00 -0.272 OA +ATOM 1196 N LEU 125 -34.826 15.851 71.393 0.00 0.00 -0.346 N +ATOM 1197 HN LEU 125 -35.200 15.678 72.326 1.00 0.00 0.163 HD +ATOM 1198 CA LEU 125 -34.748 17.215 70.908 0.00 0.00 0.177 C +ATOM 1199 C LEU 125 -33.324 17.756 70.728 0.00 0.00 0.241 C +ATOM 1200 O LEU 125 -33.099 18.614 69.854 0.00 0.00 -0.271 OA +ATOM 1201 CB LEU 125 -35.550 18.156 71.826 0.00 0.00 0.038 C +ATOM 1202 CG LEU 125 -35.600 19.625 71.402 0.00 0.00 -0.020 C +ATOM 1203 CD1 LEU 125 -36.275 19.780 70.037 0.00 0.00 0.009 C +ATOM 1204 CD2 LEU 125 -36.273 20.483 72.475 0.00 0.00 0.009 C +ATOM 1205 N LEU 126 -32.398 17.329 71.597 0.00 0.00 -0.346 N +ATOM 1206 HN LEU 126 -32.676 16.685 72.338 1.00 0.00 0.163 HD +ATOM 1207 CA LEU 126 -30.988 17.761 71.517 0.00 0.00 0.177 C +ATOM 1208 C LEU 126 -30.426 17.290 70.179 0.00 0.00 0.241 C +ATOM 1209 O LEU 126 -29.912 18.096 69.433 0.00 0.00 -0.271 OA +ATOM 1210 CB LEU 126 -30.143 17.210 72.681 0.00 0.00 0.038 C +ATOM 1211 CG LEU 126 -28.683 17.665 72.724 0.00 0.00 -0.020 C +ATOM 1212 CD1 LEU 126 -28.586 19.176 72.944 0.00 0.00 0.009 C +ATOM 1213 CD2 LEU 126 -27.895 16.881 73.775 0.00 0.00 0.009 C +ATOM 1214 N ALA 127 -30.633 16.014 69.847 0.00 0.00 -0.346 N +ATOM 1215 HN ALA 127 -31.140 15.423 70.506 1.00 0.00 0.163 HD +ATOM 1216 CA ALA 127 -30.174 15.410 68.588 0.00 0.00 0.172 C +ATOM 1217 C ALA 127 -30.642 16.123 67.319 0.00 0.00 0.240 C +ATOM 1218 O ALA 127 -29.888 16.241 66.334 0.00 0.00 -0.271 OA +ATOM 1219 CB ALA 127 -30.595 13.930 68.538 0.00 0.00 0.042 C +ATOM 1220 N ILE 128 -31.900 16.564 67.348 0.00 0.00 -0.346 N +ATOM 1221 HN ILE 128 -32.445 16.387 68.192 1.00 0.00 0.163 HD +ATOM 1222 CA ILE 128 -32.553 17.283 66.256 0.00 0.00 0.180 C +ATOM 1223 C ILE 128 -32.022 18.718 66.174 0.00 0.00 0.241 C +ATOM 1224 O ILE 128 -31.841 19.282 65.088 0.00 0.00 -0.271 OA +ATOM 1225 CB ILE 128 -34.073 17.293 66.502 0.00 0.00 0.013 C +ATOM 1226 CG1 ILE 128 -34.693 15.938 66.155 0.00 0.00 0.002 C +ATOM 1227 CG2 ILE 128 -34.744 18.441 65.745 0.00 0.00 0.012 C +ATOM 1228 CD1 ILE 128 -36.107 15.819 66.728 0.00 0.00 0.005 C +ATOM 1229 N CYS 129 -31.828 19.321 67.338 0.00 0.00 -0.345 N +ATOM 1230 HN CYS 129 -32.042 18.811 68.195 1.00 0.00 0.163 HD +ATOM 1231 CA CYS 129 -31.320 20.687 67.442 0.00 0.00 0.185 C +ATOM 1232 C CYS 129 -29.870 20.785 66.908 0.00 0.00 0.241 C +ATOM 1233 O CYS 129 -29.570 21.636 66.064 0.00 0.00 -0.271 OA +ATOM 1234 CB CYS 129 -31.396 21.141 68.912 0.00 0.00 0.105 C +ATOM 1235 SG CYS 129 -30.697 22.786 69.238 0.00 0.00 -0.180 SA +ATOM 1236 HSG CYS 129 -30.784 23.012 70.217 0.00 0.00 0.101 HD +ATOM 1237 N ILE 130 -29.007 19.876 67.369 0.00 0.00 -0.346 N +ATOM 1238 HN ILE 130 -29.333 19.202 68.062 1.00 0.00 0.163 HD +ATOM 1239 CA ILE 130 -27.614 19.805 66.924 0.00 0.00 0.180 C +ATOM 1240 C ILE 130 -27.592 19.714 65.392 0.00 0.00 0.241 C +ATOM 1241 O ILE 130 -26.929 20.507 64.728 0.00 0.00 -0.271 OA +ATOM 1242 CB ILE 130 -26.913 18.562 67.502 0.00 0.00 0.013 C +ATOM 1243 CG1 ILE 130 -26.590 18.754 68.985 0.00 0.00 0.002 C +ATOM 1244 CG2 ILE 130 -25.669 18.205 66.686 0.00 0.00 0.012 C +ATOM 1245 CD1 ILE 130 -25.812 17.558 69.537 0.00 0.00 0.005 C +ATOM 1246 N GLN 131 -28.387 18.799 64.835 0.00 0.00 -0.346 N +ATOM 1247 HN GLN 131 -28.967 18.214 65.436 1.00 0.00 0.163 HD +ATOM 1248 CA GLN 131 -28.449 18.612 63.391 0.00 0.00 0.177 C +ATOM 1249 C GLN 131 -28.892 19.844 62.661 0.00 0.00 0.241 C +ATOM 1250 O GLN 131 -28.413 20.128 61.573 0.00 0.00 -0.271 OA +ATOM 1251 CB GLN 131 -29.396 17.457 63.016 0.00 0.00 0.044 C +ATOM 1252 CG GLN 131 -28.801 16.107 63.421 0.00 0.00 0.105 C +ATOM 1253 CD GLN 131 -29.822 14.981 63.240 0.00 0.00 0.215 C +ATOM 1254 OE1 GLN 131 -30.105 14.535 62.141 0.00 0.00 -0.274 OA +ATOM 1255 NE2 GLN 131 -30.357 14.550 64.379 0.00 0.00 -0.370 N +ATOM 1256 1HE2 GLN 131 -30.120 14.923 65.298 1.00 0.00 0.159 HD +ATOM 1257 2HE2 GLN 131 -31.037 13.800 64.258 1.00 0.00 0.159 HD +ATOM 1258 N HIZ 132 -29.793 20.599 63.266 0.00 0.00 -0.346 N +ATOM 1259 HN HIZ 132 -30.121 20.339 64.196 1.00 0.00 0.163 HD +ATOM 1260 CA HIZ 132 -30.323 21.790 62.631 0.00 0.00 0.182 C +ATOM 1261 C HIZ 132 -29.308 22.952 62.674 0.00 0.00 0.241 C +ATOM 1262 O HIZ 132 -29.212 23.745 61.730 0.00 0.00 -0.271 OA +ATOM 1263 CB HIZ 132 -31.675 22.091 63.304 0.00 0.00 0.093 C +ATOM 1264 CG HIZ 132 -32.164 23.504 63.095 0.00 0.00 0.028 A +ATOM 1265 ND1 HIZ 132 -33.326 23.801 62.403 0.00 0.00 -0.354 N +ATOM 1266 HD1 HIZ 132 -33.956 23.122 61.975 1.00 0.00 0.166 HD +ATOM 1267 CD2 HIZ 132 -31.638 24.698 63.494 0.00 0.00 0.114 A +ATOM 1268 CE1 HIZ 132 -33.481 25.117 62.392 0.00 0.00 0.180 A +ATOM 1269 NE2 HIZ 132 -32.434 25.671 63.068 0.00 0.00 -0.360 N +ATOM 1270 HE2 HIZ 132 -32.287 26.669 63.221 1.00 0.00 0.166 HD +ATOM 1271 N GLU 133 -28.560 23.063 63.769 0.00 0.00 -0.346 N +ATOM 1272 HN GLU 133 -28.693 22.409 64.540 1.00 0.00 0.163 HD +ATOM 1273 CA GLU 133 -27.546 24.117 63.877 0.00 0.00 0.177 C +ATOM 1274 C GLU 133 -26.351 23.807 62.936 0.00 0.00 0.241 C +ATOM 1275 O GLU 133 -25.948 24.668 62.153 0.00 0.00 -0.271 OA +ATOM 1276 CB GLU 133 -27.042 24.272 65.324 0.00 0.00 0.045 C +ATOM 1277 CG GLU 133 -28.208 24.497 66.289 0.00 0.00 0.116 C +ATOM 1278 CD GLU 133 -29.074 25.674 65.838 0.00 0.00 0.172 C +ATOM 1279 OE1 GLU 133 -28.760 26.325 64.830 0.00 0.00 -0.648 OA +ATOM 1280 OE2 GLU 133 -30.108 25.905 66.574 0.00 0.00 -0.648 OA +ATOM 1281 N MET 134 -25.840 22.573 62.998 0.00 0.00 -0.346 N +ATOM 1282 HN MET 134 -26.232 21.916 63.673 1.00 0.00 0.163 HD +ATOM 1283 CA MET 134 -24.738 22.121 62.136 0.00 0.00 0.177 C +ATOM 1284 C MET 134 -25.081 22.366 60.669 0.00 0.00 0.241 C +ATOM 1285 O MET 134 -24.222 22.810 59.890 0.00 0.00 -0.271 OA +ATOM 1286 CB MET 134 -24.405 20.639 62.387 0.00 0.00 0.045 C +ATOM 1287 CG MET 134 -23.651 20.462 63.706 0.00 0.00 0.076 C +ATOM 1288 SD MET 134 -23.003 18.769 63.831 0.00 0.00 -0.173 SA +ATOM 1289 CE MET 134 -21.860 18.763 62.418 0.00 0.00 0.089 C +ATOM 1290 N ASP 135 -26.353 22.163 60.302 0.00 0.00 -0.346 N +ATOM 1291 HN ASP 135 -27.028 21.832 60.991 1.00 0.00 0.163 HD +ATOM 1292 CA ASP 135 -26.788 22.409 58.925 0.00 0.00 0.186 C +ATOM 1293 C ASP 135 -26.551 23.868 58.576 0.00 0.00 0.241 C +ATOM 1294 O ASP 135 -26.255 24.223 57.440 0.00 0.00 -0.271 OA +ATOM 1295 CB ASP 135 -28.289 22.118 58.744 0.00 0.00 0.147 C +ATOM 1296 CG ASP 135 -28.626 20.680 58.346 0.00 0.00 0.175 C +ATOM 1297 OD1 ASP 135 -27.748 19.805 58.311 0.00 0.00 -0.648 OA +ATOM 1298 OD2 ASP 135 -29.866 20.469 58.060 0.00 0.00 -0.648 OA +ATOM 1299 N HIZ 136 -26.726 24.725 59.559 0.00 0.00 -0.346 N +ATOM 1300 HN HIZ 136 -26.996 24.384 60.482 1.00 0.00 0.163 HD +ATOM 1301 CA HIZ 136 -26.541 26.139 59.349 0.00 0.00 0.182 C +ATOM 1302 C HIZ 136 -25.130 26.513 58.934 0.00 0.00 0.241 C +ATOM 1303 O HIZ 136 -24.947 27.291 57.995 0.00 0.00 -0.271 OA +ATOM 1304 CB HIZ 136 -26.961 26.917 60.610 0.00 0.00 0.093 C +ATOM 1305 CG HIZ 136 -28.357 27.488 60.542 0.00 0.00 0.028 A +ATOM 1306 ND1 HIZ 136 -28.767 28.350 59.540 0.00 0.00 -0.354 N +ATOM 1307 HD1 HIZ 136 -28.192 28.681 58.766 1.00 0.00 0.166 HD +ATOM 1308 CD2 HIZ 136 -29.433 27.311 61.362 0.00 0.00 0.114 A +ATOM 1309 CE1 HIZ 136 -30.034 28.672 59.757 0.00 0.00 0.180 A +ATOM 1310 NE2 HIZ 136 -30.445 28.027 60.887 0.00 0.00 -0.360 N +ATOM 1311 HE2 HIZ 136 -31.376 28.085 61.299 1.00 0.00 0.166 HD +ATOM 1312 N LEU 137 -24.144 25.922 59.603 0.00 0.00 -0.346 N +ATOM 1313 HN LEU 137 -24.381 25.250 60.333 1.00 0.00 0.163 HD +ATOM 1314 CA LEU 137 -22.729 26.198 59.333 0.00 0.00 0.177 C +ATOM 1315 C LEU 137 -22.310 25.822 57.916 0.00 0.00 0.241 C +ATOM 1316 O LEU 137 -21.278 26.253 57.436 0.00 0.00 -0.271 OA +ATOM 1317 CB LEU 137 -21.842 25.483 60.369 0.00 0.00 0.038 C +ATOM 1318 CG LEU 137 -22.058 25.887 61.829 0.00 0.00 -0.020 C +ATOM 1319 CD1 LEU 137 -21.296 24.956 62.774 0.00 0.00 0.009 C +ATOM 1320 CD2 LEU 137 -21.690 27.355 62.052 0.00 0.00 0.009 C +ATOM 1321 N VAL 138 -23.125 25.017 57.246 0.00 0.00 -0.346 N +ATOM 1322 HN VAL 138 -23.968 24.670 57.703 1.00 0.00 0.163 HD +ATOM 1323 CA VAL 138 -22.848 24.620 55.885 0.00 0.00 0.180 C +ATOM 1324 C VAL 138 -23.847 25.244 54.898 0.00 0.00 0.241 C +ATOM 1325 O VAL 138 -24.026 24.746 53.793 0.00 0.00 -0.271 OA +ATOM 1326 CB VAL 138 -22.748 23.091 55.731 0.00 0.00 0.009 C +ATOM 1327 CG1 VAL 138 -21.576 22.534 56.541 0.00 0.00 0.012 C +ATOM 1328 CG2 VAL 138 -24.061 22.413 56.128 0.00 0.00 0.012 C +ATOM 1329 N GLY 139 -24.452 26.363 55.293 0.00 0.00 -0.351 N +ATOM 1330 HN GLY 139 -24.242 26.741 56.217 1.00 0.00 0.163 HD +ATOM 1331 CA GLY 139 -25.407 27.063 54.441 0.00 0.00 0.225 C +ATOM 1332 C GLY 139 -26.700 26.327 54.098 0.00 0.00 0.236 C +ATOM 1333 O GLY 139 -27.301 26.594 53.057 0.00 0.00 -0.272 OA +ATOM 1334 N LYS 140 -27.131 25.421 54.978 0.00 0.00 -0.346 N +ATOM 1335 HN LYS 140 -26.594 25.274 55.833 1.00 0.00 0.163 HD +ATOM 1336 CA LYS 140 -28.341 24.633 54.764 0.00 0.00 0.176 C +ATOM 1337 C LYS 140 -29.430 25.007 55.768 0.00 0.00 0.241 C +ATOM 1338 O LYS 140 -29.159 25.266 56.943 0.00 0.00 -0.271 OA +ATOM 1339 CB LYS 140 -28.026 23.128 54.854 0.00 0.00 0.035 C +ATOM 1340 CG LYS 140 -29.222 22.290 54.400 0.00 0.00 0.004 C +ATOM 1341 CD LYS 140 -28.974 20.800 54.649 0.00 0.00 0.027 C +ATOM 1342 CE LYS 140 -27.912 20.254 53.693 0.00 0.00 0.229 C +ATOM 1343 NZ LYS 140 -27.890 18.783 53.733 0.00 0.00 -0.079 N +ATOM 1344 HZ1 LYS 140 -27.182 18.419 53.096 1.00 0.00 0.274 HD +ATOM 1345 HZ2 LYS 140 -28.810 18.385 53.545 1.00 0.00 0.274 HD +ATOM 1346 HZ3 LYS 140 -27.763 18.431 54.682 1.00 0.00 0.274 HD +ATOM 1347 N LEU 141 -30.666 25.049 55.274 0.00 0.00 -0.346 N +ATOM 1348 HN LEU 141 -30.807 24.812 54.292 1.00 0.00 0.163 HD +ATOM 1349 CA LEU 141 -31.828 25.420 56.076 0.00 0.00 0.177 C +ATOM 1350 C LEU 141 -32.853 24.277 56.030 0.00 0.00 0.241 C +ATOM 1351 O LEU 141 -32.900 23.545 55.039 0.00 0.00 -0.271 OA +ATOM 1352 CB LEU 141 -32.418 26.721 55.500 0.00 0.00 0.038 C +ATOM 1353 CG LEU 141 -31.449 27.898 55.373 0.00 0.00 -0.020 C +ATOM 1354 CD1 LEU 141 -32.082 29.046 54.584 0.00 0.00 0.009 C +ATOM 1355 CD2 LEU 141 -30.954 28.352 56.747 0.00 0.00 0.009 C +ATOM 1356 N PHE 142 -33.656 24.113 57.090 0.00 0.00 -0.346 N +ATOM 1357 HN PHE 142 -33.570 24.759 57.875 1.00 0.00 0.163 HD +ATOM 1358 CA PHE 142 -34.666 23.027 57.165 0.00 0.00 0.180 C +ATOM 1359 C PHE 142 -35.662 22.911 55.979 0.00 0.00 0.241 C +ATOM 1360 O PHE 142 -36.063 21.799 55.569 0.00 0.00 -0.271 OA +ATOM 1361 CB PHE 142 -35.395 23.039 58.521 0.00 0.00 0.073 C +ATOM 1362 CG PHE 142 -36.524 24.055 58.626 0.00 0.00 -0.056 A +ATOM 1363 CD1 PHE 142 -37.749 23.835 57.953 0.00 0.00 0.007 A +ATOM 1364 CD2 PHE 142 -36.351 25.230 59.394 0.00 0.00 0.007 A +ATOM 1365 CE1 PHE 142 -38.791 24.782 58.050 0.00 0.00 0.001 A +ATOM 1366 CE2 PHE 142 -37.394 26.176 59.490 0.00 0.00 0.001 A +ATOM 1367 CZ PHE 142 -38.614 25.952 58.818 0.00 0.00 0.000 A +ATOM 1368 N MET 143 -36.014 24.051 55.389 0.00 0.00 -0.346 N +ATOM 1369 HN MET 143 -35.638 24.934 55.733 1.00 0.00 0.163 HD +ATOM 1370 CA MET 143 -36.923 24.051 54.266 0.00 0.00 0.177 C +ATOM 1371 C MET 143 -36.339 23.390 53.015 0.00 0.00 0.241 C +ATOM 1372 O MET 143 -37.100 22.941 52.156 0.00 0.00 -0.271 OA +ATOM 1373 CB MET 143 -37.422 25.478 53.972 0.00 0.00 0.045 C +ATOM 1374 CG MET 143 -36.261 26.397 53.587 0.00 0.00 0.076 C +ATOM 1375 SD MET 143 -36.891 28.041 53.140 0.00 0.00 -0.173 SA +ATOM 1376 CE MET 143 -37.862 27.616 51.664 0.00 0.00 0.089 C +ATOM 1377 N ASP 144 -35.009 23.240 52.951 0.00 0.00 -0.346 N +ATOM 1378 HN ASP 144 -34.437 23.572 53.728 1.00 0.00 0.163 HD +ATOM 1379 CA ASP 144 -34.342 22.609 51.791 0.00 0.00 0.186 C +ATOM 1380 C ASP 144 -34.730 21.158 51.698 0.00 0.00 0.241 C +ATOM 1381 O ASP 144 -34.539 20.521 50.659 0.00 0.00 -0.271 OA +ATOM 1382 CB ASP 144 -32.807 22.652 51.903 0.00 0.00 0.147 C +ATOM 1383 CG ASP 144 -32.198 24.056 51.915 0.00 0.00 0.175 C +ATOM 1384 OD1 ASP 144 -32.771 25.005 51.359 0.00 0.00 -0.648 OA +ATOM 1385 OD2 ASP 144 -31.072 24.156 52.535 0.00 0.00 -0.648 OA +ATOM 1386 N TYR 145 -35.199 20.626 52.822 0.00 0.00 -0.346 N +ATOM 1387 HN TYR 145 -35.255 21.218 53.651 1.00 0.00 0.163 HD +ATOM 1388 CA TYR 145 -35.640 19.233 52.932 0.00 0.00 0.180 C +ATOM 1389 C TYR 145 -37.030 19.017 52.337 0.00 0.00 0.241 C +ATOM 1390 O TYR 145 -37.394 17.898 51.978 0.00 0.00 -0.271 OA +ATOM 1391 CB TYR 145 -35.676 18.809 54.412 0.00 0.00 0.073 C +ATOM 1392 CG TYR 145 -34.309 18.542 55.026 0.00 0.00 -0.056 A +ATOM 1393 CD1 TYR 145 -33.726 19.479 55.910 0.00 0.00 0.010 A +ATOM 1394 CD2 TYR 145 -33.611 17.354 54.708 0.00 0.00 0.010 A +ATOM 1395 CE1 TYR 145 -32.457 19.228 56.474 0.00 0.00 0.037 A +ATOM 1396 CE2 TYR 145 -32.342 17.103 55.272 0.00 0.00 0.037 A +ATOM 1397 CZ TYR 145 -31.764 18.039 56.156 0.00 0.00 0.065 A +ATOM 1398 OH TYR 145 -30.535 17.792 56.700 0.00 0.00 -0.361 OA +ATOM 1399 HOH TYR 145 -30.297 18.516 57.267 0.00 0.00 0.217 HD +ATOM 1400 N LEU 146 -37.789 20.103 52.250 0.00 0.00 -0.346 N +ATOM 1401 HN LEU 146 -37.390 20.995 52.541 1.00 0.00 0.163 HD +ATOM 1402 CA LEU 146 -39.165 20.088 51.760 0.00 0.00 0.177 C +ATOM 1403 C LEU 146 -39.327 20.064 50.226 0.00 0.00 0.241 C +ATOM 1404 O LEU 146 -38.355 20.255 49.471 0.00 0.00 -0.271 OA +ATOM 1405 CB LEU 146 -39.933 21.258 52.403 0.00 0.00 0.038 C +ATOM 1406 CG LEU 146 -39.693 21.477 53.898 0.00 0.00 -0.020 C +ATOM 1407 CD1 LEU 146 -40.519 22.655 54.419 0.00 0.00 0.009 C +ATOM 1408 CD2 LEU 146 -39.959 20.196 54.690 0.00 0.00 0.009 C +ATOM 1409 N SER 147 -40.548 19.763 49.775 0.00 0.00 -0.344 N +ATOM 1410 HN SER 147 -41.288 19.574 50.451 1.00 0.00 0.163 HD +ATOM 1411 CA SER 147 -40.863 19.695 48.349 0.00 0.00 0.200 C +ATOM 1412 C SER 147 -40.856 21.104 47.766 0.00 0.00 0.249 C +ATOM 1413 O SER 147 -40.978 22.087 48.508 0.00 0.00 -0.271 OA +ATOM 1414 CB SER 147 -42.255 19.070 48.140 0.00 0.00 0.199 C +ATOM 1415 OG SER 147 -43.302 20.007 48.380 0.00 0.00 -0.398 OA +ATOM 1416 HOG SER 147 -44.138 19.579 48.240 0.00 0.00 0.209 HD +ATOM 1417 N PRO 148 -40.762 21.220 46.426 0.00 0.00 -0.315 N +ATOM 1418 CA PRO 148 -40.745 22.519 45.737 0.00 0.00 0.082 C +ATOM 1419 C PRO 148 -41.975 23.350 46.082 0.00 0.00 0.265 C +ATOM 1420 O PRO 148 -41.870 24.544 46.357 0.00 0.00 -0.266 OA +ATOM 1421 CB PRO 148 -40.173 22.305 44.419 0.00 0.00 0.065 C +ATOM 1422 CG PRO 148 -40.314 20.815 44.153 0.00 0.00 0.026 C +ATOM 1423 CD PRO 148 -40.634 20.134 45.474 0.00 0.00 0.132 C +ATOM 1424 N LEU 149 -43.133 22.696 46.120 0.00 0.00 -0.343 N +ATOM 1425 HN LEU 149 -43.144 21.695 45.926 1.00 0.00 0.163 HD +ATOM 1426 CA LEU 149 -44.387 23.372 46.431 0.00 0.00 0.177 C +ATOM 1427 C LEU 149 -44.411 23.891 47.865 0.00 0.00 0.241 C +ATOM 1428 O LEU 149 -44.881 25.002 48.113 0.00 0.00 -0.271 OA +ATOM 1429 CB LEU 149 -45.589 22.440 46.188 0.00 0.00 0.038 C +ATOM 1430 CG LEU 149 -45.587 21.674 44.864 0.00 0.00 -0.020 C +ATOM 1431 CD1 LEU 149 -45.140 20.225 45.069 0.00 0.00 0.009 C +ATOM 1432 CD2 LEU 149 -46.952 21.761 44.178 0.00 0.00 0.009 C +ATOM 1433 N LYS 150 -43.918 23.095 48.814 0.00 0.00 -0.346 N +ATOM 1434 HN LYS 150 -43.544 22.178 48.571 1.00 0.00 0.163 HD +ATOM 1435 CA LYS 150 -43.917 23.544 50.201 0.00 0.00 0.176 C +ATOM 1436 C LYS 150 -42.913 24.654 50.389 0.00 0.00 0.241 C +ATOM 1437 O LYS 150 -43.158 25.614 51.118 0.00 0.00 -0.271 OA +ATOM 1438 CB LYS 150 -43.581 22.405 51.181 0.00 0.00 0.035 C +ATOM 1439 CG LYS 150 -44.091 22.722 52.587 0.00 0.00 0.004 C +ATOM 1440 CD LYS 150 -45.595 22.464 52.696 0.00 0.00 0.027 C +ATOM 1441 CE LYS 150 -45.924 21.002 52.385 0.00 0.00 0.229 C +ATOM 1442 NZ LYS 150 -47.380 20.786 52.406 0.00 0.00 -0.079 N +ATOM 1443 HZ1 LYS 150 -47.599 19.812 52.199 1.00 0.00 0.274 HD +ATOM 1444 HZ2 LYS 150 -47.868 21.426 51.779 1.00 0.00 0.274 HD +ATOM 1445 HZ3 LYS 150 -47.796 21.089 53.287 1.00 0.00 0.274 HD +ATOM 1446 N GLN 151 -41.755 24.490 49.759 0.00 0.00 -0.346 N +ATOM 1447 HN GLN 151 -41.600 23.640 49.216 1.00 0.00 0.163 HD +ATOM 1448 CA GLN 151 -40.706 25.489 49.824 0.00 0.00 0.177 C +ATOM 1449 C GLN 151 -41.294 26.750 49.262 0.00 0.00 0.241 C +ATOM 1450 O GLN 151 -41.068 27.825 49.795 0.00 0.00 -0.271 OA +ATOM 1451 CB GLN 151 -39.488 25.078 48.976 0.00 0.00 0.044 C +ATOM 1452 CG GLN 151 -38.764 23.883 49.599 0.00 0.00 0.105 C +ATOM 1453 CD GLN 151 -37.311 23.814 49.125 0.00 0.00 0.215 C +ATOM 1454 OE1 GLN 151 -36.587 24.796 49.113 0.00 0.00 -0.274 OA +ATOM 1455 NE2 GLN 151 -36.926 22.602 48.736 0.00 0.00 -0.370 N +ATOM 1456 1HE2 GLN 151 -37.531 21.781 48.746 1.00 0.00 0.159 HD +ATOM 1457 2HE2 GLN 151 -35.957 22.556 48.420 1.00 0.00 0.159 HD +ATOM 1458 N GLN 152 -42.084 26.606 48.203 0.00 0.00 -0.346 N +ATOM 1459 HN GLN 152 -42.241 25.675 47.817 1.00 0.00 0.163 HD +ATOM 1460 CA GLN 152 -42.731 27.758 47.583 0.00 0.00 0.177 C +ATOM 1461 C GLN 152 -43.705 28.465 48.538 0.00 0.00 0.241 C +ATOM 1462 O GLN 152 -43.699 29.700 48.651 0.00 0.00 -0.271 OA +ATOM 1463 CB GLN 152 -43.482 27.333 46.307 0.00 0.00 0.044 C +ATOM 1464 CG GLN 152 -44.199 28.525 45.670 0.00 0.00 0.105 C +ATOM 1465 CD GLN 152 -45.212 28.060 44.622 0.00 0.00 0.215 C +ATOM 1466 OE1 GLN 152 -45.427 26.877 44.412 0.00 0.00 -0.274 OA +ATOM 1467 NE2 GLN 152 -45.820 29.052 43.980 0.00 0.00 -0.370 N +ATOM 1468 1HE2 GLN 152 -45.640 30.041 44.155 1.00 0.00 0.159 HD +ATOM 1469 2HE2 GLN 152 -46.495 28.742 43.281 1.00 0.00 0.159 HD +ATOM 1470 N ARG 153 -44.541 27.679 49.215 0.00 0.00 -0.346 N +ATOM 1471 HN ARG 153 -44.504 26.671 49.063 1.00 0.00 0.163 HD +ATOM 1472 CA ARG 153 -45.511 28.215 50.170 0.00 0.00 0.176 C +ATOM 1473 C ARG 153 -44.812 28.885 51.365 0.00 0.00 0.241 C +ATOM 1474 O ARG 153 -45.277 29.916 51.859 0.00 0.00 -0.271 OA +ATOM 1475 CB ARG 153 -46.470 27.107 50.645 0.00 0.00 0.036 C +ATOM 1476 CG ARG 153 -47.167 26.440 49.457 0.00 0.00 0.023 C +ATOM 1477 CD ARG 153 -48.119 25.339 49.929 0.00 0.00 0.138 C +ATOM 1478 NE ARG 153 -48.780 24.709 48.765 0.00 0.00 -0.227 N +ATOM 1479 HE ARG 153 -48.543 25.055 47.835 1.00 0.00 0.177 HD +ATOM 1480 CZ ARG 153 -49.678 23.704 48.856 0.00 0.00 0.665 C +ATOM 1481 NH1 ARG 153 -50.005 23.233 50.067 0.00 0.00 -0.235 N +ATOM 1482 1HH1 ARG 153 -49.582 23.627 50.907 1.00 0.00 0.174 HD +ATOM 1483 2HH1 ARG 153 -50.683 22.474 50.136 1.00 0.00 0.174 HD +ATOM 1484 NH2 ARG 153 -50.233 23.186 47.752 0.00 0.00 -0.235 N +ATOM 1485 1HH2 ARG 153 -49.984 23.545 46.830 1.00 0.00 0.174 HD +ATOM 1486 2HH2 ARG 153 -50.911 22.427 47.821 1.00 0.00 0.174 HD +ATOM 1487 N ILE 154 -43.699 28.308 51.824 0.00 0.00 -0.346 N +ATOM 1488 HN ILE 154 -43.368 27.447 51.389 1.00 0.00 0.163 HD +ATOM 1489 CA ILE 154 -42.942 28.884 52.939 0.00 0.00 0.180 C +ATOM 1490 C ILE 154 -42.393 30.250 52.524 0.00 0.00 0.241 C +ATOM 1491 O ILE 154 -42.532 31.236 53.256 0.00 0.00 -0.271 OA +ATOM 1492 CB ILE 154 -41.753 27.997 53.354 0.00 0.00 0.013 C +ATOM 1493 CG1 ILE 154 -42.232 26.622 53.823 0.00 0.00 0.002 C +ATOM 1494 CG2 ILE 154 -40.890 28.694 54.407 0.00 0.00 0.012 C +ATOM 1495 CD1 ILE 154 -41.051 25.740 54.232 0.00 0.00 0.005 C +ATOM 1496 N ARG 155 -41.783 30.289 51.341 0.00 0.00 -0.346 N +ATOM 1497 HN ARG 155 -41.717 29.427 50.799 1.00 0.00 0.163 HD +ATOM 1498 CA ARG 155 -41.205 31.506 50.784 0.00 0.00 0.176 C +ATOM 1499 C ARG 155 -42.245 32.614 50.654 0.00 0.00 0.241 C +ATOM 1500 O ARG 155 -41.978 33.758 51.034 0.00 0.00 -0.271 OA +ATOM 1501 CB ARG 155 -40.575 31.235 49.405 0.00 0.00 0.036 C +ATOM 1502 CG ARG 155 -39.318 30.373 49.536 0.00 0.00 0.023 C +ATOM 1503 CD ARG 155 -38.663 30.148 48.172 0.00 0.00 0.138 C +ATOM 1504 NE ARG 155 -39.446 29.165 47.391 0.00 0.00 -0.227 N +ATOM 1505 HE ARG 155 -39.432 28.192 47.696 1.00 0.00 0.177 HD +ATOM 1506 CZ ARG 155 -40.178 29.476 46.300 0.00 0.00 0.665 C +ATOM 1507 NH1 ARG 155 -40.213 30.749 45.882 0.00 0.00 -0.235 N +ATOM 1508 1HH1 ARG 155 -40.766 30.984 45.058 1.00 0.00 0.174 HD +ATOM 1509 2HH1 ARG 155 -39.693 31.472 46.380 1.00 0.00 0.174 HD +ATOM 1510 NH2 ARG 155 -40.861 28.527 45.646 0.00 0.00 -0.235 N +ATOM 1511 1HH2 ARG 155 -41.414 28.762 44.822 1.00 0.00 0.174 HD +ATOM 1512 2HH2 ARG 155 -40.834 27.558 45.964 1.00 0.00 0.174 HD +ATOM 1513 N GLN 156 -43.422 32.271 50.124 0.00 0.00 -0.346 N +ATOM 1514 HN GLN 156 -43.567 31.301 49.843 1.00 0.00 0.163 HD +ATOM 1515 CA GLN 156 -44.519 33.234 49.928 0.00 0.00 0.177 C +ATOM 1516 C GLN 156 -45.189 33.721 51.220 0.00 0.00 0.241 C +ATOM 1517 O GLN 156 -45.706 34.841 51.269 0.00 0.00 -0.271 OA +ATOM 1518 CB GLN 156 -45.575 32.653 48.969 0.00 0.00 0.044 C +ATOM 1519 CG GLN 156 -44.966 32.359 47.596 0.00 0.00 0.105 C +ATOM 1520 CD GLN 156 -46.000 31.729 46.662 0.00 0.00 0.215 C +ATOM 1521 OE1 GLN 156 -47.116 31.420 47.046 0.00 0.00 -0.274 OA +ATOM 1522 NE2 GLN 156 -45.569 31.555 45.416 0.00 0.00 -0.370 N +ATOM 1523 1HE2 GLN 156 -44.636 31.813 45.095 1.00 0.00 0.159 HD +ATOM 1524 2HE2 GLN 156 -46.259 31.135 44.793 1.00 0.00 0.159 HD +ATOM 1525 N LYS 157 -45.192 32.871 52.250 0.00 0.00 -0.346 N +ATOM 1526 HN LYS 157 -44.774 31.949 52.124 1.00 0.00 0.163 HD +ATOM 1527 CA LYS 157 -45.769 33.205 53.551 0.00 0.00 0.176 C +ATOM 1528 C LYS 157 -44.822 34.094 54.338 0.00 0.00 0.241 C +ATOM 1529 O LYS 157 -45.253 34.976 55.083 0.00 0.00 -0.271 OA +ATOM 1530 CB LYS 157 -46.068 31.928 54.358 0.00 0.00 0.035 C +ATOM 1531 CG LYS 157 -47.271 31.182 53.778 0.00 0.00 0.004 C +ATOM 1532 CD LYS 157 -47.618 29.957 54.627 0.00 0.00 0.027 C +ATOM 1533 CE LYS 157 -48.849 29.237 54.073 0.00 0.00 0.229 C +ATOM 1534 NZ LYS 157 -50.024 30.123 54.110 0.00 0.00 -0.079 N +ATOM 1535 HZ1 LYS 157 -50.845 29.643 53.741 1.00 0.00 0.274 HD +ATOM 1536 HZ2 LYS 157 -49.850 31.004 53.626 1.00 0.00 0.274 HD +ATOM 1537 HZ3 LYS 157 -50.190 30.494 55.046 1.00 0.00 0.274 HD +ATOM 1538 N VAL 158 -43.527 33.823 54.209 0.00 0.00 -0.346 N +ATOM 1539 HN VAL 158 -43.235 33.039 53.626 1.00 0.00 0.163 HD +ATOM 1540 CA VAL 158 -42.520 34.625 54.884 0.00 0.00 0.180 C +ATOM 1541 C VAL 158 -42.588 36.016 54.256 0.00 0.00 0.241 C +ATOM 1542 O VAL 158 -42.689 37.017 54.958 0.00 0.00 -0.271 OA +ATOM 1543 CB VAL 158 -41.109 34.034 54.706 0.00 0.00 0.009 C +ATOM 1544 CG1 VAL 158 -40.049 34.955 55.314 0.00 0.00 0.012 C +ATOM 1545 CG2 VAL 158 -41.024 32.629 55.305 0.00 0.00 0.012 C +ATOM 1546 N GLU 159 -42.659 36.055 52.928 0.00 0.00 -0.346 N +ATOM 1547 HN GLU 159 -42.678 35.174 52.415 1.00 0.00 0.163 HD +ATOM 1548 CA GLU 159 -42.711 37.309 52.169 0.00 0.00 0.177 C +ATOM 1549 C GLU 159 -43.880 38.259 52.462 0.00 0.00 0.241 C +ATOM 1550 O GLU 159 -43.944 39.348 51.891 0.00 0.00 -0.271 OA +ATOM 1551 CB GLU 159 -42.627 37.021 50.658 0.00 0.00 0.045 C +ATOM 1552 CG GLU 159 -41.466 36.075 50.345 0.00 0.00 0.116 C +ATOM 1553 CD GLU 159 -41.382 35.789 48.844 0.00 0.00 0.172 C +ATOM 1554 OE1 GLU 159 -42.198 36.308 48.067 0.00 0.00 -0.648 OA +ATOM 1555 OE2 GLU 159 -40.427 34.998 48.492 0.00 0.00 -0.648 OA +ATOM 1556 N LYS 160 -44.805 37.854 53.327 0.00 0.00 -0.346 N +ATOM 1557 HN LYS 160 -44.720 36.931 53.753 1.00 0.00 0.163 HD +ATOM 1558 CA LYS 160 -45.940 38.702 53.680 0.00 0.00 0.176 C +ATOM 1559 C LYS 160 -45.612 39.467 54.957 0.00 0.00 0.241 C +ATOM 1560 O LYS 160 -46.185 40.517 55.229 0.00 0.00 -0.271 OA +ATOM 1561 CB LYS 160 -47.202 37.842 53.878 0.00 0.00 0.035 C +ATOM 1562 CG LYS 160 -47.544 37.068 52.604 0.00 0.00 0.004 C +ATOM 1563 CD LYS 160 -48.798 36.213 52.801 0.00 0.00 0.027 C +ATOM 1564 CE LYS 160 -49.139 35.439 51.526 0.00 0.00 0.229 C +ATOM 1565 NZ LYS 160 -50.346 34.621 51.728 0.00 0.00 -0.079 N +ATOM 1566 HZ1 LYS 160 -50.573 34.105 50.878 1.00 0.00 0.274 HD +ATOM 1567 HZ2 LYS 160 -51.134 35.181 52.054 1.00 0.00 0.274 HD +ATOM 1568 HZ3 LYS 160 -50.255 34.003 52.534 1.00 0.00 0.274 HD +ATOM 1569 N LEU 161 -44.649 38.946 55.709 0.00 0.00 -0.346 N +ATOM 1570 HN LEU 161 -44.188 38.093 55.393 1.00 0.00 0.163 HD +ATOM 1571 CA LEU 161 -44.226 39.544 56.964 0.00 0.00 0.177 C +ATOM 1572 C LEU 161 -42.926 40.355 56.801 0.00 0.00 0.241 C +ATOM 1573 O LEU 161 -42.765 41.053 55.797 0.00 0.00 -0.271 OA +ATOM 1574 CB LEU 161 -44.091 38.449 58.039 0.00 0.00 0.038 C +ATOM 1575 CG LEU 161 -45.332 37.586 58.277 0.00 0.00 -0.020 C +ATOM 1576 CD1 LEU 161 -45.072 36.540 59.363 0.00 0.00 0.009 C +ATOM 1577 CD2 LEU 161 -46.550 38.454 58.597 0.00 0.00 0.009 C +ATOM 1578 N ASP 162 -42.022 40.266 57.791 0.00 0.00 -0.346 N +ATOM 1579 HN ASP 162 -42.248 39.649 58.571 1.00 0.00 0.163 HD +ATOM 1580 CA ASP 162 -40.719 40.987 57.854 0.00 0.00 0.186 C +ATOM 1581 C ASP 162 -40.869 42.518 57.954 0.00 0.00 0.241 C +ATOM 1582 O ASP 162 -39.928 43.243 58.297 0.00 0.00 -0.271 OA +ATOM 1583 CB ASP 162 -39.754 40.586 56.723 0.00 0.00 0.147 C +ATOM 1584 CG ASP 162 -38.765 39.475 57.080 0.00 0.00 0.175 C +ATOM 1585 OD1 ASP 162 -38.611 39.110 58.255 0.00 0.00 -0.648 OA +ATOM 1586 OD2 ASP 162 -38.128 38.969 56.079 0.00 0.00 -0.648 OA +ATOM 1587 N ARG 163 -42.084 42.974 57.676 0.00 0.00 -0.346 N +ATOM 1588 HN ARG 163 -42.788 42.291 57.397 1.00 0.00 0.163 HD +ATOM 1589 CA ARG 163 -42.493 44.365 57.736 0.00 0.00 0.176 C +ATOM 1590 C ARG 163 -43.376 44.331 58.991 0.00 0.00 0.240 C +ATOM 1591 O ARG 163 -42.915 43.878 60.045 0.00 0.00 -0.271 OA +ATOM 1592 CB ARG 163 -43.311 44.688 56.472 0.00 0.00 0.036 C +ATOM 1593 CG ARG 163 -44.349 43.598 56.197 0.00 0.00 0.023 C +ATOM 1594 CD ARG 163 -45.027 43.815 54.843 0.00 0.00 0.138 C +ATOM 1595 NE ARG 163 -44.087 43.488 53.747 0.00 0.00 -0.227 N +ATOM 1596 HE ARG 163 -43.093 43.657 53.904 1.00 0.00 0.177 HD +ATOM 1597 CZ ARG 163 -44.462 42.981 52.554 0.00 0.00 0.665 C +ATOM 1598 NH1 ARG 163 -45.763 42.752 52.325 0.00 0.00 -0.235 N +ATOM 1599 1HH1 ARG 163 -46.046 42.369 51.423 1.00 0.00 0.174 HD +ATOM 1600 2HH1 ARG 163 -46.458 42.958 53.042 1.00 0.00 0.174 HD +ATOM 1601 NH2 ARG 163 -43.549 42.711 51.612 0.00 0.00 -0.235 N +ATOM 1602 1HH2 ARG 163 -43.832 42.328 50.710 1.00 0.00 0.174 HD +ATOM 1603 2HH2 ARG 163 -42.559 42.885 51.786 1.00 0.00 0.174 HD +ATOM 1604 N LEU 164 -44.640 44.734 58.874 0.00 0.00 -0.353 N +ATOM 1605 HN LEU 164 -44.982 45.073 57.975 1.00 0.00 0.163 HD +ATOM 1606 CA LEU 164 -45.537 44.694 60.018 0.00 0.00 0.108 C +ATOM 1607 C LEU 164 -45.581 45.946 60.874 0.00 0.00 0.192 C +ATOM 1608 O LEU 164 -46.054 45.862 62.029 0.00 0.00 -0.389 OA +ATOM 1609 CB LEU 164 -45.120 43.511 60.912 0.00 0.00 0.033 C +ATOM 1610 CG LEU 164 -45.953 43.302 62.179 0.00 0.00 0.007 C +ATOM 1611 CD1 LEU 164 -45.442 42.102 62.978 0.00 0.00 0.012 C +ATOM 1612 CD2 LEU 164 -45.997 44.577 63.023 0.00 0.00 0.172 C +ATOM 1613 ZN ZN4 490 -32.456 27.866 62.346 0.00 0.00 2.000 Zn +TER 1614 ZN4 490 diff --git a/unidock/unitest/ParseTests/parse_pdbqt_test.cpp b/unidock/unitest/ParseTests/parse_pdbqt_test.cpp new file mode 100644 index 0000000..1fc3709 --- /dev/null +++ b/unidock/unitest/ParseTests/parse_pdbqt_test.cpp @@ -0,0 +1,18 @@ +#include "../catch_amalgamated.hpp" +#include "parse_pdbqt.h" +#include "atom.h" +// #include "parse_pdbqt.cpp" + +TEST_CASE("parse pdbqt rigid", "[parse_pdbqt_rigid]") { + // 假设你有一个有效的PDBQT文件路径 + std::string valid_pdbqt_receptor_path = "../unitest/ParseTests/def.pdbqt"; + rigid r; + REQUIRE_NOTHROW(parse_pdbqt_rigid(valid_pdbqt_receptor_path, r)); + REQUIRE(r.atoms.size() == 1613); // 假设你的atom解析函数会添加到atoms向量 + // // 测试正常情况 + // // REQUIRE_NOTHROW(parse_receptor_pdbqt(valid_pdbqt_receptor_path)); + // // atom_type::t atype; + // // pdbqt_initializer tmp(atype); + // model m = parse_receptor_pdbqt(valid_pdbqt_receptor_path); + // std::cout <<"aaaaaaaaaa"< form +// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. +// Many features, at point of detection, define an _INTERNAL_ macro, so they +// can be combined, en-mass, with the _NO_ forms later. + + + +#ifndef CATCH_PLATFORM_HPP_INCLUDED +#define CATCH_PLATFORM_HPP_INCLUDED + +// See e.g.: +// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html +#ifdef __APPLE__ +# include +# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ + (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) +# define CATCH_PLATFORM_MAC +# elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1) +# define CATCH_PLATFORM_IPHONE +# endif + +#elif defined(linux) || defined(__linux) || defined(__linux__) +# define CATCH_PLATFORM_LINUX + +#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) +# define CATCH_PLATFORM_WINDOWS + +# if defined( WINAPI_FAMILY ) && ( WINAPI_FAMILY == WINAPI_FAMILY_APP ) +# define CATCH_PLATFORM_WINDOWS_UWP +# endif + +#elif defined(__ORBIS__) || defined(__PROSPERO__) +# define CATCH_PLATFORM_PLAYSTATION + +#endif + +#endif // CATCH_PLATFORM_HPP_INCLUDED + +#ifdef __cplusplus + +# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) +# define CATCH_CPP14_OR_GREATER +# endif + +# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define CATCH_CPP17_OR_GREATER +# endif + +#endif + +// Only GCC compiler should be used in this block, so other compilers trying to +// mask themselves as GCC should be ignored. +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) && !defined(__NVCOMPILER) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) + +// This only works on GCC 9+. so we have to also add a global suppression of Wparentheses +// for older versions of GCC. +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "GCC diagnostic ignored \"-Wparentheses\"" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ + _Pragma( "GCC diagnostic ignored \"-Wunused-result\"" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + _Pragma( "GCC diagnostic ignored \"-Wunused-variable\"" ) + +# define CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ + _Pragma( "GCC diagnostic ignored \"-Wuseless-cast\"" ) + +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + _Pragma( "GCC diagnostic ignored \"-Wshadow\"" ) + +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) + +#endif + +#if defined(__NVCOMPILER) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "diag push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "diag pop" ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress declared_but_not_referenced" ) +#endif + +#if defined(__CUDACC__) && !defined(__clang__) +# ifdef __NVCC_DIAG_PRAGMA_SUPPORT__ +// New pragmas introduced in CUDA 11.5+ +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "nv_diagnostic pop" ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" ) +# else +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "diag_suppress 177" ) +# endif +#endif + +// clang-cl defines _MSC_VER as well as __clang__, which could cause the +// start/stop internal suppression macros to be double defined. +#if defined(__clang__) && !defined(_MSC_VER) + +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) + +#endif // __clang__ && !_MSC_VER + +#if defined(__clang__) + +// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug +// which results in calls to destructors being emitted for each temporary, +// without a matching initialization. In practice, this can result in something +// like `std::string::~string` being called on an uninitialized value. +// +// For example, this code will likely segfault under IBM XL: +// ``` +// REQUIRE(std::string("12") + "34" == "1234") +// ``` +// +// Similarly, NVHPC's implementation of `__builtin_constant_p` has a bug which +// results in calls to the immediately evaluated lambda expressions to be +// reported as unevaluated lambdas. +// https://developer.nvidia.com/nvidia_bug/3321845. +// +// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. +# if !defined(__ibmxl__) && !defined(__CUDACC__) && !defined( __NVCOMPILER ) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ +# endif + + +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ + _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") + +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) + +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wunused-template\"" ) + +# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wcomma\"" ) + +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wshadow\"" ) + +#endif // __clang__ + + +//////////////////////////////////////////////////////////////////////////////// +// We know some environments not to support full POSIX signals +#if defined( CATCH_PLATFORM_WINDOWS ) || \ + defined( CATCH_PLATFORM_PLAYSTATION ) || \ + defined( __CYGWIN__ ) || \ + defined( __QNX__ ) || \ + defined( __EMSCRIPTEN__ ) || \ + defined( __DJGPP__ ) || \ + defined( __OS400__ ) +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#else +# define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Assume that some platforms do not support getenv. +#if defined( CATCH_PLATFORM_WINDOWS_UWP ) || \ + defined( CATCH_PLATFORM_PLAYSTATION ) || \ + defined( _GAMING_XBOX ) +# define CATCH_INTERNAL_CONFIG_NO_GETENV +#else +# define CATCH_INTERNAL_CONFIG_GETENV +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Android somehow still does not support std::to_string +#if defined(__ANDROID__) +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Not all Windows environments support SEH properly +#if defined(__MINGW32__) +# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH +#endif + +//////////////////////////////////////////////////////////////////////////////// +// PS4 +#if defined(__ORBIS__) +# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Cygwin +#ifdef __CYGWIN__ + +// Required for some versions of Cygwin to declare gettimeofday +// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin +# define _BSD_SOURCE +// some versions of cygwin (most) do not support std::to_string. Use the libstd check. +// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 +# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING + +# endif +#endif // __CYGWIN__ + +//////////////////////////////////////////////////////////////////////////////// +// Visual C++ +#if defined(_MSC_VER) + +// We want to defer to nvcc-specific warning suppression if we are compiled +// with nvcc masquerading for MSVC. +# if !defined( __CUDACC__ ) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + __pragma( warning( push ) ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + __pragma( warning( pop ) ) +# endif + +// Universal Windows platform does not support SEH +// Or console colours (or console at all...) +# if defined(CATCH_PLATFORM_WINDOWS_UWP) +# define CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32 +# else +# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH +# endif + +// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ +// _MSVC_TRADITIONAL == 0 means new conformant preprocessor +// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor +# if !defined(__clang__) // Handle Clang masquerading for msvc +# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) +# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +# endif // MSVC_TRADITIONAL +# endif // __clang__ + +#endif // _MSC_VER + +#if defined(_REENTRANT) || defined(_MSC_VER) +// Enable async processing, as -pthread is specified or no additional linking is required +# define CATCH_INTERNAL_CONFIG_USE_ASYNC +#endif // _MSC_VER + +//////////////////////////////////////////////////////////////////////////////// +// Check if we are compiled with -fno-exceptions or equivalent +#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) +# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED +#endif + + +//////////////////////////////////////////////////////////////////////////////// +// Embarcadero C++Build +#if defined(__BORLANDC__) + #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// RTX is a special version of Windows that is real time. +// This means that it is detected as Windows, but does not provide +// the same set of capabilities as real Windows does. +#if defined(UNDER_RTSS) || defined(RTX64_BUILD) + #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH + #define CATCH_INTERNAL_CONFIG_NO_ASYNC + #define CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32 +#endif + +#if !defined(_GLIBCXX_USE_C99_MATH_TR1) +#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER +#endif + +// Various stdlib support checks that require __has_include +#if defined(__has_include) + // Check if string_view is available and usable + #if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW + #endif + + // Check if optional is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) + + // Check if byte is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # include + # if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0) + # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # endif + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) + + // Check if variant is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # if defined(__clang__) && (__clang_major__ < 8) + // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 + // fix should be in clang 8, workaround in libstdc++ 8.2 + # include + # if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) + # define CATCH_CONFIG_NO_CPP17_VARIANT + # else + # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT + # endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) + # else + # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT + # endif // defined(__clang__) && (__clang_major__ < 8) + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) +#endif // defined(__has_include) + + +#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) +# define CATCH_CONFIG_WINDOWS_SEH +#endif +// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. +#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) +# define CATCH_CONFIG_POSIX_SIGNALS +#endif + +#if defined(CATCH_INTERNAL_CONFIG_GETENV) && !defined(CATCH_INTERNAL_CONFIG_NO_GETENV) && !defined(CATCH_CONFIG_NO_GETENV) && !defined(CATCH_CONFIG_GETENV) +# define CATCH_CONFIG_GETENV +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) +# define CATCH_CONFIG_CPP11_TO_STRING +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) +# define CATCH_CONFIG_CPP17_OPTIONAL +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) +# define CATCH_CONFIG_CPP17_STRING_VIEW +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) +# define CATCH_CONFIG_CPP17_VARIANT +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE) +# define CATCH_CONFIG_CPP17_BYTE +#endif + + +#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) +# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE +#endif + +#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) +# define CATCH_CONFIG_NEW_CAPTURE +#endif + +#if !defined( CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED ) && \ + !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS ) && \ + !defined( CATCH_CONFIG_NO_DISABLE_EXCEPTIONS ) +# define CATCH_CONFIG_DISABLE_EXCEPTIONS +#endif + +#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) +# define CATCH_CONFIG_POLYFILL_ISNAN +#endif + +#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) +# define CATCH_CONFIG_USE_ASYNC +#endif + +#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) +# define CATCH_CONFIG_GLOBAL_NEXTAFTER +#endif + + +// Even if we do not think the compiler has that warning, we still have +// to provide a macro that can be used by the code. +#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION +#endif +#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS +#endif +#if !defined( CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif +#if !defined( CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS +#endif +#if !defined( CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS ) +# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS +#endif + + +// The goal of this macro is to avoid evaluation of the arguments, but +// still have the compiler warn on problems inside... +#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) +#endif + +#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10) +# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#elif defined(__clang__) && (__clang_major__ < 5) +# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif + + +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +#define CATCH_TRY if ((true)) +#define CATCH_CATCH_ALL if ((false)) +#define CATCH_CATCH_ANON(type) if ((false)) +#else +#define CATCH_TRY try +#define CATCH_CATCH_ALL catch (...) +#define CATCH_CATCH_ANON(type) catch (type) +#endif + +#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) +#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#endif + +#if defined( CATCH_PLATFORM_WINDOWS ) && \ + !defined( CATCH_CONFIG_COLOUR_WIN32 ) && \ + !defined( CATCH_CONFIG_NO_COLOUR_WIN32 ) && \ + !defined( CATCH_INTERNAL_CONFIG_NO_COLOUR_WIN32 ) +# define CATCH_CONFIG_COLOUR_WIN32 +#endif + +#if defined( CATCH_CONFIG_SHARED_LIBRARY ) && defined( _MSC_VER ) && \ + !defined( CATCH_CONFIG_STATIC ) +# ifdef Catch2_EXPORTS +# define CATCH_EXPORT //__declspec( dllexport ) // not needed +# else +# define CATCH_EXPORT __declspec( dllimport ) +# endif +#else +# define CATCH_EXPORT +#endif + +#endif // CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED + + +#ifndef CATCH_CONTEXT_HPP_INCLUDED +#define CATCH_CONTEXT_HPP_INCLUDED + + +namespace Catch { + + class IResultCapture; + class IConfig; + + class Context { + IConfig const* m_config = nullptr; + IResultCapture* m_resultCapture = nullptr; + + CATCH_EXPORT static Context* currentContext; + friend Context& getCurrentMutableContext(); + friend Context const& getCurrentContext(); + static void createContext(); + friend void cleanUpContext(); + + public: + IResultCapture* getResultCapture() const { return m_resultCapture; } + IConfig const* getConfig() const { return m_config; } + void setResultCapture( IResultCapture* resultCapture ); + void setConfig( IConfig const* config ); + }; + + Context& getCurrentMutableContext(); + + inline Context const& getCurrentContext() { + // We duplicate the logic from `getCurrentMutableContext` here, + // to avoid paying the call overhead in debug mode. + if ( !Context::currentContext ) { Context::createContext(); } + // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) + return *Context::currentContext; + } + + void cleanUpContext(); + + class SimplePcg32; + SimplePcg32& sharedRng(); +} + +#endif // CATCH_CONTEXT_HPP_INCLUDED + + +#ifndef CATCH_MOVE_AND_FORWARD_HPP_INCLUDED +#define CATCH_MOVE_AND_FORWARD_HPP_INCLUDED + +#include + +//! Replacement for std::move with better compile time performance +#define CATCH_MOVE(...) static_cast&&>(__VA_ARGS__) + +//! Replacement for std::forward with better compile time performance +#define CATCH_FORWARD(...) static_cast(__VA_ARGS__) + +#endif // CATCH_MOVE_AND_FORWARD_HPP_INCLUDED + + +#ifndef CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED +#define CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED + +namespace Catch { + + //! Used to signal that an assertion macro failed + struct TestFailureException{}; + //! Used to signal that the remainder of a test should be skipped + struct TestSkipException {}; + + /** + * Outlines throwing of `TestFailureException` into a single TU + * + * Also handles `CATCH_CONFIG_DISABLE_EXCEPTIONS` for callers. + */ + [[noreturn]] void throw_test_failure_exception(); + + /** + * Outlines throwing of `TestSkipException` into a single TU + * + * Also handles `CATCH_CONFIG_DISABLE_EXCEPTIONS` for callers. + */ + [[noreturn]] void throw_test_skip_exception(); + +} // namespace Catch + +#endif // CATCH_TEST_FAILURE_EXCEPTION_HPP_INCLUDED + + +#ifndef CATCH_UNIQUE_NAME_HPP_INCLUDED +#define CATCH_UNIQUE_NAME_HPP_INCLUDED + + + + +/** \file + * Wrapper for the CONFIG configuration option + * + * When generating internal unique names, there are two options. Either + * we mix in the current line number, or mix in an incrementing number. + * We prefer the latter, using `__COUNTER__`, but users might want to + * use the former. + */ + +#ifndef CATCH_CONFIG_COUNTER_HPP_INCLUDED +#define CATCH_CONFIG_COUNTER_HPP_INCLUDED + + +#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) + #define CATCH_INTERNAL_CONFIG_COUNTER +#endif + +#if defined( CATCH_INTERNAL_CONFIG_COUNTER ) && \ + !defined( CATCH_CONFIG_NO_COUNTER ) && \ + !defined( CATCH_CONFIG_COUNTER ) +# define CATCH_CONFIG_COUNTER +#endif + + +#endif // CATCH_CONFIG_COUNTER_HPP_INCLUDED +#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line +#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) +#ifdef CATCH_CONFIG_COUNTER +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) +#else +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) +#endif + +#endif // CATCH_UNIQUE_NAME_HPP_INCLUDED + + +#ifndef CATCH_INTERFACES_CAPTURE_HPP_INCLUDED +#define CATCH_INTERFACES_CAPTURE_HPP_INCLUDED + +#include +#include + + + +#ifndef CATCH_STRINGREF_HPP_INCLUDED +#define CATCH_STRINGREF_HPP_INCLUDED + +#include +#include +#include +#include + +#include + +namespace Catch { + + /// A non-owning string class (similar to the forthcoming std::string_view) + /// Note that, because a StringRef may be a substring of another string, + /// it may not be null terminated. + class StringRef { + public: + using size_type = std::size_t; + using const_iterator = const char*; + + static constexpr size_type npos{ static_cast( -1 ) }; + + private: + static constexpr char const* const s_empty = ""; + + char const* m_start = s_empty; + size_type m_size = 0; + + public: // construction + constexpr StringRef() noexcept = default; + + StringRef( char const* rawChars ) noexcept; + + constexpr StringRef( char const* rawChars, size_type size ) noexcept + : m_start( rawChars ), + m_size( size ) + {} + + StringRef( std::string const& stdString ) noexcept + : m_start( stdString.c_str() ), + m_size( stdString.size() ) + {} + + explicit operator std::string() const { + return std::string(m_start, m_size); + } + + public: // operators + auto operator == ( StringRef other ) const noexcept -> bool { + return m_size == other.m_size + && (std::memcmp( m_start, other.m_start, m_size ) == 0); + } + auto operator != (StringRef other) const noexcept -> bool { + return !(*this == other); + } + + constexpr auto operator[] ( size_type index ) const noexcept -> char { + assert(index < m_size); + return m_start[index]; + } + + bool operator<(StringRef rhs) const noexcept; + + public: // named queries + constexpr auto empty() const noexcept -> bool { + return m_size == 0; + } + constexpr auto size() const noexcept -> size_type { + return m_size; + } + + // Returns a substring of [start, start + length). + // If start + length > size(), then the substring is [start, size()). + // If start > size(), then the substring is empty. + constexpr StringRef substr(size_type start, size_type length) const noexcept { + if (start < m_size) { + const auto shortened_size = m_size - start; + return StringRef(m_start + start, (shortened_size < length) ? shortened_size : length); + } else { + return StringRef(); + } + } + + // Returns the current start pointer. May not be null-terminated. + constexpr char const* data() const noexcept { + return m_start; + } + + constexpr const_iterator begin() const { return m_start; } + constexpr const_iterator end() const { return m_start + m_size; } + + + friend std::string& operator += (std::string& lhs, StringRef sr); + friend std::ostream& operator << (std::ostream& os, StringRef sr); + friend std::string operator+(StringRef lhs, StringRef rhs); + + /** + * Provides a three-way comparison with rhs + * + * Returns negative number if lhs < rhs, 0 if lhs == rhs, and a positive + * number if lhs > rhs + */ + int compare( StringRef rhs ) const; + }; + + + constexpr auto operator ""_sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { + return StringRef( rawChars, size ); + } +} // namespace Catch + +constexpr auto operator ""_catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { + return Catch::StringRef( rawChars, size ); +} + +#endif // CATCH_STRINGREF_HPP_INCLUDED + + +#ifndef CATCH_RESULT_TYPE_HPP_INCLUDED +#define CATCH_RESULT_TYPE_HPP_INCLUDED + +namespace Catch { + + // ResultWas::OfType enum + struct ResultWas { enum OfType { + Unknown = -1, + Ok = 0, + Info = 1, + Warning = 2, + // TODO: Should explicit skip be considered "not OK" (cf. isOk)? I.e., should it have the failure bit? + ExplicitSkip = 4, + + FailureBit = 0x10, + + ExpressionFailed = FailureBit | 1, + ExplicitFailure = FailureBit | 2, + + Exception = 0x100 | FailureBit, + + ThrewException = Exception | 1, + DidntThrowException = Exception | 2, + + FatalErrorCondition = 0x200 | FailureBit + + }; }; + + bool isOk( ResultWas::OfType resultType ); + bool isJustInfo( int flags ); + + + // ResultDisposition::Flags enum + struct ResultDisposition { enum Flags { + Normal = 0x01, + + ContinueOnFailure = 0x02, // Failures fail test, but execution continues + FalseTest = 0x04, // Prefix expression with ! + SuppressFail = 0x08 // Failures are reported but do not fail the test + }; }; + + ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ); + + bool shouldContinueOnFailure( int flags ); + inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; } + bool shouldSuppressFailure( int flags ); + +} // end namespace Catch + +#endif // CATCH_RESULT_TYPE_HPP_INCLUDED + + +#ifndef CATCH_UNIQUE_PTR_HPP_INCLUDED +#define CATCH_UNIQUE_PTR_HPP_INCLUDED + +#include +#include + + +namespace Catch { +namespace Detail { + /** + * A reimplementation of `std::unique_ptr` for improved compilation performance + * + * Does not support arrays nor custom deleters. + */ + template + class unique_ptr { + T* m_ptr; + public: + constexpr unique_ptr(std::nullptr_t = nullptr): + m_ptr{} + {} + explicit constexpr unique_ptr(T* ptr): + m_ptr(ptr) + {} + + template ::value>> + unique_ptr(unique_ptr&& from): + m_ptr(from.release()) + {} + + template ::value>> + unique_ptr& operator=(unique_ptr&& from) { + reset(from.release()); + + return *this; + } + + unique_ptr(unique_ptr const&) = delete; + unique_ptr& operator=(unique_ptr const&) = delete; + + unique_ptr(unique_ptr&& rhs) noexcept: + m_ptr(rhs.m_ptr) { + rhs.m_ptr = nullptr; + } + unique_ptr& operator=(unique_ptr&& rhs) noexcept { + reset(rhs.release()); + + return *this; + } + + ~unique_ptr() { + delete m_ptr; + } + + T& operator*() { + assert(m_ptr); + return *m_ptr; + } + T const& operator*() const { + assert(m_ptr); + return *m_ptr; + } + T* operator->() noexcept { + assert(m_ptr); + return m_ptr; + } + T const* operator->() const noexcept { + assert(m_ptr); + return m_ptr; + } + + T* get() { return m_ptr; } + T const* get() const { return m_ptr; } + + void reset(T* ptr = nullptr) { + delete m_ptr; + m_ptr = ptr; + } + + T* release() { + auto temp = m_ptr; + m_ptr = nullptr; + return temp; + } + + explicit operator bool() const { + return m_ptr; + } + + friend void swap(unique_ptr& lhs, unique_ptr& rhs) { + auto temp = lhs.m_ptr; + lhs.m_ptr = rhs.m_ptr; + rhs.m_ptr = temp; + } + }; + + //! Specialization to cause compile-time error for arrays + template + class unique_ptr; + + template + unique_ptr make_unique(Args&&... args) { + return unique_ptr(new T(CATCH_FORWARD(args)...)); + } + + +} // end namespace Detail +} // end namespace Catch + +#endif // CATCH_UNIQUE_PTR_HPP_INCLUDED + + +#ifndef CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED +#define CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_CLOCK_HPP_INCLUDED +#define CATCH_CLOCK_HPP_INCLUDED + +#include + +namespace Catch { + namespace Benchmark { + using IDuration = std::chrono::nanoseconds; + using FDuration = std::chrono::duration; + + template + using TimePoint = typename Clock::time_point; + + using default_clock = std::chrono::steady_clock; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_CLOCK_HPP_INCLUDED + +namespace Catch { + + // We cannot forward declare the type with default template argument + // multiple times, so it is split out into a separate header so that + // we can prevent multiple declarations in dependees + template + struct BenchmarkStats; + +} // end namespace Catch + +#endif // CATCH_BENCHMARK_STATS_FWD_HPP_INCLUDED + +namespace Catch { + + class AssertionResult; + struct AssertionInfo; + struct SectionInfo; + struct SectionEndInfo; + struct MessageInfo; + struct MessageBuilder; + struct Counts; + struct AssertionReaction; + struct SourceLineInfo; + + class ITransientExpression; + class IGeneratorTracker; + + struct BenchmarkInfo; + + namespace Generators { + class GeneratorUntypedBase; + using GeneratorBasePtr = Catch::Detail::unique_ptr; + } + + + class IResultCapture { + public: + virtual ~IResultCapture(); + + virtual void notifyAssertionStarted( AssertionInfo const& info ) = 0; + virtual bool sectionStarted( StringRef sectionName, + SourceLineInfo const& sectionLineInfo, + Counts& assertions ) = 0; + virtual void sectionEnded( SectionEndInfo&& endInfo ) = 0; + virtual void sectionEndedEarly( SectionEndInfo&& endInfo ) = 0; + + virtual IGeneratorTracker* + acquireGeneratorTracker( StringRef generatorName, + SourceLineInfo const& lineInfo ) = 0; + virtual IGeneratorTracker* + createGeneratorTracker( StringRef generatorName, + SourceLineInfo lineInfo, + Generators::GeneratorBasePtr&& generator ) = 0; + + virtual void benchmarkPreparing( StringRef name ) = 0; + virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0; + virtual void benchmarkEnded( BenchmarkStats<> const& stats ) = 0; + virtual void benchmarkFailed( StringRef error ) = 0; + + virtual void pushScopedMessage( MessageInfo const& message ) = 0; + virtual void popScopedMessage( MessageInfo const& message ) = 0; + + virtual void emplaceUnscopedMessage( MessageBuilder&& builder ) = 0; + + virtual void handleFatalErrorCondition( StringRef message ) = 0; + + virtual void handleExpr + ( AssertionInfo const& info, + ITransientExpression const& expr, + AssertionReaction& reaction ) = 0; + virtual void handleMessage + ( AssertionInfo const& info, + ResultWas::OfType resultType, + StringRef message, + AssertionReaction& reaction ) = 0; + virtual void handleUnexpectedExceptionNotThrown + ( AssertionInfo const& info, + AssertionReaction& reaction ) = 0; + virtual void handleUnexpectedInflightException + ( AssertionInfo const& info, + std::string&& message, + AssertionReaction& reaction ) = 0; + virtual void handleIncomplete + ( AssertionInfo const& info ) = 0; + virtual void handleNonExpr + ( AssertionInfo const &info, + ResultWas::OfType resultType, + AssertionReaction &reaction ) = 0; + + + + virtual bool lastAssertionPassed() = 0; + virtual void assertionPassed() = 0; + + // Deprecated, do not use: + virtual std::string getCurrentTestName() const = 0; + virtual const AssertionResult* getLastResult() const = 0; + virtual void exceptionEarlyReported() = 0; + }; + + IResultCapture& getResultCapture(); +} + +#endif // CATCH_INTERFACES_CAPTURE_HPP_INCLUDED + + +#ifndef CATCH_INTERFACES_CONFIG_HPP_INCLUDED +#define CATCH_INTERFACES_CONFIG_HPP_INCLUDED + + + +#ifndef CATCH_NONCOPYABLE_HPP_INCLUDED +#define CATCH_NONCOPYABLE_HPP_INCLUDED + +namespace Catch { + namespace Detail { + + //! Deriving classes become noncopyable and nonmovable + class NonCopyable { + NonCopyable( NonCopyable const& ) = delete; + NonCopyable( NonCopyable&& ) = delete; + NonCopyable& operator=( NonCopyable const& ) = delete; + NonCopyable& operator=( NonCopyable&& ) = delete; + + protected: + NonCopyable() noexcept = default; + }; + + } // namespace Detail +} // namespace Catch + +#endif // CATCH_NONCOPYABLE_HPP_INCLUDED + +#include +#include +#include +#include + +namespace Catch { + + enum class Verbosity { + Quiet = 0, + Normal, + High + }; + + struct WarnAbout { enum What { + Nothing = 0x00, + //! A test case or leaf section did not run any assertions + NoAssertions = 0x01, + //! A command line test spec matched no test cases + UnmatchedTestSpec = 0x02, + }; }; + + enum class ShowDurations { + DefaultForReporter, + Always, + Never + }; + enum class TestRunOrder { + Declared, + LexicographicallySorted, + Randomized + }; + enum class ColourMode : std::uint8_t { + //! Let Catch2 pick implementation based on platform detection + PlatformDefault, + //! Use ANSI colour code escapes + ANSI, + //! Use Win32 console colour API + Win32, + //! Don't use any colour + None + }; + struct WaitForKeypress { enum When { + Never, + BeforeStart = 1, + BeforeExit = 2, + BeforeStartAndExit = BeforeStart | BeforeExit + }; }; + + class TestSpec; + class IStream; + + class IConfig : public Detail::NonCopyable { + public: + virtual ~IConfig(); + + virtual bool allowThrows() const = 0; + virtual StringRef name() const = 0; + virtual bool includeSuccessfulResults() const = 0; + virtual bool shouldDebugBreak() const = 0; + virtual bool warnAboutMissingAssertions() const = 0; + virtual bool warnAboutUnmatchedTestSpecs() const = 0; + virtual bool zeroTestsCountAsSuccess() const = 0; + virtual int abortAfter() const = 0; + virtual bool showInvisibles() const = 0; + virtual ShowDurations showDurations() const = 0; + virtual double minDuration() const = 0; + virtual TestSpec const& testSpec() const = 0; + virtual bool hasTestFilters() const = 0; + virtual std::vector const& getTestsOrTags() const = 0; + virtual TestRunOrder runOrder() const = 0; + virtual uint32_t rngSeed() const = 0; + virtual unsigned int shardCount() const = 0; + virtual unsigned int shardIndex() const = 0; + virtual ColourMode defaultColourMode() const = 0; + virtual std::vector const& getSectionsToRun() const = 0; + virtual Verbosity verbosity() const = 0; + + virtual bool skipBenchmarks() const = 0; + virtual bool benchmarkNoAnalysis() const = 0; + virtual unsigned int benchmarkSamples() const = 0; + virtual double benchmarkConfidenceInterval() const = 0; + virtual unsigned int benchmarkResamples() const = 0; + virtual std::chrono::milliseconds benchmarkWarmupTime() const = 0; + }; +} + +#endif // CATCH_INTERFACES_CONFIG_HPP_INCLUDED + + +#ifndef CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED +#define CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED + + +#include + +namespace Catch { + + class TestCaseHandle; + struct TestCaseInfo; + class ITestCaseRegistry; + class IExceptionTranslatorRegistry; + class IExceptionTranslator; + class ReporterRegistry; + class IReporterFactory; + class ITagAliasRegistry; + class ITestInvoker; + class IMutableEnumValuesRegistry; + struct SourceLineInfo; + + class StartupExceptionRegistry; + class EventListenerFactory; + + using IReporterFactoryPtr = Detail::unique_ptr; + + class IRegistryHub { + public: + virtual ~IRegistryHub(); // = default + + virtual ReporterRegistry const& getReporterRegistry() const = 0; + virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0; + virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0; + virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0; + + + virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0; + }; + + class IMutableRegistryHub { + public: + virtual ~IMutableRegistryHub(); // = default + virtual void registerReporter( std::string const& name, IReporterFactoryPtr factory ) = 0; + virtual void registerListener( Detail::unique_ptr factory ) = 0; + virtual void registerTest(Detail::unique_ptr&& testInfo, Detail::unique_ptr&& invoker) = 0; + virtual void registerTranslator( Detail::unique_ptr&& translator ) = 0; + virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0; + virtual void registerStartupException() noexcept = 0; + virtual IMutableEnumValuesRegistry& getMutableEnumValuesRegistry() = 0; + }; + + IRegistryHub const& getRegistryHub(); + IMutableRegistryHub& getMutableRegistryHub(); + void cleanUp(); + std::string translateActiveException(); + +} + +#endif // CATCH_INTERFACES_REGISTRY_HUB_HPP_INCLUDED + + +#ifndef CATCH_BENCHMARK_STATS_HPP_INCLUDED +#define CATCH_BENCHMARK_STATS_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_ESTIMATE_HPP_INCLUDED +#define CATCH_ESTIMATE_HPP_INCLUDED + +namespace Catch { + namespace Benchmark { + template + struct Estimate { + Type point; + Type lower_bound; + Type upper_bound; + double confidence_interval; + }; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_ESTIMATE_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_OUTLIER_CLASSIFICATION_HPP_INCLUDED +#define CATCH_OUTLIER_CLASSIFICATION_HPP_INCLUDED + +namespace Catch { + namespace Benchmark { + struct OutlierClassification { + int samples_seen = 0; + int low_severe = 0; // more than 3 times IQR below Q1 + int low_mild = 0; // 1.5 to 3 times IQR below Q1 + int high_mild = 0; // 1.5 to 3 times IQR above Q3 + int high_severe = 0; // more than 3 times IQR above Q3 + + int total() const { + return low_severe + low_mild + high_mild + high_severe; + } + }; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_OUTLIERS_CLASSIFICATION_HPP_INCLUDED +// The fwd decl & default specialization needs to be seen by VS2017 before +// BenchmarkStats itself, or VS2017 will report compilation error. + +#include +#include + +namespace Catch { + + struct BenchmarkInfo { + std::string name; + double estimatedDuration; + int iterations; + unsigned int samples; + unsigned int resamples; + double clockResolution; + double clockCost; + }; + + // We need to keep template parameter for backwards compatibility, + // but we also do not want to use the template paraneter. + template + struct BenchmarkStats { + BenchmarkInfo info; + + std::vector samples; + Benchmark::Estimate mean; + Benchmark::Estimate standardDeviation; + Benchmark::OutlierClassification outliers; + double outlierVariance; + }; + + +} // end namespace Catch + +#endif // CATCH_BENCHMARK_STATS_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_ENVIRONMENT_HPP_INCLUDED +#define CATCH_ENVIRONMENT_HPP_INCLUDED + + +namespace Catch { + namespace Benchmark { + struct EnvironmentEstimate { + FDuration mean; + OutlierClassification outliers; + }; + struct Environment { + EnvironmentEstimate clock_resolution; + EnvironmentEstimate clock_cost; + }; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_ENVIRONMENT_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_EXECUTION_PLAN_HPP_INCLUDED +#define CATCH_EXECUTION_PLAN_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED +#define CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_CHRONOMETER_HPP_INCLUDED +#define CATCH_CHRONOMETER_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_OPTIMIZER_HPP_INCLUDED +#define CATCH_OPTIMIZER_HPP_INCLUDED + +#if defined(_MSC_VER) || defined(__IAR_SYSTEMS_ICC__) +# include // atomic_thread_fence +#endif + + +#include + +namespace Catch { + namespace Benchmark { +#if defined(__GNUC__) || defined(__clang__) + template + inline void keep_memory(T* p) { + asm volatile("" : : "g"(p) : "memory"); + } + inline void keep_memory() { + asm volatile("" : : : "memory"); + } + + namespace Detail { + inline void optimizer_barrier() { keep_memory(); } + } // namespace Detail +#elif defined(_MSC_VER) || defined(__IAR_SYSTEMS_ICC__) + +#if defined(_MSVC_VER) +#pragma optimize("", off) +#elif defined(__IAR_SYSTEMS_ICC__) +// For IAR the pragma only affects the following function +#pragma optimize=disable +#endif + template + inline void keep_memory(T* p) { + // thanks @milleniumbug + *reinterpret_cast(p) = *reinterpret_cast(p); + } + // TODO equivalent keep_memory() +#if defined(_MSVC_VER) +#pragma optimize("", on) +#endif + + namespace Detail { + inline void optimizer_barrier() { + std::atomic_thread_fence(std::memory_order_seq_cst); + } + } // namespace Detail + +#endif + + template + inline void deoptimize_value(T&& x) { + keep_memory(&x); + } + + template + inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> std::enable_if_t::value> { + deoptimize_value(CATCH_FORWARD(fn) (CATCH_FORWARD(args)...)); + } + + template + inline auto invoke_deoptimized(Fn&& fn, Args&&... args) -> std::enable_if_t::value> { + CATCH_FORWARD((fn)) (CATCH_FORWARD(args)...); + } + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_OPTIMIZER_HPP_INCLUDED + + +#ifndef CATCH_META_HPP_INCLUDED +#define CATCH_META_HPP_INCLUDED + +#include + +namespace Catch { + template + struct true_given : std::true_type {}; + + struct is_callable_tester { + template + static true_given()(std::declval()...))> test(int); + template + static std::false_type test(...); + }; + + template + struct is_callable; + + template + struct is_callable : decltype(is_callable_tester::test(0)) {}; + + +#if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703 + // std::result_of is deprecated in C++17 and removed in C++20. Hence, it is + // replaced with std::invoke_result here. + template + using FunctionReturnType = std::remove_reference_t>>; +#else + template + using FunctionReturnType = std::remove_reference_t>>; +#endif + +} // namespace Catch + +namespace mpl_{ + struct na; +} + +#endif // CATCH_META_HPP_INCLUDED + +namespace Catch { + namespace Benchmark { + namespace Detail { + struct ChronometerConcept { + virtual void start() = 0; + virtual void finish() = 0; + virtual ~ChronometerConcept(); // = default; + + ChronometerConcept() = default; + ChronometerConcept(ChronometerConcept const&) = default; + ChronometerConcept& operator=(ChronometerConcept const&) = default; + }; + template + struct ChronometerModel final : public ChronometerConcept { + void start() override { started = Clock::now(); } + void finish() override { finished = Clock::now(); } + + IDuration elapsed() const { + return std::chrono::duration_cast( + finished - started ); + } + + TimePoint started; + TimePoint finished; + }; + } // namespace Detail + + struct Chronometer { + public: + template + void measure(Fun&& fun) { measure(CATCH_FORWARD(fun), is_callable()); } + + int runs() const { return repeats; } + + Chronometer(Detail::ChronometerConcept& meter, int repeats_) + : impl(&meter) + , repeats(repeats_) {} + + private: + template + void measure(Fun&& fun, std::false_type) { + measure([&fun](int) { return fun(); }, std::true_type()); + } + + template + void measure(Fun&& fun, std::true_type) { + Detail::optimizer_barrier(); + impl->start(); + for (int i = 0; i < repeats; ++i) invoke_deoptimized(fun, i); + impl->finish(); + Detail::optimizer_barrier(); + } + + Detail::ChronometerConcept* impl; + int repeats; + }; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_CHRONOMETER_HPP_INCLUDED + +#include + +namespace Catch { + namespace Benchmark { + namespace Detail { + template + struct is_related + : std::is_same, std::decay_t> {}; + + /// We need to reinvent std::function because every piece of code that might add overhead + /// in a measurement context needs to have consistent performance characteristics so that we + /// can account for it in the measurement. + /// Implementations of std::function with optimizations that aren't always applicable, like + /// small buffer optimizations, are not uncommon. + /// This is effectively an implementation of std::function without any such optimizations; + /// it may be slow, but it is consistently slow. + struct BenchmarkFunction { + private: + struct callable { + virtual void call(Chronometer meter) const = 0; + virtual Catch::Detail::unique_ptr clone() const = 0; + virtual ~callable(); // = default; + + callable() = default; + callable(callable const&) = default; + callable& operator=(callable const&) = default; + }; + template + struct model : public callable { + model(Fun&& fun_) : fun(CATCH_MOVE(fun_)) {} + model(Fun const& fun_) : fun(fun_) {} + + Catch::Detail::unique_ptr clone() const override { + return Catch::Detail::make_unique>( *this ); + } + + void call(Chronometer meter) const override { + call(meter, is_callable()); + } + void call(Chronometer meter, std::true_type) const { + fun(meter); + } + void call(Chronometer meter, std::false_type) const { + meter.measure(fun); + } + + Fun fun; + }; + + struct do_nothing { void operator()() const {} }; + + template + BenchmarkFunction(model* c) : f(c) {} + + public: + BenchmarkFunction() + : f(new model{ {} }) {} + + template ::value, int> = 0> + BenchmarkFunction(Fun&& fun) + : f(new model>(CATCH_FORWARD(fun))) {} + + BenchmarkFunction( BenchmarkFunction&& that ) noexcept: + f( CATCH_MOVE( that.f ) ) {} + + BenchmarkFunction(BenchmarkFunction const& that) + : f(that.f->clone()) {} + + BenchmarkFunction& + operator=( BenchmarkFunction&& that ) noexcept { + f = CATCH_MOVE( that.f ); + return *this; + } + + BenchmarkFunction& operator=(BenchmarkFunction const& that) { + f = that.f->clone(); + return *this; + } + + void operator()(Chronometer meter) const { f->call(meter); } + + private: + Catch::Detail::unique_ptr f; + }; + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_BENCHMARK_FUNCTION_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_REPEAT_HPP_INCLUDED +#define CATCH_REPEAT_HPP_INCLUDED + +#include + +namespace Catch { + namespace Benchmark { + namespace Detail { + template + struct repeater { + void operator()(int k) const { + for (int i = 0; i < k; ++i) { + fun(); + } + } + Fun fun; + }; + template + repeater> repeat(Fun&& fun) { + return { CATCH_FORWARD(fun) }; + } + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_REPEAT_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED +#define CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_MEASURE_HPP_INCLUDED +#define CATCH_MEASURE_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_COMPLETE_INVOKE_HPP_INCLUDED +#define CATCH_COMPLETE_INVOKE_HPP_INCLUDED + + +namespace Catch { + namespace Benchmark { + namespace Detail { + template + struct CompleteType { using type = T; }; + template <> + struct CompleteType { struct type {}; }; + + template + using CompleteType_t = typename CompleteType::type; + + template + struct CompleteInvoker { + template + static Result invoke(Fun&& fun, Args&&... args) { + return CATCH_FORWARD(fun)(CATCH_FORWARD(args)...); + } + }; + template <> + struct CompleteInvoker { + template + static CompleteType_t invoke(Fun&& fun, Args&&... args) { + CATCH_FORWARD(fun)(CATCH_FORWARD(args)...); + return {}; + } + }; + + // invoke and not return void :( + template + CompleteType_t> complete_invoke(Fun&& fun, Args&&... args) { + return CompleteInvoker>::invoke(CATCH_FORWARD(fun), CATCH_FORWARD(args)...); + } + + } // namespace Detail + + template + Detail::CompleteType_t> user_code(Fun&& fun) { + return Detail::complete_invoke(CATCH_FORWARD(fun)); + } + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_COMPLETE_INVOKE_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_TIMING_HPP_INCLUDED +#define CATCH_TIMING_HPP_INCLUDED + + +#include + +namespace Catch { + namespace Benchmark { + template + struct Timing { + IDuration elapsed; + Result result; + int iterations; + }; + template + using TimingOf = Timing>>; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_TIMING_HPP_INCLUDED + +namespace Catch { + namespace Benchmark { + namespace Detail { + template + TimingOf measure(Fun&& fun, Args&&... args) { + auto start = Clock::now(); + auto&& r = Detail::complete_invoke(fun, CATCH_FORWARD(args)...); + auto end = Clock::now(); + auto delta = end - start; + return { delta, CATCH_FORWARD(r), 1 }; + } + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_MEASURE_HPP_INCLUDED + +#include + +namespace Catch { + namespace Benchmark { + namespace Detail { + template + TimingOf measure_one(Fun&& fun, int iters, std::false_type) { + return Detail::measure(fun, iters); + } + template + TimingOf measure_one(Fun&& fun, int iters, std::true_type) { + Detail::ChronometerModel meter; + auto&& result = Detail::complete_invoke(fun, Chronometer(meter, iters)); + + return { meter.elapsed(), CATCH_MOVE(result), iters }; + } + + template + using run_for_at_least_argument_t = std::conditional_t::value, Chronometer, int>; + + + [[noreturn]] + void throw_optimized_away_error(); + + template + TimingOf> + run_for_at_least(IDuration how_long, + const int initial_iterations, + Fun&& fun) { + auto iters = initial_iterations; + while (iters < (1 << 30)) { + auto&& Timing = measure_one(fun, iters, is_callable()); + + if (Timing.elapsed >= how_long) { + return { Timing.elapsed, CATCH_MOVE(Timing.result), iters }; + } + iters *= 2; + } + throw_optimized_away_error(); + } + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED + +#include + +namespace Catch { + namespace Benchmark { + struct ExecutionPlan { + int iterations_per_sample; + FDuration estimated_duration; + Detail::BenchmarkFunction benchmark; + FDuration warmup_time; + int warmup_iterations; + + template + std::vector run(const IConfig &cfg, Environment env) const { + // warmup a bit + Detail::run_for_at_least( + std::chrono::duration_cast( warmup_time ), + warmup_iterations, + Detail::repeat( []() { return Clock::now(); } ) + ); + + std::vector times; + const auto num_samples = cfg.benchmarkSamples(); + times.reserve( num_samples ); + for ( size_t i = 0; i < num_samples; ++i ) { + Detail::ChronometerModel model; + this->benchmark( Chronometer( model, iterations_per_sample ) ); + auto sample_time = model.elapsed() - env.clock_cost.mean; + if ( sample_time < FDuration::zero() ) { + sample_time = FDuration::zero(); + } + times.push_back(sample_time / iterations_per_sample); + } + return times; + } + }; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_EXECUTION_PLAN_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_ESTIMATE_CLOCK_HPP_INCLUDED +#define CATCH_ESTIMATE_CLOCK_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_STATS_HPP_INCLUDED +#define CATCH_STATS_HPP_INCLUDED + + +#include + +namespace Catch { + namespace Benchmark { + namespace Detail { + using sample = std::vector; + + double weighted_average_quantile( int k, + int q, + double* first, + double* last ); + + OutlierClassification + classify_outliers( double const* first, double const* last ); + + double mean( double const* first, double const* last ); + + double normal_cdf( double x ); + + double erfc_inv(double x); + + double normal_quantile(double p); + + Estimate + bootstrap( double confidence_level, + double* first, + double* last, + sample const& resample, + double ( *estimator )( double const*, double const* ) ); + + struct bootstrap_analysis { + Estimate mean; + Estimate standard_deviation; + double outlier_variance; + }; + + bootstrap_analysis analyse_samples(double confidence_level, + unsigned int n_resamples, + double* first, + double* last); + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_STATS_HPP_INCLUDED + +#include +#include +#include + +namespace Catch { + namespace Benchmark { + namespace Detail { + template + std::vector resolution(int k) { + std::vector> times; + times.reserve(static_cast(k + 1)); + for ( int i = 0; i < k + 1; ++i ) { + times.push_back( Clock::now() ); + } + + std::vector deltas; + deltas.reserve(static_cast(k)); + for ( size_t idx = 1; idx < times.size(); ++idx ) { + deltas.push_back( static_cast( + ( times[idx] - times[idx - 1] ).count() ) ); + } + + return deltas; + } + + constexpr auto warmup_iterations = 10000; + constexpr auto warmup_time = std::chrono::milliseconds(100); + constexpr auto minimum_ticks = 1000; + constexpr auto warmup_seed = 10000; + constexpr auto clock_resolution_estimation_time = std::chrono::milliseconds(500); + constexpr auto clock_cost_estimation_time_limit = std::chrono::seconds(1); + constexpr auto clock_cost_estimation_tick_limit = 100000; + constexpr auto clock_cost_estimation_time = std::chrono::milliseconds(10); + constexpr auto clock_cost_estimation_iterations = 10000; + + template + int warmup() { + return run_for_at_least(warmup_time, warmup_seed, &resolution) + .iterations; + } + template + EnvironmentEstimate estimate_clock_resolution(int iterations) { + auto r = run_for_at_least(clock_resolution_estimation_time, iterations, &resolution) + .result; + return { + FDuration(mean(r.data(), r.data() + r.size())), + classify_outliers(r.data(), r.data() + r.size()), + }; + } + template + EnvironmentEstimate estimate_clock_cost(FDuration resolution) { + auto time_limit = (std::min)( + resolution * clock_cost_estimation_tick_limit, + FDuration(clock_cost_estimation_time_limit)); + auto time_clock = [](int k) { + return Detail::measure([k] { + for (int i = 0; i < k; ++i) { + volatile auto ignored = Clock::now(); + (void)ignored; + } + }).elapsed; + }; + time_clock(1); + int iters = clock_cost_estimation_iterations; + auto&& r = run_for_at_least(clock_cost_estimation_time, iters, time_clock); + std::vector times; + int nsamples = static_cast(std::ceil(time_limit / r.elapsed)); + times.reserve(static_cast(nsamples)); + for ( int s = 0; s < nsamples; ++s ) { + times.push_back( static_cast( + ( time_clock( r.iterations ) / r.iterations ) + .count() ) ); + } + return { + FDuration(mean(times.data(), times.data() + times.size())), + classify_outliers(times.data(), times.data() + times.size()), + }; + } + + template + Environment measure_environment() { +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wexit-time-destructors" +#endif + static Catch::Detail::unique_ptr env; +#if defined(__clang__) +# pragma clang diagnostic pop +#endif + if (env) { + return *env; + } + + auto iters = Detail::warmup(); + auto resolution = Detail::estimate_clock_resolution(iters); + auto cost = Detail::estimate_clock_cost(resolution.mean); + + env = Catch::Detail::make_unique( Environment{resolution, cost} ); + return *env; + } + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_ESTIMATE_CLOCK_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_ANALYSE_HPP_INCLUDED +#define CATCH_ANALYSE_HPP_INCLUDED + + + +// Adapted from donated nonius code. + +#ifndef CATCH_SAMPLE_ANALYSIS_HPP_INCLUDED +#define CATCH_SAMPLE_ANALYSIS_HPP_INCLUDED + + +#include + +namespace Catch { + namespace Benchmark { + struct SampleAnalysis { + std::vector samples; + Estimate mean; + Estimate standard_deviation; + OutlierClassification outliers; + double outlier_variance; + }; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_SAMPLE_ANALYSIS_HPP_INCLUDED + + +namespace Catch { + class IConfig; + + namespace Benchmark { + namespace Detail { + SampleAnalysis analyse(const IConfig &cfg, FDuration* first, FDuration* last); + } // namespace Detail + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_ANALYSE_HPP_INCLUDED + +#include +#include +#include +#include +#include + +namespace Catch { + namespace Benchmark { + struct Benchmark { + Benchmark(std::string&& benchmarkName) + : name(CATCH_MOVE(benchmarkName)) {} + + template + Benchmark(std::string&& benchmarkName , FUN &&func) + : fun(CATCH_MOVE(func)), name(CATCH_MOVE(benchmarkName)) {} + + template + ExecutionPlan prepare(const IConfig &cfg, Environment env) const { + auto min_time = env.clock_resolution.mean * Detail::minimum_ticks; + auto run_time = std::max(min_time, std::chrono::duration_cast(cfg.benchmarkWarmupTime())); + auto&& test = Detail::run_for_at_least(std::chrono::duration_cast(run_time), 1, fun); + int new_iters = static_cast(std::ceil(min_time * test.iterations / test.elapsed)); + return { new_iters, test.elapsed / test.iterations * new_iters * cfg.benchmarkSamples(), fun, std::chrono::duration_cast(cfg.benchmarkWarmupTime()), Detail::warmup_iterations }; + } + + template + void run() { + static_assert( Clock::is_steady, + "Benchmarking clock should be steady" ); + auto const* cfg = getCurrentContext().getConfig(); + + auto env = Detail::measure_environment(); + + getResultCapture().benchmarkPreparing(name); + CATCH_TRY{ + auto plan = user_code([&] { + return prepare(*cfg, env); + }); + + BenchmarkInfo info { + CATCH_MOVE(name), + plan.estimated_duration.count(), + plan.iterations_per_sample, + cfg->benchmarkSamples(), + cfg->benchmarkResamples(), + env.clock_resolution.mean.count(), + env.clock_cost.mean.count() + }; + + getResultCapture().benchmarkStarting(info); + + auto samples = user_code([&] { + return plan.template run(*cfg, env); + }); + + auto analysis = Detail::analyse(*cfg, samples.data(), samples.data() + samples.size()); + BenchmarkStats<> stats{ CATCH_MOVE(info), CATCH_MOVE(analysis.samples), analysis.mean, analysis.standard_deviation, analysis.outliers, analysis.outlier_variance }; + getResultCapture().benchmarkEnded(stats); + } CATCH_CATCH_ANON (TestFailureException const&) { + getResultCapture().benchmarkFailed("Benchmark failed due to failed assertion"_sr); + } CATCH_CATCH_ALL{ + getResultCapture().benchmarkFailed(translateActiveException()); + // We let the exception go further up so that the + // test case is marked as failed. + std::rethrow_exception(std::current_exception()); + } + } + + // sets lambda to be used in fun *and* executes benchmark! + template ::value, int> = 0> + Benchmark & operator=(Fun func) { + auto const* cfg = getCurrentContext().getConfig(); + if (!cfg->skipBenchmarks()) { + fun = Detail::BenchmarkFunction(func); + run(); + } + return *this; + } + + explicit operator bool() { + return true; + } + + private: + Detail::BenchmarkFunction fun; + std::string name; + }; + } +} // namespace Catch + +#define INTERNAL_CATCH_GET_1_ARG(arg1, arg2, ...) arg1 +#define INTERNAL_CATCH_GET_2_ARG(arg1, arg2, ...) arg2 + +#define INTERNAL_CATCH_BENCHMARK(BenchmarkName, name, benchmarkIndex)\ + if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \ + BenchmarkName = [&](int benchmarkIndex) + +#define INTERNAL_CATCH_BENCHMARK_ADVANCED(BenchmarkName, name)\ + if( Catch::Benchmark::Benchmark BenchmarkName{name} ) \ + BenchmarkName = [&] + +#if defined(CATCH_CONFIG_PREFIX_ALL) + +#define CATCH_BENCHMARK(...) \ + INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(CATCH2_INTERNAL_BENCHMARK_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) +#define CATCH_BENCHMARK_ADVANCED(name) \ + INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(CATCH2_INTERNAL_BENCHMARK_), name) + +#else + +#define BENCHMARK(...) \ + INTERNAL_CATCH_BENCHMARK(INTERNAL_CATCH_UNIQUE_NAME(CATCH2_INTERNAL_BENCHMARK_), INTERNAL_CATCH_GET_1_ARG(__VA_ARGS__,,), INTERNAL_CATCH_GET_2_ARG(__VA_ARGS__,,)) +#define BENCHMARK_ADVANCED(name) \ + INTERNAL_CATCH_BENCHMARK_ADVANCED(INTERNAL_CATCH_UNIQUE_NAME(CATCH2_INTERNAL_BENCHMARK_), name) + +#endif + +#endif // CATCH_BENCHMARK_HPP_INCLUDED + + +// Adapted from donated nonius code. + +#ifndef CATCH_CONSTRUCTOR_HPP_INCLUDED +#define CATCH_CONSTRUCTOR_HPP_INCLUDED + + +#include + +namespace Catch { + namespace Benchmark { + namespace Detail { + template + struct ObjectStorage + { + ObjectStorage() = default; + + ObjectStorage(const ObjectStorage& other) + { + new(&data) T(other.stored_object()); + } + + ObjectStorage(ObjectStorage&& other) + { + new(data) T(CATCH_MOVE(other.stored_object())); + } + + ~ObjectStorage() { destruct_on_exit(); } + + template + void construct(Args&&... args) + { + new (data) T(CATCH_FORWARD(args)...); + } + + template + std::enable_if_t destruct() + { + stored_object().~T(); + } + + private: + // If this is a constructor benchmark, destruct the underlying object + template + void destruct_on_exit(std::enable_if_t* = nullptr) { destruct(); } + // Otherwise, don't + template + void destruct_on_exit(std::enable_if_t* = nullptr) { } + +#if defined( __GNUC__ ) && __GNUC__ <= 6 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + T& stored_object() { return *reinterpret_cast( data ); } + + T const& stored_object() const { + return *reinterpret_cast( data ); + } +#if defined( __GNUC__ ) && __GNUC__ <= 6 +# pragma GCC diagnostic pop +#endif + + alignas( T ) unsigned char data[sizeof( T )]{}; + }; + } // namespace Detail + + template + using storage_for = Detail::ObjectStorage; + + template + using destructable_object = Detail::ObjectStorage; + } // namespace Benchmark +} // namespace Catch + +#endif // CATCH_CONSTRUCTOR_HPP_INCLUDED + +#endif // CATCH_BENCHMARK_ALL_HPP_INCLUDED + + +#ifndef CATCH_APPROX_HPP_INCLUDED +#define CATCH_APPROX_HPP_INCLUDED + + + +#ifndef CATCH_TOSTRING_HPP_INCLUDED +#define CATCH_TOSTRING_HPP_INCLUDED + + +#include +#include +#include +#include + + + + +/** \file + * Wrapper for the WCHAR configuration option + * + * We want to support platforms that do not provide `wchar_t`, so we + * sometimes have to disable providing wchar_t overloads through Catch2, + * e.g. the StringMaker specialization for `std::wstring`. + */ + +#ifndef CATCH_CONFIG_WCHAR_HPP_INCLUDED +#define CATCH_CONFIG_WCHAR_HPP_INCLUDED + + +// We assume that WCHAR should be enabled by default, and only disabled +// for a shortlist (so far only DJGPP) of compilers. + +#if defined(__DJGPP__) +# define CATCH_INTERNAL_CONFIG_NO_WCHAR +#endif // __DJGPP__ + +#if !defined( CATCH_INTERNAL_CONFIG_NO_WCHAR ) && \ + !defined( CATCH_CONFIG_NO_WCHAR ) && \ + !defined( CATCH_CONFIG_WCHAR ) +# define CATCH_CONFIG_WCHAR +#endif + +#endif // CATCH_CONFIG_WCHAR_HPP_INCLUDED + + +#ifndef CATCH_REUSABLE_STRING_STREAM_HPP_INCLUDED +#define CATCH_REUSABLE_STRING_STREAM_HPP_INCLUDED + + +#include +#include +#include +#include + +namespace Catch { + + class ReusableStringStream : Detail::NonCopyable { + std::size_t m_index; + std::ostream* m_oss; + public: + ReusableStringStream(); + ~ReusableStringStream(); + + //! Returns the serialized state + std::string str() const; + //! Sets internal state to `str` + void str(std::string const& str); + +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic push +// Old versions of GCC do not understand -Wnonnull-compare +#pragma GCC diagnostic ignored "-Wpragmas" +// Streaming a function pointer triggers Waddress and Wnonnull-compare +// on GCC, because it implicitly converts it to bool and then decides +// that the check it uses (a? true : false) is tautological and cannot +// be null... +#pragma GCC diagnostic ignored "-Waddress" +#pragma GCC diagnostic ignored "-Wnonnull-compare" +#endif + + template + auto operator << ( T const& value ) -> ReusableStringStream& { + *m_oss << value; + return *this; + } + +#if defined(__GNUC__) && !defined(__clang__) +#pragma GCC diagnostic pop +#endif + auto get() -> std::ostream& { return *m_oss; } + }; +} + +#endif // CATCH_REUSABLE_STRING_STREAM_HPP_INCLUDED + + +#ifndef CATCH_VOID_TYPE_HPP_INCLUDED +#define CATCH_VOID_TYPE_HPP_INCLUDED + + +namespace Catch { + namespace Detail { + + template + struct make_void { using type = void; }; + + template + using void_t = typename make_void::type; + + } // namespace Detail +} // namespace Catch + + +#endif // CATCH_VOID_TYPE_HPP_INCLUDED + + +#ifndef CATCH_INTERFACES_ENUM_VALUES_REGISTRY_HPP_INCLUDED +#define CATCH_INTERFACES_ENUM_VALUES_REGISTRY_HPP_INCLUDED + + +#include + +namespace Catch { + + namespace Detail { + struct EnumInfo { + StringRef m_name; + std::vector> m_values; + + ~EnumInfo(); + + StringRef lookup( int value ) const; + }; + } // namespace Detail + + class IMutableEnumValuesRegistry { + public: + virtual ~IMutableEnumValuesRegistry(); // = default; + + virtual Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector const& values ) = 0; + + template + Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::initializer_list values ) { + static_assert(sizeof(int) >= sizeof(E), "Cannot serialize enum to int"); + std::vector intValues; + intValues.reserve( values.size() ); + for( auto enumValue : values ) + intValues.push_back( static_cast( enumValue ) ); + return registerEnum( enumName, allEnums, intValues ); + } + }; + +} // Catch + +#endif // CATCH_INTERFACES_ENUM_VALUES_REGISTRY_HPP_INCLUDED + +#ifdef CATCH_CONFIG_CPP17_STRING_VIEW +#include +#endif + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless +#endif + +// We need a dummy global operator<< so we can bring it into Catch namespace later +struct Catch_global_namespace_dummy{}; +std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); + +namespace Catch { + // Bring in global namespace operator<< for ADL lookup in + // `IsStreamInsertable` below. + using ::operator<<; + + namespace Detail { + + inline std::size_t catch_strnlen(const char *str, std::size_t n) { + auto ret = std::char_traits::find(str, n, '\0'); + if (ret != nullptr) { + return static_cast(ret - str); + } + return n; + } + + constexpr StringRef unprintableString = "{?}"_sr; + + //! Encases `string in quotes, and optionally escapes invisibles + std::string convertIntoString( StringRef string, bool escapeInvisibles ); + + //! Encases `string` in quotes, and escapes invisibles if user requested + //! it via CLI + std::string convertIntoString( StringRef string ); + + std::string rawMemoryToString( const void *object, std::size_t size ); + + template + std::string rawMemoryToString( const T& object ) { + return rawMemoryToString( &object, sizeof(object) ); + } + + template + class IsStreamInsertable { + template + static auto test(int) + -> decltype(std::declval() << std::declval(), std::true_type()); + + template + static auto test(...)->std::false_type; + + public: + static const bool value = decltype(test(0))::value; + }; + + template + std::string convertUnknownEnumToString( E e ); + + template + std::enable_if_t< + !std::is_enum::value && !std::is_base_of::value, + std::string> convertUnstreamable( T const& ) { + return std::string(Detail::unprintableString); + } + template + std::enable_if_t< + !std::is_enum::value && std::is_base_of::value, + std::string> convertUnstreamable(T const& ex) { + return ex.what(); + } + + + template + std::enable_if_t< + std::is_enum::value, + std::string> convertUnstreamable( T const& value ) { + return convertUnknownEnumToString( value ); + } + +#if defined(_MANAGED) + //! Convert a CLR string to a utf8 std::string + template + std::string clrReferenceToString( T^ ref ) { + if (ref == nullptr) + return std::string("null"); + auto bytes = System::Text::Encoding::UTF8->GetBytes(ref->ToString()); + cli::pin_ptr p = &bytes[0]; + return std::string(reinterpret_cast(p), bytes->Length); + } +#endif + + } // namespace Detail + + + template + struct StringMaker { + template + static + std::enable_if_t<::Catch::Detail::IsStreamInsertable::value, std::string> + convert(const Fake& value) { + ReusableStringStream rss; + // NB: call using the function-like syntax to avoid ambiguity with + // user-defined templated operator<< under clang. + rss.operator<<(value); + return rss.str(); + } + + template + static + std::enable_if_t::value, std::string> + convert( const Fake& value ) { +#if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER) + return Detail::convertUnstreamable(value); +#else + return CATCH_CONFIG_FALLBACK_STRINGIFIER(value); +#endif + } + }; + + namespace Detail { + + // This function dispatches all stringification requests inside of Catch. + // Should be preferably called fully qualified, like ::Catch::Detail::stringify + template + std::string stringify(const T& e) { + return ::Catch::StringMaker>>::convert(e); + } + + template + std::string convertUnknownEnumToString( E e ) { + return ::Catch::Detail::stringify(static_cast>(e)); + } + +#if defined(_MANAGED) + template + std::string stringify( T^ e ) { + return ::Catch::StringMaker::convert(e); + } +#endif + + } // namespace Detail + + // Some predefined specializations + + template<> + struct StringMaker { + static std::string convert(const std::string& str); + }; + +#ifdef CATCH_CONFIG_CPP17_STRING_VIEW + template<> + struct StringMaker { + static std::string convert(std::string_view str); + }; +#endif + + template<> + struct StringMaker { + static std::string convert(char const * str); + }; + template<> + struct StringMaker { + static std::string convert(char * str); + }; + +#if defined(CATCH_CONFIG_WCHAR) + template<> + struct StringMaker { + static std::string convert(const std::wstring& wstr); + }; + +# ifdef CATCH_CONFIG_CPP17_STRING_VIEW + template<> + struct StringMaker { + static std::string convert(std::wstring_view str); + }; +# endif + + template<> + struct StringMaker { + static std::string convert(wchar_t const * str); + }; + template<> + struct StringMaker { + static std::string convert(wchar_t * str); + }; +#endif // CATCH_CONFIG_WCHAR + + template + struct StringMaker { + static std::string convert(char const* str) { + return Detail::convertIntoString( + StringRef( str, Detail::catch_strnlen( str, SZ ) ) ); + } + }; + template + struct StringMaker { + static std::string convert(signed char const* str) { + auto reinterpreted = reinterpret_cast(str); + return Detail::convertIntoString( + StringRef(reinterpreted, Detail::catch_strnlen(reinterpreted, SZ))); + } + }; + template + struct StringMaker { + static std::string convert(unsigned char const* str) { + auto reinterpreted = reinterpret_cast(str); + return Detail::convertIntoString( + StringRef(reinterpreted, Detail::catch_strnlen(reinterpreted, SZ))); + } + }; + +#if defined(CATCH_CONFIG_CPP17_BYTE) + template<> + struct StringMaker { + static std::string convert(std::byte value); + }; +#endif // defined(CATCH_CONFIG_CPP17_BYTE) + template<> + struct StringMaker { + static std::string convert(int value); + }; + template<> + struct StringMaker { + static std::string convert(long value); + }; + template<> + struct StringMaker { + static std::string convert(long long value); + }; + template<> + struct StringMaker { + static std::string convert(unsigned int value); + }; + template<> + struct StringMaker { + static std::string convert(unsigned long value); + }; + template<> + struct StringMaker { + static std::string convert(unsigned long long value); + }; + + template<> + struct StringMaker { + static std::string convert(bool b) { + using namespace std::string_literals; + return b ? "true"s : "false"s; + } + }; + + template<> + struct StringMaker { + static std::string convert(char c); + }; + template<> + struct StringMaker { + static std::string convert(signed char c); + }; + template<> + struct StringMaker { + static std::string convert(unsigned char c); + }; + + template<> + struct StringMaker { + static std::string convert(std::nullptr_t) { + using namespace std::string_literals; + return "nullptr"s; + } + }; + + template<> + struct StringMaker { + static std::string convert(float value); + CATCH_EXPORT static int precision; + }; + + template<> + struct StringMaker { + static std::string convert(double value); + CATCH_EXPORT static int precision; + }; + + template + struct StringMaker { + template + static std::string convert(U* p) { + if (p) { + return ::Catch::Detail::rawMemoryToString(p); + } else { + return "nullptr"; + } + } + }; + + template + struct StringMaker { + static std::string convert(R C::* p) { + if (p) { + return ::Catch::Detail::rawMemoryToString(p); + } else { + return "nullptr"; + } + } + }; + +#if defined(_MANAGED) + template + struct StringMaker { + static std::string convert( T^ ref ) { + return ::Catch::Detail::clrReferenceToString(ref); + } + }; +#endif + + namespace Detail { + template + std::string rangeToString(InputIterator first, Sentinel last) { + ReusableStringStream rss; + rss << "{ "; + if (first != last) { + rss << ::Catch::Detail::stringify(*first); + for (++first; first != last; ++first) + rss << ", " << ::Catch::Detail::stringify(*first); + } + rss << " }"; + return rss.str(); + } + } + +} // namespace Catch + +////////////////////////////////////////////////////// +// Separate std-lib types stringification, so it can be selectively enabled +// This means that we do not bring in their headers + +#if defined(CATCH_CONFIG_ENABLE_ALL_STRINGMAKERS) +# define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER +# define CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER +# define CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER +# define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER +#endif + +// Separate std::pair specialization +#if defined(CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER) +#include +namespace Catch { + template + struct StringMaker > { + static std::string convert(const std::pair& pair) { + ReusableStringStream rss; + rss << "{ " + << ::Catch::Detail::stringify(pair.first) + << ", " + << ::Catch::Detail::stringify(pair.second) + << " }"; + return rss.str(); + } + }; +} +#endif // CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER + +#if defined(CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_OPTIONAL) +#include +namespace Catch { + template + struct StringMaker > { + static std::string convert(const std::optional& optional) { + if (optional.has_value()) { + return ::Catch::Detail::stringify(*optional); + } else { + return "{ }"; + } + } + }; + template <> + struct StringMaker { + static std::string convert(const std::nullopt_t&) { + return "{ }"; + } + }; +} +#endif // CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER + +// Separate std::tuple specialization +#if defined(CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER) +#include +namespace Catch { + namespace Detail { + template< + typename Tuple, + std::size_t N = 0, + bool = (N < std::tuple_size::value) + > + struct TupleElementPrinter { + static void print(const Tuple& tuple, std::ostream& os) { + os << (N ? ", " : " ") + << ::Catch::Detail::stringify(std::get(tuple)); + TupleElementPrinter::print(tuple, os); + } + }; + + template< + typename Tuple, + std::size_t N + > + struct TupleElementPrinter { + static void print(const Tuple&, std::ostream&) {} + }; + + } + + + template + struct StringMaker> { + static std::string convert(const std::tuple& tuple) { + ReusableStringStream rss; + rss << '{'; + Detail::TupleElementPrinter>::print(tuple, rss.get()); + rss << " }"; + return rss.str(); + } + }; +} +#endif // CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER + +#if defined(CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_VARIANT) +#include +namespace Catch { + template<> + struct StringMaker { + static std::string convert(const std::monostate&) { + return "{ }"; + } + }; + + template + struct StringMaker> { + static std::string convert(const std::variant& variant) { + if (variant.valueless_by_exception()) { + return "{valueless variant}"; + } else { + return std::visit( + [](const auto& value) { + return ::Catch::Detail::stringify(value); + }, + variant + ); + } + } + }; +} +#endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER + +namespace Catch { + // Import begin/ end from std here + using std::begin; + using std::end; + + namespace Detail { + template + struct is_range_impl : std::false_type {}; + + template + struct is_range_impl()))>> : std::true_type {}; + } // namespace Detail + + template + struct is_range : Detail::is_range_impl {}; + +#if defined(_MANAGED) // Managed types are never ranges + template + struct is_range { + static const bool value = false; + }; +#endif + + template + std::string rangeToString( Range const& range ) { + return ::Catch::Detail::rangeToString( begin( range ), end( range ) ); + } + + // Handle vector specially + template + std::string rangeToString( std::vector const& v ) { + ReusableStringStream rss; + rss << "{ "; + bool first = true; + for( bool b : v ) { + if( first ) + first = false; + else + rss << ", "; + rss << ::Catch::Detail::stringify( b ); + } + rss << " }"; + return rss.str(); + } + + template + struct StringMaker::value && !::Catch::Detail::IsStreamInsertable::value>> { + static std::string convert( R const& range ) { + return rangeToString( range ); + } + }; + + template + struct StringMaker { + static std::string convert(T const(&arr)[SZ]) { + return rangeToString(arr); + } + }; + + +} // namespace Catch + +// Separate std::chrono::duration specialization +#include +#include +#include + + +namespace Catch { + +template +struct ratio_string { + static std::string symbol() { + Catch::ReusableStringStream rss; + rss << '[' << Ratio::num << '/' + << Ratio::den << ']'; + return rss.str(); + } +}; + +template <> +struct ratio_string { + static char symbol() { return 'a'; } +}; +template <> +struct ratio_string { + static char symbol() { return 'f'; } +}; +template <> +struct ratio_string { + static char symbol() { return 'p'; } +}; +template <> +struct ratio_string { + static char symbol() { return 'n'; } +}; +template <> +struct ratio_string { + static char symbol() { return 'u'; } +}; +template <> +struct ratio_string { + static char symbol() { return 'm'; } +}; + + //////////// + // std::chrono::duration specializations + template + struct StringMaker> { + static std::string convert(std::chrono::duration const& duration) { + ReusableStringStream rss; + rss << duration.count() << ' ' << ratio_string::symbol() << 's'; + return rss.str(); + } + }; + template + struct StringMaker>> { + static std::string convert(std::chrono::duration> const& duration) { + ReusableStringStream rss; + rss << duration.count() << " s"; + return rss.str(); + } + }; + template + struct StringMaker>> { + static std::string convert(std::chrono::duration> const& duration) { + ReusableStringStream rss; + rss << duration.count() << " m"; + return rss.str(); + } + }; + template + struct StringMaker>> { + static std::string convert(std::chrono::duration> const& duration) { + ReusableStringStream rss; + rss << duration.count() << " h"; + return rss.str(); + } + }; + + //////////// + // std::chrono::time_point specialization + // Generic time_point cannot be specialized, only std::chrono::time_point + template + struct StringMaker> { + static std::string convert(std::chrono::time_point const& time_point) { + return ::Catch::Detail::stringify(time_point.time_since_epoch()) + " since epoch"; + } + }; + // std::chrono::time_point specialization + template + struct StringMaker> { + static std::string convert(std::chrono::time_point const& time_point) { + auto converted = std::chrono::system_clock::to_time_t(time_point); + +#ifdef _MSC_VER + std::tm timeInfo = {}; + gmtime_s(&timeInfo, &converted); +#else + std::tm* timeInfo = std::gmtime(&converted); +#endif + + auto const timeStampSize = sizeof("2017-01-16T17:06:45Z"); + char timeStamp[timeStampSize]; + const char * const fmt = "%Y-%m-%dT%H:%M:%SZ"; + +#ifdef _MSC_VER + std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); +#else + std::strftime(timeStamp, timeStampSize, fmt, timeInfo); +#endif + return std::string(timeStamp, timeStampSize - 1); + } + }; +} + + +#define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \ +namespace Catch { \ + template<> struct StringMaker { \ + static std::string convert( enumName value ) { \ + static const auto& enumInfo = ::Catch::getMutableRegistryHub().getMutableEnumValuesRegistry().registerEnum( #enumName, #__VA_ARGS__, { __VA_ARGS__ } ); \ + return static_cast(enumInfo.lookup( static_cast( value ) )); \ + } \ + }; \ +} + +#define CATCH_REGISTER_ENUM( enumName, ... ) INTERNAL_CATCH_REGISTER_ENUM( enumName, __VA_ARGS__ ) + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + +#endif // CATCH_TOSTRING_HPP_INCLUDED + +#include + +namespace Catch { + + class Approx { + private: + bool equalityComparisonImpl(double other) const; + // Sets and validates the new margin (margin >= 0) + void setMargin(double margin); + // Sets and validates the new epsilon (0 < epsilon < 1) + void setEpsilon(double epsilon); + + public: + explicit Approx ( double value ); + + static Approx custom(); + + Approx operator-() const; + + template ::value>> + Approx operator()( T const& value ) const { + Approx approx( static_cast(value) ); + approx.m_epsilon = m_epsilon; + approx.m_margin = m_margin; + approx.m_scale = m_scale; + return approx; + } + + template ::value>> + explicit Approx( T const& value ): Approx(static_cast(value)) + {} + + + template ::value>> + friend bool operator == ( const T& lhs, Approx const& rhs ) { + auto lhs_v = static_cast(lhs); + return rhs.equalityComparisonImpl(lhs_v); + } + + template ::value>> + friend bool operator == ( Approx const& lhs, const T& rhs ) { + return operator==( rhs, lhs ); + } + + template ::value>> + friend bool operator != ( T const& lhs, Approx const& rhs ) { + return !operator==( lhs, rhs ); + } + + template ::value>> + friend bool operator != ( Approx const& lhs, T const& rhs ) { + return !operator==( rhs, lhs ); + } + + template ::value>> + friend bool operator <= ( T const& lhs, Approx const& rhs ) { + return static_cast(lhs) < rhs.m_value || lhs == rhs; + } + + template ::value>> + friend bool operator <= ( Approx const& lhs, T const& rhs ) { + return lhs.m_value < static_cast(rhs) || lhs == rhs; + } + + template ::value>> + friend bool operator >= ( T const& lhs, Approx const& rhs ) { + return static_cast(lhs) > rhs.m_value || lhs == rhs; + } + + template ::value>> + friend bool operator >= ( Approx const& lhs, T const& rhs ) { + return lhs.m_value > static_cast(rhs) || lhs == rhs; + } + + template ::value>> + Approx& epsilon( T const& newEpsilon ) { + const auto epsilonAsDouble = static_cast(newEpsilon); + setEpsilon(epsilonAsDouble); + return *this; + } + + template ::value>> + Approx& margin( T const& newMargin ) { + const auto marginAsDouble = static_cast(newMargin); + setMargin(marginAsDouble); + return *this; + } + + template ::value>> + Approx& scale( T const& newScale ) { + m_scale = static_cast(newScale); + return *this; + } + + std::string toString() const; + + private: + double m_epsilon; + double m_margin; + double m_scale; + double m_value; + }; + +namespace literals { + Approx operator ""_a(long double val); + Approx operator ""_a(unsigned long long val); +} // end namespace literals + +template<> +struct StringMaker { + static std::string convert(Catch::Approx const& value); +}; + +} // end namespace Catch + +#endif // CATCH_APPROX_HPP_INCLUDED + + +#ifndef CATCH_ASSERTION_INFO_HPP_INCLUDED +#define CATCH_ASSERTION_INFO_HPP_INCLUDED + + + +#ifndef CATCH_SOURCE_LINE_INFO_HPP_INCLUDED +#define CATCH_SOURCE_LINE_INFO_HPP_INCLUDED + +#include +#include + +namespace Catch { + + struct SourceLineInfo { + + SourceLineInfo() = delete; + constexpr SourceLineInfo( char const* _file, std::size_t _line ) noexcept: + file( _file ), + line( _line ) + {} + + bool operator == ( SourceLineInfo const& other ) const noexcept; + bool operator < ( SourceLineInfo const& other ) const noexcept; + + char const* file; + std::size_t line; + + friend std::ostream& operator << (std::ostream& os, SourceLineInfo const& info); + }; +} + +#define CATCH_INTERNAL_LINEINFO \ + ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) + +#endif // CATCH_SOURCE_LINE_INFO_HPP_INCLUDED + +namespace Catch { + + struct AssertionInfo { + // AssertionInfo() = delete; + + StringRef macroName; + SourceLineInfo lineInfo; + StringRef capturedExpression; + ResultDisposition::Flags resultDisposition; + }; + +} // end namespace Catch + +#endif // CATCH_ASSERTION_INFO_HPP_INCLUDED + + +#ifndef CATCH_ASSERTION_RESULT_HPP_INCLUDED +#define CATCH_ASSERTION_RESULT_HPP_INCLUDED + + + +#ifndef CATCH_LAZY_EXPR_HPP_INCLUDED +#define CATCH_LAZY_EXPR_HPP_INCLUDED + +#include + +namespace Catch { + + class ITransientExpression; + + class LazyExpression { + friend class AssertionHandler; + friend struct AssertionStats; + friend class RunContext; + + ITransientExpression const* m_transientExpression = nullptr; + bool m_isNegated; + public: + LazyExpression( bool isNegated ): + m_isNegated(isNegated) + {} + LazyExpression(LazyExpression const& other) = default; + LazyExpression& operator = ( LazyExpression const& ) = delete; + + explicit operator bool() const { + return m_transientExpression != nullptr; + } + + friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&; + }; + +} // namespace Catch + +#endif // CATCH_LAZY_EXPR_HPP_INCLUDED + +#include + +namespace Catch { + + struct AssertionResultData + { + AssertionResultData() = delete; + + AssertionResultData( ResultWas::OfType _resultType, LazyExpression const& _lazyExpression ); + + std::string message; + mutable std::string reconstructedExpression; + LazyExpression lazyExpression; + ResultWas::OfType resultType; + + std::string reconstructExpression() const; + }; + + class AssertionResult { + public: + AssertionResult() = delete; + AssertionResult( AssertionInfo const& info, AssertionResultData&& data ); + + bool isOk() const; + bool succeeded() const; + ResultWas::OfType getResultType() const; + bool hasExpression() const; + bool hasMessage() const; + std::string getExpression() const; + std::string getExpressionInMacro() const; + bool hasExpandedExpression() const; + std::string getExpandedExpression() const; + StringRef getMessage() const; + SourceLineInfo getSourceInfo() const; + StringRef getTestMacroName() const; + + //protected: + AssertionInfo m_info; + AssertionResultData m_resultData; + }; + +} // end namespace Catch + +#endif // CATCH_ASSERTION_RESULT_HPP_INCLUDED + + +#ifndef CATCH_CONFIG_HPP_INCLUDED +#define CATCH_CONFIG_HPP_INCLUDED + + + +#ifndef CATCH_TEST_SPEC_HPP_INCLUDED +#define CATCH_TEST_SPEC_HPP_INCLUDED + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif + + + +#ifndef CATCH_WILDCARD_PATTERN_HPP_INCLUDED +#define CATCH_WILDCARD_PATTERN_HPP_INCLUDED + + + +#ifndef CATCH_CASE_SENSITIVE_HPP_INCLUDED +#define CATCH_CASE_SENSITIVE_HPP_INCLUDED + +namespace Catch { + + enum class CaseSensitive { Yes, No }; + +} // namespace Catch + +#endif // CATCH_CASE_SENSITIVE_HPP_INCLUDED + +#include + +namespace Catch +{ + class WildcardPattern { + enum WildcardPosition { + NoWildcard = 0, + WildcardAtStart = 1, + WildcardAtEnd = 2, + WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd + }; + + public: + + WildcardPattern( std::string const& pattern, CaseSensitive caseSensitivity ); + bool matches( std::string const& str ) const; + + private: + std::string normaliseString( std::string const& str ) const; + CaseSensitive m_caseSensitivity; + WildcardPosition m_wildcard = NoWildcard; + std::string m_pattern; + }; +} + +#endif // CATCH_WILDCARD_PATTERN_HPP_INCLUDED + +#include +#include +#include + +namespace Catch { + + class IConfig; + struct TestCaseInfo; + class TestCaseHandle; + + class TestSpec { + + class Pattern { + public: + explicit Pattern( std::string const& name ); + virtual ~Pattern(); + virtual bool matches( TestCaseInfo const& testCase ) const = 0; + std::string const& name() const; + private: + virtual void serializeTo( std::ostream& out ) const = 0; + // Writes string that would be reparsed into the pattern + friend std::ostream& operator<<(std::ostream& out, + Pattern const& pattern) { + pattern.serializeTo( out ); + return out; + } + + std::string const m_name; + }; + + class NamePattern : public Pattern { + public: + explicit NamePattern( std::string const& name, std::string const& filterString ); + bool matches( TestCaseInfo const& testCase ) const override; + private: + void serializeTo( std::ostream& out ) const override; + + WildcardPattern m_wildcardPattern; + }; + + class TagPattern : public Pattern { + public: + explicit TagPattern( std::string const& tag, std::string const& filterString ); + bool matches( TestCaseInfo const& testCase ) const override; + private: + void serializeTo( std::ostream& out ) const override; + + std::string m_tag; + }; + + struct Filter { + std::vector> m_required; + std::vector> m_forbidden; + + //! Serializes this filter into a string that would be parsed into + //! an equivalent filter + void serializeTo( std::ostream& out ) const; + friend std::ostream& operator<<(std::ostream& out, Filter const& f) { + f.serializeTo( out ); + return out; + } + + bool matches( TestCaseInfo const& testCase ) const; + }; + + static std::string extractFilterName( Filter const& filter ); + + public: + struct FilterMatch { + std::string name; + std::vector tests; + }; + using Matches = std::vector; + using vectorStrings = std::vector; + + bool hasFilters() const; + bool matches( TestCaseInfo const& testCase ) const; + Matches matchesByFilter( std::vector const& testCases, IConfig const& config ) const; + const vectorStrings & getInvalidSpecs() const; + + private: + std::vector m_filters; + std::vector m_invalidSpecs; + + friend class TestSpecParser; + //! Serializes this test spec into a string that would be parsed into + //! equivalent test spec + void serializeTo( std::ostream& out ) const; + friend std::ostream& operator<<(std::ostream& out, + TestSpec const& spec) { + spec.serializeTo( out ); + return out; + } + }; +} + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + +#endif // CATCH_TEST_SPEC_HPP_INCLUDED + + +#ifndef CATCH_OPTIONAL_HPP_INCLUDED +#define CATCH_OPTIONAL_HPP_INCLUDED + + +#include + +namespace Catch { + + // An optional type + template + class Optional { + public: + Optional(): nullableValue( nullptr ) {} + ~Optional() { reset(); } + + Optional( T const& _value ): + nullableValue( new ( storage ) T( _value ) ) {} + Optional( T&& _value ): + nullableValue( new ( storage ) T( CATCH_MOVE( _value ) ) ) {} + + Optional& operator=( T const& _value ) { + reset(); + nullableValue = new ( storage ) T( _value ); + return *this; + } + Optional& operator=( T&& _value ) { + reset(); + nullableValue = new ( storage ) T( CATCH_MOVE( _value ) ); + return *this; + } + + Optional( Optional const& _other ): + nullableValue( _other ? new ( storage ) T( *_other ) : nullptr ) {} + Optional( Optional&& _other ): + nullableValue( _other ? new ( storage ) T( CATCH_MOVE( *_other ) ) + : nullptr ) {} + + Optional& operator=( Optional const& _other ) { + if ( &_other != this ) { + reset(); + if ( _other ) { nullableValue = new ( storage ) T( *_other ); } + } + return *this; + } + Optional& operator=( Optional&& _other ) { + if ( &_other != this ) { + reset(); + if ( _other ) { + nullableValue = new ( storage ) T( CATCH_MOVE( *_other ) ); + } + } + return *this; + } + + void reset() { + if ( nullableValue ) { nullableValue->~T(); } + nullableValue = nullptr; + } + + T& operator*() { + assert(nullableValue); + return *nullableValue; + } + T const& operator*() const { + assert(nullableValue); + return *nullableValue; + } + T* operator->() { + assert(nullableValue); + return nullableValue; + } + const T* operator->() const { + assert(nullableValue); + return nullableValue; + } + + T valueOr( T const& defaultValue ) const { + return nullableValue ? *nullableValue : defaultValue; + } + + bool some() const { return nullableValue != nullptr; } + bool none() const { return nullableValue == nullptr; } + + bool operator !() const { return nullableValue == nullptr; } + explicit operator bool() const { + return some(); + } + + friend bool operator==(Optional const& a, Optional const& b) { + if (a.none() && b.none()) { + return true; + } else if (a.some() && b.some()) { + return *a == *b; + } else { + return false; + } + } + friend bool operator!=(Optional const& a, Optional const& b) { + return !( a == b ); + } + + private: + T* nullableValue; + alignas(alignof(T)) char storage[sizeof(T)]; + }; + +} // end namespace Catch + +#endif // CATCH_OPTIONAL_HPP_INCLUDED + + +#ifndef CATCH_RANDOM_SEED_GENERATION_HPP_INCLUDED +#define CATCH_RANDOM_SEED_GENERATION_HPP_INCLUDED + +#include + +namespace Catch { + + enum class GenerateFrom { + Time, + RandomDevice, + //! Currently equivalent to RandomDevice, but can change at any point + Default + }; + + std::uint32_t generateRandomSeed(GenerateFrom from); + +} // end namespace Catch + +#endif // CATCH_RANDOM_SEED_GENERATION_HPP_INCLUDED + + +#ifndef CATCH_REPORTER_SPEC_PARSER_HPP_INCLUDED +#define CATCH_REPORTER_SPEC_PARSER_HPP_INCLUDED + + +#include +#include +#include + +namespace Catch { + + enum class ColourMode : std::uint8_t; + + namespace Detail { + //! Splits the reporter spec into reporter name and kv-pair options + std::vector splitReporterSpec( StringRef reporterSpec ); + + Optional stringToColourMode( StringRef colourMode ); + } + + /** + * Structured reporter spec that a reporter can be created from + * + * Parsing has been validated, but semantics have not. This means e.g. + * that the colour mode is known to Catch2, but it might not be + * compiled into the binary, and the output filename might not be + * openable. + */ + class ReporterSpec { + std::string m_name; + Optional m_outputFileName; + Optional m_colourMode; + std::map m_customOptions; + + friend bool operator==( ReporterSpec const& lhs, + ReporterSpec const& rhs ); + friend bool operator!=( ReporterSpec const& lhs, + ReporterSpec const& rhs ) { + return !( lhs == rhs ); + } + + public: + ReporterSpec( + std::string name, + Optional outputFileName, + Optional colourMode, + std::map customOptions ); + + std::string const& name() const { return m_name; } + + Optional const& outputFile() const { + return m_outputFileName; + } + + Optional const& colourMode() const { return m_colourMode; } + + std::map const& customOptions() const { + return m_customOptions; + } + }; + + /** + * Parses provided reporter spec string into + * + * Returns empty optional on errors, e.g. + * * field that is not first and not a key+value pair + * * duplicated keys in kv pair + * * unknown catch reporter option + * * empty key/value in an custom kv pair + * * ... + */ + Optional parseReporterSpec( StringRef reporterSpec ); + +} + +#endif // CATCH_REPORTER_SPEC_PARSER_HPP_INCLUDED + +#include +#include +#include +#include + +namespace Catch { + + class IStream; + + /** + * `ReporterSpec` but with the defaults filled in. + * + * Like `ReporterSpec`, the semantics are unchecked. + */ + struct ProcessedReporterSpec { + std::string name; + std::string outputFilename; + ColourMode colourMode; + std::map customOptions; + friend bool operator==( ProcessedReporterSpec const& lhs, + ProcessedReporterSpec const& rhs ); + friend bool operator!=( ProcessedReporterSpec const& lhs, + ProcessedReporterSpec const& rhs ) { + return !( lhs == rhs ); + } + }; + + struct ConfigData { + + bool listTests = false; + bool listTags = false; + bool listReporters = false; + bool listListeners = false; + + bool showSuccessfulTests = false; + bool shouldDebugBreak = false; + bool noThrow = false; + bool showHelp = false; + bool showInvisibles = false; + bool filenamesAsTags = false; + bool libIdentify = false; + bool allowZeroTests = false; + + int abortAfter = -1; + uint32_t rngSeed = generateRandomSeed(GenerateFrom::Default); + + unsigned int shardCount = 1; + unsigned int shardIndex = 0; + + bool skipBenchmarks = false; + bool benchmarkNoAnalysis = false; + unsigned int benchmarkSamples = 100; + double benchmarkConfidenceInterval = 0.95; + unsigned int benchmarkResamples = 100'000; + std::chrono::milliseconds::rep benchmarkWarmupTime = 100; + + Verbosity verbosity = Verbosity::Normal; + WarnAbout::What warnings = WarnAbout::Nothing; + ShowDurations showDurations = ShowDurations::DefaultForReporter; + double minDuration = -1; + TestRunOrder runOrder = TestRunOrder::Declared; + ColourMode defaultColourMode = ColourMode::PlatformDefault; + WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; + + std::string defaultOutputFilename; + std::string name; + std::string processName; + std::vector reporterSpecifications; + + std::vector testsOrTags; + std::vector sectionsToRun; + }; + + + class Config : public IConfig { + public: + + Config() = default; + Config( ConfigData const& data ); + ~Config() override; // = default in the cpp file + + bool listTests() const; + bool listTags() const; + bool listReporters() const; + bool listListeners() const; + + std::vector const& getReporterSpecs() const; + std::vector const& + getProcessedReporterSpecs() const; + + std::vector const& getTestsOrTags() const override; + std::vector const& getSectionsToRun() const override; + + TestSpec const& testSpec() const override; + bool hasTestFilters() const override; + + bool showHelp() const; + + // IConfig interface + bool allowThrows() const override; + StringRef name() const override; + bool includeSuccessfulResults() const override; + bool warnAboutMissingAssertions() const override; + bool warnAboutUnmatchedTestSpecs() const override; + bool zeroTestsCountAsSuccess() const override; + ShowDurations showDurations() const override; + double minDuration() const override; + TestRunOrder runOrder() const override; + uint32_t rngSeed() const override; + unsigned int shardCount() const override; + unsigned int shardIndex() const override; + ColourMode defaultColourMode() const override; + bool shouldDebugBreak() const override; + int abortAfter() const override; + bool showInvisibles() const override; + Verbosity verbosity() const override; + bool skipBenchmarks() const override; + bool benchmarkNoAnalysis() const override; + unsigned int benchmarkSamples() const override; + double benchmarkConfidenceInterval() const override; + unsigned int benchmarkResamples() const override; + std::chrono::milliseconds benchmarkWarmupTime() const override; + + private: + // Reads Bazel env vars and applies them to the config + void readBazelEnvVars(); + + ConfigData m_data; + std::vector m_processedReporterSpecs; + TestSpec m_testSpec; + bool m_hasTestFilters = false; + }; +} // end namespace Catch + +#endif // CATCH_CONFIG_HPP_INCLUDED + + +#ifndef CATCH_GET_RANDOM_SEED_HPP_INCLUDED +#define CATCH_GET_RANDOM_SEED_HPP_INCLUDED + +#include + +namespace Catch { + //! Returns Catch2's current RNG seed. + std::uint32_t getSeed(); +} + +#endif // CATCH_GET_RANDOM_SEED_HPP_INCLUDED + + +#ifndef CATCH_MESSAGE_HPP_INCLUDED +#define CATCH_MESSAGE_HPP_INCLUDED + + + + +/** \file + * Wrapper for the CATCH_CONFIG_PREFIX_MESSAGES configuration option + * + * CATCH_CONFIG_PREFIX_ALL can be used to avoid clashes with other macros + * by prepending CATCH_. This may not be desirable if the only clashes are with + * logger macros such as INFO and WARN. In this cases + * CATCH_CONFIG_PREFIX_MESSAGES can be used to only prefix a small subset + * of relevant macros. + * + */ + +#ifndef CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED +#define CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED + + +#if defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_PREFIX_MESSAGES) + #define CATCH_CONFIG_PREFIX_MESSAGES +#endif + +#endif // CATCH_CONFIG_PREFIX_MESSAGES_HPP_INCLUDED + + +#ifndef CATCH_STREAM_END_STOP_HPP_INCLUDED +#define CATCH_STREAM_END_STOP_HPP_INCLUDED + + +namespace Catch { + + // Use this in variadic streaming macros to allow + // << +StreamEndStop + // as well as + // << stuff +StreamEndStop + struct StreamEndStop { + constexpr StringRef operator+() const { return StringRef(); } + + template + constexpr friend T const& operator+( T const& value, StreamEndStop ) { + return value; + } + }; + +} // namespace Catch + +#endif // CATCH_STREAM_END_STOP_HPP_INCLUDED + + +#ifndef CATCH_MESSAGE_INFO_HPP_INCLUDED +#define CATCH_MESSAGE_INFO_HPP_INCLUDED + + +#include + +namespace Catch { + + struct MessageInfo { + MessageInfo( StringRef _macroName, + SourceLineInfo const& _lineInfo, + ResultWas::OfType _type ); + + StringRef macroName; + std::string message; + SourceLineInfo lineInfo; + ResultWas::OfType type; + unsigned int sequence; + + bool operator == (MessageInfo const& other) const { + return sequence == other.sequence; + } + bool operator < (MessageInfo const& other) const { + return sequence < other.sequence; + } + private: + static unsigned int globalCount; + }; + +} // end namespace Catch + +#endif // CATCH_MESSAGE_INFO_HPP_INCLUDED + +#include +#include + +namespace Catch { + + struct SourceLineInfo; + class IResultCapture; + + struct MessageStream { + + template + MessageStream& operator << ( T const& value ) { + m_stream << value; + return *this; + } + + ReusableStringStream m_stream; + }; + + struct MessageBuilder : MessageStream { + MessageBuilder( StringRef macroName, + SourceLineInfo const& lineInfo, + ResultWas::OfType type ): + m_info(macroName, lineInfo, type) {} + + template + MessageBuilder&& operator << ( T const& value ) && { + m_stream << value; + return CATCH_MOVE(*this); + } + + MessageInfo m_info; + }; + + class ScopedMessage { + public: + explicit ScopedMessage( MessageBuilder&& builder ); + ScopedMessage( ScopedMessage& duplicate ) = delete; + ScopedMessage( ScopedMessage&& old ) noexcept; + ~ScopedMessage(); + + MessageInfo m_info; + bool m_moved = false; + }; + + class Capturer { + std::vector m_messages; + IResultCapture& m_resultCapture; + size_t m_captured = 0; + public: + Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ); + + Capturer(Capturer const&) = delete; + Capturer& operator=(Capturer const&) = delete; + + ~Capturer(); + + void captureValue( size_t index, std::string const& value ); + + template + void captureValues( size_t index, T const& value ) { + captureValue( index, Catch::Detail::stringify( value ) ); + } + + template + void captureValues( size_t index, T const& value, Ts const&... values ) { + captureValue( index, Catch::Detail::stringify(value) ); + captureValues( index+1, values... ); + } + }; + +} // end namespace Catch + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \ + catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \ + Catch::Capturer varName( macroName##_catch_sr, \ + CATCH_INTERNAL_LINEINFO, \ + Catch::ResultWas::Info, \ + #__VA_ARGS__##_catch_sr ); \ + varName.captureValues( 0, __VA_ARGS__ ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_INFO( macroName, log ) \ + const Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \ + Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) + + +#if defined(CATCH_CONFIG_PREFIX_MESSAGES) && !defined(CATCH_CONFIG_DISABLE) + + #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg ) + #define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "CATCH_UNSCOPED_INFO", msg ) + #define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) + #define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CATCH_CAPTURE", __VA_ARGS__ ) + +#elif defined(CATCH_CONFIG_PREFIX_MESSAGES) && defined(CATCH_CONFIG_DISABLE) + + #define CATCH_INFO( msg ) (void)(0) + #define CATCH_UNSCOPED_INFO( msg ) (void)(0) + #define CATCH_WARN( msg ) (void)(0) + #define CATCH_CAPTURE( ... ) (void)(0) + +#elif !defined(CATCH_CONFIG_PREFIX_MESSAGES) && !defined(CATCH_CONFIG_DISABLE) + + #define INFO( msg ) INTERNAL_CATCH_INFO( "INFO", msg ) + #define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "UNSCOPED_INFO", msg ) + #define WARN( msg ) INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) + #define CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CAPTURE", __VA_ARGS__ ) + +#elif !defined(CATCH_CONFIG_PREFIX_MESSAGES) && defined(CATCH_CONFIG_DISABLE) + + #define INFO( msg ) (void)(0) + #define UNSCOPED_INFO( msg ) (void)(0) + #define WARN( msg ) (void)(0) + #define CAPTURE( ... ) (void)(0) + +#endif // end of user facing macro declarations + + + + +#endif // CATCH_MESSAGE_HPP_INCLUDED + + +#ifndef CATCH_SECTION_INFO_HPP_INCLUDED +#define CATCH_SECTION_INFO_HPP_INCLUDED + + + +#ifndef CATCH_TOTALS_HPP_INCLUDED +#define CATCH_TOTALS_HPP_INCLUDED + +#include + +namespace Catch { + + struct Counts { + Counts operator - ( Counts const& other ) const; + Counts& operator += ( Counts const& other ); + + std::uint64_t total() const; + bool allPassed() const; + bool allOk() const; + + std::uint64_t passed = 0; + std::uint64_t failed = 0; + std::uint64_t failedButOk = 0; + std::uint64_t skipped = 0; + }; + + struct Totals { + + Totals operator - ( Totals const& other ) const; + Totals& operator += ( Totals const& other ); + + Totals delta( Totals const& prevTotals ) const; + + Counts assertions; + Counts testCases; + }; +} + +#endif // CATCH_TOTALS_HPP_INCLUDED + +#include + +namespace Catch { + + struct SectionInfo { + // The last argument is ignored, so that people can write + // SECTION("ShortName", "Proper description that is long") and + // still use the `-c` flag comfortably. + SectionInfo( SourceLineInfo const& _lineInfo, std::string _name, + const char* const = nullptr ): + name(CATCH_MOVE(_name)), + lineInfo(_lineInfo) + {} + + std::string name; + SourceLineInfo lineInfo; + }; + + struct SectionEndInfo { + SectionInfo sectionInfo; + Counts prevAssertions; + double durationInSeconds; + }; + +} // end namespace Catch + +#endif // CATCH_SECTION_INFO_HPP_INCLUDED + + +#ifndef CATCH_SESSION_HPP_INCLUDED +#define CATCH_SESSION_HPP_INCLUDED + + + +#ifndef CATCH_COMMANDLINE_HPP_INCLUDED +#define CATCH_COMMANDLINE_HPP_INCLUDED + + + +#ifndef CATCH_CLARA_HPP_INCLUDED +#define CATCH_CLARA_HPP_INCLUDED + +#if defined( __clang__ ) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wweak-vtables" +# pragma clang diagnostic ignored "-Wshadow" +# pragma clang diagnostic ignored "-Wdeprecated" +#endif + +#if defined( __GNUC__ ) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsign-conversion" +#endif + +#ifndef CLARA_CONFIG_OPTIONAL_TYPE +# ifdef __has_include +# if __has_include( ) && __cplusplus >= 201703L +# include +# define CLARA_CONFIG_OPTIONAL_TYPE std::optional +# endif +# endif +#endif + + +#include +#include +#include +#include +#include +#include +#include + +namespace Catch { + namespace Clara { + + class Args; + class Parser; + + // enum of result types from a parse + enum class ParseResultType { + Matched, + NoMatch, + ShortCircuitAll, + ShortCircuitSame + }; + + struct accept_many_t {}; + constexpr accept_many_t accept_many {}; + + namespace Detail { + struct fake_arg { + template + operator T(); + }; + + template + struct is_unary_function : std::false_type {}; + + template + struct is_unary_function< + F, + Catch::Detail::void_t()( fake_arg() ) ) + > + > : std::true_type {}; + + // Traits for extracting arg and return type of lambdas (for single + // argument lambdas) + template + struct UnaryLambdaTraits + : UnaryLambdaTraits {}; + + template + struct UnaryLambdaTraits { + static const bool isValid = false; + }; + + template + struct UnaryLambdaTraits { + static const bool isValid = true; + using ArgType = std::remove_const_t>; + using ReturnType = ReturnT; + }; + + class TokenStream; + + // Wraps a token coming from a token stream. These may not directly + // correspond to strings as a single string may encode an option + + // its argument if the : or = form is used + enum class TokenType { Option, Argument }; + struct Token { + TokenType type; + StringRef token; + }; + + // Abstracts iterators into args as a stream of tokens, with option + // arguments uniformly handled + class TokenStream { + using Iterator = std::vector::const_iterator; + Iterator it; + Iterator itEnd; + std::vector m_tokenBuffer; + void loadBuffer(); + + public: + explicit TokenStream( Args const& args ); + TokenStream( Iterator it, Iterator itEnd ); + + explicit operator bool() const { + return !m_tokenBuffer.empty() || it != itEnd; + } + + size_t count() const { + return m_tokenBuffer.size() + ( itEnd - it ); + } + + Token operator*() const { + assert( !m_tokenBuffer.empty() ); + return m_tokenBuffer.front(); + } + + Token const* operator->() const { + assert( !m_tokenBuffer.empty() ); + return &m_tokenBuffer.front(); + } + + TokenStream& operator++(); + }; + + //! Denotes type of a parsing result + enum class ResultType { + Ok, ///< No errors + LogicError, ///< Error in user-specified arguments for + ///< construction + RuntimeError ///< Error in parsing inputs + }; + + class ResultBase { + protected: + ResultBase( ResultType type ): m_type( type ) {} + virtual ~ResultBase(); // = default; + + + ResultBase(ResultBase const&) = default; + ResultBase& operator=(ResultBase const&) = default; + ResultBase(ResultBase&&) = default; + ResultBase& operator=(ResultBase&&) = default; + + virtual void enforceOk() const = 0; + + ResultType m_type; + }; + + template + class ResultValueBase : public ResultBase { + public: + T const& value() const& { + enforceOk(); + return m_value; + } + T&& value() && { + enforceOk(); + return CATCH_MOVE( m_value ); + } + + protected: + ResultValueBase( ResultType type ): ResultBase( type ) {} + + ResultValueBase( ResultValueBase const& other ): + ResultBase( other ) { + if ( m_type == ResultType::Ok ) + new ( &m_value ) T( other.m_value ); + } + ResultValueBase( ResultValueBase&& other ): + ResultBase( other ) { + if ( m_type == ResultType::Ok ) + new ( &m_value ) T( CATCH_MOVE(other.m_value) ); + } + + + ResultValueBase( ResultType, T const& value ): + ResultBase( ResultType::Ok ) { + new ( &m_value ) T( value ); + } + ResultValueBase( ResultType, T&& value ): + ResultBase( ResultType::Ok ) { + new ( &m_value ) T( CATCH_MOVE(value) ); + } + + ResultValueBase& operator=( ResultValueBase const& other ) { + if ( m_type == ResultType::Ok ) + m_value.~T(); + ResultBase::operator=( other ); + if ( m_type == ResultType::Ok ) + new ( &m_value ) T( other.m_value ); + return *this; + } + ResultValueBase& operator=( ResultValueBase&& other ) { + if ( m_type == ResultType::Ok ) m_value.~T(); + ResultBase::operator=( other ); + if ( m_type == ResultType::Ok ) + new ( &m_value ) T( CATCH_MOVE(other.m_value) ); + return *this; + } + + + ~ResultValueBase() override { + if ( m_type == ResultType::Ok ) + m_value.~T(); + } + + union { + T m_value; + }; + }; + + template <> class ResultValueBase : public ResultBase { + protected: + using ResultBase::ResultBase; + }; + + template + class BasicResult : public ResultValueBase { + public: + template + explicit BasicResult( BasicResult const& other ): + ResultValueBase( other.type() ), + m_errorMessage( other.errorMessage() ) { + assert( type() != ResultType::Ok ); + } + + template + static auto ok( U&& value ) -> BasicResult { + return { ResultType::Ok, CATCH_FORWARD(value) }; + } + static auto ok() -> BasicResult { return { ResultType::Ok }; } + static auto logicError( std::string&& message ) + -> BasicResult { + return { ResultType::LogicError, CATCH_MOVE(message) }; + } + static auto runtimeError( std::string&& message ) + -> BasicResult { + return { ResultType::RuntimeError, CATCH_MOVE(message) }; + } + + explicit operator bool() const { + return m_type == ResultType::Ok; + } + auto type() const -> ResultType { return m_type; } + auto errorMessage() const -> std::string const& { + return m_errorMessage; + } + + protected: + void enforceOk() const override { + + // Errors shouldn't reach this point, but if they do + // the actual error message will be in m_errorMessage + assert( m_type != ResultType::LogicError ); + assert( m_type != ResultType::RuntimeError ); + if ( m_type != ResultType::Ok ) + std::abort(); + } + + std::string + m_errorMessage; // Only populated if resultType is an error + + BasicResult( ResultType type, + std::string&& message ): + ResultValueBase( type ), m_errorMessage( CATCH_MOVE(message) ) { + assert( m_type != ResultType::Ok ); + } + + using ResultValueBase::ResultValueBase; + using ResultBase::m_type; + }; + + class ParseState { + public: + ParseState( ParseResultType type, + TokenStream remainingTokens ); + + ParseResultType type() const { return m_type; } + TokenStream const& remainingTokens() const& { + return m_remainingTokens; + } + TokenStream&& remainingTokens() && { + return CATCH_MOVE( m_remainingTokens ); + } + + private: + ParseResultType m_type; + TokenStream m_remainingTokens; + }; + + using Result = BasicResult; + using ParserResult = BasicResult; + using InternalParseResult = BasicResult; + + struct HelpColumns { + std::string left; + StringRef descriptions; + }; + + template + ParserResult convertInto( std::string const& source, T& target ) { + std::stringstream ss( source ); + ss >> target; + if ( ss.fail() ) { + return ParserResult::runtimeError( + "Unable to convert '" + source + + "' to destination type" ); + } else { + return ParserResult::ok( ParseResultType::Matched ); + } + } + ParserResult convertInto( std::string const& source, + std::string& target ); + ParserResult convertInto( std::string const& source, bool& target ); + +#ifdef CLARA_CONFIG_OPTIONAL_TYPE + template + auto convertInto( std::string const& source, + CLARA_CONFIG_OPTIONAL_TYPE& target ) + -> ParserResult { + T temp; + auto result = convertInto( source, temp ); + if ( result ) + target = CATCH_MOVE( temp ); + return result; + } +#endif // CLARA_CONFIG_OPTIONAL_TYPE + + struct BoundRef : Catch::Detail::NonCopyable { + virtual ~BoundRef() = default; + virtual bool isContainer() const; + virtual bool isFlag() const; + }; + struct BoundValueRefBase : BoundRef { + virtual auto setValue( std::string const& arg ) + -> ParserResult = 0; + }; + struct BoundFlagRefBase : BoundRef { + virtual auto setFlag( bool flag ) -> ParserResult = 0; + bool isFlag() const override; + }; + + template struct BoundValueRef : BoundValueRefBase { + T& m_ref; + + explicit BoundValueRef( T& ref ): m_ref( ref ) {} + + ParserResult setValue( std::string const& arg ) override { + return convertInto( arg, m_ref ); + } + }; + + template + struct BoundValueRef> : BoundValueRefBase { + std::vector& m_ref; + + explicit BoundValueRef( std::vector& ref ): m_ref( ref ) {} + + auto isContainer() const -> bool override { return true; } + + auto setValue( std::string const& arg ) + -> ParserResult override { + T temp; + auto result = convertInto( arg, temp ); + if ( result ) + m_ref.push_back( temp ); + return result; + } + }; + + struct BoundFlagRef : BoundFlagRefBase { + bool& m_ref; + + explicit BoundFlagRef( bool& ref ): m_ref( ref ) {} + + ParserResult setFlag( bool flag ) override; + }; + + template struct LambdaInvoker { + static_assert( + std::is_same::value, + "Lambda must return void or clara::ParserResult" ); + + template + static auto invoke( L const& lambda, ArgType const& arg ) + -> ParserResult { + return lambda( arg ); + } + }; + + template <> struct LambdaInvoker { + template + static auto invoke( L const& lambda, ArgType const& arg ) + -> ParserResult { + lambda( arg ); + return ParserResult::ok( ParseResultType::Matched ); + } + }; + + template + auto invokeLambda( L const& lambda, std::string const& arg ) + -> ParserResult { + ArgType temp{}; + auto result = convertInto( arg, temp ); + return !result ? result + : LambdaInvoker::ReturnType>::invoke( lambda, temp ); + } + + template struct BoundLambda : BoundValueRefBase { + L m_lambda; + + static_assert( + UnaryLambdaTraits::isValid, + "Supplied lambda must take exactly one argument" ); + explicit BoundLambda( L const& lambda ): m_lambda( lambda ) {} + + auto setValue( std::string const& arg ) + -> ParserResult override { + return invokeLambda::ArgType>( + m_lambda, arg ); + } + }; + + template struct BoundManyLambda : BoundLambda { + explicit BoundManyLambda( L const& lambda ): BoundLambda( lambda ) {} + bool isContainer() const override { return true; } + }; + + template struct BoundFlagLambda : BoundFlagRefBase { + L m_lambda; + + static_assert( + UnaryLambdaTraits::isValid, + "Supplied lambda must take exactly one argument" ); + static_assert( + std::is_same::ArgType, + bool>::value, + "flags must be boolean" ); + + explicit BoundFlagLambda( L const& lambda ): + m_lambda( lambda ) {} + + auto setFlag( bool flag ) -> ParserResult override { + return LambdaInvoker::ReturnType>::invoke( m_lambda, flag ); + } + }; + + enum class Optionality { Optional, Required }; + + class ParserBase { + public: + virtual ~ParserBase() = default; + virtual auto validate() const -> Result { return Result::ok(); } + virtual auto parse( std::string const& exeName, + TokenStream tokens ) const + -> InternalParseResult = 0; + virtual size_t cardinality() const; + + InternalParseResult parse( Args const& args ) const; + }; + + template + class ComposableParserImpl : public ParserBase { + public: + template + auto operator|( T const& other ) const -> Parser; + }; + + // Common code and state for Args and Opts + template + class ParserRefImpl : public ComposableParserImpl { + protected: + Optionality m_optionality = Optionality::Optional; + std::shared_ptr m_ref; + StringRef m_hint; + StringRef m_description; + + explicit ParserRefImpl( std::shared_ptr const& ref ): + m_ref( ref ) {} + + public: + template + ParserRefImpl( accept_many_t, + LambdaT const& ref, + StringRef hint ): + m_ref( std::make_shared>( ref ) ), + m_hint( hint ) {} + + template ::value>> + ParserRefImpl( T& ref, StringRef hint ): + m_ref( std::make_shared>( ref ) ), + m_hint( hint ) {} + + template ::value>> + ParserRefImpl( LambdaT const& ref, StringRef hint ): + m_ref( std::make_shared>( ref ) ), + m_hint( hint ) {} + + DerivedT& operator()( StringRef description ) & { + m_description = description; + return static_cast( *this ); + } + DerivedT&& operator()( StringRef description ) && { + m_description = description; + return static_cast( *this ); + } + + auto optional() -> DerivedT& { + m_optionality = Optionality::Optional; + return static_cast( *this ); + } + + auto required() -> DerivedT& { + m_optionality = Optionality::Required; + return static_cast( *this ); + } + + auto isOptional() const -> bool { + return m_optionality == Optionality::Optional; + } + + auto cardinality() const -> size_t override { + if ( m_ref->isContainer() ) + return 0; + else + return 1; + } + + StringRef hint() const { return m_hint; } + }; + + } // namespace detail + + + // A parser for arguments + class Arg : public Detail::ParserRefImpl { + public: + using ParserRefImpl::ParserRefImpl; + using ParserBase::parse; + + Detail::InternalParseResult + parse(std::string const&, + Detail::TokenStream tokens) const override; + }; + + // A parser for options + class Opt : public Detail::ParserRefImpl { + protected: + std::vector m_optNames; + + public: + template + explicit Opt(LambdaT const& ref) : + ParserRefImpl( + std::make_shared>(ref)) {} + + explicit Opt(bool& ref); + + template ::value>> + Opt( LambdaT const& ref, StringRef hint ): + ParserRefImpl( ref, hint ) {} + + template + Opt( accept_many_t, LambdaT const& ref, StringRef hint ): + ParserRefImpl( accept_many, ref, hint ) {} + + template ::value>> + Opt( T& ref, StringRef hint ): + ParserRefImpl( ref, hint ) {} + + Opt& operator[]( StringRef optName ) & { + m_optNames.push_back(optName); + return *this; + } + Opt&& operator[]( StringRef optName ) && { + m_optNames.push_back( optName ); + return CATCH_MOVE(*this); + } + + Detail::HelpColumns getHelpColumns() const; + + bool isMatch(StringRef optToken) const; + + using ParserBase::parse; + + Detail::InternalParseResult + parse(std::string const&, + Detail::TokenStream tokens) const override; + + Detail::Result validate() const override; + }; + + // Specifies the name of the executable + class ExeName : public Detail::ComposableParserImpl { + std::shared_ptr m_name; + std::shared_ptr m_ref; + + public: + ExeName(); + explicit ExeName(std::string& ref); + + template + explicit ExeName(LambdaT const& lambda) : ExeName() { + m_ref = std::make_shared>(lambda); + } + + // The exe name is not parsed out of the normal tokens, but is + // handled specially + Detail::InternalParseResult + parse(std::string const&, + Detail::TokenStream tokens) const override; + + std::string const& name() const { return *m_name; } + Detail::ParserResult set(std::string const& newName); + }; + + + // A Combined parser + class Parser : Detail::ParserBase { + mutable ExeName m_exeName; + std::vector m_options; + std::vector m_args; + + public: + + auto operator|=(ExeName const& exeName) -> Parser& { + m_exeName = exeName; + return *this; + } + + auto operator|=(Arg const& arg) -> Parser& { + m_args.push_back(arg); + return *this; + } + + friend Parser& operator|=( Parser& p, Opt const& opt ) { + p.m_options.push_back( opt ); + return p; + } + friend Parser& operator|=( Parser& p, Opt&& opt ) { + p.m_options.push_back( CATCH_MOVE(opt) ); + return p; + } + + Parser& operator|=(Parser const& other); + + template + friend Parser operator|( Parser const& p, T&& rhs ) { + Parser temp( p ); + temp |= rhs; + return temp; + } + + template + friend Parser operator|( Parser&& p, T&& rhs ) { + p |= CATCH_FORWARD(rhs); + return CATCH_MOVE(p); + } + + std::vector getHelpColumns() const; + + void writeToStream(std::ostream& os) const; + + friend auto operator<<(std::ostream& os, Parser const& parser) + -> std::ostream& { + parser.writeToStream(os); + return os; + } + + Detail::Result validate() const override; + + using ParserBase::parse; + Detail::InternalParseResult + parse(std::string const& exeName, + Detail::TokenStream tokens) const override; + }; + + /** + * Wrapper over argc + argv, assumes that the inputs outlive it + */ + class Args { + friend Detail::TokenStream; + StringRef m_exeName; + std::vector m_args; + + public: + Args(int argc, char const* const* argv); + // Helper constructor for testing + Args(std::initializer_list args); + + StringRef exeName() const { return m_exeName; } + }; + + + // Convenience wrapper for option parser that specifies the help option + struct Help : Opt { + Help(bool& showHelpFlag); + }; + + // Result type for parser operation + using Detail::ParserResult; + + namespace Detail { + template + template + Parser + ComposableParserImpl::operator|(T const& other) const { + return Parser() | static_cast(*this) | other; + } + } + + } // namespace Clara +} // namespace Catch + +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + +#if defined( __GNUC__ ) +# pragma GCC diagnostic pop +#endif + +#endif // CATCH_CLARA_HPP_INCLUDED + +namespace Catch { + + struct ConfigData; + + Clara::Parser makeCommandLineParser( ConfigData& config ); + +} // end namespace Catch + +#endif // CATCH_COMMANDLINE_HPP_INCLUDED + +namespace Catch { + + class Session : Detail::NonCopyable { + public: + + Session(); + ~Session(); + + void showHelp() const; + void libIdentify(); + + int applyCommandLine( int argc, char const * const * argv ); + #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE) + int applyCommandLine( int argc, wchar_t const * const * argv ); + #endif + + void useConfigData( ConfigData const& configData ); + + template + int run(int argc, CharT const * const argv[]) { + if (m_startupExceptions) + return 1; + int returnCode = applyCommandLine(argc, argv); + if (returnCode == 0) + returnCode = run(); + return returnCode; + } + + int run(); + + Clara::Parser const& cli() const; + void cli( Clara::Parser const& newParser ); + ConfigData& configData(); + Config& config(); + private: + int runInternal(); + + Clara::Parser m_cli; + ConfigData m_configData; + Detail::unique_ptr m_config; + bool m_startupExceptions = false; + }; + +} // end namespace Catch + +#endif // CATCH_SESSION_HPP_INCLUDED + + +#ifndef CATCH_TAG_ALIAS_HPP_INCLUDED +#define CATCH_TAG_ALIAS_HPP_INCLUDED + + +#include + +namespace Catch { + + struct TagAlias { + TagAlias(std::string const& _tag, SourceLineInfo _lineInfo): + tag(_tag), + lineInfo(_lineInfo) + {} + + std::string tag; + SourceLineInfo lineInfo; + }; + +} // end namespace Catch + +#endif // CATCH_TAG_ALIAS_HPP_INCLUDED + + +#ifndef CATCH_TAG_ALIAS_AUTOREGISTRAR_HPP_INCLUDED +#define CATCH_TAG_ALIAS_AUTOREGISTRAR_HPP_INCLUDED + + +namespace Catch { + + struct RegistrarForTagAliases { + RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); + }; + +} // end namespace Catch + +#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +#endif // CATCH_TAG_ALIAS_AUTOREGISTRAR_HPP_INCLUDED + + +#ifndef CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED +#define CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED + +// We need this suppression to leak, because it took until GCC 10 +// for the front end to handle local suppression via _Pragma properly +// inside templates (so `TEMPLATE_TEST_CASE` and co). +// **THIS IS DIFFERENT FOR STANDARD TESTS, WHERE GCC 9 IS SUFFICIENT** +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ < 10 +#pragma GCC diagnostic ignored "-Wparentheses" +#endif + + + + +#ifndef CATCH_TEST_MACROS_HPP_INCLUDED +#define CATCH_TEST_MACROS_HPP_INCLUDED + + + +#ifndef CATCH_TEST_MACRO_IMPL_HPP_INCLUDED +#define CATCH_TEST_MACRO_IMPL_HPP_INCLUDED + + + +#ifndef CATCH_ASSERTION_HANDLER_HPP_INCLUDED +#define CATCH_ASSERTION_HANDLER_HPP_INCLUDED + + + +#ifndef CATCH_DECOMPOSER_HPP_INCLUDED +#define CATCH_DECOMPOSER_HPP_INCLUDED + + + +#ifndef CATCH_COMPARE_TRAITS_HPP_INCLUDED +#define CATCH_COMPARE_TRAITS_HPP_INCLUDED + + +#include + +namespace Catch { + namespace Detail { + +#if defined( __GNUC__ ) && !defined( __clang__ ) +# pragma GCC diagnostic push + // GCC likes to complain about comparing bool with 0, in the decltype() + // that defines the comparable traits below. +# pragma GCC diagnostic ignored "-Wbool-compare" + // "ordered comparison of pointer with integer zero" same as above, + // but it does not have a separate warning flag to suppress +# pragma GCC diagnostic ignored "-Wextra" + // Did you know that comparing floats with `0` directly + // is super-duper dangerous in unevaluated context? +# pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +#if defined( __clang__ ) +# pragma clang diagnostic push + // Did you know that comparing floats with `0` directly + // is super-duper dangerous in unevaluated context? +# pragma clang diagnostic ignored "-Wfloat-equal" +#endif + +#define CATCH_DEFINE_COMPARABLE_TRAIT( id, op ) \ + template \ + struct is_##id##_comparable : std::false_type {}; \ + template \ + struct is_##id##_comparable< \ + T, \ + U, \ + void_t() op std::declval() )>> \ + : std::true_type {}; \ + template \ + struct is_##id##_0_comparable : std::false_type {}; \ + template \ + struct is_##id##_0_comparable() op 0 )>> \ + : std::true_type {}; + + // We need all 6 pre-spaceship comparison ops: <, <=, >, >=, ==, != + CATCH_DEFINE_COMPARABLE_TRAIT( lt, < ) + CATCH_DEFINE_COMPARABLE_TRAIT( le, <= ) + CATCH_DEFINE_COMPARABLE_TRAIT( gt, > ) + CATCH_DEFINE_COMPARABLE_TRAIT( ge, >= ) + CATCH_DEFINE_COMPARABLE_TRAIT( eq, == ) + CATCH_DEFINE_COMPARABLE_TRAIT( ne, != ) + +#undef CATCH_DEFINE_COMPARABLE_TRAIT + +#if defined( __GNUC__ ) && !defined( __clang__ ) +# pragma GCC diagnostic pop +#endif +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + + + } // namespace Detail +} // namespace Catch + +#endif // CATCH_COMPARE_TRAITS_HPP_INCLUDED + + +#ifndef CATCH_LOGICAL_TRAITS_HPP_INCLUDED +#define CATCH_LOGICAL_TRAITS_HPP_INCLUDED + +#include + +namespace Catch { +namespace Detail { + +#if defined( __cpp_lib_logical_traits ) && __cpp_lib_logical_traits >= 201510 + + using std::conjunction; + using std::disjunction; + using std::negation; + +#else + + template struct conjunction : std::true_type {}; + template struct conjunction : B1 {}; + template + struct conjunction + : std::conditional_t, B1> {}; + + template struct disjunction : std::false_type {}; + template struct disjunction : B1 {}; + template + struct disjunction + : std::conditional_t> {}; + + template + struct negation : std::integral_constant {}; + +#endif + +} // namespace Detail +} // namespace Catch + +#endif // CATCH_LOGICAL_TRAITS_HPP_INCLUDED + +#include +#include + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4389) // '==' : signed/unsigned mismatch +#pragma warning(disable:4018) // more "signed/unsigned mismatch" +#pragma warning(disable:4312) // Converting int to T* using reinterpret_cast (issue on x64 platform) +#pragma warning(disable:4180) // qualifier applied to function type has no meaning +#pragma warning(disable:4800) // Forcing result to true or false +#endif + +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wsign-compare" +#elif defined __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsign-compare" +#endif + +namespace Catch { + + template + struct always_false : std::false_type {}; + + class ITransientExpression { + bool m_isBinaryExpression; + bool m_result; + + public: + auto isBinaryExpression() const -> bool { return m_isBinaryExpression; } + auto getResult() const -> bool { return m_result; } + virtual void streamReconstructedExpression( std::ostream &os ) const = 0; + + ITransientExpression( bool isBinaryExpression, bool result ) + : m_isBinaryExpression( isBinaryExpression ), + m_result( result ) + {} + + ITransientExpression() = default; + ITransientExpression(ITransientExpression const&) = default; + ITransientExpression& operator=(ITransientExpression const&) = default; + + // We don't actually need a virtual destructor, but many static analysers + // complain if it's not here :-( + virtual ~ITransientExpression(); // = default; + + friend std::ostream& operator<<(std::ostream& out, ITransientExpression const& expr) { + expr.streamReconstructedExpression(out); + return out; + } + }; + + void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ); + + template + class BinaryExpr : public ITransientExpression { + LhsT m_lhs; + StringRef m_op; + RhsT m_rhs; + + void streamReconstructedExpression( std::ostream &os ) const override { + formatReconstructedExpression + ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) ); + } + + public: + BinaryExpr( bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs ) + : ITransientExpression{ true, comparisonResult }, + m_lhs( lhs ), + m_op( op ), + m_rhs( rhs ) + {} + + template + auto operator && ( T ) const -> BinaryExpr const { + static_assert(always_false::value, + "chained comparisons are not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + template + auto operator || ( T ) const -> BinaryExpr const { + static_assert(always_false::value, + "chained comparisons are not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + template + auto operator == ( T ) const -> BinaryExpr const { + static_assert(always_false::value, + "chained comparisons are not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + template + auto operator != ( T ) const -> BinaryExpr const { + static_assert(always_false::value, + "chained comparisons are not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + template + auto operator > ( T ) const -> BinaryExpr const { + static_assert(always_false::value, + "chained comparisons are not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + template + auto operator < ( T ) const -> BinaryExpr const { + static_assert(always_false::value, + "chained comparisons are not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + template + auto operator >= ( T ) const -> BinaryExpr const { + static_assert(always_false::value, + "chained comparisons are not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + template + auto operator <= ( T ) const -> BinaryExpr const { + static_assert(always_false::value, + "chained comparisons are not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + }; + + template + class UnaryExpr : public ITransientExpression { + LhsT m_lhs; + + void streamReconstructedExpression( std::ostream &os ) const override { + os << Catch::Detail::stringify( m_lhs ); + } + + public: + explicit UnaryExpr( LhsT lhs ) + : ITransientExpression{ false, static_cast(lhs) }, + m_lhs( lhs ) + {} + }; + + + template + class ExprLhs { + LhsT m_lhs; + public: + explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {} + +#define CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( id, op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + Detail::negation>>>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_eq_0_comparable, \ + /* We allow long because we want `ptr op NULL` to be accepted */ \ + Detail::disjunction, \ + std::is_same>>::value, \ + BinaryExpr> { \ + if ( rhs != 0 ) { throw_test_failure_exception(); } \ + return { \ + static_cast( lhs.m_lhs op 0 ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_eq_0_comparable, \ + /* We allow long because we want `ptr op NULL` to be accepted */ \ + Detail::disjunction, \ + std::is_same>>::value, \ + BinaryExpr> { \ + if ( lhs.m_lhs != 0 ) { throw_test_failure_exception(); } \ + return { static_cast( 0 op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } + + CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( eq, == ) + CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR( ne, != ) + + #undef CATCH_INTERNAL_DEFINE_EXPRESSION_EQUALITY_OPERATOR + +#define CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( id, op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + Detail::negation>>>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction, \ + std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_##id##_0_comparable, \ + std::is_same>::value, \ + BinaryExpr> { \ + if ( rhs != 0 ) { throw_test_failure_exception(); } \ + return { \ + static_cast( lhs.m_lhs op 0 ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t< \ + Detail::conjunction< \ + Detail::negation>, \ + Detail::is_##id##_0_comparable, \ + std::is_same>::value, \ + BinaryExpr> { \ + if ( lhs.m_lhs != 0 ) { throw_test_failure_exception(); } \ + return { static_cast( 0 op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } + + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( lt, < ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( le, <= ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( gt, > ) + CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR( ge, >= ) + + #undef CATCH_INTERNAL_DEFINE_EXPRESSION_COMPARISON_OPERATOR + + +#define CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR( op ) \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT&& rhs ) \ + ->std::enable_if_t< \ + !std::is_arithmetic>::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } \ + template \ + friend auto operator op( ExprLhs&& lhs, RhsT rhs ) \ + ->std::enable_if_t::value, \ + BinaryExpr> { \ + return { \ + static_cast( lhs.m_lhs op rhs ), lhs.m_lhs, #op##_sr, rhs }; \ + } + + CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(|) + CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(&) + CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR(^) + + #undef CATCH_INTERNAL_DEFINE_EXPRESSION_OPERATOR + + template + friend auto operator && ( ExprLhs &&, RhsT && ) -> BinaryExpr { + static_assert(always_false::value, + "operator&& is not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + template + friend auto operator || ( ExprLhs &&, RhsT && ) -> BinaryExpr { + static_assert(always_false::value, + "operator|| is not supported inside assertions, " + "wrap the expression inside parentheses, or decompose it"); + } + + auto makeUnaryExpr() const -> UnaryExpr { + return UnaryExpr{ m_lhs }; + } + }; + + struct Decomposer { + template>::value, int> = 0> + friend auto operator <= ( Decomposer &&, T && lhs ) -> ExprLhs { + return ExprLhs{ lhs }; + } + + template::value, int> = 0> + friend auto operator <= ( Decomposer &&, T value ) -> ExprLhs { + return ExprLhs{ value }; + } + }; + +} // end namespace Catch + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#ifdef __clang__ +# pragma clang diagnostic pop +#elif defined __GNUC__ +# pragma GCC diagnostic pop +#endif + +#endif // CATCH_DECOMPOSER_HPP_INCLUDED + +#include + +namespace Catch { + + struct AssertionReaction { + bool shouldDebugBreak = false; + bool shouldThrow = false; + bool shouldSkip = false; + }; + + class AssertionHandler { + AssertionInfo m_assertionInfo; + AssertionReaction m_reaction; + bool m_completed = false; + IResultCapture& m_resultCapture; + + public: + AssertionHandler + ( StringRef macroName, + SourceLineInfo const& lineInfo, + StringRef capturedExpression, + ResultDisposition::Flags resultDisposition ); + ~AssertionHandler() { + if ( !m_completed ) { + m_resultCapture.handleIncomplete( m_assertionInfo ); + } + } + + + template + void handleExpr( ExprLhs const& expr ) { + handleExpr( expr.makeUnaryExpr() ); + } + void handleExpr( ITransientExpression const& expr ); + + void handleMessage(ResultWas::OfType resultType, StringRef message); + + void handleExceptionThrownAsExpected(); + void handleUnexpectedExceptionNotThrown(); + void handleExceptionNotThrownAsExpected(); + void handleThrowingCallSkipped(); + void handleUnexpectedInflightException(); + + void complete(); + + // query + auto allowThrows() const -> bool; + }; + + void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str ); + +} // namespace Catch + +#endif // CATCH_ASSERTION_HANDLER_HPP_INCLUDED + + +#ifndef CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED +#define CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED + + +#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION) + #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__##_catch_sr +#else + #define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION"_catch_sr +#endif + +#endif // CATCH_PREPROCESSOR_INTERNAL_STRINGIFY_HPP_INCLUDED + +// We need this suppression to leak, because it took until GCC 10 +// for the front end to handle local suppression via _Pragma properly +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && __GNUC__ <= 9 + #pragma GCC diagnostic ignored "-Wparentheses" +#endif + +#if !defined(CATCH_CONFIG_DISABLE) + +#if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + +/////////////////////////////////////////////////////////////////////////////// +// Another way to speed-up compilation is to omit local try-catch for REQUIRE* +// macros. +#define INTERNAL_CATCH_TRY +#define INTERNAL_CATCH_CATCH( capturer ) + +#else // CATCH_CONFIG_FAST_COMPILE + +#define INTERNAL_CATCH_TRY try +#define INTERNAL_CATCH_CATCH( handler ) catch(...) { (handler).handleUnexpectedInflightException(); } + +#endif + +#define INTERNAL_CATCH_REACT( handler ) handler.complete(); + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \ + do { /* NOLINT(bugprone-infinite-loop) */ \ + /* The expression should not be evaluated, but warnings should hopefully be checked */ \ + CATCH_INTERNAL_IGNORE_BUT_WARN(__VA_ARGS__); \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \ + INTERNAL_CATCH_TRY { \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( (void)0, (false) && static_cast( !!(__VA_ARGS__) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look + // The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&. + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \ + INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \ + if( Catch::getResultCapture().lastAssertionPassed() ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_ELSE( macroName, resultDisposition, ... ) \ + INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \ + if( !Catch::getResultCapture().lastAssertionPassed() ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_NO_THROW( macroName, resultDisposition, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \ + try { \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ + static_cast(__VA_ARGS__); \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + catchAssertionHandler.handleExceptionNotThrownAsExpected(); \ + } \ + catch( ... ) { \ + catchAssertionHandler.handleUnexpectedInflightException(); \ + } \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_THROWS( macroName, resultDisposition, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \ + if( catchAssertionHandler.allowThrows() ) \ + try { \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ + CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ + static_cast(__VA_ARGS__); \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ + } \ + catch( ... ) { \ + catchAssertionHandler.handleExceptionThrownAsExpected(); \ + } \ + else \ + catchAssertionHandler.handleThrowingCallSkipped(); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +/////////////////////////////////////////////////////////////////////////////// +#define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) ", " CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \ + if( catchAssertionHandler.allowThrows() ) \ + try { \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ + CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ + static_cast(expr); \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ + } \ + catch( exceptionType const& ) { \ + catchAssertionHandler.handleExceptionThrownAsExpected(); \ + } \ + catch( ... ) { \ + catchAssertionHandler.handleUnexpectedInflightException(); \ + } \ + else \ + catchAssertionHandler.handleThrowingCallSkipped(); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + + + +/////////////////////////////////////////////////////////////////////////////// +// Although this is matcher-based, it can be used with just a string +#define INTERNAL_CATCH_THROWS_STR_MATCHES( macroName, resultDisposition, matcher, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ + if( catchAssertionHandler.allowThrows() ) \ + try { \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_RESULT \ + CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \ + static_cast(__VA_ARGS__); \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ + } \ + catch( ... ) { \ + Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher ); \ + } \ + else \ + catchAssertionHandler.handleThrowingCallSkipped(); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +#endif // CATCH_CONFIG_DISABLE + +#endif // CATCH_TEST_MACRO_IMPL_HPP_INCLUDED + + +#ifndef CATCH_SECTION_HPP_INCLUDED +#define CATCH_SECTION_HPP_INCLUDED + + + + +/** \file + * Wrapper for the STATIC_ANALYSIS_SUPPORT configuration option + * + * Some of Catch2's macros can be defined differently to work better with + * static analysis tools, like clang-tidy or coverity. + * Currently the main use case is to show that `SECTION`s are executed + * exclusively, and not all in one run of a `TEST_CASE`. + */ + +#ifndef CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED +#define CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED + + +#if defined(__clang_analyzer__) || defined(__COVERITY__) + #define CATCH_INTERNAL_CONFIG_STATIC_ANALYSIS_SUPPORT +#endif + +#if defined( CATCH_INTERNAL_CONFIG_STATIC_ANALYSIS_SUPPORT ) && \ + !defined( CATCH_CONFIG_NO_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT ) && \ + !defined( CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT ) +# define CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT +#endif + + +#endif // CATCH_CONFIG_STATIC_ANALYSIS_SUPPORT_HPP_INCLUDED + + +#ifndef CATCH_TIMER_HPP_INCLUDED +#define CATCH_TIMER_HPP_INCLUDED + +#include + +namespace Catch { + + class Timer { + uint64_t m_nanoseconds = 0; + public: + void start(); + auto getElapsedNanoseconds() const -> uint64_t; + auto getElapsedMicroseconds() const -> uint64_t; + auto getElapsedMilliseconds() const -> unsigned int; + auto getElapsedSeconds() const -> double; + }; + +} // namespace Catch + +#endif // CATCH_TIMER_HPP_INCLUDED + +namespace Catch { + + class Section : Detail::NonCopyable { + public: + Section( SectionInfo&& info ); + Section( SourceLineInfo const& _lineInfo, + StringRef _name, + const char* const = nullptr ); + ~Section(); + + // This indicates whether the section should be executed or not + explicit operator bool() const; + + private: + SectionInfo m_info; + + Counts m_assertions; + bool m_sectionIncluded; + Timer m_timer; + }; + +} // end namespace Catch + +#if !defined(CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT) +# define INTERNAL_CATCH_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + if ( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( \ + catch_internal_Section ) = \ + Catch::Section( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +# define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + if ( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( \ + catch_internal_Section ) = \ + Catch::SectionInfo( \ + CATCH_INTERNAL_LINEINFO, \ + ( Catch::ReusableStringStream() << __VA_ARGS__ ) \ + .str() ) ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +#else + +// These section definitions imply that at most one section at one level +// will be intered (because only one section's __LINE__ can be equal to +// the dummy `catchInternalSectionHint` variable from `TEST_CASE`). + +namespace Catch { + namespace Detail { + // Intentionally without linkage, as it should only be used as a dummy + // symbol for static analysis. + int GetNewSectionHint(); + } // namespace Detail +} // namespace Catch + + +# define INTERNAL_CATCH_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + if ( [[maybe_unused]] const int catchInternalPreviousSectionHint = \ + catchInternalSectionHint, \ + catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ + catchInternalPreviousSectionHint == __LINE__ ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +# define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + if ( [[maybe_unused]] const int catchInternalPreviousSectionHint = \ + catchInternalSectionHint, \ + catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ + catchInternalPreviousSectionHint == __LINE__ ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +#endif + + +#endif // CATCH_SECTION_HPP_INCLUDED + + +#ifndef CATCH_TEST_REGISTRY_HPP_INCLUDED +#define CATCH_TEST_REGISTRY_HPP_INCLUDED + + + +#ifndef CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED +#define CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED + +namespace Catch { + + class ITestInvoker { + public: + virtual void invoke() const = 0; + virtual ~ITestInvoker(); // = default + }; + +} // namespace Catch + +#endif // CATCH_INTERFACES_TEST_INVOKER_HPP_INCLUDED + + +#ifndef CATCH_PREPROCESSOR_REMOVE_PARENS_HPP_INCLUDED +#define CATCH_PREPROCESSOR_REMOVE_PARENS_HPP_INCLUDED + +#define INTERNAL_CATCH_EXPAND1( param ) INTERNAL_CATCH_EXPAND2( param ) +#define INTERNAL_CATCH_EXPAND2( ... ) INTERNAL_CATCH_NO##__VA_ARGS__ +#define INTERNAL_CATCH_DEF( ... ) INTERNAL_CATCH_DEF __VA_ARGS__ +#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF + +#define INTERNAL_CATCH_REMOVE_PARENS( ... ) \ + INTERNAL_CATCH_EXPAND1( INTERNAL_CATCH_DEF __VA_ARGS__ ) + +#endif // CATCH_PREPROCESSOR_REMOVE_PARENS_HPP_INCLUDED + +// GCC 5 and older do not properly handle disabling unused-variable warning +// with a _Pragma. This means that we have to leak the suppression to the +// user code as well :-( +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 5 +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + + + +namespace Catch { + +template +class TestInvokerAsMethod : public ITestInvoker { + void (C::*m_testAsMethod)(); +public: + TestInvokerAsMethod( void (C::*testAsMethod)() ) noexcept : m_testAsMethod( testAsMethod ) {} + + void invoke() const override { + C obj; + (obj.*m_testAsMethod)(); + } +}; + +Detail::unique_ptr makeTestInvoker( void(*testAsFunction)() ); + +template +Detail::unique_ptr makeTestInvoker( void (C::*testAsMethod)() ) { + return Detail::make_unique>( testAsMethod ); +} + +struct NameAndTags { + constexpr NameAndTags( StringRef name_ = StringRef(), + StringRef tags_ = StringRef() ) noexcept: + name( name_ ), tags( tags_ ) {} + StringRef name; + StringRef tags; +}; + +struct AutoReg : Detail::NonCopyable { + AutoReg( Detail::unique_ptr invoker, SourceLineInfo const& lineInfo, StringRef classOrMethod, NameAndTags const& nameAndTags ) noexcept; +}; + +} // end namespace Catch + +#if defined(CATCH_CONFIG_DISABLE) + #define INTERNAL_CATCH_TESTCASE_NO_REGISTRATION( TestName, ... ) \ + static inline void TestName() + #define INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \ + namespace{ \ + struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \ + void test(); \ + }; \ + } \ + void TestName::test() +#endif + + +#if !defined(CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT) + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \ + static void TestName(); \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + namespace{ const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + static void TestName() + #define INTERNAL_CATCH_TESTCASE( ... ) \ + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), __VA_ARGS__ ) + +#else // ^^ !CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT | vv CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT + + +// Dummy registrator for the dumy test case macros +namespace Catch { + namespace Detail { + struct DummyUse { + DummyUse( void ( * )( int ) ); + }; + } // namespace Detail +} // namespace Catch + +// Note that both the presence of the argument and its exact name are +// necessary for the section support. + +// We provide a shadowed variable so that a `SECTION` inside non-`TEST_CASE` +// tests can compile. The redefined `TEST_CASE` shadows this with param. +static int catchInternalSectionHint = 0; + +# define INTERNAL_CATCH_TESTCASE2( fname ) \ + static void fname( int ); \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + static const Catch::Detail::DummyUse INTERNAL_CATCH_UNIQUE_NAME( \ + dummyUser )( &(fname) ); \ + CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \ + static void fname( [[maybe_unused]] int catchInternalSectionHint ) \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +# define INTERNAL_CATCH_TESTCASE( ... ) \ + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( dummyFunction ) ) + + +#endif // CATCH_CONFIG_EXPERIMENTAL_STATIC_ANALYSIS_SUPPORT + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + namespace{ \ + struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \ + void test(); \ + }; \ + const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( \ + Catch::makeTestInvoker( &TestName::test ), \ + CATCH_INTERNAL_LINEINFO, \ + #ClassName##_catch_sr, \ + Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ + } \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + void TestName::test() + #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ + INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), ClassName, __VA_ARGS__ ) + + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + namespace { \ + const Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( \ + Catch::makeTestInvoker( &QualifiedMethod ), \ + CATCH_INTERNAL_LINEINFO, \ + "&" #QualifiedMethod##_catch_sr, \ + Catch::NameAndTags{ __VA_ARGS__ } ); \ + } /* NOLINT */ \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + + + /////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \ + do { \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \ + Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \ + } while(false) + + +#endif // CATCH_TEST_REGISTRY_HPP_INCLUDED + + +// All of our user-facing macros support configuration toggle, that +// forces them to be defined prefixed with CATCH_. We also like to +// support another toggle that can minimize (disable) their implementation. +// Given this, we have 4 different configuration options below + +#if defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_DISABLE) + + #define CATCH_REQUIRE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define CATCH_REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) + + #define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr ) + #define CATCH_REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + + #define CATCH_CHECK( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) + #define CATCH_CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CATCH_CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) + #define CATCH_CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( "CATCH_CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) + #define CATCH_CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) + + #define CATCH_CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) + #define CATCH_CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + + #define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ) + #define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #define CATCH_METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) + #define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) + #define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) + #define CATCH_DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ ) + #define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_SKIP( ... ) INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ ) + + + #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE) + #define CATCH_STATIC_REQUIRE( ... ) static_assert( __VA_ARGS__ , #__VA_ARGS__ ); CATCH_SUCCEED( #__VA_ARGS__ ) + #define CATCH_STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), "!(" #__VA_ARGS__ ")" ); CATCH_SUCCEED( #__VA_ARGS__ ) + #define CATCH_STATIC_CHECK( ... ) static_assert( __VA_ARGS__ , #__VA_ARGS__ ); CATCH_SUCCEED( #__VA_ARGS__ ) + #define CATCH_STATIC_CHECK_FALSE( ... ) static_assert( !(__VA_ARGS__), "!(" #__VA_ARGS__ ")" ); CATCH_SUCCEED( #__VA_ARGS__ ) + #else + #define CATCH_STATIC_REQUIRE( ... ) CATCH_REQUIRE( __VA_ARGS__ ) + #define CATCH_STATIC_REQUIRE_FALSE( ... ) CATCH_REQUIRE_FALSE( __VA_ARGS__ ) + #define CATCH_STATIC_CHECK( ... ) CATCH_CHECK( __VA_ARGS__ ) + #define CATCH_STATIC_CHECK_FALSE( ... ) CATCH_CHECK_FALSE( __VA_ARGS__ ) + #endif + + + // "BDD-style" convenience wrappers + #define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( "Scenario: " __VA_ARGS__ ) + #define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) + #define CATCH_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " Given: " << desc ) + #define CATCH_AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( "And given: " << desc ) + #define CATCH_WHEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " When: " << desc ) + #define CATCH_AND_WHEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " And when: " << desc ) + #define CATCH_THEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " Then: " << desc ) + #define CATCH_AND_THEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " And: " << desc ) + +#elif defined(CATCH_CONFIG_PREFIX_ALL) && defined(CATCH_CONFIG_DISABLE) // ^^ prefixed, implemented | vv prefixed, disabled + + #define CATCH_REQUIRE( ... ) (void)(0) + #define CATCH_REQUIRE_FALSE( ... ) (void)(0) + + #define CATCH_REQUIRE_THROWS( ... ) (void)(0) + #define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0) + #define CATCH_REQUIRE_NOTHROW( ... ) (void)(0) + + #define CATCH_CHECK( ... ) (void)(0) + #define CATCH_CHECK_FALSE( ... ) (void)(0) + #define CATCH_CHECKED_IF( ... ) if (__VA_ARGS__) + #define CATCH_CHECKED_ELSE( ... ) if (!(__VA_ARGS__)) + #define CATCH_CHECK_NOFAIL( ... ) (void)(0) + + #define CATCH_CHECK_THROWS( ... ) (void)(0) + #define CATCH_CHECK_THROWS_AS( expr, exceptionType ) (void)(0) + #define CATCH_CHECK_NOTHROW( ... ) (void)(0) + + #define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ )) + #define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ )) + #define CATCH_METHOD_AS_TEST_CASE( method, ... ) + #define CATCH_REGISTER_TEST_CASE( Function, ... ) (void)(0) + #define CATCH_SECTION( ... ) + #define CATCH_DYNAMIC_SECTION( ... ) + #define CATCH_FAIL( ... ) (void)(0) + #define CATCH_FAIL_CHECK( ... ) (void)(0) + #define CATCH_SUCCEED( ... ) (void)(0) + #define CATCH_SKIP( ... ) (void)(0) + + #define CATCH_STATIC_REQUIRE( ... ) (void)(0) + #define CATCH_STATIC_REQUIRE_FALSE( ... ) (void)(0) + #define CATCH_STATIC_CHECK( ... ) (void)(0) + #define CATCH_STATIC_CHECK_FALSE( ... ) (void)(0) + + // "BDD-style" convenience wrappers + #define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ )) + #define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), className ) + #define CATCH_GIVEN( desc ) + #define CATCH_AND_GIVEN( desc ) + #define CATCH_WHEN( desc ) + #define CATCH_AND_WHEN( desc ) + #define CATCH_THEN( desc ) + #define CATCH_AND_THEN( desc ) + +#elif !defined(CATCH_CONFIG_PREFIX_ALL) && !defined(CATCH_CONFIG_DISABLE) // ^^ prefixed, disabled | vv unprefixed, implemented + + #define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( "REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) + + #define REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr ) + #define REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + + #define CHECK( ... ) INTERNAL_CATCH_TEST( "CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( "CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) + #define CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) + #define CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( "CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) + #define CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( "CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) + + #define CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) + #define CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + + #define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ) + #define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #define METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) + #define REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) + #define SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) + #define DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ ) + #define FAIL( ... ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define SKIP( ... ) INTERNAL_CATCH_MSG( "SKIP", Catch::ResultWas::ExplicitSkip, Catch::ResultDisposition::Normal, __VA_ARGS__ ) + + + #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE) + #define STATIC_REQUIRE( ... ) static_assert( __VA_ARGS__, #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ ) + #define STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), "!(" #__VA_ARGS__ ")" ); SUCCEED( "!(" #__VA_ARGS__ ")" ) + #define STATIC_CHECK( ... ) static_assert( __VA_ARGS__, #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ ) + #define STATIC_CHECK_FALSE( ... ) static_assert( !(__VA_ARGS__), "!(" #__VA_ARGS__ ")" ); SUCCEED( "!(" #__VA_ARGS__ ")" ) + #else + #define STATIC_REQUIRE( ... ) REQUIRE( __VA_ARGS__ ) + #define STATIC_REQUIRE_FALSE( ... ) REQUIRE_FALSE( __VA_ARGS__ ) + #define STATIC_CHECK( ... ) CHECK( __VA_ARGS__ ) + #define STATIC_CHECK_FALSE( ... ) CHECK_FALSE( __VA_ARGS__ ) + #endif + + // "BDD-style" convenience wrappers + #define SCENARIO( ... ) TEST_CASE( "Scenario: " __VA_ARGS__ ) + #define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) + #define GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " Given: " << desc ) + #define AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( "And given: " << desc ) + #define WHEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " When: " << desc ) + #define AND_WHEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " And when: " << desc ) + #define THEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " Then: " << desc ) + #define AND_THEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " And: " << desc ) + +#elif !defined(CATCH_CONFIG_PREFIX_ALL) && defined(CATCH_CONFIG_DISABLE) // ^^ unprefixed, implemented | vv unprefixed, disabled + + #define REQUIRE( ... ) (void)(0) + #define REQUIRE_FALSE( ... ) (void)(0) + + #define REQUIRE_THROWS( ... ) (void)(0) + #define REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0) + #define REQUIRE_NOTHROW( ... ) (void)(0) + + #define CHECK( ... ) (void)(0) + #define CHECK_FALSE( ... ) (void)(0) + #define CHECKED_IF( ... ) if (__VA_ARGS__) + #define CHECKED_ELSE( ... ) if (!(__VA_ARGS__)) + #define CHECK_NOFAIL( ... ) (void)(0) + + #define CHECK_THROWS( ... ) (void)(0) + #define CHECK_THROWS_AS( expr, exceptionType ) (void)(0) + #define CHECK_NOTHROW( ... ) (void)(0) + + #define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), __VA_ARGS__) + #define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ )) + #define METHOD_AS_TEST_CASE( method, ... ) + #define REGISTER_TEST_CASE( Function, ... ) (void)(0) + #define SECTION( ... ) + #define DYNAMIC_SECTION( ... ) + #define FAIL( ... ) (void)(0) + #define FAIL_CHECK( ... ) (void)(0) + #define SUCCEED( ... ) (void)(0) + #define SKIP( ... ) (void)(0) + + #define STATIC_REQUIRE( ... ) (void)(0) + #define STATIC_REQUIRE_FALSE( ... ) (void)(0) + #define STATIC_CHECK( ... ) (void)(0) + #define STATIC_CHECK_FALSE( ... ) (void)(0) + + // "BDD-style" convenience wrappers + #define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ) ) + #define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEST_ ), className ) + + #define GIVEN( desc ) + #define AND_GIVEN( desc ) + #define WHEN( desc ) + #define AND_WHEN( desc ) + #define THEN( desc ) + #define AND_THEN( desc ) + +#endif // ^^ unprefixed, disabled + +// end of user facing macros + +#endif // CATCH_TEST_MACROS_HPP_INCLUDED + + +#ifndef CATCH_TEMPLATE_TEST_REGISTRY_HPP_INCLUDED +#define CATCH_TEMPLATE_TEST_REGISTRY_HPP_INCLUDED + + + +#ifndef CATCH_PREPROCESSOR_HPP_INCLUDED +#define CATCH_PREPROCESSOR_HPP_INCLUDED + + +#if defined(__GNUC__) +// We need to silence "empty __VA_ARGS__ warning", and using just _Pragma does not work +#pragma GCC system_header +#endif + + +#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ +#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) + +#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ +// MSVC needs more evaluations +#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) +#else +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) +#endif + +#define CATCH_REC_END(...) +#define CATCH_REC_OUT + +#define CATCH_EMPTY() +#define CATCH_DEFER(id) id CATCH_EMPTY() + +#define CATCH_REC_GET_END2() 0, CATCH_REC_END +#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 +#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 +#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT +#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) +#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) + +#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) + +#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) + +// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, +// and passes userdata as the first parameter to each invocation, +// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) +#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) +#else +// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) +#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) +#endif + +#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ +#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) + +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) +#else +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) +#endif + +#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ + CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) + +#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) +#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) +#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) +#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) +#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) +#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) +#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) +#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) +#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) + +#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N + +#define INTERNAL_CATCH_TYPE_GEN\ + template struct TypeList {};\ + template\ + constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ + template class...> struct TemplateTypeList{};\ + template class...Cs>\ + constexpr auto get_wrapper() noexcept -> TemplateTypeList { return {}; }\ + template\ + struct append;\ + template\ + struct rewrap;\ + template class, typename...>\ + struct create;\ + template class, typename>\ + struct convert;\ + \ + template \ + struct append { using type = T; };\ + template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ + struct append, L2, Rest...> { using type = typename append, Rest...>::type; };\ + template< template class L1, typename...E1, typename...Rest>\ + struct append, TypeList, Rest...> { using type = L1; };\ + \ + template< template class Container, template class List, typename...elems>\ + struct rewrap, List> { using type = TypeList>; };\ + template< template class Container, template class List, class...Elems, typename...Elements>\ + struct rewrap, List, Elements...> { using type = typename append>, typename rewrap, Elements...>::type>::type; };\ + \ + template