Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| recherche:softs:thermocalc [29/01/2025 16:30] – [Utilisation de TC-Python :] julien.favre | recherche:softs:thermocalc [19/06/2025 17:13] (Version actuelle) – jules.lhostis | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | |||
| - | |||
| ===== Connection to the Thermo-Calc PC using X2Go: ===== | ===== Connection to the Thermo-Calc PC using X2Go: ===== | ||
| Ligne 14: | Ligne 12: | ||
| - **Username: | - **Username: | ||
| - **SSH Port:** 22 | - **SSH Port:** 22 | ||
| - | - **Session Type: | + | - **Session Type: |
| 4) Leave the other options as default and save the session. | 4) Leave the other options as default and save the session. | ||
| Ligne 25: | Ligne 23: | ||
| - **Login:** Lic-100117@thermocalc.com | - **Login:** Lic-100117@thermocalc.com | ||
| - | - **Password: | + | - **Password: |
| - | FYI, this activation will generate a permanent key somewhere in your "home folder," | + | FYI, this activation will generate a permanent key somewhere in your hidden files, eliminating the need to repeat this process for future uses. |
| - | 8) **/!\ Once finished, properly close Thermo-Calc!** | + | 8) **/!\ Once finished, properly close the session!** |
| Disconnect by clicking the **Start Menu** -> **Logout**. In the popup window, click **Log out**. | Disconnect by clicking the **Start Menu** -> **Logout**. In the popup window, click **Log out**. | ||
| **Never shut down the PC**, as it would make it inaccessible to all users. | **Never shut down the PC**, as it would make it inaccessible to all users. | ||
| Ligne 109: | Ligne 107: | ||
| ``` | ``` | ||
| (Replace **XXX** with the process ID from `top`.) | (Replace **XXX** with the process ID from `top`.) | ||
| + | |||
| + | ----------------------------------------- | ||
| + | |||
| + | **Alternative file transfer method (SSH/Linux) - SSH-X/ | ||
| + | |||
| + | If you are connecting to the remote pc with **SSH**, you can ' | ||
| + | |||
| + | 1) Install **sshfs** via your package manager (ex: `apt install sshfs` on unbuntu) | ||
| + | |||
| + | 2) Create a folder (directory) on **your** computer to act as a mount point (ex: `mkdir ~/ | ||
| + | |||
| + | 3) Use the following command to mount the remote pc folder to the one you just created : | ||
| + | ``` | ||
| + | sshfs -o idmap=user <your EMSE id> | ||
| + | ``` | ||
| + | | ||
| + | to be sure about the right path on the remote server, when in ssh, you can type `pwd` which will show you the path to the current (remote) folder | ||
| + | |||
| + | 4) *Extra tip* you can even create an alias in your (*local*) terminal to not have to type this big command : | ||
| + | - Edit your (*local*) `~/.bashrc` file and add this at the end of the file (if I am M. Jean Bon, creating the alias `mountemse` or whichever name you choose) : | ||
| + | |||
| + | ``` | ||
| + | # Custom aliases | ||
| + | alias mountemse=" | ||
| + | ``` | ||
| + | | ||
| + | - Then restart a terminal session so that the change can go into effect, and type the command `mountemse` and after a password prompt, you will mount your remote folder on the thermocalc pc on your local machine, so that you can access its content from your file manager seamlessly. | ||
| + | |||
| + | |||
| + | ----------------------------------------- | ||
| + | |||
| ===== Scripting with TC-Python : ===== | ===== Scripting with TC-Python : ===== | ||
| Ligne 116: | Ligne 145: | ||
| 🔗 [TC-Python Documentation](https:// | 🔗 [TC-Python Documentation](https:// | ||
| - | ### **Using TC-Python** | + | **Using TC-Python** |
| - | To use **TC-Python**, you need to launch a **Python IDE**. | + | |
| + | To use TC-Python, you need to launch a Python IDE. | ||
| The recommended IDE is **Spyder**, as it directly utilizes the libraries installed on the PC without requiring a virtual environment. | The recommended IDE is **Spyder**, as it directly utilizes the libraries installed on the PC without requiring a virtual environment. | ||
| - | #### **How to launch Spyder: | + | Click on the **Spyder** icon in the **Programming** section of the Start Menu. |
| - | - Open a terminal and type: | + | |
| - | ``` | + | **First-Time Setup** |
| - | spyder | + | |
| - | ``` | + | |
| - | - Alternatively, | + | |
| - | ### **First-Time Setup** | ||
| Once the IDE is launched, make sure to import the **tc_python** library. | Once the IDE is launched, make sure to import the **tc_python** library. | ||
| Ligne 134: | Ligne 160: | ||
| / | / | ||
| ``` | ``` | ||
| - | Executing this script will prompt you to enter your **username and password** (the same credentials as before). This process will generate a **permanent key**, stored in hidden folders, so you won’t need to repeat this step in the future. | + | Executing this script will prompt you to enter your **username and password** (the same credentials as before). This process will generate a permanent key, stored in hidden folders, so you won’t need to repeat this step in the future. |
| + | |||
| + | **Running Scripts with TC-Python** | ||
| - | ### **Running Scripts with TC-Python** | ||
| Once set up, you can develop or run scripts with **TC-Python**. Example scripts are available at: | Once set up, you can develop or run scripts with **TC-Python**. Example scripts are available at: | ||
| ``` | ``` | ||
| Ligne 142: | Ligne 169: | ||
| ``` | ``` | ||
| - | ### **Documentation** | + | **Documentation** |
| You can also access the official documentation at: | You can also access the official documentation at: | ||
| ``` | ``` | ||
| Ligne 220: | Ligne 248: | ||
| # GM(bcc) : énergie de Gibbs molaire de la phase bcc | # GM(bcc) : énergie de Gibbs molaire de la phase bcc | ||
| # HM(*) : enthalpie molaire de toutes les phases | # HM(*) : enthalpie molaire de toutes les phases | ||
| + | |||
| + | # Some of the state variables that can be used in conditions are: | ||
| + | T | ||
| + | P | ||
| + | N total system size (in moles) | ||
| + | B total system site (in grams) | ||
| + | N(< | ||
| + | X(< | ||
| + | B(< | ||
| + | W(< | ||
| + | ACR(< | ||
| + | MUR(< | ||
| + | N(< | ||
| + | X(< | ||
| + | B(< | ||
| + | W(< | ||
| + | ACR(< | ||
| + | MUR(< | ||
| + | H | ||
| + | HM(< | ||
| + | |||
| + | |||
| </ | </ | ||