@PublicAPI public class RgDecompResults extends java.lang.Object
JChemSearch.getHitsAsRgDecomp(int[], int)
.
When RgDecompResults is used only for storing results
use the constructor designed for that purpose. When generating the results,
set the parameters (query, targets (and optionally their original
identifiers), search options, attachment type) using
the appropriate constructor or setters then call run() method.
Available setters:
setQuery(Molecule)
setTargets(Molecule[])
setSearchOptions(SearchOptions)
setAttachmentType(int)
setOriginalIds(int[])
hasResults()
shows whether the class can actually provide valid results.
Results can be achieved by calling different methods:
getScaffold()
)
getLigandsNumber()
)
getIncludedIds()
)
getSkippedIds()
)
getHitsAsMarkush()
)
getHitsAsRgDecomp()
)
getHitsAsTable()
).
Format of the table (first row is header row, following rows contain
targets, 1 hit/target):
[query]: molecule R1 R2 R3 ... --------------------------------------------------------- [target1]: molecule1 ligand1.1 ligand1.2 ligand1.3 [target2]: molecule2 ligand2.1 ligand2.2 ligand2.3As an example see decomposition table
RGroupDecomposition API
documentation.Constructor and Description |
---|
RgDecompResults(Molecule scaffold,
int noLigands,
Molecule[][] rgDecomps,
RgMolecule markush,
int[] skippedIds)
This constructor is used only for storing results.
|
RgDecompResults(Molecule scaffold,
int noLigands,
Molecule[][] rgDecomps,
RgMolecule markush,
int[] skippedIds,
int[] originalIds)
This constructor is used only for storing results.
|
RgDecompResults(Molecule query,
Molecule[] targets,
SearchOptions options,
int attachmentType)
Constructor used for generating results.
|
RgDecompResults(Molecule query,
Molecule[] targets,
SearchOptions options,
int attachmentType,
int[] originalIds)
Constructor used for generating results.
|
Modifier and Type | Method and Description |
---|---|
Decomposition[] |
getDecompositions()
Returns the
Decomposition objects corresponding to the targets. |
RgMolecule |
getHitsAsMarkush()
Returns a single RgMolecule that consists of the scaffold
and all the possible ligands as rgroup-definitions.
|
Molecule[][] |
getHitsAsRgDecomp()
Returns All ligands of all targets.
|
Molecule[][] |
getHitsAsTable()
Returns the table elements in Molecule[][] format.
|
int[] |
getIncludedIds()
Returns indexes of those targets that are matched by query.
|
int |
getLigandsNumber()
Returns the number of ligands in one target structure.
|
Molecule |
getScaffold()
Returns scaffold of the query
(r-groups are added automatically if needed).
|
int[] |
getSkippedIds()
Returns indexes of those targets that are not matched by query.
|
boolean |
hasResults() |
void |
run()
Generates the results if no valid results are available
(see
hasResults() ) |
void |
setAttachmentType(int attachmentType) |
void |
setOriginalIds(int[] originalIds) |
void |
setQuery(Molecule query) |
void |
setSearchOptions(SearchOptions options) |
void |
setTargets(Molecule[] targets) |
public RgDecompResults(Molecule scaffold, int noLigands, Molecule[][] rgDecomps, RgMolecule markush, int[] skippedIds)
getScaffold()
,
getLigandsNumber()
, getHitsAsRgDecomp()
,
getHitsAsMarkush()
, getHitsAsTable()
,
getIncludedIds()
and getSkippedIds()
.scaffold
- Scaffold of the query with added rgroups.noLigands
- Number of ligands in a decomposition.rgDecomps
- Ligands of decomposition for all targets.markush
- Scaffold and ligands collected in one Markush structureskippedIds
- Indexes of those targets that are not matched by query.public RgDecompResults(Molecule scaffold, int noLigands, Molecule[][] rgDecomps, RgMolecule markush, int[] skippedIds, int[] originalIds)
getScaffold()
,
getLigandsNumber()
, getHitsAsRgDecomp()
,
getHitsAsMarkush()
, getHitsAsTable()
,
getIncludedIds()
and getSkippedIds()
.scaffold
- Scaffold of the query with added r-groups.noLigands
- Number of ligands in a decomposition.rgDecomps
- Ligands of decomposition for all targets.markush
- Scaffold and ligands collected in one Markush structureskippedIds
- Indexes of those targets that are not matched by query.originalIds
- Target identifiers to be returned by getSkippedIds()
and
getIncludedIds()
instead of indexes of targets.public RgDecompResults(Molecule query, Molecule[] targets, SearchOptions options, int attachmentType)
query
- The query structure that is looked for in targets.targets
- The target structures.options
- Search options used in search.attachmentType
- Type of attachment point representation in ligands.
When creating Markush structure from results, this parameter is ignored
and Decomposition#ATTACHMENT_POINT (default) is used instead.SearchConstants.ATTACHMENT_NONE
,
SearchConstants.ATTACHMENT_POINT
,
SearchConstants.ATTACHMENT_MAP
,
SearchConstants.ATTACHMENT_LABEL
,
SearchConstants.ATTACHMENT_ATOM
,
SearchConstants.ATTACHMENT_RLABEL
public RgDecompResults(Molecule query, Molecule[] targets, SearchOptions options, int attachmentType, int[] originalIds)
query
- The query structure that is looked for in targets.targets
- The target structures.options
- Search options used in search.attachmentType
- Type of attachment point representation in ligands.
When creating Markush structure from results, this parameter is ignored
and Decomposition#ATTACHMENT_POINT (default) is used instead.originalIds
- Target identifiers to be returned by getSkippedIds()
and
getIncludedIds()
instead of indexes of targets.SearchConstants.ATTACHMENT_NONE
,
SearchConstants.ATTACHMENT_POINT
,
SearchConstants.ATTACHMENT_MAP
,
SearchConstants.ATTACHMENT_LABEL
,
SearchConstants.ATTACHMENT_ATOM
,
SearchConstants.ATTACHMENT_RLABEL
public Molecule getScaffold()
null
.public int getLigandsNumber()
Integer.MIN_VALUE
.public Molecule[][] getHitsAsRgDecomp()
null
instead of array of ligands.public Decomposition[] getDecompositions()
Decomposition
objects corresponding to the targets.Decomposition
objects corresponding to the targets
if valid results are available, otherwise null
.public Molecule[][] getHitsAsTable()
[query]: molecule R1 R2 R3 ... --------------------------------------------------------- [target1]: molecule1 ligand1.1 ligand1.2 ligand1.3 [target2]: molecule2 ligand2.1 ligand2.2 ligand2.3
public RgMolecule getHitsAsMarkush()
public int[] getSkippedIds()
public int[] getIncludedIds()
public void run() throws SearchException
hasResults()
)SearchException
public void setQuery(Molecule query)
query
- The query to setpublic void setTargets(Molecule[] targets)
targets
- The targets to setpublic void setSearchOptions(SearchOptions options)
options
- The search options to setpublic void setAttachmentType(int attachmentType)
attachmentType
- The attachment type to setpublic void setOriginalIds(int[] originalIds)
originalIds
- Original identifiers of targets to setpublic boolean hasResults()
true
, if valid results are available