Alternatively the moose-gui folder exists within the moose folder downloaded and built earlier in the installation process. It can be found under ``location_of_moose_folder/moose/moose-gui/``.
Below are packages which you may want to install to use MOOSE Graphical User Interface.
*Multiple scales can be modelled and simulated in MOOSE*
...
...
@@ -34,14 +34,55 @@ Contents:
:maxdepth: 2
:numbered:
moose_quickstart
Coding basics and how to use this document
==========================================
This page acts as the first stepping stone for learning how moose works. The tutorials here are intended to be interactive, and are presented as python commands. Python commands are identifiable by the ``>>>`` before the command as opposed to ``$`` which identifies a command-line command.
Indices and tables
==================
>>> this_is_a_python_command
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
You are encouraged to run a python shell while reading through this documentation and trying out each command for yourself. Python shells are environments within your terminal wherein everything you type is interpreted as a python command. They can be accessed by typing
::
$ python
in your command-line terminal.
While individually typing lines of code in a python terminal is useful for practicing using moose and coding in general, note that once you close the python environment all the code you typed is gone and the moose models created are also lost. In order to 'save' models that you create, you would have to type your code in a text file with a ``.py`` extension. The easiest way to do this is to create a text file in command line, open it with a text editor (for example, gedit), and simply type your code in (make sure you indent correctly).
::
$ touch code.py
$ gedit code.py
Once you have written your code in the file, you can run it through your python environment.
::
$ python code.py
Note that apart from this section of the quickstart, most of the moose documentation is in the form of ``snippets``. These are basically ``.py`` files with code that demonstrates a certain functionality in moose. If you see a dialogue box like this one:
.. automodule:: func
:members: main
You can view the code by clicking the green source button on the left side of the box. Alternatively, the source code for all of the examples in the documentation can be found in ``moose/moose-examples/snippets``. Once you run each file in python, it is encouraged that you look through the code to understand how it works.
In the quickstart, most of the snippets demonstrate the functionality of specific classes. However, snippets in later sections such as the cookbook show how to do specific things in moose such as creating networks, chemical models, and synaptic channels.
Importing moose and accessing documentation
===========================================
In a python script you import modules to access the functionalities they provide. In order to use moose, you need to import it within a python environment or at the beginning of your python script.
>>> import moose
This make the ``moose`` module available for use in Python. You can use Python's built-in ``help`` function to read the top-level documentation for the moose module.
>>> help(moose)
This will give you an overview of the module. Press ``q`` to exit the pager and get back to the interpreter. You can also access the documentation for individual classes and functions this way.
>>> help(moose.connect)
...
...
@@ -69,6 +110,13 @@ Note that you need to put the class-name followed by dot followed by
field-name within quotes. Otherwise, ``moose.doc`` will receive the
field value as parameter and get confused.
Alternatively, if you want to see a full list of classes, functions and their fields, you can browse through the following pages. This is especially helpful when going through snippets.
* :ref:`genindex`
* :ref:`modindex`
..
:ref:`search`
.. _quickstart-creating:
Creating objects and traversing the object hierarchy