The netlist that is produced by the python code is the same as the above except that instead of .save all @mn[gm] @mn[gds] @mn[id], it has .save @mn[gm] @mn[gds] @mn[id]. The all is removed from the netlist.
I tracked down the cause and it seems that you are making two calls to the __str__ function here. The first call removes the word all (see here) from self._saved_nodes. The call before the circuit is passed to the simulator (see here) also makes a call the __str__ method to build the netlist. At this point, the "all" in "save all" is completely lost.
Environment (OS, Python version, PySpice version, simulator)
OS: Manjaro Linux Python version: 3.10 Pyspice version: 1.5 Simulator: ngspice
The correct netlist above should be:
The netlist that is produced by the python code is the same as the above except that instead of
.save all @mn[gm] @mn[gds] @mn[id]
, it has.save @mn[gm] @mn[gds] @mn[id]
. Theall
is removed from the netlist.I tracked down the cause and it seems that you are making two calls to the
__str__
function here. The first call removes the wordall
(see here) fromself._saved_nodes
. The call before the circuit is passed to the simulator (see here) also makes a call the__str__
method to build the netlist. At this point, the "all" in "save all" is completely lost.