def add_neuroml_components(self, nml_doc):
is_nest = False<EOL>print_v("<STR_LIT>"%nml_doc.id)<EOL>for c in self.pop_comp_info:<EOL><INDENT>info = self.pop_comp_info[c]<EOL>model_template = info['<STR_LIT>'] if '<STR_LIT>' in info else(info['<STR_LIT>']['<STR_LIT:type>'] if '<STR_LIT>' in info else<EOL>info['<STR_LIT>'])<EOL>print_v("<STR_LIT>"%(model_template, info))<EOL>if info['<STR_LIT>'] == '<STR_LIT>' and model_template == '<STR_LIT>':<EOL><INDENT>is_nest = True<EOL>from neuroml import IF_curr_alpha<EOL>pynn0 = IF_curr_alpha(id=c, <EOL>cm=info['<STR_LIT>']['<STR_LIT>']/<NUM_LIT>, <EOL>i_offset="<STR_LIT:0>", <EOL>tau_m=info['<STR_LIT>']['<STR_LIT>'], <EOL>tau_refrac=info['<STR_LIT>']['<STR_LIT>'], <EOL>tau_syn_E="<STR_LIT:1>", <EOL>tau_syn_I="<STR_LIT:1>", <EOL>v_init='<STR_LIT>', <EOL>v_reset=info['<STR_LIT>']['<STR_LIT>'], <EOL>v_rest=info['<STR_LIT>']['<STR_LIT>'], <EOL>v_thresh=info['<STR_LIT>']['<STR_LIT>'])<EOL>nml_doc.IF_curr_alpha.append(pynn0)<EOL><DEDENT>elif info['<STR_LIT>'] == '<STR_LIT>' and model_template == '<STR_LIT>':<EOL><INDENT>contents = '''<STR_LIT>'''<Lems><EOL><DEDENT><DEDENT>ulseSynapse id="<STR_LIT:%s>"/><EOL>'<STR_LIT>'%(s)<EOL><INDENT>syn_file_name = '<STR_LIT>'%s<EOL>syn_file = open(syn_file_name,'<STR_LIT:w>')<EOL>syn_file.write(contents)<EOL>syn_file.close()<EOL>self.nml_includes.append(syn_file_name)<EOL>
Based on cell & synapse properties found, create the corresponding NeuroML components