[lammps-users] problem with CMAPs

I have an issue with implementing CMAP corrections, it is probably something silly but I don’t seem to be able to find an answer on the manual.
Briefly, I am trying to use residue specific corrections, i.e. each residue in a peptide has its own CMAP. So I have generate a CMAP file formatted like in the attachment, however when I use a CMAP type > 6 I get an error:
ERROR: Invalid CMAP crossterm_type (src/MOLECULE/fix_cmap.cpp:449)

I wonder if there’s a maximum number of crossterms I am allowed to defined? Or something else I might be doing wrong?

Thank you in advance,


CG.cmap (909 KB)

yes, fix cmap has the number of cross term types hard coded to match the bundled files for charmm22 and charmm36 in the potential folder.
the error message shows the line of code where that is checked for.


Thank you Axel for your prompt reply. Would it be possible to bypass this control or increase the number of allowed cross term types? I suppose it would not be as simple as commenting out that line of code?

Thank you,


I don’t know the details of the implementation, but it looks like already the parser to read the cmap file will only read the 6 first maps.

// read in the cmap grid point values
// NOTE: The order to read the 6 grid maps is HARD-CODED, thus errors
// will occur if content of the file “cmap.data” is altered
// Reading order of the maps:
// 1. Alanine map
// 2. Alanine before proline map
// 3. Proline map
// 4. Two adjacent prolines map
// 5. Glycine map
// 6. Glycine before proline map