Skip to content

Fix for internal ILE sidechain clashes caused by branched rotation logic #3

@lucaschestnuttree

Description

@lucaschestnuttree

Hi! I’ve been using this tool and noticed that some ILE (Isoleucine) mutations result in severe internal atom overlaps (specifically between CG2 and CD1).

According to the LLM I used to debug this issue.

The Problem: The current mutate() logic in pymut.py selects "downstream" atoms for rotation based on their index in the RESIDUE_ORDER list.

For ILE, the order is currently: ['N', 'CA', 'C', 'O', 'CB', 'CG1', 'CG2', 'CD1'].

When applying the CHI2 rotation (axis CB–CG1), the script identifies CG1 as the joint and rotates everything after it in the list: both CG2 and CD1.

Since CG2 is actually branched off the CB atom (not CG1), rotating it around the CB–CG1 axis is geometrically incorrect and drives it directly into the CD1 atom.

The Fix: The most efficient fix is to reorder the RESIDUE_ORDER dictionary for ILE so that CG2 appears before CG1. This ensures that during a CHI2 rotation, CG2 is considered "upstream" and stays fixed in its correct position.

Change in pymut.py:
Python

Change this:
'ILE': ['N', 'CA', 'C', 'O', 'CB', 'CG1', 'CG2', 'CD1']

To this:
'ILE': ['N', 'CA', 'C', 'O', 'CB', 'CG2', 'CG1', 'CD1']

With this change, CHI1 still rotates everything correctly, but CHI2 only moves the CD1 branch, preserving the branched geometry of the Isoleucine sidechain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions