Error with 'make_hybrid.py' Using CGenFF

Hello to all,
I encountered an error while attempting to execute ‘make_hybrid.py’:
Traceback (most recent call last):
File “…/scripts/ligands/make_hybrid.py”, line 1308, in
main( sys.argv )
File “…/scripts/ligands/make_hybrid.py”, line 552, in main
itp1 = ITPFile(cmdl[‘-itp1’])
File “…/pmx/forcefield2.py”, line 1071, in init
TopolBase.init(self, filename)
File “…/pmx/forcefield2.py”, line 116, in init
self.read()
File “…/pmx/forcefield2.py”, line 134, in read
self.read_pairs(lines)
File “…/pmx/forcefield2.py”, line 298, in read_pairs
idx = [int(x) for x in line.split()]
ValueError: invalid literal for int() with base 10: ‘3.46559601357e-01’

I suspect this issue arises from additional parameters present in the [ pairs ] section, as I am using CGenFF. The error doesn’t appear when I remove those parameters. Is there an existing modification to ‘make_hybrid.py’ that can accommodate this, or if not, could anyone recommend another script that is both efficient and user-friendly?

why don’ t you use the newest version of pmx python3 ‘develop’ branch. Most of the things would smoothen out except for the fact you still would have to define the parameters explicity in the itp file https://ask.bioexcel.eu/t/pmx-ligandhybrid-list-index-out-of-range-error/4413/6?u=s.pallav

Thank you for the comment!
I installed now the pmx-develop version now, and try the script ‘ligandHybrid.py’ (pmx/src/pmx/scripts/ligandHybrid.py).
However, I encountered the same error once again.
For some reason, I can’t upload my files, so I’m attaching only the part in the lig1.itp that I think caused the problem (look at the pairs section):
[ atoms ]
; nr type resnr residu atom cgnr charge mass
1 NG321 1 NC9 N 1 -0.879 14.0070 ; qtot -0.879

31 HGA3 1 NC9 H21 31 0.090 1.0080 ; qtot 0.000

[ bonds ]
; ai aj funct b0 Kb
1 2 1 1.474000e-01 2.200784e+05

10 31 1 1.111000e-01 2.694496e+05

[ pairs ]
; ai aj funct c6 c12
1 4 1 3.46559601357e-01 1.02486650838e-01
2 5 1 3.38541512893e-01 4.18400000000e-02
2 17 1 2.88651184677e-01 7.82754725313e-02

10 25 1 2.88651184677e-01 7.82754725313e-02
10 26 1 2.88651184677e-01 7.82754725313e-02
11 13 1
11 14 1

28 30 1
28 31 1

[ angles ]
; ai aj ak funct th0 cth S0 Kub
2 1 11 5 1.1210000e+02 3.4308800e+02 0.0000000e+00 0.0000000e+00

30 10 31 5 1.0840000e+02 2.9706400e+02 1.8020000e-01 4.5187200e+03

[ dihedrals ]
; ai aj ak al funct phi0 cp mult
11 1 2 13 9 0.000000e+00 4.184000e-02 3

28 9 10 31 9 0.000000e+00 6.694400e-01 3

Currently handling explicit parameters in [ pairs ] is not supported by ligandHybrid

Thank you. I think I will write the script myself. However, if you have another suggestion, I would be happy to hear about it.