Hi everyone, I faced an issue to convert a *.sub and/or *.asy file from LTspice to Qspice. Is there any idea how to convert it? Thank you.
A .sub file is just a subcircuit netlist, which is generally universal between SPICE simulators unless it is encrypted or contains device types unique to LTspice (such as A-device).
An .asy file is an LTspice symbol, which is similar to a .qsym file for a QSpice symbol. There is no automated conversion for these files (except someone developed that); in general, you have to redraw the symbol in QSpice.
You can upload the .sub file to the forum, and can show you the workflow for creating a QSpice symbol from it.
Unfortunately, I could not upload the sub file to this forum. Here is an example LTspice circuit that contain a sub file.
Download File
The link you provided is to download a .asc file, which is a LTspice schematic file. If you have LTspice XVII installed, LT3751.sub can be found in your Documents folder under \LTspiceXVII\lib\sub\LT3751.sub.
Unfortunately, if you open this .sub file with a text editor, you will see it is an encrypted model (<Binary File>), meaning it can only be run by LTspice. Manufacturers like Analog Devices and TI etc… often protect their subcircuit netlists by encrypting them for their own SPICE platforms. Once encrypted, that subcircuit netlist can only be decrypted by that specific SPICE software. In short, there is no way for QSpice to run the LT3751 unless AD provides an unencrypted version. Furthermore, even if Analog Devices were willing to do so, their models commonly contain A-devices, which are proprietary and not supported by QSpice. In conclusion, if you must work with Analog Devices ICs, you generally have to use LTspice—unless you only work with device with generic SPICE model provided in LTspice library.
You can rename the .sub extension to .txt to upload the file, as a .sub file is just a text file. However, in this case, because the model is encrypted, nothing can be done to help.
Thank you for the very understanding explanation, Kelvin.