$darkmode
DENOPTIM
|
A cutting rule with three SMARTS queries (atom 1, bond, atom2) and options. More...
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... | |
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.
Definition at line 31 of file CuttingRule.java.
denoptim.programs.fragmenter.CuttingRule.CuttingRule | ( | String | ruleName, |
String | smartsAtm0, | ||
String | smartsAtm1, | ||
String | smartsBnd, | ||
int | priority, | ||
List< String > | opts | ||
) |
Constructor for a cutting rule.
ruleName | name of the rule |
smartsAtm0 | the part of the SMARTS query pertaining the first atom. |
smartsAtm1 | the part of the SMARTS query pertaining the second atom. |
smartsBnd | the part of the SMARTS query pertaining the bond. |
priority | the priority index |
opts | any additional options. |
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().
boolean denoptim.programs.fragmenter.CuttingRule.equals | ( | Object | o | ) |
Definition at line 343 of file CuttingRule.java.
References denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getName(), denoptim.programs.fragmenter.CuttingRule.getOptions(), denoptim.programs.fragmenter.CuttingRule.getPriority(), denoptim.programs.fragmenter.CuttingRule.getSMARTSAtom0(), denoptim.programs.fragmenter.CuttingRule.getSMARTSAtom1(), and denoptim.programs.fragmenter.CuttingRule.getSMARTSBnd().
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.
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().
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.
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().
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().
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().
int denoptim.programs.fragmenter.CuttingRule.getPriority | ( | ) |
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().
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().
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().
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().
String denoptim.programs.fragmenter.CuttingRule.getWholeSMARTSRule | ( | ) |
Returns the SMARTS query of the whole rule.
Definition at line 189 of file CuttingRule.java.
References denoptim.programs.fragmenter.CuttingRule.smartsAtm0, denoptim.programs.fragmenter.CuttingRule.smartsAtm1, and denoptim.programs.fragmenter.CuttingRule.smartsBnd.
boolean denoptim.programs.fragmenter.CuttingRule.hasOptions | ( | ) |
Definition at line 229 of file CuttingRule.java.
References denoptim.programs.fragmenter.CuttingRule.opts.
boolean denoptim.programs.fragmenter.CuttingRule.involvesMetal | ( | ) |
true
if the rule involves metals. Definition at line 306 of file CuttingRule.java.
References denoptim.constants.DENOPTIMConstants.ALL_METALS, denoptim.programs.fragmenter.CuttingRule.smartsAtm0, and denoptim.programs.fragmenter.CuttingRule.smartsAtm1.
boolean denoptim.programs.fragmenter.CuttingRule.isHAPTO | ( | ) |
Definition at line 242 of file CuttingRule.java.
References denoptim.programs.fragmenter.CuttingRule.opts.
boolean denoptim.programs.fragmenter.CuttingRule.isSymmetric | ( | ) |
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().
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.
matchedBond | the bond to test. |
logger | where any log should be directed. |
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().
String denoptim.programs.fragmenter.CuttingRule.toString | ( | ) |
Returns the string representing this rule.
Definition at line 332 of file CuttingRule.java.
References denoptim.programs.fragmenter.CuttingRule.opts, denoptim.programs.fragmenter.CuttingRule.priority, denoptim.programs.fragmenter.CuttingRule.ruleName, denoptim.programs.fragmenter.CuttingRule.smartsAtm0, denoptim.programs.fragmenter.CuttingRule.smartsAtm1, and denoptim.programs.fragmenter.CuttingRule.smartsBnd.
|
private |
First APClass derived from this rule.
Definition at line 42 of file CuttingRule.java.
Referenced by denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getAPClass0(), denoptim.programs.fragmenter.CuttingRule.getAPClass1(), and denoptim.programs.fragmenter.CuttingRule.getComplementaryAPClass().
|
private |
Second APClass derived from this rule.
Definition at line 47 of file CuttingRule.java.
Referenced by denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getAPClass1(), and denoptim.programs.fragmenter.CuttingRule.getComplementaryAPClass().
|
private |
Additional Options.
Definition at line 73 of file CuttingRule.java.
Referenced by denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getOptions(), denoptim.programs.fragmenter.CuttingRule.hasOptions(), denoptim.programs.fragmenter.CuttingRule.isHAPTO(), denoptim.programs.fragmenter.CuttingRule.satisfiesOptions(), and denoptim.programs.fragmenter.CuttingRule.toString().
|
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().
|
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().
|
private |
SMARTS query matching the first atom.
Definition at line 52 of file CuttingRule.java.
Referenced by denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getSMARTSAtom0(), denoptim.programs.fragmenter.CuttingRule.getWholeSMARTSRule(), denoptim.programs.fragmenter.CuttingRule.involvesMetal(), denoptim.programs.fragmenter.CuttingRule.isSymmetric(), and denoptim.programs.fragmenter.CuttingRule.toString().
|
private |
SMARTS query matching the second atom.
Definition at line 57 of file CuttingRule.java.
Referenced by denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getSMARTSAtom1(), denoptim.programs.fragmenter.CuttingRule.getWholeSMARTSRule(), denoptim.programs.fragmenter.CuttingRule.involvesMetal(), denoptim.programs.fragmenter.CuttingRule.isSymmetric(), and denoptim.programs.fragmenter.CuttingRule.toString().
|
private |
SMARTS query matching the bond between first and second atom.
Definition at line 62 of file CuttingRule.java.
Referenced by denoptim.programs.fragmenter.CuttingRule.CuttingRule(), denoptim.programs.fragmenter.CuttingRule.getBondOrder(), denoptim.programs.fragmenter.CuttingRule.getSMARTSBnd(), denoptim.programs.fragmenter.CuttingRule.getWholeSMARTSRule(), and denoptim.programs.fragmenter.CuttingRule.toString().