dptech-corp / Uni-GBSA

An automatic workflow to perform MM/GB(PB)SA calculations from force field building, and structure optimization to free energy calculation.
Apache License 2.0
87 stars 20 forks source link

unigbsa-traj problem: TypeError: must be real number, not str #23

Closed AI-amateur closed 1 year ago

AI-amateur commented 1 year ago

unigbsa-traj -i example/3f/complex.pdb -p example/3f/complex.top -ndx example/3f/index.ndx -m pb gb -t example/3f/complex.pdb 12/24/2022 19:42:10 PM - INFO - Run the MMPB(GB)SA. 12/24/2022 19:45:18 PM - INFO - Clean the results.

Results: Energy.csv Dec.csv mode detal_G(kcal/mole) Std. Dev. Frames 1.0000 1.0000 Traceback (most recent call last): File "/home/phzd/miniconda3/envs/gbsa/bin/unigbsa-traj", line 33, in sys.exit(load_entry_point('unigbsa==0.1.1', 'console_scripts', 'unigbsa-traj')()) File "/home/phzd/miniconda3/envs/gbsa/lib/python3.8/site-packages/unigbsa/CLI.py", line 272, in traj_pipeline print('%4s %18.4f %9.4f'%(k, v[0], v[1])) TypeError: must be real number, not str

in CLI.py line 269, """ pbsa.extract_result() detal_G = pbsa.extract_result() print("mode detal_G(kcal/mole) Std. Dev.") for k, v in detal_G.items(): print('%4s %18.4f %9.4f'%(k, v[0], v[1])) """ detal_G is a str, the content was showed using pdb: """ Frames mode complex receptor ... Non-Polar Solvation Gas Solvation TOTAL 0 1 gb -18064.469231 -17974.039669 ... -7.127718 -73.4565 20.576882 -52.879618 1 1 pb -16442.770400 -16401.441600 ... 24.980200 -73.4565 70.751100 -2.705400 """ same as file "Eenergy.csv"

I think the function "extract_result()" under class GBSA(object) in "gbsarun.py" file might need some modification