Re: [AMBER] ante-MMPBSA IndexError: list index out of range

From: Jason Swails <jason.swails.gmail.com>
Date: Mon, 2 Feb 2015 20:16:21 -0500

On Mon, Feb 2, 2015 at 2:57 PM, Kenneth Huang <kennethneltharion.gmail.com>
wrote:

> Dear all,
>
> I'm trying to run ante-MMPBSA to make the topologies for MMPBSA, and for my
> system it works fine when I try this on AmberTools14-
>
> ante-MMPBSA.py -p 1T5A_FBP4_DE.prmtop -c 1T5AFBP4_com_SM1.prmtop -r
> 1T5AFBP4_rec_SM1.prmtop -l 1T5AFBP4_lig_SM1.prmtop -s
> ':WAT,:Cl-,:1045-2088' -n ':1-522'
>
> However, when I try to run the corresponding command, as my protein is a
> tetramer, and I'm trying to look at the dimer interactions with MMPBSA
> by splitting it along the dimer interface to give two monomer-monomer
> systems in order to save time-
>
> ante-MMPBSA.py -p 1T5A_FBP4_DE.prmtop -c 1T5AFBP4_com_SM2.prmtop -r
> 1T5AFBP4_rec_SM2.prmtop -l 1T5AFBP4_lig_SM2.prmtop -s ':WAT,:Cl-,:1-1044'
> -n ':1045-1566'
>
> It gives me an IndexError-
>
> Stripping :WAT,:Cl-,:1-1044 (solvent) from original topology, output is
> 1T5AFBP4_com_SM2.prmtop
> Done stripping solvent!
>
> Creating receptor topology file by stripping :1045-1566 from
> 1T5AFBP4_com_SM2.prmtop
> Done creating receptor topology file!
>
> Creating ligand topology file by stripping !(:1045-1566) from
> 1T5AFBP4_com_SM2.prmtop
> Error: Creating ligand topology failed!
> Loaded Amber topology file 1T5AFBP4_com_SM2.prmtop
>
> Reading input from STDIN...
> > Removing mask '!(:1045-1566)' (16206 atoms) from the topology file.
> Traceback (most recent call last):
> File "/home/lepus/amber14/bin/parmed.py", line 159, in <module>
> parmed_commands.cmdloop()
> File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
> stop = self.onecmd(line)
> File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
> return func(arg)
> File "<string>", line 1, in <lambda>
> File "/home/lepus/amber14/bin/ParmedTools/parmed_cmd.py", line 141, in
> _normaldo
> action.execute()
> File "/home/lepus/amber14/bin/ParmedTools/ParmedActions.py", line 1163,
> in execute
> self.parm.delete_mask(self.mask)
> File "/home/lepus/amber14/bin/chemistry/amber/_amberparm.py", line 664,
> in delete_mask
> self.remake_parm()
> File "/home/lepus/amber14/bin/chemistry/amber/_amberparm.py", line 440,
> in remake_parm
> self._fill_res_container()
> File "/home/lepus/amber14/bin/chemistry/amber/_amberparm.py", line 637,
> in _fill_res_container
> self.parm_data['POINTERS'][NRES]-1]-1,
> IndexError: list index out of range
>

​Looks like a bug in ParmEd and/or ante-MMPBSA.py (quite possibly both).
 ante-MMPBSA.py calls parmed.py to perform its topology stripping. I
*suspect* that what is happening here is some clunky re-indexing is
happening. Unlike "typical" ante-MMPBSA.py uses, what you are trying to do
here is remove the *beginning* of a protein in the 'strip' command and then
define part of the part that comes afterwards as the ligand.

However, Amber atom indices are always sequentially ordered from 1 to N
(which is an implicit numbering borne out of a lack of any explicit
numbering). So, if ante-MMPBSA.py first strips the prmtop of the -s mask
and *then* applies the ligand mask to the result, your ligand mask could
very easily point to atoms that no longer exist (since the stripped prmtop
will no longer have the first 1044 residues). (The error message is likely
caused because the NRES pointer is not appropriately updated after the
initial stripping.)

Typically, the "strip_mask" always comes at the end, so that any ligand or
receptor mask would be the same in both the stripped and unstripped prmtop
files. If you send me your prmtop files (or, rather, a link to them on
Dropbox or something since they appear to be very large), I will try to
isolate the problem and see if I can provide more than speculation.


> That said, I'm able to work around it by just isolating the portions one at
> a time as monomers from the main complex itself, and then repeating with
> different ligand masks two more times to create the required files.
>

​This is a less satisfying way to do it, but it's definitely a legitimate
workaround. You can also use parmed.py (or xparmed.py) directly and do
your topology file stripping that way.

HTH,
Jason

-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Feb 02 2015 - 17:30:02 PST
Custom Search