If anybody has this issue it is because you need to process your cgenff itp file with a script that was provided to me by Vytas Gapsys. If you need it, let me know.
My only commands to this point:
python2.7 make_hybrid.py -l1 lig_3a/MOL_tleap.pdb -l2 lig_5/MOL_tleap.pdb -itp1 lig_3a/MOL.itp -itp2 lig_5/MOL.itp -pairs pairs.dat -oa merged.pdb -oitp MOL.itp -ffitp ffmerged.itp -scDUMd 0.0
returns the below error:
make_hybrid__log_> Reading ligand 1 from: “lig_3a/MOL_tleap.pdb”
make_hybrid__log_> Reading ligand 2 from: “lig_5/MOL_tleap.pdb”
make_hybrid__log_> Reading itp file 1 from: “lig_3a/MOL.itp”
make_hybrid__log_> Reading itp file 2 from: “lig_5/MOL.itp”
make_hybrid__log_> Assigning forcefield parameters…
Traceback (most recent call last):
File “/home/112/pmx/pmx/scripts/ligands/make_hybrid.py”, line 1308, in
main( sys.argv )
File “/home/112/pmx/pmx/scripts/ligands/make_hybrid.py”, line 556, in main
assign_ff(m1,itp1)
File “/home/112/pmx/pmx/scripts/ligands/make_hybrid.py”, line 202, in assign_ff
at = itp.atoms[i]
IndexError: list index out of range
I noticed that new user can’t creat a new topic, so I continued to write my question here.
Could anybody suggest where my problem is coming from with the output from one_ff_file.py?My only command is: one_ff_file.py -ffitp lig_1/atomtype.itp lig_2/atomtype.itp -ffitp_out ffMOL.itp
The error return is listed in the picture above.It can’t produce a correct file even if the difference of the atomtype between two molecular is only a fluorine.
Did I get something wrong with my inputfiles?
Thank you
Jeffrey
what is the error you get? The picture you posted doesn’t seem to contain the error. Also, please provide both input files so that we can try to reproduce the error.
Sorry for incomplete information。Here showed below is the detail of my error. However, the two files of .itp cannot be uploaded, so I paste them in following places.
atomtype.itp
[ atomtypes ]
;name mass charge ptype sigma epsilon Amb
c3 0.00000 0.00000 A 3.39967e-01 4.57730e-01 ; 1.91 0.1094
ca 0.00000 0.00000 A 3.39967e-01 3.59824e-01 ; 1.91 0.0860
oh 0.00000 0.00000 A 3.06647e-01 8.80314e-01 ; 1.72 0.2104
hc 0.00000 0.00000 A 2.64953e-01 6.56888e-02 ; 1.49 0.0157
ha 0.00000 0.00000 A 2.59964e-01 6.27600e-02 ; 1.46 0.0150
ho 0.00000 0.00000 A 0.00000e+00 0.00000e+00 ; 0.00 0.0000
atomtype.itp
[ atomtypes ]
;name mass charge ptype sigma epsilon Amb
c3 0.00000 0.00000 A 3.39967e-01 4.57730e-01 ; 1.91 0.1094
ca 0.00000 0.00000 A 3.39967e-01 3.59824e-01 ; 1.91 0.0860
oh 0.00000 0.00000 A 3.06647e-01 8.80314e-01 ; 1.72 0.2104
f 0.00000 0.00000 A 3.11815e-01 2.55224e-01 ; 1.75 0.0610
hc 0.00000 0.00000 A 2.64953e-01 6.56888e-02 ; 1.49 0.0157
ha 0.00000 0.00000 A 2.59964e-01 6.27600e-02 ; 1.46 0.0150
ho 0.00000 0.00000 A 0.00000e+00 0.00000e+00 ; 0.00 0.0000
thanks for the input files. Unfortunately, using those I cannot reproduce the error. With a fresh install of pmx I get “All finished correctly” as output.
and as output file:
[ atomtypes ]
f 0.00000 0.00000 A 3.11815e-01 2.55224e-01
oh 0.00000 0.00000 A 3.06647e-01 8.80314e-01
ca 0.00000 0.00000 A 3.39967e-01 3.59824e-01
;name mass charge ptype sigma epsilon
ho 0.00000 0.00000 A 0.00000e+00 0.00000e+00
c3 0.00000 0.00000 A 3.39967e-01 4.57730e-01
hc 0.00000 0.00000 A 2.64953e-01 6.56888e-02
ha 0.00000 0.00000 A 2.59964e-01 6.27600e-02
could you try with a clean git pull and see if you still get the error?
I have tried with a git pull and redownloaded the pmx package from github for a few times, but the error is still the same without any change. Are there any other solutions that I can continue to try. Sorry for such disturbance.
it’s difficult to diagnose as we cannot reproduce it with your input, using two different machines.
I also noted you had posted another error above that also gave a “IndexError: list index out of range”. Would you have the possibility to test on another machine (or python environment) to cross-check?
I followed the protein-ligand complex parameterization process based on the GROMACS tutorial and ran the “cgenff_charmm2gmx_py3_nx2.py” script to obtain the .prm, .itp, .pdb, and .top files.
As mentioned earlier, I encountered an “IndexError: list index out of range” error during the creation of the hybrid_structure_topology, specifically in the “Construct bonds…” section.
Following the advice provided in the previous response, I was instructed to explicitly enter parameters in the .itp file starting from the [bonds] section. However, when I attempted to do this by referring to the .prm file, the parameters didn’t match.