Reactor Examples CT

Reactor examples ( reaction context )

Reactor is part of JChem software package, it is not available in Marvin.

Structure based calculations (plugin calculations)

Plugin references provide access to ChemAxon's calculator plugins. These calculations equip our expressions with chemical meaning:

    1. The physiological microspecies at pH 7.4 of the second reactant:

      microspecies(reactant(0), "7.4")
    2. The partial charges on reactant atom matching map 1 in the reaction equation:

      charge(ratom(1))
    3. The same with taking the physiological microspecies at pH 7.4:

      charge(ratom(1), "7.4")
    4. The partial charges of atom having atom index 2 in the first reactant:

      charge(reactant(0), 2)

      Evaluation of this expression will result in error if there is no atom with index 2 in the first reactant. In reaction context referring by atom index (instead of atom map) is recommended only if the atom index(es) are returned by a Chemical Terms expression (see this example).

    5. Checking whether the partial charge on reactant atom matching map 1 is greater than or equal to this charge value in the physiological microspecies at pH 7.4:

      charge(ratom(1)) > charge(ratom(1), "7.4")
    6. The significant pKa value (acidic or basic) on product atom matching map 3 in the reaction equation:

      pka(ratom(3))
    7. The acidic pKa on the above atom:

      pka(ratom(3), "acidic")

      Note that if the pKa type "acidic" or "basic" is omitted (as in the previous example), then the more significant value is returned, while specifically the "acidic" (or "basic") pKa value is returned if the type is specified.

    8. The strongest acidic pKa value of the first reactant:

      pka(reactant(0), "acidic", "1")
    9. The logP value of the first product:

      logp(product(0))
    10. The logD value at pH=7.4 of the first product:

      logd(product(0), "7.4")

      Note that in logD calculation the pH value should be enclosed in quotation marks.

    11. Check the difference between logD values at two different pH-s:

      logd(product(0), "7.4") - logd(product(0), "3.8") > 0.5
    12. The mass of the second product:

      mass(product(1))
    13. The number of H bond acceptor atoms in the second reactant:

      acceptorCount(reactant(1))
    14. The same with taking the physiological microspecies at pH 7.4:

      acceptorCount(reactant(1), "7.4")
    15. Checking the difference of the two above:

      acceptorCount(reactant(1), "7.4") - acceptorCount(reactant(1)) > 1

Functions

