OpenBabel molecule object port.
More...
#include <MoleculeOB.hh>
Wrapper class around an OpenBabel molecule object (OBMol).
It utilizes the OpenBabel library (http://openbabel.org) for the
conversion.
- Author
- Martin Mann (c) 2009 http://www.bioinf.uni-freiburg.de/~mmann/
Definition at line 30 of file MoleculeOB.hh.
Construction
NOTE: the protons of the molecule are removed during construction.
- Parameters
-
mol | the molecule to be represented by this object |
static OpenBabel::OBMol ggl::chem::MoleculeOB::convert |
( |
const Molecule & |
mol | ) |
|
|
static |
Converts a Molecule into an OpenBabel molecule instance.
NOTE: conversion is done via CML encoding and thus currently inefficient.
- Parameters
-
mol | the molecule to convert |
- Returns
- the according OBMol instance
static Molecule ggl::chem::MoleculeOB::convert |
( |
const OpenBabel::OBMol & |
mol | ) |
|
|
static |
Converts an OpenBabel molecule object into a Molecule instance.
NOTE: only atom label and formal charge are considered for each atom.
- Parameters
-
mol | the molecule to convert |
- Returns
- the according Molecule instance
double ggl::chem::MoleculeOB::getMolEnergy |
( |
| ) |
|
Access to the complete energy of the molecule, calculated via force field methods
In error case (e.g. force field not loadable) NaN is returned.
- Returns
- the complete energy of this molecule (in kJ/mol)
double ggl::chem::MoleculeOB::getMolWeight |
( |
const bool |
implicitH = true | ) |
|
Access to the molar mass of the molecule
- Parameters
-
implicitH | flag whether hydrogens should be added implicitly by openbabel or not |
- Returns
- the standard molar mass given by IUPAC atomic masses (amu)
OpenBabel::OBMol ggl::chem::MoleculeOB::curMol |
|
protected |
The documentation for this class was generated from the following file: