Skip to content

Commit 7a8f52d

Browse files
author
Dilawar Singh
committed
Merge branch 'devel' of https://github.com/dilawar/moose-core into devel
2 parents 6a7de61 + 1bbbc2d commit 7a8f52d

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

python/moose/moose.py

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
import moose.neuroml2 as _neuroml2
3030
except Exception as e:
3131
nml2Import_ = False
32-
nml2ImportError_ = ' '.join( [
32+
nml2ImportError_ = ' '.join( [
3333
"NML2 support is disabled because `libneuroml` and "
3434
, "`pyneuroml` modules are not found.\n"
3535
, " $ pip install pyneuroml libneuroml \n"
36-
, " should fix it."
36+
, " should fix it."
3737
, " Actual error: %s " % e ]
3838
)
3939

@@ -58,6 +58,15 @@
5858
mergechemImport_ = False
5959
mergechemError_ = '%s' % e
6060

61+
def about():
62+
"""info: Return some 'about me' information.
63+
"""
64+
return '\n'.join([
65+
'Path : ' + os.path.dirname(__file__)
66+
, 'Version: ' + _moose.VERSION
67+
, 'Docs : ' + 'https://moose.readthedocs.io/en/latest/'
68+
])
69+
6170
def loadModel(filename, modelpath, solverclass="gsl"):
6271
"""loadModel: Load model from a file to a specified path.
6372
@@ -67,7 +76,7 @@ def loadModel(filename, modelpath, solverclass="gsl"):
6776
model description file.
6877
modelpath: str
6978
moose path for the top level element of the model to be created.
70-
method: str
79+
method: str
7180
solver type to be used for simulating the model.
7281
TODO: Link to detailed description of solvers?
7382
@@ -106,7 +115,7 @@ def loadModel(filename, modelpath, solverclass="gsl"):
106115
mu.error( "Unknown model extenstion '%s'" % extension)
107116
return None
108117

109-
118+
110119
# Version
111120
def version( ):
112121
# Show user version.
@@ -146,12 +155,12 @@ def mooseReadSBML(filepath, loadpath, solver='ee',validate="on"):
146155
--------
147156
filepath: str
148157
filepath to be loaded.
149-
loadpath : str
158+
loadpath : str
150159
Root path for this model e.g. /model/mymodel
151160
solver : str
152161
Solver to use (default 'ee').
153162
Available options are "ee", "gsl", "stochastic", "gillespie"
154-
"rk", "deterministic"
163+
"rk", "deterministic"
155164
For full list see ??
156165
"""
157166
global sbmlImport_
@@ -177,20 +186,20 @@ def mooseReadSBML(filepath, loadpath, solver='ee',validate="on"):
177186

178187
def mooseWriteSBML(modelpath, filepath, sceneitems={}):
179188
"""mooseWriteSBML: Writes loaded model under modelpath to a file in SBML format.
180-
189+
181190
Parameters
182191
----------
183-
modelpath : str
192+
modelpath : str
184193
model path in moose e.g /model/mymodel \n
185194
filepath : str
186195
Path of output file. \n
187-
sceneitems : dict
188-
UserWarning: user need not worry about this layout position is saved in
196+
sceneitems : dict
197+
UserWarning: user need not worry about this layout position is saved in
189198
Annotation field of all the moose Object (pool,Reaction,enzyme).
190-
If this function is called from
191-
* GUI - the layout position of moose object is passed
199+
If this function is called from
200+
* GUI - the layout position of moose object is passed
192201
* command line - NA
193-
* if genesis/kkit model is loaded then layout position is taken from the file
202+
* if genesis/kkit model is loaded then layout position is taken from the file
194203
* otherwise auto-coordinates is used for layout position.
195204
"""
196205
if sbmlImport_:
@@ -205,9 +214,9 @@ def mooseWriteKkit(modelpath, filepath, sceneitems={}):
205214
206215
Parameters
207216
----------
208-
modelpath : str
217+
modelpath : str
209218
Model path in moose.
210-
filepath : str
219+
filepath : str
211220
Path of output file.
212221
"""
213222
global kkitImport_, kkitImport_err_
@@ -225,7 +234,7 @@ def mooseDeleteChemSolver(modelpath):
225234
Notes
226235
-----
227236
This is neccesary while created a new moose object on a pre-existing modelpath,
228-
this should be followed by mooseAddChemSolver for add solvers on to compartment
237+
this should be followed by mooseAddChemSolver for add solvers on to compartment
229238
to simulate else default is Exponential Euler (ee)
230239
"""
231240
if chemImport_:
@@ -244,7 +253,7 @@ def mooseAddChemSolver(modelpath, solver):
244253
245254
modelpath : str
246255
Model path that is loaded into moose.
247-
solver : str
256+
solver : str
248257
Exponential Euler "ee" is default. Other options are Gillespie ("gssa"),
249258
Runge Kutta ("gsl") etc. Link to documentation?
250259
"""

0 commit comments

Comments
 (0)