BALL
1.4.79
|
Smarts Parser Atom class. More...
#include <BALL/STRUCTURE/smartsParser.h>
Classes | |
struct | Property |
Property struct of smarts parser atom. More... | |
union | PropertyValue |
possible types of the properties More... | |
Public Types | |
enum | PropertyType { ISOTOPE = 1, CHARGE, AROMATIC, ALIPHATIC, IN_NUM_RINGS, IN_RING_SIZE, IN_BRACKETS, CONNECTED, EXPLICIT_HYDROGENS, VALENCE, IMPLICIT_HYDROGENS, DEGREE, RING_CONNECTED, CHIRALITY, SYMBOL } |
enum of all properties possible for a smarts parser atom More... | |
Public Member Functions | |
Constructors and destructors | |
Common properties are: bool is_not Size isotope bool not_isotope Index charge bool not_charge bool is_aromatic bool not_aromatic bool aliphatic bool not_aliphatic Index in_num_rings bool not_in_num_rings bool in_brackets Index in_ring_size bool not_in_ring_size Size connected bool not_connected_to Size explicit_hydrogens bool not_explicit_hydrogens Size valence bool not_valence Size implicit_hydrogens bool not_implicit_hydrogens Size degree bool not_degree Size ring_connected bool not_ring_connected bool not_chirality String symbol all this properties can be set | |
SPAtom () | |
Default constructor. More... | |
SPAtom (const String &symbol) | |
copy constructor More... | |
virtual | ~SPAtom () |
destructor More... | |
Accessors | |
void | setProperty (PropertyType type, int int_value) |
sets an int property More... | |
void | setProperty (PropertyType type, bool flag) |
sets a flag More... | |
void | setProperty (PropertyType type, const Element *element) |
sets a Element More... | |
void | setProperty (PropertyType type, ChiralClass chirality) |
sets a chirality value More... | |
void | setProperty (Property property) |
sets a property More... | |
void | addPropertiesFromSPAtom (SPAtom *sp_atom) |
adds properties from another SPAtom More... | |
void | setNotProperty (PropertyType type) |
negotiates the property definition More... | |
bool | hasProperty (PropertyType type) const |
returns true if the property is set More... | |
PropertyValue | getProperty (PropertyType type) |
returns a value of the given property type More... | |
Size | countProperties () const |
returns the number of properties More... | |
Size | getDefaultValence (const Atom *atom) const |
return the number of valences of the given atom More... | |
Size | countRealValences (const Atom *atom) const |
returns the number of available valences of the given atom More... | |
Size | getNumberOfImplicitHydrogens (const Atom *atom) const |
returns the number of implicit hydrogens of the given atom More... | |
Predicates | |
bool | equals (const Atom *atom) const |
returns true if the local properties of the atoms match More... | |
Protected Attributes | |
Atom * | atom_ |
the atom which this sp_atom belongs to More... | |
std::map< PropertyType, PropertyValue > | properties_ |
the properties of this SPAtom More... | |
std::set< PropertyType > | not_properties_ |
the properties which are negated More... | |
Smarts Parser Atom class.
This class implements the representation of a atom of the smarts parser. It is faster than using the BALL Atom class with Properties. As all the possible properties are known from the definition of the SMARTS language, the properties are listed within the enumeration.
Definition at line 188 of file smartsParser.h.
enum of all properties possible for a smarts parser atom
Enumerator | |
---|---|
ISOTOPE | |
CHARGE | |
AROMATIC | |
ALIPHATIC | |
IN_NUM_RINGS | |
IN_RING_SIZE | |
IN_BRACKETS | |
CONNECTED | |
EXPLICIT_HYDROGENS | |
VALENCE | |
IMPLICIT_HYDROGENS | |
DEGREE | |
RING_CONNECTED | |
CHIRALITY | |
SYMBOL |
Definition at line 193 of file smartsParser.h.
BALL::SmartsParser::SPAtom::SPAtom | ( | ) |
Default constructor.
BALL::SmartsParser::SPAtom::SPAtom | ( | const String & | symbol | ) |
copy constructor
|
virtual |
destructor
void BALL::SmartsParser::SPAtom::addPropertiesFromSPAtom | ( | SPAtom * | sp_atom | ) |
adds properties from another SPAtom
Size BALL::SmartsParser::SPAtom::countProperties | ( | ) | const |
returns the number of properties
returns the number of available valences of the given atom
returns true if the local properties of the atoms match
return the number of valences of the given atom
returns the number of implicit hydrogens of the given atom
PropertyValue BALL::SmartsParser::SPAtom::getProperty | ( | PropertyType | type | ) |
returns a value of the given property type
bool BALL::SmartsParser::SPAtom::hasProperty | ( | PropertyType | type | ) | const |
returns true if the property is set
void BALL::SmartsParser::SPAtom::setNotProperty | ( | PropertyType | type | ) |
negotiates the property definition
void BALL::SmartsParser::SPAtom::setProperty | ( | PropertyType | type, |
int | int_value | ||
) |
sets an int property
void BALL::SmartsParser::SPAtom::setProperty | ( | PropertyType | type, |
bool | flag | ||
) |
sets a flag
void BALL::SmartsParser::SPAtom::setProperty | ( | PropertyType | type, |
const Element * | element | ||
) |
sets a Element
void BALL::SmartsParser::SPAtom::setProperty | ( | PropertyType | type, |
ChiralClass | chirality | ||
) |
sets a chirality value
void BALL::SmartsParser::SPAtom::setProperty | ( | Property | property | ) |
sets a property
|
protected |
the atom which this sp_atom belongs to
Definition at line 371 of file smartsParser.h.
|
protected |
the properties which are negated
Definition at line 377 of file smartsParser.h.
|
protected |
the properties of this SPAtom
Definition at line 374 of file smartsParser.h.