A predicted model's rotamer, placed by molecular replacement, can run through the main chain of another copy or of a symmetry mate - as where the copies' side chains meet on a non-crystallographic axis, atoms within an angstrom of each other. The repulsion only pushes the two atoms apart along the line that joins them, so such a side chain left the clash in whatever direction that line pointed and settled in a rotamer the density did not hold, with B factors to match. Before the topology is built, every side chain with an atom more than 2 A inside its contact distance to another residue (symmetry mates included; LINK partners, disulfides and metals excepted) is turned about its chi angles to the staggered rotamer (the terminal planar group every 30 degrees) with the least squared overlap against the rest of the model; main chain, CB and B factors stay as given, hydrogens are placed anew by the topology. Later passes let the side chains turned so far choose again in the others' new places. Logged per residue with chi before and after; REFINE_SIDE_CHAINS_TURNED in the report. On the live three-copy MR placement of a prediction the three amides and one carboxylate are turned; at the same ladder rung R-free 0.4444 -> 0.4431 (no NCS) and 0.4402 -> 0.4375 (NCS), final 0.4183 -> 0.4146. The rotamer the reference crystal structure holds would give 0.4379 / 0.4100: the remaining gap is the rotamer choice, which only the density can make. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqXYdJDrM65gxsCn2PrbfK
31 lines
1.6 KiB
C++
31 lines
1.6 KiB
C++
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include <gemmi/model.hpp>
|
|
|
|
// A side chain placed through another residue - a copy's or a symmetry mate's - as a predicted model's
|
|
// rotamer lands when molecular replacement packs the copies: two atoms within an angstrom or so of each other.
|
|
// The refinement's repulsion only pushes the atoms apart along the line that joins them, so such a side chain
|
|
// leaves the clash in whatever direction that line points and settles in a rotamer the density does not hold.
|
|
// Before the refinement, each such side chain is turned about its chi angles to the staggered rotamer (the
|
|
// terminal planar group in steps of 30 degrees) with the least overlap against the rest of the model; the
|
|
// main chain, the beta carbon and the B factors stay as given.
|
|
constexpr double CLASH_RELIEF_OVERLAP = 2.0; // A: a pair of heavy atoms this far inside their contact distance (within ~1.3 A of each other)
|
|
|
|
struct SideChainTurn {
|
|
std::string name; // "GLN A17"
|
|
std::vector<double> chi_before; // degrees
|
|
std::vector<double> chi_after;
|
|
double overlap_before = 0; // A: the deepest overlap of the side chain's atoms with another residue
|
|
double overlap_after = 0;
|
|
};
|
|
|
|
// The side chains of the first model of `st` with an overlap beyond CLASH_RELIEF_OVERLAP, turned in place to
|
|
// their least-overlapping rotamer; what was turned, in model order.
|
|
std::vector<SideChainTurn> RelieveSideChainClashes(gemmi::Structure &st);
|