Experiments

inputs/bilayers/bilayer_protein_aamd_expts.py

{

'bilayer_protein_aamd_banana':{
#####
####
###
##
#
'metarun':[
{'step':'protein','do':'bilayer_protein_topology_only','settings':"""

#---PROTEIN START STRUCTURE
start structure: inputs/structure-repo/proteins/gel-prepped.pdb

step: protein                       # name of the folder is s01-protein
force field: charmm36               # which gromacs-standard force-field to use (see pdb2gmx list)
sources: ['@charmm/charmm36.ff']    # grab a local copy of charmm36.ff
water: tip3p                        # which water model (another question from pdb2gmx)

"""},
{'step':'protein','do':'bilayer_protein_adhesion_aamd','settings':"""

bilayer structure: inputs/structure-repo/bilayers-aamd/bilayer-pip2-20pct-top-ow-dopc-dops-4to1.gro

placement method: banana                 # several distinct methods to choose from (see other expts)
group up: resid 161                      # banana method: this group points up *after* laying the banana flat
group down: ['resid 150','resid 169']    # banana method: this group points down *after* laying the banana flat
group origin: ['resid 150','resid 169']  # reference/pivot point for the protein (set to origin)

"""},
]},

'bilayer_protein_aamd_banana_ion_change':{
#####
####
###
##
#
'metarun':[
{'step':'protein','do':'bilayer_protein_topology_only','settings':"""

#---PROTEIN START STRUCTURE
start structure: inputs/structure-repo/proteins/gel-prepped.pdb

step: protein                       # name of the folder is s01-protein
force field: charmm36               # which gromacs-standard force-field to use (see pdb2gmx list)
sources: ['@charmm/charmm36.ff']    # grab a local copy of charmm36.ff
water: tip3p                        # which water model (another question from pdb2gmx)

"""},
{'step':'protein','do':'bilayer_protein_adhesion_aamd','settings':"""

bilayer structure: inputs/structure-repo/bilayers-aamd/bilayer-pip2-20pct-top-ow-dopc-dops-4to1.gro

placement method: banana                 # several distinct methods to choose from (see other expts)
group up: resid 161                      # banana method: this group points up *after* laying the banana flat
group down: ['resid 150','resid 169']    # banana method: this group points down *after* laying the banana flat
group origin: ['resid 150','resid 169']  # reference/pivot point for the protein (set to origin)
cation: MG                               # we change the cation on the adhesion step

"""},
]},

'bilayer_protein_aamd_globular_ions_restraints':{
#####
####
###
##
#
'metarun':[
{'step':'protein','do':'bilayer_protein_topology_only','settings':"""

#---PROTEIN START STRUCTURE
start structure: inputs/structure-repo/proteins/nwasp-peptide.pdb

step: protein                       # name of the folder is s01-protein
force field: charmm36               # which gromacs-standard force-field to use (see pdb2gmx list)
sources: ['@charmm/charmm36.ff']    # grab a local copy of charmm36.ff
water: tip3p                        # which water model (another question from pdb2gmx)

"""},
{'step':'protein','do':'bilayer_protein_adhesion_aamd','settings':"""

bilayer structure: inputs/structure-repo/bilayers-aamd/bilayer-pip2-20pct-phys-drop.gro

placement method: globular_up_down       # several distinct methods to choose from (see other expts)
group up: all                            # globular_up_down method: this group points up
group down: ['resid 12-16']              # globular_up_down method: this group points down
group origin: ['resid 12-16']            # reference/pivot point for the protein (set to origin)
cation: MG                               # any bilayer_protein_adhesion_aamd step can use different ions

#---note we must set the equilibration flag otherwise it jumps to production
equilibration: npt-bilayer-short,npt-restrain-protein
#---note that we override mdp specs from the original
mdp specs:|{
    'group':'aamd',
    'mdps':{
         'input-em-steep-in.mdp':['minimize',{'potential':'verlet','emtol':10}],
         'input-md-npt-bilayer-short-eq-in.mdp':['npt-bilayer-protein-simple',
            {'restrain':'posre','nsteps':50000,'dt':0.0005}],
         'input-md-npt-restrain-protein-eq-in.mdp':['npt-bilayer-protein-simple',
            {'restrain':'posre','nsteps':50000,'dt':0.002}],
         'input-md-in.mdp':['npt-bilayer-protein'],
        },
    }

"""},
]},

'bilayer_protein_adhesion_aamd':{
#####
####
###
##
#
'script':'scripts/bilayer-protein.py',
'params':'parameters-aamd.py',
'tags':['aamd','bilayer','protein-bilayer'],
'extensions':[
    '@extras/*.py',
    '@extras/geometry_tools/*.py',
    'codes/*.py'],
'settings':"""

USAGE NOTES:|
	requires a pre-equilibrated, flat bilayer
    gets the protein details automatically from state.protein_prepared
    bilayer structure and force field are coded below, however you can override them in a metarun
    since you can override in a metarun, we have only one adhesion routine
	
step: adhere

#---STARTING STRUCTURES
bilayer structure: None

#---COPY DEPENDENCIES
files:              []
sources:            ['@charmm/charmm36.ff']

#---FORCE FIELD
force field: charmm36 # note non-standard force fields must be copied via "sources"
extra itps: 'lipid-tops/lipid*itp'
landscape metadata: @charmm/landscape.json # colloquial types for different molecules

#---PROTEIN POSITION INSTRUCTIONS
placement method: banana                 # several distinct methods to choose from (see other expts)
group up: resid 161                      # banana method: this group points up *after* laying the banana flat
group down: ['resid 150 or resid 169']   # banana method: this group points down *after* laying the banana flat
group origin: ['resid 150 or resid 169'] # reference/pivot point for the protein (set to origin)

#---PROTEIN LATTICE DEFINITIONS
protein_lattice:|{
	'nrows':1,'ncols':1,
	'lattice_type':'square',
	'space_scale':20,
	'total_proteins':1,
	'protein_shift_up':0.0,
	}

sol: SOL                       # !!! remove this to the landscape
ionic strength: 0.150          # box is reionized after adding protein to ensure neutral
protein water gap: 3           # distance in Angstroms between protein in water after addition
reionize method: ions          # select "ions" to replace only ions and "solvent" to replace water too
cation: NA                     # choose a new cation for adding back counterions
anion: CL                      # choose a new anion for adding back counterions

mdp specs:|{
    'group':'aamd',
    'mdps':{
         'input-em-steep-in.mdp':['minimize',{'potential':'verlet','emtol':10}],
         'input-md-npt-bilayer-eq-in.mdp':['npt-bilayer-protein-simple'],
         'input-md-in.mdp':['npt-bilayer-protein'],
        },
    }

"""},

}

