# ap_LocalStructureMatch¶

Finds contiguous structural segments that are similar between two structures.

The program can use only segments of size 7 or 5. It looks for structurally similar segments shared between two PDB files, given as an input.

USAGE:
./ap_LocalStructureMatch 7 4rm4A.pdb 5ofqA.pdb


## Categories:¶

• core/alignment/scoring/LocalStructureMatch

## Program source:¶

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 #include #include #include #include #include #include #include #include #include #include #include #include #include #include utils::Logger l("ap_LocalStructureMatch"); std::string program_info = R"( Finds contiguous structural segments that are similar between two structures. The program can use only segments of size 7 or 5. It looks for structurally similar segments shared between two PDB files, given as an input. USAGE: ./ap_LocalStructureMatch 7 4rm4A.pdb 5ofqA.pdb )"; /** @brief Finds contiguous structural segments that are similar between two structures * * CATEGORIES: core/alignment/scoring/LocalStructureMatch; * KEYWORDS: PDB input; structure match */ int main(const int argc, const char *argv[]) { if(argc < 3) utils::exit_OK_with_message(program_info); // --- complain about missing program parameter int match_size = atoi(argv[1]); using namespace core::alignment::scoring; // --- for LocalStructure7, LocalStructure9 and LocalStructureMatch using namespace core::data::basic; // --- for Coordinates_SP and Vec3 Coordinates_SP xyz_q = std::make_shared>(); Coordinates_SP xyz_t = std::make_shared>(); core::data::io::Pdb::read_coordinates(argv[2], *xyz_q, true, core::data::io::is_ca); if (match_size == 7) { LocalStructure7 local_query(xyz_q); for (int i = std::max(argc - 1, 2); i < argc; ++i) { core::data::io::Pdb::read_coordinates(argv[i], *xyz_t, true, core::data::io::is_ca); LocalStructure7 local_tmplt(xyz_t); LocalStructureMatch lm(local_query, local_tmplt); lm.print(std::cout); } } else if (match_size == 5) { LocalStructure5 local_query(xyz_q); for (int i = std::max(argc - 1, 2); i < argc; ++i) { core::data::io::Pdb::read_coordinates(argv[i], *xyz_t, true, core::data::io::is_ca); LocalStructure5 local_tmplt(xyz_t); LocalStructureMatch lm(local_query, local_tmplt); lm.print(std::cout); } } }