TWQ_CombTWQ_Comb: the program for automatic generation of all possible combinations of selected mineral analyses and for their processing by CMP.EXE and TWQ.EXE programs (from the TWQ package of R.G. Berman et al.) running in the batch mode

TWQ_Comb is a ©MS Windows freeware for automatic generation of all possible combinations of selected microprobe analyses and for their processing by the [win]CMP.EXE and [win]TWQ.EXE programs (from the TWQ or winTWQ packages of R.G. Berman et al.) running in the batch mode. You can run DOS versions of TWQ programs under 64-bit OS (like Windows Vista, 7, 8 and 10) due to implemented support of one of two DOS emulators (DOSBox or vDOS) which should be loaded and installed by yourself. Input files for TWQ_Comb have very simple plain text format and can be easily prepared e.g. in the ©MS Excel. The program generates large sets of compositional (*.CMP) and diagram (*.P1) files that can be loaded to the TWQ_View program for their analysis and further processing. You can read also some important notes about permutational approach in geothermobarometry.
 How to work with TWQ_Comb, CMP and TWQ programs (basic operations demo, versions prior to

Big update from 03/28/2022. The most significant changes are related to the addition of support for Windows versions of the winTWQ package:

  1. The Win checkbox selects the DOS or Windows version of TWQ. The directories and executable files of both packages are specified using the [win]TWQ directory button at the top of the program window.
  2. For the convenience of working in batch mode with winCMP and winTWQ, a special service utility AppCtrl can be used, which takes full control over the programs.
  3. For the DOS version of TWQ, support for an alternative DOS emulator vDOS has been added, which is noticeably faster than DOSBox (but to the detriment of the correct display of TWQ graphics windows).NB! With incorrect security settings on Windows, the vDOS emulator may crash with the message "vDOS should not run elevated". A simple solution is to put the line "ADMIN=ON" in his config.txt file.
  4. It has now been decided not to use different extensions for composition files in winTWQ (CM1, CM2 and CM3) due to the complexity of manipulating them, so TWQ_Comb renames them to CMP. However, information about the original extension, as well as the database and the creation program, are stored in the CMP_INFO.TXT file. The database is selected when reloading the table, and the original extension is shown in the program window under the list of minerals.
  5. For restart files, names consisting of the package version flag (DOS or Windows) and the database abbreviation are now used instead of the standard RESTART.RES, for example: W-DEC06.RES.
  6. Some of the variables in the INI file changed their format and new ones were added.
  7. Help file updated. Pay attention to the "Requirements and installation" section.

In addition, the winTWQ package is expected to be updated with some improvements and bug fixes. The latest versions can be found at the new TWQ site Although this site is currently still under construction. Hope this new version will be available soon!


I can not download from link ''DOS versions of the TWQ package''. Can you give alternative link for download.
thank you

Здравствуйте, у меня возникает проблема при включении приложения выскакивает окно с такой надписью "Cannot open Ptaxcon.fig file, check pathto thr TWQ package in the TWQ_comb.ini file!",не подскажите как с этим бороться?

DimaDD's picture

Hi Mete,
I've copied zip-archive with DOS versions of the TWQ package ( from the NRC site to my Google Drive and Yandex Disk.

DimaDD's picture

Здравствуйте, Михаил!
Это сообщение означает, что программа не может открыть конфигурационный файл DOS-версии пакета TWQ, который имеет название PTAXCON.FIG. Скорее всего потому, что в инициализационном файле программы TWQ_Comb.ini не указан путь к пакету TWQ, он там задаётся, как значение ini-переменной "TWQ=".

В документации к программе (TWQ_Comb_Rus.chm) в конце раздела "Требования и установка" довольно подробно описаны подготовительные действия, которые надо произвести перед первым запуском TWQ_Comb.

P.S. Если Windows не показывает содержимого справочных файлов (например, TWQ_Comb_Rus.chm), то это значит, что они заблокированы системой, тогда надо в свойствах CHM-файла (последний пункт системного меню на правой кнопке мыши в проводнике) найти и нажать кнопку "Разблокировать".

I use Win8 64 bit. I installed DosBox emulater. In TWQ_Comb program, DosBox button is checked and disable. When I press the CMP button to run the program CMP.EXE. I get 'not responding'notice in TWQ-Comb adress line. How can I fix this case ?

DOSBox=C:\Program Files (x86)\DOSBox-0.74

DimaDD's picture

I also recognized (on Win7 64 bit) that sometimes TWQ_Comb+DosBox fails if data files or TWQ_Comb program are placed to the system Desktop folder. I didn't investigated this behaviour in details yet. It's better to use another non-system folders (like C:\GEO\Data, C:\GEO\TWQ, etc.). Some trash may appear in the BATCH.DAT file (in the TWQ package) after juggling with folders, leading to permanent "not responding" notice: it looks like messy path-like data in the second line, so, delete this line.
"DosBox" is checked and disabled: the program have detected a 64-bit OS, therefore DosBox is the only possible option.

xiao-qiang's picture

I have some troubles of setting up the TWQ_Comb.
In my TWQ_Comb.ini file, I modified as follows:
DOSBox=C:\Program Files (x86)\DOSBox-0.74\
And I have downloaded the DOS version of TWQ follow your link and unzip all of them in the same folder.
When I ran the TWQ_Comb.exe, it told me that "Error: unknown DataBase file C:\TWQ\Jun92.gsc in the PTAXCON.FIG file, check DB variables in the TWQ_Comb.ini"
Do you have any idea?
If you could offer a portable package, that would be great.
Thanks for the wonderful works you've already done. These tools are useful and interesting.

DimaDD's picture

Look inside TWQ_Comb.ini, at the "TDB" variables: they specify file names of database files. I've placed there records for two databases: "Berman, 1992" (JUN92, we call it "amphibolitic" in our group:) and "Berman & Aranovich, 1996" (BA96A, aka "granulitic"). However, (downloaded from the NRC site) contains BA96A database only, JUN92 is in the So, TWQ_Comb couldn't find the JUN92 database. The best solution is to copy files JUN92.GSC and JUN92.SLN from to your TWQ folder (you can use both databases with TWQ v.2.02).
Yeah, those paths and file names...((( I should investigate possibility of the fully portable package, this is multiparametric problem...

xiao-qiang's picture

yes, it works.
however, I met new problem.
When after CMP procedure, it pops out the DOSbox and proceed the oxi files. After that, the program gets no responding...
I tried in the Win8.1 X64 and my virtual machine winxp x86.
Do you have any idea?
Do you run them in Windows XP x86 with DOSbox?
Thanks for your patience.

xiao-qiang's picture

Never mind.
I can use the tranditional method to get the TWQ results.
I just use the TWQ_view to view my results. This tool is useful and saves a lot of time to find the useless end-member.
Thanks all the same:D.

DimaDD's picture

I found that sometimes the program gets no responding after changes of paths (e.g. of the TWQ package) leading to messy path-like records in the second line of the BATCH.DAT (which is one of the TWQ files). This erroneous record causes TWQ_Comb/DosBox interface problems and hanging of TWQ_Comb. I didn't investigated this behaviour yet.
Yes, usually I use TWQ_Comb with DosBox under Windows XP x86.

I would like to download, but I can't find it? please can you help me with that

DimaDD's picture

You can download with all DOS versions (including here: