$darkmode
DENOPTIM
denoptim.programs.fragmenter.CuttingRule Class Reference

A cutting rule with three SMARTS queries (atom 1, bond, atom2) and options. More...

Collaboration diagram for denoptim.programs.fragmenter.CuttingRule:
[legend]

Public Member Functions

 CuttingRule (String ruleName, String smartsAtm0, String smartsAtm1, String smartsBnd, int priority, List< String > opts)
 Constructor for a cutting rule. More...
 
String getName ()
 Returns the name of the cutting rule. More...
 
int getPriority ()
 
APClass getAPClass0 ()
 Get the AP class with sub class 0. More...
 
APClass getAPClass1 ()
 Get the AP class with sub class 1. More...
 
APClass getComplementaryAPClass (APClass apc)
 Get complementary class. More...
 
String getWholeSMARTSRule ()
 Returns the SMARTS query of the whole rule. More...
 
String getSMARTSAtom0 ()
 Get the SMARTS query of the first atom (SubClass 0) More...
 
String getSMARTSAtom1 ()
 Get the SMARTS query of the second atom (SubClass 1) More...
 
String getSMARTSBnd ()
 Get the SMARTS query of the bond. More...
 
boolean hasOptions ()
 
boolean isHAPTO ()
 
boolean isSymmetric ()
 
List< String > getOptions ()
 Returns the list of options. More...
 
int getBondOrder ()
 Tries to identify the bond order of the matched bond by searching for the corresponding, non-negated characters. More...
 
boolean involvesMetal ()
 
String toString ()
 Returns the string representing this rule. More...
 
boolean equals (Object o)
 
Boolean satisfiesOptions (MatchedBond matchedBond, Logger logger)
 Checks if a given bond satisfies the additional options of this rule beyond the matching of the SMARTS queries. More...
 

Private Attributes

String ruleName
 Rule name. More...
 
APClass apc0
 First APClass derived from this rule. More...
 
APClass apc1
 Second APClass derived from this rule. More...
 
String smartsAtm0
 SMARTS query matching the first atom. More...
 
String smartsAtm1
 SMARTS query matching the second atom. More...
 
String smartsBnd
 SMARTS query matching the bond between first and second atom. More...
 
int priority
 Priority index of this rule. More...
 
List< String > opts
 Additional Options. More...
 

Detailed Description

A cutting rule with three SMARTS queries (atom 1, bond, atom2) and options.

A cutting rule is an ordered list of strings that, once put together in the natural order, form the complete SMARTS query for one (or more) bonds between atom pairs. The order in the list of strings defines what 'first' and 'second' (or 0 and 1) mean in the the rest of the documentation, i.e., 'first' refers to anything pertaining atom 1, and 'second' pertains atom 2.

Author
Marco Foscato

Definition at line 31 of file CuttingRule.java.

Constructor & Destructor Documentation

◆ CuttingRule()

denoptim.programs.fragmenter.CuttingRule.CuttingRule ( String  ruleName,
String  smartsAtm0,
String  smartsAtm1,
String  smartsBnd,
int  priority,
List< String >  opts 
)

Constructor for a cutting rule.

Parameters
ruleNamename of the rule
smartsAtm0the part of the SMARTS query pertaining the first atom.
smartsAtm1the part of the SMARTS query pertaining the second atom.
smartsBndthe part of the SMARTS query pertaining the bond.
prioritythe priority index
optsany additional options.
Exceptions
DENOPTIMException

Definition at line 88 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.apc0, denoptim.programs.fragmenter.CuttingRule.apc1, denoptim.graph.APClass.make(), denoptim.programs.fragmenter.CuttingRule.opts, denoptim.programs.fragmenter.CuttingRule.priority, denoptim.programs.fragmenter.CuttingRule.ruleName, denoptim.constants.DENOPTIMConstants.SEPARATORAPPROPSCL, denoptim.programs.fragmenter.CuttingRule.smartsAtm0, denoptim.programs.fragmenter.CuttingRule.smartsAtm1, and denoptim.programs.fragmenter.CuttingRule.smartsBnd.

Referenced by denoptim.programs.fragmenter.CuttingRule.equals().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ equals()

boolean denoptim.programs.fragmenter.CuttingRule.equals ( Object  o)

◆ getAPClass0()

APClass denoptim.programs.fragmenter.CuttingRule.getAPClass0 ( )

Get the AP class with sub class 0.

Definition at line 147 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.apc0.

◆ getAPClass1()

APClass denoptim.programs.fragmenter.CuttingRule.getAPClass1 ( )

Get the AP class with sub class 1.

Definition at line 157 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.apc0, denoptim.programs.fragmenter.CuttingRule.apc1, and denoptim.programs.fragmenter.CuttingRule.isSymmetric().

Here is the call graph for this function:

◆ getBondOrder()

int denoptim.programs.fragmenter.CuttingRule.getBondOrder ( )

Tries to identify the bond order of the matched bond by searching for the corresponding, non-negated characters.

Definition at line 279 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.smartsBnd.

◆ getComplementaryAPClass()

APClass denoptim.programs.fragmenter.CuttingRule.getComplementaryAPClass ( APClass  apc)

Get complementary class.

Definition at line 170 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.apc0, denoptim.programs.fragmenter.CuttingRule.apc1, denoptim.graph.APClass.equals(), and denoptim.programs.fragmenter.CuttingRule.isSymmetric().

Here is the call graph for this function:

◆ getName()

String denoptim.programs.fragmenter.CuttingRule.getName ( )

Returns the name of the cutting rule.

Definition at line 126 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.ruleName.

