Use your own model

If the models present in the libraries do not suit your needs, you can write a model yourself. You can either start completely from scratch or adapt a model existing in the libraries. In both cases, the syntax of the Mlxtran language is detailed on the mlxtran webpage. You can also copy-paste models from the mlxtran model example page.


Writing a model from scratch

  • 8.case_studies/hcv_project (data = ‘hcv_data.txt’ , model=’hcvNeumann98_model.txt’)

In the Structural model tab, you can click on New model to open the mlxEditor, and start writing your own model. When you are done, save your model file as .txt file, close the editor and use the Browse button of Monolix to find and select your new model file.

You can even create your own library of models. An example of a basic library which includes several viral kinetics model is available in the demosĀ 8.case_studies/model.


Note: Before closing the model file, we recommend using the “Compile” button of the mlxEditor (see image below) to check that there is no syntax error in the model. In case of error, informative messages are displayed to help correct the error.


Understanding the error messages

The error messages generated when syntax errors are present in the model are very informative and quickly help to get the model right. The most common error messages are explained in detail in this video.


Modifying a model from the libraries

Load an existing model using the Load from library button, and then click on Open in editor to open the model file in the MlxEditor. There you can adapt the model, for instance to add a PD model. Be careful to save the new model under a new name, to avoid overwriting the library files.

The video below shows an example of how a scale factor can be added:

See the dedicated webpage for more details on model libraries.