There are different type of functions provided by ChemAxon:

  1. general purpose functions: simple array utility functions, such as minimum, maximum, sum or number of array elements and an array element sorter function

  2. atomic functions: functions referring to an input atom, such as the atom property query function of which queries atom properties (e.g. hydrogen count) or the containment function that checks whether an atom index is contained in an atom index array

  3. molecular functions: functions that calculate molecular properties, but do not fit into the structure based calculations section (e.g. isQuery function)

  4. Evaluator functions: functions containing an inner expression string as parameter - evaluate this expression for each atom in an atom context, examples include a filtering function that takes a boolean expression and returns atoms satisfying it and min-max functions which evaluate the inner expression for all atoms in the context, return the minimum or maximum value or the corresponding atom index:

    1. The minimum of the partial charge values on reactant atoms matching maps 2, 3 and 4:

      min(charge(ratom(2)), charge(ratom(3)), charge(ratom(4)))
    2. The hydrogen count on product atom matching map 2:

      hcount(patom(2))
    3. The valence of reactant atom matching map 2:

      valence(ratom(2))
    4. The atom indices corresponding to positive partial charges in the first reactant:

      filter(reactant(0), "charge() > 0")
    5. The number of atoms with positive partial charge in the first reactant:

      count(filter(reactant(0), "charge() > 0"))
    6. The positive partial charges in the first reactant:

      charge(reactant(0), filter(reactant(0), "charge() > 0"))
    7. The same but sorted in ascending order:

      sortAsc(charge(reactant(0), filter(reactant(0), "charge() > 0")))
    8. Indices of atoms having partial charge at least 0.4 in major microspecies of the first product at pH=7.4:

      filter(product(0), "charge('7.4') >= 0.4")
    9. The partial charge values on these atoms in the input molecule:

      charge(product(0), filter(product(0), "charge('7.4') >= 0.4"))
    10. The minimum acidic pKa value on hetero atoms with a single hydrogen in the first reactant:

      min(pka(reactant(0), filter(reactant(0), "match('[!#6!#1;H1]')"), "acidic"))
    11. Checking whether there is a hetero atom with acidic pKa value less than 0.75 in the first reactant:

      min(pka(reactant(0), filter(reactant(0), "match('[!#6!#1;H1]')"), "acidic")) < 0.75
    12. The minimum acidic pKa value on aliphatic atoms in the first reactant:

      min(pKa(reactant(0), filter(reactant(0), "aliphaticAtom()", "acidic")))
    13. Checking whether the bond between reactant atom matching map 1 and reactant atom matching map 2 is a single or double bond:

      (bondType(reactant(0), bond(ratom(1), ratom(2))) == 1 || bondType(reactant(0), bond(ratom(1), ratom(2))) == 2)

      Notet hat bond(ratom(1), ratom(2)) subexpression returns an <atomIndex1>-<atomIndex2> string, so in reaction context the molecule parameter also must be passed to bondType() function. In the example reactant atoms matching maps 1 and 2 are atoms of the first reactant (reactant(0)).

    14. Indices of atoms with the two strongest basic pKa values in the first product:

      maxAtom(product(0), "pka('basic')", 2)

      Note that expression strings can be enclosed by either double or single quotes; in case of nested strings these can be used alternated. However, some UNIX shells interpret single quotes and therefore single quotes are hard to use in command line input - the file input solves this problem, or else single double quotes can be replaced by escaped inner double quotes:

      maxAtom(product(0), "pka(\"basic\")", 2)
    15. The corresponding pKa values:

      maxValue(product(0), "pka('basic')", 2)
    16. Testing whether the partial charge on the atom with the strongest basic pKa value exceeds the partial charge on the atom with the second strongest basic pKavalue in the second product:

      x = maxAtom(product(1), "pka('basic')", 2);
      charge(x[0]) > charge(x[1])

      Note that in the current version the above expression cannot be evaluated if there are less than two basic pKa values in the molecule.

    17. The basic pKa values for atoms with positive charge, sorted in descending order:

      sortDesc(pka("basic", reactant(0), filter(reactant(0), "charge() > 0")))

      Note that in the current version NaN (meaning that there is no valid pKa for the given atom) values are put to the end of the array after sorting.

    18. Checking whether there is a sufficiently large difference between the two strongest basic pKa values of the previous example:

      x = sortDesc(pka("basic", reactant(0), filter(reactant(0), "charge() > 0")));
      x[0] - x[1] > 1.5
    19. The hydrogen count for each atom in the first product:

      eval(product(0), "hcount()")
    20. The number of hydrogens in the first product:

      sum(eval(product(0), "hcount()"))
    21. Dissimilarity between the first reactant and product using pharmacophore fingerprint as molecular descriptor with Tanimoto (default) metric:

      dissimilarity("PF", reactant(0), product(0))
    22. The same using Euclidean metric:

      dissimilarity("PF:Euclidean", reactant(0), product(0))

Matching conditions

There are three options to reference substructure search from our expressions: match function returns a true/false answer while matchCount and disjointMatchCount functions return the number of search hits.

    1. A simple molecule matching test taking the first reactant as target:

      match(reactant(0), "C1CCOCC1")
    2. Atom matching with target atom matching map 2 and query atom set being all query atoms:

      match(patom(2), "C1CCOCC1")
    3. Atom matching with target atom matching map 2, and query atom set being both query carbon atoms attached to the oxygen:

      match(patom(2), "C1C[C:1]O[C:2]C1", 1, 2)
    4. The same with referencing the query by molecule file path:

      match(patom(2), "mols/query.mol", 1, 2)
    5. The sum of "C=O" and "CO" groups in the second product:

      matchCount(product(1), "C=O") + matchCount(product(1), "CO")
    6. A more complex condition checking whether the second product contains sulfur and whether there are at least 6 "C=O" and "CO" groups in the input molecule alltogether:

      match(product(1), "S") && (matchCount(product(1), "C=O") + matchCount(product(1), "CO") >= 6)