diff --git a/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py b/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py index 8dd9511..b3579da 100644 --- a/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py +++ b/NetPyNE/ACnet/LEMS_MediumNet_netpyne.py @@ -58,7 +58,7 @@ class NetPyNESimulation(): - def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False): + def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None): self.setup_start = time.time() @@ -89,6 +89,13 @@ def __init__(self, tstop=500.0, dt=0.01, seed=123456789, save_json=False): self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms self.simConfig.dt = dt # Internal integration timestep to use + # cvode + if abs_tol is not None: + self.simConfig.cvode_active = True + self.simConfig.cvode_atol = abs_tol + else: + self.simConfig.cvode_active = False + # Seeds for randomizers (connectivity, input stimulation and cell locations) # Note: locations and connections should be fully specified by the structure of the NeuroML, # so seeds for conn & loc shouldn't affect networks structure/behaviour @@ -1402,7 +1409,7 @@ def save_results(self): save_json = '-json' in sys.argv no_run = '-norun' in sys.argv - ns = NetPyNESimulation(tstop=500.0, dt=0.01, seed=123456789, save_json=save_json) + ns = NetPyNESimulation(tstop=500.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None) if not no_run: ns.run() diff --git a/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py b/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py index d3b2311..bfe24ea 100644 --- a/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py +++ b/NetPyNE/GapJunctions/LEMS_GJ_netpyne.py @@ -32,7 +32,7 @@ class NetPyNESimulation(): - def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False): + def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None): self.setup_start = time.time() @@ -63,6 +63,13 @@ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False): self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms self.simConfig.dt = dt # Internal integration timestep to use + # cvode + if abs_tol is not None: + self.simConfig.cvode_active = True + self.simConfig.cvode_atol = abs_tol + else: + self.simConfig.cvode_active = False + # Seeds for randomizers (connectivity, input stimulation and cell locations) # Note: locations and connections should be fully specified by the structure of the NeuroML, # so seeds for conn & loc shouldn't affect networks structure/behaviour @@ -200,7 +207,7 @@ def save_results(self): save_json = '-json' in sys.argv no_run = '-norun' in sys.argv - ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json) + ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None) if not no_run: ns.run() diff --git a/NetPyNE/LEMS_2007One_netpyne.py b/NetPyNE/LEMS_2007One_netpyne.py index 3b511ca..3614edc 100644 --- a/NetPyNE/LEMS_2007One_netpyne.py +++ b/NetPyNE/LEMS_2007One_netpyne.py @@ -30,7 +30,7 @@ class NetPyNESimulation(): - def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False): + def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False, abs_tol=None): self.setup_start = time.time() @@ -51,6 +51,13 @@ def __init__(self, tstop=520.0, dt=0.001, seed=123456789, save_json=False): self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms self.simConfig.dt = dt # Internal integration timestep to use + # cvode + if abs_tol is not None: + self.simConfig.cvode_active = True + self.simConfig.cvode_atol = abs_tol + else: + self.simConfig.cvode_active = False + # Seeds for randomizers (connectivity, input stimulation and cell locations) # Note: locations and connections should be fully specified by the structure of the NeuroML, # so seeds for conn & loc shouldn't affect networks structure/behaviour @@ -175,7 +182,7 @@ def save_results(self): save_json = '-json' in sys.argv no_run = '-norun' in sys.argv - ns = NetPyNESimulation(tstop=520.0, dt=0.001, seed=123456789, save_json=save_json) + ns = NetPyNESimulation(tstop=520.0, dt=0.001, seed=123456789, save_json=save_json, abs_tol=None) if not no_run: ns.run() diff --git a/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py b/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py index 5702dab..f0fccc1 100644 --- a/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py +++ b/NetPyNE/TwoCells/LEMS_TwoCell_netpyne.py @@ -51,7 +51,7 @@ class NetPyNESimulation(): - def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False): + def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False, abs_tol=None): self.setup_start = time.time() @@ -82,6 +82,13 @@ def __init__(self, tstop=700.0, dt=0.01, seed=123456789, save_json=False): self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms self.simConfig.dt = dt # Internal integration timestep to use + # cvode + if abs_tol is not None: + self.simConfig.cvode_active = True + self.simConfig.cvode_atol = abs_tol + else: + self.simConfig.cvode_active = False + # Seeds for randomizers (connectivity, input stimulation and cell locations) # Note: locations and connections should be fully specified by the structure of the NeuroML, # so seeds for conn & loc shouldn't affect networks structure/behaviour @@ -435,7 +442,7 @@ def save_results(self): save_json = '-json' in sys.argv no_run = '-norun' in sys.argv - ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json) + ns = NetPyNESimulation(tstop=700.0, dt=0.01, seed=123456789, save_json=save_json, abs_tol=None) if not no_run: ns.run() diff --git a/NetPyNE/UI/LEMS_HHSimple_netpyne.py b/NetPyNE/UI/LEMS_HHSimple_netpyne.py index 24b7e92..8a3f267 100644 --- a/NetPyNE/UI/LEMS_HHSimple_netpyne.py +++ b/NetPyNE/UI/LEMS_HHSimple_netpyne.py @@ -30,7 +30,7 @@ class NetPyNESimulation(): - def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False): + def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False, abs_tol=None): self.setup_start = time.time() @@ -51,6 +51,13 @@ def __init__(self, tstop=450.0, dt=0.05, seed=123456789, save_json=False): self.simConfig.duration = self.simConfig.tstop = tstop # Duration of the simulation, in ms self.simConfig.dt = dt # Internal integration timestep to use + # cvode + if abs_tol is not None: + self.simConfig.cvode_active = True + self.simConfig.cvode_atol = abs_tol + else: + self.simConfig.cvode_active = False + # Seeds for randomizers (connectivity, input stimulation and cell locations) # Note: locations and connections should be fully specified by the structure of the NeuroML, # so seeds for conn & loc shouldn't affect networks structure/behaviour @@ -181,7 +188,7 @@ def save_results(self): save_json = '-json' in sys.argv no_run = '-norun' in sys.argv - ns = NetPyNESimulation(tstop=450.0, dt=0.05, seed=123456789, save_json=save_json) + ns = NetPyNESimulation(tstop=450.0, dt=0.05, seed=123456789, save_json=save_json, abs_tol=None) if not no_run: ns.run() diff --git a/NeuroML2/LEMS_HHSmall.xml b/NeuroML2/LEMS_HHSmall.xml index d731ab7..f8cfd62 100644 --- a/NeuroML2/LEMS_HHSmall.xml +++ b/NeuroML2/LEMS_HHSmall.xml @@ -2,7 +2,7 @@ diff --git a/NeuroML2/LEMS_HybridSmall.xml b/NeuroML2/LEMS_HybridSmall.xml index 1e9fe6a..473285d 100644 --- a/NeuroML2/LEMS_HybridSmall.xml +++ b/NeuroML2/LEMS_HybridSmall.xml @@ -2,7 +2,7 @@ diff --git a/NeuroML2/LEMS_HybridTut.xml b/NeuroML2/LEMS_HybridTut.xml index e54ae87..424cac8 100644 --- a/NeuroML2/LEMS_HybridTut.xml +++ b/NeuroML2/LEMS_HybridTut.xml @@ -2,7 +2,7 @@ diff --git a/NeuroML2/LEMS_M1.xml b/NeuroML2/LEMS_M1.xml index 7f4b39e..032b7c0 100644 --- a/NeuroML2/LEMS_M1.xml +++ b/NeuroML2/LEMS_M1.xml @@ -2,7 +2,7 @@