Referenced by denoptim.programs.fragmenter.CuttingRule.equals().

Here is the caller graph for this function:

◆ getOptions()

List< String > denoptim.programs.fragmenter.CuttingRule.getOptions ( )

Returns the list of options.

Definition at line 268 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.opts.

Referenced by denoptim.programs.fragmenter.CuttingRule.equals().

Here is the caller graph for this function:

◆ getPriority()

int denoptim.programs.fragmenter.CuttingRule.getPriority ( )
Returns
the priority index of this rule.

Definition at line 137 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.priority.

Referenced by denoptim.programs.fragmenter.CuttingRule.equals(), and denoptim.io.DenoptimIO.readCuttingRules().

Here is the caller graph for this function:

◆ getSMARTSAtom0()

String denoptim.programs.fragmenter.CuttingRule.getSMARTSAtom0 ( )

Get the SMARTS query of the first atom (SubClass 0)

Definition at line 199 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.smartsAtm0.

Referenced by denoptim.programs.fragmenter.CuttingRule.equals(), and denoptim.programs.fragmenter.CuttingRule.satisfiesOptions().

Here is the caller graph for this function:

◆ getSMARTSAtom1()

String denoptim.programs.fragmenter.CuttingRule.getSMARTSAtom1 ( )

Get the SMARTS query of the second atom (SubClass 1)

Definition at line 209 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.smartsAtm1.

Referenced by denoptim.programs.fragmenter.CuttingRule.equals(), and denoptim.programs.fragmenter.CuttingRule.satisfiesOptions().

Here is the caller graph for this function:

◆ getSMARTSBnd()

String denoptim.programs.fragmenter.CuttingRule.getSMARTSBnd ( )

Get the SMARTS query of the bond.

Definition at line 219 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.smartsBnd.

Referenced by denoptim.programs.fragmenter.CuttingRule.equals(), and denoptim.programs.fragmenter.CuttingRule.satisfiesOptions().

Here is the caller graph for this function:

◆ getWholeSMARTSRule()

String denoptim.programs.fragmenter.CuttingRule.getWholeSMARTSRule ( )

◆ hasOptions()

boolean denoptim.programs.fragmenter.CuttingRule.hasOptions ( )
Returns
true if this rule has further options.

Definition at line 229 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.opts.

◆ involvesMetal()

boolean denoptim.programs.fragmenter.CuttingRule.involvesMetal ( )

◆ isHAPTO()

boolean denoptim.programs.fragmenter.CuttingRule.isHAPTO ( )
Returns
true if this rule matches multihapto ligands.

Definition at line 242 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.opts.

◆ isSymmetric()

boolean denoptim.programs.fragmenter.CuttingRule.isSymmetric ( )
Returns
true if this is a symmetric rule (atom SMARTS coincide)

Definition at line 255 of file CuttingRule.java.

References denoptim.programs.fragmenter.CuttingRule.smartsAtm0, and denoptim.programs.fragmenter.CuttingRule.smartsAtm1.

Referenced by denoptim.programs.fragmenter.CuttingRule.getAPClass1(), denoptim.programs.fragmenter.CuttingRule.getComplementaryAPClass(), and denoptim.programs.fragmenter.MatchedBond.MatchedBond().

Here is the caller graph for this function:

◆ satisfiesOptions()

Boolean denoptim.programs.fragmenter.CuttingRule.satisfiesOptions ( MatchedBond  matchedBond,
Logger  logger 
)

Checks if a given bond satisfies the additional options of this rule beyond the matching of the SMARTS queries.

Parameters
matchedBondthe bond to test.
loggerwhere any log should be directed.
Returns
true if the bond satisfies the condition.

Definition at line 378 of file CuttingRule.java.

References denoptim.constants.DENOPTIMConstants.ALL_METALS, denoptim.programs.fragmenter.MatchedBond.getAtmSubClass0(), denoptim.programs.fragmenter.MatchedBond.getAtmSubClass1(), denoptim.utils.ManySMARTSQuery.getMatchesOfSMARTS(), denoptim.utils.ManySMARTSQuery.getMessage(), denoptim.utils.ManySMARTSQuery.getNumMatchesOfQuery(), denoptim.programs.fragmenter.CuttingRule.getSMARTSAtom0(), denoptim.programs.fragmenter.CuttingRule.getSMARTSAtom1(), denoptim.programs.fragmenter.CuttingRule.getSMARTSBnd(), denoptim.utils.ManySMARTSQuery.hasProblems(), denoptim.utils.MoleculeUtils.isElement(), and denoptim.programs.fragmenter.CuttingRule.opts.

Referenced by denoptim.programs.fragmenter.MatchedBond.satisfiesRuleOptions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

Member Data Documentation

◆ apc0

◆ apc1

APClass denoptim.programs.fragmenter.CuttingRule.apc1
private

◆ opts

◆ priority

int denoptim.programs.fragmenter.CuttingRule.priority
private

Priority index of this rule.

The lower the value, the earlier this rule is used and the more dominant it is over other rules.

Definition at line 68 of file CuttingRule.java.

Referenced by denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getPriority(), and denoptim.programs.fragmenter.CuttingRule.toString().

◆ ruleName

String denoptim.programs.fragmenter.CuttingRule.ruleName
private

Rule name.

Usually a human-readable string giving a hint on what this cutting rule is supposed to cut or represent.

Definition at line 37 of file CuttingRule.java.

Referenced by denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getName(), and denoptim.programs.fragmenter.CuttingRule.toString().

◆ smartsAtm0

◆ smartsAtm1

◆ smartsBnd


The documentation for this class was generated from the following file: