Scripts

inputs/extras/test_fast_expts.py

{

'table':{
#####
####
###
##
#
'quick':"""
import amx,shutil
shutil.copyfile(amx.settings.ready,amx.settings.store)
""",
},

'ultra':{
#####
####
###
##
#
'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}
"""},
{'quick':'table','settings':"""
ready: s01-bilayer/md.part0001.gro
store: inputs/bilayer-cgmd-small.gro
"""},
{'step':'protein','do':'martinize','settings':"""
start structure: inputs/helix0.pdb
"""},
{'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 19
group down: resid 7
group origin: resid 7
bilayer structure: inputs/bilayer-cgmd-small-flat.gro
protein_lattice:|{
	'nrows':1,'ncols':1,
	'lattice_type':'square',
	'space_scale':20,
	'total_proteins':1,
	'protein_shift_up':1.0,
	}
"""},
]},

'bilayer288':{
#####
####
###
##
#
'metarun':[
{'step':'bilayer','do':'bilayer_control','settings':"""
step: bilayer
monolayer top: 144
composition top: {'DOPC':0.64,'DOPS':0.16,'POP2':0.2}
composition bottom: {'POPC':1.0}
thickness: 18
"""},
{'quick':'table','settings':"""
ready: s01-bilayer/md.part0001.gro
store: inputs/structure-repo/bilayers-cgmd/bilayer-cgmd-288.gro
"""},
]},

'enth-martini-demo':{
#####
####
###
##
#
'metarun':[
{'step':'protein','do':'martinize','settings':"""
start structure: inputs/structure-repo/proteins/1H0A-prepped.pdb
"""},
{'step':'adhere','do':'bilayer_protein_adhesion','settings':"""
force field: martini_upright_alt
sources: ['@martini/auto_ff/martini_upright_alt.ff']
placement method: globular_up_down
group up: all
group down: ['resid 1-22','resid 68-72']
group origin: ['resid 1-22','resid 68-72']
bilayer structure: inputs/structure-repo/bilayers-cgmd/bilayer-cgmd-288.gro
protein_lattice:|{
	'nrows':1,'ncols':1,
	'lattice_type':'square',
	'space_scale':20,
	'total_proteins':1,
	'protein_shift_up':1.0,
	}
"""},
]},

'ultra2':{
#####
####
###
##
#
'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}
"""},
{'quick':'table','settings':"""
ready: s01-bilayer/md.part0001.gro
store: inputs/bilayer-cgmd-small.gro
"""},
{'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}
"""},
{'quick':'table','settings':"""
ready: s01-bilayer/md.part0001.gro
store: inputs/bilayer-cgmd-small-flat.gro
"""},
{'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: inputs/bilayer-cgmd-small.gro
protein_lattice:|{
	'nrows':1,'ncols':1,
	'lattice_type':'square',
	'space_scale':20,
	'total_proteins':1,
	'protein_shift_up':1.0,
	}
"""},
{'step':'protein','do':'martinize','settings':"""
start structure: inputs/helix0.pdb
"""},
{'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 19
group down: resid 7
group origin: resid 7
bilayer structure: inputs/bilayer-cgmd-small-flat.gro
protein_lattice:|{
	'nrows':1,'ncols':1,
	'lattice_type':'square',
	'space_scale':20,
	'total_proteins':1,
	'protein_shift_up':1.0,
	}
"""},
]},

}

inputs/extras/scripts/coiled_coil_only.py

#!/usr/bin/env python

"""
STRUCTURE EXPLORER
make cool new structures?
"""

from amx import *
init()
make_step(settings.step)
write_mdp()
make_coiled_coil(gro='structure-crude')
minimize('vacuum')
prepped_files = {'gro':state.here+'vacuum-minimized.gro'}
state.protein_prepared = prepped_files

inputs/extras/scripts/multiply.py

#!/usr/bin/env python

"""
MULTIPLY (a bilayer) to make it larger.
"""

from amx import *

init()
make_step(settings.step)
write_continue_script()
get_last_sources()
get_last_frame()
get_last_mdps()
#---adding mdp_specs to settings will overwrite them
if state.mdp_specs: write_mdp(param_file=state.mdp_parameters)
multiply(nx=state.nx,ny=state.ny)
write_top('system.top')
bilayer_sorter(structure='system',ndx='system-groups')
if state.q('minimize',False): minimize('system')
else: copy_file('system.gro','system-minimized.gro')
#---the multiply procedure can benefit from a sequence of topology changes
if state.equilibrate_tops:
	#---using a sequence of mdp/ff changes overrides the settings.equilibration
	for rnum,(mdp,top) in enumerate(state.equilibrate_tops):
		state.force_field = top
		write_topology('system.top')
		restart_clean(part=rnum+1,mdp='input-md-%s-eq-in'%mdp if mdp else 'input-md-in',
			structure='system-minimized' if rnum==0 else 'md.part%04d'%rnum,
			groups='system-groups')
#---equilibration requires a sequence of MDP files from the previous step
else: equilibrate(structure='system-minimized',groups='system-groups')

#---! iterative development restart with::: rm -rf s02-large state.json && cp state_1.json state.json && make prep exo70_control_pc_ps && cp expt_2.json expt.json && python -B script_2.py

inputs/extras/scripts/coiled_coil_linker_dev.py

#!/usr/bin/env python

"""
STRUCTURE EXPLORER
make cool new structures?
"""

from amx import *
init()
make_step(settings.step)
write_mdp()
make_coiled_coil(gro='structure-crude')
minimize('vacuum')
solvate('vacuum-minimized',gro='solvate',edges=state.water_edges,center=True)
write_top('solvate.top')
minimize('solvate')
counterions(structure='solvate',gro='counterions')
counterion_renamer('counterions')
minimize('counterions')
copy_file('counterions-minimized.gro','system.gro')
write_top('system.top')
grouper(protein=True,lipids=False)
equilibrate(groups='system-groups.ndx')