Skip to content

Fix ModXNA compatibility#1168

Merged
drroe merged 19 commits intoAmber-MD:masterfrom
drroe:fix.modxna
Mar 12, 2026
Merged

Fix ModXNA compatibility#1168
drroe merged 19 commits intoAmber-MD:masterfrom
drroe:fix.modxna

Conversation

@drroe
Copy link
Contributor

@drroe drroe commented Mar 12, 2026

Version 7.1.0.

The old sequence command functionality and some new features have been added to ensure backwards compatibility with ModXNA (V1.9.2 as of right now).

The changes to the sequence command in CPPTRAJ V7 ended up breaking compatibility with ModXNA. The sequence command in version 6 of CPPTRAJ didn't have the “right” code for generating coordinates around linkages (which is why we sometimes ended up with weird ModXNA geometries that needed to be minimized out). The new sequence command generates better coordinates around links, but the problem is that the way we strip the sugar (removing C1/C6 from C1’) leaves it without a defined chirality, and the default one (from LEaP’s routines) isn't always the one you need. One potential future workaround will be to use the graft command with internal coordinates since that preserves the chirality around atoms that have had bonds removed.

I have added a test to try to make sure compatibility doesn't become broken in the future.

The following files/classes/functions have been retained from CPPTRAJ V6.31.0 with very few changes: Structure/BuildAtom.h, Structure/Model.h, Structure/Model.cpp

The OldBuilder class in Structure/OldBuilder.cpp and Structure/OldBuilder.h is the Builder class from CPPTRAJ V6.31.0.

The Zmatrix::SetupICsAroundBond() function has been retained from CPPTRAJ V6.31.0 Zmatrix class so that sequence can be made to work the way it used to.

Default bond Req parameters are set when reading in mol2 files. This is needed so that the RK/REQ columns are printed for the bonds command, which is expected/needed for modxna.sh to determine the name of the H atom bonded to O3' (--3cap flag).

ModXNA metadata (head/tail/anchor atom information) will be read from the title of Mol2 files if present and retained in the Topology. This metadata will be written back out to Mol2 files if another title has not been specified. This allows the sequence command to automatically recognized when units have ModXNA information and switch back to the old sequence mode automatically.

@drroe drroe self-assigned this Mar 12, 2026
@drroe drroe merged commit 423c0e5 into Amber-MD:master Mar 12, 2026
13 checks passed
@drroe drroe deleted the fix.modxna branch March 12, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant