Errors in using qmd analysis tool


Just Got Here
Hello,

I am a relative newcomer to nwchem, trying to use the qmd_analysis tool. I began by compiling qmd_analysis and then tried my hand at the sample input file which is part of the documentation (http://nwchemgit.github.io/index.php/Release66:Gaussian_Basis_AIMD#Processing_the_output_of_...).

The SiCl14.xyz file is too large to paste here, but here is the the output from the command

qmd_analysis -xyz SiCl4.xyz -steps 15000 -skip 5000 -ts 10.0 -temp 20.0 -smax 800 -width 10.0


Output


 Input file:                    SiCl4.xyz
 Ouput files:                   SiCl4_VDOS.dat
                                SiCl4_IR.dat
 Number of steps to analyze:       15000
 Number of steps to be skipped:     5000
 Temperature:                      20.00 K
 Time step of simulation:          10.00 a.u.
 FWHM of resulting spectrum:       10.00 cm^{-1}

 Found            2  unique elements in trajectory file
 READ ERROR 1           2        5001


I have modified the $NWCHEM_TOP/contrib/qmd_tools/qmd_analysis.f90 file in accordance with the advice given in http://nwchemgit.github.io/Special_AWCforum/st/id2702/. However, since this error is for a canonical example in the QMD documentation itself, I am confused about how to debug and repair it.

I would appreciate any advice or ideas!

Thanks in advance!

Forum Regular
There was a bug in how the code was handling breaking out of the loops when the end of the file was reached. A quick fix is to add the backspace line I've indicated below with an arrow (please don't include the arrow in your source).


!If end of file, break out of loop.
!If some other error, abort.
!If no error, back up one line.
!Above we checked the first frame
! for whether the data was as expected.
!If there is a read error here we are
! not specific about the problem.
 read(9,*,iostat=ioerror)
 if (ioerror.lt.0) then
  exit
 else if (ioerror.gt.0) then
  write(*,*) 'READ ERROR'
  stop
 else
  backspace(9)
 end if
 do
  read(9,*,iostat=ioerror)
  if (ioerror.lt.0) then
   backspace(9)   <-----------------------------------------------
   exit
  else if (ioerror.gt.0) then
   write(*,*) 'READ ERROR'
   stop
  end if 

Just Got Here
Quote:Sean Aug 14th 4:59 am
There was a bug in how the code was handling breaking out of the loops when the end of the file was reached. A quick fix is to add the backspace line I've indicated below with an arrow (please don't include the arrow in your source).




Forum >> NWChem's corner >> General Topics