RQC-HU / sum_dirac_dfcoef

This program summarizes the coefficients from DIRAC (http://diracprogram.org) output file that the .ANALYZE option and *PRIVEC and .VECPRI options in **ANALYZE section are used. (c.f. http://www.diracprogram.org/doc/release-23/manual/analyze/privec.html)
https://pypi.org/project/sum-dirac-dfcoef/
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Handle no vector print data #98

Closed kohei-noda-qcrg closed 7 months ago

kohei-noda-qcrg commented 7 months ago

Summary

Implementation

kohei-noda-qcrg commented 7 months ago

この変更により.PRIVECを指定したのにVector printのデータが出ないパターンで、かつ.MULPOPを指定したときに出てくる以下のエラー

$ sum_dirac_dfcoef -i Ar_Ar.out
Traceback (most recent call last):
  File "/home/noda/.pyenv/versions/3.9.15/bin/sum_dirac_dfcoef", line 8, in <module>
    sys.exit(main())
  File "/home/noda/develop/sum_dirac_dfcoef/src/sum_dirac_dfcoef/sum_dirac_dfcoef.py", line 24, in main
    privec_processor.read_privec_data_wrapper()
  File "/home/noda/develop/sum_dirac_dfcoef/src/sum_dirac_dfcoef/privec_reader.py", line 282, in read_privec_data_wrapper
    self.read_privec_data()
  File "/home/noda/develop/sum_dirac_dfcoef/src/sum_dirac_dfcoef/privec_reader.py", line 79, in read_privec_data
    self.start_mo_section(words)
  File "/home/noda/develop/sum_dirac_dfcoef/src/sum_dirac_dfcoef/privec_reader.py", line 173, in start_mo_section
    mo_energy = float(words[-1])
ValueError: could not convert string to float: '1/2'

についてエラーで止まらず、Warningだけ出せるようになった

$ sum_dirac_dfcoef -i Ar_Ar.out
WARNING: The next title is detected before the end of reading coefficients.
In order to force DIRAC to print vector print, please add .ANALYZE and .PRIVEC option to the input file of DIRAC.