Only users with access to Makya's Admin page can set up a new API.
In the upper right corner of Makya, click on your account name, then on Admin page.
APIs can be found and set up in the "Scoring APIs" tab. To create a new API, click on the Add scoring API button.
API Details
Next, the user can specify:
- the API name,
- the URL for the API endpoint,
- and any additional parameters (authentication type, custom payload) that are required.
Scores
Add a new score by clicking on Add API field.
The user needs to specify:
- A score Name that will be displayed in Makya;
- Either:
- the Index in returned scores, which is the index of the desired score in the API response, starting at 0;
- or the Name in returned scores, which is the name associated with the desired score in the API response.
To save the newly created API, click on Create.
Test the API
To test that the API is correctly set up, click on the Test button.
A window opens that lets you type SMILES to test that the API indeed returns the expected scores.
Thresholds
If the API is used as a reward in a generator, and not just for rescoring datasets, the generator needs to get the feedback of what a good or bad molecule, with respect to the API score, is. This information is given by the thresholds.
Selecting API-provided scores as rewards during generation.
If you set a Min value, molecules with API Score ≥ Min will be considered good.
If you set a Max value, molecules with API Score ≤ Max will be considered good.
If you set a Min and Max values, molecules with API Score in the range [Min; Max] will be considered good.
The Stdev (standard deviation) represents the flexibility margin to the range of good values. By default, it is set at Min/10 (or Max/10) if there is only a Min (or Max) value, or (Max - Min)/10 if both Min and Max values are set. A small standard deviation is more restrictive and forces the generator to focus on molecules in the desired range to reduce noise, while a high standard deviation is better for exploration by allowing a wider range of molecules. If you are setting thresholds, we highly recommend choosing your own standard deviation instead of using the default value.
In the Iktos ranking calculation, the API Score is transformed with a Gaussian transform, using the thresholds values. The image below shows how the transformed score changes depending on the score returned by the API and the thresholds set by the user: