Re: [AMBER] trajectory file generation from 2D remd (H+pH)

From: Daniel Roe via AMBER <amber.ambermd.org>
Date: Thu, 26 Feb 2026 19:31:42 -0500

Hi,

parm trans/hcaii.prmtop
debug 10
ensemble nc.rep-001.001 trajnames
nc.rep-002.001,nc.rep-003.001,nc.rep-004.001,nc.rep-005.001,nc.rep-006.001,nc.rep-007.001,nc.rep-008.001,nc.rep-009.001,nc.rep-010.001,nc.rep-011.001,nc.rep-012.001,nc.rep-013.001,nc.rep-014.001,nc.rep-015.001,nc.rep-016.001,nc.rep-017.001,nc.rep-018.001,nc.rep-019.001,nc.rep-020.001,nc.rep-021.001,nc.rep-022.001,nc.rep-023.001,nc.rep-024.001
1 10
trajout TenFrames.mpi/sorted.nc

You don't need the remlog/ntwx/nstlim keywords because all the info
needed to sort is in the NetCDF files (those keywords are for if
you're using ASCII trajectories).

The fix is now merged in. Version 6.31.0. Let me know if it works for you.

-Dan

On Thu, Feb 26, 2026 at 4:25 PM Dulal Mondal
<babunmondal.chem.kgpian.iitkgp.ac.in> wrote:
>
> Thank you again for your clarification regarding the Hamiltonian replica issue and for preparing the fix.
>
> If possible, could you please share the corresponding cpptraj input file that you used to reproduce and test the behavior? It would be very helpful for me to cross-check my workflow and ensure that I am following the correct procedure.
>
> I would greatly appreciate it if you could share it when convenient.
>
> Thank you once again for your support.
>
> With regards,
> Dulal Mondal,
> Research Scholar,
> Department of Chemistry,
> IIT Kharagpur, Kharagpur 721302.
>
> On Fri, 27 Feb, 2026, 2:36 am Daniel Roe, <daniel.r.roe.gmail.com> wrote:
>>
>> Thanks for the files. I was able to reproduce the bug, which will be
>> fixed in version 6.31.0 (the GitHub PR is here:
>> https://github.com/Amber-MD/cpptraj/pull/1164).
>>
>> The good news is this bug is mostly cosmetic in nature. Amber writes
>> both replica indices and replica values to Amber NetCDF trajectories.
>> For dimensions like temperature, the value is the actual temperature,
>> while the index is the position on the temperature ladder. For the
>> Hamiltonian dimension the value and the index are the same. So your
>> trajectories were being properly sorted, but the Hamiltonian value
>> itself was not being saved (even though it is preserved in
>> remd_indices).
>>
>> The above PR will fix this behavior once it is merged in. Thanks for the report!
>>
>> -Dan
>>
>> On Thu, Feb 19, 2026 at 10:36 AM Daniel Roe <daniel.r.roe.gmail.com> wrote:
>> >
>> > Thanks - and can you send the complete CPPTRAJ output?
>> >
>> > If the files are not too big you could send them to me off the list
>> > and I can try to reproduce the issue locally.
>> >
>> > -Dan
>> >
>> > On Wed, Feb 18, 2026 at 12:26 AM Dulal Mondal
>> > <babunmondal.chem.kgpian.iitkgp.ac.in> wrote:
>> > >
>> > > Thank you for your reply.
>> > > The group files are given below.
>> > >
>> > > groupfile001 for upto 4 ns run. groupfile002 upto 8 ns production run and I have 25 group file upto 100 ns run.
>> > >
>> > > Initially I generated 24 folders from 001 to 024. In each folder there are 25 nc files named as nc.rep.001 to nc.rep.0025.
>> > >
>> > > So the 001 folder contains nc.rep.001, nc.rep.002, .... nc.rep.025.
>> > > Like 001 folder 002 to 024 folders contain the same number of files.
>> > >
>> > > On Wed, Feb 18, 2026 at 2:55 AM Daniel Roe <daniel.r.roe.gmail.com> wrote:
>> > >>
>> > >> Can you explain how your simulation directories are laid out? From this:
>> > >>
>> > >> ensemble ../../001/nc.rep.001 trajnames ../../002/nc.rep.001,../../003/nc.rep.001,../../004/nc.rep.001,
>> > >>
>> > >> It looks like you are reading in the lowest coordinate trajectory from multiple runs, which would make it not possible to properly sort. I.e. if there is a ../../001/nc.rep.002, ../../001/nc.rep.003 etc, you aren’t using ‘ensemble’ in a way that you can sort by replica.
>> > >>
>> > >> -Dan
>> > >>
>> > >> On Tue, Feb 17, 2026 at 7:56 AM Dulal Mondal <babunmondal.chem.kgpian.iitkgp.ac.in> wrote:
>> > >>>
>> > >>> Thank you sir for your response.
>> > >>> The cpptraj input file is like
>> > >>> parm ../../hcaii.prmtop
>> > >>> ensemble ../../001/nc.rep.001 trajnames ../../002/nc.rep.001,../../003/nc.rep.001,../../004/nc.rep.001,../../005/nc.rep.001,../../006/nc.rep.001,../../007/nc.rep.001,../../008/nc.rep.001,../../009/nc.rep.001,../../010/nc.rep.001,../../011/nc.rep.001,../../012/nc.rep.001,../../013/nc.rep.001,../../014/nc.rep.001,../../015/nc.rep.001,../../016/nc.rep.001,../../017/nc.rep.001,../../018/nc.rep.001,../../019/nc.rep.001,../../020/nc.rep.001,../../021/nc.rep.001,../../022/nc.rep.001,../../023/nc.rep.001,../../024/nc.rep.001 nstlim 2000 ntwx 1000
>> > >>> trajout prod001.nc netcdf
>> > >>> run
>> > >>>
>> > >>> This input file works.
>> > >>> But When I check replica indices using the command
>> > >>> ncdump -v remd_values prod001.nc.0
>> > >>> It shows 0, 5
>> > >>> ncdump -v remd_values prod001.nc.1
>> > >>> 0, 5.5 ;
>> > >>> It always shows 0 from 0 to 23.
>> > >>>
>> > >>> The output error like.
>> > >>>
>> > >>>
>> > >>> My 2D remd (H+pH) like :
>> > >>> hamiltonian.dat file
>> > >>> HAMILTONIAN
>> > >>> Hamiltonian Replica Exchange with different mdins
>> > >>> 300
>> > >>> 305
>> > >>> 310
>> > >>> 315
>> > >>> and
>> > >>> phs.dat file
>> > >>> PH
>> > >>> pH Replica Exchange
>> > >>> 5.0
>> > >>> 5.5
>> > >>> 6.0
>> > >>> 6.5
>> > >>> 7.0
>> > >>> 7.5
>> > >>>
>> > >>> and remd.dim.hphremd files:
>> > >>>
>> > >>> &multirem
>> > >>> exch_type='HAMILTONIAN'
>> > >>> group(1,:)=1,7,13,19,
>> > >>> group(2,:)=2,8,14,20,
>> > >>> group(3,:)=3,9,15,21,
>> > >>> group(4,:)=4,10,16,22,
>> > >>> group(5,:)=5,11,17,23,
>> > >>> group(6,:)=6,12,18,24,
>> > >>> desc='Hamiltonian Replica Exchange with different mdins'
>> > >>> /
>> > >>> &multirem
>> > >>> exch_type='PH'
>> > >>> group(1,:)=1,2,3,4,5,6,
>> > >>> group(2,:)=7,8,9,10,11,12,
>> > >>> group(3,:)=13,14,15,16,17,18,
>> > >>> group(4,:)=19,20,21,22,23,24,
>> > >>> desc='pH Replica Exchange'
>> > >>> /
>> > >>>
>> > >>>
>> > >>>
>> > >>> On Tue, Feb 17, 2026 at 4:49 PM Daniel Roe <daniel.r.roe.gmail.com> wrote:
>> > >>>>
>> > >>>> That does seem strange. It’s hard to tell what might be going on from this limited input and output. To try to debug this further, can you post your entire cpptraj input (or the entire run script if the $i variables are script variables) as well as the entire cpptraj output? Thanks.
>> > >>>>
>> > >>>> -Dan
>> > >>>>
>> > >>>> On Mon, Feb 16, 2026 at 9:56 AM Dulal Mondal via AMBER <amber.ambermd.org> wrote:
>> > >>>>>
>> > >>>>> Dear Experts,
>> > >>>>>
>> > >>>>> I perform H+pH remd. (4 H replica + 6 pH replica), Total 24 replicas.
>> > >>>>> 6 pH are 5 5.5 6 6.5 7 7.5
>> > >>>>>
>> > >>>>> I use ensemble commands like
>> > >>>>>
>> > >>>>> ensemble ../../001/nc.rep.$i trajnames
>> > >>>>> ../../002/nc.rep.$i,../../003/nc.rep.$i,../../004/nc.rep.$i,../../005/nc.rep.$i,../../006/nc.rep.$i,../../007/nc.rep.$i,../../008/nc.rep.$i,../../009/nc.rep.$i,../../010/nc.rep.$i,../../011/nc.rep.$i,../../012/nc.rep.$i,../../013/nc.rep.$i,../../014/nc.rep.$i,../../015/nc.rep.$i,../../016/nc.rep.$i,../../017/nc.rep.$i,../../018/nc.rep.$i,../../019/nc.rep.$i,../../020/nc.rep.$i,../../021/nc.rep.$i,../../022/nc.rep.$i,../../023/nc.rep.$i,../../024/nc.rep.$i
>> > >>>>> nstlim 2000 ntwx 1000
>> > >>>>> trajout prod$i.nc netcdf
>> > >>>>>
>> > >>>>> This command generates 24 trajectory files from nane 0 to 23.
>> > >>>>> like prod001.nc.0 ... prod001.nc.23.
>> > >>>>>
>> > >>>>> But when I use ncdump command to check the replica indices it shows:
>> > >>>>>
>> > >>>>> 1) ncdump -v remd_values prod001.nc.0 shows
>> > >>>>>
>> > >>>>> 0, 5,
>> > >>>>> 2) ncdump -v remd_values prod001.nc.1 shows
>> > >>>>> 0, 5.5
>> > >>>>> 3) ncdump -v remd_values prod001.nc.5 shows
>> > >>>>> 0, 7.5,
>> > >>>>> but for ncdump -v remd_values prod001.nc.6 also shows 0, 5,
>> > >>>>>
>> > >>>>> trajin command also not work
>> > >>>>> --
>> > >>>>> *With regards,*
>> > >>>>> *Dulal Mondal,*
>> > >>>>> *Research Scholar,*
>> > >>>>> *Department of Chemistry,*
>> > >>>>> *IIT Kharagpur, Kharagpur 721302.*
>> > >>>>> _______________________________________________
>> > >>>>> AMBER mailing list
>> > >>>>> AMBER.ambermd.org
>> > >>>>> http://lists.ambermd.org/mailman/listinfo/amber
>> > >>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> With regards,
>> > >>> Dulal Mondal,
>> > >>> Research Scholar,
>> > >>> Department of Chemistry,
>> > >>> IIT Kharagpur, Kharagpur 721302.
>> > >
>> > >
>> > >
>> > > --
>> > > With regards,
>> > > Dulal Mondal,
>> > > Research Scholar,
>> > > Department of Chemistry,
>> > > IIT Kharagpur, Kharagpur 721302.

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Feb 26 2026 - 17:00:02 PST
Custom Search