src/setup.py
def check_sim_param(input_list, param=False):
	"""
	check_sim_param(input_list, param=False)

	Checks input_list to overwrite simulation parameters in param dictionary 
	"""

	if not param: param = get_param_defaults()

	if ('-ndim' in input_list): param['n_dim'] = int(input_list[input_list.index('-ndim') + 1])
	if ('-dt' in input_list): param['dt'] = float(input_list[input_list.index('-dt') + 1])
	if ('-mass' in input_list): param['mass'] = float(input_list[input_list.index('-mass') + 1])
	if ('-vdw_sigma' in input_list): param['vdw_sigma'] = float(input_list[input_list.index('-vdw_sigma') + 1])
	if ('-bond_r0' in input_list): param['bond_r0'] = float(input_list[input_list.index('-bond_r0') + 1])
	#param['bond_r1'] = 1.5 * param['bond_r0']
	if ('-vdw_epsilon' in input_list): param['vdw_epsilon'] = float(input_list[input_list.index('-vdw_epsilon') + 1])
	if ('-bond_k0' in input_list): param['bond_k0'] = float(input_list[input_list.index('-bond_k0') + 1])
	#if ('-bond_k1' in input_list): param['bond_k1'] = float(input_list[input_list.index('-bond_k1') + 1])
	#if param['bond_k1'] < param['bond_k0']: param['bond_k1'] = param['bond_k0']
	if ('-angle_k0' in input_list): param['angle_k0'] = float(input_list[input_list.index('-angle_k0') + 1])
	if ('-rc' in input_list): param['rc'] = float(input_list[input_list.index('-rc') + 1])
	else: param['rc'] = param['vdw_sigma'] * 3.0
	if ('-kBT' in input_list): param['kBT'] = float(input_list[input_list.index('-kBT') + 1])
	if ('-gamma' in input_list): param['gamma'] = float(input_list[input_list.index('-gamma') + 1])
	param['sigma'] = np.sqrt(param['gamma'] * (2 - param['gamma']) * (param['kBT'] / param['mass']))
	if ('-nfibx' in input_list): param['n_fibril_x'] = int(input_list[input_list.index('-nfibx') + 1])
	if ('-nfiby' in input_list): param['n_fibril_y'] = int(input_list[input_list.index('-nfiby') + 1])
	if ('-nfibz' in input_list): param['n_fibril_z'] = int(input_list[input_list.index('-nfibz') + 1])
	param['n_fibril'] = param['n_fibril_x'] * param['n_fibril_y']
	if param['n_dim'] == 3: param['n_fibril'] *= param['n_fibril_z']
	if ('-lfib' in input_list): param['l_fibril'] = int(input_list[input_list.index('-lfib') + 1])
	param['n_bead'] = param['n_fibril'] * param['l_fibril']
	if ('-density' in input_list): param['density'] = float(input_list[input_list.index('-density') + 1])

	return param

	check_sim_param(input_list, param=False)

	Checks input_list to overwrite simulation parameters in param dictionary 
	
check_sim_param(input_list, param=False)
Checks input_list to overwrite simulation parameters in param dictionary
check_sim_param ( input_list param = False ) Checks input_list to overwrite simulation parameters in param dictionary
def check_sim_param(input_list, param=False):
	if not param: param = get_param_defaults()
	if ('-ndim' in input_list): param['n_dim'] = int(input_list[input_list.index('-ndim') + 1])
	if ('-dt' in input_list): param['dt'] = float(input_list[input_list.index('-dt') + 1])
	if ('-mass' in input_list): param['mass'] = float(input_list[input_list.index('-mass') + 1])
	if ('-vdw_sigma' in input_list): param['vdw_sigma'] = float(input_list[input_list.index('-vdw_sigma') + 1])
	if ('-bond_r0' in input_list): param['bond_r0'] = float(input_list[input_list.index('-bond_r0') + 1])
	if ('-vdw_epsilon' in input_list): param['vdw_epsilon'] = float(input_list[input_list.index('-vdw_epsilon') + 1])
	if ('-bond_k0' in input_list): param['bond_k0'] = float(input_list[input_list.index('-bond_k0') + 1])
	if ('-angle_k0' in input_list): param['angle_k0'] = float(input_list[input_list.index('-angle_k0') + 1])
	if ('-rc' in input_list): param['rc'] = float(input_list[input_list.index('-rc') + 1])
	else: param['rc'] = param['vdw_sigma'] * 3.0
	if ('-kBT' in input_list): param['kBT'] = float(input_list[input_list.index('-kBT') + 1])
	if ('-gamma' in input_list): param['gamma'] = float(input_list[input_list.index('-gamma') + 1])
	param['sigma'] = np.sqrt(param['gamma'] * (2 - param['gamma']) * (param['kBT'] / param['mass']))
	if ('-nfibx' in input_list): param['n_fibril_x'] = int(input_list[input_list.index('-nfibx') + 1])
	if ('-nfiby' in input_list): param['n_fibril_y'] = int(input_list[input_list.index('-nfiby') + 1])
	if ('-nfibz' in input_list): param['n_fibril_z'] = int(input_list[input_list.index('-nfibz') + 1])
	param['n_fibril'] = param['n_fibril_x'] * param['n_fibril_y']
	if param['n_dim'] == 3: param['n_fibril'] *= param['n_fibril_z']
	if ('-lfib' in input_list): param['l_fibril'] = int(input_list[input_list.index('-lfib') + 1])
	param['n_bead'] = param['n_fibril'] * param['l_fibril']
	if ('-density' in input_list): param['density'] = float(input_list[input_list.index('-density') + 1])
	return param
