Training the logD Plugin

This manual gives you a walk-through on how to train the logD Plugin


If you think your experimental data could improve the performance of the default logD calculator, you can take advantage of the supervised logD learning method that is built into the calculator.

The logD method can be trained by applying existing pKa and logP training libraries. For detailed information on training pKa and logP plugins, see the corresponding pKa and logP training manuals.

Applying the training libraries


To apply the pre-generated training library in MarvinSketch, see the following steps:

  • Choose Calculations > Partitioning > logD in MarvinSketch.

  • Select the User defined training method.

  • If you have many logP training sets, you can select the one you want to use for training from the logP training ID dropdown list.

  • If you have many pKa correction libraries, you can select the one that you want to use for training by enabling the Use pKa correction library option, and choosing the library from the dropdown list.

Fig. 1 Applying logP and pKa training libraries for logD training

Test results

Trained value :
pH	logD
7.40	-0.34
Untrained value :
pH	logD
7.40	-0.08


To apply your pKa correction library to train the logD method with cxcalc, use the --pkacorrectionlibrary option :

cxcalc logd --method [method] --pkacorrectionlibrary [library name] [input file/string]

To apply your logP dataset to train the logD method, use the --method main option, combined with the --logptrainingid secondary option :

cxcalc logd --method [method] --logptrainingid [library name] [input file/string]


Trained calculation

cxcalc logd --method user --pkacorrectionlibrary mypka_1 --logptrainingid mylogp_1 --pH 7.4 "CC1=NC2=C(N1)C(O)=NC(N)=N2"

Untrained calculation

cxcalc logd --pH 7.4 "CC1=NC2=C(N1)C(O)=NC(N)=N2"

Test results

Trained value :
id	logD[pH=7.4]
1	-0.34
Untrained value :

id logD[pH=7.4]

1	-0.08

Chemical Terms

Chemical Terms are available from Chemical Terms Evaluator or from instantjchem.


The pkacorrectionlibrary and logptrainingid parameters can be applied as Chemical Terms parameters as well. For example:

evaluate -e "logd('method:[method] pkacorrectionlibrary:[library name] logptrainingid:[id]')" [input file/string]


Trained calculation

evaluate -e "logd('method:user pkacorrectionlibrary:mypkalib_1 logptrainingid:mylogp_1 pH:7.4')" "CC1=NC2=C(N1)C(O)=NC(N)=N2" (trained)

Untrained calculation

evaluate -e "logd('pH:7.4')" "CC1=NC2=C(N1)C(O)=NC(N)=N2"

Test results

Trained value :


Untrained value :

Instant JChem

You can also apply your pKa and logP training libraries via Chemical Terms in Instant JChem as well.

  • Choose the 'New Chemical Terms Field' icon on the panel on the right side.

  • Type the chemical term into the window, use the method, pkacorrectionlibrary and logptrainingid parameters. Do not forget to specify the Name, the Type and the DB Column Name parameters.


The following snapshot shows the training of logD in the New Chemical terms window. The expression

logd('method:user pkacorrectionlibrary:mypkalib logptrainingid:mylogp', '7.4')

defines that the plugin use the mypkalib pKa correction library, the mylogp logP training library at pH 7.4.


Fig. 2 LogD training using Chemical Terms in Instant JChem

Part of the result table is presented below. You can see the difference between the untrained (column LogD_pH7.4) and the trained (column logD_pH7.4_trained_pKa_logD) values.


Fig. 3 JChem table showing the trained and untrained logD values