Skip to content

Commit

Permalink
Fixed small bug in neuroml2 reader
Browse files Browse the repository at this point in the history
  • Loading branch information
subhacom committed Aug 28, 2024
1 parent 5d58ac0 commit 9f85fe9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion UbuntuBuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
4 changes: 4 additions & 0 deletions WindowsBuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion builtins/SocketStreamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
36 changes: 22 additions & 14 deletions python/moose/neuroml2/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9f85fe9

Please sign in to comment.