MmpbsaDecomp.py + IndentationError: expected an indented block

104 views
Skip to first unread message

Fatemeh Haghighi

unread,
Aug 18, 2019, 12:54:18 PM8/18/19
to g_mmpbsa Mailing List
Hi

when I used the MmpbsaDecomp.py for protein ligand, I received such error. it occure for all ligands not one. could you please tell me how to resolve that error?

python MmPbSaDecomp.py -bs -nbs 2000 -m contrib_MM.dat -p contrib_pol.dat -a sasa_contrib.dat
  File "MmPbSaDecomp.py", line 216
    main()
       ^
IndentationError: expected an indented block


Best Regards

Natalie Tatum

unread,
Aug 19, 2019, 3:53:28 AM8/19/19
to g_mm...@googlegroups.com
Hi Fatemeh,

This is an error caused by the running of the python script. Have you edited the .py file in any way? And are you using the correct version of python to run the script? Some differences between Python 2.7 and Python 3 mean you have to match your call of python to the version the script was written in. I think I remember this happening to me and I think I edited the script to run using Python3.

Try running the script as:

python2.7 MmPbSaDecomp.py -bs -nbs 2000 -m contrib_MM.dat -p contrib_pol.dat -a sasa_contrib.dat   

Does that work for you?


Natalie

--
You received this message because you are subscribed to the Google Groups "g_mmpbsa Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to g_mmpbsa+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/g_mmpbsa/ea212f0e-bf94-45fa-824c-593364afca4b%40googlegroups.com.


--
Dr. Natalie J. Tatum
Post-doctoral Research Associate
Northern Institute for Cancer Research
Newcastle University

Fatemeh Haghighi

unread,
Aug 19, 2019, 5:54:23 AM8/19/19
to g_mm...@googlegroups.com
Hi,
Thank you very much for your response. I didn't edited the script. I don't know which version of python  I used. I will try with version 2.7


From: g_mm...@googlegroups.com <g_mm...@googlegroups.com> on behalf of Natalie Tatum <natali...@gmail.com>
Sent: Monday, August 19, 2019 9:53:15 AM
To: g_mm...@googlegroups.com <g_mm...@googlegroups.com>
Subject: Re: [g_mmpbsa] MmpbsaDecomp.py + IndentationError: expected an indented block
 

Nikhil Maroli

unread,
Aug 19, 2019, 5:56:02 AM8/19/19
to g_mm...@googlegroups.com
Wrong version of python is the reason.

Fatemeh Haghighi

unread,
Aug 19, 2019, 5:56:57 AM8/19/19
to g_mm...@googlegroups.com
Maybe I used the version 3.

From: g_mm...@googlegroups.com <g_mm...@googlegroups.com> on behalf of Nikhil Maroli <scin...@gmail.com>
Sent: Monday, August 19, 2019 11:55:48 AM

Nikhil Maroli

unread,
Aug 19, 2019, 5:58:25 AM8/19/19
to g_mm...@googlegroups.com
If you have python 3,in default system use pythn3.

Fatemeh Haghighi

unread,
Aug 19, 2019, 9:20:16 AM8/19/19
to g_mm...@googlegroups.com
Hi,

I tried with python 2.7.10 and 2.7.11,but the same error I received.

Best wishes

Sent: Monday, August 19, 2019 11:58:07 AM

daniel madulu shadrack

unread,
Aug 28, 2019, 6:38:15 AM8/28/19
to g_mm...@googlegroups.com
Hi there is a small bug. Try to fix. Check the first lines of the code..

--

hassan rasouli

unread,
Aug 28, 2019, 6:38:15 AM8/28/19
to g_mm...@googlegroups.com
Dear F. Haghighi, 

Regarding your request, a simple way to solve your problem is that you try to install the latest version of the Python program, add its installation path to your operating system environmental path directory. Then, try to run that script you have. If this method doesn't work well, following the provided tutorial by the developer website may help you with further advancements. Before running, be assured that your work-folder contains all essential files for proceeding this script. 


Regards,

H.R.  





Twitter............ResearchGate............ORCID............Talenthouse


Reply all
Reply to author
Forward
0 new messages