inputs/bilayers/bilayer_aamd_expts.py

{

'bilayer_control_aamd_test_small':{
#####
####
###
##
#
'script':'scripts/bilayer.py',
'params':'parameters-aamd.py',
'tags':['aamd','bilayer','free'],
'extensions':[
    '@extras/*.py',
    '@extras/geometry_tools/*.py',
    'codes/*.py'],
'settings':"""

USAGE NOTES:|
	you MUST run `make go bilayer_control_aamd_restrain clean` first to generate restraints
	use this procedure to make a "free" bilayer
	this method packs lipids in vacuum with restraints
	requires restrains generated via a run named "generate_lipidome_restraints"
	this small test was the first test after porting the cgmd method into "new automacs"
	this method is largely deprecated by the bilayer-careful script used by bilayer_control_aamd_test

step:               bilayer

#---SHAPE AND COMPOSITION
shape:              flat            # initial mesh shape flat
aspect:             1.0             # XY proportion for flat bilayers
binsize:            1.2             # grid spacing for initial lipid configuration
monolayer offset:   1.5             # initial distance between leaflets 
monolayer top:      36              # number of lipids in the top leaflet
monolayer bottom:   37              # number of lipids in the bottom leaflet (none for symmetric)

lipid structures:   @structure-repo/bilayers-aamd/lipid-structures # folder for lipid structures
landscape metadata: @charmm/landscape.json                         # colloquial types for different molecules
	
#---COMPOSITIONS (propotional -- no need to sum to unity)
composition top:    {'DOPC':1,'DOPS':1,'PI2P':1,'CHL1':1}
composition bottom: {'POPC':3,'CHL1':1}

#---SOLVATION
cation:             NA              # residue name for the cation (must be found in the ff)
anion:              CL              # residue name for the anion (must be found in the ff)
ionic strength:     0.150           # molar ionic strength
sol:                SOL             # residue name for water
atom resolution:    cgmd            # either cgmd or aamd
water buffer:       8               # water-other gap distance in Angstroms (avoid waters in bilayer!)
solvent:            spc216          # water box (must be copied via files)
thickness:          10              # thickness of the box at the solvate step
                                    # ...be careful with this. you can get widely varying levels of water

#---COPY DEPENDENCIES
files:              []
sources:            ['@charmm/charmm36.ff','@charmm/auto_ff/charmm36_upright.ff']

#---FORCE FIELD
force field:           charmm36            # specify the name of the force field (minus ".ff" suffix)
                                           # note non-standard force fields must be copied via "sources"
force field upright:   charmm36_upright    # force field with "upright" vacuum pack restraints

#---EQUILIBRATION
equilibration: npt-bilayer-short,npt-bilayer
mdp specs:|{
	'group':'aamd',
	'mdps':{
		'input-em-steep-in.mdp':['minimize',{'potential':'verlet','emtol':10}],
		'input-md-vacuum-pack1-eq-in.mdp':[
			'vacuum-packing',{'nsteps':10000,'dt':0.001}],
		'input-md-vacuum-pack2-eq-in.mdp':['vacuum-packing',{'ref_p':'500.0 1.0'}],
		'input-md-vacuum-pack3-eq-in.mdp':['vacuum-packing'],
		'input-md-npt-bilayer-eq-in.mdp':['npt-bilayer-simple',],
		'input-md-npt-bilayer-short-eq-in.mdp':['npt-bilayer',{'dt':0.0002,'nsteps':10000}],
		'input-md-in.mdp':['npt-bilayer'],
		},
	}

"""},

'bilayer_control_aamd_test':{
#####
####
###
##
#
'script':'scripts/bilayer-careful.py',
'params':'parameters-aamd.py',
'tags':['aamd','bilayer','free'],
'extensions':[
    '@extras/*.py',
    '@extras/geometry_tools/*.py',
    'codes/*.py'],
'settings':"""

USAGE NOTES:|
	you MUST run `make go bilayer_control_aamd_restrain clean` first to generate restraints
	use this procedure to make a "free" bilayer
	this method packs lipids in vacuum with restraints
	requires restrains generated via a run named "generate_lipidome_restraints"
	developed bilayer-careful.py here and added posre-com-only to everything (will be ignored if no posre)

step:               bilayer

#---SHAPE AND COMPOSITION
shape:              flat            # initial mesh shape flat
aspect:             1.0             # XY proportion for flat bilayers
binsize:            1.2             # grid spacing for initial lipid configuration
monolayer offset:   1.5             # initial distance between leaflets 
monolayer top:      125             # number of lipids in the top leaflet
monolayer bottom:   129             # number of lipids in the bottom leaflet (none for symmetric)

lipid structures:   @structure-repo/bilayers-aamd/lipid-structures # folder for lipid structures
landscape metadata: @charmm/landscape.json                         # colloquial types for different molecules

#---COMPOSITIONS (propotional -- no need to sum to unity)
composition top:    {'DOPE':50.0,'DOPS':25.0,'PI2P':25.0,'CHL1':25.0}
composition bottom: {'POPC':104.0,'CHL1':25.0}
ste
#---SOLVATION
cation:             NA              # residue name for the cation (must be found in the ff)
anion:              CL              # residue name for the anion (must be found in the ff)
ionic strength:     0.150           # molar ionic strength
sol:                SOL             # residue name for water
atom resolution:    cgmd            # either cgmd or aamd
water buffer:       8               # water-other gap distance in Angstroms (avoid waters in bilayer!)
solvent:            spc216          # water box (must be copied via files)
thickness:          16              # thickness of the box at the solvate step
                                    # ...be careful with this. you can get widely varying levels of water

#---COPY DEPENDENCIES
files:              []
sources:|           ['@charmm/charmm36.ff','@charmm/auto_ff/charmm36_upright.ff',
	'@charmm/auto_ff/charmm36_restrain.ff']

#---FORCE FIELD (note non-standard force fields must be copied via "sources")
force field:           charmm36            # specify the name of the force field (minus ".ff" suffix)
force field upright:   charmm36_upright    # force field with "upright" vacuum pack restraints
force field restrain:  charmm36_restrain   # force field with all lipid atoms restrained for water relax

#---EQUILIBRATION
equilibrate_restrain: ['bilayer-s1-restr','bilayer-s2-restr']
equilibrate_free: ['bilayer-s3-free','bilayer-s4-free','bilayer-s5-free','bilayer']
equilibrate_restrain_final: "md-bilayer-s2-restr"
mdp specs:|{
	'group':'aamd',
	'mdps':{
		'input-em-steep-in.mdp':['minimize',{'potential':'verlet','emtol':10}],
		'input-md-vacuum-pack1-eq-in.mdp':[
			'vacuum-packing',{'nsteps':10000,'dt':0.001}],
		'input-md-vacuum-pack2-eq-in.mdp':['vacuum-packing',{'ref_p':'500.0 1.0'}],
		'input-md-vacuum-pack3-eq-in.mdp':['vacuum-packing'],
		'input-md-bilayer-s1-restr-eq-in.mdp':['npt-bilayer-simple',
			{'dt':0.0001,'nsteps':50000,'compressibility':'0.0 4.5e-5',
				'restrain':'posre-com-only','tau_p':0.1}],
		'input-md-bilayer-s2-restr-eq-in.mdp':['npt-bilayer-simple',
			{'dt':0.0002,'nsteps':50000,'compressibility':'0.0 4.5e-5',
				'restrain':'posre-com-only','tau_p':0.5}],
		'input-md-bilayer-s3-free-eq-in.mdp':['npt-bilayer-simple',
			{'dt':0.0002,'nsteps':50000,'compressibility':'0.0 4.5e-5',
				'restrain':'posre-com-only','tau_p':0.5}],
		'input-md-bilayer-s4-free-eq-in.mdp':['npt-bilayer-simple',
			{'dt':0.001,'nsteps':50000,'compressibility':'0.0 4.5e-5',
				'restrain':'posre-com-only','tau_p':0.5}],
		'input-md-bilayer-s5-free-eq-in.mdp':['npt-bilayer-simple',
			{'dt':0.002,'nsteps':50000,'restrain':'posre-com-only','tau_p':0.5}],
		'input-md-bilayer-eq-in.mdp':['npt-bilayer',
			{'dt':0.002,'nsteps':100000,'restrain':'posre-com-only'}],
		'input-md-in.mdp':['npt-bilayer',{'restrain':'posre-com-only','nsteps':500000}],},}
"""},

'bilayer_control_aamd_restrain':{
#####
####
###
##
#
'tags':['cgmd','lipidome'],
'params':'@bilayers/parameters.py',
'extensions':[
	'@extras/geometry_tools/*.py'],
'quick':"""

from amx import *
init()
#---note that restraint_maker is in amx/topology_tools.py loaded with amx
restraint_maker()

""",
'settings':"""

USAGE NOTES:|
	this method is designed to pre-make any lipid restraints you might want
	its product can be used by 
		(1) the bilayer maker's vacuum packing
		(2) the flat bilayer maker's leaflet-specific restraints
	the "wants" dictionary specifies the outputs and describes their restraints
	the deposit site holds the automatically generated force fields
	this method completely avoids using the "define posre" flags in GROMACS
	all restraints are explicit, but this means you should avoid "define posre" which will restrain water
	note that this experiment was copied nearly verbatim from the lipidome_expts.py
	the quick script restraint function has been generalized 
		and moved from the martini bundle to topology_tools.py

force field: charmm                      # we always include the force field for the Landscape class
base force field: @charmm/charmm36.ff    # source force field to modify
deposit site: @charmm/auto_ff            # where to write new force fields (keys in wants)

#---specify transformed force field copies
wants:|{
	'charmm36_upright.ff':[
		{'restraints':{'charmm_glycerol':{'z':1000},'charmm_tails':{'z':1000}},
		'naming':'same','which':'lipids'},
		{'restraints':{'sterol_out':{'z':1000},'sterol_in':{'z':1000}},
		'naming':'same','which':'sterols'},],
	'charmm36_restrain.ff':[
		{'restraints':{'charmm_glycerol':{'x':500,'y':500,'z':500},'charmm_tails':{'x':500,'y':500,'z':500}},
			'naming':'same','which':'lipids'},
		{'restraints':{'sterol_out':{'x':500,'y':500,'z':500},'sterol_in':{'x':500,'y':500,'z':500}},
			'naming':'same','which':'sterols'},]}
"""},


}