def check_sim_param ( input_list , param = False ) : if not param : param = get_param_defaults ( ) if ( '-ndim' in input_list ) : param [ 'n_dim' ] = int ( input_list [ input_list . index ( '-ndim' ) + 1 ] ) if ( '-dt' in input_list ) : param [ 'dt' ] = float ( input_list [ input_list . index ( '-dt' ) + 1 ] ) if ( '-mass' in input_list ) : param [ 'mass' ] = float ( input_list [ input_list . index ( '-mass' ) + 1 ] ) if ( '-vdw_sigma' in input_list ) : param [ 'vdw_sigma' ] = float ( input_list [ input_list . index ( '-vdw_sigma' ) + 1 ] ) if ( '-bond_r0' in input_list ) : param [ 'bond_r0' ] = float ( input_list [ input_list . index ( '-bond_r0' ) + 1 ] ) if ( '-vdw_epsilon' in input_list ) : param [ 'vdw_epsilon' ] = float ( input_list [ input_list . index ( '-vdw_epsilon' ) + 1 ] ) if ( '-bond_k0' in input_list ) : param [ 'bond_k0' ] = float ( input_list [ input_list . index ( '-bond_k0' ) + 1 ] ) if ( '-angle_k0' in input_list ) : param [ 'angle_k0' ] = float ( input_list [ input_list . index ( '-angle_k0' ) + 1 ] ) if ( '-rc' in input_list ) : param [ 'rc' ] = float ( input_list [ input_list . index ( '-rc' ) + 1 ] ) else : param [ 'rc' ] = param [ 'vdw_sigma' ] * 3.0 if ( '-kBT' in input_list ) : param [ 'kBT' ] = float ( input_list [ input_list . index ( '-kBT' ) + 1 ] ) if ( '-gamma' in input_list ) : param [ 'gamma' ] = float ( input_list [ input_list . index ( '-gamma' ) + 1 ] ) param [ 'sigma' ] = np . sqrt ( param [ 'gamma' ] * ( 2 - param [ 'gamma' ] ) * ( param [ 'kBT' ] / param [ 'mass' ] ) ) if ( '-nfibx' in input_list ) : param [ 'n_fibril_x' ] = int ( input_list [ input_list . index ( '-nfibx' ) + 1 ] ) if ( '-nfiby' in input_list ) : param [ 'n_fibril_y' ] = int ( input_list [ input_list . index ( '-nfiby' ) + 1 ] ) if ( '-nfibz' in input_list ) : param [ 'n_fibril_z' ] = int ( input_list [ input_list . index ( '-nfibz' ) + 1 ] ) param [ 'n_fibril' ] = param [ 'n_fibril_x' ] * param [ 'n_fibril_y' ] if param [ 'n_dim' ] == 3 : param [ 'n_fibril' ] *= param [ 'n_fibril_z' ] if ( '-lfib' in input_list ) : param [ 'l_fibril' ] = int ( input_list [ input_list . index ( '-lfib' ) + 1 ] ) param [ 'n_bead' ] = param [ 'n_fibril' ] * param [ 'l_fibril' ] if ( '-density' in input_list ) : param [ 'density' ] = float ( input_list [ input_list . index ( '-density' ) + 1 ] ) return param
check_sim_param(input_list, param=False)
Checks input_list to overwrite simulation parameters in param dictionary
check_sim_param ( input_list param = False ) Checks input_list to overwrite simulation parameters in param dictionary
"""
	check_sim_param(input_list, param=False)

	Checks input_list to overwrite simulation parameters in param dictionary 
	""" #param['bond_r1'] = 1.5 * param['bond_r0'] #if ('-bond_k1' in input_list): param['bond_k1'] = float(input_list[input_list.index('-bond_k1') + 1]) #if param['bond_k1'] < param['bond_k0']: param['bond_k1'] = param['bond_k0']
input_list
param