Hi,
Thanks for the files. I think I've figured out your issue. You set
ntwprt to 2435. Your full system (hmass.parm7) looks like this:
Reading '../hmass.parm7' as Amber Topology
Radius Set: modified Bondi radii (mbondi)
Loading previous history from log 'cpptraj.log'
> molinfo short *
[molinfo short *]
#Mol Count Natom Nres
GLY 1 2415 152
Na+ 57 1 1
CA 20 1 1
Cl- 97 1 1
WAT 18043 4 1
You have a section of Na+ ions **before** your calcium ions, which
appears to be the part of the system you're interested in. Therefore
when you set ntwprt to 2435 this is what you are actually getting:
> molinfo short .1-2435
[molinfo short @1-2435]
#Mol Count Natom Nres
GLY 1 2415 152
Na+ 20 1 1
In other words, prod.nc contains the coordinates for your protein and
20 sodium ions, not calcium ions. This is why you were getting
different results with the full system, because in the full system you
actually have the CA coordinates, whereas in the ntwprt system you
only have some Na+ coordinates.
If you need the CA coordinates you will have to rerun the simulations.
I recommend setting ntwprt to 2589 so that all the ion coordinates are
saved:
> molinfo short .1-2589
[molinfo short @1-2589]
#Mol Count Natom Nres
GLY 1 2415 152
Na+ 57 1 1
CA 20 1 1
Cl- 97 1 1
Does this make sense? Let me know if not.
-Dan
On Fri, Jul 10, 2026 at 7:29 AM Daniel Roe <daniel.r.roe.gmail.com> wrote:
>
> Hi,
>
> Can you provide the version of cpptraj you are using along with the
> exact input(s) (and outputs if you have them handy)?
>
> Also, if you get a chance please send me off-list some files I can use
> to reproduce the behavior you see. Thanks,
>
> -Dan
>
> On Thu, Jul 9, 2026 at 10:46 PM Baker, Joseph via AMBER
> <amber.ambermd.org> wrote:
> >
> > Hi all,
> >
> > I am stumped with an issue I'm running into with cpptraj.
> >
> > I have a trajectory that I've produced of a protein surrounded by ions. In
> > order to save disk space, I typically use ntwprt and print just the protein
> > atoms and the ions to the trajectory, and then set ntwr to a negative
> > number to save some snapshots along the way that contain all of the atoms.
> >
> > I noticed recently that if I run the nativecontacts command to find
> > interactions between some protein atoms and the ions that the following
> > behavior occurs:
> >
> > 1. if I use the full parameter file (that has all atoms) and the final
> > ncrst file (that has all atoms) I get some larger number of contacts (let's
> > say 30 for example)
> >
> > 2. if I use the stripped parameter file (that has just the protein and ion
> > atoms) and load in the trajectory (which has the lower number of atoms due
> > to the use of ntwprt) and run the same nativecontacts command I get a very
> > different and much smaller number of ion interactions (looking also at the
> > last frame of that trajectory so it is comparable to the final ncrst file
> > that contains all atoms)
> >
> > When using the cpptraj vector command on the trajectory (with smaller
> > number of atoms) and the ncrst file (that has all of the atoms), both
> > contain the box information (I do not strip with the nobox option included).
> >
> > So why isn't cpptraj able to handle this if the box information is still
> > stored in the trajectory (and as far as I can tell, also in the parameter
> > files in the BOX DIMENSIONS section, both the full parameter and stripped
> > parameter file contain the same info there as well). Am I misunderstanding
> > something about how cpptraj handles a stripped parameter/trajectory file
> > pair?
> >
> > Thanks for your help,
> > Joe
> >
> >
> > ------
> > Joseph Baker, PhD
> > Barbara Meyers Pelson Chair in Faculty-Student Engagement (AY 2024-2027)
> > Professor, Department of Chemistry
> > The College of New Jersey
> > Ewing, NJ 08628
> > _______________________________________________
> > 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 Tue Jul 14 2026 - 08:30:02 PDT