inputs/bilayers/testset_v0_expts.py

{

'test-h0':{
#####
####
###
##
#
'metarun':[
{'step':'bilayer','do':'bilayer_control','settings':"""
step: bilayer
monolayer top: 90
composition top: {'DOPC':0.64,'DOPS':0.16,'POP2':0.2}
composition bottom: {'POPC':1.0}
"""},
{'step':'protein','do':'martinize','settings':"""
start structure: inputs/helix0.pdb
"""},
{'step':'adhere','do':'bilayer_protein_adhesion','settings':"""
force field: martini-sources
sources: ['@martini/martini-sources.ff']
placement method: banana
group up: resid 19
group down: resid 7
group origin: resid 7
bilayer structure: s01-bilayer/md.part0001.gro
protein_lattice:|{
	'nrows':1,'ncols':1,
	'lattice_type':'square',
	'space_scale':20,
	'total_proteins':1,
	'protein_shift_up':1.0,
	}
"""}]},

'test_helix0_flat':{
#####
####
###
##
#
'metarun':[
{'step':'bilayer','do':'bilayer_control_flat','settings':"""
step: bilayer
monolayer top: 90
composition top: {'DOPC':0.64,'DOPS':0.16,'POP2':0.2}
composition bottom: {'POPC':1.0}
"""},
{'step':'protein','do':'martinize','settings':"""
start structure: inputs/helix0.pdb
"""},
{'step':'adhere','do':'bilayer_protein_adhesion','settings':"""
placement method: banana
group up: resid 19
group down: resid 7
group origin: resid 7
bilayer structure: s01-bilayer/md.part0001.gro
protein_lattice:|{
	'nrows':1,'ncols':1,
	'lattice_type':'square',
	'space_scale':20,
	'total_proteins':1,
	'protein_shift_up':1.0,
	}
"""}]},

}

