- jc_evaluate
(logp, logd, psa, acceptorCount, donorCount, charge, etc.)
- jc_evaluate_x
(tautomers, mesomers, microspecies, etc.)
- jc_evaluateb_x
(tautomers, mesomers, microspecies, etc.)
- jcf.t_evaluate
(logp, logd, psa, acceptorCount, donorCount, charge, etc.)
- jcf.t_evaluateb
(logp, logd, psa, acceptorCount, donorCount, charge, etc.)
- jc_molweight
- jc_formula /
jc_formula_eq
jchem_table_pkg):
jc_contains
jc_contains
(target_structure
IN VARCHAR2,
query_structure
IN VARCHAR2) = 1/0;
Performs substructure search on molecules or reactions.
SMILES strings given in query_structure are imported
as SMARTS.
Returns 1 if the query matches the target as a substructure, otherwise it returns 0.
Examples:
select cd_id from jchemtable where jc_contains(cd_smiles, 'CN1C=NC2=C1C(=O)N(C)C(=O)N2C') = 1;
select id from plaintable where jc_contains(structure, 'CN1C=NC2=C1C(=O)N(C)C(=O)N2C') = 1;
jc_matchcount
jc_matchcount(
target_structure
IN VARCHAR2,
query_structure
IN VARCHAR2) = NUMBER;
Performs substructure search on molecules or reactions.
SMILES strings given in query_structure are imported
as SMARTS
Returns the number of occurrences of the query structure in the target structure.
jc_equalsjc_equals
(target_structure
IN VARCHAR2,
query_structure
IN VARCHAR2) = 1/0;
Compares molecules or reactions and reports a match only if the compared structures are perfectly identical as they are represented in the respective arguments: the attributes of the compared structures will be compared without the query features (if any is found in the query) being evaluated. This is what is called in JChem terminology a perfect match as opposed to the exact match, which, in JChem's terminology, means a comparison where query features (if available in the query) are evaluated. ("exact" search means "exact size substructure search" -- see exact search with jc_compare.) Note that other products may use the terms perfect or exact match with meanings different from JChem's.
SMILES strings given in query_structure are imported
as SMILES.
Returns 1 if there is a perfect match between the query and the target, otherwise it returns 0.
jc_comparejc_compare
(target_structure
IN VARCHAR2,
query_structure
IN VARCHAR2, options IN VARCHAR2) = 1/0;
Compares molecules or reactions and reports a match by returning 1 or an unmatch by returning 0. The way the comparison is performed can be configured by setting various attributes to this operator.
The third argument is an (option list). The following options can be specified. (Detailed information about the semantics of these options can be found in the concepts section.)t:<search-type>
Sets the search type.
<search-type> may be one of the following:
s: substructure search (default)f: substructure search fingerprint-only
(returns the result of the fingerprint screening without performing
an atom-by-atom search). This option is available only when
the jc_compare operator is evaluated as part of
a domain index scan.
e:
exact size substructure search;
query and target must have the same heavy atom network for
matching.ef: exact fragment search;
query must be EXACT matching to a target fragment.
p: "perfect" searcht: similarity search. The
simThreshold option
must also be specified with this value.
r: superstructure search (isin()).
jc_equals: jc_compare(smiles, '<query>', 't:p');
jc_contains:
jc_compare(smiles, '<query>', 't:s');
jc_tanimoto(smiles, '<query>')
> 0.9 :
jc_compare(smiles, '<query>', 't:t simThreshold:0.9');
Brc1ccccc1C=C or
Cc1cccc(Br)c1C or Cc1ccccc1Br.
SELECT id FROM mystructures where jc_compare(smiles, 'Brc1ccccc1C=C
Cc1cccc(Br)c1C
Cc1ccccc1Br', 't:p');
select jc_compare('c1ccccc1', 'Brc1ccccc1', 't:r') from dual;
select jc_compare('Clc1ccccc1', 'c1ccccc1', 't:r') from dual;
maxHitCount:<max-hit-count>
Limits the number of structures returned by this operator to the
first <max-hit-count> structures found.
jc_compare(smiles, 'c1ccccc1', 't:p maxHitCount:50');
maxTime:<max-time>
Limits the time of the search. <max-hit-count> is to be specified
in milliseconds. If the time specified is not sufficient to search and
return all structure meeting the other search criteria only as much of
them will be returned.
SELECT count(*) FROM nci_12n WHERE jc_compare(smiles, 'c1ccccc1', 't:p maxTime:15000') = 1;
simThreshold:<threshold>
<threshold> specifies that
structures should be returned the tanimoto value of which
computed with the query is greater then the value indicated.
Example:
The following SQL query returns the number of structures
in nci_250k, whose similarity with Brc1ccccc1
is greater then 0.9:
SELECT count(*) FROM nci_250k WHERE jc_compare(smiles, 'Brc1ccccc1', 't:t simThreshold:0.9') = 1;
absoluteStereo:<abs-stereo-flag>
where <abs-stereo-flag> may be one of the following:
a: All chiral atoms are absolute;
c: consider chiral flag;
t: (default)
do as configured for the table in case of
JChem tables
or as configured for the index in case of non-JChem
tables.
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s absoluteStereo:c') = 1;
exactQueryAtomMatching:y/n y) or not(n).
Default is n.
Example:
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s exactQueryAtomMatching:y') = 1;
exactRadicalMatching:y/n y) or not(n).
Default is n.exactRadicalMatchingOption
instead.
Example:
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s exactRadicalMatching:y') = 1;
exactRadicalMatchingOption:d/e/i d: defaulte: exacti: ignore
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s exactRadicalMatching:i') = 1;
exactIsotopeMatching:y/ny) or not(n).
Default is n.exactIsotopeMatchingOption
instead.
Example:
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s exactIsotopeMatching:y') = 1;
exactIsotopeMatchingOption:d/e/i d: defaulte: exacti: ignore
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s exactIsotopeMatchingOption:i') = 1;
exactChargeMatching:y/n
y) or not(n). Default
is n.exactChargeMatchingOption
instead.
Example:
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s exactChargeMatching:y') = 1;
exactChargeMatchingOption:d/e/i d: defaulte: exacti: ignore
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s exactChargeMatchingOption:y') = 1;
doubleBondStereo:N/M/A None/Marked/All Default
is M.
Example:
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s doubleBondStereo:A') = 1;
vagueBond:n/1/2/3/4
HCountMatching:<hcount-matching>
hydrogen count query property interpretation,<hcount-matching> may be one of the following:
G (greater or equal, mdl behaviour)
target atom must have H-s greater or equal to query H-s, in excess of
explicit H-s. H0 means no extra H other than explicitly drawn.
E (equal, daylight behaviour) target
atom mus have H-s equal to H count number.
A automatically determine whether G or
E should be used, from the query source. (smiles and smarts source: E,
all other: G).
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s HCountMatching:A') = 1;
implicitHMatching:<implicit-hmatching>
<implicit-hmatching> may be one of the following:
d default: the behaviour will depend on the
circumstances of the search.
y Implicit and explicit hydrogens can match.
n Implicit and explicit hydrogens cannot match.
exactStereoMatching:<exact-stereo-matching>
<exact-stereo-matching> may be one of the following:
Y: stereo information must match
exactly. For example "cis or unspecified" matches only
"cis or unspecified", but matches neither "cis", "trans" or
"unspecified". The same is true for chirality.
N (default)
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s exactStereoMatching:y') = 1;
stereoSearch:<stereo-search>
<stereo-search> may be one of the following:
N:
no stereo information is considered during searching.
Y (default)
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s stereoSearch:n') = 1;
stereoSearchType:s/i/e/d;
s (default): Stereo information is considered during searching
i: Stereo information is not considered during searching
e: Equality is needed in stereochemistry. ("All
stereo info is exactly the same.") It mainly has an effect when the
query has no stereo information: it only matches non-stereo target.
Similarly, a query with a wiggly tetrahedral center will only match
wiggly tetrahedral center, and not specific R and S configurations.
d: The diastereomers targets of a given query
structure are also matched. This means that it is only required
that if a query atom has stereo information, the target atom should
have as well but the two configurations are treated the same.
ignoreMixtureBrackets:<ignoreMixtureBrackets>
<ignoreMixtureBrackets> may be one of the following:
N(default):
Do not ignore mixture brackets.
Y:
Ignore mixture brackets.
SELECT count(*) FROM nci_150k WHERE jc_compare(structure, 'Brc1ccccc1', 't:s ignoreMixtureBrackets:n') = 1;
dissimilarityMetric:<metric>
<metric> may be one of the following:
ReactantTanimoto
ProductTanimoto
CoarseReactionTanimoto
MediumReactionTanimoto (default)
FineReactionTanimoto
tautomer:<yes-no>
<yes-no> may be one of the following:
y
n (default)
ctFilter:
<chemical-terms-expression>.
boolean expression that is
always evaluated to true or false. The
molecule context
enables implicit reference to the target molecule. Some
general examples and
working examples
are available, but remember that only the boolean expressions can be used
as filters, others are useful in case of the jc_evaluate
operator. You can use the Chemical Terms Reference Tables
as a short language reference on the available functions and plugins.
This option is available only when the jc_compare
operator is evaluated as part of a domain index scan. In other cases
you should use the jc_evaluate
operator.
Examples:
SELECT count(*) FROM nci_10m WHERE jc_compare(structure, 'c1ccccc1',
'sep=! t:s!ctFilter:logp()>9') = 1
SELECT count(*) FROM nci_3m WHERE
jc_compare(structure, 'O=C1ONC(N1c2ccccc2)-c3ccccc3','sep=! t:s!
ctFilter:(mass() <= 500)
&& (logP() <= 5) && (donorCount() <= 5) &&
(acceptorCount() <= 10)') = 1
SELECT count(*) FROM nci_10m WHERE
jc_compare(structure, 'O=C1ONC(N1c2ccccc2)-c3ccccc3','sep=! t:s!
ctFilter:(PSA() <= 200) && (rotatableBondCount() <= 10) &&
(mass() <= 500) && (aromaticRingCount() <= 4)
') = 1
For more examples of chemical terms expressions please read the Evaluator and JChem Cartridge examples.
WARNING: You may need to purchuse sepeate licenses to use this operator depending on the Chemical Terms used (logp, logd, ...)
filterQuery:<select-statement>.
The query in <select-statement> will be first
executed, then the search will be performed only on the rows returned
by the <select-statement>.
<select-statement>
must return a single column containing the identifier of
the rows to be included in the search. The row identifier is
cd_id in case of
JChem tables
and rowid in case of plain Oracle tables.
This option is available only when the jc_compare
operator is evaluated as part of a domain index scan. (When the
operator is not evaluated as part of a domain index scan, the
execution engine is feeding to it one single target at time.
The targets are pipelined from the result of other
steps/conditions of the SQL query making it meaningless
to use a filter query (producing typically more than one single
target) as yet another source of target(s) to operate on.)
jc_nci_10m and returns the number
of structures in the subset which contain aromatic ring.
The subset considered
for the search is specified to belong to project #502:
SELECT count(*) FROM jc_nci_10m WHERE jc_compare(structure, 'c1ccccc1',
'sep=! t:s!filterQuery:select cd_id from jc_nci_10m where projid = 502') = 1
nci_10m and returns the number
of structures in the subset which contain aromatic ring.
The subset considered
for the search is specified to belong to project #502:
SELECT count(*) FROM nci_10m WHERE jc_compare(structure, 'c1ccccc1',
'sep=! t:s!filterQuery:select rowid from nci_10m where projid = 502') = 1
earlyResults:<block-size>.
Specifies the size of blocks in which hits will be returned. The
smaller the block size, the sooner the first hits will be returned, but
the larger the communication overhead per hits between Oracle and the
JChemServer. A block size of 0 disables the feature of incremental hit
return, meaning that all hits will be returned in one single block.
Examples:
SELECT count(*) FROM jc_nci_10m WHERE jc_compare(structure, 'c1ccccc1',
't:s earlyResults:2000') = 1
SELECT count(*) FROM jc_nci_10m WHERE jc_compare(structure, 'c1ccccc1',
't:s earlyResults:0') = 1
checkSpHyb:[y|n]
SELECT count(*) FROM sphyb WHERE pkovacs_main.jc_compare(structure, '
Marvin 06240817132D
7 7 0 0 0 0 999 V2000
-2.2393 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.9538 -0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.9538 -1.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.2393 -2.0625 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.5248 -1.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-1.5248 -0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
-2.3277 0.4420 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
1 6 1 0 0 0 0
2 3 1 0 0 0 0
3 4 1 0 0 0 0
4 5 1 0 0 0 0
5 6 1 0 0 0 0
7 1 2 0 0 0 0
M END', 't:s checkSpHyb:y vagueBond:4') = 1
undefinedRAtom:[a|u]
u, undefined R-groups will match only other
undefined R-groups. By default (value a), undefined R-groups
match everything (any atoms). If the
exactQueryAtomMatching
option is turned on, the value of this option is ignored and R1 only
matches R1, but not R2.
requireCommit:[y|n]
t:p) to specify whether a commit
is required for recent modifications (structure INSERTs or
UPDATEs) to be included in the search. With
requireCommit:n, the search will be performed in the
current transaction. By default, perfect search requires committing
modifications for them to be included. See the database access modes in
JChem Cartridge.)
Returns 1 if there is a match between the query and the target, otherwise it returns 0.
Usage Notes:This operator is primarily intended to be used as the sole condition in the where clause. If you use it with other conditions, the Oracle optimizer may opt for a query plan where this operator is not evaluated as part of a domain index scan. In such cases, some of the options to this operator are not available, because their application would be counter-productive in terms of performance and/or a semantic non-sense.
Using the jc_compare as the sole condition
in the WHERE clause is greatly facilitated by the
availability of the
filterQuery option: the other conditions
needed for the main query may be packaged into
the filter query.
Where not explicitly specified otherwise, the options can be combined arbitrarily:
nci_10m and returns the number
of structures in the subset which contain aromatic ring and
have a logP greater than 9.
The subset considered
for the search is specified to belong to project #502:
SELECT count(*) FROM nci_10m WHERE jc_compare(structure, 'c1ccccc1', 'sep=! t:s!ctFilter:logp()>9!filterQuery:select rowid from nci_10m where projid = 502') = 1
t and returns the ids
of structures in the subset whose similarity with
an aromatic ring exceeds 0.9 and have a logP greater than 9.
Only structures are included in the search which have been in stock
since January 1, 2002:
select id from t where jc_compare(structure, 'c1ccccc1',
'sep=! t:t!simThreshold:0.1!ctFilter:logp()>1!filterQuery:select rowid from t where suppl_date > DATE ''2002-01-01''') = 1;
jc_compare_vb
jc_compare_vb
(target_structure
IN VARCHAR2,
query_structure
IN BLOB) = 1/0;
Like jc_compare but
with BLOB as the query structure argument.
jc_tanimotojc_tanimoto
(target_structure
IN VARCHAR2,
query_structure
IN VARCHAR2) = 0 .. 1;
Performs similarity search using Tanimoto formula on 2D chemical hashed fingerprints.
Returns similarity values in the range of 0.0 - 1.0. Higher values indicate higher similarity.
jc_dissimilarityjc_dissimilarity
(target_structure
IN VARCHAR2,
query_structure
IN VARCHAR2) = 0 .. 1;
Performs similarity search using Tanimoto formula on 2D chemical hashed fingerprints.
Returns 1 - tanimoto value in the range of 0.0 - 1.0. Higher values indicate higher dissimilarity.
jcf.hitColorAndAlignjcf.hitColorAndAlign(tblSchema VARCHAR2, tblName VARCHAR2,
colName VARCHAR2, query CLOB, rowids VARCHAR2,
options VARCHAR2, hitColorAndAlignOptions
VARCHAR2) = rows of CLOB columns;
Returns rows each containing (in MRV format) one of target structures
referred to by the rowids parameter with the part of the
target matching the query aligned and colored according to
hitColorAndAlignOptions.
tblSchema and tblName together specify the
structure table containing the target; if tblSchema is
NULL, it is assumed that the table denoted by
tblName is in the current user's schema;
colName speficies the structure column in the table;
query is the query structure to use as the "mold" for
aligning and/or coloring the target;
rowids is a comma separated list of the ROWIDs of the
targets that needs to be colored and/or aligned; if query
cannot be found in a target denoted by an element in
rowids nothing will be returned for that element;
options the search options to apply when looking for matches
in the targets; this parameter has the same syntax as the third
parameter of jc_compare;
hitColorAndAlignOptions a
list of options defining how the coloring and/or aligning should
be performed; it accepts the following elemnts:alignmentMode:{off|rotate|partialClean}
coloring:{y|n}
hitColor:<color-value>
nonHitColor:<color-value>
nonHitColor3D:<color-value>
<color-value> can be:
Example:
select * from table(jcf.hitColorAndAlign(
null, 'mystructtable', 'the_struct_col',
'Brc1ccccc1',
'AAARVaAAEAAAJkpABP,AAARVaAAEAAAJkpABc,AAARVaAAEAAAJkpABp',
't:s', 'alignmentMode:rotate coloring:y'))
jchem_core_pkg.get_hit_countjchem_core_pkg.get_hit_count
(table_schema IN VARCHAR2,
table_name IN VARCHAR2,
column_name IN VARCHAR2,
query_structure IN VARCHAR2,
options IN VARCHAR2) = NUMBER;
Unlike the search operators which return each ROWID of the matching targets
(such as jc_compare), this search function returns
the number of hits. This function is useful, if you are interested only in the
number hits (not in the hits themselves) as the call will be processed
significantly faster than if each indiviual hit is identified in the table. It
is especially useful with the 't:f' option to obtain a fast estimation of
substructure search hit count.
table_schema the owner of the structure table in which to search
table_name the name of the structure table in which to search
column_name the column of the structure table in which to
search (must be index with jc_idxtype)
query_structure the query stucture to search for
options the same search options as can be used with jc_compare
Example:
select jchem_core_pkg.get_hit_count('MYSCHEMA', 'MYTABLE', 'STRUCTURE', 'c1ccccc1[C,c]', 't:f') from dual;
jc_evaluatejc_evaluate
(target_structure
IN VARCHAR2, expression
IN VARCHAR2) = NUMBER;
chemical terms
specified as the second parameter to the target_structure.
The molecule context
enables implicit reference to the target molecule.
You can use the Chemical Terms Reference Tables
as a short language reference on the available functions and plugins and refer to the
Chemical Terms Language Reference as a
more detailed description of the language. Some
general examples and
working examples
are also available.
If expression
is automatically calculated during structure insert, the precalculated
value is used, which substantially reduces execution time. (See the autoCalcCt index parameter, the
addAutoCalcCt alter
index parameter [for regular structure tables] or the jchem_table_pkg.create_jctable [for JChem
structure tables] on how to specify automatic Chemical Term calculation.)
expression must exactly match the Chemical Terms specified
for automatic calculation for the precalculated value to be used.
The functions jchem_core_pkg.jctf_autocalccts and
jchem_core_pkg.jctf_autocalccts_bycol
can be used to query the expressions with precalculated values.
1 for
true, 0 for false. More flexible variants
of this operator are
jc_evaluate_x,
jc_evaluateb_x,
jcf.t_evaluate,
jcf.t_evaluateb.
Use jc_compare with the ctFilter option when chemical terms are needed as filter condition on searches.
WARNING: You may need to purchuse sepeate licenses to use this operator depending on the Chemical Terms used (logp, logd, ...)
Examples:
select jc_evaluate(<input-molecule>, 'logp()') from dual;
pH=7.4 of the input molecule:
select jc_evaluate(<input-molecule>, 'logd("7.4")') from dual;
select jc_evaluate(<input-molecule>, 'logd("7.4") - logd("3.8")') from dual;
select jc_evaluate(<input-molecule>, 'pka("acidic", "1")') from dual;
select jc_evaluate(<input-molecule>, 'pka("basic", "2")') from dual;
select jc_evaluate(<input-molecule>, 'psa()') from dual;
select jc_evaluate(<input-molecule>, 'acceptorCount()') from dual;
7.4:
select jc_evaluate(<input-molecule>, 'donorCount("7.4")') from dual;
select jc_evaluate(<molecule>,
'(mass() <= 500) && (logP() <= 5) && (donorCount() <= 5) && (acceptorCount() <= 10)') from dual;
select jc_evaluate(<input-molecule>, '(mass() <= 450) &&
(logD("7.4") >= -4) && (logD("7.4") <= 4) &&
(ringCount() <= 4) &&
(rotatableBondCount() <= 10) &&
(donorCount() <= 5) &&
(acceptorCount() <= 8)') from dual;
For more examples of chemical terms expressions please read the Evaluator and JChem Cartridge examples.
jc_evaluate_xjc_evaluatex
(target_structure
IN VARCHAR2, options IN VARCHAR2) = VARCHAR2;
Applies to the target_structure
the chemical terms
specified as part of the options parameter .
The following options can be specified:
chemTerms:<expression>
outFormat:<output-format>
<output-format> is the identifier of
the output format and options as specified in the on line help
of the command line tool molconvert.
If expression
is automatically calculated during structure insert, the precalculated
value is used, which substantially reduces execution time. (See the autoCalcCt index parameter, the
addAutoCalcCt alter
index parameter [for regular structure tables] or the jchem_table_pkg.create_jctable [for JChem
structure tables] on how to specify automatic Chemical Term calculation.)
expression must exactly match the Chemical Terms specified
for automatic calculation for the precalculated value to be used.
The functions jchem_core_pkg.jctf_autocalccts and
jchem_core_pkg.jctf_autocalccts_bycol
can be used to query the expressions with precalculated values.
Examples:
7.4 for <intput-molecule>:
select jc_evaluate_x(<intput-molecule>, 'chemTerms:microspecies("7.4") outFormat:smiles') from dual;
select jc_evaluate_x('NC1=C(CC=O)C=CCC1', 'chemTerms:tautomers() outFormat:smiles') from dual;
JC_EVALUATE_X('NC1=C(CC=O)C=CCC1','CHEMTERMS:TAUTOMERS()OUTFORMAT:SMILES')
--------------------------------------------------------------------------------
N=C1CCC=CC1CC=O
N=C1CCCC=C1CC=O
NC1=C(C=CO)C=CCC1
OC=CC1C=CCCC1=N
OC=CC1=CCCCC1=N
OCC=C1C=CCCC1=N
N=C1CCCCC1=CC=O
NC1=CCC=CC1CC=O
NC1=CCCC=C1CC=O
NC1=CCC=CC1C=CO
NC1=CCCC=C1C=CO
JC_EVALUATE_X('NC1=C(CC=O)C=CCC1','CHEMTERMS:TAUTOMERS()OUTFORMAT:SMILES')
--------------------------------------------------------------------------------
NC1=CCC=CC1=CCO
NC1=CCCCC1=CC=O
NC1CCC=CC1=CC=O
NC1=C(CCC=C1)C=CO
NC1CC=CC=C1C=CO
NC1CC=CCC1=CC=O
NC1C=CCCC1=CC=O
NC1C=CCC=C1C=CO
OCC=C1CCC=CC1=N
NC1=C(CC=CC1)C=CO
OCC=C1CC=CCC1=N
JC_EVALUATE_X('NC1=C(CC=O)C=CCC1','CHEMTERMS:TAUTOMERS()OUTFORMAT:SMILES')
--------------------------------------------------------------------------------
NC1=CC=CCC1=CCO
NC1=C(CC=O)C=CCC1
select jc_evaluate_x('NC1=C(CC=O)C=CCC1', 'chemTerms:resonants() outFormat:smiles') from dual
JC_EVALUATE_X('NC1=C(CC=O)C=CCC1','CHEMTERMS:RESONANTS()OUTFORMAT:SMILES')
--------------------------------------------------------------------------------
[NH2+]=C1CCC=C[C-]1CC=O
[NH2+]=C1CC[CH-]C=C1CC=O
NC1=C(C[CH+][O-])C=CCC1
[O-][CH+]C[C-]1C=CCCC1=[NH2+]
[O-][CH+]CC1=C[CH-]CCC1=[NH2+]
N[C+]1CC[CH-]C=C1CC=O
N[C+]1CC[CH-]C=C1C[CH+][O-]
NC1=C(CC=O)C=CCC1
jc_evaluateb_xjc_evaluateb_x
(target_structure IN BLOB, options IN VARCHAR2) =
BLOB;
Like jc_evaluate_x but with BLOB
as the target argument and return type.
The function equivalent of this operator has the following signature:
jcf_evaluateb_x(target_structure
IN BLOB, options IN VARCHAR2, temp_blob BLOB) = BLOB;
temp_blob parameter, please, read the
issue with dbms_lob.freetemporary in
Known Issues.
jcf.t_evaluatejcf.t_evaluate
(target_structure IN VARCHAR2, options IN VARCHAR2) = ROWS OF
COMPOSITE_CHARs;
The table function variant of jc_evaluate_x. If the Chemical
Terms expression --specified as the chemTerms option-- evaluates
to multiple distinct values (such as multiple molecular structures), this table
function returns them iteratively as COMPOSITE_CHARs, instead of concatenating
them in a single VARCHAR2. COMPOSITE_CHAR is defined as follows:
CREATE TYPE COMPOSITE_CHAR as OBJECT (c VARCHAR2(32767))
Example:
Generate tautomers for NC1=C(CC=O)C=CCC1:
SELECT c FROM table(jcf.t_evaluate('NC1=C(CC=O)C=CCC1', 'chemTerms:tautomers() outFormat:smiles'))
jcf.t_evaluatebjc_evaluateb
(target_structure IN BLOB, options IN VARCHAR2) = ROWS OF
COMPOSITE_BLOBs;
The table function variant of jc_evaluateb_x. If the Chemical
Terms expression evaluates to multiple distinct values (such as multiple
molecular structures), this table function returns them iteratively as
COMPOSITE_BLOBs, instead of concatenating them in a single BLOB.
COMPOSITE_BLOB is defined as follows:
CREATE TYPE COMPOSITE_BLOB as OBJECT (b BLOB)
jc_molweightjc_molweight
(target_structure
IN VARCHAR2) = NUMBER;
Returns the molecular weight of the target_structure.
jc_formulajc_formula
(target_structure
IN VARCHAR2) = VARCHAR2;
The target_structure can be either a structure string in any format recognized by JChem or a column containing such structures.
Returns the molecular formula of the target_structure.
jc_formula_eq
jc_formula_eq
(target_structure
IN VARCHAR2, equals_to IN VARCHAR2) = NUMBER;
target_structure can be either a structure string in any format recognized by JChem
or a column containing such structures.
equals_to is the formula which should be matched by the formula
of the target_structure.
Returns 1 for match, and returns 0 otherwise.
jc_reactjc_react(reaction IN VARCHAR2, reactants IN VARCHAR2, options
IN VARCHAR2) = VARCHAR2;
This function enumerates structures based on reaction modeling. It transforms either
reaction:
describes the rules for the transformation in the form of
"reactant1.reactant2...reactantn > agent1.agent2...agentn >
product1.product2...productn".
Reaction rules can be specified in a full reaction string:
reaction..r:reactivity_rule..s:selectivity_rule..t:tolerancereactants: contains either
reactant1.reactant2...reactantn
where reactant1, reactant1...reactantn
are single fragment structures in SMILES format or
options: a space separated list (option list) a which is composed of any of the following options:
method:n/f/a
where
n (default): (for "normal" method) the reactants
will be processed in the order specified by the argument "reaction";
f: (for "fuse reactants" method) all reactants are
fused to one multi-fragment reactant molecule before the reaction. Any
of the specified reactants can act as any reactant of the reaction scheme
regardless of their order in the argument. (Example)
a: (for "all match" method) like
f, but functional group matches will be
combined into one single product set. (Example)
standardizer:<config-method>:<standardizer-config>
specifies (directly or indirectly -- depending on the value of
<config-method>) the standardization actions which the
reactant(s) should undergo before reaction.
<config-method> is one of config or
sql. The meaning of <standardizer-config>
depends on <config-method>.
<config-method> is config,
<standardizer-config> is the Standardizer
configuration itself. In this case,
<standardizer-config> can be any valid Standardizer
configuration either in XML form or in the simplified action string
form.
<config-method> is sql,
<standardizer-config> must be a SQL SELECT statement
returning a Standardizer configuration. The value of the first column
(can be either VARCHAR2 or BLOB) of the first row returned by
<select-statement> will be taken as the Standardizer
configuration itself.
productStandardizer:<config-method>:<standardizer-config>
specifies (directly or indirectly -- depending on the value of
<config-method>) the standardization actions which the
product(s) should undergo after reaction.
The syntax of this option is identical to the standardizer option.
reverse:<yes-or-no>
specifies that the reverse of the reaction parameter should be performed
(the two sides of the reaction are swapped: products are taken as reactants
and reactants are taken as products).
<yes-or-no> can be any of the following:
y: perform the reverse reaction
n (default): perform the straigth reaction
unambiguousReactionsOnly:<yes-or-no>
specifies that the resulting product list is accepted only if there is only
one possible product list. If there are more than one product lists then no
result will be returned.
<yes-or-no> can be any of the following:
y: No products for ambiguous reactions
n (default): Return products even for ambiguous
reactions.
ignoreRules:r/s/t/rs/rt
specifies that the reaction rules listed after the colon must be ignored.
-
r: Ignore reactivity rules
-
s: Ignore selectivity rules
-
t: Ignore selectivity tolerance
-
rs: Ignore reactivity and selectivity rules
-
rt: Ignore reactivity rules and selectivity tolerance
allowDuplProdLists:<yes-or-no>
specifies that any given product list should be returned as many times is
it is found in the results. The default is to filter duplicate products
out.
<yes-or-no> can be any of the following:
y: Do not filter out multiple product lists.
n (default): Return one product list only once.
removeDuplProdRefs:<yes-or-no>
specifies that any given product list should be returned as many times is
it is found in the results. The default is to filter duplicate products
out.
<yes-or-no> can be any of the following:
y: Do not filter out multiple product lists.
n (default): Return one product list only once.
outFormat:<output-format>
where <output-format> is the identifier of
the output format and options as specified in the on line help
of the command line tool molconvert.
<output-format> is not specified, the product
structures will be returned in SMILES with the products being separated
with a dot('.') in the returned list. If the output format is
specified, the products will be separated by a new line character. (So
if you specify smiles, the products will be returned as SMILES
and dots will appear only in the output to separate fragments within
products.)
extract:<i1,i2,...>
Return only the specified products: i1,i2,... is the comma-separated list
of 1-based product indexes according to reaction equation.
ignoreErrors:<yes-or-no>
specifies that errors (such as errors during
import of the reactants or reaction(s)) should be ignored.
Most useful when jc_react performs multiple
reactions (such as when the
reactants are specified as SELECT SQL statements)
<yes-or-no> can be any of the following:
y: Ignore errors and continue processing.
n (default): Abort processing upon the first
error encountered.
outputType:products/reaction
specifies whether the results are to be output as an array of products or as an array of reaction molecules.
The value of this option can be one of the following:
products (defalt) to output the results
as an array of products
reaction to output the results
as an array of reaction molecules.
outputReactionMappingStyle:<mapping-style>
specifies how the output reaction should be mapped.
<mapping-style> can be any of the following:
none: Do not map the resulting reaction;
changing: changing atoms are mapped;
matching: matching atoms are mapped;
complete: all atoms are mapped.
reactionId:<reaction-id>
<reaction-id> will be directly used to generate
the product identifiers.
reactionIdTag:<reaction-id-tag>
<reaction-id-tag> is the name of the tag in the
RDF data file whose value will be used to generate the product
identifiers.
Only one of the reactionId or the
reactionIdTag can be specified, not both.
reactantIds:<reactant-ids>
<reactant-ids> is a comma-separated list of reactant
identifiers that will be directly used to generate the product
identifiers.
Note that if any of the reactants are specified using
a SELECT SQL statement and the statement returns two columns,
the second column is assumed to be the id for the reactant
overriding the reactant id option.
reactantIdTags:<reactant-id-tags>
<reactant-id-tags> is a comma-separated list of the
SDF tags whose values will be used to generate the product identifiers.
Note that if any of the reactants are specified using
a SELECT SQL statement and the statement returns two columns,
the second column is assumed to be the id for the reactant
overriding the reactant id tags option(s).
productIdTags:<product-id-tags>
<product-id-tags> is a comma-separated list of
the SDF tags which will be included in the product data files to
hold the generated product identifiers.
The product IDs are determined using the following pattern:
reaction ID: R1
first reactant ID: A1
second reactant ID: B1
ID of the first product: R1(A1, B1):1
ID of the second product: R1(A1, B1):2
React the first product with C8 by reaction R2:
ID of the first product R2(R1(A1, B1):1, C8):1
Please, note that in order to use the product ID generation
feature of jc_react, the output format of the
product structures should be such as to allow the inclusion of
user defined tags/fields (typically SDF or MRV). Since the
default output format of the product structures is SMILES, you
have to specify the appropriate format using the
outFormat option. For an example of the
product ID generation feature, please see the example for the
jc_reactb2 operator.
productTable:<product-table-name>
If specified, the results are inserted into
<product-table-name> and nothing is returned.
productTableJcpt:<jchem-property-table-name>
If specified, the table given as the value of productTable
option is a JChem table and its jchemproperties table is
<jchem-property-table-name>.
productColName:<product-column-name>
If specified, the table given as the value of productTable
option is a regular table (non-JChem table) and the product will
be inserted into the <product-column-name> column of this
regular table.
productIdColName:<product-id-column-name>
If specified, the id for each each product will be inserted into
the column <product-id-colunm-name> This column must be
in the same table where the product itself is inserted. If products
are inserted into a non-JChem table's BLOB column, this option
must always be specified and the product id column must be unique.
Examples:
SELECT jc_react('[C:1](=[O:2])[Cl:3].[H:99][N:4]([H:100])[C:0]>>[C:1](=[O:2])[N:4]([H:100])[C:0].[Cl:3][H:99]..' ||
'r:charge(ratom(3))>0..s:-charge(patom(4))', 'ClC(=O)c1ccccc1.CC(C)N', '') products FROM DUAL;
SELECT jc_react('[C:1](=[O:2])[Cl:3].[H:99][N:4]([H:100])[C:0]>>[C:1](=[O:2])[N:4]([H:100])[C:0].[Cl:3][H:99]',
'CC(C)N.ClC(=O)c1ccccc1', 'method:f') products FROM DUAL
SELECT jc_react('[C:1](=[O:2])[Cl:3].[H:99][N:4]([H:100])[C:0]>>[C:1](=[O:2])[N:4]([H:100])[C:0].[Cl:3][H:99]',
'CC(C)N.ClC(=O)c1ccccc1', 'method:a') products FROM DUAL
standardizer option:
SELECT jc_react('[C:1](=[O:2])[Cl:3].[H:99][N:4]([H:100])[C:0]>>[C:1](=[O:2])[N:4]([H:100])[C:0].[Cl:3][H:99]',
'ClC(=O)c1ccccc1.CC(C)N', 'sep=~ standardizer:config:
<Standardizer>
<Actions>
<Aromatize ID="aromatize"/>
<Reaction ID="plusminus" Structure="[*+:1][*-:2]>>[*:1]=[*:2]"/>
<Removal ID="keepOne" Method="keepLargest" Measure="molMass" Groups="target"/>
</Actions>
</Standardizer>
') products FROM DUAL;
reverse option with the Beginelli-reaction:
SELECT jc_react('[#6]COC(=O)[C:3][C:4]([#6])=[O:19].[H:51][C:5](*)=[O:39].[H:49][N:2]C(=O)[N:1][H:50]>>'
|| '[#6]COC(=O)[C:3]1=[C:4]([#6])[N:2]C(=O)[N:1][C:5]1*',
'CN1C(C2CCCCC2)C(C(=O)OCC3CCCCC3)=C(C4CCCCC4)N(C)C1=O',
'reverse:y outputType:reaction') FROM DUAL
removeDuplProdRefs option:
select jc_react('[#6:3]C([O:1])C([#6:4])[O:2]>>[#6][C:3]=[O:1].[#6][C:4]=[O:2]',
'OC1CCCCC1O', 'removeDuplProdRefs:y') from dual
jc_react4
jc_react4(reaction IN VARCHAR2, reactant1 IN VARCHAR2, reactant2 IN
VARCHAR2, reactant3 IN VARCHAR2, reactant4 IN VARCHAR2, options IN VARCHAR2) = VARCHAR2;
Examples:
jcprodcs:
SELECT jcf_react4(reaction_smart,
'SELECT cd_smiles, molecule_id FROM amol',
'SELECT cd_smiles, molecule_id FROM amol',
null,
null,
'reactantMatching:comb outFormat:sdf productIdTag:synthesis_id '
|| 'productTable:jcprods productTableJcpt:jchemproperties '
|| 'productIdColName:synthesis_id reactionId:amide')
FROM dual;
Explanation of the options:reactantMatching:comb
Create reactant sets so as to combine each reactant returned by one SELECT
statements with each reactant returned by every other SELECT statment.
outFormat:sdf
The format of the products must be SDF
productIdTag:synthesis_id
The product id must be put in to the "synthesis_id" SDF tag. (Note that the
SDF files are stored in JChem tables by default in a compressed form and
without their tags in the cd_structure column. To preserve the SDF tag in
the original molecule, you must change the default setting [via the
JChemManager GUI] and have JChem store the SDF file uncompressed.)
productTable:jcprods
Insert the products into the JChem-table "jcprods"
productTableJcpt:jchemproperties
The JChemProperties table of "jcprods" is "jchemproperties"
productIdColName:synthesis_id
Put the product ids in the column "synthesis_id" of the "jcprods" table.
(Note that you can store the the product id both in an SDF-file tag [see
above] and in a column at the same time).
reactionId:amide
The reaction id is "amide".
SELECT product,
synthesis_code
FROM TABLE(
jcf.t_react4(
reaction_smart,
'SELECT cd_smiles, molecule_id FROM amol',
'SELECT cd_smiles, molecule_id FROM amol',
null,
null,
'reactantMatching:comb outFormat:smiles '
|| 'productIdTag:synthesis_id reactionId:amide'
)
);
jc_transformjc_transform(reaction IN VARCHAR2, reactants IN VARCHAR2) =
VARCHAR2;
This is a wrapper around jc_react. jc_react is called
with the options method:n mappingstyle:d
permuteReactants:y to provide Daycart compatible behaviour.
jcf_react with the options method:n
permuteReactants:y.
Example:
SELECT
jcf_react('[C:1](=[O:2])[Cl:3].[H:99][N:4]([H:100])[C:0]>>[C:1](=[O:2])[N:4]([H:100])[C:0].[Cl:3][H:99]',
'CC(C)N.ClC(=O)c1ccccc1', 'method:n permuteReactants:y') products FROM DUAL;
jc_reactb4
jc_reactb4(reaction IN BLOB, reactant1 IN BLOB, reactant2 IN BLOB,
reactant3 IN BLOB, reactant4 IN BLOB, options
IN VARCHAR2) = BLOB;
Example:
The following procedure performs a reaction with two reactants so that the products come with a tag (data field) calledPRID which includes a product identifier. This
product identifier is generated based on the reactant identifier
found in the ID of the first reactant, the
ID2 field of the second reactant and the reaction
identifier found in the RID field of the reaction
data file.
The products are then stored into the JChem table
test_products using jchem_table_pkg.jc_insertb so that
the product identifiers are stored in the user defined column
prod_id.
procedure react_store(reactant1 blob, reactant2 blob, reaction blob, cdidarr out cd_id_array) as
product blob;
dummy blob;
product_table_name varchar2(30) := 'test_products';
begin
dbms_lob.createtemporary(product, false);
dummy := jcf_reactb4(reaction, reactant1, reactant2, null, null
'outFormat:sdf reactionIdTag:RID reactantIdTags:ID,ID2 productIdTag:PRID',
product);
cdidarr := jchem_table_pkg.jc_insertb(product, product_table_name, null, 'false',
'false', 'userDefColMap:PRID=prod_id');
dbms_lob.freetemporary(product);
end;
jcf.t_react4
jcf.t_react4(reaction IN VARCHAR2, reactant1 IN VARCHAR2, reactant2 IN
VARCHAR2, reactant3 IN VARCHAR2, reactant4 IN VARCHAR2, options IN VARCHAR2) = ROWS OF
CHAR_PRODUCT_RECORDs;
CHAR_PRODUCT_RECORD is defined as follows:
CREATE TYPE CHAR_PRODUCT_RECORD AS OBJECT (
product VARCHAR(32767),
synthesis_code VARCHAR(32767)
);
Example:
insert into project_punk (synth_id, interm_smiles) (
select
n_h_product.synthesis_code,
n_h_product.product
from
rtant1,
rtant2,
rtant3,
table(jcf.t_react4(
'N1C=CC=C1.C1=CC=CC=C1.C1=CC=CC=C1>>BrC1=CNC=C1.C1=CC=CC=C1',
rtant1.smiles_struct,
rtant2.smiles_struct,
rtant3.smiles_struct,
null,
'reactionId:NinaHagenReaction reactantIds:rtant1.' || rtant1.id
|| ',rtant2.' || rtant2.id
|| ',rtant3.' || rtant3.id))
n_h_product
)
jc_standardizejc_standardize(structure IN VARCHAR2, param IN VARCHAR2) = VARCHAR2;
Transforms structure
based on the rules defined in param.
The second argument is an (option list). The following options can be specified:
config:<standardizer-configuration-string>
where <standardizer-configuration>
is the Standardizer configuration.
<standardizer-configuration-string> can be any valid
Standardizer
configuration either
in XML form or in the simplified
action string form.
sql:<select-config-statement>
where <select-config-statement>
is a SQL SELECT statement returning a Standardizer configuration.
The value of the first column (can be either VARCHAR2 or BLOB) of the
first row returned by <select-statement>
will be taken as <standardizer-configuration-string>.
cleaningTemplate:<select-template-statetement>
where <select-template-statement>
is a SQL SELECT statement returning a the template for template
based cleaning. Please, see the following links for more details:
outFormat:<output-format>
where <output-format> is the identifier of
the output format and options as specified in the on line help
of the command line tool molconvert.
Examples:
stdized_query := jcf_standardize(ammo_salt, 'config:C[N+:1][H:2].[F,Cl,Br,I;H0-:3]>>C[N:1]');
execute immediate 'select count(*) from jctable where jc_contains(cd_smiles, :query) = 1'
into hitcount using stdized_query;
stdconfig table.
select jc_standardize(cd_smiles, 'sql:select config from stdconfig where id = 1')
from jc_nci_1k where cd_id < 10
COC(=O)C1C(CC2CCC1N2C)CC(=O)C3=CC=CC=C3
based on the template stored in the column structure
in the first row of the table templa
select jcf_standardize('COC(=O)C1C(CC2CCC1N2C)CC(=O)C3=CC=CC=C3',
'sep=~ config:clean:tb~cleaningTemplate:select structure from templa~outFormat:mol') from dual
jc_standardizebjc_standardizeb(structure IN BLOB, param IN VARCHAR2) = BLOB;
Like jc_standardize but
the structure to transform and the returned transformed value is also BLOB. The returned
BLOB is a temporary BLOB. It is the responsibility of the caller to
release the BLOB returned after it is no longer used.
The function equivalent of this operator has the following signature:
jcf_standardizeb(structure IN BLOB, param IN VARCHAR2, temp_blob BLOB)
= BLOB;
For the use of the temp_blob parameter, please, read the
issue with dbms_lob.freetemporary in
Known Issues.
jc_molconvert
jc_molconvert
(query_structure,
options_outputformat IN VARCHAR2) = VARCHAR2;
molconvert. The following
options of molconvert are
not supported for this operator:
-, -(...), -s,
-o. A list of input files cannot be
specified either. To convert into binary formats, the
operator jc_molconvertb
have to be used.Returns the molecular structure in a given format.
jc_molconvertb
jc_molconvertb
(query_structure,
options_outputformat IN VARCHAR2)
= BLOB;
molconvert. The following
A list of input files
cannot be specified either. To convert into textual formats, the
operator jc_molconvert is more efficient to use.
Returns the molecular structure in a given format as a temprorary
BLOB. The caller must make sure that the BLOB is freed after the
underlying binary stream has been extracted. Unfreed temporary BLOBs
eat up the temporary table space for the duration of the session which
created it. See in Application
Developer’s Guide - Large Objects (LOBs) the section
corresponding to your programmatic environment for how to free
temporary LOBs.
To successfully use this operator to generate images, you have to enable image generation in Tomcat
The function equivalent of this operator has the following signature:
jcf_molconvertb
(query_structure,
options_outputformat IN VARCHAR2, temp_blob BLOB) = BLOB;
For the use of the temp_blob parameter, please, read the
issue with dbms_lob.freetemporary in
Known Issues.
jchem_core_pkg.jctf_autocalccts
jchem_core_pkg.jctf_autocalccts
(index_schema_name IN VARCHAR2, index_name IN VARCHAR2)
= table function returning one single column: C;
Returns the Chemical Terms
expressions which are automatically evaluated on structures inserted in the column
indexed by index_schema_name.index_name.
Example:
SQL> select * from table(jchem_core_pkg.jctf_autocalccts('JCHEMUSER_MAIN', 'JCXAUTOCALCCTTEST'));
C
---------------------
logp()
rotatableBondCount()
pKa("acidic","2")
jchem_core_pkg.jctf_autocalccts_bycol
jchem_core_pkg.jctf_autocalccts_bycol(table_schema_name IN VARCHAR2,
table_name IN VARCHAR2, column_name IN VARCHAR2) = table
function returning one single column: C;
Returns the Chemical Terms
expressions which are automatically evaluated on structures inserted in the
column column_name of the table
table_schema_name.table_name.
Example:
SQL> select * from table(jchem_core_pkg.jctf_autocalccts_bycol('JCHEMUSER_MAIN', 'AUTOCALCCTTEST', 'STRUCTURE'));
C
---------------------
logp()
rotatableBondCount()
pKa("acidic","2")
jchem_table_pkg.create_jctable
jchem_table_pkg.create_jctable(jchem_table_name varchar2,
jchem_property_table_name varchar2,
number_of_ints number,
number_of_ones number,
number_of_edges number,
coldefs varchar2,
standardizerConfig varchar2,
absoluteStereo boolean,
options)
Creates a JChem table.
jchem_table_name
name of the JChem table to create
jchem_property_table_name
name of the JChem property table to use for the table. The JChem property
table contains general options and information needed for using structure
tables.
number_of_ints
the number of integers making up the
fingerprint to be generated for the structures. The length of the
fingerprint will be numberOfInts * 32 bits. (See also
Chemical hashed
fingerprints.)
number_of_ones
bits to be set for pattern. (See also
Chemical hashed
fingerprints.)
number_of_edges
maximum pattern length. (See also
Chemical hashed
fingerprints.)
coldefs
definitions of columns to be added to the table (in
addition to those exclusively used by JChem). If not empty, then syntax is
", name1 type1, name2 type2, ...".
standardizerConfig
standardization
configuration. If null, the default standardization is used.
absoluteStereo
assume absolute stereo flag: if not equal
to 0, all query and target structures are treated as absolute stereo.
options
an (option list) accepting the
following elements:
ctColCfg:<chemterm-column-config><chemterm-column-config> is
a semicolon separated list of pairs of column names and Chemical Terms
expressions. Each pair specifies a
Chemical Terms
calculated column: that the values of the given column
should be automatically calculated using the given Chemical Terms
expression. In each pair, the column name and the Chemical Terms
expression is separated with an equal sign ('=').
tableType:<table-type><table-type> can be one ofanyStructures:
All types of structures are allowed, but no structure type-specific
searching.
molecules:
Specific structures, like single molecules, mixtures, salts,
polymers. Other structures (e.g. with query or Markush features or
reactions) are not allowed in database (exception is thrown).
reactions:
Table for storing single step reactions.
myjctable using the JChem properties
table JChemProperties with 512 bit long fingerprints, to columns
defined by the user, the standardized form of the imported structures being
aromatized and assuming that all query and target structures are absolute
stereo. The table is also assumed to have a logp colunm of numeric type which
will hold the logp() values of imported structures (automatically calculated
during import) and a rotbl_bnd_cnt column of numeric type whic will hold '1'
for structures where the 'rotatableBondCount()>4' Chemical Terms expression
returns true, and '0' where the expression returns false.
jchem_table_pkg.create_jctable('myjctable', 'JChemProperties', 16, 2, 6, ',
RECNO NUMBER, DESCR VARCHAR2(4000)', 'aromatize', 1,
'ctcolcfg:logp=logp();rotbl_bnd_cnt=rotatableBondCount()>4');
jchem_table_pkg.drop_jctablejchem_table_pkg.drop_jctable(jchem_table_name varchar2,
jchem_property_table_name varchar2)
Drops a JChem table.
jchem_table_name
name of the JChem table to drop
jchem_property_table_name
name of the JChem property table used for the table.
call jchem_table_pkg.drop_jctable('myjctable', 'JChemProperties');
jchem_table_pkg.list_jctables
jchem_table_pkg.list_arr(jcproptable varchar2) return
char_array
Returns a list of JChem tables registered with jcproptable.
select * from table(jchem_table_pkg.list_jctables('Jchemproperties'));
jchem_table_pkg.jc_insert
jchem_table_pkg.jc_insert(structure IN VARCHAR2, table IN VARCHAR2,
jChemPropName IN VARHCAR2, checkDuplicates IN VARHCAR2, haltOnDuplicate IN
VARHCAR2, options IN VARHCAR2) = CD_ID_ARRAY
Inserts a structure into a JChem-generated table and returns a VARRAY of
INTEGERs with the cd_id(s) of the newly inserted structure(s).
If checkDuplicates is true and haltOnDuplicate is
false, the cd_id of the first matching structure found in the database is
returned as negative number (in case duplicate structures are found).
This function has overloaded version with CLOB and BLOB structure fields.
structure can be either a molecular structure in
any format recognized by JChem,
or a SELECT statement returning a single column containing such
structures. In case of a SELECT statement, the statement will be
performed and the structures returned by the statement will be
insterted into the table.
table is the name of the table, into which the
structure(s) will be inserted. If the schema name is not given, it is
obtained from the connection. The table must be JChem-generated. The
structure defined in the first parameter will be inserted into the cd_structure column of the
new row. The values of the other JChem columns will be
automatically calculated.
jChemPropName can be used to define the name of the
JChemProperties table. If this parameter is null the
default name of the JChemProperties table will be used: JChemProperties.
checkDuplicates, if set to "true", the target table will
be checked for structures identical to the structure which is to be inserted.
If the
tautomerDuplicateChecking option of the table has been set, tautomers
will be considered during duplicate checking.
haltOnDuplicate, if also set to "true" and there
already exist(s) structure(s) in the target table identical to the new
structure, the insert will be aborted with an error message. Otherwise, if
duplicate structures are found, the cd_id of the first matching structure
found in the database is returned as a negative number and an informational
message is output to the current trace file in the
<oracle-home>/admin/<your-db>udump directory.
options is an (option list). The following
options are accepted:
flags:<flags>
Currently the 'c' flag is supported. Specify the 'c' flag
if you want the chiral flag to be set for MDL file formats.
haltOnBadFormat:<yes-or-no>
This options can be used only when the first parameter to
jc_insert is a SELECT statement. <yes-or-no> can be
any of the following:
y (default): abort with an error
message when a structure with invalid format is
encountered.
n: discard structures with invalid format
and continue inserting.
userDefColMap:<tags-to-columns-map>
This options instructs jc_insert to store SDF
tagged values in user defined columns of the target JChem
table according to
<tags-to-columns-map>.
<tags-to-columns-map> is a
semi-colon-separated list of mappping elements which take
the following form:
<sdf-tag-name>=<column-name>.
Examples:
jc_insert can be used to insert the
structures found in the struct column of the table
nci_import into the table my_structure_table.
Duplicates will be checked, the chiral flags will be set. If duplicates
and badly formatted structures are encountered along the way, they will
be discarded without aborting the insertion process.
jchem_table_pkg.jc_insert('SELECT struct FROM nci_import',
'my_structure_table', null, 'true', 'false', 'flags:c
haltOnBadFormat:n');
NSC, CAS_RN, SMILES
and HASH will also be stored in columns
ns_code, cas_regno,
smiles and molhash of
the table my_structure_table respectively:
jchem_table_pkg.jc_insert('SELECT struct FROM nci_import', 'my_structure_table',
null, 'true', 'false', 'flags:c haltOnBadFormat:n
userDefColMap:NSC=ns_code;CAS_RN=cas_regno;SMILES=smiles;HASH=molhash'
);
jchem_table_pkg.jc_updatejchem_table_pkg.jc_update(structure IN VARCHAR2, table IN VARCHAR2, id IN
NUMBER, jChemPropName IN VARHCAR2)
Updates a row of the JChem-table defined in the second parameter. If the table name is defined without the schema name the schema name is obtained from the connection. The structure defined in the first parameter will be placed in the cd_structure of the row which value of the cd_id column eqauls to the value of the id parameter. The procedure calculates the values of the other JChem columns.
The structure can be either in any format recognized by JChem.The name of the JChemProperties table has to be defined in the third
parameter. If this parameter is null the default name of
the JChemProperties table will be used: JChemProperties.
This function has overloaded version with CLOB and BLOB structure fields.
jchem_table_pkg.jc_deletejchem_table_pkg.jc_delete(table IN VARCHAR2, condition IN VARCHAR2,
jChemPropName IN VARHCAR2)
Delete the row(s) of the JChem-table defined in the first parameter which meet the codition specified in the second parameter.
Example:
jchem_table_pkg.jc_delete('jc_nci_1m', 'WHERE cd_id > 1800000', null);
jchem_core_pkg.send_user_funcjchem_core_pkg.send_user_func(java_class_name VARCHAR2,
separator VARCHAR2, param_list VARCHAR2) return VARCHAR2
Sends data to the JChem core engine to be processed by a user defined Java class.
Parameters:java_class_name:<TOMCAT_HOME>/webapps/jchemstreams/WEB-INF/classes.
separator:param_list param_list:separator
The external Java class has to implement the JChemCartModul
interface.
See more about user defined functions
and examples: molconverter
and getatomcount.
jchem_blob_pkg.send_user_funcjchem_blob_pkg.send_user_func(java_class_name VARCHAR2,
separator VARCHAR2, param_list BLOB) return VARCHAR2
Like jchem_core_pkg.send_user_func
but with BLOB argument as the parameter list.