;;;;;; Martini lipid topology for C16:0/20:4 PI (PAPI), generated using:
; The Martini lipid itp generator version 0.4  Args are: -o martini_v2.0_PAPI_01.itp -alname PAPI -alhead 'PI' -allink 'G G' -altail 'DDDDC CCCC'
; WARNING: Lipids topology was generated following the Martini 2.0 guidelines but this specific lipid type might
;          not have been tested and should therefore be used with care. 
;
; Description:
;   A general model phosphatidylinositol (PI) lipid corresponding to atomistic e.g. C16:0/20:4 1-stearoyl-2-arachidonoyl tails.
; Parameterization:
;   The lipid head is based on atomistic phosphatidylinositol (PI) simulations, see Lopez et al. 2013 for details. 
;   The lipid tail follows the standard Martini 2.0 lipid definitions and building block rules.
; Reference(s): 
;   C.A. Lopez, Z. Sovova, F.J. van Eerden, A.H. de Vries, S.J. Marrink. Martini force field parameters for glycolipids. JCTC, 
;   9:1694-1708, 2013. doi:10.1021/ct3009655 
;   H.I. Ingolfsson, M.N. Melo, F.J. van Eerden, C. Arnarez, C.A. Lopez, T.A. Wassenaar, X. Periole, A.H. De Vries, D.P. Tieleman, 
;   S.J. Marrink. Lipid organization of the plasma membrane. JACS, 136:14554-14559, 2014. doi:10.1021/ja507832e 
;   S.J. Marrink, A.H. de Vries, A.E. Mark. Coarse grained model for semi-quantitative lipid simulations. JPC-B, 108:750-760, 
;   2004. doi:10.1021/jp036508g 
;   S.J. Marrink, H.J. Risselada, S. Yefimov, D.P. Tieleman, A.H. de Vries. The MARTINI force field: coarse grained model for 
;   biomolecular simulations. JPC-B, 111:7812-7824, 2007. doi:10.1021/jp071097f
; Created: 2015.04.20
; Author(s): Cesar Lopez <C.A.Lopez-Bautista@rug.nl>
; Modified:
;   Helgi I. Ingolfsson <h.i.ingolfsson@rug.nl> and Xavier Periole <x.periole@rug.nl>, 2014.06. 
;   Removed dihedral to increase stability.
; Warning(s)/Note(s):
;   Warning, dihedral for head oriantation was removed to make the molecule more stable - this should be 
;   better tested and compaired to atomistic simulations. 
;   Node, bonds with force constant > 25000 are treated as constraints, but use harmonic bonds for minimization. 
;   Add define=-DFLEXIBLE to .mdp options to select harmonic bonds for minimization purposes.
;
;@INSANE alhead=PI, allink=G G, altail=DDDDC CCCC, alname=PAPI, charge=-1.0
;@RESNTEST PAP==PAPI if: atoms[0]==C1  and atoms[4]==GL1
;@BEADS C1 C2 C3 PO4 GL1 GL2 D1A D2A D3A D4A C5A C1B C2B C3B C4B 
;@BONDS C1-C2 C1-C3 C2-C3 C1-PO4 PO4-GL1 GL1-GL2 GL1-D1A D1A-D2A D2A-D3A D3A-D4A D4A-C5A GL2-C1B C1B-C2B C2B-C3B C3B-C4B 
;

[moleculetype]
; molname      nrexcl
  PAPI          1

[atoms]
; id 	type 	resnr 	residu 	atom 	cgnr 	charge
   1 	P1 	 1 	PAPI 	C1  	 1 	0 	
   2 	P4 	 1 	PAPI 	C2  	 2 	0 	
   3 	P4 	 1 	PAPI 	C3  	 3 	0 	
   4 	Qa 	 1 	PAPI 	PO4 	 4 	-1.0 	; Name changed from CP to PO4
; Tail part (uses standar Martini v2.0 tail rules)
   5 	Na 	 1 	PAPI 	GL1 	 5 	0 	
   6 	Na 	 1 	PAPI 	GL2 	 6 	0 	
   7 	C4 	 1 	PAPI 	D1A 	 7 	0 	
   8 	C4 	 1 	PAPI 	D2A 	 8 	0 	
   9 	C4 	 1 	PAPI 	D3A 	 9 	0 	
  10 	C4 	 1 	PAPI 	D4A 	10 	0 	
  11 	C1 	 1 	PAPI 	C5A 	11 	0 	
  12 	C1 	 1 	PAPI 	C1B 	12 	0 	
  13 	C1 	 1 	PAPI 	C2B 	13 	0 	
  14 	C1 	 1 	PAPI 	C3B 	14 	0 	
  15 	C1 	 1 	PAPI 	C4B 	15 	0 	

[bonds]
;  i  j 	funct 	length 	force.c.
#ifdef FLEXIBLE
; Using bonds not constraints
   1  2 	1 	0.40 	30000 	
   1  3 	1 	0.40 	30000 	
   2  3 	1 	0.40 	30000 	
#endif
   1  4 	1 	0.35 	1250 	
   4  5 	1 	0.47 	1250 	
; Tail part (uses standar Martini v2.0 tail rules)
   5  6 	1 	0.37 	1250 	
   5  7 	1 	0.47 	1250 	
   7  8 	1 	0.47 	1250 	
   8  9 	1 	0.47 	1250 	
   9 10 	1 	0.47 	1250 	
  10 11 	1 	0.47 	1250 	
   6 12 	1 	0.47 	1250 	
  12 13 	1 	0.47 	1250 	
  13 14 	1 	0.47 	1250 	
  14 15 	1 	0.47 	1250 	

[angles]
;  i  j  k 	funct 	angle 	force.c.
   3  1  4 	2 	133.0 	100.0 	
   2  1  4 	2 	100.0 	70.0 	
; Orient Head
   1  4  5 	2 	140.0 	30.0 	; link to lipid
; 4    5    6         2 120.00 25.0 ; These are part of the default lipids rules but not used here
; 4    5    7         2 180.00 25.0 ; These are part of the default lipids rules but not used here
; Tail part (uses standar Martini v2.0 tail rules)
   5  7  8 	2 	100.0 	10.0 	
   7  8  9 	2 	100.0 	10.0 	
   8  9 10 	2 	100.0 	10.0 	
   9 10 11 	2 	120.0 	45.0 	
   6 12 13 	2 	180.0 	25.0 	
  12 13 14 	2 	180.0 	25.0 	
  13 14 15 	2 	180.0 	25.0 	

[dihedrals]
;  i  j  k  l 	funct 	angle 	force.c.
; 3  1  4  5  1  -30.0  5.0  1 ; Removed as it was unstable - WARNING has not been tested

[constraints]
;  i  j  k 	funct 	length
#ifndef FLEXIBLE
; Using constraints not bonds
   1  2 	1 	0.40 	
   1  3 	1 	0.40 	
   2  3 	1 	0.40 	
#endif


; Include Position restraint file
#ifdef POSRES
#include "PAPI_posre.itp"
#endif
