Dear g_mmpbsa user community,
I am getting an index error in the last step of my calculation using the g_mmpbsa Python package. When I run the following command:
g_mmpbsa average -m energy_MM.xvg -p polar.xvg -a apolar.xvg -bsI encounter the error shown below.
I have also tried using the deprecated MmPbSaStat.py, but the same error occurred. ChatGPT suggested that the issue might be related to the apolar.xvg file. According to the documentation, it should contain 10 columns, whereas my file only has 7.
Any help or suggestions on how to resolve this problem would be greatly appreciated.
Thanks in advance!
Best regards,
Gabriel De Jong - MSc USP Brazil
Traceback (most recent call last):
File "/home/tomich/miniforge3/lib/python3.12/site-packages/g_mmpbsa/average.py", line 287, in ReadData
value = float(data[i][j])
~~~~~~~^^^
IndexError: index 7 is out of bounds for axis 0 with size 7
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tomich/miniforge3/bin/g_mmpbsa", line 8, in <module>
sys.exit(main.main())
^^^^^^^^^^^
File "/home/tomich/miniforge3/lib/python3.12/site-packages/g_mmpbsa/main.py", line 78, in main
average.main()
File "/home/tomich/miniforge3/lib/python3.12/site-packages/g_mmpbsa/average.py", line 66, in main
cTmp.CalcEnergy(args,frame_wise,0)
File "/home/tomich/miniforge3/lib/python3.12/site-packages/g_mmpbsa/average.py", line 87, in CalcEnergy
apolEn = ReadData(self.APolFile,n=10)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tomich/miniforge3/lib/python3.12/site-packages/g_mmpbsa/average.py", line 289, in ReadData
raise FloatingPointError('\nCould not convert {0} to floating point number.. Something is wrong in {1}..\n' .format(data[i][j], FileName))
~~~~~~~^^^
IndexError: index 7 is out of bounds for axis 0 with size 7