inputs/bilayers/testset_v1_expts.py

{

'banana_v1':{
#####
####
###
##
#
'metarun':[
{'step':'protein','do':'martinize','settings':"""
USAGE NOTES:|
    the quintessential banana simulation
    !!! needs:
        starting bilayer v813
        incorporation into a test set that makes the starting bilayer
        switch to multimeric protein class
        ...
start structure: @structure-repo/proteins/IRSp53_modeller_updated.pdb
martinize path: @martini/bin/martinize.py
dssp path: @martini/bin/dssp-2.0.4-linux-amd64
step: protein
martinize flags: -ed
martinize ff: martini22
"""},
{'step':'adhere','do':'bilayer_protein_adhesion','settings':"""
force field: martini_upright_alt
sources: ['@martini/auto_ff/martini_upright_alt.ff']
placement method: banana
group up: ['resid 470']
group down: ['resid 110','resid 280']
group origin: ['resid 110','resid 280']
bilayer structure: @structure-repo/bilayers-cgmd/v813.gro
protein water gap: 3
protein_lattice:|{'banana_direction':'x','nrows':1,'ncols':1,'lattice_type':'square',
    'space_scale':20,'total_proteins':1,'protein_shift_up':3.5}
equilibration: short
mdp specs:|{
    'group':'cgmd',
    'mdps':{
        'input-em-steep-in.mdp':['minimize'],
        'input-md-short-eq-in.mdp':[{'restrain':'posre-com-only','pressure':'npt-semiisotropic-weak',
            'nsteps':10000,'groups':'protein','temperature':'protein','dt':0.005}],
        'input-md-in.mdp':[{'restrain':'posre-com-only',
            'nsteps':50000,'groups':'protein','temperature':'protein'}],
        },
    }
two protein hack: True
"""}]}

}

