Re: [AMBER] How to fix the numbering of amino acid that got shifted in topology file that created in amber Tleap

From: Daniel Roe <>
Date: Mon, 7 Jun 2021 10:10:00 -0400


In addition to what Dave and Anselm have said, I want to point out
that cpptraj has the ability to assign and use PDB residue numbering
and/or chain IDs. The 'change' command can be used to set PDB (also
referred to in cpptraj as "original") residue numbering and chain IDs.
For example, To set the first 10 residues to PDB residue numbers 3-12:

change oresnums of :1-10 min 3 max 12

To give those same residues a chain ID of 'B':

change chainid of :1-10 to B

The cpptraj mask parser has the ability to use PDB (original) residue
numbering via the ':;' (colon semicolon) operator, and chain IDs via
the '::' (colon colon) operator. So to print the atoms selected by PDB
residue number 7:

atoms :;7

Note that if PDB residue number/chain ID information is already in the
topology file (from e.g. parmed) cpptraj can use it. Hope this helps,


On Mon, Jun 7, 2021 at 7:47 AM David A Case <> wrote:
> On Mon, Jun 07, 2021, Dr. Anselm Horn wrote:
> >Note, that ambpdb from the AmberTools has the flag '-offset' to allow
> >for a shifting in residue numbering.
> The ambpdb program also has a more general flag, '-ext', that uses residue
> numbers and other information (occupancies, B-factors, etc.) from the
> original PDB file. To use this, you need to first have used the addPdb
> action in ParmEd to transfer this information from the PDB file to your
> prmtop file.
> The pdb4amber program creates a file that maps original residue numbers to
> their internal (Amber) counterparts, which can be helpful for those writing
> their own scripts.
> [Aside: the origin of all those goes back to the 1980's, when the choice
> was made to ignore chainId's in Amber codes. In multi-chain proteins, it
> is only the residue number/chainId pair that is unique, and not just the
> residue number itself. So, Amber creates a "residue index" (starting at
> 1 and incrementing for each new residue) but treats that like a "residue
> number" in writing PDB files. I don't expect the code to change anytime
> soon, but we should update the documentation to refer to the internal number
> as an "index".]
> ....dac
> p.s. OK,OK: it's actually the residue number/chainId/insertion code triplet
> that needs to be unique....
> _______________________________________________
> AMBER mailing list

AMBER mailing list
Received on Mon Jun 07 2021 - 07:30:02 PDT
Custom Search