Attempt to create a map between atoms in molecules with different atom ordering.

atommap <target> <reference> [mapout <filename>] [maponly] [rmsfit [ rmsout <rmsout> ]]

<target> Reference structure whose atoms will be remapped.
<reference> Reference structure that <target> should be mapped to.
mapout <filename> Write atom map to <filename> with format:
TargetAtomNumber TargetAtomName ReferenceAtomNumber ReferenceAtomNameTarget atoms that cannot be mapped to a reference atom are denoted “–”.
maponly Write atom map but do not reorder atoms.
rmsfit Any input frames using the same topology as <target> will be RMS fit to <reference> using whatever atoms could be mapped.
rmsout <rmsout> If rmsfit specified, write resulting RMSDs to <rmsout>.

Attempt to map the atoms of <target> to those of <reference> based on structural similarity. This is useful e.g. when there are two files containing the same structure but with different atom names or atom ordering. Both <target> and <reference> need to have been read in with a previous reference command. The state will then be modified so that any trajectory read in with the same parameter file as <target> will have its atoms mapped (i.e. reordered) to match those of <reference>. If the number of atoms that can be mapped in <target> are less than those in <reference>, the reference structure specified by <reference> will be modified to include only mapped atoms; this is useful if for example the reference structure is protonated with respect to the target. The rmsfit keyword is useful in cases where the atom mapping will not be complete (e.g. two ligands with the same scaffold
but different substituents).

For example, say you have the same ligand structure in two files, Ref.mol2 and Lig.mol2, but the atom ordering in each file is different. To map the atoms in Lig.mol2 onto those of Ref.mol2 so that Lig.mol2 has the same ordering as Ref.mol2:

parm Lig.mol2
reference Lig.mol2
parm Ref.mol2
reference Ref.mol2 parmindex 1
atommap Lig.mol2 Ref.mol2 mapout atommap.dat
trajin Lig.mol2
trajout Lig.reordered.mol2 mol2