inputs/bilayers/bilayer_cgmd_expts.py

{

'bilayer_control_multiply':{
#####
####
###
##
#
'metarun':[
{'step':'bilayer','do':'bilayer_control'},
{'step':'large','do':'multiply','settings':"""
step: large
requires: multiply
equilibration: npt-bilayer-short,npt-bilayer
minimize: True
proceed: True
genconf gap: 0.3
nx: 2
ny: 2
"""}]},

'bilayer_control_flat_multiply':{
#####
####
###
##
#
'metarun':[
{'step':'bilayer','do':'bilayer_control_flat'},
{'step':'large','do':'multiply','settings':"""
step: large
requires: multiply
equilibration: npt-bilayer-short,npt-bilayer
minimize: True
proceed: True
genconf gap: 0.3
nx: 2
ny: 2
"""}]},

'bilayer_control_cgmd':{
#####
####
###
##
#
'script':'scripts/bilayer.py',
'params':'parameters.py',
'tags':['cgmd','bilayer','free'],
'extensions':[
    '@extras/*.py',
    '@extras/geometry_tools/*.py',
    'codes/*.py'],
'settings':"""

USAGE NOTES:|
    use this procedure to make a "free" bilayer
    this method packs lipids in vacuum with restraints
    requires restrains generated via a run named "generate_lipidome_restraints"

step:               bilayer

#---SHAPE AND COMPOSITION
shape:              flat            # initial mesh shape flat
aspect:             1.0             # XY proportion for flat bilayers
binsize:            1.2             # grid spacing for initial lipid configuration
monolayer offset:   1.5             # initial distance between leaflets 
monolayer top:      90              # number of lipids in the top leaflet
monolayer bottom:   None            # number of lipids in the bottom leaflet (none for symmetric)

lipid structures:   inputs/martini/library-lipidome-structs  # folder for lipid structures and yaml metadata
landscape metadata: inputs/martini/auto_ff/landscape.json    # colloquial types for different molecules

#---COMPOSITIONS (propotional -- no need to sum to unity)
composition top:    {'DOPC':0.64,'DOPS':0.16,'POP2':0.2}
composition bottom: {'POPC':1.0}

#---SOLVATION
cation:             NA+             # residue name for the cation (must be found in the ff)
anion:              CL-             # residue name for the anion (must be found in the ff)
ionic strength:     0.150           # molar ionic strength
sol:                W               # residue name for water
atom resolution:    cgmd            # either cgmd or aamd
water buffer:       8               # water-other gap distance in Angstroms (avoid waters in bilayer!)
solvent:            martini-water   # water box (must be copied via files)
thickness:          14              # thickness of the box at the solvate step

#---COPY DEPENDENCIES
files:              ['inputs/martini/library-general-structs/martini-water.gro']
sources:            ['inputs/martini/martini-sources.ff','inputs/martini/auto_ff/martini_upright.ff']

#---FORCE FIELD
force field:           martini-sources     # specify the name of the force field (minus ".ff" suffix)
                                           # note non-standard force fields must be copied via "sources"
force field upright:   martini_upright     # force field with "upright" vacuum pack restraints

#---EQUILIBRATION
equilibration:      npt-bilayer
mdp specs:|{
    'group':'cgmd',
    'mdps':{
        'input-em-steep-in.mdp':['minimize'],
        'input-md-vacuum-pack1-eq-in.mdp':['vacuum-packing',{'ref_p':'500 1','nsteps':100000}],
        'input-md-vacuum-pack2-eq-in.mdp':['vacuum-packing',{'nsteps':100000}],
        'input-md-npt-bilayer-short-eq-in.mdp':['npt-bilayer',
            {'pressure':'npt-semiisotropic-weak','dt':0.001,'nsteps':200000}],
        'input-md-npt-bilayer-eq-in.mdp':['npt-bilayer',
            {'restrain':'posre-com-only','pressure':'npt-semiisotropic-weak','dt':0.01}],
        'input-md-in.mdp':[{'pressure':'npt-semiisotropic-weak'}],
        },
    }

"""},

'bilayer_control_flat':{
#####
####
###
##
#
'script':'scripts/bilayer-flat.py',
'params':'parameters.py',
'tags':['cgmd','bilayer','free','flat'],
'extensions':[
    '@extras/*.py',
    '@extras/geometry_tools/*.py',
    'codes/*.py'],
'settings':"""

USAGE NOTES:|
    use this procedure to make a "free" bilayer
    this method packs lipids in vacuum with restraints
    requires restrains generated via a run named "generate_lipidome_restraints"
    run the full test with multiply via: 
        make quick clear_lipidome_restraints && make prep generate_lipidome_restraints && make run && \
        make clean sure && make prep bilayer_control_flat_multiply && make metarun

step:               bilayer

#---SHAPE AND COMPOSITION
shape:              flat            # initial mesh shape flat
aspect:             1.0             # XY proportion for flat bilayers
binsize:            1.2             # grid spacing for initial lipid configuration
monolayer offset:   1.5             # initial distance between leaflets 
monolayer top:      90              # number of lipids in the top leaflet
monolayer bottom:   None            # number of lipids in the bottom leaflet (none for symmetric)

lipid structures:   inputs/martini/library-lipidome-structs/  # folder for lipid structures and yaml metadata
landscape metadata: inputs/martini/auto_ff/landscape.json     # colloquial types for different molecules

#---COMPOSITIONS (propotional -- no need to sum to unity)
composition top:    {'DOPC':0.64,'DOPS':0.16,'POP2':0.2}
composition bottom: {'POPC':1.0,'DPPC':0.5}

#---SOLVATION
cation:             NA+             # residue name for the cation (must be found in the ff)
anion:              CL-             # residue name for the anion (must be found in the ff)
ionic strength:     0.150           # molar ionic strength
sol:                W               # residue name for water
atom resolution:    cgmd            # either cgmd or aamd
water buffer:       8               # water-other gap distance in Angstroms (avoid waters in bilayer!)
solvent:            martini-water   # water box (must be copied via files)
thickness:          14              # thickness of the box at the solvate step

#---COPY DEPENDENCIES
files:    ['inputs/martini/library-general-structs/martini-water.gro']
sources:| [
    'inputs/martini/martini-sources.ff',
    'inputs/martini/auto_ff/martini_upright.ff',
    'inputs/martini/auto_ff/martini_upright_alt.ff']

#---FORCE FIELD
force field:           martini-sources      # specify the name of the force field (minus ".ff" suffix)
                                            # note non-standard force fields must be copied via "sources"
force field upright:   martini_upright      # force field with "upright" vacuum pack restraints
force field flat:      martini_upright_alt  # force field with alternate lipids for remaining flat

#---EQUILIBRATION
equilibration:      npt-bilayer
mdp specs:|{
    'group':'cgmd',
    'mdps':{
        'input-em-steep-in.mdp':['minimize'],
        'input-md-vacuum-pack1-eq-in.mdp':['vacuum-packing',{'ref_p':'500 1','nsteps':100000}],
        'input-md-vacuum-pack2-eq-in.mdp':['vacuum-packing',{'nsteps':100000}],
        'input-md-npt-bilayer-short-eq-in.mdp':['npt-bilayer',
            {'pressure':'npt-semiisotropic-weak','dt':0.001,'nsteps':200000}],
        'input-md-npt-bilayer-eq-in.mdp':['npt-bilayer',
            {'restrain':'posre-com-only','pressure':'npt-semiisotropic-weak','dt':0.01}],
        'input-md-in.mdp':[{'restrain':'posre-com-only','pressure':'npt-semiisotropic-weak',
            'nsteps':500000}],
        },
    }

"""},

'bilayer_release_new_mdp':{
#####
####
###
##
#
'script':'scripts/bilayer-release.py',
'params':'parameters.py',
'tags':['cgmd','bilayer'],
'extensions':[
    '@extras/*.py',
    '@extras/geometry_tools/*.py',
    'codes/*.py'],
'settings':"""

step: release
force field: martini-sources
sources: ['@martini/martini-sources.ff']
bilayer structure: @structure-repo/bilayers-cgmd/stock-bilayer-v00.gro

#---EQUILIBRATION
equilibration: npt-bilayer-short,npt-bilayer
mdp specs:|{
    'group':'cgmd',
    'mdps':{
        'input-md-npt-bilayer-short-eq-in.mdp':['npt-bilayer',
            {'pressure':'npt-semiisotropic-weak','dt':0.001,'nsteps':10000}],
        'input-md-npt-bilayer-eq-in.mdp':['npt-bilayer',
            {'restrain':'posre-com-only','pressure':'npt-semiisotropic-weak','dt':0.01,'nsteps':10000}],
        'input-md-in.mdp':[{'restrain':'posre-com-only','pressure':'npt-semiisotropic-weak',
            'nsteps':100000}],
        },
    }
    
"""},

'bilayer_release':{
#####
####
###
##
#
'script':'scripts/bilayer-release.py',
'params':'parameters.py',
'tags':['cgmd','bilayer'],
'extensions':[
    '@extras/*.py',
    '@extras/geometry_tools/*.py',
    'codes/*.py'],
'settings':"""
step: release
"""},

}

