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
- Keywords:
- Rgroup, R group, R-group
-
Field Summary
Fields inherited from interface IChemObject
ALIPHATIC, AROMATIC, CONJUGATED, HIDDEN, HYDROGEN_BOND_ACCEPTOR, HYDROGEN_BOND_DONOR, IN_RING, MAPPED, MARKUSH, NOT_IN_RING, PLACED, REACTIVE_CENTER, SINGLE_OR_DOUBLE, TYPEABLE, VISITEDModifier and TypeFieldDescriptionstatic final intFlag that is set if a ChemObject is part of an aliphatic chain.static final intFlag is set if ChemObject is part of an aromatic system.static final intFlag is set if ChemObject is part of a conjugated system.static final intThis flag can be used when depicted structures to hide certain parts, for example the things are abbreviated (display shortcuts).static final intSets to true if the atom is a hydrogen bond acceptor.static final intSets to true if the atom is a hydrogen bond donor.static final intFlag that is set when the ChemObject is part of a ring.static final intFlag is set if a ChemObject is mapped to another ChemObject.static final intFlag to indicate a flattened molecule holds a Markush structure, you can work on it as is or it might make more sense to repack into something sensible like a RGroupQuery.static final intFlag that is set when the ChemObject is part of a ring.static final intFlag that is set if the ChemObject is placed when calculating 2D/3D layouts.static final intFlag is set if a ChemObject has reactive center.static final intFlag used for marking uncertainty of the bond order.static final intFlag is set if an atom could be typed.static final intFlag is set if ChemObject has been visited. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks validity of RGroupQuery.booleanChecks 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.intReturn 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 booleanValidates a Pseudo atom's label to be valid RGroup query label (R1..R32).voidsetRGroupDefinitions(Map<Integer, IRGroupList> rGroupDefinitions) Setter for the R-group definitions (substituents).voidSetter for root attachment points = bonds that connect R pseudo-atoms to the scaffold.voidsetRootStructure(IAtomContainer rootStructure) Setter for the root structure of this R-Group.Methods inherited from class QueryChemObject
addListener, addProperties, clear, clone, flags, getBuilder, getFlag, getFlags, getFlagValue, getID, getListenerCount, getNotification, getProperties, getProperty, getProperty, is, matches, notifyChanged, notifyChanged, removeListener, removeProperty, set, setFlag, setFlags, setID, setNotification, setProperties, setPropertyModifier and TypeMethodDescriptionvoidUse this to add yourself to this IChemObject as a listener.voidaddProperties(Map<Object, Object> properties) Sets the properties of this object.voidclear(int flags) Clear the provided flags.clone()Returns a deep clone of this IChemObject.intflags()Access the current value of the flags for this ChemObject.Returns aIChemObjectBuilderfor the data classes that extend this class.booleangetFlag(int mask) Returns the value of a given flag.boolean[]getFlags()Returns the whole set of flags.Access the internal value used to store the flags.getID()Returns the identifier (ID) of this object.intReturns the number of ChemObjectListeners registered with this object.booleanReturns the flag that indicates whether notification messages are sent around.Returns a Map with the IChemObject's properties.<T> TgetProperty(Object description) Returns a property for the IChemObject.<T> TgetProperty(Object description, Class<T> c) Access a property of the given description and cast the specified class.booleanis(int flags) Test if a flag(s) are set on this ChemObject.booleanvoidThis should be triggered by an method that changes the content of an object to that the registered listeners can react to it.voidThis should be triggered by an method that changes the content of an object to that the registered listeners can react to it.voidUse this to remove a ChemObjectListener from the ListenerList of this IChemObject.voidremoveProperty(Object description) Removes a property for a IChemObject.voidset(int flags) Set the provided flags.voidsetFlag(int mask, boolean value) Sets the value of some flag.voidsetFlags(boolean[] flagsNew) Sets the whole set of flags.voidSets the identifier (ID) of this object.voidsetNotification(boolean bool) Set a flag to use or not use notification.voidsetProperties(Map<Object, Object> properties) Set the properties of this object to the provided map (shallow copy).voidsetProperty(Object description, Object property) Sets a property for a IChemObject.Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IChemObject
toString
-
Constructor Details
-
RGroupQuery
-
-
Method Details
-
getRgroupQueryAtoms
-
getAllRgroupQueryAtoms
-
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:IRGroupQueryChecks validity of the RGroupQuery. Each distinct R# in the root must have a a correspondingRGroupListdefinition.
In file terms: $RGP blocks must be defined for each R-group number.- Specified by:
areSubstituentsDefinedin interfaceIRGroupQuery- Returns:
- true when valid
-
areRootAtomsDefined
public boolean areRootAtomsDefined()Description copied from interface:IRGroupQueryChecks validity of RGroupQuery. EachRGroupListdefinition must have one or more corresponding R# atoms in the root block.- Specified by:
areRootAtomsDefinedin interfaceIRGroupQuery- Returns:
- true when valid
-
getAllConfigurations
Description copied from interface:IRGroupQueryProduces 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:
getAllConfigurationsin 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:IRGroupQueryReturn the total number of atom containers (count the root plus all substituents).- Specified by:
getAtomContainerCountin interfaceIRGroupQuery- Returns:
- count.
-
getSubstituents
Description copied from interface:IRGroupQueryReturn all the substituent atom containers, in other words the atom containers defined in this RGroupQuery except for the root structure.- Specified by:
getSubstituentsin interfaceIRGroupQuery- Returns:
- list with all substituents
-
setRootStructure
Description copied from interface:IRGroupQuerySetter for the root structure of this R-Group.- Specified by:
setRootStructurein interfaceIRGroupQuery- Parameters:
rootStructure- the root structure (or scaffold) container- See Also:
-
getRootStructure
Description copied from interface:IRGroupQueryGetter for the root structure of this R-Group.- Specified by:
getRootStructurein interfaceIRGroupQuery- Returns:
- the root structure (or scaffold) container
- See Also:
-
setRootAttachmentPoints
Description copied from interface:IRGroupQuerySetter for root attachment points = bonds that connect R pseudo-atoms to the scaffold.- Specified by:
setRootAttachmentPointsin 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:IRGroupQueryGetter for root attachment points = bonds that connect R pseudo-atoms to the scaffold.- Specified by:
getRootAttachmentPointsin 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:IRGroupQuerySetter for the R-group definitions (substituents).- Specified by:
setRGroupDefinitionsin 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:IRGroupQueryGetter for the R-group definitions (substituents).- Specified by:
getRGroupDefinitionsin interfaceIRGroupQuery- Returns:
- rGroupDefinitions Map with an Integer and an RGroupList (substituent list), the Integer being the R-Group number (1..32).
- See Also:
-