Re: [AMBER] inpcrd file format in AmberTools16

From: Chris Moth <cmoth08.gmail.com>
Date: Tue, 13 Jun 2017 11:55:59 -0500

I don't have the answer - but here is how I would track it down myself.

1) Start by looking at the leap created inpcrd files in a text editor.
Anything obviously different in start (where title line is found) or end
(where the box is stored in 6 floats on their own line)?

2) Don't use the newest AmberTools output to create input into an older
sander version. If that is a possibility, try not doing that - and see
what happens

3) I'd then dig into the sander fortran source code:

First, the ultimate source of the error is this code:

subroutine AM_RUNMD_get_ucell_info(inpcrd,a,b,c,alpha,beta,gam)

in file AmberTools/src/sander/amoeba_runmd.F90

which is being called as a result of this:

   logical newstyle
    if( ntb > 0 ) then
       ! Check for new Netcdf restart format
       if ( NC_checkRestart(inpcrd) ) then
         write(6,'(a)') ' getting box info from netcdf restart file'
         call read_nc_restart_box(inpcrd,ax,bx,cx,alphax,betax,gammax)
       else
          write(6,'(a)') ' getting new box info from bottom of inpcrd'
*call AMOEBA_check_newstyle_inpcrd(inpcrd,newstyle) << NEWSTYLE set here*
          if ( newstyle )then
             call
AM_RUNMD_get_ucell_info(inpcrd,ax,bx,cx,alphax,betax,gammax)
          else
             call peek_ewald_inpcrd(inpcrd,ax,bx,cx,alphax,betax,gammax)
          end if

in ew_setup.F90

You can see where the newstyle flag is set here in amoeba_interface.F90

subroutine AMOEBA_check_newstyle_inpcrd(inpcrd,newstyle)
   character(len=*),intent(in) :: inpcrd
   logical,intent(out) :: newstyle

   integer :: nf,iok,ionerr
   character(len=80) :: fmt,fmtin,dtype
   nf = 30
   call amopen(nf,inpcrd,'O','F','R')
   call nxtsec_crd_reset()
   fmtin = '(a)'
   dtype = 'TITLE'
   ionerr = 1 ! not fatal if missing
* call nxtsec_crd(nf, 6, ionerr,fmtin, dtype, fmt, iok)*
* if ( iok == 0 )then !this data type found in prmtop**
** newstyle = .true.**
** else**
** newstyle = .false.*
   endif
   call nxtsec_crd_reset()
   close(nf)
end subroutine AMOEBA_check_newstyle_inpcrd

When we look at nxtsec_crd (in ./lib/nxtsec.F) we find

c IOK: 0, flag found and data read
*c -1, then no %VERSION line found. This is an old-format COORD
file.**
**c In this case, any call to NXTSEC will merely replace FMT
with**
**c FMTOLD. This simplifies the calling procedure in the main**
**c routine, since FMT will contain the approprate FMT
regardless**
**c of whether a new or old format COORD file is used (as long**
**c as FMTOLD was appropriately set in the call list).*
*c -2, then this is a new-format COORD file, but the requested**
**c FLAG was not found. (Only if IONERR = 1).*

So, this supports your intuition that something fundamentally different
is happening in your inpcrd files.

Here is documentation of the format. I wonder if it is current, given
what you are seeing:

http://ambermd.org/formats.html#restart

I recommend that you look at the opening line, and final line of the
inpcrd files with a text editor, to see if anything is obviously different.

Another possibility might be that the latest sander is being confused by
something in the inpcrd from the older tleap. One workaround might be
to load the old inpcrd with cpptraj, and write it back out, and see what
changes...

Best of luck. Sorry if I've been zero help.



On 06/12/2017 12:45 PM, Dr. Robert Molt wrote:
> Good afternoon,
>
> I am encountering an error when I attempt to execute a certain input
> coordinate file with AmberTools16.
>
> Previously, using AmberTools15 to prepare the inpcrd file, I would
> execute the following commands in leap:
>
> ****************************************
>
> source leaprc.ff14SB (or whatever for water)
>
> source leaprc.gaff
>
> CAT=loadmol2 cat.mol2
>
> loadamberparams cat.frcmod
>
> solvatebox CAT commands
>
> saveamberparm CAT inpcrd prmtop
>
> *****************************************
>
> I would then execute a minimization with Sander, no problem. In
> particular, the minimization output file would begin with, after the echo,
>
> 1. RESOURCE USE:
> --------------------------------------------------------------------------------
>
> | Flags:
> getting new box info from bottom of inpcrd
> | INFO: Old style inpcrd file read
>
> | peek_ewald_inpcrd: Box info found
>
> ***********************************************
>
> The minimization finishes just fine. However, I am screwing up something
> in AmberTools16. Using leap again, I follow the same above commands,
> attempt to do the same minimization, and it crashes. The output file for
> minimization has the error:
>
> ****************************************************
>
> 1. RESOURCE USE:
> --------------------------------------------------------------------------------
>
> | Flags:
> getting new box info from bottom of inpcrd
> | New format inpcrd file being parsed.
> | Version = 1.000 Date = 06/12/17 Time = 13:28:32
> AMOEBA_get_ucell_info: UNIT_CELL_PARAMETERS missing
>
> ***********************************************************
>
> i.e., it seems the inpcrd file produced in leap is different now. Can
> someone advise on the nature of the problem? I below copy/paste my
> minimization file.
>
> Minimize
> &cntrl
> imin=1,
> ntx=1,
> irest=0,
> maxcyc=8000,
> ncyc=4000,
> ntpr=100,
> ntwx=0,
> cut=9.0
> /
>
>
> _______________________________________________
> 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 Jun 13 2017 - 10:00:02 PDT
Custom Search