mic.rules
Class SA18

java.lang.Object
  extended by java.util.Observable
      extended by toxTree.tree.AbstractRule
          extended by toxTree.tree.rules.smarts.AbstractRuleSmartSubstructure<org.openscience.cdk.interfaces.IAtomContainer>
              extended by toxTree.tree.rules.smarts.RuleSMARTSSubstructureAmbit
                  extended by toxTree.tree.rules.RuleAromatic
                      extended by mic.rules.SA18
All Implemented Interfaces:
ambit2.smarts.query.ISmartsPatternFactory, java.io.Serializable, java.lang.Cloneable, IDecisionRule, IImplementationDetails, XMLSerializable, IAlertCounter, IRuleSMARTSubstructures
Direct Known Subclasses:
SA19

public class SA18
extends RuleAromatic
implements IAlertCounter

TODO Reimplement PAH recognition in a more robust way, possibly by generalized Hueckel rule (Randic)

Author:
nina
See Also:
Serialized Form

Field Summary
 
Fields inherited from class toxTree.tree.rules.smarts.AbstractRuleSmartSubstructure
containsAllSubstructures, final_and_patch, smartsPatterns
 
Fields inherited from class toxTree.tree.AbstractRule
changes, editable, ERR_STRUCTURENOTPREPROCESSED, examples, explanation, id, logger, MSG_NO, MSG_YES, no, residueIDHidden, title
 
Fields inherited from interface toxTree.core.XMLSerializable
xmltag_CATEGORIES, xmltag_CATEGORY, xmltag_CATEGORYTHRESHOLD, xmltag_CLASS, xmltag_EXPLANATION, xmltag_ID, xmltag_METHOD, xmltag_METHODPARAMETER, xmltag_METHODS, xmltag_NAME, xmltag_RULE, xmltag_RULEEXAMPLE, xmltag_RULES, xmltag_TREEROOT
 
Constructor Summary
SA18()
           
 
Method Summary
protected  boolean acceptRingSet(org.openscience.cdk.interfaces.IRingSet ringset, int heteroaromaticrings, int aromaticrings)
           
 java.lang.String getImplementationDetails()
           
protected  int getNumberOfAromaticAtoms(org.openscience.cdk.interfaces.IRing ring)
           
 void incrementCounter(org.openscience.cdk.interfaces.IAtomContainer mol)
           
protected  boolean isAromaticRing(int aromaticAtoms, int allAtoms)
           
protected  boolean isHeterocyclic(org.openscience.cdk.interfaces.IRing ring)
           
 boolean isImplemented()
           
 boolean verifyRule(org.openscience.cdk.interfaces.IAtomContainer mol)
          Find essential rings through SSSRFinder.findEssentialRings.
 
Methods inherited from class toxTree.tree.rules.smarts.RuleSMARTSSubstructureAmbit
createSmartsPattern, getObjectToVerify
 
Methods inherited from class toxTree.tree.rules.smarts.AbstractRuleSmartSubstructure
addSubstructure, addSubstructure, addSubstructure, clearSubstructures, containsAllSubstructures, deleteSubstructure, equals, getSelector, getSmartsPatterns, getSubstructure, initSingleSMARTS, isAPossibleHit, removeSingleSMARTS, setContainsAllSubstructures, setSmartsPatterns, setSubstructure, setSubstructure, verifyRule
 
Methods inherited from class toxTree.tree.AbstractRule
addPropertyChangeListener, clearFlags, clone, createRule, fromXML, getEditor, getExampleMolecule, getExamples, getExplanation, getID, getNum, getTitle, hideResiduesID, isEditable, isResidueIDHidden, log, log, log, makeMolecule, removePropertyChangeListener, setEditable, setExampleMolecule, setExamples, setExplanation, setID, setNum, setTitle, toShallowXML, toString, toXML
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SA18

public SA18()
Method Detail

incrementCounter

public void incrementCounter(org.openscience.cdk.interfaces.IAtomContainer mol)
Specified by:
incrementCounter in interface IAlertCounter

getImplementationDetails

public java.lang.String getImplementationDetails()
Specified by:
getImplementationDetails in interface IImplementationDetails
Overrides:
getImplementationDetails in class AbstractRuleSmartSubstructure<org.openscience.cdk.interfaces.IAtomContainer>

isImplemented

public boolean isImplemented()
Specified by:
isImplemented in interface IDecisionRule
Overrides:
isImplemented in class RuleAromatic
Returns:
false if the rule is not implemented and true if it is

verifyRule

public boolean verifyRule(org.openscience.cdk.interfaces.IAtomContainer mol)
                   throws DecisionMethodException
Find essential rings through SSSRFinder.findEssentialRings. This set of rings is uniquely defined. Split into set of fused rings. For each set of fused rings verify for each ring if it is composed of aromatic atoms only. If yes, the ring is considered aromatic and the counter for aromatic rings within this set of fused rings is incremented. If the ring is aromatic, it is verified if it contains an heteroaromatic atoms, and if yes, the counter for heteroaromatic rings is incremented. If the set of fused rings contains > 2 aromatic rings and no heteroaromatic rings, the rule returns true.

Specified by:
verifyRule in interface IDecisionRule
Overrides:
verifyRule in class RuleAromatic
Parameters:
mol - org.openscience.cdk.interfaces.AtomContainer
Returns:
rule result, boolean
Throws:
DecisionMethodException

isAromaticRing

protected boolean isAromaticRing(int aromaticAtoms,
                                 int allAtoms)

acceptRingSet

protected boolean acceptRingSet(org.openscience.cdk.interfaces.IRingSet ringset,
                                int heteroaromaticrings,
                                int aromaticrings)

getNumberOfAromaticAtoms

protected int getNumberOfAromaticAtoms(org.openscience.cdk.interfaces.IRing ring)

isHeterocyclic

protected boolean isHeterocyclic(org.openscience.cdk.interfaces.IRing ring)


Copyright © 2004-2012 Ideaconsult Ltd.. All Rights Reserved.