Class RGroupQuery
java.lang.Object
org.openscience.cdk.isomorphism.matchers.QueryChemObject
org.openscience.cdk.isomorphism.matchers.RGroupQuery
- All Implemented Interfaces:
Cloneable
,ICDKObject
,IChemObject
,IRGroupQuery
Represents information contained in a Symyx RGfile (R-group query file).
It contains a root structure (the scaffold if you like), a map with R-group definitions (each of which can contain multiple substitutes) and a map with attachment points. The attachment points define a connection order for the substitutes, which is relevant when an Rgroup is connected to the scaffold with more than one bond.
It contains a root structure (the scaffold if you like), a map with R-group definitions (each of which can contain multiple substitutes) and a map with attachment points. The attachment points define a connection order for the substitutes, which is relevant when an Rgroup is connected to the scaffold with more than one bond.
This class can also be used to produce all the valid configurations for the combination of its root,definitions and conditions.
This Javadoc does not contain a code sample how to create a new RGroupQuery
from scratch, because a sensible RGroupQuery has quite a few attributes to be set
including a root plus a bunch of substituents, which are all atom containers.
So that would be a lot of sample code here.
The best way to get a feel for the way the RGroup objects are populated is to
run the RGroupQueryReaderTest and look at the sample
input RGroup query files contained in the CDK and how they translate into
RGroupXX objects. The JChempaint application can visualize the input files for you.
- Author:
- Mark Rijnbeek
- Source code:
- main
- Belongs to CDK module:
- isomorphism
- Keywords:
- Rgroup, R group, R-group
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks validity of RGroupQuery.boolean
Checks validity of the RGroupQuery.Produces all combinations of the root structure (scaffold) with the R-groups substituted in valid ways, using each R-group's definitions and conditions.Returns all R# type atoms (pseudo atoms) found in the root structure.int
Return the total number of atom containers (count the root plus all substituents).Getter for the R-group definitions (substituents).getRgroupQueryAtoms
(Integer rgroupNumber) Returns all R# type atoms (pseudo atoms) found in the root structure for a certain provided RGgroup number.Getter for root attachment points = bonds that connect R pseudo-atoms to the scaffold.Getter for the root structure of this R-Group.Return all the substituent atom containers, in other words the atom containers defined in this RGroupQuery except for the root structure.static boolean
Validates a Pseudo atom's label to be valid RGroup query label (R1..R32).void
setRGroupDefinitions
(Map<Integer, IRGroupList> rGroupDefinitions) Setter for the R-group definitions (substituents).void
Setter for root attachment points = bonds that connect R pseudo-atoms to the scaffold.void
setRootStructure
(IAtomContainer rootStructure) Setter for the root structure of this R-Group.Methods inherited from class org.openscience.cdk.isomorphism.matchers.QueryChemObject
addListener, addProperties, clone, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, matches, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.openscience.cdk.interfaces.ICDKObject
getBuilder
Methods inherited from interface org.openscience.cdk.interfaces.IChemObject
addListener, addProperties, clone, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, notifyChanged, notifyChanged, removeListener, removeProperty, setFlag, setFlags, setID, setNotification, setProperties, setProperty, toString
-
Constructor Details
-
RGroupQuery
-
-
Method Details
-
getRgroupQueryAtoms
Returns all R# type atoms (pseudo atoms) found in the root structure for a certain provided RGgroup number.- Parameters:
rgroupNumber
- R# number, 1..32- Returns:
- list of (pseudo) atoms with the provided rgroupNumber as label
-
getAllRgroupQueryAtoms
Returns all R# type atoms (pseudo atoms) found in the root structure.- Returns:
- list of (pseudo) R# atoms
-
isValidRgroupQueryLabel
Validates a Pseudo atom's label to be valid RGroup query label (R1..R32).- Parameters:
Rxx
- R-group label like R1 or R10- Returns:
- true if R1..R32, otherwise false
-
areSubstituentsDefined
public boolean areSubstituentsDefined()Description copied from interface:IRGroupQuery
Checks validity of the RGroupQuery. Each distinct R# in the root must have a a correspondingRGroupList
definition.
In file terms: $RGP blocks must be defined for each R-group number.- Specified by:
areSubstituentsDefined
in interfaceIRGroupQuery
- Returns:
- true when valid
-
areRootAtomsDefined
public boolean areRootAtomsDefined()Description copied from interface:IRGroupQuery
Checks validity of RGroupQuery. EachRGroupList
definition must have one or more corresponding R# atoms in the root block.- Specified by:
areRootAtomsDefined
in interfaceIRGroupQuery
- Returns:
- true when valid
-
getAllConfigurations
Description copied from interface:IRGroupQuery
Produces all combinations of the root structure (scaffold) with the R-groups substituted in valid ways, using each R-group's definitions and conditions.- Specified by:
getAllConfigurations
in interfaceIRGroupQuery
- Returns:
- all valid combinations of the root structure (scaffold) with the R-groups substituted.
- Throws:
CDKException
-
getAtomContainerCount
public int getAtomContainerCount()Description copied from interface:IRGroupQuery
Return the total number of atom containers (count the root plus all substituents).- Specified by:
getAtomContainerCount
in interfaceIRGroupQuery
- Returns:
- count.
-
getSubstituents
Description copied from interface:IRGroupQuery
Return all the substituent atom containers, in other words the atom containers defined in this RGroupQuery except for the root structure.- Specified by:
getSubstituents
in interfaceIRGroupQuery
- Returns:
- list with all substituents
-
setRootStructure
Description copied from interface:IRGroupQuery
Setter for the root structure of this R-Group.- Specified by:
setRootStructure
in interfaceIRGroupQuery
- Parameters:
rootStructure
- the root structure (or scaffold) container- See Also:
-
getRootStructure
Description copied from interface:IRGroupQuery
Getter for the root structure of this R-Group.- Specified by:
getRootStructure
in interfaceIRGroupQuery
- Returns:
- the root structure (or scaffold) container
- See Also:
-
setRootAttachmentPoints
Description copied from interface:IRGroupQuery
Setter for root attachment points = bonds that connect R pseudo-atoms to the scaffold.- Specified by:
setRootAttachmentPoints
in interfaceIRGroupQuery
- Parameters:
rootAttachmentPoints
- Map with per R-group pseudo atom another map with an Integer and an IBond, the integer indicating 1st or 2nd attachment.- See Also:
-
getRootAttachmentPoints
Description copied from interface:IRGroupQuery
Getter for root attachment points = bonds that connect R pseudo-atoms to the scaffold.- Specified by:
getRootAttachmentPoints
in interfaceIRGroupQuery
- Returns:
- Map with per R-group pseudo atom another map with an Integer and an IBond, the integer indicating 1st or 2nd attachment.
- See Also:
-
setRGroupDefinitions
Description copied from interface:IRGroupQuery
Setter for the R-group definitions (substituents).- Specified by:
setRGroupDefinitions
in interfaceIRGroupQuery
- Parameters:
rGroupDefinitions
- map with an Integer and an RGroupList (substituent list), the Integer being the R-Group number (1..32).- See Also:
-
getRGroupDefinitions
Description copied from interface:IRGroupQuery
Getter for the R-group definitions (substituents).- Specified by:
getRGroupDefinitions
in interfaceIRGroupQuery
- Returns:
- rGroupDefinitions Map with an Integer and an RGroupList (substituent list), the Integer being the R-Group number (1..32).
- See Also:
-