The embedded CCP4 Monomer Library subset grows from 62 to 84 compounds: - the modified tRNA/rRNA nucleotides PSU, 5MC, 1MA, OMG, OMC, OMU, H2U, M2G, 7MG, 2MG, 5MU (RNA group, joined by the library's backbone link "p"); - the cofactors NAD, NAI, NAP, NDP, FAD, FMN, HEM, HEC, SAM, SAH, and dioxygen (OXY). CMO is left out: its dictionary has C-O at 1.25 A, where bound CO is near 1.15 A. links_and_mods.cif gains the links these compounds use: HEC-CYS1/HEC-CYS2 (heme C thioethers), CYS-HEMB/CYS-HEMC, CYS-FAD and HIS-FAD1/2, with their modifications. AddMetalLinks now takes a metal atom of any residue, not only a one-atom ion, so a heme iron's LINK records to His NE2 / Met SD / water become bonds at the library's metal-site distances; the site's coordination counts the metal's bonds in its own dictionary (a heme's four pyrrole N) as well as the records. A metal within a ligand is also a metal for the repulsions (1.9 A to N, O, S) and its dictionary bonds are kept with the metal bonds. Note HEC.cif's own Fe-N(pyrrole) ideal is 1.90 A (HEM: 2.04 A), so a cytochrome c reports a metal-bond rmsd near 0.1 A. Test RefinementRestraints_deposited_ligands builds the topology of eleven deposited models cut down to the ligand and its surroundings (tests/test_data/ligands, 66 KB, from PDB 1EHZ, 8BKH, 6K9I, 2W3V, 5VML, 6F3P, 8CON, 3TK0, 7TCD, 6W4H, 5EPE): every ligand restrained, bond rmsd < 0.03 A, the RNA backbone bonded to each modified nucleotide, the heme Fe-His bonds, and the HEC thioethers. rugnux --mode refine on the full entries against their deposited structure factors: R-free within +-0.003 of the build where these were held fixed, ligand bond rmsd vs the dictionary from 0.004-0.058 A down to 0.002-0.042 A. rugnux grows by 425 KiB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu (cherry picked from commit f4d407c8de6cb462320edb21a70665350e436d28)
36 lines
1.7 KiB
C++
36 lines
1.7 KiB
C++
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <string>
|
|
|
|
#include "gemmi/monlib.hpp"
|
|
|
|
// The restraint dictionary refinement uses: the subset of the CCP4 Monomer Library (Vagin et al. 2004,
|
|
// LGPL-3.0) carried in the binary - the standard amino acids and nucleotides, the common modified RNA nucleotides,
|
|
// their links and modifications, the common cofactors (NAD(P)(H), FAD, FMN, hemes, SAM/SAH), a few other ligands
|
|
// and additives, water and ions; monomers/update_monomers.py holds the list. Parsed from memory once per process;
|
|
// no file is read.
|
|
const gemmi::MonLib &EmbeddedMonomerLibrary();
|
|
|
|
// The ideal distance and its sigma of a bond from a metal ion to a donor atom (O, N, S) at a site of `coordination`
|
|
// donors, from the library's statistics of metal sites (metals.json, embedded as monomers/metals.cif). Only rows
|
|
// resting on at least METAL_MIN_SITES sites count: the row of that coordination number, else the two nearest
|
|
// below and above it interpolated linearly, else the nearest one; the sigma is the row's standard deviation, at
|
|
// least METAL_MIN_SIGMA. False where the pair has no such row.
|
|
constexpr int METAL_MIN_SITES = 20;
|
|
constexpr double METAL_MIN_SIGMA = 0.02; // A
|
|
bool EmbeddedMetalDistance(gemmi::El metal, gemmi::El ligand, int coordination, double &distance, double &sigma);
|
|
|
|
// Whether `code` (a residue name) has a description in it.
|
|
bool InEmbeddedMonomerLibrary(const std::string &code);
|
|
|
|
// One .cif of monomers/, as CMakeLists.txt embeds it: its name and its text in pieces.
|
|
struct EmbeddedMonomerFile {
|
|
const char *name;
|
|
const char *const *pieces;
|
|
size_t n_pieces;
|
|
};
|