normal insane.py script error

  • z.sichaib
  • z.sichaib's Avatar Topic Author
  • Offline
  • Senior Boarder
More
3 years 1 week ago #8347 by z.sichaib
insane.py script error was created by z.sichaib
Dear Martini Users,

I would like to run simulations of a Protein embedded in PI 18:0/20:4 (SAPI) (among other lipids).

I can't find the itp file of SAPI on the Martini website.

For that, I used insane as follow:
(NB: I installed insane as a python module using pip2 as was explained here: github.com/Tsjerk/Insane )


insane -f protein.gro -o protein_memb.gro -p topol.top -alname SDPE -alhead 'E P' -allink 'G G' -altail "DDDDD CCCC" -alname SDPS -alhead 'S P' -allink 'G G' -altail "DDDDD CCCC" -alname SAPI -alhead 'PI' -allink 'G G' -altail "DDDDC CCCC" -pbc cubic -box 12.1,12.1,14.8 -l POPC:40 -l SDPE:38.9 -l SDPS:14.2 -l SAPI:5.9 -l CDL2:0.8 -u POPC:40 -u SDPE:38.9 -u SDPS:14.2 -u SAPI:5.9 -u CDL2:0.8 -center -sol W

But I got the following error:
; X: 12.100 (16 bins) Y: 12.100 (16 bins) in upper leaflet
; X: 12.100 (16 bins) Y: 12.100 (16 bins) in lower leaflet
; 241 lipids in upper leaflet, 242 lipids in lower leaflet
Traceback (most recent call last):
File "/p/home/jusers/sichaib1/jureca/.local/bin/insane", line 8, in <module>
sys.exit(cli())
File "/p/home/jusers/sichaib1/jureca/.local/lib/python2.7/site-packages/insane/cli.py", line 164, in cli
sys.exit(main(sys.argv))
File "/p/home/jusers/sichaib1/jureca/.local/lib/python2.7/site-packages/insane/cli.py", line 145, in main
box) = core.old_main(argv, options)
File "/p/home/jusers/sichaib1/jureca/.local/lib/python2.7/site-packages/insane/core.py", line 1175, in old_main
membrane, added = setup_membrane(pbc, protein, lipid, options)
File "/p/home/jusers/sichaib1/jureca/.local/lib/python2.7/site-packages/insane/core.py", line 1023, in setup_membrane
at, ax, ay, az = zip(*liplist[lipid].build(diam=lipd))
File "/p/home/jusers/sichaib1/jureca/.local/lib/python2.7/site-packages/insane/lipids.py", line 99, in build
beads = [HEADBEADS for i in self.head]
KeyError: 'PI'


Apparently "PI" head-bead is not defined in insane/lipids.py file.

For that, I added "PI": "phosphatidylinositol" in insane/lipids.py and run again the above command line. --> I didn't get an error message in the output but when I checked the resulting structure, the gro file looked like:

397SAPI CB4 3286 11.026 2.132 8.048
398SAPI phosphatidylinositol 3287 1.994 2.116 9.548

It just put a bead named phosphatidylinositol in the gro file which is wrong. I need to define phosphatidylinositol bead as (C1, C2, C3, PO4) somewhere!

Finally, I tried generating an itp file of SAPI using lipid-martini-itp-v06.py as follow:
python ./lipid-martini-itp-v06.py -alname SAPI -alhead 'PI' -allink 'G G' -altail "DDDDC CCCC" -o SAPI_LipMartini_v06.itp
from the output file, I copied the line

C1 C2 C3 PO4 GL1 GL2 D1A D2A D3A D4A C5A C1B C2B C3B C4B to insane/_lipid_data.py in this way:

"SAPI": (moltype, " C1 C2 C3 PO4 GL1 GL2 D1A D2A D3A D4A C5A C1B C2B C3B C4B "),

I run insane:

insane -f protein.gro -o protein_memb.gro -p topol.top -alname SDPE -alhead 'E P' -allink 'G G' -altail "DDDDD CCCC" -alname SDPS -alhead 'S P' -allink 'G G' -altail "DDDDD CCCC" -pbc cubic -box 12.1,12.1,14.8 -l POPC:40 -l SDPE:38.9 -l SDPS:14.2 -l SAPI:5.9 -l CDL2:0.8 -u POPC:40 -u SDPE:38.9 -u SDPS:14.2 -u SAPI:5.9 -u CDL2:0.8 -center -sol W

and it worked! the output looks also fine!

The aim of this new topic is to point out to insane -alhead 'PI' that is not working (at least for me. maybe I did something wrong or maybe there are other reasons why this bead wasn't defined?).

Also, is it correct to add a new entry to _lipid_data.py as I did? it seems logical and clean for me but I would like to double-check it with you, in case I am missing something.

Thanks a lot for your help.

Zeineb

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago #9368 by tanvipar123
Replied by tanvipar123 on topic insane.py script error
I am trying to run insane.py script ( cgmartini.nl/images/tools/insane/insane.py )
for bilayer formation of CHOL,CER,FFA but I am getting an error stating
Missing parentheses in call to 'print'. Did you mean print("\n",__file__)?
How to resolve the issue?

Please Log in or Create an account to join the conversation.

More
7 months 3 weeks ago #9369 by riccardo
Replied by riccardo on topic insane.py script error
@tanvipar123, I think this is python2 vs python3 issue. That insane.py still requires python2.

Please Log in or Create an account to join the conversation.

Time to create page: 0.177 seconds