public class SmartsAtomQuerifier extends Object implements chemaxon.marvin.modules.smarts.SmartsAtomTreeParserTreeConstants
Constructor and Description |
---|
SmartsAtomQuerifier()
Creates a new SmartsAtomQuerifier object.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
hasSMARTSProps(MolAtom atom)
Tests whether it is a SMARTS query atom.
|
static boolean |
hasSMARTSPropsExcluding(MolAtom atom,
String exclude)
Tests whether it is a SMARTS query atom.
|
boolean |
isMarvinCompMode()
Marvin compatibility mode.
|
void |
setMarvinCompMode(boolean marvinCompMode)
Marvin compatibility mode.
|
static void |
setQuerystr(MolAtom atom,
String s)
Assigns the query properties string to this atom while setting all
necessary atom and query properties.
|
static void |
setQuerystr(MolAtom atom,
String s,
int options)
Assigns the query properties string to this atom while setting all
necessary atom and query properties.
|
static void |
setSMARTS(MolAtom atom,
String s)
Sets SMARTS query string data.
|
public SmartsAtomQuerifier()
public boolean isMarvinCompMode()
public static final boolean hasSMARTSPropsExcluding(MolAtom atom, String exclude)
exclude
- list of SMARTS properties to excludetrue
if it has SMARTS properties,
false
otherwisepublic static final boolean hasSMARTSProps(MolAtom atom)
true
if it has SMARTS properties,
false
otherwisepublic static void setSMARTS(MolAtom atom, String s) throws SecurityException
s
- the SMARTS stringSecurityException
- the SmilesImport cannot be loaded,
possibly because of a misconfigured firewallpublic void setMarvinCompMode(boolean marvinCompMode)
marvinCompMode
- marvin compatibility mode to set.public static void setQuerystr(MolAtom atom, String s, int options)
In daylight smarts H is only considered as H atom when the atom expression has the syntax [<mass>H<charge><map>] (mass, charge and map are optional). If options is SMARTS_H_MARVIN_COMP_MODE and "H" is not in the form [<mass>H<charge><map>] then it may be interpreted as Hydrogen atom, not total H count! It is neccesary for backward compatibility.
s
- the query stringoptions
- Possible values: SMARTS_H_MARVIN_COMP_MODE or
SMARTS_H_DAYLIGHT_COMP_MODE. Instead of using this option, we
recommend using unambiguous smarts queries: #1 for H atom and
H1 for H count 1.MolAtom.SMARTS_H_DAYLIGHT_COMP_MODE
,
MolAtom.SMARTS_H_MARVIN_COMP_MODE
public static void setQuerystr(MolAtom atom, String s)
s
- the query string