inputs/bilayers/bilayer_protein_cgmd_expts.py

{

'bilayer_protein_adhesion':{
#####
####
###
##
#
'script':'scripts/bilayer-protein.py',
'params':'parameters.py',
'tags':['cgmd','bilayer','protein-bilayer'],
'extensions':[
    '@extras/*.py',
    '@extras/geometry_tools/*.py',
    'codes/*.py'],
'settings':"""

USAGE NOTES:|
	requires a pre-equilibrated, flat bilayer
    gets the protein details automatically from state.protein_prepared
    bilayer structure and force field are coded below, however you can override them in a metarun
    since you can override in a metarun, we have only one adhesion routine

step: adhere

bilayer structure: inputs/previous/bilayer.gro # starting bilayer structure

landscape metadata: @martini/auto_ff/landscape.json # colloquial types for different molecules

#---COPY DEPENDENCIES
files:              []
sources:            ['@martini/auto_ff/martini_upright_alt.ff']

#---FORCE FIELD
force field:  martini_upright_alt # specify the name of the force field (minus ".ff" suffix)
                                  # note non-standard force fields must be copied via "sources"

#---PROTEIN POSITION INSTRUCTIONS
placement method: banana                # several distinct methods to choose from (see other expts)
group up: resid 258                     # banana method: this group points up *after* laying the banana flat
group down: ['resid 240','resid 652']   # banana method: this group points down *after* laying the banana flat
group origin: ['resid 240','resid 652'] # reference/pivot point for the protein (set to origin)

#---PROTEIN LATTICE DEFINITIONS
protein_lattice:|{
	'nrows':1,'ncols':1,
	'lattice_type':'square',
	'space_scale':20,
	'total_proteins':1,
	'protein_shift_up':3.0,
	}

sol: W                         # !!! remove this to the landscape
ionic strength: 0.150          # box is reionized after adding protein to ensure neutral
protein water gap: 3           # distance in Angstroms between protein in water after addition
reionize method: ions          # select "ions" to replace only ions and "solvent" to replace water too
cation: NA+                    # choose a new cation for adding back counterions
anion: CL-                     # choose a new anion for adding back counterions

mdp specs:|{
    'group':'cgmd',
    'mdps':{
        'input-em-steep-in.mdp':['minimize'],
        'input-md-in.mdp':[{'restrain':'posre-com-only','pressure':'npt-semiisotropic-weak',
            'nsteps':500000,'groups':'protein','temperature':'protein'}],
        },
    }

"""},

}