SRIM plus Linux over Wine (SRIM+(LINUX/WINE))

SRIM Scattering

SRIM, “The Stopping and Range of Ions in Matter” is an useful program for Nuclear Physicists and Engineers, and now it comes in the 2008 version. But…

Unfortunately if you try to run on wine, your mileage may vary. It’s a pity because a lot of Nuclear Engineers colleagues run Ubuntu on their PCs, or just Linux.

——————————————–

As from version 2011, SRIM installation does not need any manual operation after installation. Installing is extracting an SFX file and the VERSION file issue on WINE is not there anymore.
I’m leaving all the past notes here for anyone using the older versions.
Thanks to everyone who will report sucess and issues here or directly to the wine APPDB page.

srim_on_ubunut_over_wine_under_xp
srim_on_ubunut_over_wine_under_xp

UPDATE (14/Jan/2009): thanks to Stano Antalic(smyonpa  on Gmail e-mail)  and this post http://bugs.winehq.org/show_bug.cgi?id=10558 I was able to find an alternate fix that does not involve creating a new VERSION file or taking it from a windows installation. The file is reguarly created under a Data\verXXXX.tmp name,  the installer probably just fails renaming it or copying it into VERSION that remains empty. Simply copying it over the empty VERSION fixes the issue.
Read a step by step HOWTO  about it on the winehq mantainer page (myself)

http://appdb.winehq.org/objectManager.php?sClass=version&iId=13202

it should be ok for SRIM2006 too, but cannot confirm. Someone can?

—————————–

Before applying the following steps, please read the HOWTO above.

While recovering between study sessions, I tried to find some info about the issue. After a bit of Googling, I found this post @WineHQ (t.t xerox_xerox2000 at yahoo.co.uk), where an explanation of the issue is given. The problem is file SRIM 2008/Data/VERSION that is created empty during the Wine installation. If you replace it with the proper file, say from the same windows installed version, SRIM will run flawlessy.

File content for my Windows file where

———cut here————
SRIM-2008.03

SRIM software version.

See VERSION.rtf for details.
———cut here————

Of course it may not work if you have a different version. I think it should. I suspect I must be running version 2008.4 on wine but I used VERSION file from 2008.3. I will look better into this later. As a matter of fact, I’ll try to see if we can solve the problem…
More on this later. HANW.

Tested on wine-1.0.1, SRIM 2008.4, Ubuntu Intrepid Ibex 8.10 on x86 32bit.

UPDATE: I can confirm the file data/VERSION is used during program operation. An intro screen is displayed the first two times you run the program, and the Version value in the right upper corner is fetched from data/VERSION. In turn, I strongly suspect the first row from version.rtf is fetched during installation using ADO to determine program version. Thus, installation over “stock”WINE probably fails opening correctly version.rtf and fetching the first row, giving birth to a 0 bit data/VERSION file, which in turns, wreaks havoc when the splash screen tries to show the program version the first two times we run the program after installation.
The shortest path to victory seems to me asking James Ziegler to use a different method to determine the program version during runtime, or resort to creating the correct file manually.
I’d like to do some regression tests to confirm everything is actually running well under WINE.
More on this later.BB

Another useful information from daid:
“Another useful tip is that the TRIM.DAT input files must be in DOS format (End of File with ^Z) and not UNIX format (End of File with ^D). For files created by SRIM through wine, this should be no problem.
However, if you have code to create TRIM.DAT files (say, C++ routines for input into TRIM), then you’ll need to convert the file type. This can be done many ways, for example with the command line tool dos2unix, or in many editors, such as vim, by :set ff=dos”

