Document made with KompoZer


Our laboratory Blog


Post Doctoral Opening

Scholarships - Grants


**  Download Sensory Information Science Course
** Download Micro-Phenomena course
** Download Intro to Quantum Mechanics course


** Download students Degree, Master and Doctor thesis


Group photos

R. Micheletto


All Publications


Flag Counter



Perception Experiments site

Perception experiments are located here !

Temporary javascript test

Mandelbrot test =>click<=


How to install SIESTA on CRAY XC50

Here is how we installed SIESTA on our CRAY XC50:

  • In a browser goto the siesta home page siesta. There you are directed to a git repository (here). There click "clone" and then "clone with HTTPS". Now you should have the address of the siesta repository in your PC clipboard.

  • Enter your CRAY area, create a folder where you want to work and change directory into it.

  • enter the command "git clone" and paste the address obtained from the git repository. Like the example below (the https address can be different):
    git clone

  • Now you have cloned the siesta repository in your working directory. Create a subdirectory called -for example- "obj1" and go into it.
    mkdir obj1
    cd obj1

  • Execute the initialization script with the command:
    sh ../Src/

  • Now you have populated the "obj1" folder with the necessary files for the compilation of siesta.

  • You need to create an "arch.make" file. You can modify for your needs the provided DOCUMENTED-TEMPLATE.make file (it is located in the ../Obj folder). Please note that you should not use MPI symbols in your arch.make file, CRAY will use its own MPI's symbols automatically. If you have a CRAY XC50, this is what worked for us: arch.make.

  • Now you need to compile. First, set all the CRAY's environment variables in the GNU mode
    module switch PrgEnv-Cray PrgEnv-gnu

  • Compile with the command

    ( If your compilation stops with an error saying "This version of SIESTA cannot be identified" you need to go back to the main folder and execute git describe:
    cd ..
    git describe

    You will see a string beginning with "v" and other numbers representing the version. Create two files: SIESTA.release containing the string as it is, and SIESTA.version containing the string without the initial "v". Try again the "make" command. This time it should compile until the end)

  • After a while you will have the "siesta" executable ready in folder obj1. Go back in the main directory and create a new subfolder for your ab-inition calculations files and change into it:
    cd ..
    mkdir test1
    cd test1

  • Here you create a symbolic link to the siesta executable you just compiled:
    ln -s ../obj1/siesta. Also copy in here all the files necessary for your calculations (we use "scp" to do that).

  • To run your simulation, on the CRAY XC50, you need to create a launcher script. Please read your CRAY manual on the "aprun" section. For example, this is one of our scripts: Of course you have to modify it to fit your CRAY account name, folder setup, number of nodes and threads you want to use, etc etc.

    Good luck and we hope this helps!

    (If something goes wrong, you must read the SIESTA manual and your CRAY manual. A manual for XC50 is, for example, here.)

    NEST simulatorGoogle Colaboratory
    How to install NEST in google COLABORATORY (in Japanese)

    Google ColaboratoryNEST simulatorverision2.x(2021/06/183.0)

    Google ColaboratoryWindowsVMNEST simulator

  • Google Colaboratory(Google Colaboratory)

  • Google ColaboratoryLinux!NEST simulator""

    !add-apt-repository ppa:nest-simulator/nest
    !apt-get update
    !apt-get install nest

    Press [ENTER] to continue or Ctrl-c to cancel adding it.Enternest(1)

    !pip install nestnest

  • nestimportimportnest nest1

    import sys

    import nest

  • Google Colaboratorynest""

    import nest
    import nest.voltage_trace
    # Create the neuron models you want to simulate:
    neuron = nest.Create('iaf_psc_exp')
    # Create the devices to stimulate or
    #observe the neurons in the simulation:
    spikegenerator = nest.Create('spike_generator')
    voltmeter = nest.Create('voltmeter')
    # Modify properties of the device:
    nest.SetStatus(spikegenerator, {'spike_times': [10.0, 50.0]})
    # Connect neurons to devices and specify synapse (connection) properties:
    nest.Connect(spikegenerator, neuron, syn_spec={'weight': 1e3})
    nest.Connect(voltmeter, neuron)
    # Simulate the network for the given time in miliseconds:
    # Display the voltage graph from the voltmeter:

  • (1,2)

    !find /usr -name nest -type d



    import sys



    Google Colaboratorynumpy

    import numpy



    How to install SIESTA (in Japanese)

    In English and in Japanese (by Yusuke Fujii, )


    Install YCU "Security Check" on Ubuntu 16.04"

    In Yokohama City University we have a new proxy and security check procedure to access internet. Unfortunately, the instructions on the YCU's website are for Windows and Mac OS only. With the help of YCU's ICT center, we could figure out how to run the security check on linux too (^_^)/*.
    Here is a brief descrition on how to do that:

    In English: and in Japanese:
    (these URLs are restricted. They are visible only within YCU campus)

    Install nupic on Ubuntu

    We used Ubuntu 16.04 and nupic 0.6.0, presumably this procedure will work for your system too.
    1. NUPIC needs python (2.7), PIP (the python package manager), mysql (database server) and GIT (repository manager).
      sudo apt-get install python python-pip mysql-client mysql-server git
    2. Then install nupic with
      pip install nupic (without sudo)
    3. Verify what version of nupic you installed. You can use this command:
      python -c 'from pkg_resources import get_distribution; print "nupic:", get_distribution("nupic").version, "nupic.bindings:", get_distribution("nupic.bindings").version'
    4. Create a directory and download there the folders with the source files from Numenta's GIT repository
      git clone
      Enter the nupic folder and fetch the correct version (for example 0.6.0):
      cd nupic/
      git fetch
      git checkout tags/0.6.0

      (you know your nupic's version from previous step)
    5. Test your installation with
      py.test tests/unit (if it does not work, locate it with locate py.test and execute the test with /path/to/py.test /tests/unit)
    6. If you do not have errors, you are OK (in case: read the error messages and use numenta wiki or google to fix them).

    7. Nupic swarming uses your mysql database. Last step to be fully operational is to activate your mysql server. Use
      service mysql start
    8. then veryfy if you can log in with
      mysql -u root -p
      by default you should be able to login with root and an empty (return) password.
      If you can't, but have another mysql account that works, you can tell nupic to use that. Just go and change the login information in the nupic files. Do this
      pip show nupic
      this will show you where is nupic-default.xml. Make a copy of this file and call it nupic-site.xml (should be in the same folder of nupic-default.xml). Now edit nupic-site.xml and change the database mysql informations (change root to your username and the empty password to your mysql password).
      Now you should be able to login in your database with
      mysql -u yourusername -p
    You are ready to use nupic (try some examples, googleSearch).

    Install Siesta 4.1 on Linux Ubuntu 16.04

    This is a very brief guideline on how to install SIESTA (4.1) on your Ubuntu (16.04) system.

    First, verify that you have the needed libraries, use the following command:

    sudo apt-get install build-essential checkinstall
    sudo apt-get install openmpi-common openmpi-bin libopenmpi-dev libblacs-mpi-dev libnetcdf-dev netcdf-bin libnetcdff-dev libscalapack-mpi-dev libblas-dev liblapack-dev
    sudo apt-get install openmpi-doc libopenmpi-dev libmpich-dev

    Then do the following:
    1. download siesta 4.1 (link)
    2. extract and use the object folder Obj/ inside the main siesta directory.
    3. cd in that folder and then execute the setup script
      sh ../Src/
    4. then you need an arch.make file. You can create one starting from the DOCUMENTED-TEMPLATE.make file. This file should be in your current folder Obj. Edit this file accordingly to your computer architecture.
    5. Once you are ready, save it as arch.make. To compile just use the command
    6. (If it does not compile, check the examples gfortran.make and intel.make or you can attempt to use mine, made for my Ubuntu 16.04. If still you cannot compile you have to read the error messages and the manual)
    7. Once the compiler finishes, you will have the executable "siesta" in the obj folder.
    8. Now you can work. Create and go in another folder. For example
      mkdir ../myWork
      cd ../myWork
    9. put your .fdf and .psf files there. Make also a symbolic link to the siesta executable, with this command:
      ln -s ../Obj/siesta
    10. then run your code, in PARALLEL mode, the command is:
      mpirun -np 4 siesta <gan.fdf> out.dat
      (4 is the number of your processor threads)
    Hope it helps !


    Multiprocessing for biological neuronal network model, by Sun Zhe

    Multiprocessing is a standard library for Python and it is very easy to install into any systems (import multiprocessing). With this library, we can use multiple processors to calculate different processes at the same time.

    As an example to demonstrate the use of this library we realized a small neural network, in which each neuron is calculated in one processor independently. Multiprocessing can not only improve the speed performance, but it is a more exact and reliable approach for realistic neurons.
    Firstly, we use the Izhikevich model to emulate the individual neuron behavior. This model was proposed by Izhikevich and described in the paper.

    We made a python class for an individual neuron (Izhikevich model) IzhikevichClass (by Sun Zhe). Based on this class, we linked a chattering neuron 'm' with a fast spiking neuron 'n'. And we used electric synaptic connection, the difference of the neuron's potential was used as the stimulus signal. In our simulation, we used Gaussian White noise to emulate realistic neural noise, synaptic delay is defined as 0.1 ms.

    To simulate the neuron delay behavior and the stimulus from another neuron, we used module 'Value' and 'Array' in multiprocessing. With these two modules, numbers and arrays can be stored in shared memory. And in the modules, we can use 'd' and 'i' to indicate the double precision float and signed integer. For example, in our program we defined:


    'km' is the loop index for the neuron 'm' that indicates how many loops have been processed. Then we create a process object for each neuron, target is a function to be invoked by start() method.

    p1 = Process(target=neuronM, args=(VsignalM,UsignalM,VsignalN,UsignalN,ww,SNR))

    The method start() will launch the process and the terminate() method will terminate it. Here is the example python file (, it uses the above class and the multiprocessing library. Resulting simulation is in the following figures, where we plotted variation of two coupled neurons. In figure 1 the synaptic strength is 0.1 and the in the figure 2 the value is 0.8. The red and green lines represent the first and second neuron action potentials calculated independently in the two processes.


    June 2014: LaTeX with Japanese fonts (linux)

    We installed Latex in our Ubuntu 14.04. It was difficoult for us to find instructions for the correct production of Japanese text. So, here we list the things you need to install to write in Japanese with LaTeX.

  • texlive-lang-cjk
  • texlive-publisher
  • texlive-metapost
  • latex-cjk-common
  • latex-cjk-japanese
  • latex-cjk-japanese-wadalab

    As a Latex Editor we used TexMaker. In Ubuntu you can find these packages through the package manager synaptic or using the command
    sudo apt-get install
    followed by the name of the package.

    When you have done the installation, you just have to compile your LaTeX file and Japanese should work. Remember that encoding is very important. So your editor should be set to save your LaTeX file in the correct encoding.
    Here there is an example file with the correct settings that should work, link.
    If you have a previous version of Ubuntu latex-cjk libraries are not in the repositories. If this is the case, first add the personal package archive (PPA):
    sudo apt-add-repository ppa:texlive-backports/ppa then update synaptic and follow the instruction as above.

    June 2014

    Master student T. Tsutsumi made a rare "one hour" continous measurementof the luminescence of InGaN material. The measure is done under UV light of 365 nm with a 400 nm filter.

    Very interestingly he discovered several unknown phenomena in the luminescence: local and fast blinking, slow long-term universal variation of luminosity, accumulation of light on blinking points that with time stabilize on confined luminous domains. These are a few phenomena he observed and he is currently studying under various conditions.

    This is a compressed real time video of the measurement: link (90 Mb, 352x288, H.26n). The video have been taken by a Olympus microscope with a sony high speed digital camera at 60 FPS.

    May 2014

    We installed pyQtGraph package in an Ubuntu 14.04 system. This is a publication quality graphic library for scientific data. We think that this library is better than the commonly used "pyplot" library.

    It is very simple to use, graphs are inherently interactive and are fitted with several tools like zooming, saving etc. These tools are similar to pyplot's ones, but more advanced, faster and easier to use.

    Example plots are here, a guide on how to install and test the package in linux is here.


    November 2013

    We installed LuxBlender (a physical optical renderer for the Blender 3D modeler engine) on Blender 2.68 on our Ubuntu 12.04 machines. Here is a step by step tutorial on how to do that.