Using ngspice with root

Hello,
I have not found any hint of it, so I ask the question here :
Has there been or is there an attempt to interface ngspice with root ?
It would be interesting to take advantages of the graphic interface of Root to display the results of ngspice simulations.
A shared library exists for ngspice :
http://ngspice.sourceforge.net/shared.html
So I wonder if it would be a great job to interface both systems.

Thanks in advance
Marc

A such interface does not exists. If it is written in C++ you may try to load the code directly in ROOT ā€¦ who knows, it may work :slight_smile:
Then ā€œtaking advantages of ROOT graphicsā€ may be seen at different levels. You may want to plot high level object like histogram and graph or use the low level graphics capabilities of ROOT to draw ngspice objects. I do not know ngspiceā€¦ so it is difficult to give you more details.
If ngspice has some output capabilities you can also generate data in ā€œngspice formatā€ and then implement a "reader"in ROOT to transform this data in something ROOT can draw,

Thank you Olivier for your answer.
For the moment I write csv files from spice and read them with root to
display the signals.
If I have some time I will try to write some kind of TSpice class to
launch spice from root,
Reading the netlist in root and transfer it to ngspice, then read back
the output signals.
I will let you knowā€¦ but perhaps not tomorrow :slight_smile:

Of course, first try to load the library in Root.

Best regards
Marc

Hello
It seems that a part of the job has already been done by cern people by
interfacing ngspice with Kicad.
https://git.launchpad.net/kicad/tree/eeschema/sim
I will have a look and see if I can transport the interface to Root.
Best regard
Marc

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.