Skip to content

Support insertion codes in applyMutations() - #359

Merged
peastman merged 3 commits into
openmm:masterfrom
aiscihub:mutate-insertion-code
Nov 16, 2026
Merged

peastman merged 3 commits into
openmm:masterfrom
aiscihub:mutate-insertion-code

Conversation

@aiscihub

Copy link
Copy Markdown
Contributor

Residues were looked up by number only, so two residues that differed only by insertion code (e.g. 9 and 9A) collided and only the last one could be mutated. Look them up by number and insertion code, and accept mutations such as GLY-9A-ALA. Fixes #280.

Residues were looked up by number only, so two residues that differed
only by insertion code (e.g. 9 and 9A) collided and only the last one
could be mutated. Look them up by number and insertion code, and accept
mutations such as GLY-9A-ALA. Fixes openmm#280.

@aiscihub aiscihub left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write the fix and tests.

@aiscihub

Copy link
Copy Markdown
Contributor Author

@peastman would you please take a look at this pr and merge if looks good? thank you very much!

Run addMissingAtoms() in test_mutate_insertion_code so the test checks the
complete side chains, and update a comment to say that residues are now
identified by number and insertion code.
@peastman

Copy link
Copy Markdown
Member

This looks good, but the builds are failing to run. I'll debug it separately.

@aiscihub

Copy link
Copy Markdown
Contributor Author

Thank you for looking! The builds are failing because ubuntu-latest moved to Ubuntu 26.04, which no longer includes Miniconda. I opened #360 to fix it, and CI passes with it on my fork. Once it's merged, I'll update this branch so the tests run here.

@peastman

Copy link
Copy Markdown
Member

Can you merge the main branch into this PR? That should get the tests running.

@aiscihub aiscihub left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thank you for looking.

@peastman
peastman merged commit 9545724 into openmm:master Nov 16, 2026
3 checks passed
@peastman

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do we have method to mutate the iCode-containing residue?

2 participants