/* * Copyright 2024 DeepMind Technologies Limited * * AlphaFold 3 source code is licensed under CC BY-NC-SA 4.0. To view a copy of * this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ * * To request access to the AlphaFold 3 model parameters, follow the process set * out at https://github.com/google-deepmind/alphafold3. You may only use these * if received directly from Google. Use is subject to terms of use available at * https://github.com/google-deepmind/alphafold3/blob/main/WEIGHTS_TERMS_OF_USE.md */ #ifndef ALPHAFOLD3_SRC_ALPHAFOLD3_STRUCTURE_PYTHON_MMCIF_ALTLOCS_H_ #define ALPHAFOLD3_SRC_ALPHAFOLD3_STRUCTURE_PYTHON_MMCIF_ALTLOCS_H_ #include #include #include #include #include "absl/types/span.h" #include "alphafold3/structure/cpp/mmcif_layout.h" namespace alphafold3 { // Returns the list of indices that should be kept after resolving alt-locs. // 1) Partial Residue. Each cycle of alt-locs are resolved separately with the // highest occupancy alt-loc. Tie-breaks are resolved alphabetically. See // tests for examples. // 2) Whole Residue. These are resolved in two passes. // a) The residue with the highest occupancy is chosen. // b) The locations for a given residue are resolved. // All tie-breaks are resolved alphabetically. See tests for examples. // // Preconditions: layout and comp_ids, alt_ids, occupancies are all from same // mmCIF file and chain_indices are monotonically increasing and less than // layout.num_chains(). // // comp_ids from '_atom_site.label_comp_id'. // alt_ids from '_atom_site.label_alt_id'. // occupancies from '_atom_site.occupancy'. std::vector ResolveMmcifAltLocs( const MmcifLayout& layout, absl::Span comp_ids, absl::Span atom_ids, absl::Span alt_ids, absl::Span occupancies, absl::Span chain_indices); } // namespace alphafold3 #endif // ALPHAFOLD3_SRC_ALPHAFOLD3_STRUCTURE_PYTHON_MMCIF_ALTLOCS_H_