ValueError: zero-size array to reduction operation minimum which has no identity; IndexError: list index out of range

25 views
Skip to first unread message

Janus Quiambao

unread,
Oct 25, 2023, 10:43:36 AM10/25/23
to gmx_MMPBSA
Good day!

I am initially running the gmx_MMPBSA command and has encountered this problem:

mpirun -np 2 gmx_MMPBSA -O -i mmpbsa.in -cs md_0_10.tpr -ct md_0_10_center.xtc -ci index.ndx -cg 17 18 -cp topol.top -o FINAL_RESULTS_MMPBSA.dat -eo FI
NAL_RESULTS_MMPBSA.csv
[INFO   ] Starting gmx_MMPBSA v1.5.0.3
[INFO   ] Command-line
  gmx_MMPBSA -O -i mmpbsa.in -cs md_0_10.tpr -ct md_0_10_center.xtc -ci index.ndx -cg 17 18 -cp topol.top -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv

[INFO   ] Starting gmx_MMPBSA v1.5.0.3
[INFO   ] Command-line
  gmx_MMPBSA -O -i mmpbsa.in -cs md_0_10.tpr -ct md_0_10_center.xtc -ci index.ndx -cg 17 18 -cp topol.top -o FINAL_RESULTS_MMPBSA.dat -eo FINAL_RESULTS_MMPBSA.csv

[INFO   ] Checking external programs...
[INFO   ] cpptraj found! Using /home/jirquiambao/miniconda3/bin/cpptraj
[INFO   ] tleap found! Using /home/jirquiambao/miniconda3/bin/tleap
[INFO   ] parmchk2 found! Using /home/jirquiambao/miniconda3/bin/parmchk2
[INFO   ] sander found! Using /home/jirquiambao/miniconda3/bin/sander
[INFO   ] Checking external programs...
[INFO   ] cpptraj found! Using /home/jirquiambao/miniconda3/bin/cpptraj
[INFO   ] tleap found! Using /home/jirquiambao/miniconda3/bin/tleap
[INFO   ] parmchk2 found! Using /home/jirquiambao/miniconda3/bin/parmchk2
[INFO   ] sander found! Using /home/jirquiambao/miniconda3/bin/sander
[INFO   ] Using GROMACS version > 5.x.x!
[INFO   ] gmx found! Using /usr/local/gromacs/bin/gmx
[INFO   ] Checking external programs...Done.

[INFO   ] Building AMBER topologies from GROMACS files...
[INFO   ] Get PDB files from GROMACS structures files...
[INFO   ] Making gmx_MMPBSA index for complex...
[INFO   ] Using GROMACS version > 5.x.x!
[INFO   ] gmx found! Using /usr/local/gromacs/bin/gmx
[INFO   ] Checking external programs...Done.

[INFO   ] Building AMBER topologies from GROMACS files...
[INFO   ] Get PDB files from GROMACS structures files...
[INFO   ] Making gmx_MMPBSA index for complex...
[INFO   ] Normal Complex: Saving group 17_18 in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_COM.pdb
[INFO   ] Normal Complex: Saving group 17_18 in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_COM.pdb
[INFO   ] No receptor structure file was defined. Using ST approach...
[INFO   ] Using receptor structure from complex to generate AMBER topology
[INFO   ] Normal Receptor: Saving group 17 in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_REC.pdb
[INFO   ] No receptor structure file was defined. Using ST approach...
[INFO   ] Using receptor structure from complex to generate AMBER topology
[INFO   ] Normal Receptor: Saving group 17 in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_REC.pdb
[INFO   ] No ligand structure file was defined. Using ST approach...
[INFO   ] Using ligand structure from complex to generate AMBER topology
[INFO   ] Normal Ligand: Saving group 18 in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_LIG.pdb
[INFO   ] No ligand structure file was defined. Using ST approach...
[INFO   ] Using ligand structure from complex to generate AMBER topology
[INFO   ] Normal Ligand: Saving group 18 in _GMXMMPBSA_COM_index.ndx file as _GMXMMPBSA_LIG.pdb
  File "/home/jirquiambao/miniconda3/bin/gmx_MMPBSA", line 10, in <module>
    sys.exit(gmxmmpbsa())
             ^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/app.py", line 101, in gmxmmpbsa
    app.make_prmtops()
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/main.py", line 533, in make_prmtops
    self.FILES.mutant_receptor_prmtop, self.FILES.mutant_ligand_prmtop) = maketop.buildTopology()
                                                                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/make_top.py", line 116, in buildTopology
    self.gmx2pdb()
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/make_top.py", line 382, in gmx2pdb
    self.receptor_str = self.molstr(self.receptor_str_file)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/make_top.py", line 1229, in molstr
    structure = parmed.read_PDB(pdb_file)
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/parmed/formats/pdb.py", line 434, in parse
    inst.struct.assign_bonds()
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/parmed/structure.py", line 1004, in assign_bonds
    pairs = find_atom_pairs(self, mindist, unassigned_atoms)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/parmed/utils/pairlist.py", line 39, in find_atom_pairs
    voxels = np.array((coords - coords.min(axis=0)) / dist, dtype=int)
                                ^^^^^^^^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/numpy/core/_methods.py", line 45, in _amin
    return umr_minimum(a, axis, None, out, keepdims, initial, where)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: zero-size array to reduction operation minimum which has no identity
Exiting. All files have been retained.
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
  File "/home/jirquiambao/miniconda3/bin/gmx_MMPBSA", line 10, in <module>
    sys.exit(gmxmmpbsa())
             ^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/app.py", line 101, in gmxmmpbsa
    app.make_prmtops()
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/main.py", line 533, in make_prmtops
    self.FILES.mutant_receptor_prmtop, self.FILES.mutant_ligand_prmtop) = maketop.buildTopology()
                                                                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/make_top.py", line 116, in buildTopology
    self.gmx2pdb()
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/make_top.py", line 390, in gmx2pdb
    self.resi, self.resl, self.orderl = res2map(self.indexes, self.complex_str)
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jirquiambao/miniconda3/lib/python3.11/site-packages/GMXMMPBSA/utils.py", line 476, in res2map
    res = [com_str.atoms[i].residue.chain, com_str.atoms[i].residue.number, com_str.atoms[i].residue.name,
           ~~~~~~~~~~~~~^^^
IndexError: list index out of range
Exiting. All files have been retained.
--------------------------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[44550,1],0]
  Exit code:    1


I am also attaching the following log file.

Hoping for an immediate response. Thank you in advance!

gmx_MMPBSA.log

marioe911116

unread,
Oct 25, 2023, 5:16:53 PM10/25/23
to gmx_MMPBSA
Haven't seen this error before... can you please send the files you are using?

Janus Quiambao

unread,
Oct 27, 2023, 6:13:43 AM10/27/23
to gmx_MMPBSA
Hello! I tried reinstalling and it worked. Thank you!
Reply all
Reply to author
Forward
0 new messages