Package org.neuroml.export.neuron
Class NeuronWriter
- java.lang.Object
-
- org.lemsml.export.base.ABaseWriter
-
- org.neuroml.export.base.ANeuroMLBaseWriter
-
- org.neuroml.export.neuron.NeuronWriter
-
- All Implemented Interfaces:
IBaseWriter
public class NeuronWriter extends ANeuroMLBaseWriter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NeuronWriter.ChannelConductanceOption
class
NeuronWriter.CompInfo
static class
NeuronWriter.SupportedUnits
-
Field Summary
Fields Modifier and Type Field Description HashMap<String,Integer>
modWarnings
HashMap<String,String>
modWritten
static String
NEURON_HOME_ENV_VAR
-
Fields inherited from class org.neuroml.export.base.ANeuroMLBaseWriter
nmlDocument
-
Fields inherited from class org.lemsml.export.base.ABaseWriter
format, lems, sli
-
-
Constructor Summary
Constructors Constructor Description NeuronWriter(org.lemsml.jlems.core.type.Lems lems)
NeuronWriter(org.lemsml.jlems.core.type.Lems lems, File outputFolder, String outputFileName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addComment(StringBuilder sb, String comment)
protected void
addComment(StringBuilder sb, String comment, String indent)
List<File>
convert()
org.neuroml.model.IntracellularProperties
convertCellWithMorphology(org.lemsml.jlems.core.type.Component cellComponent)
static String
formatDefault(float num)
List<File>
generateAndRun(boolean nogui, boolean compileMods, boolean run)
List<File>
generateAndRun(boolean nogui, boolean compileMods, boolean run, boolean useNrnivForNoGui)
static String
generateCellFile(org.neuroml.model.Cell cell)
void
generateFilesForNeuroMLElements(boolean compileMods)
List<File>
generateMainScriptAndMods()
String
generateModFile(org.lemsml.jlems.core.type.Component comp)
String
generateModFile(org.lemsml.jlems.core.type.Component comp, NeuronWriter.ChannelConductanceOption condOption)
String
getMainScript()
org.neuroml.model.MembraneProperties
getMembraneProperties(org.neuroml.model.Cell cell)
boolean
isNoGui()
static void
main(String[] args)
File
saveModToFile(org.lemsml.jlems.core.type.Component comp, String mod)
void
setGenerateAlphabetical(boolean generateAlphabetical)
void
setNoGui(boolean nogui)
void
setParallelMode(boolean parallel)
void
setSupportedFeatures()
static void
writeModBlock(StringBuilder main, String blockName, String contents)
-
Methods inherited from class org.lemsml.export.base.ABaseWriter
getOutputFileName, getOutputFolder, setOutputFileName, setOutputFolder
-
-
-
-
Constructor Detail
-
NeuronWriter
public NeuronWriter(org.lemsml.jlems.core.type.Lems lems) throws ModelFeatureSupportException, org.lemsml.jlems.core.sim.LEMSException, org.neuroml.model.util.NeuroMLException
- Throws:
ModelFeatureSupportException
org.lemsml.jlems.core.sim.LEMSException
org.neuroml.model.util.NeuroMLException
-
NeuronWriter
public NeuronWriter(org.lemsml.jlems.core.type.Lems lems, File outputFolder, String outputFileName) throws ModelFeatureSupportException, org.neuroml.model.util.NeuroMLException, org.lemsml.jlems.core.sim.LEMSException
- Throws:
ModelFeatureSupportException
org.neuroml.model.util.NeuroMLException
org.lemsml.jlems.core.sim.LEMSException
-
-
Method Detail
-
setSupportedFeatures
public void setSupportedFeatures()
-
generateAndRun
public List<File> generateAndRun(boolean nogui, boolean compileMods, boolean run) throws org.lemsml.jlems.core.sim.LEMSException, GenerationException, org.neuroml.model.util.NeuroMLException, IOException, ModelFeatureSupportException
- Throws:
org.lemsml.jlems.core.sim.LEMSException
GenerationException
org.neuroml.model.util.NeuroMLException
IOException
ModelFeatureSupportException
-
generateAndRun
public List<File> generateAndRun(boolean nogui, boolean compileMods, boolean run, boolean useNrnivForNoGui) throws org.lemsml.jlems.core.sim.LEMSException, GenerationException, org.neuroml.model.util.NeuroMLException, IOException, ModelFeatureSupportException
- Throws:
org.lemsml.jlems.core.sim.LEMSException
GenerationException
org.neuroml.model.util.NeuroMLException
IOException
ModelFeatureSupportException
-
addComment
protected void addComment(StringBuilder sb, String comment)
- Specified by:
addComment
in classABaseWriter
-
addComment
protected void addComment(StringBuilder sb, String comment, String indent)
-
setParallelMode
public void setParallelMode(boolean parallel)
-
setNoGui
public void setNoGui(boolean nogui)
-
isNoGui
public boolean isNoGui()
-
setGenerateAlphabetical
public void setGenerateAlphabetical(boolean generateAlphabetical)
-
generateMainScriptAndMods
public List<File> generateMainScriptAndMods() throws org.lemsml.jlems.core.sim.LEMSException, GenerationException, org.neuroml.model.util.NeuroMLException
- Throws:
org.lemsml.jlems.core.sim.LEMSException
GenerationException
org.neuroml.model.util.NeuroMLException
-
getMainScript
public String getMainScript() throws GenerationException, org.neuroml.model.util.NeuroMLException
- Throws:
GenerationException
org.neuroml.model.util.NeuroMLException
-
saveModToFile
public File saveModToFile(org.lemsml.jlems.core.type.Component comp, String mod) throws org.lemsml.jlems.core.sim.ContentError
- Throws:
org.lemsml.jlems.core.sim.ContentError
-
getMembraneProperties
public org.neuroml.model.MembraneProperties getMembraneProperties(org.neuroml.model.Cell cell)
-
convertCellWithMorphology
public org.neuroml.model.IntracellularProperties convertCellWithMorphology(org.lemsml.jlems.core.type.Component cellComponent) throws org.lemsml.jlems.core.sim.LEMSException, org.neuroml.model.util.NeuroMLException
- Throws:
org.lemsml.jlems.core.sim.LEMSException
org.neuroml.model.util.NeuroMLException
-
generateCellFile
public static String generateCellFile(org.neuroml.model.Cell cell) throws org.lemsml.jlems.core.sim.LEMSException, org.neuroml.model.util.NeuroMLException
- Throws:
org.lemsml.jlems.core.sim.LEMSException
org.neuroml.model.util.NeuroMLException
-
formatDefault
public static String formatDefault(float num)
-
generateModFile
public String generateModFile(org.lemsml.jlems.core.type.Component comp) throws org.lemsml.jlems.core.sim.LEMSException
- Throws:
org.lemsml.jlems.core.sim.LEMSException
-
generateModFile
public String generateModFile(org.lemsml.jlems.core.type.Component comp, NeuronWriter.ChannelConductanceOption condOption) throws org.lemsml.jlems.core.sim.LEMSException
- Throws:
org.lemsml.jlems.core.sim.LEMSException
-
writeModBlock
public static void writeModBlock(StringBuilder main, String blockName, String contents)
-
generateFilesForNeuroMLElements
public void generateFilesForNeuroMLElements(boolean compileMods) throws org.lemsml.jlems.core.sim.LEMSException, org.neuroml.model.util.NeuroMLException, IOException
- Throws:
org.lemsml.jlems.core.sim.LEMSException
org.neuroml.model.util.NeuroMLException
IOException
-
convert
public List<File> convert() throws GenerationException
- Throws:
GenerationException
-
-