19 commenti su “SRIM plus Linux over Wine (SRIM+(LINUX/WINE))”

  1. Does SRIM 2008 really run flawless for you? Running any demo in “TRIM calculation” leads to a “Run-time error ’13’: Type mismatch (using Crossover Mac 7.1.0). But the hint with the VERSION file also worked for me. Thanks.

    Rispondi
  2. miscellaneousdebris: I added a screenshot of a TRIM simulation over ubuntu with Wine. The underlying system is Windows, as you can see from the vmware player.
    (I had no real linux machine at reach, but works also there, I can confirm it).
    I don’t know…it’s a very generic error and Crossover is very similar to Wine, but it’s not the same. I would look how’s going under the hood, I mean, has Crossover some sort of logging facility?
    looking at the wine output is how I discovered the issue, and then with a Google help…

    Rispondi
  3. Fabulous! I guess I should try similar tricks for other programs that fail in wine (copy the installed directories from my XP partition).

    @miscellaneousdebris: you can use fink to install wine and then it will run fine on Leopard, I can confirm. I also suggest installing KDE as you X window manager, but I digress…

    Rispondi
    • Glad to hear it works for you. By the way it depends: it often depending on Windows Original DLL…Wine permits to employ them. Sometimes it could be necessary to do it as well.
      In this particular case, I asserted SRIM is doing something like ths on installation: it fecthes the version number from the .rtf history file of changes.
      Maybe Wine can’t handle this during installation and that’s why VERSION is empty created.
      More on this soon….

  4. Another useful tip is that the TRIM.DAT input files must be in DOS format (End of File with ^Z) and not UNIX format (End of File with ^D). For files created by SRIM through wine, this should be no problem

    However, if you have code to create TRIM.DAT files (say, C++ routines for input into TRIM), then you’ll need to convert the file type. This can be done many ways, for example with the command line tool dos2unix, or in many editors, such as vim, by :set ff=dos

    Rispondi
    • Hi daid,
      thanks for your important contribution. As I’m the Wine SRIM mantainer, I would like to put the suggestion on the Wine Srim page, citing you.
      Or maybe you’d like to contribute yourself directly.
      Thanks again

  5. If anyone has a suggestion on how to modify the SRIM download, I am always open to new ideas. I have no idea why the file “Version” becomes empty, when none of the other files get corrupted.

    James Ziegler, SRIM Guardian

    Rispondi
  6. Dr. Ziegler
    Thanks for your message.
    At first glance I don’t think it’s a SRIM related issue, but rather a Wine issue.
    I can confirm in fact that a temporary file VERSION file is correctly created under the data/ directory but the VERSION file remains empty.
    Moving the content of the temporary file to VERSION fixes the issue.
    Before taking action on the SRIM code I think it’s better to have a deeper look into this on the Wine side, maybe with a newer WINE version.
    Another thing I would like to do it i would be to run some sort of regression against the Windows version result to ensure that the Wine version is giving exactly the same results.
    I hope I will have more time to look onto this when I’m off with my Nuclear Plants exams.
    Of course, if you are interested I’ll keep you posted with the results.
    Regards,
    Giuseppe Dia

    Rispondi
  7. Please let me know if there are fundamental problems. People have been trying to port SRIM for many years, with limited success. But you seem to have made progress. If you need me, you can reach me at [email protected]. I don’t normally follow this forum, so that is the best way to get my help. Jim Ziegler, USNA Annapolis, MD

    Rispondi
  8. I just installed the latest (SRIM 2010.01) through Wine 1.3 on Ubuntu (1.3 is current beta branch, but 1.2 was released not long ago, so I find no reason to believe that the experiences should be different with 1.2).

    I ran the SRIM unpacker and unpacked the setup files to c:\Program Files\srimsetup (that is, ~/.wine/drive_c/Program\ Files/srimsetup on the Linux file system).

    I needed to have the directory with the setup files in my path to run the setup, e.g. by

    cd ~/.wine/drive_c/Program\ Files/srimsetup
    wine SETUP.exe

    I choose to install in the standard directory, c:\Program Files\SRIM.

    The setup program crashed in the end, but the program was installed. It had created the SRIM\Data\VERSION file with the correct contents. I could the run the program by

    cd ~/.wine/drive_c/Program\ Files/SRIM
    wine SRIM\ 2008.exe

    I could also use the full functionality of the program, as far as I tested at least (generating stopping/range tables, performing TRIM calculations and seeing the graphical result).

    Rispondi
  9. Please note that SRIM-2011 is now available at http://www.SRIM.org. There have been major changes, and full 3-D plots available. The installation is totally different from the old method (which was dependent on a Windows system), and it should install easier in a Wine environment.

    Rispondi
    • I already updated WINE appdb (please see http://appdb.winehq.org/objectManager.php?sClass=version&iId=23386) and tried both version (standard and professional).
      I did not create two different profiles for both version, as I understand they are not different at the application level or licensing terms. Please correct me if I’m wrong.
      I did a quick test and everything, from installation to result saving seems to work flawlessly with no further operations required on an ubuntu maverick 10.10 x64 box with wine-1.3.19
      Thank you for providing this new version and for taking the time to improve WINE compatibility.

  10. Respected Sir,
    i want to install SRIM 2013 in my computer! but i did not do this after lot of tries, kindly give me the details , how to install SRIM 2013 in windows 7. waiting your kind reply

    Mohsin

    Rispondi
    • Dear Mohsin,
      downloading the archive you’ll find a file named SRIM ReadMe (-2011).rtf. Inside you’ll find the relevant information for Win7.
      Regards,

Lascia un commento

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.