# Error with 'make\_hybrid.py' Using CGenFF

**URL:** <https://ask.bioexcel.eu/t/error-with-make-hybrid-py-using-cgenff/4820>\
**Category:** pmx\
**Created:** [February 11, 2024, 2:02pm UTC](https://ask.bioexcel.eu/t/error-with-make-hybrid-py-using-cgenff/4820 "2024-02-11T14:02:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yehon](https://avatars.discourse-cdn.com/v4/letter/y/e99b99/32.png) [@yehon](https://ask.bioexcel.eu/u/yehon)\
**Post date:** [February 11, 2024, 2:02pm UTC](https://ask.bioexcel.eu/t/error-with-make-hybrid-py-using-cgenff/4820/1 "2024-02-11T14:02:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![s.pallav](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@s.pallav](https://ask.bioexcel.eu/u/s.pallav)\
**Post date:** [February 12, 2024, 3:47am UTC](https://ask.bioexcel.eu/t/error-with-make-hybrid-py-using-cgenff/4820/2 "2024-02-12T03:47:11Z")

</div>

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](https://ask.bioexcel.eu/t/pmx-ligandhybrid-list-index-out-of-range-error/4413/6)

---

<div class="post-metadata">

**Author:** ![yehon](https://avatars.discourse-cdn.com/v4/letter/y/e99b99/32.png) [@yehon](https://ask.bioexcel.eu/u/yehon)\
**Post date:** [February 12, 2024, 12:46pm UTC](https://ask.bioexcel.eu/t/error-with-make-hybrid-py-using-cgenff/4820/3 "2024-02-12T12:46:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vgapsys](https://avatars.discourse-cdn.com/v4/letter/v/7993a0/32.png) [@vgapsys](https://ask.bioexcel.eu/u/vgapsys)\
**Post date:** [February 12, 2024, 1:07pm UTC](https://ask.bioexcel.eu/t/error-with-make-hybrid-py-using-cgenff/4820/4 "2024-02-12T13:07:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yehon](https://avatars.discourse-cdn.com/v4/letter/y/e99b99/32.png) [@yehon](https://ask.bioexcel.eu/u/yehon)\
**Post date:** [February 12, 2024, 1:12pm UTC](https://ask.bioexcel.eu/t/error-with-make-hybrid-py-using-cgenff/4820/5 "2024-02-12T13:12:17Z")

</div>

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