Class ScaffoldGenerator
Furthermore, the molecules can be decomposed according to the
Schuffenhauer rules and a generation of all possible fragments,
which can be created by the iterative removal of the rings, is also possible.
The resulting molecular fragments can be organised in the form of a tree or a network.
The network approach is based on the
Mining for Bioactive Scaffolds with Scaffold Networks paper.
Different trees or networks can also be merged together.
- Version:
- 1.0.4.0
- Author:
- Julian Zander, Jonas Schaub (zanderjulian@gmx.de, jonas.schaub@uni-jena.de)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enum with which the type of scaffolds to be generated can be set. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.openscience.cdk.aromaticity.Aromaticity
Default setting for which aromaticity model should be used.static final org.openscience.cdk.graph.CycleFinder
Cycle finder used to detect rings.static final org.openscience.cdk.graph.CycleFinder
Backup cycle finder used to detect rings.static final String
Property is true if the backup cycle finder is to be used instead of the normal cycle finder.static final boolean
Default setting for whether the aromaticity should be determined.static final boolean
Default setting for whether hybridisation should only be retained for aromatic bonds.static final boolean
Default setting for whether rule prioritisation rule 7 of the Schuffenhauer scaffold tree fragmentation should be applied.static final String
Property of the atoms according to which they are counted and identified.static final ScaffoldGenerator.ScaffoldModeOption
Default setting for which scaffold mode should be used.static final org.openscience.cdk.smiles.SmilesGenerator
Default setting for which SmilesGenerator should be used. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.openscience.cdk.interfaces.IAtomContainer>
applyEnumerativeRemoval
(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Iteratively removes the terminal rings.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleEight
(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the eighth Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleEleven
(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the eleventh Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleFourAndFive
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the fourth and fifth Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleNine
(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the ninth Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleOne
(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the first Schuffenhauer rule.List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRules
(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Iteratively removes the rings of the molecule according to specific rules that are queried hierarchically and returns the scaffolds as list.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleSeven
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the seventh Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleSix
(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the sixth Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleTen
(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the tenth Schuffenhauer rule.protected org.openscience.cdk.interfaces.IAtomContainer
applySchuffenhauerRuleThirteen
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Remove a ring according to the thirteenth Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleThree
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the third Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleTwelve
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the twelfth Schuffenhauer rule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
applySchuffenhauerRuleTwo
(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the second Schuffenhauer rule.boolean
With this setting, only the hybridisation of aromatic atoms can be obtained.generateScaffoldNetwork
(List<org.openscience.cdk.interfaces.IAtomContainer> aMoleculeList) Generates a network for each molecule in the list and merges the networks together.generateScaffoldNetwork
(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Iteratively removes the terminal rings.generateSchuffenhauerForest
(List<org.openscience.cdk.interfaces.IAtomContainer> aMoleculeList) Decomposes the entered molecules into Scaffolds, creates ScaffoldTrees from them and then assembles these trees if possible.generateSchuffenhauerTree
(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Iteratively removes the rings of the molecule according to specific rules that are queried hierarchically.org.openscience.cdk.aromaticity.Aromaticity
Returns the currently applied Aromaticity model.protected org.openscience.cdk.graph.CycleFinder
getCycleFinder
(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Selects the correct CycleFinder based on ScaffoldGenerator.CYCLE_FINDER_BACKUP_PROPERTY.List<org.openscience.cdk.interfaces.IAtomContainer>
getLinkers
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens) Returns the linkers of the molecule as a fragment list.protected org.openscience.cdk.interfaces.IAtomContainer
getMurckoFragment
(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Returns the Murcko fragment of each molecule entered.List<org.openscience.cdk.interfaces.IAtomContainer>
getRings
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens) Extracts the individual rings from the scaffold of the given molecule.protected List<org.openscience.cdk.interfaces.IAtomContainer>
getRingsInternal
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anIsKeepingNonSingleBonds) Generates a set of rings depending on the CycleFinder selected bygetCycleFinder(IAtomContainer)
.org.openscience.cdk.interfaces.IAtomContainer
getScaffold
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens) Generates the selected fragment type for the entered molecule and returns it.protected org.openscience.cdk.interfaces.IAtomContainer
getScaffoldInternal
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens, boolean anIsAromaticitySet, org.openscience.cdk.aromaticity.Aromaticity anAromaticity, ScaffoldGenerator.ScaffoldModeOption aScaffoldModeOption) Generates the selected fragment type for the entered molecule and returns it.Returns the currently applied ScaffoldMode.List<org.openscience.cdk.interfaces.IAtomContainer>
getSideChains
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens) Outputs all fragments that are not contained in the generated scaffold in contrast to the unchanged molecule.org.openscience.cdk.smiles.SmilesGenerator
Returns the currently applied SmilesGenerator.protected boolean
hasFusedAromaticRings
(org.openscience.cdk.interfaces.IAtomContainer aRing, List<org.openscience.cdk.interfaces.IAtomContainer> aRings, org.openscience.cdk.interfaces.IAtomContainer aMolecule) Checks whether the ring of a molecule is in an aromatic fused ring system.boolean
Specifies whether the aromaticity is to be taken into account.protected boolean
isAtomContainerAromatic
(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Checks the aromaticity of each atom of the input molecule.protected boolean
isRingAttachedToHeteroatomLinker
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, org.openscience.cdk.interfaces.IAtomContainer aRing) The ring to be examined is checked to determine whether it is attached to a linker that has a heteroatom at least one end.protected boolean
isRingRemovable
(org.openscience.cdk.interfaces.IAtomContainer aRing, List<org.openscience.cdk.interfaces.IAtomContainer> aRings, org.openscience.cdk.interfaces.IAtomContainer aMolecule) Checks whether rings may be removed.protected boolean
isRingTerminal
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, org.openscience.cdk.interfaces.IAtomContainer aRing) Checks whether the tmpRing in the tmpMolecule is terminal.boolean
Indicates whether rule 7 of the Schuffenhauer scaffold tree fragmentation is executed.protected org.openscience.cdk.interfaces.IAtomContainer
removeRing
(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens, org.openscience.cdk.interfaces.IAtomContainer aRing) Removes the given ring from the total molecule and returns it.protected void
removeRingForSchuffenhauerRule
(org.openscience.cdk.interfaces.IAtomContainer aRing, List<org.openscience.cdk.interfaces.IAtomContainer> aFragmentList) Removes the selected ring from the last fragment in the list and adds the resulting fragment to this list.void
All settings are set to their default values.void
setAromaticityModelSetting
(org.openscience.cdk.aromaticity.Aromaticity anAromaticity) Sets the applied aromaticity model.void
setDetermineAromaticitySetting
(boolean anIsAromaticitySet) Sets the option to not determine the aromaticity.void
setRetainOnlyHybridisationsAtAromaticBondsSetting
(boolean anIsOnlyHybridisationsAtAromaticBondsRetained) Sets the setting that, only the hybridisation of aromatic atoms is obtained.void
setRuleSevenAppliedSetting
(boolean anIsRuleSevenApplied) Sets the option to skip rule 7 of the Schuffenhauer scaffold tree fragmentation.void
setScaffoldModeSetting
(ScaffoldGenerator.ScaffoldModeOption anScaffoldMode) Sets the now used scaffold mode.void
setSmilesGeneratorSetting
(org.openscience.cdk.smiles.SmilesGenerator aSmilesGenerator) Sets the applied SmilesGenerator.
-
Field Details
-
SCAFFOLD_ATOM_COUNTER_PROPERTY
Property of the atoms according to which they are counted and identified.- See Also:
-
CYCLE_FINDER
public static final org.openscience.cdk.graph.CycleFinder CYCLE_FINDERCycle finder used to detect rings. -
CYCLE_FINDER_BACKUP_PROPERTY
Property is true if the backup cycle finder is to be used instead of the normal cycle finder.- See Also:
-
CYCLE_FINDER_BACKUP
public static final org.openscience.cdk.graph.CycleFinder CYCLE_FINDER_BACKUPBackup cycle finder used to detect rings. The relevant cycle finder has problems with a few molecules and also finds too many rings in some molecules. Therefore, the mcb is used in these cases. -
DETERMINE_AROMATICITY_SETTING_DEFAULT
public static final boolean DETERMINE_AROMATICITY_SETTING_DEFAULTDefault setting for whether the aromaticity should be determined. By default, the aromaticity is determined.- See Also:
-
AROMATICITY_MODEL_SETTING_DEFAULT
public static final org.openscience.cdk.aromaticity.Aromaticity AROMATICITY_MODEL_SETTING_DEFAULTDefault setting for which aromaticity model should be used. By default, Aromaticity(ElectronDonation.cdk(), Cycles.cdkAromaticSet()) is used. -
SMILES_GENERATOR_SETTING_DEFAULT
public static final org.openscience.cdk.smiles.SmilesGenerator SMILES_GENERATOR_SETTING_DEFAULTDefault setting for which SmilesGenerator should be used. By default, unique SMILES are used. -
RULE_SEVEN_APPLIED_SETTING_DEFAULT
public static final boolean RULE_SEVEN_APPLIED_SETTING_DEFAULTDefault setting for whether rule prioritisation rule 7 of the Schuffenhauer scaffold tree fragmentation should be applied. By default, rule 7 is applied.- See Also:
-
RETAIN_ONLY_HYBRIDISATIONS_AT_AROMATIC_BONDS_SETTING_DEFAULT
public static final boolean RETAIN_ONLY_HYBRIDISATIONS_AT_AROMATIC_BONDS_SETTING_DEFAULTDefault setting for whether hybridisation should only be retained for aromatic bonds. By default, the hybridisation of all bonds is retained.- See Also:
-
SCAFFOLD_MODE_OPTION_DEFAULT
Default setting for which scaffold mode should be used. By default, ScaffoldModeOption.SCAFFOLD is used.
-
-
Constructor Details
-
ScaffoldGenerator
public ScaffoldGenerator()The only constructor of this class. Sets all settings to their default values.
-
-
Method Details
-
isAromaticityDetermined
public boolean isAromaticityDetermined()Specifies whether the aromaticity is to be taken into account.- Returns:
- true if the aromaticity is determined
-
getAromaticityModel
public org.openscience.cdk.aromaticity.Aromaticity getAromaticityModel()Returns the currently applied Aromaticity model. This consists of the CycleFinder and the ElectronDonation Model.- Returns:
- the Aromaticity model
-
getSmilesGenerator
public org.openscience.cdk.smiles.SmilesGenerator getSmilesGenerator()Returns the currently applied SmilesGenerator.- Returns:
- the SmilesGenerator
-
isRuleSevenApplied
public boolean isRuleSevenApplied()Indicates whether rule 7 of the Schuffenhauer scaffold tree fragmentation is executed. It can be useful to turn off rule 7 explicitly, as it is only relevant for a relatively small number of molecules, but it increases the computing time.- Returns:
- true if rule 7 is applied
-
getScaffoldModeSetting
Returns the currently applied ScaffoldMode.- Returns:
- the now used scaffold ScaffoldMode
-
areOnlyHybridisationsAtAromaticBondsRetained
public boolean areOnlyHybridisationsAtAromaticBondsRetained()With this setting, only the hybridisation of aromatic atoms can be obtained.- Returns:
- true if only the hybridisation of aromatic atoms is obtained
-
setDetermineAromaticitySetting
public void setDetermineAromaticitySetting(boolean anIsAromaticitySet) Sets the option to not determine the aromaticity. If false, then no structures labelled as aromatic are created and previously existing ones are not changed.- Parameters:
anIsAromaticitySet
- if true the aromaticity is determined
-
setAromaticityModelSetting
public void setAromaticityModelSetting(org.openscience.cdk.aromaticity.Aromaticity anAromaticity) throws NullPointerException Sets the applied aromaticity model. This consists of the CycleFinder and the ElectronDonation Model. Must not be null. However, the aromaticity model is also not used ifdetermineAromaticitySetting
== false.- Parameters:
anAromaticity
- the new Aromaticity model- Throws:
NullPointerException
- if parameter is null
-
setSmilesGeneratorSetting
public void setSmilesGeneratorSetting(org.openscience.cdk.smiles.SmilesGenerator aSmilesGenerator) throws NullPointerException Sets the applied SmilesGenerator.- Parameters:
aSmilesGenerator
- the new SmilesGenerator- Throws:
NullPointerException
- if parameter is null
-
setRuleSevenAppliedSetting
public void setRuleSevenAppliedSetting(boolean anIsRuleSevenApplied) Sets the option to skip rule 7 of the Schuffenhauer scaffold tree fragmentation. It can be useful to turn off rule 7 explicitly, as it is only relevant for a relatively small number of molecules, but it increases the computing time.- Parameters:
anIsRuleSevenApplied
- if true rule 7 is applied
-
setScaffoldModeSetting
public void setScaffoldModeSetting(ScaffoldGenerator.ScaffoldModeOption anScaffoldMode) throws NullPointerException Sets the now used scaffold mode.- Parameters:
anScaffoldMode
- the scaffold mode to use- Throws:
NullPointerException
- if parameter is null
-
setRetainOnlyHybridisationsAtAromaticBondsSetting
public void setRetainOnlyHybridisationsAtAromaticBondsSetting(boolean anIsOnlyHybridisationsAtAromaticBondsRetained) Sets the setting that, only the hybridisation of aromatic atoms is obtained.- Parameters:
anIsOnlyHybridisationsAtAromaticBondsRetained
- true, if only the hybridisation of aromatic atoms is obtained.
-
restoreDefaultSettings
public void restoreDefaultSettings()All settings are set to their default values. Automatically executed by the constructor. -
getScaffold
public org.openscience.cdk.interfaces.IAtomContainer getScaffold(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException, NullPointerException Generates the selected fragment type for the entered molecule and returns it. You can choose from the types available in ScaffoldModeOption. Depending on the internal settings viaaromaticityModelSetting
, a specific aromaticity model is applied to determine the aromaticity of the individual atoms of the fragment.determineAromaticitySetting
allows you to determine whether the aromaticity is to be determined.- Parameters:
aMolecule
- molecule whose scaffold is produced.anAddImplicitHydrogens
- Specifies whether implicit hydrogens are to be added at the end. The removal of atoms can create open valences. These are not compensated with hydrogens at the end if this parameter is false.- Returns:
- scaffold of the inserted molecule. It can be an empty molecule if the original molecule does not contain a scaffold of the used type.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present or problem with aromaticity.apply()CloneNotSupportedException
- if cloning is not possible.NullPointerException
- if parameter is null
-
getRings
public List<org.openscience.cdk.interfaces.IAtomContainer> getRings(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens) throws CloneNotSupportedException, org.openscience.cdk.exception.CDKException, NullPointerException Extracts the individual rings from the scaffold of the given molecule. The rings are not unified, i.e. if there are multiple benzene rings in the input molecule, they are all extracted and returned individually. The removal of atoms can create open valences. These open valences can be compensated with implicit hydrogens.- Parameters:
aMolecule
- molecule whose scaffold rings are produced.anAddImplicitHydrogens
- Specifies whether implicit hydrogens are to be added at the end. The removal of atoms can create open valences. These are not compensated with hydrogens at the end if this parameter is false.- Returns:
- scaffold rings of the given molecule.
- Throws:
CloneNotSupportedException
- if cloning is not possible.org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: throws if insufficient information is present or problem with aromaticity.apply()NullPointerException
- if parameter is null
-
getSideChains
public List<org.openscience.cdk.interfaces.IAtomContainer> getSideChains(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens) throws CloneNotSupportedException, org.openscience.cdk.exception.CDKException, NullPointerException Outputs all fragments that are not contained in the generated scaffold in contrast to the unchanged molecule. Those fragments are regarded as side chains of the molecule. The scaffold is therefore subtracted from the original molecule and all remaining fragments are saturated with hydrogens if anAddImplicitHydrogens is true.SideChains cannot be generated for ELEMENTAL_WIRE_FRAME, BASIC_FRAMEWORK and BASIC_WIRE_FRAME themselves. Their side chains are identical to those of MURCKO_FRAMEWORK. Therefore, these are used for those scaffold modes.
- Parameters:
aMolecule
- Molecule whose side chains are to be returnedanAddImplicitHydrogens
- Specifies whether implicit hydrogens are to be added at the end. The removal of atoms can create open valences. These are not compensated with hydrogens at the end if this parameter is false.- Returns:
- List of SideChains of the input molecule
- Throws:
CloneNotSupportedException
- if cloning is not possible.org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present or problem with aromaticity.apply()NullPointerException
- if parameter is null
-
getLinkers
public List<org.openscience.cdk.interfaces.IAtomContainer> getLinkers(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens) throws CloneNotSupportedException, org.openscience.cdk.exception.CDKException, NullPointerException Returns the linkers of the molecule as a fragment list. Linkers are all fragments that are neither ring nor side chain. Depending on the ScaffoldMode selected, the linkers are different.- Parameters:
aMolecule
- Molecule whose linkers are to be returnedanAddImplicitHydrogens
- Specifies whether implicit hydrogens are to be added at the end. The removal of atoms can create open valences. These are not compensated with hydrogens at the end if this parameter is false.- Returns:
- linkers of the input molecule
- Throws:
CloneNotSupportedException
- if cloning is not possible.org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present or problem with aromaticity.apply()NullPointerException
- if parameter is null
-
applyEnumerativeRemoval
public List<org.openscience.cdk.interfaces.IAtomContainer> applyEnumerativeRemoval(org.openscience.cdk.interfaces.IAtomContainer aMolecule) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException, NullPointerException Iteratively removes the terminal rings. All resulting scaffolds are returned. Duplicates are not permitted. The Scaffold of the entire entered molecule is stored first in the list. The scaffolds that follow then become smaller and smaller.The removal of atoms can create open valences. These are compensated with implicit hydrogens.
- Parameters:
aMolecule
- Molecule to be disassembled.- Returns:
- List with all resulting Scaffold.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.NullPointerException
- if parameter is null
-
generateScaffoldNetwork
public ScaffoldNetwork generateScaffoldNetwork(org.openscience.cdk.interfaces.IAtomContainer aMolecule) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException, NullPointerException Iteratively removes the terminal rings. All resulting Scaffolds are saved in a ScaffoldNetwork. A new level is created when the total number of rings decreases by 1. Level 0 is the one with the fewest rings and therefore the root. In most cases, the scaffold on level 0 will have exactly one ring, if it is not an aromatic multi-ring system that cannot be dissected further.Duplicates are permitted.
Duplicates are not given their own node, but a link created to the existing related node. In this way, a child can have several parents.If a molecule does not generate a Scaffold, it is stored as a node with empty SMILES and is treated normally.
The removal of atoms can create open valences. These are compensated with implicit hydrogens.
- Parameters:
aMolecule
- Molecule to be disassembled.- Returns:
- ScaffoldNetwork with all resulting Scaffold.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.NullPointerException
- if parameter is null
-
generateScaffoldNetwork
public ScaffoldNetwork generateScaffoldNetwork(List<org.openscience.cdk.interfaces.IAtomContainer> aMoleculeList) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException, NullPointerException Generates a network for each molecule in the list and merges the networks together.Iteratively removes the terminal rings of each molecule. All resulting scaffolds of a molecule are saved in a ScaffoldNetwork. A new level is created when the total number of rings decreases by 1. Level 0 is the one with the fewest rings and therefore the root. In most cases, the scaffold on level 0 will have exactly one ring, if it is not an aromatic multi-ring system that cannot be dissected further.
All networks are merged together. Duplicates are permitted. Duplicates are not given their own node, but a link created to the existing related node. In this way, a child can have several parents.If one networks do not have a common node with the others, it is still added without a connection.
If a molecule does not generate a Scaffold, it is stored as a node with empty SMILES and is treated normally.
The removal of atoms can create open valences. These are compensated with implicit hydrogens.
- Parameters:
aMoleculeList
- List of Molecules to be disassembled and merged.- Returns:
- ScaffoldNetwork with all resulting Scaffold.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.NullPointerException
- if parameter is null
-
applySchuffenhauerRules
public List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRules(org.openscience.cdk.interfaces.IAtomContainer aMolecule) throws CloneNotSupportedException, org.openscience.cdk.exception.CDKException, NullPointerException Iteratively removes the rings of the molecule according to specific rules that are queried hierarchically and returns the scaffolds as list.
Based on the rules from the "The Scaffold Tree" paper by Schuffenhauer et al. Rule 7applySchuffenhauerRuleSeven(IAtomContainer, List)
is only applied ifruleSevenAppliedSetting
is true. The aromaticity is also redetermined bydetermineAromaticitySetting
.The removal of atoms can create open valences. These are compensated with implicit hydrogens.
- Parameters:
aMolecule
- Molecule that is to be broken down into its fragments- Returns:
- Fragments of the molecule according to the Schuffenhauer rules
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.NullPointerException
- if parameter is null
-
generateSchuffenhauerTree
public ScaffoldTree generateSchuffenhauerTree(org.openscience.cdk.interfaces.IAtomContainer aMolecule) throws CloneNotSupportedException, org.openscience.cdk.exception.CDKException, NullPointerException Iteratively removes the rings of the molecule according to specific rules that are queried hierarchically.A tree is built from the resulting fragments. A tree has one single root, the smallest fragment. Each node can have several children but only one parent.
Based on the rules from the "The Scaffold Tree" paper by Schuffenhauer et al. Rule 7
applySchuffenhauerRuleSeven(IAtomContainer, List)
is only applied ifruleSevenAppliedSetting
is true and the aromaticity is also redetermined bydetermineAromaticitySetting
.If a molecule does not generate a Scaffold, it is stored as node with empty SMILES in a ScaffoldTree and is treated normally.
The removal of atoms can create open valences. These are compensated with implicit hydrogens.
- Parameters:
aMolecule
- Molecule that is to be broken down into its fragments- Returns:
- A tree consisting of fragments of the molecule according to the Schuffenhauer rules
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.NullPointerException
- if parameter is null
-
generateSchuffenhauerForest
public List<ScaffoldTree> generateSchuffenhauerForest(List<org.openscience.cdk.interfaces.IAtomContainer> aMoleculeList) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException, NullPointerException Decomposes the entered molecules into Scaffolds, creates ScaffoldTrees from them and then assembles these trees if possible. If trees have the same root (the smallest fragment), they are joined together so that the same fragments are no longer duplicated. In this way, no fragment created is lost when it is joined together.The trees are generated with
generateSchuffenhauerTree(IAtomContainer)
.If a molecule does not generate a Scaffold, it is stored as a node with empty SMILES in a new ScaffoldTree and is treated normally.
All other empty nodes are then added to this tree accordingly. The removal of atoms can create open valences. These are compensated with implicit hydrogens.
- Parameters:
aMoleculeList
- Molecules to be transferred into list of trees- Returns:
- List of ScaffoldTrees consisting of the fragments of the entered molecules.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possibleNullPointerException
- if parameter is null
-
getScaffoldInternal
protected org.openscience.cdk.interfaces.IAtomContainer getScaffoldInternal(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens, boolean anIsAromaticitySet, org.openscience.cdk.aromaticity.Aromaticity anAromaticity, ScaffoldGenerator.ScaffoldModeOption aScaffoldModeOption) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException Generates the selected fragment type for the entered molecule and returns it. You can choose from the types available in ScaffoldModeOption. Depending on the internal settings viaaromaticityModelSetting
, a specific aromaticity model is applied to determine the aromaticity of the individual atoms of the fragment.determineAromaticitySetting
allows you to determine whether the aromaticity is to be determined.- Parameters:
aMolecule
- molecule whose scaffold is produced.anAddImplicitHydrogens
- Specifies whether implicit hydrogens are to be added at the end. The removal of atoms can create open valences. These are not compensated with hydrogens at the end if this parameter is false.anIsAromaticitySet
- Indicates whether the aromaticity is to be set.anAromaticity
- anAromaticity Model to be used to determine aromaticity. Can be null if anIsAromaticitySet == false.aScaffoldModeOption
- Indicates which scaffold is to be used.- Returns:
- scaffold of the inserted molecule. It can be an empty molecule if the original molecule does not contain a Scaffold.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present or problem with aromaticity.apply()CloneNotSupportedException
- if cloning is not possible.
-
getRingsInternal
protected List<org.openscience.cdk.interfaces.IAtomContainer> getRingsInternal(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anIsKeepingNonSingleBonds) throws CloneNotSupportedException, org.openscience.cdk.exception.CDKException Generates a set of rings depending on the CycleFinder selected bygetCycleFinder(IAtomContainer)
. Can optional add non-single bounded atoms to the rings and returns them. Important: Property (ScaffoldGenerator.SCAFFOLD_ATOM_COUNTER_PROPERTY) must be set for aMolecule.- Parameters:
aMolecule
- molecule whose rings are produced.anIsKeepingNonSingleBonds
- if true, non-single bonded atoms are retained on the ring.- Returns:
- rings of the inserted molecule.
- Throws:
CloneNotSupportedException
- if cloning is not possible.org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present or problem with aromaticity.apply()
-
getMurckoFragment
protected org.openscience.cdk.interfaces.IAtomContainer getMurckoFragment(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Returns the Murcko fragment of each molecule entered. In addition, the stereo elements are transferred from the original molecule to the Murcko fragment if possible, as these are lost when the Murcko fragment is generated.- Parameters:
aMolecule
- Molecule whose Murcko fragment is to be created- Returns:
- Murcko fragment of the input molecule
-
removeRing
protected org.openscience.cdk.interfaces.IAtomContainer removeRing(org.openscience.cdk.interfaces.IAtomContainer aMolecule, boolean anAddImplicitHydrogens, org.openscience.cdk.interfaces.IAtomContainer aRing) throws CloneNotSupportedException, org.openscience.cdk.exception.CDKException Removes the given ring from the total molecule and returns it. Preserves the sp2 hybridisation of a border atom when an aromatic ring is removed. Preserves the hybridisation of all molecules ifretainOnlyHybridisationsAtAromaticBondsSetting
== true With the removal of a heteroatom of heterocycles of size 3 a double bond is inserted if it is directly adjacent to another ring. Important: Property (ScaffoldGenerator.SCAFFOLD_ATOM_COUNTER_PROPERTY) must be set for aMolecule/aRing and match.- Parameters:
aMolecule
- Molecule whose ring is to be removed.anAddImplicitHydrogens
- Specifies whether implicit hydrogens are to be added at the end. The removal of atoms can create open valences. These are not compensated with hydrogens at the end if this parameter is false.aRing
- Ring to be removed.- Returns:
- Molecule whose ring has been removed.
- Throws:
CloneNotSupportedException
- if cloning is not possible.org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present
-
isRingTerminal
protected boolean isRingTerminal(org.openscience.cdk.interfaces.IAtomContainer aMolecule, org.openscience.cdk.interfaces.IAtomContainer aRing) throws CloneNotSupportedException Checks whether the tmpRing in the tmpMolecule is terminal. This means whether it can be removed without creating several unconnected parts. Rings that lead to spiro ring systems when removed are also considered non-terminal. Important: Property (ScaffoldGenerator.SCAFFOLD_ATOM_COUNTER_PROPERTY) must be set for aMolecule/aRing and match.- Parameters:
aMolecule
- Molecule whose ring is to be checkedaRing
- Ring to check- Returns:
- true if the tmpRing is terminal
- Throws:
CloneNotSupportedException
- if cloning is not possible.
-
isRingRemovable
protected boolean isRingRemovable(org.openscience.cdk.interfaces.IAtomContainer aRing, List<org.openscience.cdk.interfaces.IAtomContainer> aRings, org.openscience.cdk.interfaces.IAtomContainer aMolecule) throws CloneNotSupportedException, org.openscience.cdk.exception.CDKException Checks whether rings may be removed. If the ring does not contain atoms that are not present in any other rings, it is not removable. Furthermore, removal is impossible when it is an aromatic ring, that borders two consecutive rings. Important: Property (ScaffoldGenerator.SCAFFOLD_ATOM_COUNTER_PROPERTY) must be set for aMolecule/aRings/aRing and match.- Parameters:
aRing
- Ring being tested for its removabilityaRings
- All rings of the moleculeaMolecule
- Whole molecule- Returns:
- Whether the ring is removable
- Throws:
CloneNotSupportedException
- if cloning is not possible.org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present
-
removeRingForSchuffenhauerRule
protected void removeRingForSchuffenhauerRule(org.openscience.cdk.interfaces.IAtomContainer aRing, List<org.openscience.cdk.interfaces.IAtomContainer> aFragmentList) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException Removes the selected ring from the last fragment in the list and adds the resulting fragment to this list. Specially designed forapplySchuffenhauerRules(IAtomContainer)
- Parameters:
aRing
- Ring to be removedaFragmentList
- List of all fragments created so far- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.
-
getCycleFinder
protected org.openscience.cdk.graph.CycleFinder getCycleFinder(org.openscience.cdk.interfaces.IAtomContainer aMolecule) Selects the correct CycleFinder based on ScaffoldGenerator.CYCLE_FINDER_BACKUP_PROPERTY.- Parameters:
aMolecule
- Molecule for which a CycleFinder is to be generated- Returns:
- CycleFinder that matches the properties of the molecule
-
hasFusedAromaticRings
protected boolean hasFusedAromaticRings(org.openscience.cdk.interfaces.IAtomContainer aRing, List<org.openscience.cdk.interfaces.IAtomContainer> aRings, org.openscience.cdk.interfaces.IAtomContainer aMolecule) throws CloneNotSupportedException Checks whether the ring of a molecule is in an aromatic fused ring system. These systems cannot easily be further disassembled.- Parameters:
aRing
- Ring tested to see if it is in an aromatic fused ring systemaRings
- All Rings of the moleculeaMolecule
- Whole molecule- Returns:
- Whether the ring is part of an aromatic fused ring system
- Throws:
CloneNotSupportedException
- if cloning is not possible.
-
isAtomContainerAromatic
protected boolean isAtomContainerAromatic(org.openscience.cdk.interfaces.IAtomContainer aMolecule) throws CloneNotSupportedException Checks the aromaticity of each atom of the input molecule. If one of the atoms is not aromatic, the whole molecule is not aromatic.- Parameters:
aMolecule
- Molecule whose aromaticity is to be determined- Returns:
- true if the molecule is completely aromatic
- Throws:
CloneNotSupportedException
- if cloning is not possible.
-
applySchuffenhauerRuleOne
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleOne(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) Sort out the rings according to the first Schuffenhauer rule. Based on the first rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: Remove Heterocycles of Size 3 First. Therefore, size 3 hetero rings are preferred when available. Only these rings will be returned if present. If none are present, all rings entered will be returned.
- Parameters:
aRings
- Rings to which the first rule is to be applied- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if the rule cannot be applied to the rings.
-
applySchuffenhauerRuleTwo
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleTwo(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException Sort out the rings according to the second Schuffenhauer rule. Based on the second rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: Do not remove rings with >= 12 Atoms if there are still smaller rings to remove. Therefore, this method prefers smaller rings when macro rings are present. If no macro rings are present, all rings entered will be returned.
- Parameters:
aRings
- Removable rings of the molecule to which the rule is applied- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if the rule cannot be applied to the rings.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present
-
applySchuffenhauerRuleThree
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleThree(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException Sort out the rings according to the third Schuffenhauer rule. Based on the third rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: Choose the Parent Scaffold Having the Smallest Number of Acyclic Linker Bonds. Therefore, linked rings are given priority over fused rings. The rings that are connected to the rest of the molecule via the longest linkers have priority in the removal process. The number of atoms of the linkers is calculated here. The number of linkers is directly dependent on the number of atoms: LinkerBonds = LinkerAtoms - 1
- Parameters:
aRings
- Removable rings of the molecule to which the rule is appliedaMolecule
- Molecule from which a ring is to be removed- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if the rule cannot be applied to the rings.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.
-
applySchuffenhauerRuleFourAndFive
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleFourAndFive(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException Sort out the rings according to the fourth and fifth Schuffenhauer rule. Based on the fourth and fifth rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The fourth rule says: Retain Bridged Rings, Spiro Rings, and Nonlinear Ring Fusion Patterns with Preference. Therefore, delta is calculated as follows: |nrrb - (nR - 1)| nrrb: number of bonds being a member in more than one ring nR: number of rings The rings with the highest absolute delta are returned The artificial creation of spiro ring systems (see scheme 10 and rule 5) is not possible in our implementation, because such a ring would not be detected as terminal (and only terminal rings are considered for removal) The fifth rule says: Bridged Ring Systems Are Retained with Preference over Spiro Ring Systems. Therefore, the rings with the positive maximum delta are preferred over the rings with the negative one. Through the isRingTerminal() method, a removal that leads to spiro ring systems is not available for selection anyway. For performance reasons, rules four and five are combined. This way, delta only has to be calculated once.
- Parameters:
aRings
- Removable rings of the molecule to which the rule is appliedaMolecule
- Molecule from which a ring is to be removed- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if the rule cannot be applied to the rings.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.
-
applySchuffenhauerRuleSix
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleSix(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException Sort out the rings according to the sixth Schuffenhauer rule. Based on the sixth rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: Remove Rings of Sizes 3, 5, and 6 First. Therefore, the exocyclic atoms are removed and the size of the ring is determined. Rings of size 3, 5 and 6 are preferred. If no ring of these sizes is present, the original list is returned.
- Parameters:
aRings
- Removable rings of the molecule to which the rule is applied- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if the rule cannot be applied to the rings.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present
-
applySchuffenhauerRuleSeven
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleSeven(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException Sort out the rings according to the seventh Schuffenhauer rule. Based on the seventh rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: A Fully Aromatic Ring System Must Not Be Dissected in a Way That the Resulting System Is Not Aromatic anymore. It was changed to: The number of aromatic rings should be reduced by a maximum of one, when a ring is removed. Therefore, no additional aromatic rings should be deleted by removing a ring.
- Parameters:
aRings
- Removable rings of the molecule to which the rule is appliedaMolecule
- Molecule from which a ring is to be removed- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if the rule cannot be applied to the rings.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.
-
applySchuffenhauerRuleEight
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleEight(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException Sort out the rings according to the eighth Schuffenhauer rule. Based on the eighth rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: Remove Rings with the Least Number of Heteroatoms First Therefore, the exocyclic atoms are removed and the number of cyclic heteroatoms is counted Rings with the smallest number of heteroatoms are preferred
- Parameters:
aRings
- Removable rings of the molecule to which the rule is applied- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if all rings have the same size of heteroatoms.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present
-
applySchuffenhauerRuleNine
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleNine(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException Sort out the rings according to the ninth Schuffenhauer rule. Based on the ninth rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: If the Number of Heteroatoms Is Equal, the Priority of Heteroatoms to Retain is N > O > S. Therefore, the number of cyclic N, O and S of each ring is counted The rings that have the lowest value of heteroatoms according to this rule are selected. If two rings have the same number of N, their amount of O is considered. Heteroatoms that are not N, O or S are ignored.
- Parameters:
aRings
- Removable rings of the molecule to which the rule is applied- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if all rings have the same size of heteroatoms.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present
-
applySchuffenhauerRuleTen
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleTen(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException Sort out the rings according to the tenth Schuffenhauer rule. Based on the tenth rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: Smaller Rings are Removed First Exocyclic atoms are not observed Therefore, the exocyclic atoms are removed and the number of cyclic atoms is counted Rings with the smallest number of atoms are preferred
- Parameters:
aRings
- Removable rings of the molecule to which the rule is applied- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if all rings have the same size of heteroatoms.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is present
-
applySchuffenhauerRuleEleven
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleEleven(List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException Sort out the rings according to the eleventh Schuffenhauer rule. Based on the eleventh rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: For Mixed Aromatic/Nonaromatic Ring Systems, Retain Nonaromatic Rings with Priority. Therefore, all rings are tested for aromaticity and the nonaromatic ones are preferably removed. If it is not a mixed system, all rings will be returned.
- Parameters:
aRings
- Removable rings of the molecule to which the rule is applied- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list, if the molecule is not a mixed ring system.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.
-
applySchuffenhauerRuleTwelve
protected List<org.openscience.cdk.interfaces.IAtomContainer> applySchuffenhauerRuleTwelve(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException Sort out the rings according to the twelfth Schuffenhauer rule. Based on the twelfth rule from the "The Scaffold Tree" paper by Schuffenhauer et al.The rule says: Remove Rings First Where the Linker Is Attached to a Ring Heteroatom at Either End of the Linker. Therefore, rings that attached to a linker that have a heteroatom at al. least one end are prioritised.
Two cases are treated differently. In the first case, linkers consisting of only one bond are selected. In this case, the ring to be examined is directly linked to the Murcko fragment from which this ring was removed. This bond is found, and it is checked whether it contains at least one heteroatom. In the second case, all other linkers are treated. These consist of at least one atom. Here, the linker atoms are filtered out by subtracting the atoms of the ring to be examined and the atoms of the murcko fragment in which this ring was removed from the total molecule. The remaining atoms are the linker atoms. Now it is checked whether their atoms are bound to heteroatoms of the rest of the molecule.
- Parameters:
aRings
- Removable rings of the molecule to which the rule is appliedaMolecule
- Molecule from which a ring is to be removed- Returns:
- List of rings to be removed first according to the rule. Returns the unchanged list if the rule cannot be applied to the rings.
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.
-
isRingAttachedToHeteroatomLinker
protected boolean isRingAttachedToHeteroatomLinker(org.openscience.cdk.interfaces.IAtomContainer aMolecule, org.openscience.cdk.interfaces.IAtomContainer aRing) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException The ring to be examined is checked to determine whether it is attached to a linker that has a heteroatom at least one end. Two cases are treated differently. In the first case, linkers consisting of only one bond are selected. In this case, the ring to be examined is directly linked to the Murcko fragment from which this ring was removed. This bond is found, and it is checked whether it contains at least one heteroatom. In the second case, all other linkers are treated. These consist of at least one atom. Here, the linker atoms are filtered out by subtracting the atoms of the ring to be examined and the atoms of the Murcko fragment in which this ring was removed from the total molecule. The remaining atoms are the linker atoms. Now it is checked whether their atoms are bound to heteroatoms of the rest of the molecule. Designed for theapplySchuffenhauerRuleTwelve(IAtomContainer, List)
method.- Parameters:
aMolecule
- Molecule from which a ring is to be removedaRing
- rings of the molecule to which the rule is applied- Returns:
- Whether it is one of the rings sought for
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.
-
applySchuffenhauerRuleThirteen
protected org.openscience.cdk.interfaces.IAtomContainer applySchuffenhauerRuleThirteen(org.openscience.cdk.interfaces.IAtomContainer aMolecule, List<org.openscience.cdk.interfaces.IAtomContainer> aRings) throws org.openscience.cdk.exception.CDKException, CloneNotSupportedException Remove a ring according to the thirteenth Schuffenhauer rule. Based on rule number 13 from the "The Scaffold Tree" paper by Schuffenhauer et al.In contrast to the paper, different types of SMILES can be used here instead of canonical SMILES. The entered rings are sorted alphabetically by their SMILES. The last ring of this sort is returned. If two structures are the same, one is selected arbitrary.
- Parameters:
aRings
- Removable rings of the molecule to which the rule is appliedaMolecule
- Molecule from which a ring is to be removed- Returns:
- Molecule from which the ring selected by the rule has been removed
- Throws:
org.openscience.cdk.exception.CDKException
- problem with CDKHydrogenAdder: Throws if insufficient information is presentCloneNotSupportedException
- if cloning is not possible.
-