Re: [AMBER] cpptraj -- doesn't like reading Amber restart files with more than 99, 999 atoms

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Fri, 23 Dec 2011 12:46:15 -0500

Hi,

I have created a bugfix (#26 for AT 1.5) that addresses this issue. It
should show up on the webpage shortly. In the meantime I will attach
it here. Thanks for the bug report!

-Dan

On Fri, Dec 23, 2011 at 11:42 AM, Daniel Roe <daniel.r.roe.gmail.com> wrote:
> Hi,
>
> This is a case of me writing the restart parser based on what the file
> format is said to be:
>
> http://ambermd.org/formats.html#restart
>
> vs based on what the MD code can actually write (I see now there are
> cases in there to allow one more digit for atom #s). This is one of
> the annoying things about fixed fortran format strings I guess. If you
> want a quick fix just change line ~56 of AmberRestart.cpp (function
> AmberRestart::open) from:
>
> nread=sscanf(buffer,"%5i%15lE%15lE",&restartAtoms,&restartTime,&restartTemp);
>
> to
>
> nread=sscanf(buffer,"%i %lE %lE",&restartAtoms,&restartTime,&restartTemp);
>
> and recompile, that should fix it. In the meantime I will work on a patch.
>
> -Dan
>
> On Fri, Dec 23, 2011 at 11:25 AM, Ben Roberts <ben.roberts.geek.nz> wrote:
>> Hi,
>>
>> I just tried running a wrap command using cpptraj, on an Amber ASCII restart file. The restart file in question contains 311,677 atoms, and is declared to contain such in its header. However, when I tried the trajin command, I got this response:
>>
>> INPUT: Reading Input from file wrap_and_centre.ptraj
>>  [trajin BPR-20111213-001_out.rst7]
>> Error: AmberRestart::SetupRead(): Number of atoms in restart (31167)
>>       does not match number of atoms in parmtop (311677)
>> ERROR: Setting up BPR-20111213-001_out.rst7 for read.
>>
>> The restart file header looks like this:
>>
>> <start of file>
>>
>> 311677  0.1000000E+03
>>  28.3626573  14.0009538 -28.1877328  27.4850731  14.2777715 -28.6040488
>>
>> Now, it appears as though the parsing of the restart file may not cope with more than five characters in the "number of atoms" field. Is this the case? If so, has it been fixed or patched in AT 1.5, or for that matter in the version under development?
>>
>> Cheers,
>> Ben
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>
>
>
> --
> -------------------------
> Daniel R. Roe, PhD
> Postdoctoral Associate
> BioMaPS Institute, Rutgers University
> 610 Taylor Road
> Piscataway, NJ   08854



-- 
-------------------------
Daniel R. Roe, PhD
Postdoctoral Associate
BioMaPS Institute, Rutgers University
610 Taylor Road
Piscataway, NJ   08854



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber


Received on Fri Dec 23 2011 - 10:00:03 PST
Custom Search