The Cactvs CHMTRN Editor, Verifier and Debugger

Getting started

Transform Editor

Load a transform rule file into the Axe editor on the first tab. This is simply done by dropping the source file into the editor window.

Verify that the source is free of syntax errors and compiles. Do this by clicking the Compile button on the editor tab. If there is a syntax error, you will get an error message, and the (likely) location of the problem is highlighted in the editor window.

If the transform source contains blocks for reagent scanning, forward reaction tests, and score verification, use the Fetch Starting Materials, Forward Reaction and Score Tests button to load these into the next three tab panels. You can also use buttons on these panels to create new test cases, or modify the existing set. Code blocks to augment the core transform codes can be auto-generated, inserted in the source, and later saved with the source.

Reagent Scanner

The reagent scanner panel tests whether the transform is able to select suitable starting materials from a structure collection, such as a vendor SD file. The structure test set should both contain suitable starting materials for every compoment (and optionally also a sample of a structure containing all required functionality for an intramolecular reaction), as well as some structures which are not usable as starting material, but are structurally close, to make sure these are properly excluded by the pattern definitions. The suitability of a structure as a specific reagent role (first, second, etc. reagent, or in an intramolecular reaction) is marked by the checkboxes to the right of the structures.

The reagent scan of the transform as currently defined in the editor can be verified by the Run SM Match Verification button. If the structures pass or do not pass the reagent filter as marked, the background of the checkboxes is marked in green. In case of mismatches, the background color is red.

Additional test cases can be added in a variety of ways. One method is to use the row addition button, and then to either type or paste in the SMILES code manually, or start an interactive structure sketcher for that row. Alternatively, it is also possible to drop a structure file with one or more records (for example, SMILES, SDF or ChemDraw) onto the panel. Existing structures can be edited by editing the SMILES, or by sending them to the structure sketcher. You cannot have empty, undefined additional lines when you attempt to run a verification or code build. Fill them with a proper structure first, or delete them.

By default, the starting material queries use both counted matching (i.e. the patterns must only match once, in a symmetry-aware fashion, instead of matching any number of times), and exclusive (i.e. only the pattern for the selected reaction role as first, second, etc. reagent must match, but not any patterns for other reaction roles, except for an intramolecular reaction). This is the default mode for selecting CHMTRN starting materials. You can change the processing mode by the two checkboxes at the top of the panel if you want to experiment.

If the test collection was changed, the Export SM Scan Test Code button is used to write a reagent scan CHMTRN code block encapsulating the current content of the panel, and to optionally automatically insert it to the transform code, replacing an existing code block.

The reagent scan set can also be used to generate forward reaction test cases. The Create Forward Test Reactions button deletes the current content of the forward reactor tab, and replaces it with all valid combinations of the reagents. This means, that all valid first reagent structures are combined in a pairwise fashion with all valid second reagent structures, and potentially third reagents if defined, and reagents for an intramolecular reaction are set up as solo compounds.

Forward Reactor

Forward reaction test cases always use molecules from the reagent scan test. It is not possible to add specific molecules exclusively for this purpose, though it is possible to omit some redundant cases by deleting rows. Removing rows from the reagent scan set, or editing these, automatically updates the forward reaction test set if any updated structures are used there.

The forward reaction outcome can be verified by the Run Forward Reaction Verification button. The color coding is the same as for the reagent scan verification. Also, if anything was updated here, there is a button to again generate an updated CHMTRN code block for insertion or replacement in the transform source.

Product Scorer

The product score is the fourth tab panel. It holds a collection of molecules with their expected scores, or which are expected to be killed within the course of of transform execution. To verify their proper behaviour, the Run Score/Kill Verification button is used. The result is again color-coded.

The structures on this panel are independent of the reagent scan / forward reaction test set. Additional molecules can be added or edited in the same fashion as on the reagent scan test tab - by entering SMILES, by using the Web structure sketcher, or by dropping a file. The structure collection should contain examples which exercise all major portions of the transform code for a specific transform.

If anything was changed on this panel, including score changes or new kills because of edits in the transform source, the Export Score Test Code button can be used to generate and optionally insert or replace the corresponding transform source code block.

This panel additionally provides row-specific functionality to dig deeper into what actually happens when a structure is scored. In the score modifications column, delta or kill data entries are hyperlinked. By clicking on them, the source code line is displayed which led to the score modification or kill.

The magnifying glass icon on the left of every row displays the standard score report (property X_LHASA_REPORT in the scripting environment) in a popup panel. It contains a human-readable concise summary of how the compound was processed and arrived at its final rating.

Transform Debugger

The bug icon on the left of every row re-scores the compound and during this operation fills the transform debugger panel on the next tab to the right. In this table, every processing step the structure undergoes while working its way through the scoring process is listed in detail, with exact line numbers, structural feature tests, and pattern match locations.

After everything works as desired, and all test and verification source code sections have been updated, use the Save Source button on the editor tab to export the updated source file back to your computer. You can additionally use the Compile & Save button to save the compiled bytecode.

Limitations

Currently, operations of transforms which use additional library code files are only handled in a rudimentary fashion.

The maximum number of reagent molecules in a reaction which can be handled in this interface is three, which is less than the scripting environment, which does handle, for example, Ugi four-component reactions.

This is a beta version, with various open issues. Not all types of byte-compiled code statements are currrently reported in the debug table. Score code coverage for the test set is not yet available.

External Software

The transform text editor is the Open Source Javascript ACE editor.

The Web interface is built with the ExtJS toolkit by Sencha. It is commercial licensed software. The Cactvs toolkit on the CGI side implements specialized built-in features for easy data exchange with this software. This is why it is the preferred environment for building Cactvs-based interactive Web applications.