normal Sphingomyelin and other lipids in insane.py?

  • gpantel
  • gpantel's Avatar Topic Author
  • Offline
  • Fresh Boarder
More
9 years 6 days ago #4629 by gpantel
Hi all,

I'd like to use sphingomyelin in insane.py, but none of the sphingomyelin models that have been previously defined for the Martini force field ( md.chem.rug.nl/cgmartini/index.php/force...lipids/sphingomyelin ) are implemented.

If I am to assume correctly, users are expected to do this definition on their own, hardcoding lipids they want into their own instance of insane.py.

Has anyone done this before? Are there plans to soon release a new version of insane.py that contains all of the lipids and models listed on the Force Field parameters page ( md.chem.rug.nl/cgmartini/index.php/force-field-parameters )?

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

More
9 years 1 day ago #4653 by helgi
Hello, hello,

Yes and yes. We recently added quite a few new lipids to our download page and templates for those have not been added to insane. We do plan to update insane with at least the most common lipids.

To add them yourself, there are x2 methods.
1) Edit insane.py directly (works for all lipids but you need to change some python code). There are tables with lipid templates that you need to edit. In your case look for PPCS (an old SM lipids that has a template in insane) cp that line and change the name and tail beads to fit your lipid.
2) In insane you can add “simple” lipid templates on the command line (e.g. PC, SM lipids will work but not GM lipids). You do this by providing what CG bead are I the lipid using the –al options e.g. you would add the PNSM lipid template by adding the following options:
-alname PNSM -alhead 'C P' -allink "A A" -altail "TCC CCCDCC"
You can add multiple templates this way one after the other and in the new lipid .itp files you can see what beads are where in the @INSANE line in the .itp header.

Try one of these and if you have problems getting them to work e-mail me with the SM lipids you need and I will send you back an insane with those templates added.

Cheers,
- Helgi Ingolfsson

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

  • gpantel
  • gpantel's Avatar Topic Author
  • Offline
  • Fresh Boarder
More
9 years 7 hours ago #4655 by gpantel
Replied by gpantel on topic Sphingomyelin and other lipids in insane.py?
Hi Helgi,

Thanks for the details, the example command, and the generous offer of additional assistance!

So, when running your PNSM example with the command:

python insane.py -alname PNSM -alhead 'C P' -allink "A A" -altail "TCC CCCDCC"


A TypeError is returned:

Traceback (most recent call last):
File "insane.py", line 684, in <module>
pbcx = pbcy = pbcz = options["-d"].value + (options["-hole"] and options["-hole"].value or 0)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'



This is something I was confused about before regarding insane.py, though it's a different topic...

Around line 684 is the following:

## A. NO PROTEIN ---
if not tm:

resi = 0
# Set the box -- If there is a hole, add its radius to the distance
pbcx = pbcy = pbcz = options["-d"].value + (options["-hole"] and options["-hole"].value or 0)
if "hexagonal".startswith(options["-pbc"].value):
# Hexagonal prism -- y derived from x directly
pbcy = math.sqrt(3)*pbcx/2
pbcz = options["-dz"].value or options["-z"].value or options["-d"].value
elif "optimal".startswith(options["-pbc"].value):
# Rhombic dodecahedron with hexagonal XY plane
pbcy = math.sqrt(3)*pbcx/2
pbcz = math.sqrt(6)*options["-d"].value/3
if "rectangular".startswith(options["-pbc"].value):
pbcz = options["-dz"].value or options["-z"].value or options["-d"].value


This appears to me to necessitate that the '-d' flag is set for insane.py to run when no pdb file is supplied as an input. Additionally, I don't really understand what '-d' actually does. The description in insane.py says it is "-d Distance between periodic images (nm)", however when I set it even as high as 50(!) in lipid bilayers, the only difference I can see between a system where -d is 50 and -d is 0 is that there are 10 less waters out of approximately 8,000!

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

More
9 years 7 hours ago #4656 by helgi
Yep, you are right. There is a bug in insane that requires you to set the –d flag even if you are not using it – I will forward this to Tsjerk so he can fix this.

The –d flag is used to set the size of the box (distance to the next p. image) but only if you are not using the other options to set the box size (e.g. –x –y –z ). If those are set the –d is not used but for some reason insane still fetches the value and crashes if it’s not there.

Cheers,
- Helgi

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

More
9 months 2 weeks ago #9674 by zwy
Now I need to add a new molecule to insane.py, with dextrose in the head and 6 acyl chains, how to add that to insane. Looking forward to your reply.

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

Time to create page: 0.095 seconds