From 9f85fe9336cb8f9fa71e335232b1c3c613527353 Mon Sep 17 00:00:00 2001 From: Subhasis Ray Date: Wed, 28 Aug 2024 16:53:30 +0530 Subject: [PATCH] Fixed small bug in neuroml2 reader --- UbuntuBuild.md | 2 +- WindowsBuild.md | 4 ++++ builtins/SocketStreamer.cpp | 2 +- python/moose/neuroml2/reader.py | 36 ++++++++++++++++++++------------- 4 files changed, 28 insertions(+), 16 deletions(-) diff --git a/UbuntuBuild.md b/UbuntuBuild.md index cc25d3b209..6b47096958 100644 --- a/UbuntuBuild.md +++ b/UbuntuBuild.md @@ -24,7 +24,7 @@ conda activate moose ``` cd moose-core -meson setup --wipe _build --prefix=%CD%\\_build_install -D use_mpi=false --buildtype=release -Ddebug=false +meson setup --wipe _build --prefix=`pwd`/_build_install -D use_mpi=false --buildtype=release -Ddebug=false ninja -v -C _build meson install -C _build ``` diff --git a/WindowsBuild.md b/WindowsBuild.md index 7b3f5dcf7b..68d5ab94af 100644 --- a/WindowsBuild.md +++ b/WindowsBuild.md @@ -22,6 +22,9 @@ conda activate moose ``` ## Requirements + +You need to use Windows cmd shell (not powershell) for the following: + * Install either MS Visual Studio 2015 or newer or MS Visual Studio Build Tools. Add path to this folder in your PATH variable * Install git for Windows @@ -41,6 +44,7 @@ conda install pkg-config ``` Gotcha: if you are on a 64 bit machine, the machine type is `x64`. MSVC comes with cross compilation support for various machine-os combos (x86, x86_64). + * Clone `moose-core` source code using git * Build moose ``` diff --git a/builtins/SocketStreamer.cpp b/builtins/SocketStreamer.cpp index 77edb6920c..c42bfa1c6e 100644 --- a/builtins/SocketStreamer.cpp +++ b/builtins/SocketStreamer.cpp @@ -268,7 +268,7 @@ void SocketStreamer::initUDSServer( void ) ); } - if(access(path, F_OK) != 0) + if(access(sockInfo_.filepath.c_str(), F_OK) != 0) { LOG( moose::warning, "No file " << sockInfo_.filepath << " exists." ); isValid_ = false; diff --git a/python/moose/neuroml2/reader.py b/python/moose/neuroml2/reader.py index 38acb49391..4ef6d1e249 100644 --- a/python/moose/neuroml2/reader.py +++ b/python/moose/neuroml2/reader.py @@ -345,7 +345,15 @@ def read( moose.celsius = self._getTemperature() self.importConcentrationModels(self.doc) - self.importIonChannels(self.doc, vmin=vmin) + self.importIonChannels( + self.doc, + vmin=vmin, + vmax=vmax, + vdivs=vdivs, + cmin=cmin, + cmax=cmax, + cdivs=cdivs, + ) self.importInputs(self.doc) for cell in self.doc.cells: @@ -1043,10 +1051,10 @@ def isGateCaDependent(self, ngate): """ dynamics = [ - getattr(ngate, 'forward_rate', None), - getattr(ngate, 'reverse_rate', None), - getattr(ngate, 'time_course', None), - getattr(ngate, 'steady_state', None) + getattr(ngate, "forward_rate", None), + getattr(ngate, "reverse_rate", None), + getattr(ngate, "time_course", None), + getattr(ngate, "steady_state", None), ] for dyn in dynamics: if dyn is not None: @@ -1065,10 +1073,10 @@ def isGateVoltageDependent(self, ngate): """ dynamics = [ - getattr(ngate, 'forward_rate', None), - getattr(ngate, 'reverse_rate', None), - getattr(ngate, 'time_course', None), - getattr(ngate, 'steady_state', None) + getattr(ngate, "forward_rate", None), + getattr(ngate, "reverse_rate", None), + getattr(ngate, "time_course", None), + getattr(ngate, "steady_state", None), ] for dyn in dynamics: if dyn is not None: @@ -1088,10 +1096,10 @@ def isGateVoltageCaDependent(self, ngate): """ dynamics = [ - getattr(ngate, 'forward_rate', None), - getattr(ngate, 'reverse_rate', None), - getattr(ngate, 'time_course', None), - getattr(ngate, 'steady_state', None) + getattr(ngate, "forward_rate", None), + getattr(ngate, "reverse_rate", None), + getattr(ngate, "time_course", None), + getattr(ngate, "steady_state", None), ] for dyn in dynamics: if dyn is not None: @@ -1627,7 +1635,7 @@ def importIonChannels( ) else: mchan = self.createHHChannel( - chan, vmin=vmin, vmax=vmin, vdivs=vdivs + chan, vmin=vmin, vmax=vmax, vdivs=vdivs ) self.id_to_ionChannel[chan.id] = chan