Mychem  0.9.3
 All Classes Files Functions Variables Macros
Functions
molmatch_wrapper.cpp File Reference
#include "molmatch_wrapper.h"
#include <mychem/config.h>
#include <mychem/dlhandler.h>
#include <mychem/serialization.h>
#include <openbabel/mol.h>
#include <openbabel/obconversion.h>
#include <openbabel/parsmart.h>
#include <sstream>
Include dependency graph for molmatch_wrapper.cpp:

Functions

long long match_substructure (const char *smarts_pattern, const char *serializedMolecule)
 
char * substructure_atom_ids (const char *smarts_pattern, const char *serializedMolecule)
 
long long substructure_count (const char *smarts_pattern, const char *serializedMolecule)
 

Detailed Description

Mychem Molmatch Wrapper.

This file is part of the Mychem software. It contains functions related to chemical file comparison.

Author
Jerome Pansanel jerom.nosp@m.e.pa.nosp@m.nsane.nosp@m.l@ip.nosp@m.hc.cn.nosp@m.rs.f.nosp@m.r
Aurelie De Luca aurel.nosp@m.iede.nosp@m.luca@.nosp@m.gmai.nosp@m.l.com

Function Documentation

long long match_substructure ( const char *  smarts_pattern,
const char *  serializedMolecule 
)

Checks if a molecule is a substructure of an other molecule.

Parameters
smarts_patternThe molecule to check (SMARTS format)
serializedMoleculeThe reference molecule (serialized OBMol object)
Returns
1 if query is a substructure of reference

References LibHandler::isLoaded(), and unserializeOBMol().

char* substructure_atom_ids ( const char *  smarts_pattern,
const char *  serializedMolecule 
)

Returns the atom ids of the reference molecule's atoms that are contained in substructures matching the query.

Parameters
smarts_patternThe molecule to check (SMARTS format)
serializedMoleculeThe reference molecule (serialized OBMol object)
Returns
The list of atom ids

References LibHandler::isLoaded(), and unserializeOBMol().

long long substructure_count ( const char *  smarts_pattern,
const char *  serializedMolecule 
)

Returns the number of substructures within a reference structure.

Parameters
smarts_patternThe substructure to check (SMARTS format)
serializedMoleculeThe reference structure (serialized OBMol object)
Returns
The number of substructure

References LibHandler::isLoaded(), and unserializeOBMol().