Example programs for finding ligand interactions

Peptide/small-molecule example

auto worker = [distance](const chemfiles::Frame& entry,
                         const std::string& pdbid) -> std::string {

    // Selection phase
    auto peptides = lemon::select::peptides(entry);
    auto smallm = lemon::select::small_molecules(entry);

    // Pruning phase
    lemon::prune::identical_residues(entry, smallm);
    lemon::prune::cofactors(entry, smallm, lemon::common_cofactors);
    lemon::prune::cofactors(entry, smallm, lemon::common_fatty_acids);
    lemon::prune::keep_interactions(entry, smallm, peptides, distance);

    // Output phase
    return pdbid + lemon::count::print_residue_names(entry, smallm);
};

Nucleic acid/small-molecule example

auto worker = [distance](const chemfiles::Frame& entry,
                         const std::string& pdbid) -> std::string {

    // Selection phase
    auto nucleic_acids = lemon::select::nucleic_acids(entry);
    auto smallm = lemon::select::small_molecules(entry);

    // Pruning phase
    lemon::prune::identical_residues(entry, smallm);
    lemon::prune::cofactors(entry, smallm, lemon::common_cofactors);
    lemon::prune::cofactors(entry, smallm, lemon::common_fatty_acids);
    lemon::prune::keep_interactions(entry, smallm, nucleic_acids, distance);

    // Output phase
    return pdbid + lemon::count::print_residue_names(entry, smallm);
};

Heme/small-molecule example

auto worker = [distance](const chemfiles::Frame& entry,
                         const std::string& pdbid) -> std::string {

    // Selection phase
    auto hemegs = lemon::select::specific_residues(
        entry, {"HEM", "HEA", "HEB", "HEC"});
    auto smallm = lemon::select::small_molecules(entry);

    // Pruning phase
    lemon::prune::identical_residues(entry, smallm);
    lemon::prune::cofactors(entry, smallm, lemon::common_cofactors);
    lemon::prune::cofactors(entry, smallm, lemon::common_fatty_acids);

    lemon::prune::keep_interactions(entry, smallm, hemegs, distance);

    // Output phase
    return pdbid + lemon::count::print_residue_names(entry, smallm);
};

SAM/small-molecule example

auto worker = [distance](const chemfiles::Frame& entry,
                         const std::string& pdbid) {

    // Selection phase
    auto sam = lemon::select::specific_residues(entry, {"SAM"});
    auto smallm = lemon::select::small_molecules(entry);

    // Pruning phase
    lemon::prune::identical_residues(entry, smallm);
    lemon::prune::cofactors(entry, smallm, lemon::common_cofactors);
    lemon::prune::cofactors(entry, smallm, lemon::common_fatty_acids);

    lemon::prune::keep_interactions(entry, smallm, sam, distance);

    // Output phase
    return pdbid + lemon::count::print_residue_names(entry, smallm);
};

Small molecules which do not interact with water

auto worker = [distance](const chemfiles::Frame& entry,
                         const std::string& pdbid) -> std::string {

    // Selection phase
    auto hemegs = lemon::select::specific_residues(
        entry, {"HEM", "HEA", "HEB", "HEC"});
    auto smallm = lemon::select::small_molecules(entry);

    // Pruning phase
    lemon::prune::identical_residues(entry, smallm);
    lemon::prune::cofactors(entry, smallm, lemon::common_cofactors);
    lemon::prune::cofactors(entry, smallm, lemon::common_fatty_acids);

    lemon::prune::keep_interactions(entry, smallm, hemegs, distance);

    // Output phase
    return pdbid + lemon::count::print_residue_names(entry, smallm);
};