src/editor.py
def check_edit_param(input_list, param):
	"""
	check_sim_param(input_list, param)

	Checks input_list to overwrite simulation parameters in param dictionary during editor mode
	"""

	if not param: param = get_param_defaults()

	keys = []

	if ('-dt' in input_list): 
		param['dt'] = float(input_list[input_list.index('-dt') + 1])
		keys.append('dt')
	if ('-mass' in input_list): 
		param['mass'] = float(input_list[input_list.index('-mass') + 1])
		keys.append('mass')
	if ('-vdw_sigma' in input_list): 
		param['vdw_sigma'] = float(input_list[input_list.index('-vdw_sigma') + 1])
		keys.append('vdw_sigma')
	if ('-bond_r0' in input_list): 
		param['bond_r0'] = float(input_list[input_list.index('-bond_r0') + 1])
		keys.append('bond_r0')
	if ('-vdw_epsilon' in input_list): 
		param['vdw_epsilon'] = float(input_list[input_list.index('-vdw_epsilon') + 1])
		keys.append('vdw_epsilon')
	if ('-bond_k0' in input_list): 
		param['bond_k0'] = float(input_list[input_list.index('-bond_k0') + 1])
		keys.append('bond_k0')
	if ('-angle_k0' in input_list): 
		param['angle_k0'] = float(input_list[input_list.index('-angle_k0') + 1])
		keys.append('angle_k0')
	if ('-rc' in input_list): 
		param['rc'] = float(input_list[input_list.index('-rc') + 1])
		keys.append('rc')
	if ('-kBT' in input_list): 
		param['kBT'] = float(input_list[input_list.index('-kBT') + 1])
		keys.append('kBT')
	if ('-gamma' in input_list): 
		param['gamma'] = float(input_list[input_list.index('-gamma') + 1])
		keys.append('gamma')
	param['sigma'] = np.sqrt(param['gamma'] * (2 - param['gamma']) * (param['kBT'] / param['mass']))
	if ('-density' in input_list): 
		param['density'] = float(input_list[input_list.index('-density') + 1])
		keys.append('density')
	if ('-save_step' in input_list): 
		param['save_step'] = int(input_list[input_list.index('-save_step') + 1])
		keys.append('save_step')

	return param, keys

	check_sim_param(input_list, param)

	Checks input_list to overwrite simulation parameters in param dictionary during editor mode
	
check_sim_param(input_list, param)
Checks input_list to overwrite simulation parameters in param dictionary during editor mode
check_sim_param ( input_list param ) Checks input_list to overwrite simulation parameters in param dictionary during editor mode
def check_edit_param(input_list, param):
	if not param: param = get_param_defaults()
	keys = []
	if ('-dt' in input_list): 
		param['dt'] = float(input_list[input_list.index('-dt') + 1])
		keys.append('dt')
	if ('-mass' in input_list): 
		param['mass'] = float(input_list[input_list.index('-mass') + 1])
		keys.append('mass')
	if ('-vdw_sigma' in input_list): 
		param['vdw_sigma'] = float(input_list[input_list.index('-vdw_sigma') + 1])
		keys.append('vdw_sigma')
	if ('-bond_r0' in input_list): 
		param['bond_r0'] = float(input_list[input_list.index('-bond_r0') + 1])
		keys.append('bond_r0')
	if ('-vdw_epsilon' in input_list): 
		param['vdw_epsilon'] = float(input_list[input_list.index('-vdw_epsilon') + 1])
		keys.append('vdw_epsilon')
	if ('-bond_k0' in input_list): 
		param['bond_k0'] = float(input_list[input_list.index('-bond_k0') + 1])
		keys.append('bond_k0')
	if ('-angle_k0' in input_list): 
		param['angle_k0'] = float(input_list[input_list.index('-angle_k0') + 1])
		keys.append('angle_k0')
	if ('-rc' in input_list): 
		param['rc'] = float(input_list[input_list.index('-rc') + 1])
		keys.append('rc')
	if ('-kBT' in input_list): 
		param['kBT'] = float(input_list[input_list.index('-kBT') + 1])
		keys.append('kBT')
	if ('-gamma' in input_list): 
		param['gamma'] = float(input_list[input_list.index('-gamma') + 1])
		keys.append('gamma')
	param['sigma'] = np.sqrt(param['gamma'] * (2 - param['gamma']) * (param['kBT'] / param['mass']))
	if ('-density' in input_list): 
		param['density'] = float(input_list[input_list.index('-density') + 1])
		keys.append('density')
	if ('-save_step' in input_list): 
		param['save_step'] = int(input_list[input_list.index('-save_step') + 1])
		keys.append('save_step')
	return param, keys
def check_edit_param ( input_list , param ) : if not param : param = get_param_defaults ( ) keys = [ ] if ( '-dt' in input_list ) : param [ 'dt' ] = float ( input_list [ input_list . index ( '-dt' ) + 1 ] ) keys . append ( 'dt' ) if ( '-mass' in input_list ) : param [ 'mass' ] = float ( input_list [ input_list . index ( '-mass' ) + 1 ] ) keys . append ( 'mass' ) if ( '-vdw_sigma' in input_list ) : param [ 'vdw_sigma' ] = float ( input_list [ input_list . index ( '-vdw_sigma' ) + 1 ] ) keys . append ( 'vdw_sigma' ) if ( '-bond_r0' in input_list ) : param [ 'bond_r0' ] = float ( input_list [ input_list . index ( '-bond_r0' ) + 1 ] ) keys . append ( 'bond_r0' ) if ( '-vdw_epsilon' in input_list ) : param [ 'vdw_epsilon' ] = float ( input_list [ input_list . index ( '-vdw_epsilon' ) + 1 ] ) keys . append ( 'vdw_epsilon' ) if ( '-bond_k0' in input_list ) : param [ 'bond_k0' ] = float ( input_list [ input_list . index ( '-bond_k0' ) + 1 ] ) keys . append ( 'bond_k0' ) if ( '-angle_k0' in input_list ) : param [ 'angle_k0' ] = float ( input_list [ input_list . index ( '-angle_k0' ) + 1 ] ) keys . append ( 'angle_k0' ) if ( '-rc' in input_list ) : param [ 'rc' ] = float ( input_list [ input_list . index ( '-rc' ) + 1 ] ) keys . append ( 'rc' ) if ( '-kBT' in input_list ) : param [ 'kBT' ] = float ( input_list [ input_list . index ( '-kBT' ) + 1 ] ) keys . append ( 'kBT' ) if ( '-gamma' in input_list ) : param [ 'gamma' ] = float ( input_list [ input_list . index ( '-gamma' ) + 1 ] ) keys . append ( 'gamma' ) param [ 'sigma' ] = np . sqrt ( param [ 'gamma' ] * ( 2 - param [ 'gamma' ] ) * ( param [ 'kBT' ] / param [ 'mass' ] ) ) if ( '-density' in input_list ) : param [ 'density' ] = float ( input_list [ input_list . index ( '-density' ) + 1 ] ) keys . append ( 'density' ) if ( '-save_step' in input_list ) : param [ 'save_step' ] = int ( input_list [ input_list . index ( '-save_step' ) + 1 ] ) keys . append ( 'save_step' ) return param , keys
check_sim_param(input_list, param)
Checks input_list to overwrite simulation parameters in param dictionary during editor mode
check_sim_param ( input_list param ) Checks input_list to overwrite simulation parameters in param dictionary during editor mode
"""
	check_sim_param(input_list, param)

	Checks input_list to overwrite simulation parameters in param dictionary during editor mode
	"""
input_list
param