Example 1: The first example shows a 'datatree level' script written in the Groovy language. This script shows an example of how you can execute an external tool using the current set of data rows selected in IJC. In this example we use the ChemAxon Evaluator command line tool to determine a ring count but we can already do this easily using Chemical terms in IJC so really you should never need to do this, it is a simple example to assist you to access any tools that are not directly available in IJC. You might wish to complete calculations on molecules using other CXN tools or indeed any are using 3rd party command line tools whose output you wish to integrate into your schema. In this example a single calculated value is generated into the SDF file and is named "CALC". Prior to running the call a field was added to the entity to accept the pending update statement. This field can be of type text or integer and the script can be edited to handle either. Clearly modification of this approach with different call outs must consider carefully the results returned by external tools however it is easy to package up all the return values and add them to your entity. This script has three conceptual parts which are executed in succession:
Export of the selected rows as an SDF file for input into your process.
Building an external command to execute, that uses the above as SDF input.
Integration of the generated results SDF back into your entity in the correct row using the CD_ID.
Example 2: The second example shows a 'datatree level' script written in the Groovy language. This script shows an example of how you can execute an external tool using the current set of data rows selected in IJC. In this example we use the ChemAxon CXCalc command line tool to generate sets of conformers which is something not currently possible in IJC. The output of the process, which is a 3D CTAB and the associated cd_id for the input record can be accessed and further processed using a virtual screening method of your choice. Clearly the script can be appended with further syntax to implement CXN Screen tools, a third party screening tool or indeed your own grooved up scripted virtual screening method that requires some 3D coordinates as input. (Clearly you also need to define your query or reference molecule as well in the script in order to complete a comparison). This script has two conceptual parts (you must add the third!) which are executed in succession:
Export of the selected rows to a 2D SDF file for input into your process (we presume the source table is 2D).
Building an external command to execute the above SDF as input and generates accessible 3D coordinates.
You can now append your own virtual screening methods and get predicting new drugs!