import sys
import os
import pickle
from os.path import exists
#drawfig_venn: unique([strs_all[i] for i in range(0,len(inperouts_vec)) if inperouts_vec[i][0] >= 1 and inperouts_vec[i][1] >= 1 and inperouts_vec[i][2] >= 1 and inperouts_vec[i][3] >= 1 and NoutputInsides_vec[i][0] >= 32 and NoutputInsides_vec[i][1] >= 32 and NoutputInsides_vec[i][2] >= 32 and NoutputInsides_vec[i][3] >= 32 ])[::-1] gives this:
goodOnes = ['python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 35.0 35.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 35.0 35.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 30.0 30.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 30.0 30.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 25.0 25.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 25.0 25.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 20.0 20.0 1000 0.0 0.9 10.0 10.0 10.0 250.0 ',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 15.0 15.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 15.0 15.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 140 120 17.5 30.0 80.0 5.827500000000001 9.99 26.64 35.0 35.0 1000 0.0 0.9 10.0 10.0 10.0 250.0 ',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 140 120 17.5 30.0 80.0 5.827500000000001 9.99 26.64 30.0 30.0 1000 0.0 0.9 10.0 10.0 10.0 250.0 ',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 140 120 17.5 30.0 80.0 5.827500000000001 9.99 26.64 10.0 10.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 125 105 17.5 40.0 140.0 5.827500000000001 13.32 46.620000000000005 25.0 25.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 125 105 17.5 40.0 140.0 5.827500000000001 13.32 46.620000000000005 10.0 10.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 125 105 17.5 40.0 100.0 5.827500000000001 13.32 33.300000000000004 25.0 25.0 1000 0.0 0.9 10.0 10.0 10.0 200.0',
'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 125 105 17.5 40.0 100.0 5.827500000000001 13.32 33.300000000000004 10.0 10.0 1000 0.0 0.9 10.0 10.0 10.0 200.0']
#goodOnes = ['python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 35.0 35.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 35.0 35.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 30.0 30.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 25.0 25.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 25.0 25.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 25.0 25.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 20.0 20.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 15.0 15.0 1000 0.0 0.95 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 150 130 17.5 30.0 80.0 5.827500000000001 9.99 26.64 15.0 15.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 140 120 17.5 30.0 80.0 5.827500000000001 9.99 26.64 35.0 35.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 140 120 17.5 30.0 80.0 5.827500000000001 9.99 26.64 10.0 10.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 140 120 17.5 30.0 80.0 5.827500000000001 9.99 26.64 10.0 10.0 1000 0.0 0.9 10.0 10.0 10.0 250.0',
# 'python3 sim_mmns_2pm_sep_noISDIDD_savespikesonly.py 40 0.3 125 105 17.5 40.0 100.0 5.827500000000001 13.32 33.300000000000004 25.0 25.0 1000 0.0 0.9 10.0 10.0 10.0 200.0']
myseed = 1
if len(sys.argv) > 1:
myseed = int(sys.argv[1])
def mystr(x):
y = '{:.3f}'.format(x)
while y.find('.') > -1 and y[-1] == '0':
y = y[0:-1]
return y
myseedAdd = '' if myseed == 1 else '_seed'+str(myseed)
imodel = 0
if len(sys.argv) > 2:
imodel = int(sys.argv[2])
sequence = [1,1,1,1,1,2,2,2,2,2,1,1,1,1,1,3,3,3,3,3,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,0,2,2,2,2,2,3,3,3,3,3,2,2,2,2,2,4,4,4,4,4,2,2,2,2,2,0,3,3,3,3,3,4,4,4,4,4,3,3,3,3,3,0,4,4,4,4,4,0] #seq0
if True:
area = ''
attrs = goodOnes[imodel].split(' ')
these_attrs = attrs[:]
these_attrs[1] = these_attrs[1].replace('.py','_limtau_givensequence.py')
these_attrs.insert(21,'-'.join([str(x) for x in sequence]))
this_str = ' '.join(these_attrs)
if not exists('MMNs_2pm_sep_noISDIDD_limtau_seq0_Nperpop'+these_attrs[2]+'_paramSD'+these_attrs[3]+'_stimA'+these_attrs[4]+'_'+these_attrs[5]+'_gAMPA'+these_attrs[6]+'_'+these_attrs[7]+'_'+these_attrs[8]+'_gNMDA'+these_attrs[9]+'_'+these_attrs[10]+'_'+these_attrs[11]+'_gGABA'+these_attrs[12]+'_'+these_attrs[13]+'_dep'+these_attrs[14]+'_'+these_attrs[15]+'_'+these_attrs[16]+'_tau'+these_attrs[17]+'_'+these_attrs[18]+'_'+these_attrs[19]+'_'+these_attrs[20]+myseedAdd+'.mat') and not exists('MMNs_2pm_sep_noISDIDD_seq0_model'+str(imodel)+'_'+area+'pop_seed'+str(myseed)+'.mat'):
print(this_str+' '+str(myseed))
os.system(this_str+' '+str(myseed))
else:
print('MMNs_2pm_sep_noISDIDD_limtau_seq0_Nperpop'+these_attrs[2]+'_paramSD'+these_attrs[3]+'_stimA'+these_attrs[4]+'_'+these_attrs[5]+'_gAMPA'+these_attrs[6]+'_'+these_attrs[7]+'_'+these_attrs[8]+'_gNMDA'+these_attrs[9]+'_'+these_attrs[10]+'_'+these_attrs[11]+'_gGABA'+these_attrs[12]+'_'+these_attrs[13]+'_dep'+these_attrs[14]+'_'+these_attrs[15]+'_'+these_attrs[16]+'_tau'+these_attrs[17]+'_'+these_attrs[18]+'_'+these_attrs[19]+'_'+these_attrs[20]+myseedAdd+'.mat MMNs_2pm_sep_noISDIDD_seq0_model'+str(imodel)+'_'+area+'pop_seed'+str(myseed)+'.mat exists')
print('mv MMNs_2pm_sep_noISDIDD_limtau_seq0_Nperpop'+these_attrs[2]+'_paramSD'+these_attrs[3]+'_stimA'+these_attrs[4]+'_'+these_attrs[5]+'_gAMPA'+these_attrs[6]+'_'+these_attrs[7]+'_'+these_attrs[8]+'_gNMDA'+these_attrs[9]+'_'+these_attrs[10]+'_'+these_attrs[11]+'_gGABA'+these_attrs[12]+'_'+these_attrs[13]+'_dep'+these_attrs[14]+'_'+these_attrs[15]+'_'+these_attrs[16]+'_tau'+these_attrs[17]+'_'+these_attrs[18]+'_'+these_attrs[19]+'_'+these_attrs[20]+myseedAdd+'.mat MMNs_2pm_sep_noISDIDD_seq0_model'+str(imodel)+'_'+area+'pop_seed'+str(myseed)+'.mat')
os.system('mv MMNs_2pm_sep_noISDIDD_limtau_seq0_Nperpop'+these_attrs[2]+'_paramSD'+these_attrs[3]+'_stimA'+these_attrs[4]+'_'+these_attrs[5]+'_gAMPA'+these_attrs[6]+'_'+these_attrs[7]+'_'+these_attrs[8]+'_gNMDA'+these_attrs[9]+'_'+these_attrs[10]+'_'+these_attrs[11]+'_gGABA'+these_attrs[12]+'_'+these_attrs[13]+'_dep'+these_attrs[14]+'_'+these_attrs[15]+'_'+these_attrs[16]+'_tau'+these_attrs[17]+'_'+these_attrs[18]+'_'+these_attrs[19]+'_'+these_attrs[20]+myseedAdd+'.mat MMNs_2pm_sep_noISDIDD_seq0_model'+str(imodel)+'_'+area+'pop_seed'+str(myseed)+'.mat')