BALL::SmartsParser::SmartsParser::SPAtom Class Reference

Smarts Parser Atom class. More...

#include <smartsParser.h>

List of all members.


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

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.
SPAtom (const String &symbol)
copy constructor
virtual ~SPAtom ()
destructor
Accessors
void setProperty (PropertyType type, int int_value)
sets an int property
void setProperty (PropertyType type, bool flag)
sets a flag
void setProperty (PropertyType type, const Element *element)
sets a Element
void setProperty (PropertyType type, ChiralClass chirality)
sets a chirality value
void setProperty (Property property)
sets a property
void addPropertiesFromSPAtom (SPAtom *sp_atom)
adds properties from another SPAtom
void setNotProperty (PropertyType type)
negotiates the property definition
bool hasProperty (PropertyType type) const
returns true if the property is set
PropertyValue getProperty (PropertyType type)
returns a value of the given property type
Size countProperties () const
returns the number of properties
Size getDefaultValence (const Atom *atom) const
return the number of valences of the given atom
Size countRealValences (const Atom *atom) const
returns the number of available valences of the given atom
Size getNumberOfImplicitHydrogens (const Atom *atom) const
returns the number of implicit hydrogens of the given atom
Predicates
bool equals (const Atom *atom) const
returns true if the local properties of the atoms match

Protected Attributes

Atom * atom_
the atom which this sp_atom belongs to
std::map< PropertyType,
PropertyValue >
properties_
the properties of this SPAtom
std::set< PropertyType > not_properties_
the properties which are negated

Detailed Description

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.


Generated on Thu Aug 6 18:30:48 2009 for BALL by doxygen 1.5.8