Re: [AMBER] Using Multiple Parameter-Topology Files in Cpptraj?

From: Daniel Roe via AMBER <amber.ambermd.org>
Date: Sat, 1 Nov 2025 13:33:03 -0400

Hi,

This is actually OK. The warning refers to the use of distance-based masks only.

When you load 1.pdb as a reference structure, since it is the first
reference structure encountered, CPPTRAJ is using coordinates from it
for any distance-based masks it encounters during trajectory
processing. The reason CPPTRAJ uses a single reference structure for
distance-based masks is so that mask selections do not change from
frame to frame, which could affect data set handling etc. (side note:
the active reference for distance-based masks can be changed with the
'activeref' command).

However, when cpptraj sets 1.pdb as the active reference, it notices
there is another topology already loaded (builtout.gas.pdb) which has
a different number of atoms. Therefore any trajectory you load that
uses this topology will not match the current active reference
structure, and CPPTRAJ lets you know this.

So to sum up, unless you are using distance-based masks, this warning
does not apply. Let me know if that makes sense or if you are seeing
unexpected behavior/strange results.

-Dan

On Sat, Nov 1, 2025 at 12:55 PM Liao via AMBER <amber.ambermd.org> wrote:
>
> Dear AMBER list,
> I have experienced some issue with cpptraj, when I specify more than 1 parm file. Only the 1st one seems to be used. I tried to carefully follow the syntax of the manual but my 2nd parm file would be ignored. Wonder if something is wrong in my script that I don't see?
> An example script of mine looks like this:
> parm ../../builtout.gas.pdb [1]
> parm ../../1.pdb [2]
> trajin 10.align.xtc
> reference ../../1.pdb [ref1] parm [2]
> reference ../../../native/builtout.gas.pdb [ref2] parm [1]
> rms to1 :;176-189&!.H= ref [ref1] nofit out rmsd.out
> rms tonative :;176-189&!.H= ref [ref2] nofit out rmsd.out
> ------------------------------------------------------------------------------
> The warning message that would indicate the parm file mismatch issue is as below:
> [reference ../../1.pdb [ref1] parm [2]]
> Reading '../../1.pdb' as PDB
> Read CRYST1 info from PDB: a=56.928 b=70.255 c=55.149 alpha=90 beta=90 gamma=90
> Setting active reference for distance-based masks: '1.pdb'
> Warning: Active reference has only 4633 atoms, parm 'builtout.gas.pdb' has 4838.
> Warning: Parm will only have reference coordinates for the first 4633 atoms (distance-based masks only).
> ------------------------------------------------------------------------------
> So 1.pdb when I use it as my reference file, is still fetching for builtout.gas.pdb the parm [1], instead of parm [2] that I specified. In fact this also would happen in trajectory processing, if I specify different trajectories to different parm files.
> This is cpptraj from Amber 22. Any insight would be appreciated, thanks!
> J Liao
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sat Nov 01 2025 - 11:00:02 PDT
Custom Search