@@ -31,53 +31,53 @@ If there is no transport, put only the mech and therm file. Example: C:/Users/me
The mech1 is by default the core mechanism and mech2 the mechanism to translate.
The other lines can be in any order.
"task" is an optional keyword that controls whethe a full merging or a sub-mechanism extraction is wanted. Default is full merging. Example: task=full or task=extraction
**"task"** is an optional keyword that controls whethe a full merging or a sub-mechanism extraction is wanted. Default is full merging. Example: task=full or task=extraction
"depth" is an optional keyword for extraction task. It controls the maximum number of loop the extraction step does. Default is no maximum (1e10). Example: depth=3
**"depth"** is an optional keyword for extraction task. It controls the maximum number of loop the extraction step does. Default is no maximum (1e10). Example: depth=3
"mech_to_extract" is a MANDATORY keyword for the extraction task. It controls wich species sub-mechanism to extract. Example: mech_to_extract=ic8h18, nc7h16
**"mech_to_extract"** is a MANDATORY keyword for the extraction task. It controls wich species sub-mechanism to extract. Example: mech_to_extract=ic8h18, nc7h16
"translation" is an optional boolean used to enable or disable the translation step. It is only useful if there is already a tmp_species_traduction.tmp or .inp file generated previously.
**"translation"** is an optional boolean used to enable or disable the translation step. It is only useful if there is already a tmp_species_traduction.tmp or .inp file generated previously.
If the two mechanisms have the same translation, it is also possible to disable the translation and create an empty tmp_species_traduction.inp. Example: translation=True
"n" is an optional keyword that controls the maximum number of permutations that are allowed in method 2. If the number of possible permutations in an isomer group is greater than n, then only method 1 will be used. Example: n=10000
**"n"** is an optional keyword that controls the maximum number of permutations that are allowed in method 2. If the number of possible permutations in an isomer group is greater than n, then only method 1 will be used. Example: n=10000
"introduction" is an optional keyword used to customize the first lines of the merged mechanism. Example: introduction=test!?!
**"introduction"** is an optional keyword used to customize the first lines of the merged mechanism. Example: introduction=test!?!
"string_to_del" is an optional keyword used to remove species containing a specific string. Example: string_to_del=bb, pb, c6h5c3, c6h5c4, cyc
**"string_to_del"** is an optional keyword used to remove species containing a specific string. Example: string_to_del=bb, pb, c6h5c3, c6h5c4, cyc
"list_to_del" is an optional keyword used to remove specific species. Example: list_to_del=a1c2hac, a1c2h3ac, a2-x, a2o
**"list_to_del"** is an optional keyword used to remove specific species. Example: list_to_del=a1c2hac, a1c2h3ac, a2-x, a2o
"order" is an optional keyword used to control which mechanism as priority on which part of the mechanism. Possible input are "kt", "k", "t", "n".
k = model_core main for kinetic data and model_to_translate main for thermo data.
t = model_to_translate main for kinetic data and core_mechanism main for thermo data.
kt = model_core main for kinetic and themo data.
n = model_to_translate main for kinetic and thermo data.
Default order task is kt. You can also specify a list of order to generate multiple mechanism in the form "order=order1, order2, order3, ..."
**"order"** is an optional keyword used to control which mechanism as priority on which part of the mechanism. Possible input are "kt", "k", "t", "n".
**k** = model_core main for kinetic data and model_to_translate main for thermo data.
**t** = model_to_translate main for kinetic data and core_mechanism main for thermo data.
**kt** = model_core main for kinetic and themo data.
**n** = model_to_translate main for kinetic and thermo data.
Default order task is **kt**. You can also specify a list of order to generate multiple mechanism in the form "order=order1, order2, order3, ..."
ORDER FOR EXTRACTION_MERGING IS ALWAYS SET TO "kt" !!!
Example: order=k
### How to use :
Once the input created, use "python Main_exe_1.py input". A tmp_species_traduction.tmp file will be created. This file contains all the temporary translation done by the code and also which translation needs to be done manually.
This file is separated by isomer group. Each isomer group start with its composition (example: c1 o1 h1).
The next line contains all translation possible contained in mech1.
Then, each isomer for mech2 is presented, associated with its translation or a possibility of translations.
Each line starting with !CHECK needs to be looked carefully. Choose the right translation and remove the !CHECK or the species will be treated as if there is no translation.
If you want to remove a translation, you can comment the line with "!" or change the species with a None.
Everything after a "!" on a line will be treated as a comment.
species1: This is the species name given by the first translation method.
species2: This is the species name corresponding to the best arrangement found by the second translation method.
species3: This is the species name corresponding to the second-best arrangement found by the second translation method.
An arrangement here refers to the match found between all the species to be translated (in the isomer group) and all the species used for translation (in the isomer group). The best arrangement is the one with the minimum mean normalized mean absolute difference (mean NMAD).
Second list [value1, value2, value3]
value1: This is the direct NMAD between the species_to_translate and species1, given by the first method.
value2: This is the mean NMAD for the best arrangement of the whole isomer group, given by the second method.
value3: This is the mean NMAD for the second-best arrangement of the whole isomer group, given by the second method.
Once you are satisfied with the translation, copy the file and change the ".tmp" to ".inp". Now you can use "python Main_exe_2.py input".
Once the input created, use "python Main_exe_1.py input". A tmp_species_traduction.tmp file will be created. This file contains all the temporary translation done by the code and also which translation needs to be done manually.
This file is separated by isomer group. Each isomer group start with its composition (example: c1 o1 h1).
The next line contains all translation possible contained in mech1.
Then, each isomer for mech2 is presented, associated with its translation or a possibility of translations.
Each line starting with !CHECK needs to be looked carefully. Choose the right translation and remove the !CHECK or the species will be treated as if there is no translation.
If you want to remove a translation, you can comment the line with "!" or change the species with a None.
Everything after a "!" on a line will be treated as a comment.
species1: This is the species name given by the first translation method.
species2: This is the species name corresponding to the best arrangement found by the second translation method.
species3: This is the species name corresponding to the second-best arrangement found by the second translation method.
An arrangement here refers to the match found between all the species to be translated (in the isomer group) and all the species used for translation (in the isomer group). The best arrangement is the one with the minimum mean normalized mean absolute difference (mean NMAD).
- Second list [value1, value2, value3]
value1: This is the direct NMAD between the species_to_translate and species1, given by the first method.
value2: This is the mean NMAD for the best arrangement of the whole isomer group, given by the second method.
value3: This is the mean NMAD for the second-best arrangement of the whole isomer group, given by the second method.
Once you are satisfied with the translation, copy the file and change the ".tmp" to ".inp". Now you can use "python Main_exe_2.py input".
### Example :
Two example are available in this project. They contain the two mechanisms and the input for the two tasks possible (extraction_merging.txt and full_merging.txt).