BALL::SmartsParser::SPAtom Class Reference

Smarts Parser Atom class. More...

#include <BALL/STRUCTURE/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

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.
 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

Atomatom_
 the atom which this sp_atom belongs to
std::map< PropertyType,
PropertyValue
properties_
 the properties of this SPAtom
std::set< PropertyTypenot_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.

Definition at line 188 of file smartsParser.h.


Member Enumeration Documentation

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.


Constructor & Destructor Documentation

BALL::SmartsParser::SPAtom::SPAtom (  ) 

Default constructor.

BALL::SmartsParser::SPAtom::SPAtom ( const String symbol  ) 

copy constructor

virtual BALL::SmartsParser::SPAtom::~SPAtom (  )  [virtual]

destructor


Member Function Documentation

void BALL::SmartsParser::SPAtom::addPropertiesFromSPAtom ( SPAtom sp_atom  ) 

adds properties from another SPAtom

Size BALL::SmartsParser::SPAtom::countProperties (  )  const

returns the number of properties

Size BALL::SmartsParser::SPAtom::countRealValences ( const Atom atom  )  const

returns the number of available valences of the given atom

bool BALL::SmartsParser::SPAtom::equals ( const Atom atom  )  const

returns true if the local properties of the atoms match

Size BALL::SmartsParser::SPAtom::getDefaultValence ( const Atom atom  )  const

return the number of valences of the given atom

Size BALL::SmartsParser::SPAtom::getNumberOfImplicitHydrogens ( const Atom atom  )  const

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 ( Property  property  ) 

sets a property

void BALL::SmartsParser::SPAtom::setProperty ( PropertyType  type,
ChiralClass  chirality 
)

sets a chirality value

void BALL::SmartsParser::SPAtom::setProperty ( PropertyType  type,
const Element element 
)

sets a Element

void BALL::SmartsParser::SPAtom::setProperty ( PropertyType  type,
bool  flag 
)

sets a flag

void BALL::SmartsParser::SPAtom::setProperty ( PropertyType  type,
int  int_value 
)

sets an int property


Member Data Documentation

the atom which this sp_atom belongs to

Definition at line 371 of file smartsParser.h.

the properties which are negated

Definition at line 377 of file smartsParser.h.

the properties of this SPAtom

Definition at line 374 of file smartsParser.h.

Generated by  doxygen 1.6.3