numat / RASPA2

NO LONGER UPDATED. Use the official repository.
https://github.com/iraspa/RASPA2
Other
73 stars 72 forks source link

RASPA2 & IPython Notebook #43

Open almolsim opened 5 years ago

almolsim commented 5 years ago

Hi everyone,

I am using RASPA2 without any problem from the command line (simulate sim_isotherme.input) but I am having trouble lauching it from IPython Notebook. Being in the right directory, the following commands do not produce any result or error (the program is just running empty) : import RASPA2 RASPA2.run_script("sim_isotherme.input", structure=None, stream=True)

Can anybody help? Thank you very much!

KunhuanLiu commented 5 years ago

Instead of calling simulate, the binary file of compiled Raspa program, you are now using the Python wrapper instead. If you look at the python function _runscript, you should notice that the output is directed to the stream (stdout) instead of generating an output file in the folder.

The output (streamed, which only works under linux system) should be a return value of your invoked function.

Let me know if this helps.

almolsim commented 5 years ago

Thanks for the answer. The non-streamed version works from IPython Notebook (outputs are created in the current directory), but the streamed version is "running empty" (there is no return value). I add that I am using an emulated version of Linux with VirtualBox. Any idea?

KunhuanLiu commented 5 years ago

I don't use IPython or emulated Linux, so I unfortunately cannot help resolve the issue. Based on what you have said, it seems that the streaming will not work with the emulated Linux system. You can confirm if this is causing the problem instead of IPython environment by trying in your command line "simulate -s XXX" (XXX as your usual inputs, -s tells the program to run in stream mode).

almolsim commented 5 years ago

The command "simulate -s -c XXX.cif XXX.input" works in the command line. Strange ...