Re: [AMBER] cpptraj giving seg fault

From: Daniel Roe via AMBER <amber.ambermd.org>
Date: Wed, 8 Jul 2026 15:11:26 -0400

Hi,

I was able to reproduce your error and it's a strange one! It
specifically happens when you trajin certain formats (Amber restart,
Gromacs TRR) file right before another trajectory file. If you reverse
the order (trajin the trajectory first before the restart) this
doesn't happen, nor does it happen with other formats. Again, it's a
really weird bug!

The temporary workaround would be to convert the restart to something
like DCD and then read that in, e.g.

parm example.parm7
# Convert to DCD
trajin parent.ncrst
trajout tmp.dcd
run
clear trajin
# Use the DCD
trajin tmp.dcd
trajin seg.nc
trajout seg_stripped.nc cdf start 2
go
quit

Hopefully that works for you - let me know if not. In the meantime
I'll start tracking down this bug.

Thanks for the report.

-Dan

On Wed, Jul 8, 2026 at 2:33 PM Slimak, Stephen Rudolph via AMBER
<amber.ambermd.org> wrote:
>
> Hello Amber Community,
>
> I am running into an issue with cpptraj when running the following commands:
>
> parm example.parm7
> trajin parent.ncrst
> trajin seg.nc
>
> <I do other commands here including analysis and stripping away waters, but they aren't necessary to reproduce the error>
>
> trajout seg_stripped.nc cdf start 2
> go
> quit
>
> Every time I try this no matter what the topology and trajectory files are, I get a segmentation fault. I am using the latest version of ambertools. Using only one trajin does not produce the error.
>
> Thanks,
> Stephen
>
> --
> Stephen Slimak
> Postdoctoral Researcher, Chong Lab
> Department of Chemistry
> University of Pittsburgh
> _______________________________________________
> 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 Wed Jul 08 2026 - 12:30:02 PDT
Custom Search