Jump to content
Geochemist's Workbench Support Forum

[OLD] Controlling GWB from another application


Recommended Posts

From: Joel Brugger

Subject: controlling GWB from another application

I am trying to use GWB to create multi-dimentional solubility plots, and to interpret solubility data. I use MatLab to create script files and alter the thermo database. I then run react, and finally I import the data I need into MatLab from the react_output file. I am NOT a WINDOWS specialist (I run NT4.0), and at the moment, the "trick" I use is very primitive: I just call a DOS command (react -i filename) from MatLab. This causes MatLab to start react, and then to wait until react is closed, which is done thanks to a "quit" command at the end of the script file. It runs fine, but it is damn slow, mainly because of the time taken by react to read the (large) thermo database. Can somebody help me to perform this "external" call in a more efficient way? I read something about DDE, but this is not supported by GWB, is it?


From: Craig Bethke

Subject: Re: controlling GWB from another application

This sounds like an interesting project. The ideal solution would be for MatLab to write React commands to a “named pipe� (as it is known in Unix, probably there is a parallel in NT) which React has open for reading. This way you would only invoke React once. Unfortunately, I'm not sure of the details of accomplishing this, especially at the MatLab end. Perhaps someone else can comment. A couple of suggestions that might be easier to implement: Can you do this in two steps: set up an input file for a number of calculations in a single React run (you can separate the output files with the “suffix� command, and use the print and plot commands to keep the output to a manageable size), then a MatLab run to accumulate and display the results? Alternatively, you could speed things up considerably by editing out the the thermo data to eliminate unnecessary species, etc. I suspect that this would make a big difference (remember to edit a copy of the thermo data, not the dataset itself!).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...